Skip to content

SVM.PredictProbability crashes #18

@trenki2

Description

@trenki2

I wanted to use SVM.PredictProbability but unfortunately the method crashes:

This can reproduce the issue:

SVMProblem trainingSet = SVMProblemHelper.Load(@"problem.txt");

SVMParameter parameter = new SVMParameter();
parameter.Type = SVMType.C_SVC;
parameter.Kernel = SVMKernelType.RBF;
parameter.C = 1;
parameter.Gamma = 0.5;

SVMModel model = trainingSet.Train(parameter);

for (int i = 0; i < trainingSet.Length; i++)
{
	double[] estimations;
	var prob = SVM.PredictProbability(model, trainingSet.X[i], out estimations);
}

problem.txt

OK, it does not crash, when I set parameter.Probability = true but then I always get -1 for the probabilits.

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