Kaggle competition: Mechanisms of Action (MoA) Prediction
<SOS> metric: MeanColumnwiseLogLoss Kaggle data source: mechanisms-of-action-(moa)-prediction<feature_engineering>
! pip install -q --no-index --find-links /kaggle/input/pytorchtabnet/pytorch_tabnet-2.0.0-py3-none-any.whl pytorch-tabnet
df1 = df.copy()
df1['ConfirmedCases'] = np.log1p(df1['ConfirmedCases'])
 df1['Fatalities'] = np.log1p(df1['Fatalities'] )<create_dataframe>
import pandas as pd
import numpy as np
path = '/kaggle/working/'
procs=[FillMissing, Categorify, Normalize]
splits = list(range(MAX_TRAIN_IDX)) ,(list(range(MAX_TRAIN_IDX, len(df))))
%time to = TabularPandas(df1, procs, cat_vars.copy() , cont_vars.copy() , dep_var, y_block=TransformBlock() , splits=splits )<load_pretrained>
import pandas as pd
import numpy as np
dls = to.dataloaders(bs=512, path=path)
 dls.show_batch()<choose_model_class>
weight = [2.58401664e-01, 2.63939274e-01, 7.89299182e-17, 3.16070840e-01, 1.61588222e-01]
<find_best_params><EOS> 
test = pd.read_csv('.. /input/lish-moa/test_features.csv')
 if len(test)== 3982:
submission = pd.read_csv('.. /input/lish-moa/sample_submission.csv')
 submission.to_csv('submission.csv', index=False)
 else:
! python.. /input/better-cv-pl-v1/v1_inference.py
! python.. /input/moa-sin-v2/v2_inference.py
! python.. /input/baseline-inference/moa_lstm_inference.py
! python.. /input/resnet-sin-v3/v3_inference.py
! python.. /input/inference-scripts/moa-tabnet-correct-inference-freezepca.py
submission = pd.read_csv('.. /input/lish-moa/sample_submission.csv')
 submission.iloc[:, 1:] = 0
subv1 = pd.read_csv('./submission_v1_sin.csv')
 subv2 = pd.read_csv('./submission_v2_sin.csv')
 subv3 = pd.read_csv('./submission_v3_sin.csv')
 subv4 = pd.read_csv('./submission_v4_sin.csv')
 subv5 = pd.read_csv('./submission_tabnet_correct.csv')
 submission.iloc[:, 1:] = subv1.iloc[:, 1:] * weight[0] + subv2.iloc[:, 1:] * weight[1] + subv3.iloc[:, 1:] * weight[2] + subv4.iloc[:, 1:] * weight[3] + subv5.iloc[:, 1:] * weight[4]
submission.to_csv('submission.csv', index=False )