Displaying 4 results from an estimated 4 matches for "y_testing".
Did you mean:
x_testing
2023 May 09
1
RandomForest tuning the parameters
Hi Sacha,
On second thought, perhaps this is more the direction that you want ...
X2 = cbind(X_train,y_train)
colnames(X2)[3] = "y"
regr2<-randomForest(y~x1+x2, data=X2,maxnodes=10, ntree=10)
regr
regr2
#Make prediction
predictions= predict(regr, X_test)
predictions2= predict(regr2, X_test)
HTH,
Eric
On Tue, May 9, 2023 at 6:40?AM Eric Berger <ericjberger at gmail.com>
2023 May 08
1
RandomForest tuning the parameters
Dear R-experts,
Here below a toy example with some error messages, especially at the end of the code (Tuning the parameters). Your help to correct my R code would be highly appreciated.
#######################################
#libraries
library(lattice)
library(ggplot2)
library(caret)
library(randomForest)
??
#Data
2009 Mar 23
0
Scaled MPSE as a test for regressors?
Hi,
This is really more a stats question than a R one, but....
Does anyone have any familiarity with using the mean prediction
squared error scaled by the variance of the response, as a 'scale
free' criterion for evaluating different regression algorithms.
E.g.
Generate X_train, Y_train, X_test, Y_test from true f. X_test/Y_test
are generated without noise, maybe?
Use X_train, Y_train
2009 Mar 04
0
Error in -class : invalid argument to unary operator
...ine<- read.csv("C:\\Rproject\\Wine\\wine.csv")
split<-sample(nrow(wine), floor(nrow(wine) * 0.5))
wine_training <- wine[split, ]
wine_testing <- iris[-split, ]
naive_bayes <-naiveBayes(class~.,data=wine_training)
x_testing <- subset(wine_testing, select = -class)
y_testing <- wine_testing$class # just grab Species variable of
iris_training
pred <- predict(naive_bayes, x_testing)
tab<-table(pred, y_testing)
ca <- classAgreement(tab)
print(tab)
print(ca)
when I enter this code in I get the error
Error in -class : invalid argument to unary operator...