numo-libsvm 1.1.2 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,31 @@
1
+
2
+ Copyright (c) 2000-2019 Chih-Chung Chang and Chih-Jen Lin
3
+ All rights reserved.
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions
7
+ are met:
8
+
9
+ 1. Redistributions of source code must retain the above copyright
10
+ notice, this list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright
13
+ notice, this list of conditions and the following disclaimer in the
14
+ documentation and/or other materials provided with the distribution.
15
+
16
+ 3. Neither name of copyright holders nor the names of its contributors
17
+ may be used to endorse or promote products derived from this software
18
+ without specific prior written permission.
19
+
20
+
21
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22
+ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
25
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
28
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
29
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -1825,7 +1825,7 @@ static double sigmoid_predict(double decision_value, double A, double B)
1825
1825
  return 1.0/(1+exp(fApB)) ;
1826
1826
  }
1827
1827
 
1828
- // Method 2 from the multiclass_prob paper by Wu, Lin, and Weng
1828
+ // Method 2 from the multiclass_prob paper by Wu, Lin, and Weng to predict probabilities
1829
1829
  static void multiclass_probability(int k, double **r, double *p)
1830
1830
  {
1831
1831
  int t,j;
@@ -1889,7 +1889,7 @@ static void multiclass_probability(int k, double **r, double *p)
1889
1889
  free(Qp);
1890
1890
  }
1891
1891
 
1892
- // Cross-validation decision values for probability estimates
1892
+ // Using cross-validation decision values to get parameters for SVC probability estimates
1893
1893
  static void svm_binary_svc_probability(
1894
1894
  const svm_problem *prob, const svm_parameter *param,
1895
1895
  double Cp, double Cn, double& probA, double& probB)
@@ -1976,6 +1976,83 @@ static void svm_binary_svc_probability(
1976
1976
  free(perm);
1977
1977
  }
1978
1978
 
1979
+ // Binning method from the oneclass_prob paper by Que and Lin to predict the probability as a normal instance (i.e., not an outlier)
1980
+ static double predict_one_class_probability(const svm_model *model, double dec_value)
1981
+ {
1982
+ double prob_estimate = 0.0;
1983
+ int nr_marks = 10;
1984
+
1985
+ if(dec_value < model->prob_density_marks[0])
1986
+ prob_estimate = 0.001;
1987
+ else if(dec_value > model->prob_density_marks[nr_marks-1])
1988
+ prob_estimate = 0.999;
1989
+ else
1990
+ {
1991
+ for(int i=1;i<nr_marks;i++)
1992
+ if(dec_value < model->prob_density_marks[i])
1993
+ {
1994
+ prob_estimate = (double)i/nr_marks;
1995
+ break;
1996
+ }
1997
+ }
1998
+ return prob_estimate;
1999
+ }
2000
+
2001
+ static int compare_double(const void *a, const void *b)
2002
+ {
2003
+ if(*(double *)a > *(double *)b)
2004
+ return 1;
2005
+ else if(*(double *)a < *(double *)b)
2006
+ return -1;
2007
+ return 0;
2008
+ }
2009
+
2010
+ // Get parameters for one-class SVM probability estimates
2011
+ static int svm_one_class_probability(const svm_problem *prob, const svm_model *model, double *prob_density_marks)
2012
+ {
2013
+ double *dec_values = Malloc(double,prob->l);
2014
+ double *pred_results = Malloc(double,prob->l);
2015
+ int ret = 0;
2016
+ int nr_marks = 10;
2017
+
2018
+ for(int i=0;i<prob->l;i++)
2019
+ pred_results[i] = svm_predict_values(model,prob->x[i],&dec_values[i]);
2020
+ qsort(dec_values,prob->l,sizeof(double),compare_double);
2021
+
2022
+ int neg_counter=0;
2023
+ for(int i=0;i<prob->l;i++)
2024
+ if(dec_values[i]>=0)
2025
+ {
2026
+ neg_counter = i;
2027
+ break;
2028
+ }
2029
+
2030
+ int pos_counter = prob->l-neg_counter;
2031
+ if(neg_counter<nr_marks/2 || pos_counter<nr_marks/2)
2032
+ {
2033
+ fprintf(stderr,"WARNING: number of positive or negative decision values <%d; too few to do a probability estimation.\n",nr_marks/2);
2034
+ ret = -1;
2035
+ }
2036
+ else
2037
+ {
2038
+ // Binning by density
2039
+ double *tmp_marks = Malloc(double,nr_marks+1);
2040
+ int mid = nr_marks/2;
2041
+ for(int i=0;i<mid;i++)
2042
+ tmp_marks[i] = dec_values[i*neg_counter/mid];
2043
+ tmp_marks[mid] = 0;
2044
+ for(int i=mid+1;i<nr_marks+1;i++)
2045
+ tmp_marks[i] = dec_values[neg_counter-1+(i-mid)*pos_counter/mid];
2046
+
2047
+ for(int i=0;i<nr_marks;i++)
2048
+ prob_density_marks[i] = (tmp_marks[i]+tmp_marks[i+1])/2;
2049
+ free(tmp_marks);
2050
+ }
2051
+ free(dec_values);
2052
+ free(pred_results);
2053
+ return ret;
2054
+ }
2055
+
1979
2056
  // Return parameter of a Laplace distribution
