Skip to content
Browse files

Fix indention

  • Loading branch information...
1 parent 2e54f0e commit 856cee98e7ca2043ecbf05abe26cd9144e1cbcd4 @febeling committed
Showing with 13 additions and 13 deletions.
  1. +13 −13 README.md
View
26 README.md
@@ -26,26 +26,26 @@ Currently includes libsvm version 3.12.
## Usage
```ruby
- require 'libsvm'
+require 'libsvm'
- # This library is namespaced.
- problem = Libsvm::Problem.new
- parameter = Libsvm::SvmParameter.new
+# This library is namespaced.
+problem = Libsvm::Problem.new
+parameter = Libsvm::SvmParameter.new
- parameter.cache_size = 1 # in megabytes
+parameter.cache_size = 1 # in megabytes
- parameter.eps = 0.001
- parameter.c = 10
+parameter.eps = 0.001
+parameter.c = 10
- examples = [ [1,0,1], [-1,0,-1] ].map {|ary| Libsvm::Node.features(ary) }
- labels = [1, -1]
+examples = [ [1,0,1], [-1,0,-1] ].map {|ary| Libsvm::Node.features(ary) }
+labels = [1, -1]
- problem.set_examples(labels, examples)
+problem.set_examples(labels, examples)
- model = Libsvm::Model.train(problem, parameter)
+model = Libsvm::Model.train(problem, parameter)
- pred = model.predict(Libsvm::Node.features(1, 1, 1))
- puts "Example [1, 1, 1] - Predicted #{pred}"
+pred = model.predict(Libsvm::Node.features(1, 1, 1))
+puts "Example [1, 1, 1] - Predicted #{pred}"
```
## Author, License

0 comments on commit 856cee9

Please sign in to comment.
Something went wrong with that request. Please try again.