rb-libsvm 1.0.9 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +4 -3
- data/README.md +35 -12
- data/lib/libsvm/version.rb +1 -1
- metadata +7 -7
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# rb-libsvm -- Ruby language bindings for LIBSVM
|
2
2
|
|
3
|
-
|
3
|
+
[](http://travis-ci.org/febeling/rb-libsvm)
|
4
4
|
|
5
5
|
This package provides a Ruby bindings to the [LIBSVM][] library. SVM
|
6
6
|
is a machine learning and classification algorithm, and LIBSVM is a
|
@@ -9,29 +9,38 @@ Chih-Jen Lin, of National Taiwan University, Taipei. See the book ["Programming
|
|
9
9
|
Collective Intelligence,"](http://books.google.com/books?id=fEsZ3Ey-Hq4C) among others, for a usage example.
|
10
10
|
|
11
11
|
Note: There exist two other Ruby bindings for LIBSVM. One is named
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
SWIG.
|
12
|
+
[Ruby SVM][ruby-svm], written by Rudi Cilibrasi. The other, more
|
13
|
+
actively developed one is [libsvm-ruby-swig][svmrubyswig] by Tom Zeng,
|
14
|
+
which is built using SWIG.
|
16
15
|
|
17
|
-
|
16
|
+
LIBSVM includes a number of command line tools for preprocessing
|
17
|
+
training data and finding parameters. These tools are not included in
|
18
|
+
this gem. You should install the original package if you need them.
|
18
19
|
|
19
|
-
|
20
|
+
It is helpful to consult the Readme of the LIBSVM package for
|
21
|
+
reference when configuring the training parameters.
|
20
22
|
|
21
23
|
Currently this package includes libsvm version 3.13.
|
22
24
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
It is also helpful to consult the Readme of the LIBSVM package for
|
27
|
-
reference when configuring the training parameters.
|
25
|
+
## Dependencies
|
26
|
+
|
27
|
+
None. LIBSVM is bundled with the project. Just install and go!
|
28
28
|
|
29
29
|
## Installation
|
30
30
|
|
31
|
+
For building this gem from source on OS X (which is the default
|
32
|
+
packaging) you will need to have Xcode installed, and from within Xcode
|
33
|
+
you need to install the command line tools. Those contain the compiler
|
34
|
+
which is necessary for the native code, and similar tools.
|
35
|
+
|
36
|
+
To install the gem run this command
|
37
|
+
|
31
38
|
gem install rb-libsvm
|
32
39
|
|
33
40
|
## Usage
|
34
41
|
|
42
|
+
This is a short example of how to use the gem.
|
43
|
+
|
35
44
|
```ruby
|
36
45
|
require 'libsvm'
|
37
46
|
|
@@ -55,6 +64,18 @@ pred = model.predict(Libsvm::Node.features(1, 1, 1))
|
|
55
64
|
puts "Example [1, 1, 1] - Predicted #{pred}"
|
56
65
|
```
|
57
66
|
|
67
|
+
If you want to rely on Bundler for loading dependencies in a project,
|
68
|
+
(i.e. use `Bundler.require` or use an environment that relies on it,
|
69
|
+
like Rails), then you will need to specify rb-libsvm in the Gemfile
|
70
|
+
like this:
|
71
|
+
|
72
|
+
```ruby
|
73
|
+
gem 'rb-libsvm', require: 'libsvm'
|
74
|
+
```
|
75
|
+
|
76
|
+
This is because the loadable name (`libsvm`) is different from the
|
77
|
+
gem's name (`rb-libsvm`).
|
78
|
+
|
58
79
|
## Author
|
59
80
|
|
60
81
|
Written by C. Florian Ebeling.
|
@@ -82,3 +103,5 @@ http://www.igvita.com/2008/01/07/support-vector-machines-svm-in-ruby/
|
|
82
103
|
[libsvm]: http://www.csie.ntu.edu.tw/~cjlin/libsvm/
|
83
104
|
|
84
105
|
[svmrubyswig]: http://github.com/tomz/libsvm-ruby-swig/tree/master
|
106
|
+
|
107
|
+
[ruby-svm]: http://sourceforge.net/projects/rubysvm/
|
data/lib/libsvm/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rb-libsvm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.10
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -14,7 +14,7 @@ date: 2012-11-11 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rake-compiler
|
17
|
-
requirement: &
|
17
|
+
requirement: &70142937715840 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: '0'
|
23
23
|
type: :development
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *70142937715840
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: rspec
|
28
|
-
requirement: &
|
28
|
+
requirement: &70142937715300 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ! '>='
|
@@ -33,7 +33,7 @@ dependencies:
|
|
33
33
|
version: 2.7.0
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *70142937715300
|
37
37
|
description: libsvm and ruby without using swig
|
38
38
|
email:
|
39
39
|
- florian.ebeling@gmail.com
|
@@ -82,7 +82,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
82
82
|
version: '0'
|
83
83
|
segments:
|
84
84
|
- 0
|
85
|
-
hash: -
|
85
|
+
hash: -4211699239546400957
|
86
86
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
87
|
none: false
|
88
88
|
requirements:
|
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
91
|
version: '0'
|
92
92
|
segments:
|
93
93
|
- 0
|
94
|
-
hash: -
|
94
|
+
hash: -4211699239546400957
|
95
95
|
requirements: []
|
96
96
|
rubyforge_project: rb-libsvm
|
97
97
|
rubygems_version: 1.8.10
|