1980
2057
  static double svm_svr_probability(
1981
2058
  const svm_problem *prob, const svm_parameter *param)
@@ -2104,16 +2181,9 @@ svm_model *svm_train(const svm_problem *prob, const svm_parameter *param)
2104
2181
  model->label = NULL;
2105
2182
  model->nSV = NULL;
2106
2183
  model->probA = NULL; model->probB = NULL;
2184
+ model->prob_density_marks = NULL;
2107
2185
  model->sv_coef = Malloc(double *,1);
2108
2186
 
2109
- if(param->probability &&
2110
- (param->svm_type == EPSILON_SVR ||
2111
- param->svm_type == NU_SVR))
2112
- {
2113
- model->probA = Malloc(double,1);
2114
- model->probA[0] = svm_svr_probability(prob,param);
2115
- }
2116
-
2117
2187
  decision_function f = svm_train_one(prob,param,0,0);
2118
2188
  model->rho = Malloc(double,1);
2119
2189
  model->rho[0] = f.rho;
@@ -2136,6 +2206,26 @@ svm_model *svm_train(const svm_problem *prob, const svm_parameter *param)
2136
2206
  ++j;
2137
2207
  }
2138
2208
 
2209
+ if(param->probability &&
2210
+ (param->svm_type == EPSILON_SVR ||
2211
+ param->svm_type == NU_SVR))
2212
+ {
2213
+ model->probA = Malloc(double,1);
2214
+ model->probA[0] = svm_svr_probability(prob,param);
2215
+ }
2216
+ else if(param->probability && param->svm_type == ONE_CLASS)
2217
+ {
2218
+ int nr_marks = 10;
2219
+ double *prob_density_marks = Malloc(double,nr_marks);
2220
+
2221
+ if(svm_one_class_probability(prob,model,prob_density_marks) == 0)
2222
+ {
2223
+ model->prob_density_marks = Malloc(double,nr_marks);
2224
+ for(i=0;i<nr_marks;i++)
2225
+ model->prob_density_marks[i] = prob_density_marks[i];
2226
+ }
2227
+ }
2228
+
2139
2229
  free(f.alpha);
2140
2230
  }
2141
2231
  else
@@ -2253,6 +2343,7 @@ svm_model *svm_train(const svm_problem *prob, const svm_parameter *param)
2253
2343
  model->probA=NULL;
2254
2344
  model->probB=NULL;
2255
2345
  }
2346
+ model->prob_density_marks=NULL; // for one-class SVM probabilistic outputs only
2256
2347
 
2257
2348
  int total_sv = 0;
