{"id":20285429,"url":"https://github.com/mramshaw/intro-to-ml","last_synced_at":"2026-04-11T09:05:46.818Z","repository":{"id":39671734,"uuid":"104818965","full_name":"mramshaw/Intro-to-ML","owner":"mramshaw","description":"Intro to Machine Learning - Pattern Recognition for Fun and Profit","archived":false,"fork":false,"pushed_at":"2024-08-24T09:14:40.000Z","size":10917,"stargazers_count":0,"open_issues_count":159,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-14T08:12:06.376Z","etag":null,"topics":["machine-learning","matplotlib","ml","numpy","pandas","pip","pip3","python","scikit-learn","scipy","seaborn","seaborn-plots","sklearn","statsmodels","tensorflow","weka"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mramshaw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-26T01:12:32.000Z","updated_at":"2020-03-06T13:36:24.000Z","dependencies_parsed_at":"2023-09-26T19:32:56.035Z","dependency_job_id":"c1fd1e3e-b57e-49d4-a4ee-3b9018fe05e4","html_url":"https://github.com/mramshaw/Intro-to-ML","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mramshaw%2FIntro-to-ML","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mramshaw%2FIntro-to-ML/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mramshaw%2FIntro-to-ML/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mramshaw%2FIntro-to-ML/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mramshaw","download_url":"https://codeload.github.com/mramshaw/Intro-to-ML/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241780465,"owners_count":20019058,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["machine-learning","matplotlib","ml","numpy","pandas","pip","pip3","python","scikit-learn","scipy","seaborn","seaborn-plots","sklearn","statsmodels","tensorflow","weka"],"created_at":"2024-11-14T14:26:39.100Z","updated_at":"2025-11-30T15:05:32.778Z","avatar_url":"https://github.com/mramshaw.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Intro to Machine Learning - Pattern Recognition for Fun \u0026 Profit\n\n[![Known Vulnerabilities](http://snyk.io/test/github/mramshaw/Intro-to-ML/badge.svg?style=plastic\u0026targetFile=requirements.txt)](http://snyk.io/test/github/mramshaw/Intro-to-ML?style=plastic\u0026targetFile=requirements.txt)\n\nThe table of contents is as follows:\n\n* [Overview](#Overview)\n* [Prerequisites](#prerequisites)\n* [scikit-learn](#scikit-learn)\n* [Libraries](#libraries)\n    * [Numpy](#numpy)\n    * [Matplotlib / Seaborn](#matplotlib--seaborn)\n    * [StatsModels](#statsmodels)\n* [requirements.txt](#requirementstxt)\n* [TODO](#todo)\n* [Credits](#credits)\n* [Alternatives](#alternatives)\n* [Data Cleaning](#data-cleaning)\n* [Quick Hits](#quick-hits)\n* [End to End](#end-to-end)\n* [Tools](#tools)\n\n## Overview\n\nThis is a nice free introduction to Machine Learning with Python.\n\n![xkcd](http://imgs.xkcd.com/comics/machine_learning.png)\n\nHere is how the folks at\n[nVidia](http://blogs.nvidia.com/blog/2016/07/29/whats-difference-artificial-intelligence-machine-learning-deep-learning-ai/)\nsee the relationship between Artifical Intelligence, Machine Learning and Deep Learning:\n\n![AI_versus_ML_versus_Deep_Learning](/images/Deep_Learning_Icons_R5_PNG.jpg.png)\n\nTowards the beginning of my career, I was interested in AI and joined a society founded\nby [Donald Michie](http://www.theguardian.com/science/2007/jul/10/uk.obituaries1) - who\nwas then at the University of Edinburgh. I wonder how much things have progressed since\nthen?\n\nMachine Learning is hot right now, and of course the cloud providers have noticed.\n\nHere is Google's Cloud offering:\n\n        http://cloud.google.com/products/machine-learning/\n\nFor a more sombre view of things, the following article is worth reading:\n\n        http://www.cio.com/article/3223191/artificial-intelligence/a-practical-guide-to-machine-learning-in-business.html\n\n## Prerequisites\n\n[Chris Manning](http://profiles.stanford.edu/chris-manning), Stanford, 3 Apr 2017:\n\n\u003e \"Essentially, Python has just become the [lingua franca](http://en.wikipedia.org/wiki/Lingua_franca) of nearly all the\n\u003e deep learning toolkits, so that seems the thing to use.\"\n\n        http://youtu.be/OQQ-W_63UgQ?list=PL3FW7Lu3i5Jsnh1rnUwq_TcylNr7EkRe6\u0026t=2102\n\nFor an explanation of why Python (as contrasted with other languages) is a good choice for\n[Natural language processing](http://en.wikipedia.org/wiki/Natural_language_processing)\nthe following link is worth a look:\n\n        http://www.nltk.org/book_1ed/ch00-extras.html\n\n1. Python (Python 2 support has been dropped from a number of projects, so use Python 3)\n\n2. `pip` or possibly `pip3` (if using Python 2 __and__ Python 3)\n\n`pip` (or `pip3`) is the Package manager for Python, much as `npm` is the package manager\nfor the [Node.js](http://nodejs.org/) platform.\n\n## scikit-learn\n\nThe course uses this library, which it refers to as `sklearn`.\n\nThe latest version may be found here:\n\n        http://scikit-learn.org/stable/\n\nTo install this library in multi-user mode (not recommended) with `pip` (replace with `pip3` if using Python 3):\n\n        pip install -U scikit-learn\n\nTo install this library in single-user mode (recommended) with `pip` (replace with `pip3` if using Python 3):\n\n        pip install --user scikit-learn\n\n## Libraries\n\nIt's not really possible to do much of anything in Python without additional libraries.\n\nEssential libraries include:\n\n* [NumPy](http://www.numpy.org/)\n* [SciPy](http://www.scipy.org/index.html)\n\nUseful optional libraries include:\n\n* [matplotlib](http://matplotlib.org/)\n* [nltk](http://www.nltk.org/)\n* [pandas](http://pandas.pydata.org/)\n\nVerify library presence and version with `pip` as with `scikit-learn`:\n\n    pip list --format=freeze | grep numpy\n\n[Replace `numpy` above as necessary.]\n\nOr verify library presence and version with Python:\n\n    python -c \"import numpy as im; print(im.__version__)\"\n\n[Likewise replace `numpy` above as necessary.]\n\nOr use `try_import.py` for multiple libraries as shown:\n\n```bash\n$ python try_import.py numpy scipy sklearn keras pytorch\n\"numpy\" was imported\n\"scipy\" was imported\n\"sklearn\" was imported\nUsing TensorFlow backend.\n\"keras\" was imported\n\"pytorch\" could not be imported - try \"pip install --user pytorch\"\n$\n```\n\nInstall the library with `pip` (either multi-user or single-user) as with `scikit-learn` above.\n\n#### Numpy\n\nNumPy allows for a nice performance optimization called __single instruction, multiple data__, or\n[SIMD](http://en.wikipedia.org/wiki/SIMD).\n\nBasically, this allows for vector or matrix handling (compare 'vectors\\ pt1.py' to 'vectors\\ pt2.py').\n\n#### Matplotlib / Seaborn\n\nMatplotlib is great for plotting variables, but can be very low-level.\n\nTo make these graphs look a little better, check out my [No More Blue](http://github.com/mramshaw/No_More_Blue) repo.\n\nOr - for a higher-level library - check out [Seaborn](http://seaborn.pydata.org).\n\n[Seaborn will greatly simplify a number of difficult `matplotlib` graphing exercises.]\n\n#### StatsModels\n\nAlthough not used in this course, [StatsModels](http://www.statsmodels.org/stable/index.html) is also worth a look.\n\nIt provides classes and functions for the estimation of many different statistical models, as well as for conducting\nstatistical tests, and statistical data exploration.\n\nSome __Seaborn__ functions will optionally use StatsModels if it is installed.\n\n## requirements.txt\n\nOf course, it's also possible (as with __npm__ or __composer__) to install all dependencies in one fell swoop (probably a _best practice_).\n\nSimply list the dependencies in a file (for example `requirements` or `requirements.txt`) and install from it:\n\n        pip install --user -r requirements.txt\n\n[Note the `--user` option, which may be omitted for a Global install, also the `-r` option to specify an input file.]\n\n## TODO\n\n- [ ] Finish course\n- [x] Update Quick Hit links to make them easier to navigate\n- [ ] Update everything for the most recent (and secure) version of TensorFlow\n\n## Credits\n\nBased upon:\n\n        http://www.udacity.com/course/intro-to-machine-learning--ud120\n\nYou can find an interview with co-author Katie Malone here:\n\n        http://www.se-radio.net/2017/03/se-radio-episode-286-katie-malone-intro-to-machine-learning/\n\n## Alternatives\n\nThe following look like interesting options too:\n\n        http://web.stanford.edu/class/cs224n/\n\n        http://openclassroom.stanford.edu/MainFolder/CoursePage.php?course=MachineLearning\n\n## Data Cleaning\n\nA ___lot___ (lets say three quarters) of a data scientist's time is spent massaging data.\nWhich is a pretty important (lets say _critically_ important) part of a data scientist's\njob and not often discussed.\n\n___Garbage in, garbage out.___\n\n[Not to mention the (very expensive) computer time wasted.]\n\nFor a quick introduction to data cleaning with `numpy` and `pandas`, have a look at this\ngreat tutorial:\n\n    http://realpython.com/python-data-cleaning-numpy-pandas/\n\nYou can see my stab at it [here](http://github.com/mramshaw/Data-Cleaning).\n\nFor a more complicated example, check out my [ML with Missing Data](http://github.com/mramshaw/ML_with_Missing_Data) repo.\n\n## Quick Hits\n\nFor an easy (and quick) introduction to the various Python tools and ML concepts:\n\n        http://www.youtube.com/playlist?list=PLOU2XLYxmsIIuiBfYad6rFYQU_jL2ryal\n\nThis series is from mid-2016 so there is a small amount of 'code rot', plus it seems to use\nPython 2 rather than Python 3, but even so it's a quick and fun way to get a brief overview\nof ML and the tools \u0026 techniques involved.\n\n* [Machine Learning Recipes #1 (Hello World)](./Hello_World/)\n* [Machine Learning Recipes #2 (Visualizing a Decision Tree)](./Iris/)\n* [Machine Learning Recipes #3 (What Makes a Good Feature?)](./Features/)\n* [Machine Learning Recipes #4 (Let's Write a Pipeline)](./Pipeline/)\n* [Machine Learning Recipes #5 (Writing Our First Classifier)](./Custom_Classifier/)\n* [Machine Learning Recipes #6 (Train an Image Classifier with TensorFlow for Poets)](./Image_Classifier/)\n* [Machine Learning Recipes #7 (Classifying Handwritten Digits with TF.Learn)](./Handwriting_Classifier/)\n* [Machine Learning Recipes #8 (Let's Write a Decision Tree Classifier from Scratch)](./Decision_Tree/)\n* [Machine Learning Recipes #9 (Intro to Feature Engineering with TensorFlow)](./Feature_Engineering/)\n* [Machine Learning Recipes #10 (Getting Started with Weka)](./WEKA/)\n\n## End to End\n\nFor a deeper dive into the Iris dataset, check out my [ML with SciPy](http://github.com/mramshaw/ML_with_SciPy) repo.\n\nThis project shows a full end-to-end workflow.\n\n## Tools\n\nThere are a number of tools, such as Python, IPython, and Jupyter Notebooks.\n\nOne website that gets a lot of mentions is [Anaconda](http://www.anaconda.com/):\n\n    http://www.anaconda.com/download/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmramshaw%2Fintro-to-ml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmramshaw%2Fintro-to-ml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmramshaw%2Fintro-to-ml/lists"}