watex.models.naive_evaluation#
- watex.models.naive_evaluation(clf, X, y, cv=7, scoring='accuracy', display='off', **kws)[source]#
Quick scores evaluation using cross validation.
- Parameters
clf (callable) – Classifer for testing default data.
X (ndarray) – trainset data
y (array_like) – label data
cv (int) – KFold for data validation.
scoring (str) – type of error visualization.
display (str or bool,) – show the show on the stdout
kws (dict,) – Additional keywords arguments passed to
watex.exlib.slearn.cross_val_score().
- Returns
scores, mean_core – scaore after evaluation and mean of the score
- Return type
array_like, float
Examples
>>> import watex as wx >>> from watex.models.validation import naive_evaluation >>> X, y = wx.fetch_data ('bagoue data prepared') >>> clf = wx.sklearn.DecisionTreeClassifier() >>> naive_evaluation(clf, X, y , cv =4 , display ='on' ) clf=: DecisionTreeClassifier scores=: [0.6279 0.7674 0.7093 0.593 ] scores.mean=: 0.6744186046511629 Out[57]: (array([0.6279, 0.7674, 0.7093, 0.593 ]), 0.6744186046511629)