sklearn-porter icon indicating copy to clipboard operation
sklearn-porter copied to clipboard

Generating probabilities instead of categorical results

Open tejas9090 opened this issue 4 years ago • 0 comments

  1. Is there some way to generate C code which would give me floating point probabilities for every prediction category instead of a binary result? I am using the ExtraTreeModel from sklearn (code snippet shown below).

  2. My model is almost 1Gb in size, the C code generated is about the same size, which will take forever to compile, is there a way to compress this model or split up the files?

Training Code Snippet

from sklearn.ensemble import ExtraTreesClassifier
from joblib import dump, load

clf = ExtraTreesClassifier(n_estimators=250, random_state=0,verbose=True)
clf.fit(train_x, train_y)
prob_test_data = clf.predict_proba(test_x)

Thanks in advance

tejas9090 avatar Jan 29 '21 23:01 tejas9090