id
int64
0
7.95k
code_block
stringlengths
1
52.9k
too_long
stringclasses
2 values
marks
int64
1
5
graph_vertex_id
float64
1
88
graph_vertex_class
stringclasses
12 values
graph_vertex_subclass
stringclasses
70 values
kernel_id
float64
25.8k
14.7M
⌀
sqale_rating
float64
1
4
maintainability_rating
stringclasses
4 values
code_smells
int64
0
36
complexity
float64
0
15
⌀
cognitive_complexity
int64
0
33
bugs
int64
0
7
sqale_index
int64
0
125
ncloc
float64
0
101
⌀
mlscent_analysis_status
stringclasses
3 values
mlscent_smell_count
int64
0
31
mlscent_unique_smell_count
int64
0
12
mlscent_findings_json
stringlengths
2
7.76k
mlscent_ml_rating
stringclasses
5 values
mlscent_ml_rating_basis
stringclasses
52 values
mlscent_ml_findings_json
stringclasses
50 values
mlscent_ignored_findings_json
stringclasses
199 values
context_line_count
int64
0
33
combined_rating
stringclasses
5 values
2,676
# !ls\n# !unzip store.csv.zip\n# !unzip train.csv.zip\n# !unzip test.csv.zip
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
2,701
# !pip install kaggle\n# !kaggle competitions submit -c rossmann-store-sales -f submission.csv -m "submision"
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
2,702
# from google.colab import files\n# files.download('out.csv') \n# files.download('weights_rossmann.best.hdf5') \n
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
2,705
# !rsync -avz --progress ./model/model_both_a_13.pkl ../drive/Job/
No
5
76
Debug
commented
7,004,483
1
A
0
0
0
0
0
0
ok
1
1
[{"detector": "framework_specific", "framework": "General", "name": "Import Checker", "fix": "Use standard naming conventions for imported modules.", "benefits": "Improves code readability and maintainability.", "location": "Line 2"}]
A
no applicable ML-specific findings
[]
["Import Checker"]
5
A
2,820
#joined.to_pickle(PATH/'joined')\n#joined_test.to_pickle(PATH/'joined_test')
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
2,856
#df.to_pickle(PATH/'df')
No
5
76
Debug
commented
10,295,596
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
2,858
#joined = pd.read_pickle(PATH/'joined')\n#joined_test = pd.read_pickle(PATH/f'joined_test')
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
2,863
#joined.to_pickle(path/'train_clean')\n#joined_test.to_pickle(path/'test_clean')
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
2,963
result = pd.concat([test_dataset.ForecastId,output_confirmed_cases_df, output_fatalities_df], axis=1)\n# result.index.names = ['indexes']\n# result.columns.name = result.index.name\n# result.index.name = None\nresult\n
No
4
76
Debug
commented
null
1
A
0
null
0
0
0
null
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
3,107
# #Normalizing\n\n# no = 1\n\n# X["PRI_jet_all_pt"]=((X["PRI_jet_all_pt"]-X["PRI_jet_all_pt"].min())/(X["PRI_jet_all_pt"].max()-X["PRI_jet_all_pt"].min()))*no\n# X_test["PRI_jet_all_pt"]=((X_test["PRI_jet_all_pt"]-X_test["PRI_jet_all_pt"].min())/(X_test["PRI_jet_all_pt"].max()-X_test["DER_mass_MMC"].min()))*no\n\n# X["...
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
3,108
# # normalize the data attributes\n# X = X.apply(lambda x: (x - np.mean(x)) / (np.max(x) - np.min(x)))\n\n# X_test = X_test.apply(lambda x: (x - np.mean(x)) / (np.max(x) - np.min(x)))\n\n\n# X.head()
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
3,111
#X = X.replace(-999.000,np.nan)\n#X.head()
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
3,112
#X_test = X_test.replace(-999.000,np.nan)
No
5
76
Debug
commented
10,712,817
1
A
1
0
0
0
5
0
ok
1
1
[{"detector": "framework_specific", "framework": "ScikitLearn", "name": "Dependent Threshold Checker", "fix": "Use threshold-independent metrics alongside threshold-dependent ones.", "benefits": "Provides a comprehensive evaluation of model performance.", "location": ""}]
A
no applicable ML-specific findings
[]
["Dependent Threshold Checker"]
19
A
3,113
#X_test.head()
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
3,114
#X = X.replace(-999.000,0)\n#X_test = X_test.replace(-999.000,0)\n#X.head()
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
3,116
#X.fillna(X.median(), inplace=True)\n#X_test.fillna(X_test.median(), inplace=True)\n\n#X.head()
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
3,117
#X.tail(1000)
No
5
76
Debug
commented
10,712,817
1
A
0
0
0
0
0
0
ok
1
1
[{"detector": "framework_specific", "framework": "ScikitLearn", "name": "Dependent Threshold Checker", "fix": "Use threshold-independent metrics alongside threshold-dependent ones.", "benefits": "Provides a comprehensive evaluation of model performance.", "location": ""}]
A
no applicable ML-specific findings
[]
["Dependent Threshold Checker"]
19
A
3,147
# train_set = train_set.drop(['Soil_Type'+str(idx) for idx in range(1, 41)], axis=1)\n# train_set = train_set.drop(['Wilderness_Area'+str(idx) for idx in range(1, 5)], axis=1)
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
3,175
#Final submission score is 0.67,which needs to be improved.
Yes
5
76
Debug
commented
4,011,534
1
A
0
0
0
0
0
0
ok
0
0
[]
A
no applicable ML-specific findings
[]
[]
12
A
3,182
#Soil_Type7,Soil_Type15 has 0 standard deviation\n#train = train.drop(["Soil_Type7","Soil_Type15"],axis = 1)\n#test = test.drop(["Soil_Type7","Soil_Type15"],axis = 1)
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
3,193
#of the 3 algorithms applied to the dataset,ensemble model works better with a score of 0.84\n
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
3,200
#Getting feature importance after running the data through a ensemble model classifier
No
5
76
Debug
commented
4,011,534
1
A
0
0
0
0
0
0
ok
0
0
[]
A
no applicable ML-specific findings
[]
[]
12
A
3,208
#Both the models have same important features,also these important features completely ignores the soil type feature.\n#This should be included,except Soil_Type7,Soil_Type15 has lower standard deviation.\n\n
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
3,214
#Naive Bayes Model
No
5
76
Debug
commented
4,011,534
1
A
0
0
0
0
0
0
ok
0
0
[]
A
no applicable ML-specific findings
[]
[]
12
A
3,216
#SGDClassifier,very low performance
No
5
76
Debug
commented
4,011,534
1
A
0
0
0
0
0
0
ok
0
0
[]
A
no applicable ML-specific findings
[]
[]
12
A
3,247
#df_test1.head()
No
5
76
Debug
commented
7,400,630
1
A
0
0
0
0
0
0
ok
1
1
[{"detector": "framework_specific", "framework": "ScikitLearn", "name": "Dependent Threshold Checker", "fix": "Use threshold-independent metrics alongside threshold-dependent ones.", "benefits": "Provides a comprehensive evaluation of model performance.", "location": ""}]
A
no applicable ML-specific findings
[]
["Dependent Threshold Checker"]
8
A
3,297
#y_pred = classifier.predict(df_test1)
No
5
76
Debug
commented
7,400,630
1
A
1
0
0
0
5
0
ok
1
1
[{"detector": "framework_specific", "framework": "ScikitLearn", "name": "Dependent Threshold Checker", "fix": "Use threshold-independent metrics alongside threshold-dependent ones.", "benefits": "Provides a comprehensive evaluation of model performance.", "location": ""}]
A
no applicable ML-specific findings
[]
["Dependent Threshold Checker"]
8
A
3,299
#solution = pd.DataFrame({'Id':df_Test1.Id, 'Cover_Type':y_pred}, columns = ['Id','Cover_Type'])\n#solution.to_csv('SVMcover_sol.csv', index=False)
Yes
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
3,354
# gradientBoostingModel = GradientBoostingClassifier(loss = 'deviance',\n# learning_rate = 0.01,\n# n_estimators = 100,\n# max_depth = 30,\n# ...
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
3,356
# SGDClassifier = SGDClassifier(loss = 'hinge', \n# penalty = 'l1',\n# learning_rate = 'optimal',\n# random_state = 10, \n# max_iter=100)\n\n# SGDClassifier.fit(X_train,y_train)
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
3,357
# SVClassifier = SVC(kernel= 'linear',\n# degree=3,\n# max_iter=10000,\n# C=2, \n# random_state = 55)\n\n# SVClassifier.fit(X_train,y_train)
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
3,457
# Forest Cover Prediction
Yes
5
76
Debug
commented
13,246,053
1
A
0
0
0
0
0
0
ok
0
0
[]
A
no applicable ML-specific findings
[]
[]
4
A
3,513
#estimator.get_params().keys()
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
3,514
##parameters_grid = {\n## 'model_fitting__n_estimators' : [70, 100, 130],\n## 'model_fitting__max_features' : [3, 4, 5, 6],\n##}\n##\n##grid_cv = grid_search.GridSearchCV(estimator, parameters_grid, scoring = 'neg_mean_absolute_error', cv = 3)\n##grid_cv.fit(train_data, train_labels)\n##\n##print(-grid_cv.best_sc...
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
3,527
#union_data['hour_type']=0\n#union_data['hour_type'][(union_data['hour']<=1)]='1'\n#union_data['hour_type'][(union_data['hour']>=2)& (union_data['hour']<=4)]='2'\n#union_data['hour_type'][(union_data['hour']>=4)& (union_data['hour']<=6)]='3'\n#union_data['hour_type'][(union_data['hour']>=6)& (union_data['hour']<=8)]='4...
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
3,706
# It is undeniable that working days have a distinct behavior on their own. So we assume that the separation non working days vs working days is a valid one. However,\n# Looking at the non working days the conclusion is less obvious. We will assume that for seasons 3 and 4 we have a distinct pattern for non working day...
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
3,707
# Conclusion: We can observe that, for season 1, by separating the public holidays from the weekends we observe a better ratio for the public holidays, while for\n# weekends this ratio is higher for only 50% of the hours, while for season 2, the conclusion is the opposite.
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
3,829
# from sklearn.tree import DecisionTreeClassifier\n# from sklearn.tree import DecisionTreeRegressor\n\n# # model = DecisionTreeClassifier()\n\n# # random_state .\n# #model = DecisionTreeClassifier(random_state=37)\n# model = DecisionTreeRegressor(random_state=37)\n# model
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
3,848
'''\nfor idx_train, idx_test in ms.split(df_train_data):\n csv = linear_model.Ridge().fit(df_train_data.iloc[idx_train], \\\n df_train_target.iloc[idx_train])\n print('train score: {0: .3f}, test score: {1: .3f}'.format(\n csv.score(df_train_data.iloc[idx_train], df_train_...
No
5
76
Debug
commented
null
1
A
1
0
0
0
5
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
3,849
'''\nfor idx_train, idx_test in ms.split(df_train_data):\n csv = svm.SVR(kernel='rbf', C=10, gamma=0.001).fit(df_train_data.iloc[idx_train],\\\n df_train_target.iloc[idx_train])\n print('train score: {0: .3f}, test score: {1: .3f}'.format(\n csv.score(d...
No
5
76
Debug
commented
null
1
A
1
0
0
0
5
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
3,850
#df_train_data_notime = df_train_data.drop(['hour', 'dayofweek', 'month'], axis=1)
No
5
76
Debug
commented
2,874,959
1
A
1
0
0
0
5
0
ok
0
0
[]
A
no applicable ML-specific findings
[]
[]
9
A
3,852
# for idx_train,idx_test in ms.split(df_train_data):\n# csv = RandomForestRegressor(n_estimators=500).fit(df_train_data.iloc[idx_train],\\\n# df_train_target.iloc[idx_train])\n# print('train score: {0: .3f}, test score: {1: .3f}'.format(\n# csv.score(...
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
3,853
'''\nfor idx_train,idx_test in ms.split(df_train_data):\n csv = RandomForestRegressor(n_estimators=100).fit(df_train_data_notime.iloc[idx_train],\\\n df_train_target.iloc[idx_train])\n print('train score: {0: .3f}, test score: {1: .3f}'.format(\n csv.scor...
No
5
76
Debug
commented
null
1
A
1
0
0
0
5
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
3,857
# estimator2 = RandomForestRegressor(n_estimators=200, max_features=0.6, max_depth=15)\n# plot_learning_curve(estimator2, title, \n# df_train_data, df_train_target, ylim=(0.7, 1.01), cv=cv, n_jobs=4)\n# plt.show()
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
3,870
#df_sample['count'] = df_sample['count'].apply(lambda x: int(x + 0.5))
No
5
76
Debug
commented
2,874,959
1
A
1
0
0
0
5
0
ok
0
0
[]
A
no applicable ML-specific findings
[]
[]
9
A
3,996
####
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
4,017
# sns.factorplot(x="month",y="count",data=train_set,kind=\
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
4,020
# train_set['high_time'] = np.zeros_like(train_set['time'])\n# train_set['high_time'].loc[(((train_set['time'] > 6) & (train_set['time'] < 15)) | (train_set['time'] == 20))] = 1\n# train_set['high_time'].loc[((train_set['time'] == 8) | (train_set['time'] == 16) | (train_set['time'] == 19))] = 2\n# train_set['high_time'...
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
4,035
# def RMSLE(y_hat, data):\n# y_true = data.get_label()\n# y_hat = np.round(y_hat)\n# y_hat[y_hat<0]=0\n# return 'rmlse', np.sqrt(mean_squared_log_error(y_true, y_hat)), True
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
4,036
# d_train = lgb.Dataset(X, label=y)\n# params = {'objective': 'regression', 'metric': 'rmsle', 'random_state': 501, 'verbose': 0, 'reg_alpha ': 0.1, 'reg_lambda': 0.1}
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
4,037
# lgb_cv = lgb.cv(\n# params, \n# d_train,\n# metrics = 'rmsle',\n# feval= RMSLE,\n# nfold=5,\n# verbose_eval = 5)
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
4,038
# lgb_model = lgb.train(\n# params, \n# d_train,\n# feval= RMSLE,\n# verbose_eval = 5)
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
4,039
# d_importance = pd.DataFrame(columns=['features'], data=X.columns)\n# d_importance['gain_importance'] = lgb_model.feature_importance(importance_type='gain')\n# d_importance['split_importance'] = lgb_model.feature_importance(importance_type='split')\n# d_importance.sort_values(by='gain_importance',ascending=False).head...
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
4,040
# xgb_model = XGBRegressor(colsample_bytree=0.7, learning_rate=0.05, max_depth=7, min_child_weight=4, subsample=0.7, random_state=42)\n# xgb_model.fit(X, y)
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
4,041
# def rmsle(y_true, y_hat):\n# y_hat = np.round(y_hat)\n# y_hat[y_hat<0]=0\n# return np.sqrt(mean_squared_log_error(y_true, y_hat))\n\n# rmsle_score = make_scorer(rmsle, greater_is_better=False)
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
4,042
# scores = cross_val_score(xgb_model, X, y, cv=5, scoring=rmsle_score)\n# print("scores ", np.abs(scores))
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
4,043
# d_importance = pd.DataFrame(columns=['features'], data=X.columns)\n# d_importance['importance'] = xgb_model.feature_importances_\n# d_importance.sort_values(by='importance',ascending=False).head(20)
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
4,069
#grid_params = {'max_depth' : [12,14,16]}\n#grid_xgb = GridSearchCV(xgb_clf, grid_params, cv= 5)\n#grid_xgb.fit(x_train, y_train)\n#print(grid_xgb.best_score_)\n#grid_xgb.cv_results_\n#grid_xgb.score(x_test, y_test)
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
4,092
#!rm submission.csv
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
4,133
# features_cyc = ['hour', 'weekday']\n# for feature in features_cyc:\n# train_data[feature+'_sin'] = np.sin((2*np.pi*train_data[feature])/max(train_data[feature]))\n# train_data[feature+'_cos'] = np.cos((2*np.pi*train_data[feature])/max(train_data[feature]))\n# test_data[feature+'_sin'] = np.sin((2*np.pi*te...
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
4,224
# TIP) .\n# time = train['datetime'].str.slice(11,13).astype(int)\n# time.head()\n
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
4,225
# validate dataset 7:3\n#from sklearn.model_selection import train_test_split\n#train_x, validate_x, train_y, validate_y = train_test_split(train, y, test_size = 0.3,\n #random_state = 777)
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
4,227
# . , .\n#from sklearn.ensemble import RandomForestRegressor\n# , . n_estimator .\n# cpu 1 . n_jobs=4 -1 CPU \n# random_state set.seed() \n#rf = RandomForestRegressor(n_estimators=100, n_jobs=-1,random_state=999)\n#rf.fit(train, y)
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
4,228
#result = rf.predict(test)\n
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
4,229
#from lightgbm import LGBMRegressor\n# boosting hyper parameter (, )\n#lgbm = LGBMRegressor()\n#lgbm.fit(train, y)\n
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
4,230
#preds = lgbm.predict(test)
No
5
76
Debug
commented
5,893,705
1
A
1
0
0
0
5
0
ok
0
0
[]
A
no applicable ML-specific findings
[]
[]
2
A
4,282
# 0 .\n# , .\n# train.loc[train["windspeed"] == 0, "windspeed"] = train["windspeed"].mean()\n# test.loc[train["windspeed"] == 0, "windspeed"] = train["windspeed"].mean()
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
4,332
# realizando as tranformaes nos dados
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
4,403
'''\nfrom sklearn.ensemble import RandomForestRegressor\nrf=RandomForestRegressor(n_estimators=100,random_state=0)\nrf.fit(X,Y)\nimp_list=rf.feature_importances_\nfeats = {} # a dict to hold feature_name: feature_importance\nfor feature, importance in zip(final_df.columns, rf.feature_importances_):\n feats[feature] ...
No
5
76
Debug
commented
null
1
A
1
0
0
0
5
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
4,414
#month => train count test count . , \n# . train \n# test . 20~31 .
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
4,529
160/3251
No
3
76
Debug
commented
8,477,639
1
A
0
0
0
1
0
1
ok
0
0
[]
A
no applicable ML-specific findings
[]
[]
3
A
5,101
# scores.mean(), scores
No
5
76
Debug
commented
1,086,159
1
A
0
0
0
0
0
0
ok
0
0
[]
A
no applicable ML-specific findings
[]
[]
9
A
5,102
# from sklearn.cross_validation import cross_val_predict\n# y_pred = cross_val_predict(LogisticRegression(), X, Y, cv=10, n_jobs=-1, verbose=1)\n# log_loss(Y, y_pred)
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
5,103
# from sklearn.model_selection import StratifiedKFold\n# kf = StratifiedKFold(n_splits=10, random_state=0)\n# pred = np.zeros((Y.shape[0], Y.nunique()))\n# for train_index, test_index in kf.split(X, Y):\n# X_train, X_test = X.iloc[train_index], X.iloc[test_index]\n# y_train, y_test = Y.iloc[train_index], Y.iloc...
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
5,106
# from sklearn.ensemble import RandomForestClassifier\n# scores = cross_val_score(RandomForestClassifier(n_estimators=100), X, Y, scoring='neg_log_loss',cv=10, verbose=1)
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
5,107
# scoresmean(), scores.
No
5
76
Debug
commented
1,086,159
1
A
0
0
0
0
0
0
ok
0
0
[]
A
no applicable ML-specific findings
[]
[]
9
A
5,131
#del train,valid,testdata\n#gc.collect()
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
5,205
#clf = LogisticRegression(C=0.02)\n#clf.fit(Xtrain, y)\n#clf.predict_proba(Xtrain[70000:], y[70000:])\n#log_loss(yte, pred[itest, :])
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
5,206
#pred = clf.predict_proba(Xtrain[70000:])\n#log_loss(y[70000:], pred)
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
5,207
#pred = pd.DataFrame(clf.predict_proba(Xtest), index=ga_test.index, columns=target_encoder.classes_)\n#pred.head()\n#pred.to_csv('logreg_subm.csv',index=True)
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
5,217
##train_users[train_users['id'] == 'bibf93h56j']\n##train_users['date_first_booking'].isnull()
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
5,233
##train_users.head()\n##train_users[train_users['first_browser_grouped'] == 'Mobile']\n\n#### language doesn't appear that helpful.. anyway we can adjust it some?\n\n#train_users.head()
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
5,234
\n#test = [0]\n#train_users[\
No
5
76
Debug
commented
null
1
A
0
null
0
0
0
null
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
5,235
#fig, (axis1, axis2) = plt.subplots(2,1,figsize=(15,10))\n#sns.countplot(x=\
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
5,236
\n\n#fig, (axis1) = plt.subplots(1,1,figsize=(15,5))\n#sns.countplot(x=\
No
5
76
Debug
commented
null
1
A
0
null
0
0
0
null
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
5,237
##### is it worthwhile to group up some of these X vars w/ a lot of subclasses? \n
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
5,259
# from sklearn.model_selection import cross_val_score\n# from sklearn.ensemble import GradientBoostingClassifier\n\n# np.random.seed(42)\n# samples = np.random.choice(piv_train, 10000)\n# X_train = vals[samples]\n# y_train = le.fit_transform(labels)[samples]\n# model = GradientBoostingClassifier()\n# cross_val_score(mo...
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
5,313
# Too Much Unknown Data In Columns : Gender & First Browser , will need to fix that later\n# Now Let's Focus on the Dates Data
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
5,335
#Building the Classfication Model
No
5
76
Debug
commented
5,936,225
1
A
0
0
0
0
0
0
ok
0
0
[]
A
no applicable ML-specific findings
[]
[]
6
A
5,340
# Using Submession System To Evaluate The Model
No
5
76
Debug
commented
5,936,225
1
A
0
0
0
0
0
0
ok
0
0
[]
A
no applicable ML-specific findings
[]
[]
6
A
5,453
# #trust your CV!\n# best_parameters,score = max(clf.scorer_, key=lambda x: x[1])\n# print(\
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
5,457
# fig, ax = plt.subplots(5, 2, figsize=(10, 50))\n# for i in range(5):\n# ax[i, 0].imshow(X_train_zero[i])\n# ax[i, 1].imshow(Y_train_zero[i])\n# print(np.unique(Y_train_zero[i]))
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
5,458
# fig, ax = plt.subplots(5, 2, figsize=(10, 50))\n# for i in range():\n# ax[i, 0].imshow(X_train_one[i], 'gray')\n# Y_train_one = np.array(Y_train_one, dtype='bool')\n# # Y_train_one[i][Y_train_one]=1\n# ax[i, 1].imshow(Y_train_one[i], 'gray')\n# print(np.unique(Y_train_one[i]))
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
5,461
# for img, mask in zip(X_train_zero, Y_train_zero):\n# X_train.append(img)\n# Y_train.append(mask)
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
5,463
# X_train_all = np.concatenate((X_train, X_train_zero[:1000]), axis=0)\n# Y_train_all = np.concatenate((Y_train, Y_train_zero[:1000]), axis=0)
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
5,466
# model = Unet('densenet121',encorder_weights='imagenet',freeze_encorder=True)
No
5
76
Debug
commented
5,060,014
1
A
1
0
0
0
5
0
ok
0
0
[]
A
no applicable ML-specific findings
[]
[]
3
A
5,467
# N = 1\n\n# base_model = Unet(backbone_name='resnet34', encoder_weights='imagenet')\n\n# inp = Input(shape=(None, None, N))\n# l1 = Conv2D(3, (1, 1))(inp) # map N channels data to 3 channels\n# out = base_model(l1)\n\n# model = Model(inp, out, name=base_model.name)\n# model.compile(optimizer=Adam(lr = 1e-5), loss=dice...
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
5,505
#embedding_dim = len(tokenizer.word_index)+1
No
5
76
Debug
commented
2,898,064
1
A
1
0
0
0
5
0
ok
0
0
[]
A
no applicable ML-specific findings
[]
[]
2
A
5,562
#my_submissionxgb = pd.DataFrame({'id': test.id, 'country':resultsxgb})\n#my_submissionxgb.to_csv('submissionxgb.csv', index=False)
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null
5,572
# vocab = vectorizer.get_feature_names()\n# dist = np.sum(train_data_features, axis=0)\n# for tag, count in zip(vocab, dist):\n# print (count, tag)
No
5
76
Debug
commented
null
1
A
0
0
0
0
0
0
no_ml_import
0
0
[]
null
no_ml_import
[]
[]
0
null