4
$\begingroup$

I'm working on a classifying two classes. I am training my Classify function with the RandomForest method, but it crashes. The size of training data is 2365819 examples as in the following code.

c = Classify[trainingData, Method -> "RandomForest"];

 trainingData = {{{0.2443901294459203`, 0.6339894544265186`, 0.348376166232641`, 
       0.6205766754715589`, 0.6949430713884377`, 0.09981477603065425`, 
       0.2652380125320035`, 0.7326739707331305`, 0.33572175175325736`, 
       0.15215974016395206`}, {0.40877022570675847`, 0.5013459204618054`, 
       0.18091097996572647`, 0.9841680784952942`, 0.46040777479106754`, 
       0.9721054020948912`, 0.7980120864921296`, 0.985753996194227`, 
       0.36559491598469984`, 0.2578547049404678`}} -> 0.0 
    {{0.033860045146726865`, 110.`, 3.`, 0.`, 0.`, 0.`, 
       0.13636363636363635`, 0.9766334638696152`, 3.`, 
       1972.`}, {0.035211267605633804`, 177.`, 8.`, 0.`, 0.`, 0.`, 
       0.0903954802259887`, 0.9766334638696152`, 3.`, 1145.`}} -> 1.`}

The link to the training data is data. Any suggestion on how to run classification without crashing?

Note: I am using version 11.3 on Win.

$\endgroup$
  • 1
    $\begingroup$ You are missing a comma, and Classify expects integer targets, otherwuse use Predict. $\endgroup$ – M.R. Oct 9 '18 at 19:43
  • $\begingroup$ Hi @M.R. yes, it is my typo with the comma. Unfortunately, I have to disagree with you. It is written, in the description of the function that "Classify can be used on many types of data, including numerical...". Additionally, when I take a small training set, the Classify run correctly. $\endgroup$ – Kiril Danilchenko Oct 9 '18 at 20:20
  • 1
    $\begingroup$ ok then post your full set with CloudPut or Dropbox and we can try to help you. $\endgroup$ – M.R. Oct 9 '18 at 20:40
  • $\begingroup$ @M.R. I edited the question $\endgroup$ – Kiril Danilchenko Oct 10 '18 at 6:05
  • $\begingroup$ Do you know offhand what if anything correlates with the crash? Are you doing other things at the time, either with kernels or the UI? $\endgroup$ – Daniel Lichtblau Oct 19 '18 at 14:51
5
$\begingroup$

I turned off the progress reporting of the classify function. the classification process finished running without crash

c = Classify[trainingData, Method -> "RandomForest", TrainingProgressReporting -> None
];
$\endgroup$
2
$\begingroup$
trainingData = {{{0.2443901294459203`, 0.6339894544265186`, 
      0.348376166232641`, 0.6205766754715589`, 0.6949430713884377`, 
      0.09981477603065425`, 0.2652380125320035`, 0.7326739707331305`, 
      0.33572175175325736`, 
      0.15215974016395206`}, {0.40877022570675847`, 
      0.5013459204618054`, 0.18091097996572647`, 0.9841680784952942`, 
      0.46040777479106754`, 0.9721054020948912`, 0.7980120864921296`, 
      0.985753996194227`, 0.36559491598469984`, 
      0.2578547049404678`}} -> 
    0 , {{0.033860045146726865`, 110.`, 3.`, 0.`, 0.`, 0.`, 
      0.13636363636363635`, 0.9766334638696152`, 3.`, 
      1972.`}, {0.035211267605633804`, 177.`, 8.`, 0.`, 0.`, 0.`, 
      0.0903954802259887`, 0.9766334638696152`, 3.`, 1145.`}} -> 1};

c = Classify[trainingData, Method -> "RandomForest"]

enter image description here

$\endgroup$

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.