Whether competing in contests or working on real projects, after cleaning the data, you never just test with a single algorithm - you inevitably need to compare multiple algorithms. autoclf is a simple framework I built over two days while participating in the Alibaba Risk Payment Competition.
The directory structure is:
βββ [4.0K] clf |
The clf directory contains common or custom algorithms, while the nn directory has custom deep learning algorithms bound to the sklearn interface. Custom algorithms exist as classes - you just need to implement fit, score, and predict. But if your custom fit uses sklearn training, you donβt need to redefine score and predict. Like this example: (clf/isvc.py)
|
Then just call it in train.py. The project is still being improved - planning to add a CLI interface. But the most important part of training is definitely data preprocessing and feature selection, and the data passed into train.py comes from preprocessing functions defined in the pipe folder.train.py
import os |
pipe/iload_aliaetc.py
import pandas as pd |
The prediction is in a separate predict.py file, which automatically loads models trained by train.py, then does batch predictions and saves them to the appropriate folder.
ps: 1332 people signed up for the competition, but only 36 have submitted results so far. The real experts all submit at the end. Iβm still pretty bad at this. What I canβt figure out is that this competition only runs system evaluation once per day, unlike the previous Tencent ad conversion contest where each submission was evaluated immediately for easy tuning. Not sure what theyβre thinking. But I already have new ideas for tackling this. The key might not be those -1 labels, but theyβre definitely a breakthrough point.
