extract classifier properties from pickled file
I have *.clf
file which I get from fit()
of sklearn
. I fit my data with SVM
or KNN
and want to show its properties when using it for predictions. For example I open earlier pickled classifier file and when I print it I get something like this:
SVC(C=1.0, cache_size=200, class_weight=None, coef0=0.0,
decision_function_shape='ovr', degree=3, gamma='scale', kernel='rbf',
max_iter=-1, probability=True, random_state=None, shrinking=True, tol=0.001,
verbose=True)
How can I get the value of, for example, gamma
to print out it somewhere else except for traversing it as string
? Because at first I have to define either it's SVM
or KNN
.
Topic pickle scikit-learn classification
Category Data Science