Horje
classification cross validation Code Example
classification cross validation
from sklearn.model_selection import cross_val_predict
xgb=XGBClassifier(colsample_bytree=0.8, learning_rate=0.4, max_depth=4)
cvs=cross_val_score(xgb,x,y,scoring='accuracy',cv=10)
print('cross_val_scores=  ',cvs.mean())
y_pred=cross_val_predict(xgb,x,y,cv=10)
conf_mat=confusion_matrix(y_pred,y)
conf_mat




Python

Related
line plot python only years datetime index Code Example line plot python only years datetime index Code Example
append data to column in pan Code Example append data to column in pan Code Example
read a function of excel in python Code Example read a function of excel in python Code Example
python if in list multiple Code Example python if in list multiple Code Example
kill port django Code Example kill port django Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8