ai4r 1.5 → 1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/examples/clusterers/simple_website_clustering.rb +47 -0
- data/lib/ai4r.rb +7 -0
- data/lib/ai4r/classifiers/hyperpipes.rb +118 -0
- data/lib/ai4r/clusterers/average_linkage.rb +22 -23
- data/lib/ai4r/clusterers/centroid_linkage.rb +66 -0
- data/lib/ai4r/clusterers/complete_linkage.rb +17 -12
- data/lib/ai4r/clusterers/diana.rb +139 -0
- data/lib/ai4r/clusterers/median_linkage.rb +61 -0
- data/lib/ai4r/clusterers/single_linkage.rb +57 -42
- data/lib/ai4r/clusterers/ward_linkage.rb +64 -0
- data/lib/ai4r/clusterers/weighted_average_linkage.rb +61 -0
- data/lib/ai4r/data/constants.rb +18 -0
- data/lib/ai4r/data/data_set.rb +5 -3
- data/lib/ai4r/data/proximity.rb +18 -0
- data/test/clusterers/average_linkage_test.rb +14 -11
- data/test/clusterers/bisecting_k_means_test.rb +9 -0
- data/test/clusterers/centroid_linkage_test.rb +50 -0
- data/test/clusterers/complete_linkage_test.rb +14 -5
- data/test/clusterers/diana_test.rb +69 -0
- data/test/clusterers/k_means_test.rb +9 -0
- data/test/clusterers/median_linkage_test.rb +50 -0
- data/test/clusterers/single_linkage_test.rb +15 -6
- data/test/clusterers/ward_linkage_test.rb +50 -0
- data/test/clusterers/weighted_average_linkage_test.rb +50 -0
- data/test/data/data_set_test.rb +14 -0
- data/test/data/proximity_test.rb +10 -0
- metadata +87 -298
- data/site/build/site/en/broken-links.xml +0 -2
- data/site/build/site/en/build/tmp/build-info.xml +0 -5
- data/site/build/site/en/build/tmp/plugins-1.xml +0 -212
- data/site/build/site/en/build/tmp/plugins-2.xml +0 -252
- data/site/build/site/en/build/tmp/projfilters.properties +0 -41
- data/site/build/site/en/downloads.html +0 -200
- data/site/build/site/en/downloads.pdf +0 -151
- data/site/build/site/en/geneticAlgorithms.html +0 -591
- data/site/build/site/en/geneticAlgorithms.pdf +0 -934
- data/site/build/site/en/images/ai4r-logo.png +0 -0
- data/site/build/site/en/images/built-with-forrest-button.png +0 -0
- data/site/build/site/en/images/c.png +0 -0
- data/site/build/site/en/images/c_wbn.png +0 -0
- data/site/build/site/en/images/c_wn.png +0 -0
- data/site/build/site/en/images/ero.gif +0 -0
- data/site/build/site/en/images/europe2.png +0 -0
- data/site/build/site/en/images/europe3.png +0 -0
- data/site/build/site/en/images/fitness.png +0 -0
- data/site/build/site/en/images/genetic_algorithms_example.png +0 -0
- data/site/build/site/en/images/instruction_arrow.png +0 -0
- data/site/build/site/en/images/jadeferret.png +0 -0
- data/site/build/site/en/images/my_email.png +0 -0
- data/site/build/site/en/images/neural_network_example.png +0 -0
- data/site/build/site/en/images/rubyforge.png +0 -0
- data/site/build/site/en/images/s.png +0 -0
- data/site/build/site/en/images/s_wbn.png +0 -0
- data/site/build/site/en/images/s_wn.png +0 -0
- data/site/build/site/en/images/sigmoid.png +0 -0
- data/site/build/site/en/images/t.png +0 -0
- data/site/build/site/en/images/t_wbn.png +0 -0
- data/site/build/site/en/images/t_wn.png +0 -0
- data/site/build/site/en/index.html +0 -390
- data/site/build/site/en/index.pdf +0 -657
- data/site/build/site/en/linkmap.html +0 -261
- data/site/build/site/en/linkmap.pdf +0 -94
- data/site/build/site/en/locationmap.xml +0 -72
- data/site/build/site/en/machineLearning.html +0 -340
- data/site/build/site/en/machineLearning.pdf +0 -337
- data/site/build/site/en/neuralNetworks.html +0 -521
- data/site/build/site/en/neuralNetworks.pdf +0 -671
- data/site/build/site/en/skin/CommonMessages_de.xml +0 -23
- data/site/build/site/en/skin/CommonMessages_en_US.xml +0 -23
- data/site/build/site/en/skin/CommonMessages_es.xml +0 -23
- data/site/build/site/en/skin/CommonMessages_fr.xml +0 -23
- data/site/build/site/en/skin/basic.css +0 -166
- data/site/build/site/en/skin/breadcrumbs-optimized.js +0 -90
- data/site/build/site/en/skin/breadcrumbs.js +0 -237
- data/site/build/site/en/skin/fontsize.js +0 -166
- data/site/build/site/en/skin/getBlank.js +0 -40
- data/site/build/site/en/skin/getMenu.js +0 -45
- data/site/build/site/en/skin/images/README.txt +0 -1
- data/site/build/site/en/skin/images/add.jpg +0 -0
- data/site/build/site/en/skin/images/built-with-forrest-button.png +0 -0
- data/site/build/site/en/skin/images/chapter.gif +0 -0
- data/site/build/site/en/skin/images/chapter_open.gif +0 -0
- data/site/build/site/en/skin/images/current.gif +0 -0
- data/site/build/site/en/skin/images/error.png +0 -0
- data/site/build/site/en/skin/images/external-link.gif +0 -0
- data/site/build/site/en/skin/images/fix.jpg +0 -0
- data/site/build/site/en/skin/images/forrest-credit-logo.png +0 -0
- data/site/build/site/en/skin/images/hack.jpg +0 -0
- data/site/build/site/en/skin/images/header_white_line.gif +0 -0
- data/site/build/site/en/skin/images/info.png +0 -0
- data/site/build/site/en/skin/images/instruction_arrow.png +0 -0
- data/site/build/site/en/skin/images/label.gif +0 -0
- data/site/build/site/en/skin/images/page.gif +0 -0
- data/site/build/site/en/skin/images/pdfdoc.gif +0 -0
- data/site/build/site/en/skin/images/poddoc.png +0 -0
- data/site/build/site/en/skin/images/printer.gif +0 -0
- data/site/build/site/en/skin/images/rc-b-l-15-1body-2menu-3menu.png +0 -0
- data/site/build/site/en/skin/images/rc-b-r-15-1body-2menu-3menu.png +0 -0
- data/site/build/site/en/skin/images/rc-b-r-5-1header-2tab-selected-3tab-selected.png +0 -0
- data/site/build/site/en/skin/images/rc-t-l-5-1header-2searchbox-3searchbox.png +0 -0
- data/site/build/site/en/skin/images/rc-t-l-5-1header-2tab-selected-3tab-selected.png +0 -0
- data/site/build/site/en/skin/images/rc-t-l-5-1header-2tab-unselected-3tab-unselected.png +0 -0
- data/site/build/site/en/skin/images/rc-t-r-15-1body-2menu-3menu.png +0 -0
- data/site/build/site/en/skin/images/rc-t-r-5-1header-2searchbox-3searchbox.png +0 -0
- data/site/build/site/en/skin/images/rc-t-r-5-1header-2tab-selected-3tab-selected.png +0 -0
- data/site/build/site/en/skin/images/rc-t-r-5-1header-2tab-unselected-3tab-unselected.png +0 -0
- data/site/build/site/en/skin/images/remove.jpg +0 -0
- data/site/build/site/en/skin/images/rss.png +0 -0
- data/site/build/site/en/skin/images/spacer.gif +0 -0
- data/site/build/site/en/skin/images/success.png +0 -0
- data/site/build/site/en/skin/images/txtdoc.png +0 -0
- data/site/build/site/en/skin/images/update.jpg +0 -0
- data/site/build/site/en/skin/images/valid-html401.png +0 -0
- data/site/build/site/en/skin/images/vcss.png +0 -0
- data/site/build/site/en/skin/images/warning.png +0 -0
- data/site/build/site/en/skin/images/xmldoc.gif +0 -0
- data/site/build/site/en/skin/menu.js +0 -48
- data/site/build/site/en/skin/note.txt +0 -50
- data/site/build/site/en/skin/print.css +0 -54
- data/site/build/site/en/skin/profile.css +0 -163
- data/site/build/site/en/skin/prototype.js +0 -1257
- data/site/build/site/en/skin/screen.css +0 -587
- data/site/build/site/en/sourceCode.html +0 -244
- data/site/build/site/en/sourceCode.pdf +0 -278
- data/site/build/site/en/svn.html +0 -244
- data/site/build/site/en/svn.pdf +0 -278
- data/site/build/tmp/brokenlinks.xml +0 -2
- data/site/build/tmp/build-info.xml +0 -5
- data/site/build/tmp/cocoon-work/cache-dir/cocoon-ehcache-1.data +0 -0
- data/site/build/tmp/cocoon-work/cache-dir/cocoon-ehcache-1.index +0 -0
- data/site/build/tmp/input.xmap +0 -32
- data/site/build/tmp/internal.xmap +0 -32
- data/site/build/tmp/locationmap.xml +0 -29
- data/site/build/tmp/output.xmap +0 -38
- data/site/build/tmp/pluginlist2fetchbuild.xml +0 -144
- data/site/build/tmp/plugins-1.xml +0 -201
- data/site/build/tmp/plugins-2.xml +0 -401
- data/site/build/tmp/projfilters.properties +0 -41
- data/site/build/tmp/resources.xmap +0 -32
- data/site/build/webapp/WEB-INF/logs/access.log +0 -0
- data/site/build/webapp/WEB-INF/logs/core.log +0 -775
- data/site/build/webapp/WEB-INF/logs/debug.log +0 -0
- data/site/build/webapp/WEB-INF/logs/error.log +0 -213
- data/site/build/webapp/WEB-INF/logs/flow.log +0 -0
- data/site/build/webapp/WEB-INF/logs/idgen.log +0 -0
- data/site/build/webapp/WEB-INF/logs/linkrewriter.log +0 -0
- data/site/build/webapp/WEB-INF/logs/locationmap.log +0 -0
- data/site/build/webapp/WEB-INF/logs/sitemap.log +0 -0
- data/site/build/webapp/WEB-INF/logs/xmlform.log +0 -0
- data/site/forrest.properties +0 -152
- data/site/forrest.properties.dispatcher.properties +0 -25
- data/site/forrest.properties.xml +0 -29
- data/site/src/documentation/README.txt +0 -7
- data/site/src/documentation/classes/CatalogManager.properties +0 -62
- data/site/src/documentation/content/locationmap.xml +0 -72
- data/site/src/documentation/content/xdocs/downloads.html +0 -9
- data/site/src/documentation/content/xdocs/geneticAlgorithms.xml +0 -294
- data/site/src/documentation/content/xdocs/index.xml +0 -129
- data/site/src/documentation/content/xdocs/machineLearning.xml +0 -131
- data/site/src/documentation/content/xdocs/neuralNetworks.xml +0 -270
- data/site/src/documentation/content/xdocs/site.xml +0 -54
- data/site/src/documentation/content/xdocs/sourceCode.xml +0 -43
- data/site/src/documentation/content/xdocs/tabs.xml +0 -35
- data/site/src/documentation/resources/images/ai4r-logo.png +0 -0
- data/site/src/documentation/resources/images/c.png +0 -0
- data/site/src/documentation/resources/images/c_wbn.png +0 -0
- data/site/src/documentation/resources/images/c_wn.png +0 -0
- data/site/src/documentation/resources/images/ellipse-2.svg +0 -30
- data/site/src/documentation/resources/images/ero.gif +0 -0
- data/site/src/documentation/resources/images/europe2.png +0 -0
- data/site/src/documentation/resources/images/europe3.png +0 -0
- data/site/src/documentation/resources/images/fitness.png +0 -0
- data/site/src/documentation/resources/images/genetic_algorithms_example.png +0 -0
- data/site/src/documentation/resources/images/icon-a.png +0 -0
- data/site/src/documentation/resources/images/icon-b.png +0 -0
- data/site/src/documentation/resources/images/icon.png +0 -0
- data/site/src/documentation/resources/images/jadeferret.png +0 -0
- data/site/src/documentation/resources/images/my_email.png +0 -0
- data/site/src/documentation/resources/images/neural_network_example.png +0 -0
- data/site/src/documentation/resources/images/project-logo.png +0 -0
- data/site/src/documentation/resources/images/rubyforge.png +0 -0
- data/site/src/documentation/resources/images/s.png +0 -0
- data/site/src/documentation/resources/images/s_wbn.png +0 -0
- data/site/src/documentation/resources/images/s_wn.png +0 -0
- data/site/src/documentation/resources/images/sigmoid.png +0 -0
- data/site/src/documentation/resources/images/sub-dir/icon-c.png +0 -0
- data/site/src/documentation/resources/images/t.png +0 -0
- data/site/src/documentation/resources/images/t_wbn.png +0 -0
- data/site/src/documentation/resources/images/t_wn.png +0 -0
- data/site/src/documentation/resources/schema/catalog.xcat +0 -29
- data/site/src/documentation/resources/schema/hello-v10.dtd +0 -51
- data/site/src/documentation/resources/schema/symbols-project-v10.ent +0 -26
- data/site/src/documentation/resources/stylesheets/hello2document.xsl +0 -33
- data/site/src/documentation/sitemap.xmap +0 -66
- data/site/src/documentation/skinconf.xml +0 -418
- data/site/src/documentation/translations/langcode.xml +0 -29
- data/site/src/documentation/translations/languages_de.xml +0 -24
- data/site/src/documentation/translations/languages_en.xml +0 -24
- data/site/src/documentation/translations/languages_es.xml +0 -22
- data/site/src/documentation/translations/languages_fr.xml +0 -24
- data/site/src/documentation/translations/languages_nl.xml +0 -24
- data/site/src/documentation/translations/menu.xml +0 -33
- data/site/src/documentation/translations/menu_af.xml +0 -33
- data/site/src/documentation/translations/menu_de.xml +0 -33
- data/site/src/documentation/translations/menu_es.xml +0 -33
- data/site/src/documentation/translations/menu_fr.xml +0 -33
- data/site/src/documentation/translations/menu_it.xml +0 -33
- data/site/src/documentation/translations/menu_nl.xml +0 -33
- data/site/src/documentation/translations/menu_no.xml +0 -33
- data/site/src/documentation/translations/menu_ru.xml +0 -33
- data/site/src/documentation/translations/menu_sk.xml +0 -33
- data/site/src/documentation/translations/tabs.xml +0 -22
- data/site/src/documentation/translations/tabs_de.xml +0 -22
- data/site/src/documentation/translations/tabs_es.xml +0 -22
- data/site/src/documentation/translations/tabs_fr.xml +0 -22
- data/site/src/documentation/translations/tabs_nl.xml +0 -22
@@ -1,3 +1,12 @@
|
|
1
|
+
# Author:: Sergio Fierens (implementation)
|
2
|
+
# License:: MPL 1.1
|
3
|
+
# Project:: ai4r
|
4
|
+
# Url:: http://ai4r.rubyforge.org/
|
5
|
+
#
|
6
|
+
# You can redistribute it and/or modify it under the terms of
|
7
|
+
# the Mozilla Public License version 1.1 as published by the
|
8
|
+
# Mozilla Foundation at http://www.mozilla.org/MPL/MPL-1.1.txt
|
9
|
+
|
1
10
|
require 'test/unit'
|
2
11
|
require File.dirname(__FILE__) + '/../../lib/ai4r/clusterers/bisecting_k_means'
|
3
12
|
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# Author:: Sergio Fierens (implementation)
|
2
|
+
# License:: MPL 1.1
|
3
|
+
# Project:: ai4r
|
4
|
+
# Url:: http://ai4r.rubyforge.org/
|
5
|
+
#
|
6
|
+
# You can redistribute it and/or modify it under the terms of
|
7
|
+
# the Mozilla Public License version 1.1 as published by the
|
8
|
+
# Mozilla Foundation at http://www.mozilla.org/MPL/MPL-1.1.txt
|
9
|
+
|
10
|
+
require 'test/unit'
|
11
|
+
require File.dirname(__FILE__) + '/../../lib/ai4r/clusterers/centroid_linkage'
|
12
|
+
|
13
|
+
class Ai4r::Clusterers::CentroidLinkage
|
14
|
+
attr_accessor :data_set, :number_of_clusters, :clusters, :distance_matrix, :index_clusters
|
15
|
+
public :linkage_distance
|
16
|
+
public :create_initial_index_clusters
|
17
|
+
end
|
18
|
+
|
19
|
+
class Ai4r::Clusterers::CentroidLinkageTest < Test::Unit::TestCase
|
20
|
+
|
21
|
+
include Ai4r::Clusterers
|
22
|
+
include Ai4r::Data
|
23
|
+
|
24
|
+
@@data = [ [10, 3], [3, 10], [2, 8], [2, 5], [3, 8], [10, 3],
|
25
|
+
[1, 3], [8, 1], [2, 9], [2, 5], [3, 3], [9, 4]]
|
26
|
+
|
27
|
+
@@expected_distance_matrix = [
|
28
|
+
[98.0],
|
29
|
+
[89.0, 5.0],
|
30
|
+
[68.0, 26.0, 9.0],
|
31
|
+
[74.0, 4.0, 1.0, 10.0],
|
32
|
+
[0.0, 98.0, 89.0, 68.0, 74.0],
|
33
|
+
[81.0, 53.0, 26.0, 5.0, 29.0, 81.0],
|
34
|
+
[8.0, 106.0, 85.0, 52.0, 74.0, 8.0, 53.0],
|
35
|
+
[100.0, 2.0, 1.0, 16.0, 2.0, 100.0, 37.0, 100.0],
|
36
|
+
[68.0, 26.0, 9.0, 0.0, 10.0, 68.0, 5.0, 52.0, 16.0],
|
37
|
+
[49.0, 49.0, 26.0, 5.0, 25.0, 49.0, 4.0, 29.0, 37.0, 5.0],
|
38
|
+
[2.0, 72.0, 65.0, 50.0, 52.0, 2.0, 65.0, 10.0, 74.0, 50.0, 37.0]]
|
39
|
+
|
40
|
+
def test_linkage_distance
|
41
|
+
clusterer = Ai4r::Clusterers::CentroidLinkage.new
|
42
|
+
clusterer.data_set = DataSet.new :data_items => @@data
|
43
|
+
clusterer.index_clusters = clusterer.create_initial_index_clusters
|
44
|
+
clusterer.distance_matrix = @@expected_distance_matrix
|
45
|
+
assert_equal 92.25, clusterer.linkage_distance(0,1,2)
|
46
|
+
assert_equal 15.25, clusterer.linkage_distance(4,2,5)
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
50
|
+
|
@@ -1,9 +1,18 @@
|
|
1
|
+
# Author:: Sergio Fierens (implementation)
|
2
|
+
# License:: MPL 1.1
|
3
|
+
# Project:: ai4r
|
4
|
+
# Url:: http://ai4r.rubyforge.org/
|
5
|
+
#
|
6
|
+
# You can redistribute it and/or modify it under the terms of
|
7
|
+
# the Mozilla Public License version 1.1 as published by the
|
8
|
+
# Mozilla Foundation at http://www.mozilla.org/MPL/MPL-1.1.txt
|
9
|
+
|
1
10
|
require 'test/unit'
|
2
11
|
require File.dirname(__FILE__) + '/../../lib/ai4r/clusterers/complete_linkage'
|
3
12
|
|
4
13
|
class Ai4r::Clusterers::CompleteLinkage
|
5
14
|
attr_accessor :data_set, :number_of_clusters, :clusters, :distance_matrix
|
6
|
-
public :
|
15
|
+
public :linkage_distance
|
7
16
|
public :distance_between_item_and_cluster
|
8
17
|
end
|
9
18
|
|
@@ -28,11 +37,11 @@ class CompleteLinkageTest < Test::Unit::TestCase
|
|
28
37
|
[49.0, 49.0, 26.0, 5.0, 25.0, 49.0, 4.0, 29.0, 37.0, 5.0],
|
29
38
|
[2.0, 72.0, 65.0, 50.0, 52.0, 2.0, 65.0, 10.0, 74.0, 50.0, 37.0]]
|
30
39
|
|
31
|
-
|
32
|
-
clusterer = CompleteLinkage.new
|
40
|
+
def test_linkage_distance
|
41
|
+
clusterer = Ai4r::Clusterers::CompleteLinkage.new
|
33
42
|
clusterer.distance_matrix = @@expected_distance_matrix
|
34
|
-
assert_equal 98
|
35
|
-
assert_equal 74
|
43
|
+
assert_equal 98, clusterer.linkage_distance(0,1,2)
|
44
|
+
assert_equal 74, clusterer.linkage_distance(4,2,5)
|
36
45
|
end
|
37
46
|
|
38
47
|
def test_distance_between_item_and_cluster
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# Author:: Sergio Fierens (implementation)
|
2
|
+
# License:: MPL 1.1
|
3
|
+
# Project:: ai4r
|
4
|
+
# Url:: http://ai4r.rubyforge.org/
|
5
|
+
#
|
6
|
+
# You can redistribute it and/or modify it under the terms of
|
7
|
+
# the Mozilla Public License version 1.1 as published by the
|
8
|
+
# Mozilla Foundation at http://www.mozilla.org/MPL/MPL-1.1.txt
|
9
|
+
|
10
|
+
require 'test/unit'
|
11
|
+
require File.dirname(__FILE__) + '/../../lib/ai4r/clusterers/diana'
|
12
|
+
|
13
|
+
class Ai4r::Clusterers::Diana
|
14
|
+
attr_accessor :data_set, :number_of_clusters, :clusters
|
15
|
+
end
|
16
|
+
|
17
|
+
class DianaTest < Test::Unit::TestCase
|
18
|
+
|
19
|
+
@@data = [ [10, 3], [3, 10], [2, 8], [2, 5], [3, 8], [10, 3],
|
20
|
+
[1, 3], [8, 1], [2, 9], [2, 5], [3, 3], [9, 4]]
|
21
|
+
|
22
|
+
include Ai4r::Clusterers
|
23
|
+
include Ai4r::Data
|
24
|
+
|
25
|
+
def setup
|
26
|
+
Diana.send(:public, *Diana.protected_instance_methods)
|
27
|
+
@data_set = DataSet.new(:data_items => @@data.clone)
|
28
|
+
end
|
29
|
+
|
30
|
+
def test_build
|
31
|
+
clusterer = Diana.new.build(@data_set, 4)
|
32
|
+
assert_equal 4, clusterer.clusters.length
|
33
|
+
end
|
34
|
+
|
35
|
+
def test_eval
|
36
|
+
clusterer = Diana.new.build(@data_set, 4)
|
37
|
+
assert_equal 0, clusterer.eval([0, 0])
|
38
|
+
assert_equal 1, clusterer.eval([9, 3])
|
39
|
+
assert_equal 2, clusterer.eval([0,10])
|
40
|
+
assert_equal 3, clusterer.eval([8, 0])
|
41
|
+
end
|
42
|
+
|
43
|
+
def test_cluster_diameter
|
44
|
+
clusterer = Diana.new
|
45
|
+
assert_equal 106, clusterer.cluster_diameter(@data_set)
|
46
|
+
assert_equal 98, clusterer.cluster_diameter(@data_set[0..2])
|
47
|
+
end
|
48
|
+
|
49
|
+
def test_max_diameter_cluster
|
50
|
+
clusterer = Diana.new
|
51
|
+
assert_equal 0, clusterer.max_diameter_cluster([@data_set, @data_set[0..2]])
|
52
|
+
assert_equal 1, clusterer.max_diameter_cluster([@data_set[0..2], @data_set])
|
53
|
+
end
|
54
|
+
|
55
|
+
def test_init_splinter_cluster
|
56
|
+
clusterer = Diana.new
|
57
|
+
assert_equal [10,3], clusterer.
|
58
|
+
init_splinter_cluster(@data_set).data_items[0]
|
59
|
+
end
|
60
|
+
|
61
|
+
def test_max_distance_difference
|
62
|
+
clusterer = Diana.new
|
63
|
+
data_set_a = @data_set[1..-1]
|
64
|
+
data_set_b = @data_set[0]
|
65
|
+
assert_equal [63.7, 4], clusterer.
|
66
|
+
max_distance_difference(data_set_a, data_set_b)
|
67
|
+
end
|
68
|
+
|
69
|
+
end
|
@@ -1,3 +1,12 @@
|
|
1
|
+
# Author:: Sergio Fierens (implementation)
|
2
|
+
# License:: MPL 1.1
|
3
|
+
# Project:: ai4r
|
4
|
+
# Url:: http://ai4r.rubyforge.org/
|
5
|
+
#
|
6
|
+
# You can redistribute it and/or modify it under the terms of
|
7
|
+
# the Mozilla Public License version 1.1 as published by the
|
8
|
+
# Mozilla Foundation at http://www.mozilla.org/MPL/MPL-1.1.txt
|
9
|
+
|
1
10
|
require 'test/unit'
|
2
11
|
require File.dirname(__FILE__) + '/../../lib/ai4r/clusterers/k_means'
|
3
12
|
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# Author:: Sergio Fierens (implementation)
|
2
|
+
# License:: MPL 1.1
|
3
|
+
# Project:: ai4r
|
4
|
+
# Url:: http://ai4r.rubyforge.org/
|
5
|
+
#
|
6
|
+
# You can redistribute it and/or modify it under the terms of
|
7
|
+
# the Mozilla Public License version 1.1 as published by the
|
8
|
+
# Mozilla Foundation at http://www.mozilla.org/MPL/MPL-1.1.txt
|
9
|
+
|
10
|
+
require 'test/unit'
|
11
|
+
require File.dirname(__FILE__) + '/../../lib/ai4r/clusterers/median_linkage'
|
12
|
+
|
13
|
+
class Ai4r::Clusterers::MedianLinkage
|
14
|
+
attr_accessor :data_set, :number_of_clusters, :clusters, :distance_matrix, :index_clusters
|
15
|
+
public :linkage_distance
|
16
|
+
public :create_initial_index_clusters
|
17
|
+
end
|
18
|
+
|
19
|
+
class Ai4r::Clusterers::MedianLinkageTest < Test::Unit::TestCase
|
20
|
+
|
21
|
+
include Ai4r::Clusterers
|
22
|
+
include Ai4r::Data
|
23
|
+
|
24
|
+
@@data = [ [10, 3], [3, 10], [2, 8], [2, 5], [3, 8], [10, 3],
|
25
|
+
[1, 3], [8, 1], [2, 9], [2, 5], [3, 3], [9, 4]]
|
26
|
+
|
27
|
+
@@expected_distance_matrix = [
|
28
|
+
[98.0],
|
29
|
+
[89.0, 5.0],
|
30
|
+
[68.0, 26.0, 9.0],
|
31
|
+
[74.0, 4.0, 1.0, 10.0],
|
32
|
+
[0.0, 98.0, 89.0, 68.0, 74.0],
|
33
|
+
[81.0, 53.0, 26.0, 5.0, 29.0, 81.0],
|
34
|
+
[8.0, 106.0, 85.0, 52.0, 74.0, 8.0, 53.0],
|
35
|
+
[100.0, 2.0, 1.0, 16.0, 2.0, 100.0, 37.0, 100.0],
|
36
|
+
[68.0, 26.0, 9.0, 0.0, 10.0, 68.0, 5.0, 52.0, 16.0],
|
37
|
+
[49.0, 49.0, 26.0, 5.0, 25.0, 49.0, 4.0, 29.0, 37.0, 5.0],
|
38
|
+
[2.0, 72.0, 65.0, 50.0, 52.0, 2.0, 65.0, 10.0, 74.0, 50.0, 37.0]]
|
39
|
+
|
40
|
+
def test_linkage_distance
|
41
|
+
clusterer = Ai4r::Clusterers::MedianLinkage.new
|
42
|
+
clusterer.data_set = DataSet.new :data_items => @@data
|
43
|
+
clusterer.index_clusters = clusterer.create_initial_index_clusters
|
44
|
+
clusterer.distance_matrix = @@expected_distance_matrix
|
45
|
+
assert_equal 92.25, clusterer.linkage_distance(0,1,2)
|
46
|
+
assert_equal 15.25, clusterer.linkage_distance(4,2,5)
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
50
|
+
|
@@ -1,3 +1,12 @@
|
|
1
|
+
# Author:: Sergio Fierens (implementation)
|
2
|
+
# License:: MPL 1.1
|
3
|
+
# Project:: ai4r
|
4
|
+
# Url:: http://ai4r.rubyforge.org/
|
5
|
+
#
|
6
|
+
# You can redistribute it and/or modify it under the terms of
|
7
|
+
# the Mozilla Public License version 1.1 as published by the
|
8
|
+
# Mozilla Foundation at http://www.mozilla.org/MPL/MPL-1.1.txt
|
9
|
+
|
1
10
|
require 'test/unit'
|
2
11
|
require File.dirname(__FILE__) + '/../../lib/ai4r/clusterers/single_linkage'
|
3
12
|
|
@@ -5,7 +14,7 @@ class Ai4r::Clusterers::SingleLinkage
|
|
5
14
|
attr_accessor :data_set, :number_of_clusters, :clusters, :distance_matrix
|
6
15
|
end
|
7
16
|
|
8
|
-
class
|
17
|
+
class SingleLinkageTest < Test::Unit::TestCase
|
9
18
|
|
10
19
|
include Ai4r::Clusterers
|
11
20
|
include Ai4r::Data
|
@@ -62,11 +71,11 @@ class Ai4r::Clusterers::SingleLinkageTest < Test::Unit::TestCase
|
|
62
71
|
assert_equal 0, clusterer.read_distance_matrix(5, 5)
|
63
72
|
end
|
64
73
|
|
65
|
-
def
|
74
|
+
def test_linkage_distance
|
66
75
|
clusterer = Ai4r::Clusterers::SingleLinkage.new
|
67
76
|
clusterer.distance_matrix = @@expected_distance_matrix
|
68
|
-
assert_equal
|
69
|
-
assert_equal
|
77
|
+
assert_equal 89, clusterer.linkage_distance(0,1,2)
|
78
|
+
assert_equal 1, clusterer.linkage_distance(4,2,5)
|
70
79
|
end
|
71
80
|
|
72
81
|
def test_get_closest_clusters
|
@@ -87,9 +96,9 @@ class Ai4r::Clusterers::SingleLinkageTest < Test::Unit::TestCase
|
|
87
96
|
|
88
97
|
def test_merge_clusters
|
89
98
|
clusterer = Ai4r::Clusterers::SingleLinkage.new
|
90
|
-
clusters = clusterer.merge_clusters(
|
99
|
+
clusters = clusterer.merge_clusters(1,2, [[1,2],[3,4],[5,6]])
|
91
100
|
assert_equal [[1,2], [3,4,5,6]], clusters.collect {|x| x.sort}
|
92
|
-
clusters = clusterer.merge_clusters(
|
101
|
+
clusters = clusterer.merge_clusters(2,1, [[1,2],[3,4],[5,6]])
|
93
102
|
assert_equal [[1,2], [3,4,5,6]], clusters.collect {|x| x.sort}
|
94
103
|
end
|
95
104
|
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# Author:: Sergio Fierens (implementation)
|
2
|
+
# License:: MPL 1.1
|
3
|
+
# Project:: ai4r
|
4
|
+
# Url:: http://ai4r.rubyforge.org/
|
5
|
+
#
|
6
|
+
# You can redistribute it and/or modify it under the terms of
|
7
|
+
# the Mozilla Public License version 1.1 as published by the
|
8
|
+
# Mozilla Foundation at http://www.mozilla.org/MPL/MPL-1.1.txt
|
9
|
+
|
10
|
+
require 'test/unit'
|
11
|
+
require File.dirname(__FILE__) + '/../../lib/ai4r/clusterers/ward_linkage'
|
12
|
+
|
13
|
+
class Ai4r::Clusterers::WardLinkage
|
14
|
+
attr_accessor :data_set, :number_of_clusters, :clusters, :distance_matrix, :index_clusters
|
15
|
+
public :linkage_distance
|
16
|
+
public :create_initial_index_clusters
|
17
|
+
end
|
18
|
+
|
19
|
+
class Ai4r::Clusterers::WardLinkageTest < Test::Unit::TestCase
|
20
|
+
|
21
|
+
include Ai4r::Clusterers
|
22
|
+
include Ai4r::Data
|
23
|
+
|
24
|
+
@@data = [ [10, 3], [3, 10], [2, 8], [2, 5], [3, 8], [10, 3],
|
25
|
+
[1, 3], [8, 1], [2, 9], [2, 5], [3, 3], [9, 4]]
|
26
|
+
|
27
|
+
@@expected_distance_matrix = [
|
28
|
+
[98.0],
|
29
|
+
[89.0, 5.0],
|
30
|
+
[68.0, 26.0, 9.0],
|
31
|
+
[74.0, 4.0, 1.0, 10.0],
|
32
|
+
[0.0, 98.0, 89.0, 68.0, 74.0],
|
33
|
+
[81.0, 53.0, 26.0, 5.0, 29.0, 81.0],
|
34
|
+
[8.0, 106.0, 85.0, 52.0, 74.0, 8.0, 53.0],
|
35
|
+
[100.0, 2.0, 1.0, 16.0, 2.0, 100.0, 37.0, 100.0],
|
36
|
+
[68.0, 26.0, 9.0, 0.0, 10.0, 68.0, 5.0, 52.0, 16.0],
|
37
|
+
[49.0, 49.0, 26.0, 5.0, 25.0, 49.0, 4.0, 29.0, 37.0, 5.0],
|
38
|
+
[2.0, 72.0, 65.0, 50.0, 52.0, 2.0, 65.0, 10.0, 74.0, 50.0, 37.0]]
|
39
|
+
|
40
|
+
def test_linkage_distance
|
41
|
+
clusterer = Ai4r::Clusterers::WardLinkage.new
|
42
|
+
clusterer.data_set = DataSet.new :data_items => @@data
|
43
|
+
clusterer.index_clusters = clusterer.create_initial_index_clusters
|
44
|
+
clusterer.distance_matrix = @@expected_distance_matrix
|
45
|
+
assert_in_delta 123.4166, clusterer.linkage_distance(0,1,2), 0.0001
|
46
|
+
assert_equal 27.75, clusterer.linkage_distance(4,2,5)
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
50
|
+
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# Author:: Sergio Fierens (implementation)
|
2
|
+
# License:: MPL 1.1
|
3
|
+
# Project:: ai4r
|
4
|
+
# Url:: http://ai4r.rubyforge.org/
|
5
|
+
#
|
6
|
+
# You can redistribute it and/or modify it under the terms of
|
7
|
+
# the Mozilla Public License version 1.1 as published by the
|
8
|
+
# Mozilla Foundation at http://www.mozilla.org/MPL/MPL-1.1.txt
|
9
|
+
|
10
|
+
require 'test/unit'
|
11
|
+
require File.dirname(__FILE__) + '/../../lib/ai4r/clusterers/weighted_average_linkage'
|
12
|
+
|
13
|
+
class Ai4r::Clusterers::WeightedAverageLinkage
|
14
|
+
attr_accessor :data_set, :number_of_clusters, :clusters, :distance_matrix, :index_clusters
|
15
|
+
public :linkage_distance
|
16
|
+
public :create_initial_index_clusters
|
17
|
+
end
|
18
|
+
|
19
|
+
class Ai4r::Clusterers::WeightedAverageLinkageTest < Test::Unit::TestCase
|
20
|
+
|
21
|
+
include Ai4r::Clusterers
|
22
|
+
include Ai4r::Data
|
23
|
+
|
24
|
+
@@data = [ [10, 3], [3, 10], [2, 8], [2, 5], [3, 8], [10, 3],
|
25
|
+
[1, 3], [8, 1], [2, 9], [2, 5], [3, 3], [9, 4]]
|
26
|
+
|
27
|
+
@@expected_distance_matrix = [
|
28
|
+
[98.0],
|
29
|
+
[89.0, 5.0],
|
30
|
+
[68.0, 26.0, 9.0],
|
31
|
+
[74.0, 4.0, 1.0, 10.0],
|
32
|
+
[0.0, 98.0, 89.0, 68.0, 74.0],
|
33
|
+
[81.0, 53.0, 26.0, 5.0, 29.0, 81.0],
|
34
|
+
[8.0, 106.0, 85.0, 52.0, 74.0, 8.0, 53.0],
|
35
|
+
[100.0, 2.0, 1.0, 16.0, 2.0, 100.0, 37.0, 100.0],
|
36
|
+
[68.0, 26.0, 9.0, 0.0, 10.0, 68.0, 5.0, 52.0, 16.0],
|
37
|
+
[49.0, 49.0, 26.0, 5.0, 25.0, 49.0, 4.0, 29.0, 37.0, 5.0],
|
38
|
+
[2.0, 72.0, 65.0, 50.0, 52.0, 2.0, 65.0, 10.0, 74.0, 50.0, 37.0]]
|
39
|
+
|
40
|
+
def test_linkage_distance
|
41
|
+
clusterer = Ai4r::Clusterers::WeightedAverageLinkage.new
|
42
|
+
clusterer.data_set = DataSet.new :data_items => @@data
|
43
|
+
clusterer.index_clusters = clusterer.create_initial_index_clusters
|
44
|
+
clusterer.distance_matrix = @@expected_distance_matrix
|
45
|
+
assert_equal 93.5, clusterer.linkage_distance(0,1,2)
|
46
|
+
assert_equal 37.5, clusterer.linkage_distance(4,2,5)
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
50
|
+
|
data/test/data/data_set_test.rb
CHANGED
@@ -74,6 +74,20 @@ module Ai4r
|
|
74
74
|
set = DataSet.new.set_data_items(items)
|
75
75
|
assert_equal ["Chicago", 37.5, "Y"], set.get_mean_or_mode
|
76
76
|
end
|
77
|
+
|
78
|
+
def test_index
|
79
|
+
items = [ [ "New York", 25, "Y"],
|
80
|
+
[ "New York", 55, "Y"],
|
81
|
+
[ "Chicago", 23, "Y"],
|
82
|
+
[ "Boston", 23, "N"],
|
83
|
+
[ "Chicago", 12, "N"],
|
84
|
+
[ "Chicago", 87, "Y"] ]
|
85
|
+
set = DataSet.new.set_data_items(items)
|
86
|
+
assert_equal set.data_labels, set[0].data_labels
|
87
|
+
assert_equal [[ "New York", 25, "Y"]], set[0].data_items
|
88
|
+
assert_equal [[ "Chicago", 23, "Y"],[ "Boston", 23, "N"]], set[2..3].data_items
|
89
|
+
assert_equal items[1..-1], set[1..-1].data_items
|
90
|
+
end
|
77
91
|
|
78
92
|
end
|
79
93
|
end
|
data/test/data/proximity_test.rb
CHANGED
@@ -66,6 +66,16 @@ module Ai4r
|
|
66
66
|
assert_equal 1, Proximity.hamming_distance([3], [0])
|
67
67
|
end
|
68
68
|
|
69
|
+
def test_simple_matching_distance
|
70
|
+
assert_equal 0, Proximity.simple_matching_distance(@@data1, @@data1)
|
71
|
+
assert_equal Proximity.simple_matching_distance(@@data1, @@data2),
|
72
|
+
Proximity.simple_matching_distance(@@data2, @@data1)
|
73
|
+
assert 0 <= Proximity.simple_matching_distance(@@data1, @@data1)
|
74
|
+
assert_equal 1, Proximity.simple_matching_distance([1,2], [0,1])
|
75
|
+
assert_equal 1.0/0, Proximity.simple_matching_distance([1,10], [2,2])
|
76
|
+
assert_equal 1.0/0, Proximity.simple_matching_distance([3], [0])
|
77
|
+
end
|
78
|
+
|
69
79
|
end
|
70
80
|
end
|
71
81
|
end
|
metadata
CHANGED
@@ -1,327 +1,116 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
+
rubygems_version: 0.9.4
|
3
|
+
specification_version: 1
|
2
4
|
name: ai4r
|
3
5
|
version: !ruby/object:Gem::Version
|
4
|
-
version: "1.
|
6
|
+
version: "1.6"
|
7
|
+
date: 2009-04-08 00:00:00 +01:00
|
8
|
+
summary: Ruby implementations of algorithms covering several Artificial intelligence fields, including Genetic algorithms, Neural Networks, machine learning, and clustering.
|
9
|
+
require_paths:
|
10
|
+
- lib
|
11
|
+
email: sergio@jadeferret.com
|
12
|
+
homepage: http://ai4r.rubyforge.org
|
13
|
+
rubyforge_project: ai4r
|
14
|
+
description:
|
15
|
+
autorequire:
|
16
|
+
default_executable:
|
17
|
+
bindir: bin
|
18
|
+
has_rdoc: true
|
19
|
+
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">"
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.0.0
|
24
|
+
version:
|
5
25
|
platform: ruby
|
26
|
+
signing_key:
|
27
|
+
cert_chain:
|
28
|
+
post_install_message:
|
6
29
|
authors:
|
7
30
|
- Sergio Fierens
|
8
|
-
autorequire: ai4r
|
9
|
-
bindir: bin
|
10
|
-
cert_chain: []
|
11
|
-
|
12
|
-
date: 2009-04-01 00:00:00 +01:00
|
13
|
-
default_executable:
|
14
|
-
dependencies: []
|
15
|
-
|
16
|
-
description:
|
17
|
-
email:
|
18
|
-
executables: []
|
19
|
-
|
20
|
-
extensions: []
|
21
|
-
|
22
|
-
extra_rdoc_files:
|
23
|
-
- README.rdoc
|
24
31
|
files:
|
25
|
-
- examples/
|
26
|
-
- examples/
|
27
|
-
- examples/neural_network/patterns_with_base_noise.rb
|
28
|
-
- examples/neural_network/xor_example.rb
|
29
|
-
- examples/neural_network/patterns_with_noise.rb
|
30
|
-
- examples/neural_network/training_patterns.rb
|
32
|
+
- examples/clusterers
|
33
|
+
- examples/clusterers/simple_website_clustering.rb
|
31
34
|
- examples/decision_trees
|
32
35
|
- examples/decision_trees/data_set.csv
|
33
|
-
- examples/decision_trees/results.txt
|
34
36
|
- examples/decision_trees/id3_example.rb
|
37
|
+
- examples/decision_trees/results.txt
|
35
38
|
- examples/genetic_algorithm
|
36
39
|
- examples/genetic_algorithm/genetic_algorithm_example.rb
|
37
40
|
- examples/genetic_algorithm/travel_cost.csv
|
38
|
-
-
|
41
|
+
- examples/neural_network
|
42
|
+
- examples/neural_network/backpropagation_example.rb
|
43
|
+
- examples/neural_network/patterns_with_base_noise.rb
|
44
|
+
- examples/neural_network/patterns_with_noise.rb
|
45
|
+
- examples/neural_network/training_patterns.rb
|
46
|
+
- examples/neural_network/xor_example.rb
|
39
47
|
- lib/ai4r
|
48
|
+
- lib/ai4r/classifiers
|
49
|
+
- lib/ai4r/classifiers/classifier.rb
|
50
|
+
- lib/ai4r/classifiers/hyperpipes.rb
|
51
|
+
- lib/ai4r/classifiers/id3.rb
|
52
|
+
- lib/ai4r/classifiers/multilayer_perceptron.rb
|
53
|
+
- lib/ai4r/classifiers/one_r.rb
|
54
|
+
- lib/ai4r/classifiers/prism.rb
|
55
|
+
- lib/ai4r/classifiers/zero_r.rb
|
40
56
|
- lib/ai4r/clusterers
|
41
57
|
- lib/ai4r/clusterers/average_linkage.rb
|
42
|
-
- lib/ai4r/clusterers/complete_linkage.rb
|
43
58
|
- lib/ai4r/clusterers/bisecting_k_means.rb
|
44
|
-
- lib/ai4r/clusterers/
|
45
|
-
- lib/ai4r/clusterers/k_means.rb
|
59
|
+
- lib/ai4r/clusterers/centroid_linkage.rb
|
46
60
|
- lib/ai4r/clusterers/clusterer.rb
|
61
|
+
- lib/ai4r/clusterers/complete_linkage.rb
|
62
|
+
- lib/ai4r/clusterers/diana.rb
|
63
|
+
- lib/ai4r/clusterers/k_means.rb
|
64
|
+
- lib/ai4r/clusterers/median_linkage.rb
|
65
|
+
- lib/ai4r/clusterers/single_linkage.rb
|
66
|
+
- lib/ai4r/clusterers/ward_linkage.rb
|
67
|
+
- lib/ai4r/clusterers/weighted_average_linkage.rb
|
68
|
+
- lib/ai4r/data
|
69
|
+
- lib/ai4r/data/constants.rb
|
70
|
+
- lib/ai4r/data/data_set.rb
|
71
|
+
- lib/ai4r/data/parameterizable.rb
|
72
|
+
- lib/ai4r/data/proximity.rb
|
73
|
+
- lib/ai4r/data/statistics.rb
|
47
74
|
- lib/ai4r/experiment
|
48
75
|
- lib/ai4r/experiment/classifier_evaluator.rb
|
49
|
-
- lib/ai4r/neural_network
|
50
|
-
- lib/ai4r/neural_network/backpropagation.rb
|
51
|
-
- lib/ai4r/classifiers
|
52
|
-
- lib/ai4r/classifiers/multilayer_perceptron.rb
|
53
|
-
- lib/ai4r/classifiers/prism.rb
|
54
|
-
- lib/ai4r/classifiers/one_r.rb
|
55
|
-
- lib/ai4r/classifiers/zero_r.rb
|
56
|
-
- lib/ai4r/classifiers/classifier.rb
|
57
|
-
- lib/ai4r/classifiers/id3.rb
|
58
76
|
- lib/ai4r/genetic_algorithm
|
59
77
|
- lib/ai4r/genetic_algorithm/genetic_algorithm.rb
|
60
|
-
- lib/ai4r/
|
61
|
-
- lib/ai4r/
|
62
|
-
- lib/ai4r
|
63
|
-
- lib/ai4r/data/data_set.rb
|
64
|
-
- lib/ai4r/data/proximity.rb
|
65
|
-
- site/build
|
66
|
-
- site/build/webapp
|
67
|
-
- site/build/webapp/conf
|
68
|
-
- site/build/webapp/WEB-INF
|
69
|
-
- site/build/webapp/WEB-INF/logs
|
70
|
-
- site/build/webapp/WEB-INF/logs/flow.log
|
71
|
-
- site/build/webapp/WEB-INF/logs/locationmap.log
|
72
|
-
- site/build/webapp/WEB-INF/logs/linkrewriter.log
|
73
|
-
- site/build/webapp/WEB-INF/logs/error.log
|
74
|
-
- site/build/webapp/WEB-INF/logs/access.log
|
75
|
-
- site/build/webapp/WEB-INF/logs/xmlform.log
|
76
|
-
- site/build/webapp/WEB-INF/logs/sitemap.log
|
77
|
-
- site/build/webapp/WEB-INF/logs/core.log
|
78
|
-
- site/build/webapp/WEB-INF/logs/idgen.log
|
79
|
-
- site/build/webapp/WEB-INF/logs/debug.log
|
80
|
-
- site/build/site
|
81
|
-
- site/build/site/en
|
82
|
-
- site/build/site/en/sourceCode.html
|
83
|
-
- site/build/site/en/svn.pdf
|
84
|
-
- site/build/site/en/sourceCode.pdf
|
85
|
-
- site/build/site/en/linkmap.pdf
|
86
|
-
- site/build/site/en/geneticAlgorithms.html
|
87
|
-
- site/build/site/en/neuralNetworks.pdf
|
88
|
-
- site/build/site/en/neuralNetworks.html
|
89
|
-
- site/build/site/en/machineLearning.html
|
90
|
-
- site/build/site/en/index.html
|
91
|
-
- site/build/site/en/build
|
92
|
-
- site/build/site/en/build/tmp
|
93
|
-
- site/build/site/en/build/tmp/plugins-2.xml
|
94
|
-
- site/build/site/en/build/tmp/projfilters.properties
|
95
|
-
- site/build/site/en/build/tmp/build-info.xml
|
96
|
-
- site/build/site/en/build/tmp/plugins-1.xml
|
97
|
-
- site/build/site/en/machineLearning.pdf
|
98
|
-
- site/build/site/en/locationmap.xml
|
99
|
-
- site/build/site/en/downloads.html
|
100
|
-
- site/build/site/en/svn.html
|
101
|
-
- site/build/site/en/images
|
102
|
-
- site/build/site/en/images/s_wn.png
|
103
|
-
- site/build/site/en/images/c.png
|
104
|
-
- site/build/site/en/images/jadeferret.png
|
105
|
-
- site/build/site/en/images/t_wbn.png
|
106
|
-
- site/build/site/en/images/s_wbn.png
|
107
|
-
- site/build/site/en/images/my_email.png
|
108
|
-
- site/build/site/en/images/fitness.png
|
109
|
-
- site/build/site/en/images/built-with-forrest-button.png
|
110
|
-
- site/build/site/en/images/instruction_arrow.png
|
111
|
-
- site/build/site/en/images/rubyforge.png
|
112
|
-
- site/build/site/en/images/ero.gif
|
113
|
-
- site/build/site/en/images/s.png
|
114
|
-
- site/build/site/en/images/c_wbn.png
|
115
|
-
- site/build/site/en/images/c_wn.png
|
116
|
-
- site/build/site/en/images/neural_network_example.png
|
117
|
-
- site/build/site/en/images/europe3.png
|
118
|
-
- site/build/site/en/images/ai4r-logo.png
|
119
|
-
- site/build/site/en/images/sigmoid.png
|
120
|
-
- site/build/site/en/images/t_wn.png
|
121
|
-
- site/build/site/en/images/t.png
|
122
|
-
- site/build/site/en/images/europe2.png
|
123
|
-
- site/build/site/en/images/genetic_algorithms_example.png
|
124
|
-
- site/build/site/en/linkmap.html
|
125
|
-
- site/build/site/en/index.pdf
|
126
|
-
- site/build/site/en/downloads.pdf
|
127
|
-
- site/build/site/en/broken-links.xml
|
128
|
-
- site/build/site/en/geneticAlgorithms.pdf
|
129
|
-
- site/build/site/en/skin
|
130
|
-
- site/build/site/en/skin/print.css
|
131
|
-
- site/build/site/en/skin/menu.js
|
132
|
-
- site/build/site/en/skin/breadcrumbs.js
|
133
|
-
- site/build/site/en/skin/getBlank.js
|
134
|
-
- site/build/site/en/skin/CommonMessages_es.xml
|
135
|
-
- site/build/site/en/skin/breadcrumbs-optimized.js
|
136
|
-
- site/build/site/en/skin/prototype.js
|
137
|
-
- site/build/site/en/skin/note.txt
|
138
|
-
- site/build/site/en/skin/scripts
|
139
|
-
- site/build/site/en/skin/CommonMessages_en_US.xml
|
140
|
-
- site/build/site/en/skin/CommonMessages_fr.xml
|
141
|
-
- site/build/site/en/skin/images
|
142
|
-
- site/build/site/en/skin/images/label.gif
|
143
|
-
- site/build/site/en/skin/images/rc-t-r-15-1body-2menu-3menu.png
|
144
|
-
- site/build/site/en/skin/images/external-link.gif
|
145
|
-
- site/build/site/en/skin/images/fix.jpg
|
146
|
-
- site/build/site/en/skin/images/current.gif
|
147
|
-
- site/build/site/en/skin/images/vcss.png
|
148
|
-
- site/build/site/en/skin/images/valid-html401.png
|
149
|
-
- site/build/site/en/skin/images/hack.jpg
|
150
|
-
- site/build/site/en/skin/images/page.gif
|
151
|
-
- site/build/site/en/skin/images/rc-t-r-5-1header-2tab-selected-3tab-selected.png
|
152
|
-
- site/build/site/en/skin/images/rc-b-r-5-1header-2tab-selected-3tab-selected.png
|
153
|
-
- site/build/site/en/skin/images/success.png
|
154
|
-
- site/build/site/en/skin/images/chapter.gif
|
155
|
-
- site/build/site/en/skin/images/built-with-forrest-button.png
|
156
|
-
- site/build/site/en/skin/images/instruction_arrow.png
|
157
|
-
- site/build/site/en/skin/images/add.jpg
|
158
|
-
- site/build/site/en/skin/images/printer.gif
|
159
|
-
- site/build/site/en/skin/images/rc-t-r-5-1header-2tab-unselected-3tab-unselected.png
|
160
|
-
- site/build/site/en/skin/images/chapter_open.gif
|
161
|
-
- site/build/site/en/skin/images/pdfdoc.gif
|
162
|
-
- site/build/site/en/skin/images/spacer.gif
|
163
|
-
- site/build/site/en/skin/images/rc-b-r-15-1body-2menu-3menu.png
|
164
|
-
- site/build/site/en/skin/images/rc-t-l-5-1header-2searchbox-3searchbox.png
|
165
|
-
- site/build/site/en/skin/images/error.png
|
166
|
-
- site/build/site/en/skin/images/warning.png
|
167
|
-
- site/build/site/en/skin/images/rc-b-l-15-1body-2menu-3menu.png
|
168
|
-
- site/build/site/en/skin/images/README.txt
|
169
|
-
- site/build/site/en/skin/images/rc-t-l-5-1header-2tab-selected-3tab-selected.png
|
170
|
-
- site/build/site/en/skin/images/forrest-credit-logo.png
|
171
|
-
- site/build/site/en/skin/images/rc-t-r-5-1header-2searchbox-3searchbox.png
|
172
|
-
- site/build/site/en/skin/images/info.png
|
173
|
-
- site/build/site/en/skin/images/poddoc.png
|
174
|
-
- site/build/site/en/skin/images/remove.jpg
|
175
|
-
- site/build/site/en/skin/images/update.jpg
|
176
|
-
- site/build/site/en/skin/images/rc-t-l-5-1header-2tab-unselected-3tab-unselected.png
|
177
|
-
- site/build/site/en/skin/images/txtdoc.png
|
178
|
-
- site/build/site/en/skin/images/xmldoc.gif
|
179
|
-
- site/build/site/en/skin/images/header_white_line.gif
|
180
|
-
- site/build/site/en/skin/images/rss.png
|
181
|
-
- site/build/site/en/skin/CommonMessages_de.xml
|
182
|
-
- site/build/site/en/skin/css
|
183
|
-
- site/build/site/en/skin/getMenu.js
|
184
|
-
- site/build/site/en/skin/fontsize.js
|
185
|
-
- site/build/site/en/skin/translations
|
186
|
-
- site/build/site/en/skin/basic.css
|
187
|
-
- site/build/site/en/skin/profile.css
|
188
|
-
- site/build/site/en/skin/screen.css
|
189
|
-
- site/build/tmp
|
190
|
-
- site/build/tmp/cocoon-work
|
191
|
-
- site/build/tmp/cocoon-work/cache-dir
|
192
|
-
- site/build/tmp/cocoon-work/cache-dir/cocoon-ehcache-1.index
|
193
|
-
- site/build/tmp/cocoon-work/cache-dir/cocoon-ehcache-1.data
|
194
|
-
- site/build/tmp/internal.xmap
|
195
|
-
- site/build/tmp/brokenlinks.xml
|
196
|
-
- site/build/tmp/output.xmap
|
197
|
-
- site/build/tmp/plugins-2.xml
|
198
|
-
- site/build/tmp/locationmap.xml
|
199
|
-
- site/build/tmp/input.xmap
|
200
|
-
- site/build/tmp/pluginlist2fetchbuild.xml
|
201
|
-
- site/build/tmp/resources.xmap
|
202
|
-
- site/build/tmp/projfilters.properties
|
203
|
-
- site/build/tmp/build-info.xml
|
204
|
-
- site/build/tmp/plugins-1.xml
|
205
|
-
- site/forrest.properties
|
206
|
-
- site/forrest.properties.dispatcher.properties
|
207
|
-
- site/src
|
208
|
-
- site/src/documentation
|
209
|
-
- site/src/documentation/sitemap.xmap
|
210
|
-
- site/src/documentation/resources
|
211
|
-
- site/src/documentation/resources/stylesheets
|
212
|
-
- site/src/documentation/resources/stylesheets/hello2document.xsl
|
213
|
-
- site/src/documentation/resources/schema
|
214
|
-
- site/src/documentation/resources/schema/symbols-project-v10.ent
|
215
|
-
- site/src/documentation/resources/schema/catalog.xcat
|
216
|
-
- site/src/documentation/resources/schema/hello-v10.dtd
|
217
|
-
- site/src/documentation/resources/images
|
218
|
-
- site/src/documentation/resources/images/s_wn.png
|
219
|
-
- site/src/documentation/resources/images/sub-dir
|
220
|
-
- site/src/documentation/resources/images/sub-dir/icon-c.png
|
221
|
-
- site/src/documentation/resources/images/c.png
|
222
|
-
- site/src/documentation/resources/images/jadeferret.png
|
223
|
-
- site/src/documentation/resources/images/t_wbn.png
|
224
|
-
- site/src/documentation/resources/images/s_wbn.png
|
225
|
-
- site/src/documentation/resources/images/project-logo.png
|
226
|
-
- site/src/documentation/resources/images/my_email.png
|
227
|
-
- site/src/documentation/resources/images/fitness.png
|
228
|
-
- site/src/documentation/resources/images/rubyforge.png
|
229
|
-
- site/src/documentation/resources/images/ero.gif
|
230
|
-
- site/src/documentation/resources/images/ellipse-2.svg
|
231
|
-
- site/src/documentation/resources/images/s.png
|
232
|
-
- site/src/documentation/resources/images/icon.png
|
233
|
-
- site/src/documentation/resources/images/icon-b.png
|
234
|
-
- site/src/documentation/resources/images/c_wbn.png
|
235
|
-
- site/src/documentation/resources/images/c_wn.png
|
236
|
-
- site/src/documentation/resources/images/neural_network_example.png
|
237
|
-
- site/src/documentation/resources/images/europe3.png
|
238
|
-
- site/src/documentation/resources/images/ai4r-logo.png
|
239
|
-
- site/src/documentation/resources/images/sigmoid.png
|
240
|
-
- site/src/documentation/resources/images/t_wn.png
|
241
|
-
- site/src/documentation/resources/images/t.png
|
242
|
-
- site/src/documentation/resources/images/icon-a.png
|
243
|
-
- site/src/documentation/resources/images/europe2.png
|
244
|
-
- site/src/documentation/resources/images/genetic_algorithms_example.png
|
245
|
-
- site/src/documentation/skinconf.xml
|
246
|
-
- site/src/documentation/README.txt
|
247
|
-
- site/src/documentation/content
|
248
|
-
- site/src/documentation/content/xdocs
|
249
|
-
- site/src/documentation/content/xdocs/sourceCode.xml
|
250
|
-
- site/src/documentation/content/xdocs/index.xml
|
251
|
-
- site/src/documentation/content/xdocs/machineLearning.xml
|
252
|
-
- site/src/documentation/content/xdocs/downloads.html
|
253
|
-
- site/src/documentation/content/xdocs/site.xml
|
254
|
-
- site/src/documentation/content/xdocs/geneticAlgorithms.xml
|
255
|
-
- site/src/documentation/content/xdocs/neuralNetworks.xml
|
256
|
-
- site/src/documentation/content/xdocs/tabs.xml
|
257
|
-
- site/src/documentation/content/locationmap.xml
|
258
|
-
- site/src/documentation/translations
|
259
|
-
- site/src/documentation/translations/menu_es.xml
|
260
|
-
- site/src/documentation/translations/menu_af.xml
|
261
|
-
- site/src/documentation/translations/langcode.xml
|
262
|
-
- site/src/documentation/translations/languages_en.xml
|
263
|
-
- site/src/documentation/translations/languages_es.xml
|
264
|
-
- site/src/documentation/translations/menu_de.xml
|
265
|
-
- site/src/documentation/translations/menu_nl.xml
|
266
|
-
- site/src/documentation/translations/tabs_fr.xml
|
267
|
-
- site/src/documentation/translations/menu_sk.xml
|
268
|
-
- site/src/documentation/translations/menu_it.xml
|
269
|
-
- site/src/documentation/translations/menu_ru.xml
|
270
|
-
- site/src/documentation/translations/languages_de.xml
|
271
|
-
- site/src/documentation/translations/tabs_de.xml
|
272
|
-
- site/src/documentation/translations/languages_fr.xml
|
273
|
-
- site/src/documentation/translations/menu.xml
|
274
|
-
- site/src/documentation/translations/menu_fr.xml
|
275
|
-
- site/src/documentation/translations/tabs_nl.xml
|
276
|
-
- site/src/documentation/translations/languages_nl.xml
|
277
|
-
- site/src/documentation/translations/tabs.xml
|
278
|
-
- site/src/documentation/translations/tabs_es.xml
|
279
|
-
- site/src/documentation/translations/menu_no.xml
|
280
|
-
- site/src/documentation/classes
|
281
|
-
- site/src/documentation/classes/CatalogManager.properties
|
282
|
-
- site/forrest.properties.xml
|
78
|
+
- lib/ai4r/neural_network
|
79
|
+
- lib/ai4r/neural_network/backpropagation.rb
|
80
|
+
- lib/ai4r.rb
|
283
81
|
- README.rdoc
|
284
|
-
has_rdoc: true
|
285
|
-
homepage: http://ai4r.rubyforge.org
|
286
|
-
post_install_message:
|
287
|
-
rdoc_options: []
|
288
|
-
|
289
|
-
require_paths:
|
290
|
-
- lib
|
291
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
292
|
-
requirements:
|
293
|
-
- - ">="
|
294
|
-
- !ruby/object:Gem::Version
|
295
|
-
version: "0"
|
296
|
-
version:
|
297
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
298
|
-
requirements:
|
299
|
-
- - ">="
|
300
|
-
- !ruby/object:Gem::Version
|
301
|
-
version: "0"
|
302
|
-
version:
|
303
|
-
requirements: []
|
304
|
-
|
305
|
-
rubyforge_project: ai4r
|
306
|
-
rubygems_version: 1.3.1
|
307
|
-
signing_key:
|
308
|
-
specification_version: 2
|
309
|
-
summary: Ruby implementations of algorithms covering several Artificial intelligence fields, including Genetic algorithms, Neural Networks, machine learning, and clustering.
|
310
82
|
test_files:
|
311
|
-
- test/
|
83
|
+
- test/classifiers/id3_test.rb
|
84
|
+
- test/classifiers/multilayer_perceptron_test.rb
|
85
|
+
- test/classifiers/one_r_test.rb
|
86
|
+
- test/classifiers/prism_test.rb
|
87
|
+
- test/classifiers/zero_r_test.rb
|
312
88
|
- test/clusterers/average_linkage_test.rb
|
89
|
+
- test/clusterers/bisecting_k_means_test.rb
|
90
|
+
- test/clusterers/centroid_linkage_test.rb
|
313
91
|
- test/clusterers/complete_linkage_test.rb
|
92
|
+
- test/clusterers/diana_test.rb
|
314
93
|
- test/clusterers/k_means_test.rb
|
315
|
-
- test/clusterers/
|
94
|
+
- test/clusterers/median_linkage_test.rb
|
95
|
+
- test/clusterers/single_linkage_test.rb
|
96
|
+
- test/clusterers/ward_linkage_test.rb
|
97
|
+
- test/clusterers/weighted_average_linkage_test.rb
|
98
|
+
- test/data/data_set_test.rb
|
99
|
+
- test/data/proximity_test.rb
|
100
|
+
- test/data/statistics_test.rb
|
316
101
|
- test/experiment/classifier_evaluator_test.rb
|
317
|
-
- test/neural_network/backpropagation_test.rb
|
318
|
-
- test/classifiers/zero_r_test.rb
|
319
|
-
- test/classifiers/multilayer_perceptron_test.rb
|
320
|
-
- test/classifiers/prism_test.rb
|
321
|
-
- test/classifiers/one_r_test.rb
|
322
|
-
- test/classifiers/id3_test.rb
|
323
|
-
- test/genetic_algorithm/genetic_algorithm_test.rb
|
324
102
|
- test/genetic_algorithm/chromosome_test.rb
|
325
|
-
- test/
|
326
|
-
- test/
|
327
|
-
|
103
|
+
- test/genetic_algorithm/genetic_algorithm_test.rb
|
104
|
+
- test/neural_network/backpropagation_test.rb
|
105
|
+
rdoc_options: []
|
106
|
+
|
107
|
+
extra_rdoc_files:
|
108
|
+
- README.rdoc
|
109
|
+
executables: []
|
110
|
+
|
111
|
+
extensions: []
|
112
|
+
|
113
|
+
requirements: []
|
114
|
+
|
115
|
+
dependencies: []
|
116
|
+
|