1. biolab
  2. Untitled project
  3. orange

Commits

Marko Toplak  committed 6d0ec9c

SVM interface does not pass 0 values to libsvm.

  • Participants
  • Parent commits 6440cdd
  • Branches default

Comments (0)

Files changed (1)

File source/orange/libsvm_interface.cpp

View file
  • Ignore whitespace
 					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++;
 			}