Kaggle competition: Gendered Pronoun Resolution
<SOS> metric: MulticlassLoss Kaggle data source: gendered-pronoun-resolution<define_variables>
import pandas as pd
import numpy as np
import os
name_label_dict = {
0: 'Nucleoplasm',
1: 'Nuclear membrane',
2: 'Nucleoli',
3: 'Nucleoli fibrillar center',
4: 'Nuclear speckles',
5: 'Nuclear bodies',
6: 'Endoplasmic reticulum',
7: 'Golgi apparatus',
8: 'Peroxisomes',
9: 'Endosomes',
10: 'Lysosomes',
11: 'Intermediate filaments',
12: 'Actin filaments',
13: 'Focal adhesion sites',
14: 'Microtubules',
15: 'Microtubule ends',
16: 'Cytokinetic bridge',
17: 'Mitotic spindle',
18: 'Microtubule organizing center',
19: 'Centrosome',
20: 'Lipid droplets',
21: 'Plasma membrane',
22: 'Cell junctions',
23: 'Mitochondria',
24: 'Aggresome',
25: 'Cytosol',
26: 'Cytoplasmic bodies',
27: 'Rods & rings' }<load_from_csv>
train = pd.read_csv('.. /input/test_stage_2.tsv', delimiter = '\t' ).rename(columns={'A': 'A_Noun', 'B': 'B_Noun'})
 train = train.rename(columns={'A_Noun':'A', 'B_Noun':'B'})
 train['A'] = pd.to_numeric(train['A'], errors = 'ignore')
 train['A'] =(( - np.random.randint(1, 12359, train.shape[0])+ 12359)/ 2)/ 10000
train['B'] = pd.to_numeric(train['B'], errors = 'ignore')
 train['B'] =(( - np.random.randint(1, 12359, train.shape[0])+ 12359)/ 2)/ 10000
sub = pd.read_csv('.. /input/sample_submission_stage_2.csv')
 sub['A'] = sub['A'] - pd.to_numeric(train['A'], errors = 'ignore')
 sub['A'] =(( - np.random.randint(1, 12359, train.shape[0])+ 12359)/ 2)/ 10000
sub['B'] = sub['B'] - pd.to_numeric(train['B'], errors = 'ignore')
 sub['B'] =(( - np.random.randint(1, 12359, train.shape[0])+ 12359)/ 2)/ 10000
sub['NEITHER'] =(( 10.0 -(train['A'] + train['B'])) / 6)/ 10
sub[['ID', 'A', 'B', 'NEITHER']].to_csv("submission.csv", index=False )