29 Machine Learning Models

  • Both R and Python include several options for implementing machine learning models

  • Python ecosystem of packages to fit machine learning models are more consistent

  • Several packages in R are available to call Python libraries from R environment


29.1 R: Machine Learning Models

  • Statisticians and modellers developed several useful packages to fit machine learning models in both supervised and unsupervised framework

  • Some comprehensive R packages for machine learning models are: nnet, RWeka, randomForest, ranger, e1071, kernlab, gbm, xgboost, glmnet

  • Packages tensorflow provides an interface to tensorflow and torch provides an interface to PyTorch

  • Packages that provide miscellaneous functions to build predictive models: caret, mlr3, tidymodels, h2o

  • In this workshop, we will not provide further implementation of machine learning models in R

  • Please check the corresponding package websites for further information


29.2 Python: Machine Learning Models

  • Python package scikit-learn fits a comprehensive range of machine learning models

  • scikit-learn: Machine Learning in Python

  • The package is built on other packages like NumPy, SciPy and Matplotlib

  • It includes modelling option for both supervised and unsupervised problems

  • Methodologies include classification, regression, clustering, dimension reduction

  • It also includes several supportive tools likes model selection, preprocessing, feature extraction etc.

  • Install scikit-learn and its dependencies from PyPI repository: pip install scikit-learn