rb-libsvm 1.0.9 → 1.0.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/.gitignore +4 -3
  2. data/README.md +35 -12
  3. data/lib/libsvm/version.rb +1 -1
  4. metadata +7 -7
data/.gitignore CHANGED
@@ -1,12 +1,13 @@
1
- tmp/
1
+ /tmp
2
2
  *.bundle
3
3
  *.so
4
4
  *.dylib
5
5
  *.model
6
- pkg/
6
+ /pkg
7
7
  Gemfile*
8
8
  .rvmrc
9
9
  tags
10
10
  *.swp
11
11
  *~
12
- /.rbx/
12
+ /.rbx
13
+ /vendor
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # rb-libsvm -- Ruby language bindings for LIBSVM
2
2
 
3
- Spec Status: [![Build Status](https://secure.travis-ci.org/febeling/rb-libsvm.png)](http://travis-ci.org/febeling/rb-libsvm)
3
+ [![Build Status](https://secure.travis-ci.org/febeling/rb-libsvm.png)](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
- "Ruby SVM," and is written by Rudi Cilibrasi. It is hard to find
13
- nowadays. The other, more actively developed one is
14
- [libsvm-ruby-swig][svmrubyswig] by Tom Zeng, which is built using
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
- ## Dependencies
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
- None. LIBSVM is bundled with the project. Just install and go!
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
- LIBSVM includes a number of command line tools for preprocessing
24
- training data and finding parameters. These tools are not included in
25
- this gem. You should install the original package if you need these.
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/
@@ -1,3 +1,3 @@
1
1
  module Libsvm
2
- VERSION = "1.0.9"
2
+ VERSION = "1.0.10"
3
3
  end
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.9
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: &70287494349840 !ruby/object:Gem::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: *70287494349840
25
+ version_requirements: *70142937715840
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: rspec
28
- requirement: &70287494349340 !ruby/object:Gem::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: *70287494349340
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: -1009595894930293011
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: -1009595894930293011
94
+ hash: -4211699239546400957
95
95
  requirements: []
96
96
  rubyforge_project: rb-libsvm
97
97
  rubygems_version: 1.8.10