bayesian icon indicating copy to clipboard operation
bayesian copied to clipboard

Allow classifier to initialise with only one class

Open SanketSKasar opened this issue 8 years ago • 1 comments

Current code panics in case the classifier is initialised with just 1 class. However I have an edge case where there might only be a single class. So I was thinking maybe classifier could be allowed to initialise with just 1 class. I made changes in the code and tested for my use case. It worked. However, the unit tests fail in this case. Is there any specific reason to keep this limitation? What would be a good way to solve this, if any?

SanketSKasar avatar Aug 08 '17 11:08 SanketSKasar

@SanketSKasar I think the reason for that limitation (initialization of NewClassifier should have 2 or more classes) is because currently there is no support for adding new class to an existing classifier. If you only have 1 class in a classifier whenever you ask him to identify on which class your query will fall, it will always give you the same class whatever your query is. Your thoughts?

tonyStreet avatar Sep 14 '17 01:09 tonyStreet