0
$\begingroup$

I'm trying to run a RandomForest for a regression. However, it does not perform well even on the training set, not to mention the test set. I'm now wondering whether this is caused by a bad quality of the input data, or if I still can improve something in my algorithm?

Here is my model:

  • n=430
  • 2 continuous input variables
  • 1 categorical input variable
  • 1 continuous output variable

Formula (caret package):

control <- trainControl(method="repeatedcv",number=10, repeats = 3, verbose = TRUE, savePredictions = TRUE)
fit<-train(x=train_parametres, y=train_result,
           data=analyse,
           method="rf",
           trControl=control,
           importance=TRUE,
           allowParallel=TRUE,
           ntree=2000
)

Output (results for "fit" from cross-validation on training set):

Random Forest 

324 samples
  3 predictor

No pre-processing
Resampling: Cross-Validated (10 fold, repeated 3 times) 
Summary of sample sizes: 292, 292, 292, 291, 292, 291, ... 
Resampling results across tuning parameters:

  mtry  RMSE     Rsquared 
  2     4983092  0.5596401
  3     5128162  0.5452369

RMSE was used to select the optimal model using  the smallest value.
The final value used for the model was mtry = 2.

Changing nodesize, ntree and mtry does not alter the results very much. Is it thus a problem of data quality, or are there some other possibilities to improve the model which I have overlooked, e.g. through data normalization? To my understanding, it should at least be possible to overfit the model a bit, so that I'd get at least better results for the training set ...

$\endgroup$

migrated from stackoverflow.com Dec 27 '17 at 20:11

This question came from our site for professional and enthusiast programmers.

  • 1
    $\begingroup$ Have you rather tried datascience.stackexchange.com? $\endgroup$ – jtlz2 Nov 23 '17 at 16:18
  • $\begingroup$ Without a clue of your data, how exactly are we supposed to offer any opinion here? $\endgroup$ – desertnaut Nov 24 '17 at 16:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.