Tag: machine learning

  • Reinforcement Learning (Q learning)

    Python implementation for Q learning

  • LSTM

    How to train a LSTM model How to predict the next day’s price using the past 60 days prices

  • Tensorflow and Keras

    Performing gradient descent in TensorFlow Using TensorBoard for visualization Using keras for deep learning (MNIST classification)

  • Unsupervised Learning – K Means Clustering

    How to get DOW 30 stock tickers from Wikipedia How to use the resample() method How to do an elbow plot How to cluster stocks based on their weekly ATR Backtest of a strategy that clusters the daily data of TSLA into 3 clusters and comparing their performances

  • Introduction to Gradient Boosting in Machine Learning

    What is Gradient Boosting (with youtube video) What is XGBoost How to check correlation between features How to use the XGBClassifier class Hyperparameter tuning and retraining the model Backtesting a strategy that uses gradient boosting to predict if today’s close will be greater than 99.5% of yesterday’s close How to use the pyfolio module

  • Introduction to Scikit-Learn

    How to download toy datasets from sklearn (Boston housing) How to use the sklearn API (fit(), transform() and predict() methods) How to do data-preprocessing with sklearn How to train a linear regression model and evaluate it (R2 score) How to do gradient boosting using the GradientBoostingRegressor class How to use the Pipeline and FeatureUnion classes…

  • How to code a K Nearest Neighbour trading strategy in sklearn

    What is the confusion matrix, classification report and ROC curve How to do a grid search with forward chaining (using the TimeSeriesSplit class) How to backtest a strategy that uses KNN to predict if today’s close will be greater than 99.5% of yesterday’s close How to use the pyfolio module

  • 5 ways to do feature selection in Scikit-Learn

    This tutorial discusses five different ways to select features for our machine learning projects in sklearn (with youtube videos): Variable Inflation Factors (VIF) SelectKBest Recursive Feature Elimination (RFE) Recursive Feature Elimination CV (RFECV) and SHapley Additive exPlanations (SHAP) Code is provided for the first 4 methods