Find Selected Functions RandomizedLogisticRegression
1 answer
You have to use the function get_support
:
from sklearn.datasets import load_iris
from sklearn.linear_model import RandomizedLogisticRegression
iris = load_iris()
X, y = iris.data, iris.target
clf = RandomizedLogisticRegression()
clf.fit(X,y)
print clf.get_support()
#prints [False True True True]
Alternatively, you can get the support function indices:
print clf.get_support(indices=True)
#prints [1 2 3]
+4
source to share