Displaying 20 results from an estimated 5000 matches similar to: "k-NN routines"
2001 Nov 08
2
programming question
Dear r-help,
I am trying to build a new function (to process rpart objects) that will
output matrix that has a row for each node and a column for
each feature. With each entry in the table is a numerical property
at that node for that feature (e.g. surrogate split agreement, improvement).
My current trouble is that the only clue to the identity of the feature is
stored as the *name* of the
2000 Mar 08
3
Reading data for discriminant analysis
Dear R users,
I want to do discriminant analysis on my data. I have
successfully followed the discriminant analysis in V & R on
the iris data:
> ir <- rbind (iris3[,,1],iris3[,,2],iris3[,,3])
> ir.species <- c(rep("s",50),rep("c",50),rep("v",50))
> a <- lda(log(ir),ir.species)
> a$svd^2/sum(a$svd^2)
[1] 0.996498601 0.003501399
> a.x <-
2002 Jan 22
1
documentation and plotting with lqs
Dear r-help,
Is there any available description of the components of lqs objects
found in the package "lqs"?
> names(slts)
[1] "crit" "sing" "coefficients" "bestone"
[5] "fitted.values" "residuals" "scale" "terms"
[9] "call"
2001 Sep 04
1
searching the r-help list
Do those who have had trouble finding stuff in the R-archive
used the search engine?
http://www.scirus.com/
And as far as threading goes. My mailler "mutt" threads the
mailing list quite nicely.
--Clayton
--
Clayton Springer, Ph. D.
Sandia National Laboratories csprin at ca.sandia.gov
Biosystems Research Department (925) 294-2143
P.O. Box
2001 May 22
1
Surrogate splits for decision trees
Dear R,
Short verse of the question:
Is there R code which will calculate surrogate splits
and/or delta impurity for decision trees at each node?
Long Version:
I have local, legacy code which I use to calculate my decision trees.
I would like to switch to R, but as I understand it surrogate splits
are not implemented.
Surrogate splits and feature ranking are described in Breiman et al
2002 Feb 26
1
Logistic Regression woes
Hi All,
When I tried to do logistic regression and I got the following messages:
> SampledW.glm.ALL <- glm (V1 ~ ., family = binomial, data = SampledW)
Warning messages:
1: Algorithm did not converge in: (if (is.empty.model(mt)) glm.fit.null else glm.fit)(x = X, y = Y,
2: fitted probabilities numerically 0 or 1 occurred in: (if (is.empty.model(mt)) glm.fit.null else glm.fit)(x = X, y =
2002 Apr 25
1
understanding and resolving seg faults
Dear r-devel,
I am mutating rpart to do calculations on trees.
I am trying to extract information from the tree.
However, I got a seg. fault.
This is the offending line in "rpmatrix.c":
deltaI[0][0] = spl->improve;
(Commenting it out cures the seg fault)
I would like some advice on how to debug this. I have allocated memory
with calloc and deltaI[0][0] should be
2000 Mar 08
1
Trouble with data dim
Dear R users,
I am a novice user working through V & R. My first question stems
from p20 of the second edition.:
I perform the following actions:
> mydata <- c(2.9,3.4,3.4,3.7,3.7,2.8,2.8,2.5,2.4,2.4)
> names(mydata) <- c('c','j','b','e','i','h','g','d','f','a')
> mydata
c j b e i h
1999 Oct 25
1
trouble reading in datasets
Dear All,
I was trying to follow some of the examples in Venables and Ripley "Modern applied ... with S-plus"
I have downloaded a copy of the iris data set and loaded into R. :
however I cannot use the apply command (from p47):
> apply (iris, 2 ,mean)
Error in sum(..., na.rm = na.rm) : invalid "mode" of argument
> apply (iris, c(2) ,mean)
Error in sum(..., na.rm =
2001 Nov 12
0
Additional Documentation for rpart?
Dear r-help,
I am looking for additional documentation on the "adj" column in rpart's
splits matrix. The help says:
adj
gives the adjusted concordance for surrogate splits
I am looking info about "adjusted concordance". I cannot find this phrase
in either Therneau & Atkinson original RPART documentation or the CART
book.
This question came up in the
2010 Mar 09
1
create picture (k -the nearest neighbours)
Hi
I want to create a nice picture about my result of k -the nearest neighbours
algorithm. Here is my easy code:
#################################
library(klaR)
library(ipred)
library(mlbench)
data(PimaIndiansDiabetes2)
dane=na.omit(PimaIndiansDiabetes2)[,c(2,5,9)]
dane[,2]=log(dane[,2])
dane[,1:2]=scale(dane[,1:2])
zbior.uczacy=sample(1:nrow(dane),nrow(dane)/2,F)
2009 Apr 25
1
Overlapping parameters "k" in different functions in "ipred"
Dear List,
I have a question regarding "ipred" package. Under 10-fold cv, for different knn ( = 1,3,...25), I am getting same misclassification errors:
#############################################
library(ipred)
data(iris)
cv.k = 10 ## 10-fold cross-validation
bwpredict.knn <- function(object, newdata) predict.ipredknn(object, newdata, type="class")
for (i in
2011 Jun 09
1
k-nn hierarchical clustering
Hi there,
is there any R-function for k-nearest neighbour agglomerative hierarchical
clustering?
By this I mean standard agglomerative hierarchical clustering as in hclust
or agnes, but with the k-nearest neighbour distance between clusters used
on the higher levels where there are at least k>1 distances between two
clusters (single linkage is 1-nearest neighbour clustering)?
Best regards,
2014 Dec 15
2
need guidance on getting started...again
Thanks, Mark. Um, how's about from the commandline or how do I get, I guess we're still using X11, windows to load.
Sorry, :<}}}
Clayton
>-----Original Message-----
>From: centos-bounces at centos.org [mailto:centos-bounces at centos.org] On
>Behalf Of Mark LaPierre
>Sent: Sunday, December 14, 2014 5:50 PM
>To: centos at centos.org; Mark LaPierre
>Subject: Re:
2023 Mar 10
1
linux-6.2-rc4+ hangs on poweroff/reboot: Bisected
On Fri, Mar 10, 2023 at 10:26?AM Chris Clayton <chris2553 at googlemail.com> wrote:
>
> Hi.
>
> Is it likely that this fix will be sumbmitted to mainline during the ongoing 6.3 development cycle?
>
yes, it's already pushed to drm-misc-fixed, which then will go into
the current devel cycle. I just don't know when it's the next time it
will be pushed upwards, but it
2023 Feb 20
1
linux-6.2-rc4+ hangs on poweroff/reboot: Bisected
On Mon, Feb 20, 2023 at 11:51 AM Chris Clayton <chris2553 at googlemail.com> wrote:
>
>
>
> On 20/02/2023 05:35, Ben Skeggs wrote:
> > On Sun, 19 Feb 2023 at 04:55, Chris Clayton <chris2553 at googlemail.com> wrote:
> >>
> >>
> >>
> >> On 18/02/2023 15:19, Chris Clayton wrote:
> >>>
> >>>
> >>> On
2009 Aug 17
2
Newbie that don't understand R code
I got some R code that I don't understand.
Question as comment in code
//where is t comming from, what is phi inverse
rAC <- function(name, n, d, theta){
#generic function for Archimedean copula simulation
illegalpar <- switch(name,
clayton = (theta < 0),
gumbel = (theta < 1),
frank = (theta < 0),
BB9 = ((theta[1] < 1) | (theta[2] < 0)),
GIG = ((theta[2] < 0) |
2014 Dec 15
2
How serious are we about not wanting to see...
Personally, I am agnostic. I've just read thru Centos documentation that
there is a big effort to remove all upstream personalities from Centos.
Personally, I don't see why RH is doing this. I would think that it
undermines RH. But I'm still new/old to all of this. It used to be the big
argument was between Unix from Berkeley(4.? I think) and SysIII/V. Always
always battles for turf.
2004 Feb 23
2
outputs of KNN prediction
Hello there:
I got 13 variables in my training/target set, the first 12 variables are
mixture of numerical and categorical variables. The last one is the one I
need
to predict, and it is a numerical variable.
>train<-read.table("train.txt")
>test<-read.table("test.txt")
>cl<-factor(train[,13])
>pred<-knn(train, test, clk=3, prob=TRUE)
>pred
I got
2009 May 14
1
KNN script: Identity of specific K samples chosen?
I am currently doing some prediction work using the knn script in the
'class' package. Does anyone know a way of having R return the IDs (sample
IDs, or column IDs of the training matrix) of the 'k' samples that are
chosen by the algorithm as being nearest to a given test sample?
I have searched/read everything I can about the script, however have not
found anything other than the