Machine learning concepts explained

What is machine learning?

Machine learning is a machine’s ability to make decisions or predictions based on previous exposure to data and extensive training. In other words, if a machine (program, app, etc.) improves its prediction accuracy through training, it has “learned.”

Machine learning is not quite artificial intelligence (AI) because a machine with AI can reason and think and act intelligently.

However, no AI can make decisions based on training and previous exposure to data. AI uses machine learning, but machine learning doesn’t necessarily use AI.

How machine learning models work

Computational graphs consist of a network of connected nodes (often called neurons). Each of these nodes typically has a weight and a bias that helps determine, given an input, which path is the most likely.

This enables the model to make intelligent decisions based on previously learned pathways. Outputs of one node are inputs into another. Nodes can be the results of operations or just be there to hold a value.

Building a machine learning program

There are 4 main components to building a machine learning program: data gathering and formatting, model building, training, and testing and evaluating

Data gathering and formatting

Here you want to gather a lot of data for your model to learn from. This means getting a variety of examples to expose the model to many variations and to get lots of it (thousands).

All data should be formatted pretty much the same (images same size, same color scheme, etc.) and should be labelled. You should also divide data into mutually exclusive training and testing sets.

Model building

Figure out which kind of model scheme works best and what kinds of algorithms work best for the problem you’re trying to solve. Break the bigger goal into smaller tasks and solve each of them at a time. Decide which optimizer, activation, and loss functions you want to use to that best fit the data you enter in for training. This can include connections, nodes, neurons, and more.

Training a machine learning model

Here a model assigns weights and biases to neurons. This helps the model make decisions and choose from a few outputs given a specific set of inputs. The model can choose paths through the neural network or computational graph based upon the inputs for a particular run, as well as the weights and biases of neurons in the network.

In supervised learning, we show the model what the correct outputs are for a given set of inputs, and the model alters the weights and biases of neurons to minimize the difference between its output and the correct answer.

Testing and evaluating machine learning models

After the model has been trained and the weights and biases of each neuron or node are fixed, we feed in a new set of data to see how well the model performs and how accurate the predictions are. Although it depends on the task at hand, good models will be > 90% accurate and very good models > 98% accurate.