Commits

Marko Toplak committed 6d0ec9c

SVM interface does not pass 0 values to libsvm.

Comments (0)

Files changed (1)

source/orange/libsvm_interface.cpp

 					node->value=int(*i);
 				node->index=index++;
 				if(node->value==numeric_limits<float>::signaling_NaN() ||
-					node->value==numeric_limits<int>::max())
+					node->value==numeric_limits<int>::max() || 
+                    node->value == 0)
 					node--;
 				node++;
 			}
 					node->value=int(*i);
 				node->index=index;
 				if(node->value==numeric_limits<float>::signaling_NaN() ||
-					node->value==numeric_limits<int>::max())
+					node->value==numeric_limits<int>::max() ||
+                    node->value == 0)
 					node--;
 				node++;
 			}