Class: Ai4r::Clusterers::Clusterer
- Inherits:
-
Object
- Object
- Ai4r::Clusterers::Clusterer
- Includes:
- Data::Parameterizable
- Defined in:
- lib/ai4r/clusterers/clusterer.rb
Overview
The purpose of this class is to define a common API for Clusterers. All methods in this class (other than eval) must be implemented in subclasses.
Direct Known Subclasses
Instance Method Summary collapse
-
#build(data_set, number_of_clusters) ⇒ Object
Build a new clusterer, using data examples found in data_set.
-
#eval(data_item) ⇒ Object
Classifies the given data item, returning the cluster it belongs to.
Methods included from Data::Parameterizable
#get_parameters, included, #set_parameters
Instance Method Details
#build(data_set, number_of_clusters) ⇒ Object
Build a new clusterer, using data examples found in data_set. Data items will be clustered in “number_of_clusters” different clusters.
25 26 27 |
# File 'lib/ai4r/clusterers/clusterer.rb', line 25 def build(data_set, number_of_clusters) raise NotImplementedError end |
#eval(data_item) ⇒ Object
Classifies the given data item, returning the cluster it belongs to.
30 31 32 |
# File 'lib/ai4r/clusterers/clusterer.rb', line 30 def eval(data_item) raise NotImplementedError end |