MoSIG DSAI, MSIAM 2021/22 Grenoble INP - Ensimag
This repository contains the code for the data challenge of the Kernel Methods for Machine Learning course. The task is image classification with kernel methods.
- Gabriele Degola
Public score: 0.616 Private score: 0.602 Leaderboard position: 3
Images are drawn from the CIFAR-10 dataset and organized as csv files: each row contains an image of 32 x 32 pixels.
The following command reproduces the best submission. Predictions are stored in Yte.csv.
python start.py --xtr data/Xtr.csv --ytr data/Ytr.csv --xte data/Xte.csvCode is organized in the following files:
start.pyis the main script;models.pycontains our implementation of kernel ridge regression;kernels.pycontains implemented kernels;utils.pycontains functions and classes for data processing.
Code relies on the following Python libraries:
numpy,scipyfor basic operations;pandasfor data loading and storing;tqdmfor showing progresses;scikit-imagefor computation of histograms of oriented gradients;scikit-learnfor label binarization only, required for multi-class classification.