ai4r 1.2 → 1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +12 -25
- data/examples/decision_trees/id3_example.rb +6 -9
- data/examples/decision_trees/results.txt +2 -0
- data/examples/genetic_algorithm/genetic_algorithm_example.rb +11 -13
- data/examples/neural_network/xor_example.rb +25 -0
- data/lib/ai4r.rb +10 -0
- data/lib/ai4r/classifiers/classifier.rb +46 -0
- data/lib/ai4r/classifiers/id3.rb +27 -58
- data/lib/ai4r/classifiers/one_r.rb +19 -58
- data/lib/ai4r/classifiers/prism.rb +21 -57
- data/lib/ai4r/classifiers/zero_r.rb +16 -48
- data/lib/ai4r/clusterers/bisecting_k_means.rb +115 -0
- data/lib/ai4r/clusterers/clusterer.rb +55 -0
- data/lib/ai4r/clusterers/k_means.rb +164 -0
- data/lib/ai4r/data/data_set.rb +250 -0
- data/lib/ai4r/genetic_algorithm/genetic_algorithm.rb +19 -19
- data/lib/ai4r/neural_network/backpropagation.rb +23 -24
- data/site/build/site/en/broken-links.xml +2 -0
- data/site/build/site/en/downloads.html +200 -0
- data/site/build/site/en/downloads.pdf +151 -0
- data/site/build/site/en/forum.html +197 -0
- data/site/build/site/en/forum.pdf +151 -0
- data/site/build/site/en/geneticAlgorithms.html +591 -0
- data/site/build/site/en/geneticAlgorithms.pdf +934 -0
- 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 +336 -0
- data/site/build/site/en/index.pdf +508 -0
- data/site/build/site/en/linkmap.html +263 -0
- data/site/build/site/en/linkmap.pdf +94 -0
- data/site/build/site/en/locationmap.xml +72 -0
- data/site/build/site/en/machineLearning.html +339 -0
- data/site/build/site/en/machineLearning.pdf +337 -0
- data/site/build/site/en/neuralNetworks.html +484 -0
- data/site/build/site/en/neuralNetworks.pdf +604 -0
- data/site/build/site/en/skin/CommonMessages_de.xml +23 -0
- data/site/build/site/en/skin/CommonMessages_en_US.xml +23 -0
- data/site/build/site/en/skin/CommonMessages_es.xml +23 -0
- data/site/build/site/en/skin/CommonMessages_fr.xml +23 -0
- data/site/build/site/en/skin/basic.css +166 -0
- data/site/build/site/en/skin/breadcrumbs-optimized.js +90 -0
- data/site/build/site/en/skin/breadcrumbs.js +237 -0
- data/site/build/site/en/skin/fontsize.js +166 -0
- data/site/build/site/en/skin/getBlank.js +40 -0
- data/site/build/site/en/skin/getMenu.js +45 -0
- data/site/build/site/en/skin/images/README.txt +1 -0
- 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 +48 -0
- data/site/build/site/en/skin/note.txt +50 -0
- data/site/build/site/en/skin/print.css +54 -0
- data/site/build/site/en/skin/profile.css +163 -0
- data/site/build/site/en/skin/prototype.js +1257 -0
- data/site/build/site/en/skin/screen.css +587 -0
- data/site/build/site/en/svn.html +252 -0
- data/site/build/site/en/svn.pdf +306 -0
- data/site/build/site/en/wholesite.pdf +1915 -0
- data/site/build/tmp/brokenlinks.xml +2 -0
- 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/locationmap.xml +14 -14
- data/site/build/tmp/output.xmap +23 -23
- data/site/build/tmp/pluginlist2fetchbuild.xml +144 -144
- data/site/build/tmp/projfilters.properties +41 -41
- data/site/build/webapp/WEB-INF/logs/core.log +593 -679
- data/site/build/webapp/WEB-INF/logs/error.log +362 -279
- data/site/build/webapp/WEB-INF/logs/sitemap.log +368 -1015
- data/site/src/documentation/content/xdocs/index.xml +18 -10
- data/site/src/documentation/content/xdocs/machineLearning.xml +4 -3
- data/site/src/documentation/content/xdocs/site.xml +2 -1
- data/site/src/documentation/resources/images/sigmoid.png +0 -0
- data/test/classifiers/id3_test.rb +45 -44
- data/test/classifiers/one_r_test.rb +19 -17
- data/test/classifiers/prism_test.rb +22 -20
- data/test/classifiers/zero_r_test.rb +15 -12
- data/test/clusterers/bisecting_k_means_test.rb +59 -0
- data/test/clusterers/k_means_test.rb +93 -0
- data/test/data/data_set_test.rb +92 -0
- metadata +252 -128
- data/lib/ai4r/classifiers/classifier_helper.rb +0 -54
- data/site/src/documentation/content/xdocs/forum.html +0 -9
- data/site/src/documentation/resources/images/Thumbs.db +0 -0
- data/site/src/documentation/resources/images/sub-dir/Thumbs.db +0 -0
@@ -0,0 +1,59 @@
|
|
1
|
+
$:.unshift File.join(File.dirname(__FILE__),'..','lib')
|
2
|
+
|
3
|
+
require 'test/unit'
|
4
|
+
require File.dirname(__FILE__) + '/../../lib/ai4r/clusterers/bisecting_k_means'
|
5
|
+
|
6
|
+
class BisectingKMeansTest < Test::Unit::TestCase
|
7
|
+
|
8
|
+
include Ai4r::Clusterers
|
9
|
+
include Ai4r::Data
|
10
|
+
|
11
|
+
@@data = [ [10, 3], [3, 10], [2, 8], [2, 5], [3, 8], [10, 3],
|
12
|
+
[1, 3], [8, 1], [2, 9], [2, 5], [3, 3], [9, 4]]
|
13
|
+
|
14
|
+
def test_build_without_refine
|
15
|
+
build(false)
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_build_with_refine
|
19
|
+
build(true)
|
20
|
+
end
|
21
|
+
|
22
|
+
protected
|
23
|
+
def build(refine)
|
24
|
+
data_set = DataSet.new(:data_items => @@data, :data_labels => ["X", "Y"])
|
25
|
+
clusterer = BisectingKMeans.new
|
26
|
+
clusterer.set_parameters :refine => refine
|
27
|
+
clusterer.build(data_set, 4)
|
28
|
+
#draw_map(clusterer)
|
29
|
+
# Verify that all 4 clusters are created
|
30
|
+
assert_equal 4, clusterer.clusters.length
|
31
|
+
assert_equal 4, clusterer.centroids.length
|
32
|
+
# The addition of all instances of every cluster must be equal than
|
33
|
+
# the number of data points
|
34
|
+
total_length = 0
|
35
|
+
clusterer.clusters.each do |cluster|
|
36
|
+
total_length += cluster.data_items.length
|
37
|
+
end
|
38
|
+
assert_equal @@data.length, total_length
|
39
|
+
# Data inside clusters must be the same as orifinal data
|
40
|
+
clusterer.clusters.each do |cluster|
|
41
|
+
cluster.data_items.each do |data_item|
|
42
|
+
assert @@data.include?(data_item)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
private
|
48
|
+
def draw_map(clusterer)
|
49
|
+
map = Array.new(11) {Array.new(11, 0)}
|
50
|
+
clusterer.clusters.each_index do |i|
|
51
|
+
clusterer.clusters[i].data_items.each do |point|
|
52
|
+
map[point.first][point.last]=(i+1)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
map.each { |row| puts row.inspect}
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
59
|
+
|
@@ -0,0 +1,93 @@
|
|
1
|
+
$:.unshift File.join(File.dirname(__FILE__),'..','lib')
|
2
|
+
|
3
|
+
require 'test/unit'
|
4
|
+
require File.dirname(__FILE__) + '/../../lib/ai4r/clusterers/k_means'
|
5
|
+
|
6
|
+
class KMeansTest < Test::Unit::TestCase
|
7
|
+
|
8
|
+
include Ai4r::Clusterers
|
9
|
+
include Ai4r::Data
|
10
|
+
|
11
|
+
@@data = [ [10, 3], [3, 10], [2, 8], [2, 5], [3, 8], [10, 3],
|
12
|
+
[1, 3], [8, 1], [2, 9], [2, 5], [3, 3], [9, 4]]
|
13
|
+
|
14
|
+
def test_build
|
15
|
+
data_set = DataSet.new(:data_items => @@data, :data_labels => ["X", "Y"])
|
16
|
+
clusterer = KMeans.new.build(data_set, 4)
|
17
|
+
#draw_map(clusterer)
|
18
|
+
# Verify that all 4 clusters are created
|
19
|
+
assert_equal 4, clusterer.clusters.length
|
20
|
+
assert_equal 4, clusterer.centroids.length
|
21
|
+
# The addition of all instances of every cluster must be equal than
|
22
|
+
# the number of data points
|
23
|
+
total_length = 0
|
24
|
+
clusterer.clusters.each do |cluster|
|
25
|
+
total_length += cluster.data_items.length
|
26
|
+
end
|
27
|
+
assert_equal @@data.length, total_length
|
28
|
+
# Data inside clusters must be the same as orifinal data
|
29
|
+
clusterer.clusters.each do |cluster|
|
30
|
+
cluster.data_items.each do |data_item|
|
31
|
+
assert @@data.include?(data_item)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def test_eval
|
37
|
+
data_set = DataSet.new(:data_items => @@data, :data_labels => ["X", "Y"])
|
38
|
+
clusterer = KMeans.new.build(data_set, 4)
|
39
|
+
item = [10,0]
|
40
|
+
cluster_index = clusterer.eval(item)
|
41
|
+
# Must return a valid cluster index [0-3]
|
42
|
+
assert cluster_index >= 0 && cluster_index < 4
|
43
|
+
# Distance to cluster centroid must be less than distance to any other
|
44
|
+
# centroid
|
45
|
+
min_distance = clusterer.distance(clusterer.centroids[cluster_index], item)
|
46
|
+
clusterer.centroids.each do |centroid|
|
47
|
+
assert clusterer.distance(centroid, item) >= min_distance
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def test_distance
|
52
|
+
clusterer = KMeans.new
|
53
|
+
# By default, distance returns the eucledian distance to the power of 2
|
54
|
+
assert_equal 2385, clusterer.distance(
|
55
|
+
[1, 10, "Chicago", 2],
|
56
|
+
[10, 10, "London", 50])
|
57
|
+
# Test new distance definition
|
58
|
+
manhattan_distance = lambda do |a, b|
|
59
|
+
dist = 0.0
|
60
|
+
a.each_index do |index|
|
61
|
+
if a[index].is_a?(Numeric) && b[index].is_a?(Numeric)
|
62
|
+
dist = dist + (a[index]-b[index]).abs
|
63
|
+
end
|
64
|
+
end
|
65
|
+
dist
|
66
|
+
end
|
67
|
+
clusterer.set_parameters({:distance_function => manhattan_distance})
|
68
|
+
assert_equal 57, clusterer.distance(
|
69
|
+
[1, 10, "Chicago", 2],
|
70
|
+
[10, 10, "London", 50])
|
71
|
+
end
|
72
|
+
|
73
|
+
def test_max_iterations
|
74
|
+
data_set = DataSet.new(:data_items => @@data, :data_labels => ["X", "Y"])
|
75
|
+
clusterer = KMeans.new.
|
76
|
+
set_parameters({:max_iterations=>1}).
|
77
|
+
build(data_set, 4)
|
78
|
+
assert_equal 1, clusterer.iterations
|
79
|
+
end
|
80
|
+
|
81
|
+
private
|
82
|
+
def draw_map(clusterer)
|
83
|
+
map = Array.new(11) {Array.new(11, 0)}
|
84
|
+
clusterer.clusters.each_index do |i|
|
85
|
+
clusterer.clusters[i].data_items.each do |point|
|
86
|
+
map[point.first][point.last]=(i+1)
|
87
|
+
end
|
88
|
+
end
|
89
|
+
map.each { |row| puts row.inspect}
|
90
|
+
end
|
91
|
+
|
92
|
+
end
|
93
|
+
|
@@ -0,0 +1,92 @@
|
|
1
|
+
# Author:: Sergio Fierens
|
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/data/data_set'
|
12
|
+
|
13
|
+
module Ai4r
|
14
|
+
module Data
|
15
|
+
class DataSetTest < Test::Unit::TestCase
|
16
|
+
|
17
|
+
def test_load_data_and_labels_from_csv
|
18
|
+
set = DataSet.new.load_data_and_labels_from_csv("#{File.dirname(__FILE__)}/data_set.csv")
|
19
|
+
assert_equal 120, set.data_items.length
|
20
|
+
assert_equal ["zone", "rooms", "size", "price"], set.data_labels
|
21
|
+
end
|
22
|
+
|
23
|
+
def test_build_domains
|
24
|
+
domains = [ Set.new(["New York", "Chicago"]),
|
25
|
+
Set.new(["M", "F"]),
|
26
|
+
Set.new(["Y", "N"]) ]
|
27
|
+
data = [ [ "New York", "M", "Y"],
|
28
|
+
[ "Chicago", "M", "Y"],
|
29
|
+
[ "New York", "F", "Y"],
|
30
|
+
[ "New York", "M", "N"],
|
31
|
+
[ "Chicago", "M", "N"],
|
32
|
+
[ "Chicago", "F", "Y"] ]
|
33
|
+
labels = ["city", "gender", "result"]
|
34
|
+
set = DataSet.new({:data_items => data, :data_labels => labels})
|
35
|
+
assert_equal domains, set.build_domains
|
36
|
+
assert_equal domains[0], set.build_domain("city")
|
37
|
+
assert_equal domains[1], set.build_domain(1)
|
38
|
+
assert_equal domains[2], set.build_domain("result")
|
39
|
+
end
|
40
|
+
|
41
|
+
def test_set_data_labels
|
42
|
+
labels = ["A", "B"]
|
43
|
+
set = DataSet.new.set_data_labels(labels)
|
44
|
+
assert_equal labels, set.data_labels
|
45
|
+
set = DataSet.new(:data_labels => labels)
|
46
|
+
assert_equal labels, set.data_labels
|
47
|
+
set = DataSet.new(:data_items => [[ 1, 2, 3]])
|
48
|
+
assert_raise(ArgumentError) { set.set_data_labels(labels) }
|
49
|
+
end
|
50
|
+
|
51
|
+
def test_set_data_items
|
52
|
+
items = [ [ "New York", "M", "Y"],
|
53
|
+
[ "Chicago", "M", "Y"],
|
54
|
+
[ "New York", "F", "Y"],
|
55
|
+
[ "New York", "M", "N"],
|
56
|
+
[ "Chicago", "M", "N"],
|
57
|
+
[ "Chicago", "F", "Y"] ]
|
58
|
+
set = DataSet.new.set_data_items(items)
|
59
|
+
assert_equal items, set.data_items
|
60
|
+
assert_equal 3, set.data_labels.length
|
61
|
+
items << items.first[0..-2]
|
62
|
+
assert_raise(ArgumentError) { set.set_data_items(items) }
|
63
|
+
assert_raise(ArgumentError) { set.set_data_items(nil) }
|
64
|
+
assert_raise(ArgumentError) { set.set_data_items([1]) }
|
65
|
+
end
|
66
|
+
|
67
|
+
def test_get_attribute_mean_or_mode
|
68
|
+
items = [ [ "New York", 25, "Y"],
|
69
|
+
[ "New York", 55, "Y"],
|
70
|
+
[ "Chicago", 23, "Y"],
|
71
|
+
[ "Boston", 23, "N"],
|
72
|
+
[ "Chicago", 12, "N"],
|
73
|
+
[ "Chicago", 87, "Y"] ]
|
74
|
+
set = DataSet.new.set_data_items(items)
|
75
|
+
assert_equal "Chicago", set.get_attribute_mean_or_mode(0)
|
76
|
+
assert_equal 37.5, set.get_attribute_mean_or_mode(1)
|
77
|
+
end
|
78
|
+
|
79
|
+
def test_get_mean_or_mode
|
80
|
+
items = [ [ "New York", 25, "Y"],
|
81
|
+
[ "New York", 55, "Y"],
|
82
|
+
[ "Chicago", 23, "Y"],
|
83
|
+
[ "Boston", 23, "N"],
|
84
|
+
[ "Chicago", 12, "N"],
|
85
|
+
[ "Chicago", 87, "Y"] ]
|
86
|
+
set = DataSet.new.set_data_items(items)
|
87
|
+
assert_equal ["Chicago", 37.5, "Y"], set.get_mean_or_mode
|
88
|
+
end
|
89
|
+
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
metadata
CHANGED
@@ -1,184 +1,308 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.4
|
3
|
-
specification_version: 1
|
4
2
|
name: ai4r
|
5
3
|
version: !ruby/object:Gem::Version
|
6
|
-
version: "1.
|
7
|
-
date: 2009-02-14 00:00:00 +00:00
|
8
|
-
summary: ruby implementations of algorithms covering several Artificial intelligence fields, including Genetic algorithms, Neural Networks, and machine learning.
|
9
|
-
require_paths:
|
10
|
-
- lib
|
11
|
-
email:
|
12
|
-
homepage: http://ai4r.rubyforge.org/
|
13
|
-
rubyforge_project:
|
14
|
-
description:
|
15
|
-
autorequire: ai4r
|
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:
|
4
|
+
version: "1.3"
|
25
5
|
platform: ruby
|
26
|
-
signing_key:
|
27
|
-
cert_chain:
|
28
|
-
post_install_message:
|
29
6
|
authors:
|
30
7
|
- Sergio Fierens
|
8
|
+
autorequire: ai4r
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-03-06 00:00:00 +00:00
|
13
|
+
default_executable:
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description:
|
17
|
+
email:
|
18
|
+
executables: []
|
19
|
+
|
20
|
+
extensions: []
|
21
|
+
|
22
|
+
extra_rdoc_files:
|
23
|
+
- README.rdoc
|
31
24
|
files:
|
25
|
+
- examples/neural_network
|
26
|
+
- examples/neural_network/backpropagation_example.rb
|
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
31
|
- examples/decision_trees
|
33
32
|
- examples/decision_trees/data_set.csv
|
34
|
-
- examples/decision_trees/id3_example.rb
|
35
33
|
- examples/decision_trees/results.txt
|
34
|
+
- examples/decision_trees/id3_example.rb
|
36
35
|
- examples/genetic_algorithm
|
37
36
|
- examples/genetic_algorithm/genetic_algorithm_example.rb
|
38
37
|
- examples/genetic_algorithm/travel_cost.csv
|
39
|
-
-
|
40
|
-
- examples/neural_network/backpropagation_example.rb
|
41
|
-
- examples/neural_network/patterns_with_base_noise.rb
|
42
|
-
- examples/neural_network/patterns_with_noise.rb
|
43
|
-
- examples/neural_network/training_patterns.rb
|
38
|
+
- lib/ai4r.rb
|
44
39
|
- lib/ai4r
|
40
|
+
- lib/ai4r/clusterers
|
41
|
+
- lib/ai4r/clusterers/bisecting_k_means.rb
|
42
|
+
- lib/ai4r/clusterers/k_means.rb
|
43
|
+
- lib/ai4r/clusterers/clusterer.rb
|
44
|
+
- lib/ai4r/neural_network
|
45
|
+
- lib/ai4r/neural_network/backpropagation.rb
|
45
46
|
- lib/ai4r/classifiers
|
46
|
-
- lib/ai4r/classifiers/classifier_helper.rb
|
47
|
-
- lib/ai4r/classifiers/id3.rb
|
48
|
-
- lib/ai4r/classifiers/one_r.rb
|
49
47
|
- lib/ai4r/classifiers/prism.rb
|
48
|
+
- lib/ai4r/classifiers/one_r.rb
|
50
49
|
- lib/ai4r/classifiers/zero_r.rb
|
50
|
+
- lib/ai4r/classifiers/classifier.rb
|
51
|
+
- lib/ai4r/classifiers/id3.rb
|
51
52
|
- lib/ai4r/genetic_algorithm
|
52
53
|
- lib/ai4r/genetic_algorithm/genetic_algorithm.rb
|
53
|
-
- lib/ai4r/
|
54
|
-
- lib/ai4r/
|
54
|
+
- lib/ai4r/data
|
55
|
+
- lib/ai4r/data/data_set.rb
|
55
56
|
- site/build
|
56
|
-
- site/build/tmp
|
57
|
-
- site/build/tmp/build-info.xml
|
58
|
-
- site/build/tmp/input.xmap
|
59
|
-
- site/build/tmp/internal.xmap
|
60
|
-
- site/build/tmp/locationmap.xml
|
61
|
-
- site/build/tmp/output.xmap
|
62
|
-
- site/build/tmp/pluginlist2fetchbuild.xml
|
63
|
-
- site/build/tmp/plugins-1.xml
|
64
|
-
- site/build/tmp/plugins-2.xml
|
65
|
-
- site/build/tmp/projfilters.properties
|
66
|
-
- site/build/tmp/resources.xmap
|
67
57
|
- site/build/webapp
|
68
58
|
- site/build/webapp/conf
|
69
59
|
- site/build/webapp/WEB-INF
|
70
60
|
- site/build/webapp/WEB-INF/logs
|
71
|
-
- site/build/webapp/WEB-INF/logs/access.log
|
72
|
-
- site/build/webapp/WEB-INF/logs/core.log
|
73
|
-
- site/build/webapp/WEB-INF/logs/debug.log
|
74
|
-
- site/build/webapp/WEB-INF/logs/error.log
|
75
61
|
- site/build/webapp/WEB-INF/logs/flow.log
|
76
|
-
- site/build/webapp/WEB-INF/logs/idgen.log
|
77
|
-
- site/build/webapp/WEB-INF/logs/linkrewriter.log
|
78
62
|
- site/build/webapp/WEB-INF/logs/locationmap.log
|
79
|
-
- site/build/webapp/WEB-INF/logs/
|
63
|
+
- site/build/webapp/WEB-INF/logs/linkrewriter.log
|
64
|
+
- site/build/webapp/WEB-INF/logs/error.log
|
65
|
+
- site/build/webapp/WEB-INF/logs/access.log
|
80
66
|
- site/build/webapp/WEB-INF/logs/xmlform.log
|
67
|
+
- site/build/webapp/WEB-INF/logs/sitemap.log
|
68
|
+
- site/build/webapp/WEB-INF/logs/core.log
|
69
|
+
- site/build/webapp/WEB-INF/logs/idgen.log
|
70
|
+
- site/build/webapp/WEB-INF/logs/debug.log
|
71
|
+
- site/build/site
|
72
|
+
- site/build/site/en
|
73
|
+
- site/build/site/en/svn.pdf
|
74
|
+
- site/build/site/en/forum.html
|
75
|
+
- site/build/site/en/linkmap.pdf
|
76
|
+
- site/build/site/en/geneticAlgorithms.html
|
77
|
+
- site/build/site/en/wholesite.pdf
|
78
|
+
- site/build/site/en/neuralNetworks.pdf
|
79
|
+
- site/build/site/en/neuralNetworks.html
|
80
|
+
- site/build/site/en/machineLearning.html
|
81
|
+
- site/build/site/en/index.html
|
82
|
+
- site/build/site/en/forum.pdf
|
83
|
+
- site/build/site/en/machineLearning.pdf
|
84
|
+
- site/build/site/en/locationmap.xml
|
85
|
+
- site/build/site/en/downloads.html
|
86
|
+
- site/build/site/en/svn.html
|
87
|
+
- site/build/site/en/images
|
88
|
+
- site/build/site/en/images/s_wn.png
|
89
|
+
- site/build/site/en/images/c.png
|
90
|
+
- site/build/site/en/images/jadeferret.png
|
91
|
+
- site/build/site/en/images/t_wbn.png
|
92
|
+
- site/build/site/en/images/s_wbn.png
|
93
|
+
- site/build/site/en/images/my_email.png
|
94
|
+
- site/build/site/en/images/fitness.png
|
95
|
+
- site/build/site/en/images/built-with-forrest-button.png
|
96
|
+
- site/build/site/en/images/instruction_arrow.png
|
97
|
+
- site/build/site/en/images/rubyforge.png
|
98
|
+
- site/build/site/en/images/ero.gif
|
99
|
+
- site/build/site/en/images/s.png
|
100
|
+
- site/build/site/en/images/c_wbn.png
|
101
|
+
- site/build/site/en/images/c_wn.png
|
102
|
+
- site/build/site/en/images/neural_network_example.png
|
103
|
+
- site/build/site/en/images/europe3.png
|
104
|
+
- site/build/site/en/images/ai4r-logo.png
|
105
|
+
- site/build/site/en/images/sigmoid.png
|
106
|
+
- site/build/site/en/images/t_wn.png
|
107
|
+
- site/build/site/en/images/t.png
|
108
|
+
- site/build/site/en/images/europe2.png
|
109
|
+
- site/build/site/en/images/genetic_algorithms_example.png
|
110
|
+
- site/build/site/en/linkmap.html
|
111
|
+
- site/build/site/en/index.pdf
|
112
|
+
- site/build/site/en/downloads.pdf
|
113
|
+
- site/build/site/en/broken-links.xml
|
114
|
+
- site/build/site/en/geneticAlgorithms.pdf
|
115
|
+
- site/build/site/en/skin
|
116
|
+
- site/build/site/en/skin/print.css
|
117
|
+
- site/build/site/en/skin/menu.js
|
118
|
+
- site/build/site/en/skin/breadcrumbs.js
|
119
|
+
- site/build/site/en/skin/getBlank.js
|
120
|
+
- site/build/site/en/skin/CommonMessages_es.xml
|
121
|
+
- site/build/site/en/skin/breadcrumbs-optimized.js
|
122
|
+
- site/build/site/en/skin/prototype.js
|
123
|
+
- site/build/site/en/skin/note.txt
|
124
|
+
- site/build/site/en/skin/scripts
|
125
|
+
- site/build/site/en/skin/CommonMessages_en_US.xml
|
126
|
+
- site/build/site/en/skin/CommonMessages_fr.xml
|
127
|
+
- site/build/site/en/skin/images
|
128
|
+
- site/build/site/en/skin/images/label.gif
|
129
|
+
- site/build/site/en/skin/images/rc-t-r-15-1body-2menu-3menu.png
|
130
|
+
- site/build/site/en/skin/images/external-link.gif
|
131
|
+
- site/build/site/en/skin/images/fix.jpg
|
132
|
+
- site/build/site/en/skin/images/current.gif
|
133
|
+
- site/build/site/en/skin/images/vcss.png
|
134
|
+
- site/build/site/en/skin/images/valid-html401.png
|
135
|
+
- site/build/site/en/skin/images/hack.jpg
|
136
|
+
- site/build/site/en/skin/images/page.gif
|
137
|
+
- site/build/site/en/skin/images/rc-t-r-5-1header-2tab-selected-3tab-selected.png
|
138
|
+
- site/build/site/en/skin/images/rc-b-r-5-1header-2tab-selected-3tab-selected.png
|
139
|
+
- site/build/site/en/skin/images/success.png
|
140
|
+
- site/build/site/en/skin/images/chapter.gif
|
141
|
+
- site/build/site/en/skin/images/built-with-forrest-button.png
|
142
|
+
- site/build/site/en/skin/images/instruction_arrow.png
|
143
|
+
- site/build/site/en/skin/images/add.jpg
|
144
|
+
- site/build/site/en/skin/images/printer.gif
|
145
|
+
- site/build/site/en/skin/images/rc-t-r-5-1header-2tab-unselected-3tab-unselected.png
|
146
|
+
- site/build/site/en/skin/images/chapter_open.gif
|
147
|
+
- site/build/site/en/skin/images/pdfdoc.gif
|
148
|
+
- site/build/site/en/skin/images/spacer.gif
|
149
|
+
- site/build/site/en/skin/images/rc-b-r-15-1body-2menu-3menu.png
|
150
|
+
- site/build/site/en/skin/images/rc-t-l-5-1header-2searchbox-3searchbox.png
|
151
|
+
- site/build/site/en/skin/images/error.png
|
152
|
+
- site/build/site/en/skin/images/warning.png
|
153
|
+
- site/build/site/en/skin/images/rc-b-l-15-1body-2menu-3menu.png
|
154
|
+
- site/build/site/en/skin/images/README.txt
|
155
|
+
- site/build/site/en/skin/images/rc-t-l-5-1header-2tab-selected-3tab-selected.png
|
156
|
+
- site/build/site/en/skin/images/forrest-credit-logo.png
|
157
|
+
- site/build/site/en/skin/images/rc-t-r-5-1header-2searchbox-3searchbox.png
|
158
|
+
- site/build/site/en/skin/images/info.png
|
159
|
+
- site/build/site/en/skin/images/poddoc.png
|
160
|
+
- site/build/site/en/skin/images/remove.jpg
|
161
|
+
- site/build/site/en/skin/images/update.jpg
|
162
|
+
- site/build/site/en/skin/images/rc-t-l-5-1header-2tab-unselected-3tab-unselected.png
|
163
|
+
- site/build/site/en/skin/images/txtdoc.png
|
164
|
+
- site/build/site/en/skin/images/xmldoc.gif
|
165
|
+
- site/build/site/en/skin/images/header_white_line.gif
|
166
|
+
- site/build/site/en/skin/images/rss.png
|
167
|
+
- site/build/site/en/skin/CommonMessages_de.xml
|
168
|
+
- site/build/site/en/skin/css
|
169
|
+
- site/build/site/en/skin/getMenu.js
|
170
|
+
- site/build/site/en/skin/fontsize.js
|
171
|
+
- site/build/site/en/skin/translations
|
172
|
+
- site/build/site/en/skin/basic.css
|
173
|
+
- site/build/site/en/skin/profile.css
|
174
|
+
- site/build/site/en/skin/screen.css
|
175
|
+
- site/build/tmp
|
176
|
+
- site/build/tmp/cocoon-work
|
177
|
+
- site/build/tmp/cocoon-work/cache-dir
|
178
|
+
- site/build/tmp/cocoon-work/cache-dir/cocoon-ehcache-1.index
|
179
|
+
- site/build/tmp/cocoon-work/cache-dir/cocoon-ehcache-1.data
|
180
|
+
- site/build/tmp/internal.xmap
|
181
|
+
- site/build/tmp/brokenlinks.xml
|
182
|
+
- site/build/tmp/output.xmap
|
183
|
+
- site/build/tmp/plugins-2.xml
|
184
|
+
- site/build/tmp/locationmap.xml
|
185
|
+
- site/build/tmp/input.xmap
|
186
|
+
- site/build/tmp/pluginlist2fetchbuild.xml
|
187
|
+
- site/build/tmp/resources.xmap
|
188
|
+
- site/build/tmp/projfilters.properties
|
189
|
+
- site/build/tmp/build-info.xml
|
190
|
+
- site/build/tmp/plugins-1.xml
|
81
191
|
- site/forrest.properties
|
82
192
|
- site/forrest.properties.dispatcher.properties
|
83
|
-
- site/forrest.properties.xml
|
84
193
|
- site/src
|
85
194
|
- site/src/documentation
|
86
|
-
- site/src/documentation/classes
|
87
|
-
- site/src/documentation/classes/CatalogManager.properties
|
88
195
|
- site/src/documentation/conf
|
89
|
-
- site/src/documentation/
|
90
|
-
- site/src/documentation/content/locationmap.xml
|
91
|
-
- site/src/documentation/content/xdocs
|
92
|
-
- site/src/documentation/content/xdocs/downloads.html
|
93
|
-
- site/src/documentation/content/xdocs/forum.html
|
94
|
-
- site/src/documentation/content/xdocs/geneticAlgorithms.xml
|
95
|
-
- site/src/documentation/content/xdocs/index.xml
|
96
|
-
- site/src/documentation/content/xdocs/machineLearning.xml
|
97
|
-
- site/src/documentation/content/xdocs/neuralNetworks.xml
|
98
|
-
- site/src/documentation/content/xdocs/site.xml
|
99
|
-
- site/src/documentation/content/xdocs/svn.xml
|
100
|
-
- site/src/documentation/content/xdocs/tabs.xml
|
101
|
-
- site/src/documentation/README.txt
|
196
|
+
- site/src/documentation/sitemap.xmap
|
102
197
|
- site/src/documentation/resources
|
198
|
+
- site/src/documentation/resources/stylesheets
|
199
|
+
- site/src/documentation/resources/stylesheets/hello2document.xsl
|
200
|
+
- site/src/documentation/resources/themes
|
201
|
+
- site/src/documentation/resources/schema
|
202
|
+
- site/src/documentation/resources/schema/symbols-project-v10.ent
|
203
|
+
- site/src/documentation/resources/schema/catalog.xcat
|
204
|
+
- site/src/documentation/resources/schema/hello-v10.dtd
|
103
205
|
- site/src/documentation/resources/images
|
104
|
-
- site/src/documentation/resources/images/
|
206
|
+
- site/src/documentation/resources/images/s_wn.png
|
207
|
+
- site/src/documentation/resources/images/sub-dir
|
208
|
+
- site/src/documentation/resources/images/sub-dir/icon-c.png
|
105
209
|
- site/src/documentation/resources/images/c.png
|
106
|
-
- site/src/documentation/resources/images/c_wbn.png
|
107
|
-
- site/src/documentation/resources/images/c_wn.png
|
108
|
-
- site/src/documentation/resources/images/ellipse-2.svg
|
109
|
-
- site/src/documentation/resources/images/ero.gif
|
110
|
-
- site/src/documentation/resources/images/europe2.png
|
111
|
-
- site/src/documentation/resources/images/europe3.png
|
112
|
-
- site/src/documentation/resources/images/fitness.png
|
113
|
-
- site/src/documentation/resources/images/genetic_algorithms_example.png
|
114
|
-
- site/src/documentation/resources/images/icon-a.png
|
115
|
-
- site/src/documentation/resources/images/icon-b.png
|
116
|
-
- site/src/documentation/resources/images/icon.png
|
117
210
|
- site/src/documentation/resources/images/jadeferret.png
|
118
|
-
- site/src/documentation/resources/images/
|
119
|
-
- site/src/documentation/resources/images/
|
211
|
+
- site/src/documentation/resources/images/t_wbn.png
|
212
|
+
- site/src/documentation/resources/images/s_wbn.png
|
120
213
|
- site/src/documentation/resources/images/project-logo.png
|
214
|
+
- site/src/documentation/resources/images/my_email.png
|
215
|
+
- site/src/documentation/resources/images/fitness.png
|
121
216
|
- site/src/documentation/resources/images/rubyforge.png
|
217
|
+
- site/src/documentation/resources/images/ero.gif
|
218
|
+
- site/src/documentation/resources/images/ellipse-2.svg
|
122
219
|
- site/src/documentation/resources/images/s.png
|
220
|
+
- site/src/documentation/resources/images/icon.png
|
221
|
+
- site/src/documentation/resources/images/icon-b.png
|
222
|
+
- site/src/documentation/resources/images/c_wbn.png
|
223
|
+
- site/src/documentation/resources/images/c_wn.png
|
224
|
+
- site/src/documentation/resources/images/neural_network_example.png
|
225
|
+
- site/src/documentation/resources/images/europe3.png
|
226
|
+
- site/src/documentation/resources/images/ai4r-logo.png
|
123
227
|
- site/src/documentation/resources/images/sigmoid.png
|
124
|
-
- site/src/documentation/resources/images/sub-dir
|
125
|
-
- site/src/documentation/resources/images/sub-dir/icon-c.png
|
126
|
-
- site/src/documentation/resources/images/sub-dir/Thumbs.db
|
127
|
-
- site/src/documentation/resources/images/s_wbn.png
|
128
|
-
- site/src/documentation/resources/images/s_wn.png
|
129
|
-
- site/src/documentation/resources/images/t.png
|
130
|
-
- site/src/documentation/resources/images/Thumbs.db
|
131
|
-
- site/src/documentation/resources/images/t_wbn.png
|
132
228
|
- site/src/documentation/resources/images/t_wn.png
|
133
|
-
- site/src/documentation/resources/
|
134
|
-
- site/src/documentation/resources/
|
135
|
-
- site/src/documentation/resources/
|
136
|
-
- site/src/documentation/resources/
|
137
|
-
- site/src/documentation/resources/stylesheets
|
138
|
-
- site/src/documentation/resources/stylesheets/hello2document.xsl
|
139
|
-
- site/src/documentation/resources/themes
|
140
|
-
- site/src/documentation/sitemap.xmap
|
229
|
+
- site/src/documentation/resources/images/t.png
|
230
|
+
- site/src/documentation/resources/images/icon-a.png
|
231
|
+
- site/src/documentation/resources/images/europe2.png
|
232
|
+
- site/src/documentation/resources/images/genetic_algorithms_example.png
|
141
233
|
- site/src/documentation/skinconf.xml
|
234
|
+
- site/src/documentation/README.txt
|
235
|
+
- site/src/documentation/content
|
236
|
+
- site/src/documentation/content/xdocs
|
237
|
+
- site/src/documentation/content/xdocs/index.xml
|
238
|
+
- site/src/documentation/content/xdocs/machineLearning.xml
|
239
|
+
- site/src/documentation/content/xdocs/downloads.html
|
240
|
+
- site/src/documentation/content/xdocs/site.xml
|
241
|
+
- site/src/documentation/content/xdocs/geneticAlgorithms.xml
|
242
|
+
- site/src/documentation/content/xdocs/neuralNetworks.xml
|
243
|
+
- site/src/documentation/content/xdocs/svn.xml
|
244
|
+
- site/src/documentation/content/xdocs/tabs.xml
|
245
|
+
- site/src/documentation/content/locationmap.xml
|
142
246
|
- site/src/documentation/translations
|
247
|
+
- site/src/documentation/translations/menu_es.xml
|
248
|
+
- site/src/documentation/translations/menu_af.xml
|
143
249
|
- site/src/documentation/translations/langcode.xml
|
144
|
-
- site/src/documentation/translations/languages_de.xml
|
145
250
|
- site/src/documentation/translations/languages_en.xml
|
146
251
|
- site/src/documentation/translations/languages_es.xml
|
147
|
-
- site/src/documentation/translations/languages_fr.xml
|
148
|
-
- site/src/documentation/translations/languages_nl.xml
|
149
|
-
- site/src/documentation/translations/menu.xml
|
150
|
-
- site/src/documentation/translations/menu_af.xml
|
151
252
|
- site/src/documentation/translations/menu_de.xml
|
152
|
-
- site/src/documentation/translations/menu_es.xml
|
153
|
-
- site/src/documentation/translations/menu_fr.xml
|
154
|
-
- site/src/documentation/translations/menu_it.xml
|
155
253
|
- site/src/documentation/translations/menu_nl.xml
|
156
|
-
- site/src/documentation/translations/
|
157
|
-
- site/src/documentation/translations/menu_ru.xml
|
254
|
+
- site/src/documentation/translations/tabs_fr.xml
|
158
255
|
- site/src/documentation/translations/menu_sk.xml
|
159
|
-
- site/src/documentation/translations/
|
256
|
+
- site/src/documentation/translations/menu_it.xml
|
257
|
+
- site/src/documentation/translations/menu_ru.xml
|
258
|
+
- site/src/documentation/translations/languages_de.xml
|
160
259
|
- site/src/documentation/translations/tabs_de.xml
|
161
|
-
- site/src/documentation/translations/
|
162
|
-
- site/src/documentation/translations/
|
260
|
+
- site/src/documentation/translations/languages_fr.xml
|
261
|
+
- site/src/documentation/translations/menu.xml
|
262
|
+
- site/src/documentation/translations/menu_fr.xml
|
163
263
|
- site/src/documentation/translations/tabs_nl.xml
|
264
|
+
- site/src/documentation/translations/languages_nl.xml
|
265
|
+
- site/src/documentation/translations/tabs.xml
|
266
|
+
- site/src/documentation/translations/tabs_es.xml
|
267
|
+
- site/src/documentation/translations/menu_no.xml
|
268
|
+
- site/src/documentation/classes
|
269
|
+
- site/src/documentation/classes/CatalogManager.properties
|
270
|
+
- site/forrest.properties.xml
|
164
271
|
- README.rdoc
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
- test/classifiers/prism_test.rb
|
169
|
-
- test/classifiers/zero_r_test.rb
|
170
|
-
- test/genetic_algorithm/chromosome_test.rb
|
171
|
-
- test/genetic_algorithm/genetic_algorithm_test.rb
|
172
|
-
- test/neural_network/backpropagation_test.rb
|
272
|
+
has_rdoc: true
|
273
|
+
homepage: http://ai4r.rubyforge.org
|
274
|
+
post_install_message:
|
173
275
|
rdoc_options: []
|
174
276
|
|
175
|
-
|
176
|
-
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
277
|
+
require_paths:
|
278
|
+
- lib
|
279
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
280
|
+
requirements:
|
281
|
+
- - ">="
|
282
|
+
- !ruby/object:Gem::Version
|
283
|
+
version: "0"
|
284
|
+
version:
|
285
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
286
|
+
requirements:
|
287
|
+
- - ">="
|
288
|
+
- !ruby/object:Gem::Version
|
289
|
+
version: "0"
|
290
|
+
version:
|
181
291
|
requirements: []
|
182
292
|
|
183
|
-
|
184
|
-
|
293
|
+
rubyforge_project:
|
294
|
+
rubygems_version: 1.2.0
|
295
|
+
signing_key:
|
296
|
+
specification_version: 2
|
297
|
+
summary: ruby implementations of algorithms covering several Artificial intelligence fields, including Genetic algorithms, Neural Networks, machine learning, and clustering.
|
298
|
+
test_files:
|
299
|
+
- test/clusterers/k_means_test.rb
|
300
|
+
- test/clusterers/bisecting_k_means_test.rb
|
301
|
+
- test/neural_network/backpropagation_test.rb
|
302
|
+
- test/classifiers/zero_r_test.rb
|
303
|
+
- test/classifiers/prism_test.rb
|
304
|
+
- test/classifiers/one_r_test.rb
|
305
|
+
- test/classifiers/id3_test.rb
|
306
|
+
- test/genetic_algorithm/genetic_algorithm_test.rb
|
307
|
+
- test/genetic_algorithm/chromosome_test.rb
|
308
|
+
- test/data/data_set_test.rb
|