Module: Weka::Clusterers::Utils
- Defined in:
- lib/weka/clusterers/utils.rb
Defined Under Namespace
Modules: Buildable, Checks, Clusterable, CrossValidatable, Distributable, Updatable
Class Method Summary
collapse
Class Method Details
.density_based?(base) ⇒ Boolean
18
19
20
|
# File 'lib/weka/clusterers/utils.rb', line 18
def self.density_based?(base)
base.ancestors.include?(Java::WekaClusterers::DensityBasedClusterer)
end
|
.included(base) ⇒ Object
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/weka/clusterers/utils.rb', line 7
def self.included(base)
if base.instance_methods.include?(:build_clusterer)
base.include Buildable
base.include CrossValidatable if density_based?(base)
end
base.include Clusterable if base.instance_methods.include?(:cluster_instance)
base.include Updatable if base.instance_methods.include?(:update_clusterer)
base.include Distributable if base.instance_methods.include?(:distribution_for_instance)
end
|