I first created this repository to tackle the Kaggle Competition called Jane Street Market Prediction.
However, as I was solving it, I realised I am building a much broader framework for experimentation and ML development in PyTorch.
Hence, I decided to publish this framework together with my solution so that others can benefit from my efforts.
git clone https://github.com/TomasDavidYe/kaggle-jane-street-market-prediction;
cd kaggle-jane-street-market-prediction;
pip3 install -r requirements.txt;
There are 2 ways this package can be used.
- To get inspired by my solution to the Jane Street Market Prediction competition.
- To reuse some of my utility functions for your own ML development in PyTorch
First, pull data from the original Kaggle Data Source.
Try to run simple_mlp_experiment.py script to make sure the workspace is setup correctly. If that works, you can use ExperimentContext framework the to either improve the SimpleMLPModel originally presented, or you can build your own model which implements the AbstractModel interface.
from entities.ExperimentContext import ExperimentContext
context = ExperimentContext(
model=model, # Your own model
train_data=train_data,
test_data=test_data
)
You can also use this package to conduct your own ML experiments with PyTorch.
For example, checkout my EllipseClassificationExperiment where I use PyTorch to define a logistics regression model and use it to classify points generated by a 2 dimensional Gaussian distribution.
For me, these experiments helped me a lot to gain intuition about how different models work.
from lab.EllipseClassificationExperiment import EllipseClassificationExperiment
EllipseClassificationExperiment(model=model, # any class implementing the AbstractModel interface
feature_transform=feature_transform, # any function transforming input vectors to different vectors, make sure the output size is pluggable into your model
num_of_points=300,
buffer_coefficient=3,
ellipse_a=2,
ellipse_b=1).run()