How can i train multiple times an SVM classifier from sklearn in Python?

后端 未结 1 810
萌比男神i
萌比男神i 2021-01-14 07:09

I was wandering if it possible to train the SVM classifier from sklearn in Python many times inside a for loop. I have in mind something like the following:

         


        
相关标签:
1条回答
  • 2021-01-14 07:16

    Calling fit on any scikit-learn estimator will forget all the previously seen data. So if you want to make predictions using all of your data (all ten patients), you need to concatenate it first. In particular, if each somelabels contains only a single label, the code doesn't make sense and might even error because only one class is present.

    0 讨论(0)
提交回复
热议问题