fastout 0.0.1

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.
Files changed (51) hide show
  1. data/.gitignore +4 -0
  2. data/.rspec +2 -0
  3. data/Gemfile +4 -0
  4. data/Gemfile.lock +38 -0
  5. data/MIT-LICENSE +20 -0
  6. data/README.md +8 -0
  7. data/Rakefile +2 -0
  8. data/doc/classes/Fastout.html +105 -0
  9. data/doc/classes/Ranker.html +468 -0
  10. data/doc/classes/Ranker.src/M000001.html +18 -0
  11. data/doc/classes/Ranker.src/M000002.html +22 -0
  12. data/doc/classes/Ranker.src/M000003.html +42 -0
  13. data/doc/classes/Ranker.src/M000004.html +21 -0
  14. data/doc/classes/Ranker.src/M000005.html +28 -0
  15. data/doc/classes/Ranker.src/M000006.html +35 -0
  16. data/doc/classes/Ranker.src/M000007.html +18 -0
  17. data/doc/classes/Ranker.src/M000008.html +18 -0
  18. data/doc/classes/Ranker.src/M000009.html +33 -0
  19. data/doc/classes/Ranker.src/M000010.html +18 -0
  20. data/doc/classes/Ranker.src/M000011.html +22 -0
  21. data/doc/classes/Ranker.src/M000012.html +24 -0
  22. data/doc/classes/Ranker.src/M000013.html +28 -0
  23. data/doc/classes/Ranker.src/M000014.html +20 -0
  24. data/doc/classes/Ranker.src/M000015.html +19 -0
  25. data/doc/classes/Ranker/Point.html +262 -0
  26. data/doc/classes/Ranker/Point.src/M000016.html +18 -0
  27. data/doc/classes/Ranker/Point.src/M000017.html +24 -0
  28. data/doc/classes/Ranker/Point.src/M000018.html +18 -0
  29. data/doc/classes/Ranker/Point.src/M000019.html +18 -0
  30. data/doc/classes/Ranker/Point.src/M000020.html +18 -0
  31. data/doc/classes/Ranker/Point.src/M000021.html +26 -0
  32. data/doc/classes/Ranker/Point.src/M000022.html +18 -0
  33. data/doc/created.rid +1 -0
  34. data/doc/files/lib/fastout/ranker_rb.html +121 -0
  35. data/doc/files/lib/fastout/version_rb.html +101 -0
  36. data/doc/files/lib/fastout_rb.html +108 -0
  37. data/doc/files/spec/fastout/ranker_spec_rb.html +109 -0
  38. data/doc/files/spec/spec_helper_rb.html +110 -0
  39. data/doc/fr_class_index.html +29 -0
  40. data/doc/fr_file_index.html +28 -0
  41. data/doc/fr_method_index.html +48 -0
  42. data/doc/index.html +24 -0
  43. data/doc/rdoc-style.css +208 -0
  44. data/fastout.gemspec +29 -0
  45. data/lib/fastout.rb +1 -0
  46. data/lib/fastout/ranker.rb +243 -0
  47. data/lib/fastout/version.rb +3 -0
  48. data/spec/fastout/ranker_spec.rb +252 -0
  49. data/spec/parkinsons.csv +1 -0
  50. data/spec/spec_helper.rb +9 -0
  51. metadata +217 -0
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>next_id= (Ranker::Point)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/fastout/ranker.rb, line 14</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">next_id=</span> <span class="ruby-identifier">id</span>
15
+ <span class="ruby-ivar">@@next_id</span> = <span class="ruby-identifier">id</span>
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,24 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>new (Ranker::Point)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/fastout/ranker.rb, line 21</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-operator">*</span><span class="ruby-identifier">attributes</span>
15
+ <span class="ruby-ivar">@attributes</span> = <span class="ruby-identifier">attributes</span>
16
+ <span class="ruby-ivar">@cluster</span> = <span class="ruby-keyword kw">nil</span>
17
+ <span class="ruby-ivar">@score</span> = <span class="ruby-value">0</span>
18
+ <span class="ruby-ivar">@bins</span> = []
19
+
20
+ <span class="ruby-ivar">@id</span> = <span class="ruby-ivar">@@next_id</span>
21
+ <span class="ruby-ivar">@@next_id</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
22
+ <span class="ruby-keyword kw">end</span></pre>
23
+ </body>
24
+ </html>
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>[] (Ranker::Point)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/fastout/ranker.rb, line 31</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span> <span class="ruby-identifier">index</span>
15
+ <span class="ruby-ivar">@attributes</span>[<span class="ruby-identifier">index</span>]
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>clustered? (Ranker::Point)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/fastout/ranker.rb, line 35</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clustered?</span>
15
+ <span class="ruby-operator">!</span><span class="ruby-operator">!</span> <span class="ruby-identifier">cluster</span>
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>uncluster! (Ranker::Point)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/fastout/ranker.rb, line 39</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">uncluster!</span>
15
+ <span class="ruby-ivar">@cluster</span> = <span class="ruby-keyword kw">nil</span>
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,26 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>in_the_neighborhood_of? (Ranker::Point)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/fastout/ranker.rb, line 43</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">in_the_neighborhood_of?</span> <span class="ruby-identifier">point</span>, <span class="ruby-identifier">attribute_indexes</span>, <span class="ruby-identifier">neighborhoods</span>
15
+ <span class="ruby-identifier">attribute_indexes</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">attribute_index</span><span class="ruby-operator">|</span>
16
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">bins</span>[<span class="ruby-identifier">attribute_index</span>] <span class="ruby-operator">-</span> <span class="ruby-identifier">point</span>.<span class="ruby-identifier">bins</span>[<span class="ruby-identifier">attribute_index</span>]).<span class="ruby-identifier">abs</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span>
17
+ <span class="ruby-keyword kw">end</span>
18
+
19
+ <span class="ruby-identifier">attribute_indexes</span>.<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">attribute_index</span>, <span class="ruby-identifier">neighborhood_index</span><span class="ruby-operator">|</span>
20
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">attributes</span>[<span class="ruby-identifier">attribute_index</span>] <span class="ruby-operator">-</span> <span class="ruby-identifier">point</span>.<span class="ruby-identifier">attributes</span>[<span class="ruby-identifier">attribute_index</span>]) <span class="ruby-operator">&gt;</span> (<span class="ruby-identifier">neighborhoods</span>[<span class="ruby-identifier">neighborhood_index</span>] <span class="ruby-operator">/</span> <span class="ruby-value">2.0</span>)
21
+ <span class="ruby-keyword kw">end</span>
22
+
23
+ <span class="ruby-keyword kw">true</span>
24
+ <span class="ruby-keyword kw">end</span></pre>
25
+ </body>
26
+ </html>
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>neighbor_of_any? (Ranker::Point)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/fastout/ranker.rb, line 55</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">neighbor_of_any?</span> <span class="ruby-identifier">points</span>, <span class="ruby-identifier">attribute_indexes</span>, <span class="ruby-identifier">neighborhoods</span>
15
+ <span class="ruby-identifier">points</span>.<span class="ruby-identifier">inject</span>(<span class="ruby-keyword kw">false</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">found</span>, <span class="ruby-identifier">point</span><span class="ruby-operator">|</span> <span class="ruby-identifier">found</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">in_the_neighborhood_of?</span>(<span class="ruby-identifier">point</span>, <span class="ruby-identifier">attribute_indexes</span>, <span class="ruby-identifier">neighborhoods</span>) }
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1 @@
1
+ Tue, 23 Nov 2010 10:19:55 -0500
@@ -0,0 +1,121 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>File: ranker.rb</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="fileHeader">
50
+ <h1>ranker.rb</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>lib/fastout/ranker.rb
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Tue Nov 23 10:02:15 -0500 2010</td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <!-- banner header -->
64
+
65
+ <div id="bodyContent">
66
+
67
+
68
+
69
+ <div id="contextContent">
70
+
71
+ <div id="description">
72
+ <p>
73
+ Takes a data set and determines the outliers using the FASTOUT algorithm
74
+ from Foss et al., &quot;Class Separation through Variance: a new
75
+ application of outlier detection&quot;, Knowledge and Information Systems,
76
+ 2010.
77
+ </p>
78
+ <table>
79
+ <tr><td valign="top">Author:</td><td>Jason Dew (<a href="mailto:jason.dew@gmail.com">jason.dew@gmail.com</a>)
80
+
81
+ </td></tr>
82
+ <tr><td valign="top">Copyright:</td><td>Copyright (c) 2010 Jason Dew
83
+
84
+ </td></tr>
85
+ <tr><td valign="top">License:</td><td>MIT
86
+
87
+ </td></tr>
88
+ </table>
89
+
90
+ </div>
91
+
92
+
93
+ </div>
94
+
95
+
96
+ </div>
97
+
98
+
99
+ <!-- if includes -->
100
+
101
+ <div id="section">
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+ <!-- if method_list -->
111
+
112
+
113
+ </div>
114
+
115
+
116
+ <div id="validator-badges">
117
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
118
+ </div>
119
+
120
+ </body>
121
+ </html>
@@ -0,0 +1,101 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>File: version.rb</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="fileHeader">
50
+ <h1>version.rb</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>lib/fastout/version.rb
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Mon Nov 22 22:25:12 -0500 2010</td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <!-- banner header -->
64
+
65
+ <div id="bodyContent">
66
+
67
+
68
+
69
+ <div id="contextContent">
70
+
71
+
72
+
73
+ </div>
74
+
75
+
76
+ </div>
77
+
78
+
79
+ <!-- if includes -->
80
+
81
+ <div id="section">
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+ <!-- if method_list -->
91
+
92
+
93
+ </div>
94
+
95
+
96
+ <div id="validator-badges">
97
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
98
+ </div>
99
+
100
+ </body>
101
+ </html>
@@ -0,0 +1,108 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>File: fastout.rb</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="fileHeader">
50
+ <h1>fastout.rb</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>lib/fastout.rb
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Mon Nov 22 22:25:12 -0500 2010</td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <!-- banner header -->
64
+
65
+ <div id="bodyContent">
66
+
67
+
68
+
69
+ <div id="contextContent">
70
+
71
+
72
+ <div id="requires-list">
73
+ <h3 class="section-bar">Required files</h3>
74
+
75
+ <div class="name-list">
76
+ fastout/ranker&nbsp;&nbsp;
77
+ </div>
78
+ </div>
79
+
80
+ </div>
81
+
82
+
83
+ </div>
84
+
85
+
86
+ <!-- if includes -->
87
+
88
+ <div id="section">
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+ <!-- if method_list -->
98
+
99
+
100
+ </div>
101
+
102
+
103
+ <div id="validator-badges">
104
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
105
+ </div>
106
+
107
+ </body>
108
+ </html>