Opened 4 years ago

#902 new discussion

split SupervisedClassifer into weighted and non-weighted

Reported by: Peter Owned by: Markus Ringnér
Priority: major Milestone: yat 0.x+
Component: classifier Version:
Keywords: Cc:

Description

The SupervisedClassifier provides both a weighted and unweighted interface, which is handy, but it also means that these two thinbgs are tightly bind together and if one wanna implement a new SupervisedClassifier one has to implement both training functions. That's quite unfortunate as many methods are trivial to implement unweighted (see #901 e.g.) but in the weighted case it requires research to even interpret what it means.

Only reason to mix the two is if user wanna be able to mix weighted and unweighted data, but it that really a common use case.

The other reason is that they overlap a lot in implementation, but that is an implementation detail that should dictate design; there are better ways to share code e.g. by having a SharedClass as member, which even could be a pimpl if we wanna go the path.

I realize this split is a lot of work and would basically mean that all classes (at least the one that inherit from SupervisedClassifier) in namespace classifier are deprecated and replaced by two separate classes. Not convinced that is a good idea or worthwhile since the code has been around for a decade.

In the meantime I will implement #901 without connection to SupervisedClassifier.

Change History (0)

Note: See TracTickets for help on using tickets.