Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # convert strange data to good
- names = [name for name in train.keys() if name[0]=='P']
- multiplier = {'P1':3,'P2':1.5,'P3':1.5,'P4':1.5,'P5':2,'P6':2,'P7':2,'P8':2,'P9':2,'P10':2,'P11':2,'P12':2,'P13':1.5,'P14':3,
- 'P15':2,'P16':3,'P17':3,'P18':3,'P19':5,'P20':3,'P21':3,'P22':1,'P23':5,'P24':2,'P25':2,'P26':2.5,'P27':2.5,
- 'P28':2.5,'P29':2.5,'P30':5,'P31':3,'P32':5,'P33':2,'P34':6,'P35':3,'P36':4,'P37':2}
- for i in range(0,len(train)):
- if train.iloc[i]['max_params'] > 5:
- for name in names:
- train.loc[i,name] /= multiplier[name]
Advertisement
Add Comment
Please, Sign In to add comment