Machine Learning: Common Algorithms

After reading this section, you'll be familiar with ML approaches and a couple algorithms you can use!

Machine Learning: Approach

Data

Data is essential to any ML problem. It's how correlation is inferred ("learned") by the model. It's important to not only have lots of data, but to have good and cleaned data. Getting good, clean data is arguably the most important step, because without it, your ML model is useless! A big part of ML is un-glorious data-cleansing.

Features

A feature is one part of the data that is fed into an ML model. For example, if I were doing ML with health records, a feature could be "height" or "age" or "ethnicity". Usually data will be augmented with features that are not a part of the raw data. For example, using "height * weight/age" might be used as a feature. Data is rarely fed raw into the model. Usually, important features are extracted before being used.

Model

You can think of an ML model as a function that takes in data, and outputs something. Depending on your problem, this could be lots of things (for example, recommended TV shows, projected stock prices, or today's weather). Some models include: naive bayes, logistic regression, neural networks, k-means, k-nearest-neighbors, and perceptron. We'll get to some of these!

Training

So how does this function come to be? Well, through training! At the beginning of training, the model is unequivocally awful (it doesn't know anything). After seeing data and making multiple passes over it, the model learns what it should output on certain inputs, and becomes better. Learning can be done supervised (with labels) or unsupervised (without labels).

Testing & Evaluation

After the model is fully trained, unseen testing data is fed into the model, which is evaluated for its performance. If it is not up to par, then the algorithm is adjusted and training is restarted.

Example

Problem: Netflix TV recommendations

Data: Thousands of users and what they watched

Using this data, Netflix will train a machine learning model, and evaluate it based on how accurately it was able to predict what a user wants to watch next.

Last updated