Sha256: 27ebecf56bf8b469c51125ad21df328693fefe8a091d444de82e78e0f7ad0c2c

Contents?: true

Size: 632 Bytes

Versions: 10

Compression:

Stored size: 632 Bytes

Contents

module SVMKit
  module Base
    # Module for all classifiers in SVMKit.
    module Classifier
      # An abstract method for fitting a model.
      def fit
        raise NotImplementedError, "#{__method__} has to be implemented in #{self.class}."
      end

      # An abstract method for predicting labels.
      def predict
        raise NotImplementedError, "#{__method__} has to be implemented in #{self.class}."
      end

      # An abstract method for calculating classification accuracy.
      def score
        raise NotImplementedError, "#{__method__} has to be implemented in #{self.class}."
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
svmkit-0.2.5 lib/svmkit/base/classifier.rb
svmkit-0.2.4 lib/svmkit/base/classifier.rb
svmkit-0.2.3 lib/svmkit/base/classifier.rb
svmkit-0.2.2 lib/svmkit/base/classifier.rb
svmkit-0.2.1 lib/svmkit/base/classifier.rb
svmkit-0.2.0 lib/svmkit/base/classifier.rb
svmkit-0.1.3 lib/svmkit/base/classifier.rb
svmkit-0.1.2 lib/svmkit/base/classifier.rb
svmkit-0.1.1 lib/svmkit/base/classifier.rb
svmkit-0.1.0 lib/svmkit/base/classifier.rb