Kaggle competition: House Prices - Advanced Regression Techniques
<categorify>
plt.style.use('fivethirtyeight')
def rle_encoding(x):

 dots = np.where(x.T.flatten() ==1)[0]
run_lengths = []
prev = -2
for b in dots:
if(b>prev+1): run_lengths.extend(( b+1, 0))
run_lengths[-1] += 1
prev = b
return run_lengths<import_modules>
sample = pd.read_csv("/kaggle/input/house-prices-advanced-regression-techniques/sample_submission.csv")
 df_train = pd.read_csv("/kaggle/input/house-prices-advanced-regression-techniques/train.csv")
 df_test = pd.read_csv("/kaggle/input/house-prices-advanced-regression-techniques/test.csv" )
import sys
import numpy as np
import keras
from keras.utils import Sequence
from PIL import Image
from matplotlib import pyplot as plt
import pandas as pd
from tqdm import tqdm
import os
import imgaug as ia
from imgaug import augmenters as iaa
import cv2<define_variables>
df_train["log_SalePrice"] = np.log10(df_train["SalePrice"] )
BATCH_SIZE = 32
SEED = 777
SHAPE =(512, 512, 4)
 DIR = '.. /input'
VAL_RATIO = 0.1
THRESHOLD = 0.5
ia.seed(SEED )<load_from_csv>
dtype = pd.DataFrame({"columns":df_train.dtypes.index,
"dtype":df_train.dtypes})
 dtype["dtype"] = [str(i)for i in dtype["dtype"]]
num_columns = dtype.query('dtype=="int64" | dtype=="float64"')["columns"].values[1:-2]
obj_columns = dtype.query('dtype=="object"')["columns"].values
print("numerical_values_count:{}".format(len(num_columns)))
 print("object_values_count:{}".format(len(obj_columns)) )
def getTrainDataset() :
path_to_train = DIR + '/train/'
data = pd.read_csv(DIR + '/train.csv')
 paths = []
labels = []
for name, lbl in zip(data['Id'], data['Target'].str.split(' ')) :
y = np.zeros(28)
 for key in lbl:
y[int(key)] = 1
paths.append(os.path.join(path_to_train, name))
labels.append(y)
 return np.array(paths), np.array(labels)
 def getTestDataset() :
path_to_test = DIR + '/test/'
data = pd.read_csv(DIR + '/sample_submission.csv')
 paths = []
labels = []
for name in data['Id']:
y = np.ones(28)
 paths.append(os.path.join(path_to_test, name))
labels.append(y)
 return np.array(paths), np.array(labels)
<define_variables>
y = df_train["log_SalePrice"]
df_num_train = df_train[num_columns]
df_num_test = df_test[num_columns]
df_cate_train = df_train[obj_columns]
df_cate_test = df_test[obj_columns]
class ProteinDataGenerator(keras.utils.Sequence):
def __init__(self, paths, labels, batch_size, shape, shuffle = False, use_cache = False, augment = False):
self.paths, self.labels = paths, labels
self.batch_size = batch_size
self.shape = shape
self.shuffle = shuffle
self.use_cache = use_cache
self.augment = augment
if use_cache == True:
self.cache = np.zeros(( paths.shape[0], shape[0], shape[1], shape[2]), dtype=np.float16)
 self.is_cached = np.zeros(( paths.shape[0]))
self.on_epoch_end()
def __len__(self):
return int(np.ceil(len(self.paths)/ float(self.batch_size)))
 def __getitem__(self, idx):
indexes = self.indexes[idx * self.batch_size :(idx+1)* self.batch_size]
paths = self.paths[indexes]
X = np.zeros(( paths.shape[0], self.shape[0], self.shape[1], self.shape[2]))
if self.use_cache == True:
X = self.cache[indexes]
for i, path in enumerate(paths[np.where(self.is_cached[indexes] == 0)]):
image = self.__load_image(path)
 self.is_cached[indexes[i]] = 1
self.cache[indexes[i]] = image
X[i] = image
else:
for i, path in enumerate(paths):
X[i] = self.__load_image(path)
 y = self.labels[indexes]
