Kaggle competition: Tabular Playground Series - Jan 2021
<SOS> metric: RMSE Kaggle data source: tabular-playground-series-jan-2021<categorify>
%matplotlib inline
dfk = pd.DataFrame({
'Kernel ID': ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q'],
'Score': [ 0.69864 , 0.69846 , 0.69836 , 0.69824 , 0.69813, 0.69795, 0.69752, 0.69751, 0.69749, 0.69747, 0.69735, 0.69731, 0.69703, 0.69701, 0.69691, 0.69648, 0.69579],
'File Path': ['.. /input/aa69864/AA69864.csv', '.. /input/bb69846/BB69846.csv', '.. /input/cc69836/CC69836.csv', '.. /input/a69824/A69824.csv', '.. /input/c69813/C69813.csv', '.. /input/ff69795/FF69795.csv', '.. /input/ggg69752/GGG69752.csv', '.. /input/gg69751/GG69751.csv' , '.. /input/g69749/G69749.csv', '.. /input/h69747/H69747.csv', '.. /input/i69735/I69735.csv', '.. /input/j69731/J69731.csv', '.. /input/mmm69703/MMM69703.csv', '.. /input/l69701/L69701.csv', '.. /input/ooo69691/OOO69691.csv', '.. /input/ppp69648/PPP69648.csv', '.. /input/jan21-tabular-playground-4-lb-final-blend/submission.csv']
})
 dfk
imputer = SimpleImputer(strategy = 'median')
 imputer.fit(train)
 imputer.fit(test)
 train1 = imputer.transform(train)
 test1 = imputer.transform(test)
 del train
del test
gc.collect()<normalization>
def generate(main, support, coeff):
g = main.copy()
for i in main.columns[1:]:
res = []
lm, Is = [], []
lm = main[i].tolist()
ls = support[i].tolist()
for j in range(len(main)) :
res.append(( lm[j] * coeff)+(ls[j] *(1.- coeff)))
 g[i] = res
return g
scaler = MinMaxScaler(feature_range =(0, 1))
scaler.fit(train1)
 scaler.fit(test1)
 train = scaler.transform(train1)
 test = scaler.transform(test1)
 del train1
del test1
gc.collect()<import_modules>
support = pd.read_csv(dfk.iloc[0, 2])
 for k in range(1, 11):
main = pd.read_csv(dfk.iloc[k, 2])
 support = generate(main, support, 0.60)
 sub1 = support
from keras.models import Sequential
from keras.layers import Dense<train_model>
sub8 = comparison(sub7, 8, 1.0030, 0.9980)
<predict_on_test><EOS> 
sub = sub8
sub.to_csv("submission.csv", index=False)
 sub1.to_csv("submission1.csv", index=False)
 sub2.to_csv("submission2.csv", index=False)
 sub3.to_csv("submission3.csv", index=False)
 sub4.to_csv("submission4.csv", index=False)
 sub5.to_csv("submission5.csv", index=False)
 sub6.to_csv("submission6.csv", index=False)
 sub7.to_csv("submission7.csv", index=False)
 !ls