How to get sequential model to output probabilities with pystruct

Viewed 78

I have implemented a sequential model using Pystruct. The model I use is BinaryCLF and as a learner the StructuredPerceptron. So far, when I test the predictions of my model, I give as an input the sequential features and I get -1 or 1 as the predictions. What I would like is instead of getting -1 and 1, to get the probabilities to be 1.

The reason I want to do that is because I want to predict when an event will happen in the future, so I want to give my model data up to present and then check the probabilities to be able to tell about when the event will occur (the probability should increase as the sequence increases).

If I don't have the probabilities and have just the 1s, I can't tell if the event is about to happen in the near future (when about the -1 will appear).

So, since an SVM is used, what I'm looking for is like 'predict_proba' from the sklearn kit. Can I have something like that in pystruct?

0 Answers
Related