b0VIM 7.3ƦcO(9foxxps~fox/src/nlp/wsd/rb-libsvm/spec/usage_spec.rbutf-8 3210#"! Utp/ad;  /êéÏè†cbóØ×Á»º¡añ « – j i ; : ò ñ ¾ ¦ ¥ q Y S R 3 ø ¯ ƒ ‚ T S     end end model.predict(Node.features(1, 2, 3)).should == 2 model = Model.train(@problem, @parameter) @problem.set_examples([1, 2], examples) examples = [[1, 2, 3], [-2, -2, -2]].map {|ary| Node.features(ary) } @parameter.kernel_type = SvmParameter::KernelType::RBF it "kernel parameter use" do end pred.should == -1.0 pred = model.predict(Node.features(-1, 55, -1)) pred.should == -1.0 pred = model.predict(Node.features(-1, 1, -1)) pred.should == 1.0 pred = model.predict(Node.features(1, 1, 1)) model = Model.train(@problem, @parameter) @problem.set_examples(labels, examples) labels = [1, -1] examples = [ [1,0,1], [-1,0,-1] ].map {|ary| Node.features(ary) } it "is as in [PCI,217]" do end example.should == Node.features({11 => 0.11, 21 => 0.21, 101 => 0.99 }) example = {11 => 0.11, 21 => 0.21, 101 => 0.99 }.to_example it "has a nice API" do end @parameter.c = 10 @parameter.eps = 0.001 # 0.001 in others)." (from README) # "eps is the stopping criterion (we usually use 0.00001 in nu-SVC, @parameter.cache_size = 1 # mb @parameter = SvmParameter.new @problem = Problem.new before dodescribe "Basic usage" dorequire 'spec_helper'