search for: x_train

Displaying 3 results from an estimated 3 matches for "x_train".

Did you mean: n_train
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> wrote...
2023 May 08
1
RandomForest tuning the parameters
...,3) x2=c(0,0,0,1,1,0,1,1,0,1,1,0,0,1,0,0,0,0,0,1,1,1,1,1,0,0,0,1,0,0,1,0,0,0,1,1,0,1,0,0,0,1,1,1,1,0,1,0,1,0,0,1,1,0,0,1,0,0,1,1) ? y=as.numeric(y) x1=as.numeric(x1) x2=as.factor(x2) ? X=data.frame(x1,x2) y=y ? #Split data into training and test sets index=createDataPartition(y, p=0.75, list=FALSE) X_train = X[index, ] X_test = X[-index, ] y_train= y[index ] y_test = y[-index ] ? #Train de model regr=randomForest (x=X_train, y=y_train, maxnodes=10, ntree=10) regr<-randomForest(y~x1+x2, data=X_train, proximity=TRUE) regr ? #Make prediction predictions= predict(regr, X_test) ? result= X_test result...
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 and the algorithm to make \hat{f} Look at var(Y_test - \hat{f}(X_test))/var(Y_test) (Some of these var maybe should be replaced with mean squared values instead.) It seems sort of reaso...