rb-libsvm 1.1.2 → 1.1.3
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/.travis.yml +1 -0
- data/ext/libsvm/libsvm.c +5 -2
- data/lib/libsvm/version.rb +1 -1
- metadata +4 -4
data/.travis.yml
CHANGED
data/ext/libsvm/libsvm.c
CHANGED
|
@@ -340,11 +340,13 @@ static VALUE cModel_predict(VALUE obj,VALUE example) {
|
|
|
340
340
|
struct svm_node *x;
|
|
341
341
|
struct svm_model *model;
|
|
342
342
|
double class;
|
|
343
|
-
|
|
343
|
+
|
|
344
344
|
x = example_to_internal(example);
|
|
345
345
|
Data_Get_Struct(obj, struct svm_model, model);
|
|
346
346
|
class = svm_predict(model, x);
|
|
347
|
-
|
|
347
|
+
|
|
348
|
+
free(x);
|
|
349
|
+
|
|
348
350
|
return rb_float_new(class);
|
|
349
351
|
}
|
|
350
352
|
|
|
@@ -371,6 +373,7 @@ static VALUE cModel_predict_probability(VALUE obj,VALUE example) {
|
|
|
371
373
|
rb_ary_push(estimates, rx_from_double(c_estimates[i]));
|
|
372
374
|
|
|
373
375
|
free(c_estimates);
|
|
376
|
+
free(x);
|
|
374
377
|
|
|
375
378
|
target = rb_ary_new();
|
|
376
379
|
rb_ary_push(target, rb_float_new(class));
|
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.1.
|
|
4
|
+
version: 1.1.3
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2013-03-
|
|
13
|
+
date: 2013-03-20 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: rake-compiler
|
|
@@ -93,7 +93,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
93
93
|
version: '0'
|
|
94
94
|
segments:
|
|
95
95
|
- 0
|
|
96
|
-
hash:
|
|
96
|
+
hash: 4124111436623898286
|
|
97
97
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
98
98
|
none: false
|
|
99
99
|
requirements:
|
|
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
102
102
|
version: '0'
|
|
103
103
|
segments:
|
|
104
104
|
- 0
|
|
105
|
-
hash:
|
|
105
|
+
hash: 4124111436623898286
|
|
106
106
|
requirements: []
|
|
107
107
|
rubyforge_project: rb-libsvm
|
|
108
108
|
rubygems_version: 1.8.23
|