Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVM.PredictProbability crashes #18

Open
trenki2 opened this issue Jan 30, 2017 · 0 comments
Open

SVM.PredictProbability crashes #18

trenki2 opened this issue Jan 30, 2017 · 0 comments

Comments

@trenki2
Copy link

trenki2 commented Jan 30, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant