Kaggle competition: Don't Overfit! II
<SOS> metric: AUC Kaggle data source: dont-overfit!-ii<train_on_grid>
warnings.filterwarnings('ignore')
 train = pd.read_csv('.. /input/train.csv' , index_col = 'id')
 test = pd.read_csv('.. /input/test.csv' , index_col = 'id')
 print(os.listdir(".. /input/"))
gridParams = {
'n_estimators': [500],
'max_depth': [2,5,6,7],
'min_samples_leaf' : [30,40,50],
} 
<choose_model_class>
data = pd.read_csv(".. /input/train.csv")
 X = data.iloc[:,2:].values
y = data.iloc[:,1:2].values
ada = AdaBoostRegressor(learning_rate= 0.005, n_estimators= 50 )<find_best_params>
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=42, stratify = y )
gridParams = {
'n_estimators': [30,50,80],
'learning_rate': [0.005, 0.05,0.5,1]
} 
<choose_model_class>
clf_gini = DecisionTreeClassifier(max_depth=1, random_state = 100)
 clf_gini.fit(X, y)
 scores = cross_val_score(clf_gini, X, y, cv=5)
 scores
cat = CatBoostRegressor(iterations=3000,learning_rate=0.005,depth=2 )<train_on_grid>
clf = LogisticRegression(solver='liblinear',C= 0.1, max_iter=10000)
 clf.fit(X, y)
 scores = cross_val_score(clf, X, y, cv=5)
 scores
gridParams = {
'iterations': [3000],
'learning_rate': [0.005],
'depth' : [2,4,6]
} 
<choose_model_class>
test = pd.read_csv(".. /input/test.csv")
 test_data =test.iloc[:,1:]
<train_on_grid><EOS> 
ans= clf_gini.predict_proba(test_data.values)
 submit = pd.read_csv('.. /input/sample_submission.csv')
 submit['target'] = ans[:,1]
submit.to_csv('submit.csv', index = False )