Module: SVMKit::Base::Classifier

Overview

Module for all classifiers in SVMKit.

Instance Method Summary collapse

Instance Method Details

#fitObject

An abstract method for fitting a model.

Raises:

  • (NotImplementedError)


7
8
9
# File 'lib/svmkit/base/classifier.rb', line 7

def fit
  raise NotImplementedError, "#{__method__} has to be implemented in #{self.class}."
end

#predictObject

An abstract method for predicting labels.

Raises:

  • (NotImplementedError)


12
13
14
# File 'lib/svmkit/base/classifier.rb', line 12

def predict
  raise NotImplementedError, "#{__method__} has to be implemented in #{self.class}."
end

#scoreObject

An abstract method for calculating classification accuracy.

Raises:

  • (NotImplementedError)


17
18
19
# File 'lib/svmkit/base/classifier.rb', line 17

def score
  raise NotImplementedError, "#{__method__} has to be implemented in #{self.class}."
end