similar to: lda problem with R

Displaying 20 results from an estimated 10000 matches similar to: "lda problem with R"

2009 Jan 06
0
Singularity of lda function in MASS package
I have two specific questions regarding the output of lda function in MASS. #Question1: #========= n: sample size, p: number of variables Some articles in the literature say that LDA is singular for p > n-1. However, my experimentation with lda (default arguments) for two class problems shows collinearity for p > n-2. Does anyone know why this is the case? Does lda (MASS) use a different
2012 Jul 26
0
lda, collinear variables and CV
Dear R-help list, apparently lda from the MASS package can be used in situations with collinear variables. It only produces a warning then but at least it defines a classification rule and produces results. However, I can't find on the help page how exactly it does this. I have a suspicion (it may look at the hyperplane containing the class means, using some kind of default/trivial
2007 Dec 27
1
Lda and Qda
Hi all, I'm working with some data: 54 variables and a column of classes, each observation as one of a possible seven different classes: > var.can3<-lda(x=dados[,c(1:28,30:54)],grouping=dados[,55],CV=TRUE) Warning message: In lda.default(x, grouping, ...) : variables are collinear > summary(var.can3) Length Class Mode class 30000 factor numeric ### why?? I
2002 Feb 22
2
R gnome produces errors?: a clue!
I've got something that might be a clue to understand the strange behaviour of lda in R --gui="gnome": in R --vanilla: library(MASS) load("mod23puriflda.rda") > a <- lda.default(x=mod23puriflda[,2:5],grouping=mod23puriflda[,6],CV=F) works fine. I save lda.default as a local rda file: > milda.nognome <- lda.default >
2012 Aug 14
0
Problems with lda-CV, and collinear variables in lda
Dear R-help list, two issues regarding lda. 1) I'm puzzled by the fact that lda's in-build cross-validation gives results different from the manual cross-validation routine that I run (of course mine may be wrong, but I don't think so). See here: library(MASS) set.seed(12345) n <- 50 p <- 10 # or p<- 200 testdata <- matrix(ncol=p,nrow=n) for (i in 1:p) testdata[,i]
2010 Apr 29
1
randomness in stepclass (klaR) or lda (MASS) ?
Hi, a colleague ran a stepwise discriminant analysis twice in a row and got different results, suggesting some "sochasticity" in the algorithms involved. I looked at her data and found that there was a lot of collinearity, so that I reckoned that maybe "stepclass" (klaR) cannot find a clear winner when trying to include a new variable and makes a random choice. Is that true?
2002 Feb 19
1
Rgnome produces errors?
I'm totally confused by the following: 1. I start R simply by typing R on the shell and the following works with no problems: > library(MASS) > a <- lda(x=mod23puriflda[,2:5],grouping=mod23puriflda[,6],CV=F) > summary(a) Length Class Mode prior 23 -none- numeric counts 23 -none- numeric means 92 -none- numeric scaling 16 -none- numeric lev 23
2017 Oct 31
0
lasso and ridge regression
Dear All The problem is about regularization methods in multiple regression when the independent variables are collinear. A modified regularization method with two tuning parameters l1 and l2 and their product l1*l2 (Lambda 1 and Lambda 2) such that l1 takes care of ridge property and l2 takes care of LASSO property is proposed The proposed method is given
2003 Feb 24
1
Mass: lda and collinear variables
hello list, when I use method lda of the MASS package I experience a warning: variables are collinear in: lda.default(data[train, ], classes[train]) Is there an easy way to recover from this issue within the MASS package? Or how can I tell how severe this issue is at all? I understand that I shouldn't use lda at all with collinear data and should use "quadratische" (squared?)
2013 Feb 06
1
how to extract test for collinearity and constantcy used in lda
Hi everyone, I'm trying to vectorize an application of lda to each 2D slice of a 3D array, but am running into trouble: It seems there are quite a few 2D slices that trigger either the "variables are collinear" warning, or worse, trigger a "variable appears to be constant within groups" error and fails (i.e., ceases computation rather than skips bad slice). There are
2009 Feb 27
0
help with correct use of function lsfit
To the purpose of fitting a 2nd order polynomial (a + b*x + c*x^2) to the chunk of signal falling in a 17 consecutive samples window I wrote the following very crude script. Since I have no previous experience of using Least Square Fit with R I would appreciate your supervision and suggestion. I guess the returned coefficients of the oolynomial are: a = -1.3191398 b = 0.1233055 c = 0.9297401
2009 Sep 28
1
help with lda function
I am having a problem understanding the lda package. I have a dataset here: [,1] [,2] [,3] [1,] 2.95 6.63 0 [2,] 2.53 7.79 0 [3,] 3.57 5.65 0 [4,] 3.16 5.47 0 [5,] 2.58 4.46 1 [6,] 2.16 6.22 1 [7,] 3.27 3.52 1 If I do the following; "names(d)<-c("y","x1","x2") d$x1 = d$x1 * 100 d$x2 = d$x2 * 100 g<-lda( y ~ x1 + x2, data=d) v2
2005 Aug 02
1
problem using evaluating a formula
##data y1 <- matrix(c(3,1,0,1,0,1,1,0,0,0,1,0,0,0,1,1,0,1,1,1), nrow = 5, byrow = TRUE) y2 <- matrix(c (3,0,10,3,3,0,0,1,1,0,0,0,0,0,1,0,1,0,0,2,1,0,1,1,0,2,1,1,4,1), nrow = 5, byrow = TRUE) y1 <- as.data.frame(y1) y2 <- as.data.frame(y2) rownames(y1) <- rownames(y2) <- paste("site", 1:5, sep = "") colnames(y1) <-
2009 Sep 29
1
help with lda function from MASS package
Thanks David, Yes, I am talking about the MASS package.Thank you for pointing out that these scale the same. My question is, how do I get from the V1 data: V1 1 164.4283 2 166.2492 3 170.5232 4 156.5622 5 127.7540 6 136.7704 7 136.3436 to the other set of data: + 1 -2.3769280 + 2 -2.7049437 + 3 -3.4748309 + 4 -0.9599825 + 5 4.2293774 + 6 2.6052193 + 7 2.6820884 On Mon, Sep 28, 2009
2007 Aug 11
1
LDA and RDA: different training errors
Hello I try to fit a LDA and RDA model to the same data, which has two classes. The problem now is that the training errors of the LDA model and the training error of the RDA model with alpha=0 are not the same. In my understanding this should be the case. Am I wrong? Can someone explain what the reason for this difference could be? Here my code: LDA model: =========== % x is a dataframe tmp =
2023 Dec 23
1
ssh-keygen generator 3 broken.
Hello, I was re-generating the moduli for SSH, and during that process I noticed that, when running the following command: ssh-keygen -M screen -O prime-tests=600 -O generator=3 -f moduli-2048-01.candidates moduli-2048-01c It does not produce any errors, only the following: ebug2: ???1467763: (4) Sophie-Germain debug2: ???1467763: generator 0 != 3 debug2: ???1467764: (4) Sophie-Germain
2023 Dec 23
1
ssh-keygen generator 3 broken
Hello, I was re-generating the moduli for SSH, and during that process I noticed that, when running the following command: ssh-keygen -M screen -O prime-tests=600 -O generator=3 -f moduli-2048-01.candidates moduli-2048-01c It does not produce any errors, only the following: ebug2: ???1467763: (4) Sophie-Germain debug2: ???1467763: generator 0 != 3 debug2: ???1467764: (4) Sophie-Germain
2010 Feb 28
1
Gradient Boosting Trees with correlated predictors in gbm
Dear R users, I’m trying to understand how correlated predictors impact the Relative Importance measure in Stochastic Boosting Trees (J. Friedman). As Friedman described “ …with single decision trees (referring to Brieman’s CART algorithm), the relative importance measure is augmented by a strategy involving surrogate splits intended to uncover the masking of influential variables by others
1997 Nov 28
0
R-alpha: Latin-1 characters / Locale etc.
[to R-devel, for everyone's information; thanks a lot, Peter!] >>>>> "PD" =3D=3D Peter Dalgaard BSA <p.dalgaard@biostat.ku.dk> writes: PD> Hmmm. You may need a call to PD> #include <locale.h> PD> setlocale(LC_ALL,"") PD> (or LC_CTYPE?) before your environment variables take effect. Yes, this was `it'.
2005 Jun 26
0
Factor correlations in factanal
Dear R-devel list members, Ben Fairbank draw it to my attention that factanal() (in the stats package) doesn't report factor correlations for oblique rotations. Looking at the source, I see that factanal also doesn't save the factor-transformation (rotation) matrix from which these correlations can be computed. I've modified the source, attached below, so that the transformation