bio-band 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/bio-band.gemspec +8 -3
- data/features/step_definitions/create_dataset.rb +16 -17
- data/features/step_definitions/weka_clustering.rb +2 -2
- data/features/step_definitions/weka_filters.rb +12 -9
- data/features/step_definitions/weka_parsers.rb +13 -13
- data/lib/bio-band/core/type/instances.rb +33 -14
- data/lib/bio-band/weka.rb +3 -1
- data/lib/bio-band/weka/attribute_selection/attribute_selection_utils.rb +18 -0
- data/lib/bio-band/weka/attribute_selection/evaluators.rb +21 -0
- data/lib/bio-band/weka/attribute_selection/search.rb +26 -0
- data/lib/bio-band/weka/classifiers/bayes/bayes.rb +74 -54
- data/lib/bio-band/weka/classifiers/bayes/bayes_utils.rb +43 -23
- data/lib/bio-band/weka/classifiers/evaluation.rb +1 -1
- data/lib/bio-band/weka/classifiers/functions/functions.rb +157 -2
- data/lib/bio-band/weka/classifiers/functions/functions_utils.rb +45 -25
- data/lib/bio-band/weka/classifiers/lazy/lazy.rb +69 -4
- data/lib/bio-band/weka/classifiers/lazy/lazy_utils.rb +48 -28
- data/lib/bio-band/weka/classifiers/mi/mi.rb +190 -0
- data/lib/bio-band/weka/classifiers/mi/mi_utils.rb +65 -0
- data/lib/bio-band/weka/classifiers/rules/rules.rb +190 -0
- data/lib/bio-band/weka/classifiers/rules/rules_utils.rb +45 -25
- data/lib/bio-band/weka/classifiers/trees/trees.rb +66 -0
- data/lib/bio-band/weka/classifiers/trees/trees_utils.rb +47 -27
- data/lib/bio-band/weka/clusterers/clusterers.rb +34 -0
- data/lib/bio-band/weka/clusterers/clusterers_utils.rb +2 -4
- data/lib/bio-band/weka/db/db.rb +67 -67
- data/lib/bio-band/weka/filters/supervised/attribute/attribute.rb +31 -1
- data/lib/bio-band/weka/filters/supervised/supervised_utils.rb +33 -31
- data/lib/bio-band/weka/filters/unsupervised/attribute/attribute.rb +12 -0
- data/lib/bio-band/weka/filters/unsupervised/unsupervised_utils.rb +29 -29
- metadata +8 -3
- data/lib/bio-band/weka/classifiers/rules/rules.rb +0 -32
@@ -8,7 +8,9 @@ module Weka
|
|
8
8
|
module Attribute
|
9
9
|
|
10
10
|
java_import "weka.filters.unsupervised.attribute.Add"
|
11
|
+
java_import "weka.filters.unsupervised.attribute.AddCluster"
|
11
12
|
java_import "weka.filters.unsupervised.attribute.Center"
|
13
|
+
java_import "weka.filters.unsupervised.attribute.ClusterMembership"
|
12
14
|
java_import "weka.filters.unsupervised.attribute.Discretize"
|
13
15
|
java_import "weka.filters.unsupervised.attribute.NominalToString"
|
14
16
|
java_import "weka.filters.unsupervised.attribute.Normalize"
|
@@ -23,10 +25,18 @@ module Weka
|
|
23
25
|
include Unsupervised_Util
|
24
26
|
end
|
25
27
|
|
28
|
+
class AddCluster
|
29
|
+
include Unsupervised_Util
|
30
|
+
end
|
31
|
+
|
26
32
|
class Center
|
27
33
|
include Unsupervised_Util
|
28
34
|
end
|
29
35
|
|
36
|
+
class ClusterMembership
|
37
|
+
include Unsupervised_Util
|
38
|
+
end
|
39
|
+
|
30
40
|
class Discretize
|
31
41
|
include Unsupervised_Util
|
32
42
|
end
|
@@ -57,6 +67,8 @@ module Weka
|
|
57
67
|
|
58
68
|
Weka::Filter::Unsupervised::Attribute::PrincipalComponents.__persistent__ = true
|
59
69
|
Weka::Filter::Unsupervised::Attribute::Add.__persistent__ = true
|
70
|
+
Weka::Filter::Unsupervised::Attribute::AddCluster.__persistent__ = true
|
71
|
+
Weka::Filter::Unsupervised::Attribute::ClusterMembership.__persistent__ = true
|
60
72
|
Weka::Filter::Unsupervised::Attribute::Standardize.__persistent__ = true
|
61
73
|
Weka::Filter::Unsupervised::Attribute::Remove.__persistent__ = true
|
62
74
|
Weka::Filter::Unsupervised::Attribute::Normalize.__persistent__ = true
|
@@ -1,33 +1,33 @@
|
|
1
1
|
module Unsupervised_Util
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
2
|
+
java_import "weka.core.Utils"
|
3
|
+
java_import "weka.filters.Filter"
|
4
|
+
|
5
|
+
#Instance methods list
|
6
|
+
def options_list
|
7
|
+
listOptions.map {|key| "#{key.synopsis} #{key.description}"}.join("\n")
|
8
|
+
end
|
9
|
+
|
10
|
+
def filter_options(options_string)
|
11
|
+
options = Utils.splitOptions(options_string)
|
12
|
+
setOptions(options)
|
13
|
+
end
|
14
|
+
|
15
|
+
def data(instances)
|
16
|
+
setInputFormat(instances)
|
17
|
+
@input = instances
|
18
|
+
end
|
19
|
+
|
20
|
+
def description
|
21
|
+
globalInfo
|
22
|
+
end
|
23
|
+
|
24
|
+
def use
|
25
|
+
Filter.useFilter(@input,self)
|
26
|
+
end
|
27
|
+
|
28
|
+
def set(&block)
|
29
|
+
self.instance_eval(&block)
|
30
|
+
end
|
31
31
|
|
32
32
|
end
|
33
33
|
|
metadata
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
name: bio-band
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- arrigonialberto86
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-09-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: shoulda
|
@@ -247,6 +247,9 @@ files:
|
|
247
247
|
- lib/bio-band/core/type/instances.rb
|
248
248
|
- lib/bio-band/core/type/utils.rb
|
249
249
|
- lib/bio-band/weka.rb
|
250
|
+
- lib/bio-band/weka/attribute_selection/attribute_selection_utils.rb
|
251
|
+
- lib/bio-band/weka/attribute_selection/evaluators.rb
|
252
|
+
- lib/bio-band/weka/attribute_selection/search.rb
|
250
253
|
- lib/bio-band/weka/classifiers/bayes/bayes.rb
|
251
254
|
- lib/bio-band/weka/classifiers/bayes/bayes_utils.rb
|
252
255
|
- lib/bio-band/weka/classifiers/evaluation.rb
|
@@ -254,7 +257,9 @@ files:
|
|
254
257
|
- lib/bio-band/weka/classifiers/functions/functions_utils.rb
|
255
258
|
- lib/bio-band/weka/classifiers/lazy/lazy.rb
|
256
259
|
- lib/bio-band/weka/classifiers/lazy/lazy_utils.rb
|
257
|
-
-
|
260
|
+
- lib/bio-band/weka/classifiers/mi/mi.rb
|
261
|
+
- lib/bio-band/weka/classifiers/mi/mi_utils.rb
|
262
|
+
- lib/bio-band/weka/classifiers/rules/rules.rb
|
258
263
|
- lib/bio-band/weka/classifiers/rules/rules_utils.rb
|
259
264
|
- lib/bio-band/weka/classifiers/trees/trees.rb
|
260
265
|
- lib/bio-band/weka/classifiers/trees/trees_utils.rb
|
@@ -1,32 +0,0 @@
|
|
1
|
-
$:.unshift File.dirname(__FILE__)
|
2
|
-
require 'rules_utils'
|
3
|
-
|
4
|
-
module Weka
|
5
|
-
module Classifier
|
6
|
-
module Rules
|
7
|
-
java_import "weka.classifiers.rules.DecisionTable"
|
8
|
-
java_import "weka.classifiers.rules.DTNB"
|
9
|
-
|
10
|
-
class DecisionTable
|
11
|
-
include Rules_utils
|
12
|
-
class Base < DecisionTable
|
13
|
-
def initialize
|
14
|
-
super
|
15
|
-
init_rules
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
class DTNB
|
21
|
-
include Rules_utils
|
22
|
-
class Base < DTNB
|
23
|
-
def initialize
|
24
|
-
super
|
25
|
-
init_rules
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|