2258
2349
  int *nz_count = Malloc(int,nr_class);
@@ -2630,6 +2721,14 @@ double svm_predict_probability(
2630
2721
  free(pairwise_prob);
2631
2722
  return model->label[prob_max_idx];
2632
2723
  }
2724
+ else if(model->param.svm_type == ONE_CLASS && model->prob_density_marks!=NULL)
2725
+ {
2726
+ double dec_value;
2727
+ double pred_result = svm_predict_values(model,x,&dec_value);
2728
+ prob_estimates[0] = predict_one_class_probability(model,dec_value);
2729
+ prob_estimates[1] = 1-prob_estimates[0];
2730
+ return pred_result;
2731
+ }
2633
2732
  else
2634
2733
  return svm_predict(model, x);
2635
2734
  }
@@ -2703,6 +2802,14 @@ int svm_save_model(const char *model_file_name, const svm_model *model)
2703
2802
  fprintf(fp," %.17g",model->probB[i]);
2704
2803
  fprintf(fp, "\n");
2705
2804
  }
2805
+ if(model->prob_density_marks)
2806
+ {
2807
+ fprintf(fp, "prob_density_marks");
2808
+ int nr_marks=10;
2809
+ for(int i=0;i<nr_marks;i++)
2810
+ fprintf(fp," %.17g",model->prob_density_marks[i]);
2811
+ fprintf(fp, "\n");
2812
+ }
2706
2813
 
2707
2814
  if(model->nSV)
2708
2815
  {
@@ -2857,6 +2964,13 @@ bool read_model_header(FILE *fp, svm_model* model)
2857
2964
  for(int i=0;i<n;i++)
2858
2965
  FSCANF(fp,"%lf",&model->probB[i]);
2859
2966
  }
2967
+ else if(strcmp(cmd,"prob_density_marks")==0)
2968
+ {
2969
+ int n = 10; // nr_marks
2970
+ model->prob_density_marks = Malloc(double,n);
2971
+ for(int i=0;i<n;i++)
2972
+ FSCANF(fp,"%lf",&model->prob_density_marks[i]);
2973
+ }
2860
2974
  else if(strcmp(cmd,"nr_sv")==0)
