返回列表

14th place solution NN (surviving the big shakeup)

533. Playground Series - Season 3, Episode 5 | playground-series-s3e5

开始: 2023-01-31 结束: 2023-02-13 数据算法赛

第14名解决方案 NN(在剧烈震动中幸存)

作者: Sergey Saharovskiy (Grandmaster) | 排名: 14th | 发布时间: 2023-02-14

简介

恭喜本次比赛的获胜者!保持名次非常有挑战性,尤其是当评估指标不会原谅糟糕的错误分类时。我希望这是前三名解决方案的话题,但在这次比赛中获得第14名绝非易事。这是我在少数幸存者中的一个。

配置 (CFG)

config = {
            'model_config': {
                'act_fn': F.mish,
                'learning_rate': 1e-3,
                'num_classes': 6,
                'hidden_sizes': [1024, 512, 128, 256],
                'drop_out': .50,
                'norm_last_layer': True,
                'weight_decay': 1e-5,
            },
            'seed': s,
            'num_folds': 6,  
            'batch_size': 128,
            'num_epochs': 13,
            'plateau_factor': .5,
            'plateau_patience': 3,
            'exp_num': 1,
            'combined_data': True
        }

特征工程

df['alcohol_density'] = df['alcohol'] * df['density']
df['sulphate/density'] = df['sulphates'] / df['density']
df['sulphate/alcohol'] = df['sulphates'] / df['alcohol']
df['pH_round1'] = df['pH'].round(1)
df['log1p_residual_sugar'] = np.log1p(df['residual_sugar'])
df['citric_acid_per_alcohol'] = df['citric_acid'] / df['alcohol']
conditions = (df['citric_acid'].eq(0), df['citric_acid'].eq(.49))
df['alcohol_mean_group_by_pH'] = df.groupby('pH_round1')['alcohol'].transform('mean')

模型

损失函数:nn.CrossEntropyLoss(weight=torch.tensor([1.10, 1.5, 1., 1., 1.5, 1.5]), reduction='sum')

Layer (type) Output Shape Param #
Linear-1 [-1, 512] 8,192
BatchNorm1d-2 [-1, 512] 1,024
Dropout-3 [-1, 512] 0
Linear-4 [-1, 256] 131,072
BatchNorm1d-5 [-1, 256] 512
Dropout-6 [-1, 256] 0
Linear-7 [-1, 128] 32,768
BatchNorm1d-8 [-1, 128] 256
Dropout-9 [-1, 128] 0
Linear-10 [-1, 5] 645
同比赛其他方案