Skip to content

After enabling probability : true, it takes really high amount of time to get the result.  #44

@GPrathap

Description

@GPrathap

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);
            });
    });
});

`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions