Kaggle competition: Don't Overfit! II
submission.to_csv('Submission.csv' )<set_options>
train = pd.read_csv(".. /input/train.csv" ).drop('id', axis=1)
 y_train = train['target']
X_train = train.drop('target', axis=1)
 test = pd.read_csv('.. /input/test.csv')
 X_test = test.drop('id', axis = 1 )
%matplotlib inline 
<load_from_csv>
def winsor_func(s):
return mstats.winsorize(s, limits=[0.00, 0.01])
 def using_mstats(df):
return df.apply(winsor_func, axis=0)
 X_train_winsor=X_train.apply(winsor_func)
 X_test_winsor=X_test.apply(winsor_func )
train=pd.read_csv('.. /input/forest-cover-type-prediction/train.csv')
 test=pd.read_csv('.. /input/forest-cover-type-prediction/test.csv' )<feature_engineering>
clf = LogisticRegression(class_weight='balanced', penalty='l1', C=0.1, solver='liblinear' ).fit(X_train_winsor, y_train )
<feature_engineering><EOS> 
y_out=clf.predict_proba(X_test)[:,1]
submission = pd.read_csv('.. /input/sample_submission.csv')
 submission['target'] = y_out
submission.to_csv('submission_winsor.csv', index=False )