Sha256: f192f9eabfcd2bc9d9a53863b97961e378b70a430c5b9e9b4e0505d1ef9d15bc
Contents?: true
Size: 1.66 KB
Versions: 1
Compression:
Stored size: 1.66 KB
Contents
# Author:: Sergio Fierens # License:: MPL 1.1 # Project:: ai4r # Url:: http://ai4r.rubyforge.org/ # # You can redistribute it and/or modify it under the terms of # the Mozilla Public License version 1.1 as published by the # Mozilla Foundation at http://www.mozilla.org/MPL/MPL-1.1.txt module Ai4r module Clusterers # 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. class Clusterer # Build a new clusterer, using data examples found in data_set. # Data items will be clustered in "number_of_clusters" different # clusters. def build(data_set, number_of_clusters) raise NotImplementedError end # Classifies the given data item, returning the cluster it belongs to. def eval(data_item) raise NotImplementedError end # Get info on what can be parameterized on this clusterer. # It returns a hash with the following format: # { :param_name => "Info on the parameter" } def get_parameters_info raise NotImplementedError end # Set parameter values on this clusterer instance. # You must provide a hash with the folowing format: # { :param_name => parameter_value } def set_parameters(parameters) raise NotImplementedError end # Get parameter values on this clusterer instance. # Returns a hash with the folowing format: # { :param_name => parameter_value } def get_parameters raise NotImplementedError end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ai4r-1.3 | lib/ai4r/clusterers/clusterer.rb |