scikit-learn-contrib/DESlib

Is it possible to make OLA as a DES?

jayahm opened this issue · 4 comments

Hi,

It is well known that OLA is a DCS method.

But, is it possible using the library to select the most competence subset of classfiers based on a certain threshold sung OLA?

Hello,

You can set selection_method='all' in order to select all base classifiers that obtained the highest competence level instead of randomly picking one among the most competent ones. However, you cannot do that based on a certain threshold.

If you want to have such functionality, you can look at the DES-P method, which selects all base classifiers according to a certain threshold, which is the performance of a random classifier (RC) in this case (1/n_classes). You can modify this code to allow the user to define a selection threshold instead of always use the RC performance.

Is there any way that I can do in such a way the top N classifiers with highest local accuracy be selected?

Can I modify DES-KNN for this purpose?

Hello,

In the current DES-KNN implementation you can set the number of classifiers (percentage) to be selected according to accuracy(pct_accuracy). However, it is expecting at least one classifier selected according to diversity (pct_diversity hyperparameter) otherwise an error is raised.

It would make sense setting pct_diversity=0 allowing the user select base models only based solely on accuracy (in this case just raising a warning to inform the user about it). I believe that change would only require a modification in the _check_parameters() method in the class to not check if the number of selected classifiers according to diversity is 0 (self.J_).

Can you work on this and send a pull request with this modification?

I see. Thank you very much.