Here is complete code for in order to reproduce the issue. ` var svm = require('node-svm'); var xor = [ [[0, 0], 0], [[0, 1], 1], [[1, 0], 1], [[1, 1], 0] ]; // // initialize a new predictor // var clf = new svm.CSVC(); var clf = new svm.SVM({ svmType: 'C_SVC', probability : true }); clf.train(xor).done(function () { // predict things xor.forEach(function(ex){ console.log(ex); var inputs = []; inputs.push(ex[0]); var prediction = clf.predictProbabilities(inputs) .then(function(probabilities) { console.log('%d XOR %d => %d', ex[0][0], ex[0][1], probabilities); }); }); }); `