if self.augment == True:
seq = iaa.Sequential([
iaa.OneOf([
iaa.Fliplr(0.5),
iaa.Crop(percent=(0, 0.1)) ,
iaa.Sometimes(0.5,
iaa.GaussianBlur(sigma=(0, 0.5)) 
),
iaa.ContrastNormalization(( 0.75, 1.5)) ,
iaa.AdditiveGaussianNoise(loc=0, scale=(0.0, 0.05*255), per_channel=0.5),
iaa.Multiply(( 0.8, 1.2), per_channel=0.2),
iaa.Affine(
 scale={"x":(0.8, 1.2), "y":(0.8, 1.2)},
translate_percent={"x":(-0.2, 0.2), "y":(-0.2, 0.2)},
rotate=(-180, 180),
shear=(-8, 8)
)
 ])], random_order=True)
 X = np.concatenate(( X, seq.augment_images(X), seq.augment_images(X), seq.augment_images(X)) , 0)
 y = np.concatenate(( y, y, y, y), 0)
 return X, y
def on_epoch_end(self):
self.indexes = np.arange(len(self.paths))
if self.shuffle == True:
np.random.shuffle(self.indexes)
 def __iter__(self):

 for item in(self[i] for i in range(len(self))):
yield item
def __load_image(self, path):
R = Image.open(path + '_red.png')
 G = Image.open(path + '_green.png')
 B = Image.open(path + '_blue.png')
 Y = Image.open(path + '_yellow.png')
 im = np.stack((
np.array(R),
np.array(G),
np.array(B),
np.array(Y)) , -1)
 im = cv2.resize(im,(SHAPE[0], SHAPE[1]))
im = np.divide(im, 255)
 return im<set_options>
columns = df_num_train.columns
for i in range(len(columns)) :
median = df_train[columns[i]].median()
df_train[columns[i]].fillna(median, inplace=True)
 df_test[columns[i]].fillna(median, inplace=True)
 df_num_train = df_train[num_columns]
df_num_test = df_test[num_columns]
set_random_seed(SEED )<compute_test_metric>
df_num_train["LotArea"] = np.log10(df_num_train["LotArea"]+1)
 df_num_train["1stFlrSF"] = np.log10(df_num_train["1stFlrSF"]+1)
 df_num_train["GrLivArea"] = np.log10(df_num_train["GrLivArea"]+1)
 df_num_test["LotArea"] = np.log10(df_num_test["LotArea"]+1)
 df_num_test["1stFlrSF"] = np.log10(df_num_test["1stFlrSF"]+1)
 df_num_test["GrLivArea"] = np.log10(df_num_test["GrLivArea"]+1 )
def f1(y_true, y_pred):
tp = K.sum(K.cast(y_true*y_pred, 'float'), axis=0)
 tn = K.sum(K.cast(( 1-y_true)*(1-y_pred), 'float'), axis=0)
 fp = K.sum(K.cast(( 1-y_true)*y_pred, 'float'), axis=0)
 fn = K.sum(K.cast(y_true*(1-y_pred), 'float'), axis=0)
 p = tp /(tp + fp + K.epsilon())
 r = tp /(tp + fn + K.epsilon())
 f1 = 2*p*r /(p+r+K.epsilon())
 f1 = tf.where(tf.is_nan(f1), tf.zeros_like(f1), f1)
 return K.mean(f1)
 def f1_loss(y_true, y_pred):
tp = K.sum(K.cast(y_true*y_pred, 'float'), axis=0)
 tn = K.sum(K.cast(( 1-y_true)*(1-y_pred), 'float'), axis=0)
 fp = K.sum(K.cast(( 1-y_true)*y_pred, 'float'), axis=0)
 fn = K.sum(K.cast(y_true*(1-y_pred), 'float'), axis=0)
 p = tp /(tp + fp + K.epsilon())
 r = tp /(tp + fn + K.epsilon())
 f1 = 2*p*r /(p+r+K.epsilon())
 f1 = tf.where(tf.is_nan(f1), tf.zeros_like(f1), f1)
 return 1-K.mean(f1 )<define_search_model>
df_cate = pd.concat([df_cate_train,df_cate_test] )
def create_model(input_shape):
dropRate = 0.25
init = Input(input_shape)
 x = BatchNormalization(axis=-1 )(init)
 x = Conv2D(32,(3, 3))(x)
 x = ReLU()(x)
 x = BatchNormalization(axis=-1 )(x)
 x = MaxPooling2D(pool_size=(2, 2))(x)
 ginp1 = Dropout(dropRate )(x)
 x = BatchNormalization(axis=-1 )(ginp1)
 x = Conv2D(64,(3, 3), strides=(2,2))(x)
 x = ReLU()(x)
 x = BatchNormalization(axis=-1 )(x)
 x = Conv2D(64,(3, 3))(x)
 x = ReLU()(x)
 x = BatchNormalization(axis=-1 )(x)
 x = Conv2D(64,(3, 3))(x)
 x = ReLU()(x)
 x = BatchNormalization(axis=-1 )(x)
 x = MaxPooling2D(pool_size=(2, 2))(x)
 ginp2 = Dropout(dropRate )(x)
 x = BatchNormalization(axis=-1 )(ginp2)
 x = Conv2D(128,(3, 3))(x)
 x = ReLU()(x)
 x = BatchNormalization(axis=-1 )(x)
 x = Conv2D(128,(3, 3))(x)
 x = ReLU()(x)
 x = BatchNormalization(axis=-1 )(x)
 x = Conv2D(128,(3, 3))(x)
 x = ReLU()(x)
 ginp3 = Dropout(dropRate )(x)
 gap1 = GlobalAveragePooling2D()(ginp1)
 gap2 = GlobalAveragePooling2D()(ginp2)
 gap3 = GlobalAveragePooling2D()(ginp3)
 x = Concatenate()([gap1, gap2, gap3])
 x = BatchNormalization(axis=-1 )(x)
 x = Dense(256, activation='relu' )(x)
 x = Dropout(dropRate )(x)
 x = BatchNormalization(axis=-1 )(x)
 x = Dense(256, activation='relu' )(x)
 x = Dropout(0.1 )(x)
 x = Dense(28 )(x)
 x = Activation('sigmoid' )(x)
 model = Model(init, x)
 return model<choose_model_class>
df_cate.fillna("Nan", inplace=True )
model = create_model(SHAPE)
 model.compile(
 loss='binary_crossentropy',
optimizer=Adam(1e-03),
metrics=['acc',f1])
 model.summary()<define_variables>
col_list = df_cate.columns
df_cate_oh = pd.DataFrame({})
 for i in col_list:
df_oh = pd.get_dummies(df_cate[i])
 df_oh.columns = df_oh.columns+str("-"+i)
 df_cate_oh = pd.concat([df_cate_oh, df_oh], axis=1)
 df_cate_oh
paths, labels = getTrainDataset()
keys = np.arange(paths.shape[0], dtype=np.int)
 np.random.seed(SEED)
 np.random.shuffle(keys)
 lastTrainIndex = int(( 1-VAL_RATIO)* paths.shape[0])
 pathsTrain = paths[0:lastTrainIndex]
labelsTrain = labels[0:lastTrainIndex]
pathsVal = paths[lastTrainIndex:]
labelsVal = labels[lastTrainIndex:]
print(paths.shape, labels.shape)
 print(pathsTrain.shape, labelsTrain.shape, pathsVal.shape, labelsVal.shape)
 tg = ProteinDataGenerator(pathsTrain, labelsTrain, BATCH_SIZE, SHAPE, use_cache=False, augment = False, shuffle = False)
 vg = ProteinDataGenerator(pathsVal, labelsVal, BATCH_SIZE, SHAPE, use_cache=False, shuffle = False)
 checkpoint = ModelCheckpoint('./base.model', monitor='val_loss', verbose=1, save_best_only=True, save_weights_only=False, mode='min', period=1)
 reduceLROnPlato = ReduceLROnPlateau(monitor='val_loss', factor=0.5, patience=3, verbose=1, mode='min' )<train_model>
df_cate_oh_train = df_cate_oh.head(len(df_cate_train))
df_cate_oh_test = df_cate_oh.tail(len(df_cate_test))
epochs = 20
use_multiprocessing = False
workers = 1
hist = model.fit_generator(
 tg,
steps_per_epoch=len(tg),
validation_data=vg,
validation_steps=8,
epochs=epochs,
use_multiprocessing=use_multiprocessing,
workers=workers,
verbose=1,
callbacks=[checkpoint] )<train_model>
sc = StandardScaler()
sc.fit(df_num_train)
 df_num_train = sc.fit_transform(df_num_train)
 df_num_train = pd.DataFrame(df_num_train, columns=columns)
 df_num_test = sc.fit_transform(df_num_test)
 df_num_test = pd.DataFrame(df_num_test, columns=columns )