2861
2975
  {
2862
2976
  int n = model->nr_class;
@@ -2901,6 +3015,7 @@ svm_model *svm_load_model(const char *model_file_name)
2901
3015
  model->rho = NULL;
2902
3016
  model->probA = NULL;
2903
3017
  model->probB = NULL;
3018
+ model->prob_density_marks = NULL;
2904
3019
  model->sv_indices = NULL;
2905
3020
  model->label = NULL;
2906
3021
  model->nSV = NULL;
@@ -3012,13 +3127,16 @@ void svm_free_model_content(svm_model* model_ptr)
3012
3127
  model_ptr->rho = NULL;
3013
3128
 
3014
3129
  free(model_ptr->label);
3015
- model_ptr->label= NULL;
3130
+ model_ptr->label = NULL;
3016
3131
 
3017
3132
  free(model_ptr->probA);
3018
3133
  model_ptr->probA = NULL;
3019
3134
 
3020
3135
  free(model_ptr->probB);
3021
- model_ptr->probB= NULL;
3136
+ model_ptr->probB = NULL;
3137
+
3138
+ free(model_ptr->prob_density_marks);
3139
+ model_ptr->prob_density_marks = NULL;
3022
3140
 
3023
3141
  free(model_ptr->sv_indices);
3024
3142
  model_ptr->sv_indices = NULL;
@@ -3104,10 +3222,6 @@ const char *svm_check_parameter(const svm_problem *prob, const svm_parameter *pa
3104
3222
  param->probability != 1)
3105
3223
  return "probability != 0 and probability != 1";
3106
3224
 
3107
- if(param->probability == 1 &&
3108
- svm_type == ONE_CLASS)
3109
- return "one-class SVM probability output not supported yet";
3110
-
3111
3225
 
3112
3226
  // check whether nu-svc is feasible
3113
3227
 
@@ -3167,8 +3281,10 @@ const char *svm_check_parameter(const svm_problem *prob, const svm_parameter *pa
3167
3281
 
3168
3282
  int svm_check_probability_model(const svm_model *model)
3169
3283
  {
3170
- return ((model->param.svm_type == C_SVC || model->param.svm_type == NU_SVC) &&
3171
- model->probA!=NULL && model->probB!=NULL) ||
3284
+ return
3285
+ ((model->param.svm_type == C_SVC || model->param.svm_type == NU_SVC) &&
3286
+ model->probA!=NULL && model->probB!=NULL) ||
3287
+ (model->param.svm_type == ONE_CLASS && model->prob_density_marks!=NULL) ||
3172
3288
  ((model->param.svm_type == EPSILON_SVR || model->param.svm_type == NU_SVR) &&
3173
3289
  model->probA!=NULL);
3174
3290
  }
@@ -1,7 +1,7 @@
1
1
  #ifndef _LIBSVM_H
2
2
  #define _LIBSVM_H
3
3
 
4
- #define LIBSVM_VERSION 324
4
+ #define LIBSVM_VERSION 330
5
5
 
6
6
  #ifdef __cplusplus
7
7
  extern "C" {
@@ -59,6 +59,7 @@ struct svm_model
59
59
  double *rho; /* constants in decision functions (rho[k*(k-1)/2]) */
60
60
  double *probA; /* pariwise probability information */
61
61
  double *probB;
62
+ double *prob_density_marks; /* probability information for ONE_CLASS */
62
63
  int *sv_indices; /* sv_indices[0,...,nSV-1] are values in [1,...,num_traning_data] to indicate SVs in the training set */
63
64
 
64
65
  /* for classification only */
@@ -3,6 +3,6 @@
3
3
  module Numo
4
4
  module Libsvm
5
5
  # The version of Numo::Libsvm you are using.
6
- VERSION = '1.1.2'
6
+ VERSION = '2.1.0'
7
7
  end
8
8
  end
data/sig/numo/libsvm.rbs CHANGED
@@ -27,6 +27,7 @@ module Numo
27
27
  rho: Numo::DFloat,
28
28
  probA: Numo::DFloat,
29
29
  probB: Numo::DFloat,
30
+ prob_density_marks: Numo::DFloat,
30
31
  sv_indices: Numo::Int32,
31
32
  label: Numo::Int32,
32
33
  nSV: Numo::Int32,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: numo-libsvm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - yoshoku
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-07-10 00:00:00.000000000 Z
11
+ date: 2022-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: numo-narray
@@ -36,37 +36,17 @@ extensions:
36
36
  - ext/numo/libsvm/extconf.rb
37
37
  extra_rdoc_files: []
38
38
  files:
39
- - ".github/workflows/build.yml"
40
- - ".gitignore"
41
- - ".gitmodules"
42
- - ".rspec"
43
39
  - CHANGELOG.md
44
- - CODE_OF_CONDUCT.md
45
- - Gemfile
46
40
  - LICENSE.txt
47
41
  - README.md
48
- - Rakefile
49
- - Steepfile
50
- - ext/numo/libsvm/converter.c
51
- - ext/numo/libsvm/converter.h
52
42
  - ext/numo/libsvm/extconf.rb
53
- - ext/numo/libsvm/kernel_type.c
54
- - ext/numo/libsvm/kernel_type.h
55
- - ext/numo/libsvm/libsvm/svm.cpp
56
- - ext/numo/libsvm/libsvm/svm.h
57
- - ext/numo/libsvm/libsvmext.c
58
- - ext/numo/libsvm/libsvmext.h
59
- - ext/numo/libsvm/svm_model.c
60
- - ext/numo/libsvm/svm_model.h
61
- - ext/numo/libsvm/svm_parameter.c
62
- - ext/numo/libsvm/svm_parameter.h
63
- - ext/numo/libsvm/svm_problem.c
64
- - ext/numo/libsvm/svm_problem.h
65
- - ext/numo/libsvm/svm_type.c
66
- - ext/numo/libsvm/svm_type.h
43
+ - ext/numo/libsvm/libsvmext.cpp
44
+ - ext/numo/libsvm/libsvmext.hpp
45
+ - ext/numo/libsvm/src/COPYRIGHT
46
+ - ext/numo/libsvm/src/svm.cpp
47
+ - ext/numo/libsvm/src/svm.h
67
48
  - lib/numo/libsvm.rb
68
49
  - lib/numo/libsvm/version.rb
69
- - numo-libsvm.gemspec
70
50
  - sig/numo/libsvm.rbs
71
51
  homepage: https://github.com/yoshoku/numo-libsvm
72
52
  licenses:
@@ -75,7 +55,8 @@ metadata:
75
55
  homepage_uri: https://github.com/yoshoku/numo-libsvm
76
56
  source_code_uri: https://github.com/yoshoku/numo-libsvm
77
57
  documentation_uri: https://yoshoku.github.io/numo-libsvm/doc/
78
- post_install_message:
58
+ rubygems_mfa_required: 'true'
59
+ post_install_message:
79
60
  rdoc_options: []
80
61
  require_paths:
81
62
  - lib
@@ -90,8 +71,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
71
  - !ruby/object:Gem::Version
91
72
  version: '0'
92
73
  requirements: []
93
- rubygems_version: 3.2.21
94
- signing_key:
74
+ rubygems_version: 3.2.33
75
+ signing_key:
95
76
  specification_version: 4
96
77
  summary: Numo::Libsvm is a Ruby gem binding to the LIBSVM library. Numo::Libsvm makes
97
78
  to use the LIBSVM functions with dataset represented by Numo::NArray.
@@ -1,29 +0,0 @@
1
- name: build
2
-
3
- on: [push, pull_request]
4
-
5
- jobs:
6
- build:
7
- runs-on: ubuntu-latest
8
- strategy:
9
- fail-fast: false
10
- matrix:
11
- ruby: [ '2.6', '2.7', '3.0' ]
12
- steps:
13
- - uses: actions/checkout@v2
14
- - name: Checkout submodule
15
- shell: bash
16
- run: |
17
- auth_header="$(git config --local --get http.https://github.com/.extraheader)"
18
- git submodule sync --recursive
19
- git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
20
- - name: Set up Ruby ${{ matrix.ruby }}
21
- uses: ruby/setup-ruby@v1
22
- with:
23
- ruby-version: ${{ matrix.ruby }}
24
- bundler-cache: true
25
- - name: Build and test with Rake
26
- run: |
27
- gem install --no-document bundler
28
- bundle install --jobs 4 --retry 3
29
- bundle exec rake
data/.gitignore DELETED
@@ -1,20 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
- /bin/
11
-
12
- # rspec failure tracking
13
- .rspec_status
14
-
15
- *.swp
16
- *.bundle
17
- mkmf.log
18
- tags
19
- .DS_Store
20
- .ruby-version
data/.gitmodules DELETED
@@ -1,3 +0,0 @@
1
- [submodule "ext/numo/libsvm/libsvm"]
2
- path = ext/numo/libsvm/libsvm
3
- url = https://github.com/cjlin1/libsvm.git
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
data/CODE_OF_CONDUCT.md DELETED
@@ -1,74 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- In the interest of fostering an open and welcoming environment, we as
6
- contributors and maintainers pledge to making participation in our project and
7
- our community a harassment-free experience for everyone, regardless of age, body
8
- size, disability, ethnicity, gender identity and expression, level of experience,
9
- nationality, personal appearance, race, religion, or sexual identity and
10
- orientation.
11
-
12
- ## Our Standards
13
-
14
- Examples of behavior that contributes to creating a positive environment
15
- include:
16
-
17
- * Using welcoming and inclusive language
18
- * Being respectful of differing viewpoints and experiences
19
- * Gracefully accepting constructive criticism
20
- * Focusing on what is best for the community
21
- * Showing empathy towards other community members
22
-
23
- Examples of unacceptable behavior by participants include:
24
-
25
- * The use of sexualized language or imagery and unwelcome sexual attention or
26
- advances
27
- * Trolling, insulting/derogatory comments, and personal or political attacks
28
- * Public or private harassment
29
- * Publishing others' private information, such as a physical or electronic
30
- address, without explicit permission
31
- * Other conduct which could reasonably be considered inappropriate in a
32
- professional setting
33
-
34
- ## Our Responsibilities
35
-
36
- Project maintainers are responsible for clarifying the standards of acceptable
37
- behavior and are expected to take appropriate and fair corrective action in
38
- response to any instances of unacceptable behavior.
39
-
40
- Project maintainers have the right and responsibility to remove, edit, or
41
- reject comments, commits, code, wiki edits, issues, and other contributions
42
- that are not aligned to this Code of Conduct, or to ban temporarily or
43
- permanently any contributor for other behaviors that they deem inappropriate,
44
- threatening, offensive, or harmful.
45
-
46
- ## Scope
47
-
48
- This Code of Conduct applies both within project spaces and in public spaces
49
- when an individual is representing the project or its community. Examples of
50
- representing a project or community include using an official project e-mail
51
- address, posting via an official social media account, or acting as an appointed
52
- representative at an online or offline event. Representation of a project may be
53
- further defined and clarified by project maintainers.
54
-
55
- ## Enforcement
56
-
57
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at yoshoku@outlook.com. All
59
- complaints will be reviewed and investigated and will result in a response that
60
- is deemed necessary and appropriate to the circumstances. The project team is
61
- obligated to maintain confidentiality with regard to the reporter of an incident.
62
- Further details of specific enforcement policies may be posted separately.
63
-
64
- Project maintainers who do not follow or enforce the Code of Conduct in good
65
- faith may face temporary or permanent repercussions as determined by other
66
- members of the project's leadership.
67
-
68
- ## Attribution
69
-
70
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
- available at [http://contributor-covenant.org/version/1/4][version]
72
-
73
- [homepage]: http://contributor-covenant.org
74
- [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile DELETED
@@ -1,11 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- # Specify your gem's dependencies in numo-libsvm.gemspec
4
- gemspec
5
-
6
- gem 'bundler', '~> 2.0'
7
- gem 'rake', '~> 13.0'
8
- gem 'rake-compiler', '~> 1.0'
9
- gem 'rspec', '~> 3.0'
10
- gem 'rbs', '~> 1.2'
11
- gem 'steep', '~> 0.44'
data/Rakefile DELETED
@@ -1,15 +0,0 @@
1
- require 'bundler/gem_tasks'
2
- require 'rspec/core/rake_task'
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- require 'rake/extensiontask'
7
-
8
- task :build => :compile
9
-
10
- Rake::ExtensionTask.new('libsvmext') do |ext|
11
- ext.ext_dir = 'ext/numo/libsvm'
12
- ext.lib_dir = 'lib/numo/libsvm'
13
- end
14
-
15
- task :default => [:clobber, :compile, :spec]
data/Steepfile DELETED
@@ -1,20 +0,0 @@
1
- target :lib do
2
- signature "sig", "sig-deps"
3
- #
4
- check "lib" # Directory name
5
- # check "Gemfile" # File name
6
- # check "app/models/**/*.rb" # Glob
7
- # # ignore "lib/templates/*.rb"
8
- #
9
- # # library "pathname", "set" # Standard libraries
10
- # library "numo-narray" # Gems
11
- end
12
-
13
- # target :spec do
14
- # signature "sig", "sig-private"
15
- #
16
- # check "spec"
17
- #
18
- # # library "pathname", "set" # Standard libraries
19
- # # library "rspec"
20
- # end