Displaying 20 results from an estimated 20000 matches similar to: "how to preserve trained model in LDA?"
2007 Jan 18
5
how to get the index of entry with max value in an array?
Hi all:
A short question:
For example, a=[3,4,6,2,3], obviously the 3rd entry of the array has the maxium value, what I want is index of the maxium value: 3. is there a neat expression to get this index?
Thank you!
Best,
Feng
[[alternative HTML version deleted]]
2006 Dec 04
2
ask for help
Dear Sir
I would appreciate recieving the manul instruction of the program foe geochemical calculations.please what are the requirmentsof using the program
Thanks
Tanat university faculty of science , geology department ,tanta Egypt
Prof.Mohamed Fouad Ghoneim
Ph.D- D.Sc.
Head of Geology Department
Faculty of Science
Tanta University, Egypt
www.profghoneim.tk
2006 Jan 27
1
save trained randomForest model
I used the following command to train a randomForest model
train.rf <- randomForest(grp ~ ., data=tr, ntree=100, mtry=50)
My question is how to save the trained model so that it can be loaded later for testing new samples?
Thanks,
Luk
---------------------------------
[[alternative HTML version deleted]]
2007 Jul 29
4
Call R program from C++ code
Hi All:
I'm developing an application program using C++. From my C++
code, I would call some R program I have written. I' wondering if R provide
some compiler that can compile R program into executable program. I searched
R-help, there are a lot of posts talking about writing C++ code in R
program, but few about calling R from C++.
I might be wrong that R
2010 Jul 04
2
help with predict.lda
HI, Dear community,
I am using the linear discriminant analysis to build model and make new
predictions:
> dim(train) #training data
[1] 1272 22
> dim(valid) # validation data
[1] 140 22
lda.fit <- lda(out ~ ., data=train, na.action="na.omit", CV=TRUE) # model
fitting of linear discriminant analysis on training data
> predict(lda.fit, valid) # make prediction on
2009 Oct 20
2
LDA Precdict - Seems to be predicting on the Training Data
When I import a simple dataset, run LDA, and then try to use the model to
forecast out of sample data, I get a forecast for the training set not the
out of sample set. Others have posted this question, but I do not see the
answers to their posts.
Here is some sample data:
Date Names v1 v2 v3 c1
1/31/2009 Name1 0.714472361 0.902552278 0.783353694 a
1/31/2009 Name2 0.512158919 0.770451596
2006 Nov 11
1
predict.lda is missing ?
I'm trying to classify some observations using lda and I'm getting a
strange error. I loaded the MASS package and created a model like so:
>train <- mod1[mod1$rand < 1.7,]
>classify <- mod1[mod1$rand >= 1.7,]
>lda_res <- lda(over_win ~ t1_scrd_a + t1_alwd_a, data=train, CV=TRUE)
That works, and all is well until I try to do a prediction for the holdouts:
2008 Jun 25
1
LDA on pre-assigned training and testing data sets
Dear r-help
I am trying to run LDA on a training data set, and test it on another data set with the same variables. I found examples using crossvalidation, and using training and testing data sets set up with sample, but not when they are preassigned.
Here is what I tried
# FIRST SET UP A DATAFRAME WITH ALL THE DATA AND CREATE NEW VARIABLES
traintest1 <-
2012 Aug 27
0
Optimizing a model toward desired outputs once trained?
I didn't get any responses to this question on stats.SE:
- http://stats.stackexchange.com/questions/34415/optimization-of-models-ann-radial-basis-etc-in-r-to-target-predictor-levels
What I'm looking for, using neuralnet as an example, is how to guide a
model toward an output profile once the model is trained. For example:
model1 <- neuralnet(formula=out1 ~ intput1 + input2 + input3 +
2007 May 10
1
anyone konw Polyclass package in R?
Hi everyone:
Polyclass is a polytomous logistic regression model using
linear splines and their tensor products. It provides estimates for
conditional class probabilities which can then be used to predict class
labels. I know there is Polyclass package in S-plus. So I'm wondering if
there is a corresponding package in R? I have been searching for it for
quite a while, but still
2008 Jun 10
1
Question on lda and predict
Hello
Using R 2.7.0 on Windows.
I am running a linear discriminant analysis as follows
<<<<
discrim1 <- lda(normvar~ mafmahal+ mrfmahal+ mffmahal+ bafmahal+ brfmahal+
cofmahal+ bmfmahal+ cfmahal+ fractmahal+ antmahal+ absmifmahal+ absifmahal, subset = train)
prediction <- predict(discrim1, traintest1[-train,])$class
>>>
When I do this, I get a warning
2004 Jan 09
3
ipred and lda
Dear all,
can anybody help me with the program below? The function predict.lda
seems to be defined but cannot be used by errortest.
The R version is 1.7.1
Thanks in advance,
Stefan
----------------
library("MASS");
library("ipred");
data(iris3);
tr <- sample(1:50, 25);
train <- rbind(iris3[tr,,1], iris3[tr,,2], iris3[tr,,3]);
test <- rbind(iris3[-tr,,1],
2005 Feb 11
1
Help concerning Lasso::l1ce
Hi,
First, when I try the example Prostate with bound 0.44
(as in the manual), I got a different result:
> l1c.P <- l1ce(lpsa ~ ., Prostate, bound=0.44)
> l1c.P
....
Coefficients:
(Intercept) lcavol lweight age
lbph svi
1.0435803 0.4740831 0.1953156 0.0000000
0.0000000 0.3758199
lcp gleason pgg45
0.0000000 0.0000000
2018 Mar 11
3
[PATCH v2 0/7] Modernize vga_switcheroo by using device link for HDA
On Tue, Mar 06, 2018 at 11:29:40AM +0100, Daniel Vetter wrote:
> On Sat, Mar 03, 2018 at 10:53:24AM +0100, Lukas Wunner wrote:
> > Modernize vga_switcheroo by using a device link to enforce a runtime PM
> > dependency from an HDA controller to the GPU it's integrated into, v2.
> >
> > https://github.com/l1k/linux/commits/switcheroo_devlink_v2
>
> This all
2015 Jan 15
1
Closing over Garbage
Given a large data.frame, a function trains a series of models by looping over two steps:
1. Create a model-specific subset of the complete training data
2. Train a model on the subset data
The function returns a list of trained models which are later used for prediction on test data.
Due to how models and closures work in R, each model contains a lot of data that is not necessary for
2009 Oct 21
2
SVM probability output variation
Dear R:ers,
I'm using the svm from the e1071 package to train a model with the
option "probabilities = TRUE". I then use "predict" with "probabilities
= TRUE" and get the probabilities for the data point belonging to either
class. So far all is well.
My question is why I get different results each time I train the model,
although I use exactly the same data.
2007 Jun 15
1
subscript out of bounds error in lda
I work with Windows, R version 2.4.1
I'm trying to do a discriminant analysis and, in trying to figure out how to
do it following the example from R help, I'm getting an error that says
'subscript out of bounds'. I don't know what this means and how to solve it
(I'm very new with R)
I'm doing everything in this made-up test matrix:
group var1 var2 var3
1 1
2012 Jan 17
1
Error predict with lda and cross validation
Hi, I use the lda function from the MASS package to classify some
samples according to some chemical properties. If I run lda without
cross validation all is ok but, if I run lda with cross validation,
the R consol say:
resLDA <- ldaRedOx <- lda(Activity ~ TRedOx[,1:6], CV=TRUE,
data=dfDataRedOx, subset=train)
predLDA <- predict(resLDA, newdata=dfDataRedOx[-train,])$class
>
2003 May 18
1
Fisher LDA and prior=c(...) argument
hello,
I am using LDA and QDA function of MASS library. I understand Fisher LDA
is a method non-probabilistic in nature, so I wonder what happens when I
try to predict my test set examples as in:
> fit <- lda(labels~., data=train.table, prior=c(.5,.5))
> pred <- predict(fit, data=test.table, prior=c(.5,.5))
Specifically I ask this because in my problem there are 700 examples
2009 Nov 17
1
Error running lda example: Session Info
>
> library(MASS)
> Iris <- data.frame(rbind(iris3[,,1], iris3[,,2], iris3[,,3]),
+ Sp = rep(c("s","c","v"), rep(50,3)))
> train <- sample(1:150, 75)
> table(Iris$Sp[train])
c s v
22 23 30
> z <- lda(Sp ~ ., Iris, prior = c(1,1,1)/3, subset = train)
Error in if (targetlist[i] == stringname) { : argument is of length