for layer in model.layers:
layer.trainable = False
model.layers[-1].trainable = True
model.layers[-2].trainable = True
model.layers[-3].trainable = True
model.layers[-4].trainable = True
model.layers[-5].trainable = True
model.layers[-6].trainable = True
model.layers[-7].trainable = True
model.compile(loss=f1_loss,
optimizer=Adam(lr=1e-4),
metrics=['accuracy', f1])
 model.fit_generator(
 tg,
steps_per_epoch=len(tg),
validation_data=vg,
validation_steps=8,
epochs=1,
use_multiprocessing=use_multiprocessing,
workers=workers,
verbose=1,
max_queue_size=4
)<load_pretrained>
X_data = pd.concat([df_num_train, df_cate_oh_train], axis=1)
 X_test = pd.concat([df_num_test, df_cate_oh_test], axis=1 )
bestModel = load_model('./base.model', custom_objects={'f1': f1})
<define_variables>
X_train, X_val, y_train, y_val = train_test_split(X_data, y_class, test_size=0.2, random_state=10 )
fullValGen = vg<predict_on_test>
forest = RandomForestClassifier(n_estimators=10, random_state=10)
 param_range = [10, 15, 20]
leaf = [60, 70, 80]
criterion = ["entropy", "gini", "error"]
param_grid = [{"n_estimators":param_range, "max_depth":param_range, "criterion":criterion, "max_leaf_nodes":leaf}]
gs = GridSearchCV(estimator=forest, param_grid=param_grid, scoring="accuracy", cv=10, n_jobs=1)
 gs = gs.fit(X_train, y_train)
 print(gs.best_score_)
 print(gs.best_params_ )
def getOptimalT(mdl, fullValGen):
lastFullValPred = np.empty(( 0, 28))
lastFullValLabels = np.empty(( 0, 28))
for i in tqdm(range(len(fullValGen))):
im, lbl = fullValGen[i]
scores = mdl.predict(im)
 lastFullValPred = np.append(lastFullValPred, scores, axis=0)
 lastFullValLabels = np.append(lastFullValLabels, lbl, axis=0)
 print(lastFullValPred.shape, lastFullValLabels.shape)
 rng = np.arange(0, 1, 0.001)
 f1s = np.zeros(( rng.shape[0], 28))
for j,t in enumerate(tqdm(rng)) :
for i in range(28):
p = np.array(lastFullValPred[:,i]>t, dtype=np.int8)
 scoref1 = off1(lastFullValLabels[:,i], p, average='binary')
 f1s[j,i] = scoref1
print(np.max(f1s, axis=0))
print(np.mean(np.max(f1s, axis=0)))
 plt.plot(rng, f1s)
 T = np.empty(28)
 for i in range(28):
T[i] = rng[np.where(f1s[:,i] == np.max(f1s[:,i])) [0][0]]
print(T)
 return T, np.mean(np.max(f1s, axis=0))<choose_model_class>
forest = RandomForestClassifier(n_estimators=15, random_state=10,
criterion='gini', max_depth=10,
max_leaf_nodes=70)
 forest.fit(X_train, y_train)
 importance = forest.feature_importances_
indices = np.argsort(importance)[::-1]
for f in range(X_train.shape[1]):
print("%2d)%-*s %f" %(f+1, 30, X_data.columns[indices[f]], importance[indices[f]]))
fullValGen = ProteinDataGenerator(paths[lastTrainIndex:], labels[lastTrainIndex:], BATCH_SIZE, SHAPE)
 print('Last model after fine-tuning')
 T1, ff1 = getOptimalT(model, fullValGen )<compute_test_metric>
X = X_data[important_columns]
y = y
X_test = X_test[important_columns]
print('Best save model')
 T2, ff2 = getOptimalT(bestModel, fullValGen )<choose_model_class>
X_train, X_val, y_train, y_val = train_test_split(X, y, test_size=0.2, random_state=10 )
if ff1 > ff2:
T = T1
bestModel = model
else:
T = T2
bestModel = bestModel<load_from_csv>
tsne = TSNE(n_components=2, random_state=10)
 tsne.fit(X_train)
 tsne_X_train = tsne.fit_transform(X_train)
 tsne_X_val = tsne.fit_transform(X_val )
