Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from sklearn.linear_model import LogisticRegression
- from sklearn.model_selection import train_test_split
- from sklearn.metrics import classification_report
- Xtr, Xts, Ytr, Yts = train_test_split(X, Y, random_state=34)
- mlp = LogisticRegression()
- mlp.fit(Xtr, Ytr)
- print(classification_report(Yts, mlp.predict(Xts)))
- '''
- precision recall f1-score support
- fuel 0.75 0.81 0.78 26
- housing 0.75 0.75 0.75 32
- money-supply 0.84 0.88 0.86 75
- strategic-metal 0.86 0.90 0.88 48
- tea 0.90 0.82 0.86 44
- wheat 0.95 0.88 0.91 59
- accuracy 0.85 284
- macro avg 0.84 0.84 0.84 284
- weighted avg 0.86 0.85 0.85 284
- '''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement