scikit-learn-contrib / DESlib

A Python library for dynamic classifier and ensemble selection
BSD 3-Clause "New" or "Revised" License
477 stars 106 forks source link

Different ways for defining region of competence #236

Closed jayahm closed 3 years ago

jayahm commented 3 years ago

Hi,

It is known that we can apply adaptive KNN to define the region of competence.

But, how do I apply such a technique to define the region of competence?

How about other types of KNN? I can only see the way to use KNN-Equality in this library.

I there any possibilities to use other types of KNN?

Menelau commented 3 years ago

@jayahm

Other types of KNN is not available in the library and adding variations is not on plan for the near future. If you want to use a different method you will need to get the library source code and add your own implementation of such methods. In this case, you will need to change the code that performs the region of competence estimation to the method you want.

jayahm commented 3 years ago

OK. In case I want to use DESlib existing methods such as OLA, LCA, DES-P and etc, which file I go and change the implementation fo region of competence definition?

Menelau commented 3 years ago

region of competence definition code is on the BaseDS class (all other methods inherit from it). So you must go to this class which is located in deslib/base.py and modify the source code to use a different KNN algorithm.