spec/model_spec.rb in rb-libsvm-1.2.0 vs spec/model_spec.rb in rb-libsvm-1.3.0

- old
+ new

@@ -96,23 +96,23 @@ it "can be asked for its svm_type" do expect(@model.svm_type).to eq SvmType::C_SVC end it "can be asked for its number of classes (aka. labels)" do - expect(@model.classes).to eq(2) + expect(@model.classes_count).to eq(2) end end describe "predict" do it "returns floats" do expect(@model.predict(create_example)).to be_an_instance_of(Float) end end - describe "support_vectors" do + describe "support_vectors_count" do it "returns count" do - expect(@model.support_vectors).to eq(3) + expect(@model.support_vectors_count).to eq(3) end end describe "predict_probability" do let(:result) { @model.predict_probability(create_example) } @@ -122,10 +122,10 @@ it "produces prediction" do expect(prediction).not_to be_nil end it "produces probabilities for each class" do - expect(probabilities.length).to eq(@model.classes) + expect(probabilities.length).to eq(@model.classes_count) end it "can predict probability" do probabilities.each do |p| expect(p).to be_an_instance_of(Float)