pathsTest, labelsTest = getTestDataset()
testg = ProteinDataGenerator(pathsTest, labelsTest, BATCH_SIZE, SHAPE)
 submit = pd.read_csv(DIR + '/sample_submission.csv')
 P = np.zeros(( pathsTest.shape[0], 28))
for i in tqdm(range(len(testg))):
images, labels = testg[i]
score = bestModel.predict(images)
 P[i*BATCH_SIZE:i*BATCH_SIZE+score.shape[0]] = score<prepare_x_and_y>
forest = RandomForestRegressor(n_estimators=100, random_state=10)
 params = {"max_depth":[20,21,22,23], "n_estimators":[39, 41, 43, 45]}
cv_f = GridSearchCV(forest, params, cv = 10, n_jobs =10)
 cv_f.fit(X_train, y_train)
 print("Best params:{}".format(cv_f.best_params_))
best_f = cv_f.best_estimator_
y_train_pred_f = best_f.predict(X_train)
 y_val_pred_f = best_f.predict(X_val)
 print("MSE train:{}".format(mean_squared_error(y_train, y_train_pred_f)))
 print("MSE test;{}".format(mean_squared_error(y_val, y_val_pred_f)))
 print("R2 score train:{}".format(r2_score(y_train, y_train_pred_f)))
 print("R2 score test:{}".format(r2_score(y_val, y_val_pred_f)) )
PP = np.array(P )<save_to_csv>
xgbr = xgb.XGBRegressor()
params = {'learning_rate': [0.05, 0.1, 0.15], 'max_depth': [3, 5, 7],
'subsample': [0.85, 0.9, 0.95, 1], 'colsample_bytree': [0.3, 0.5, 0.8]}
cv_x = GridSearchCV(xgbr, params, cv = 10, n_jobs =1)
 cv_x.fit(X_train, y_train)
 print("Best params:{}".format(cv_x.best_params_))
best_x = cv_x.best_estimator_
y_train_pred_x = best_x.predict(X_train)
 y_val_pred_x = best_x.predict(X_val)
 y_train_pred_x = cv_x.predict(X_train)
 y_val_pred_x = cv_x.predict(X_val)
 print("MSE train:{}".format(mean_squared_error(y_train, y_train_pred_x)))
 print("MSE val;{}".format(mean_squared_error(y_val, y_val_pred_x)))
 print("R2 score train:{}".format(r2_score(y_train, y_train_pred_x)))
 print("R2 score val:{}".format(r2_score(y_val, y_val_pred_x)) )
prediction = []
for row in tqdm(range(submit.shape[0])) :
str_label = ''
for col in range(PP.shape[1]):
if(PP[row, col] < T[col]):
str_label += ''
else:
str_label += str(col)+ ' '
prediction.append(str_label.strip())
 submit['Predicted'] = np.array(prediction)
 submit.to_csv('4channels_cnn_from_scratch.csv', index=False )<import_modules>
lgbm = lgb.LGBMRegressor()
params = {'learning_rate': [0.08, 0.1, 0.12], 'max_depth': [20, 25, 30, 35]}
cv_lg = GridSearchCV(lgbm, params, cv = 10, n_jobs =1)
 cv_lg.fit(X_train, y_train)
 print("Best params:{}".format(cv_lg.best_params_))
best_lg = cv_lg.best_estimator_
y_train_pred_lg = best_lg.predict(X_train)
 y_val_pred_lg = best_lg.predict(X_val)
 y_train_pred_lg = cv_lg.predict(X_train)
 y_val_pred_lg = cv_lg.predict(X_val)
 print("MSE train:{}".format(mean_squared_error(y_train, y_train_pred_lg)))
 print("MSE val;{}".format(mean_squared_error(y_val, y_val_pred_lg)))
 print("R2 score train:{}".format(r2_score(y_train, y_train_pred_lg)))
 print("R2 score val:{}".format(r2_score(y_val, y_val_pred_lg)) )
import cv2<import_modules>
gbm = GradientBoostingRegressor(random_state=10)
 params = {'max_depth': [2, 3, 5], 'learning_rate': [0.05, 0.1, 0.15, 0.2]}
cv_g = GridSearchCV(gbm, params, cv = 10, n_jobs =1)
 cv_g.fit(X_train, y_train)
 print("Best params:{}".format(cv_g.best_params_))
best_g = cv_g.best_estimator_
y_train_pred_g = cv_g.predict(X_train)
 y_val_pred_g = cv_g.predict(X_val)
 print("MSE train:{}".format(mean_squared_error(y_train, y_train_pred_g)))
 print("MSE val;{}".format(mean_squared_error(y_val, y_val_pred_g)))
 print("R2 score train:{}".format(r2_score(y_train, y_train_pred_g)))
 print("R2 score val:{}".format(r2_score(y_val, y_val_pred_g)) )
import os, sys
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import PIL
from PIL import Image<import_modules>
ridge = Ridge()
params = {'alpha': [1000, 100, 10, 1, 0.1, 0.01, 0.001]}
cv_r = GridSearchCV(ridge, params, cv = 10, n_jobs =1)
 cv_r.fit(X_train, y_train)
 print("Best params:{}".format(cv_r.best_params_))
best_r = cv_r.best_estimator_
y_train_pred_r = best_r.predict(X_train)
 y_val_pred_r = best_r.predict(X_val)
 print("MSE train:{}".format(mean_squared_error(y_train, y_train_pred_r)))
 print("MSE val;{}".format(mean_squared_error(y_val, y_val_pred_r)))
 print("R2 score train:{}".format(r2_score(y_train, y_train_pred_r)))
 print("R2 score val:{}".format(r2_score(y_val, y_val_pred_r)) )
import skimage.io
from skimage.transform import resize
from imgaug import augmenters as iaa<import_modules>
lasso = Lasso()
params = {'alpha': [1000, 100, 10, 1, 0.1, 0.01, 0.001]}
cv_l = GridSearchCV(lasso, params, cv = 10, n_jobs =1)
 cv_l.fit(X_train, y_train)
 print("Best params:{}".format(cv_l.best_params_))
best_l = cv_l.best_estimator_
y_train_pred_l = best_l.predict(X_train)
 y_val_pred_l = best_l.predict(X_val)
 print("MSE train:{}".format(mean_squared_error(y_train, y_train_pred_l)))
 print("MSE val;{}".format(mean_squared_error(y_val, y_val_pred_l)))
 print("R2 score train:{}".format(r2_score(y_train, y_train_pred_l)))
 print("R2 score val:{}".format(r2_score(y_val, y_val_pred_l)) )
from tqdm import tqdm<import_modules>
elas = ElasticNet()
params = {'alpha': [1000, 100, 10, 1, 0.1, 0.01, 0.001]}
cv_e = GridSearchCV(elas, params, cv = 10, n_jobs =1)
 cv_e.fit(X_train, y_train)
 print("Best params:{}".format(cv_e.best_params_))
best_e = cv_e.best_estimator_
y_train_pred_e = best_e.predict(X_train)
 y_val_pred_e = best_e.predict(X_val)
 print("MSE train:{}".format(mean_squared_error(y_train, y_train_pred_e)))
 print("MSE val;{}".format(mean_squared_error(y_val, y_val_pred_e)))
 print("R2 score train:{}".format(r2_score(y_train, y_train_pred_e)))
 print("R2 score val:{}".format(r2_score(y_val, y_val_pred_e)) )
from sklearn.utils import class_weight, shuffle
import tensorflow as tf<define_variables>
y_test_pred_f = best_f.predict(X_test)
 y_test_pred_x = best_x.predict(X_test)
 y_test_pred_lg = best_lg.predict(X_test)
 y_test_pred_g = best_g.predict(X_test)
 y_test_pred_r = best_r.predict(X_test)
 y_test_pred_l = best_l.predict(X_test)
 y_test_pred_e = best_e.predict(X_test)
 y_submit = 10**(( y_test_pred_f*0.05 + y_test_pred_x*0.10 + y_test_pred_lg*0.05 + y_test_pred_g*0.05 + y_test_pred_r*0.25 + y_test_pred_l*0.25 + y_test_pred_e*0.25))
<load_from_csv><EOS> 
submit = pd.DataFrame({"Id":df_test["Id"], "SalePrice":y_submit})
 submit.to_csv('my_submission.csv', index=False)
 print("Your submission was successfully saved!" )