You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 6, 2021. It is now read-only.
probabilities[row,:] = raw_predictions[row,:] / total
return probabilities
(The + signs are from my GIT diffs, please ignore).
I'm not overly familiar with ELMs but if you think the above is correct, feel free to add it up. Alternatively I would be happy to contribute code to the project.
The text was updated successfully, but these errors were encountered:
So I was able to get around this for classification problems by hacking the elm class. If you notice there is a method called decision_function for the class. If you use that natively you'll get some an array of numbers stretching from -1 to 1. So it's not usable on its own, but you can modify that and extend the class to get it to work. Here's how sklearn does it with the MLPClassifier. And here's how predict is actually implemented. And here's how you would do it with the elm
class ELMWrapper(ELMClassifier):
def predict_proba(self, x):
return self.decision_function(x)
from sklearn.preprocessing import LabelBinarizer
elm = ELMWrapper(binarizer=LabelBinarizer())
It's important to set the LabelBinarizer class up this way. Otherwise your prediction probabilities will be from -1 to 1. I imagine that if you wanted to keep the native binarizer you could scale the binarizer predictions in the predict_proba method, but I'm lazy on code and this seems to work just fine for me.
Hi
I recently needed to predict the class probabilities instead of the class labels.
So I wrote a predict_proba() method, sticking to the convention used in other scikit classifiers.
I added the following which simply take considers the exponential ratios of the decision functions,
to class GenELMClassifier to the module elm.py .
(The + signs are from my GIT diffs, please ignore).
I'm not overly familiar with ELMs but if you think the above is correct, feel free to add it up. Alternatively I would be happy to contribute code to the project.
The text was updated successfully, but these errors were encountered: