Module: SVMKit::Base::Classifier
- Included in:
- KernelMachine::KernelSVC, LinearModel::LogisticRegression, LinearModel::SVC, Multiclass::OneVsRestClassifier, NearestNeighbors::KNeighborsClassifier
- Defined in:
- lib/svmkit/base/classifier.rb
Overview
Module for all classifiers in SVMKit.
Instance Method Summary collapse
-
#fit ⇒ Object
An abstract method for fitting a model.
-
#predict ⇒ Object
An abstract method for predicting labels.
-
#score ⇒ Object
An abstract method for calculating classification accuracy.
Instance Method Details
#fit ⇒ Object
An abstract method for fitting a model.
7 8 9 |
# File 'lib/svmkit/base/classifier.rb', line 7 def fit raise NotImplementedError, "#{__method__} has to be implemented in #{self.class}." end |
#predict ⇒ Object
An abstract method for predicting labels.
12 13 14 |
# File 'lib/svmkit/base/classifier.rb', line 12 def predict raise NotImplementedError, "#{__method__} has to be implemented in #{self.class}." end |
#score ⇒ Object
An abstract method for calculating classification accuracy.
17 18 19 |
# File 'lib/svmkit/base/classifier.rb', line 17 def score raise NotImplementedError, "#{__method__} has to be implemented in #{self.class}." end |