This is a project I am working on for the mia startup which focusses on making Machine Learning models accessible for the general public with its easy-to-use web interface. People can go to the http://miamarketplace.com/ and chose a prebuilt model that they wish to use. Inside the model's page, they can chose their values for different parameters and see the specific output on the browser itself within seconds!
Flight prices are unpredictable. We can see the same airline charging us different prices for the same flight on the same day because of unknown factors. In an effort to mitigate that confusion, I have made a flight price estimator in this project that is trained on data acquired from this Kaggle dataset.
One of the hardest challenges I faced in this project was dealing with categorical and continuous variables in the same neural network.
More information upcoming regarding this.
Some hyperparameters that are taking me a long time to manually tune are
- Learning rate
- Batch size
- Embedding size
- Dense layer size
- Number of Dense layers
- Optimizer
As of now, the best combination I have come up with is
learning_rate = 0.1
batch_size = 512
# The best optimizer as of now is Adam
optimizer = Adam(learning_rate=0.1)
model.compile(optimizer=optimizer, loss='mse', metrics=['mse'])
# 20% of training data is used as validation data while training
history = model.fit(
[train_continuous, train_categorical],
Y_train,
batch_size=512,
epochs=500,
validation_split=0.2,
callbacks=[call, training_stop]
)
As of June 6th, 2020, the best accuracy I have scored is:
Training set: 54.27% Test set: 53.52%
with an epsilon price of $70 as the margin.
Below is the graph of the training and validation costs as the model trained in its best scenario.
In this repository, I have presented by code as a Jupyter notebook. But I originally coded in Google colab. I am providing the link to the colab for viewing and making it public.
Link - https://bit.ly/flightpricemodel
If you have any concern or suggestion regarding this project, feel free to email me at [email protected].