Пример #1
0
# (c) Michael Alderson-Bythell
# Logistic Regression classifier
from sklearn.linear_model import LogisticRegression as c
import kddcup
import classifier

classifier.analyse(c(), kddcup.load_data(), "../analysis/LOGRES")
Пример #2
0
from sklearn.feature_selection import RFE
from sklearn.linear_model import LogisticRegression
import kddcup
import classifier

rfe = RFE(LogisticRegression(), 3)
rfe = rfe.fit(kddcup.load_data().data, kddcup.load_data().target)

print(rfe.support_)
print(rfe.ranking_)
Пример #3
0
# (c) Michael Alderson-Bythell
# Decision Tree classifier
from sklearn.tree import DecisionTreeClassifier as c
import kddcup
import classifier

classifier.analyse(c(), kddcup.load_data(), "../analysis/CART")