The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

How to handle error on Example Set label value in Random Forest

Srp2023Srp2023 Member Posts: 5 Learner I
Hello I am developing model using Radom Forest. I am very new to this. The error I have says "The learning scheme random forest does not have sufficient capabilities for handling an example set with only one label value."
I do have only one label value though there are 7 other attributes in my 6000 example data set. I believe this is allowed. What could be the error.

Answers

  • jwpfaujwpfau Employee-RapidMiner, Member Posts: 303 RM Engineering
    Hi,

    the problem is that all your examples have the same label value, i.e. "yes". 
    A regular Random Forest can't handle that, there are some approaches of generating artificial outliers beforehand.

    I.e. in Désir, C., Bernard, S., Petitjean, C., Heutte, L. (2012). A New Random Forest Method for One-Class Classification. In: , et al. Structural, Syntactic, and Statistical Pattern Recognition. SSPR /SPR 2012. Lecture Notes in Computer Science, vol 7626. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-34166-3_31

    You could try a one-class SVM instead or try to get data that contains outliers.

    Greetings,
    Jonas
  • Srp2023Srp2023 Member Posts: 5 Learner I
    Thank you for the reply, Jonas. My label is called Recommended IND and it has two values. 0 & 1. Screenshot attached. Could something else be the problem?




  • jwpfaujwpfau Employee-RapidMiner, Member Posts: 303 RM Engineering
    Hi,

    If you are using Cross Validation, can you change it to Stratified Sampling?

    Best would be if you could share your process.

    Greetings,
    Jonas
  • Srp2023Srp2023 Member Posts: 5 Learner I
    Thank you for taking the time. 
  • jwpfaujwpfau Employee-RapidMiner, Member Posts: 303 RM Engineering
    Hi,

    in the Sample Operator you have written a lowercase "o" instead of 0.

    Greetings,
    Jonas
  • Srp2023Srp2023 Member Posts: 5 Learner I
    OMG! Thank you Jonas. Embarassing as it is! I did not catch that in spite of looking over 20 times. Much appreciate it.
Sign In or Register to comment.