示例#1
0
文件: LOGRES.py 项目: pkucp/kddcup99
# (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")