Main content
Machine learning algorithms
Machine learning (ML) is a type of algorithm that automatically improves itself based on experience, not by a programmer writing a better algorithm. The algorithm gains experience by processing more and more data and then modifying itself based on the properties of the data.
Types of machine learning
There are many varieties of machine learning techniques, but here are three general approaches:
- reinforcement learning: The algorithm performs actions that will be rewarded the most. Often used by game-playing AI or navigational robots.
- unsupervised machine learning: The algorithm finds patterns in unlabeled data by clustering and identifying similarities. Popular uses include recommendation systems and targeted advertising.
- supervised machine learning: The algorithm analyzes labeled data and learns how to map input data to an output label. Often used for classification and prediction.
Let's dive into one of the most common approaches to understand more about how a machine learning algorithm works.
Neural networks
An increasingly popular approach to supervised machine learning is the neural network. A neural network operates similarly to how we think brains work, with input flowing through many layers of "neurons" and eventually leading to an output.
Training a network
Computer programmers don't actually program each neuron. Instead, they train a neural network using a massive amount of labeled data.
The training data depends on the goal of the network. If its purpose is to classify images, a training data set could contain thousands of images labeled as "bird", "airplane", etc.
The goal of the training phase is to determine weights for the connections between neurons that will correctly classify the training data.
The neural network starts off with all the weights set to random values, so its initial classifications are way off. It learns from its mistakes, however, and eventually comes up with a set of weights that do the best job at classifying all of the training data.
Using the network
When the neural network is asked to classify an image, it uses the learned weights and outputs the possible classes and their probabilities.
Accuracy
The accuracy of a neural network is highly dependent on its training data, both the amount and diversity. Has the network seen the object from multiple angles and lighting conditions? Has it seen the object against many different backgrounds? Has it really seen all varieties of that object? If we want a neural network to truly understand the world, we need to expose it to the huge diversity of our world.
Companies, governments, and institutions are increasingly using machine learning to make decisions for them. They often call it "artificial intelligence," but a machine learning algorithm is only as intelligent as its training data. If the training data is biased, then the algorithm is biased. And unfortunately, training data is biased more often than it's not.
In the following articles, we'll explore the ramifications of letting machines make decisions for us based on biased data.
🙋🏽🙋🏻♀️🙋🏿♂️Do you have any questions about this topic? We'd love to answer—just ask in the questions area below!
Want to join the conversation?
- can you do a simple video course on writing neural networks through javascript(23 votes)
- yes, you can, And you should. Just learn java script. Then write neural networks with JS. Then do a simple video about your journey.(1 vote)
- Please reveal the equations required to adjust the weights. Thx.(4 votes)
- The algorithm is called backpropagation/gradient descent. Basically, find negative gradient for cost function (Predict-Real result)^2 and then change the weights by the gradient(4 votes)
- how does the ai know how which node to pass the information to(2 votes)
- That's what the learning part of machine learning is for. Many neural networks are trained through thousands of slightly different iterations, oftentimes using Darwinian algorithms for each group so that it takes the best method from that group and then slightly modifies it into a new group of iterations, continuing this process to get the "perfect model", which is, of course, not perfect but given tens or hundreds of thousands, maybe even millions of total iterations over hundreds of "generations", it tends to come out well, as long as the training data is solid.(4 votes)
- Can you make a simple video course on making neural networks in Python?(3 votes)
- in the labeled data sets, how is a dog distinguished from a wolf? Are the pictures reduced to mathematical point, for example, distance between eyes, length of ears?(2 votes)
- In labeled datasets, humans look at the pictures and tag them accordingly.(2 votes)
- i have so many unanswered questions(2 votes)
- what did I just read(2 votes)
- can you do a simple video course on writing neural networks through javascript(1 vote)
- First, JavaScript isn't ideal for writing neural networks. It mostly created for making websites. Python might be more suitable.
Second, writing a neural network can't be "simple". The entire video would either be 3 hours long, or you are simply doing a blackbox programming. It means that you copy all of the modules without knowing how it works, put them together and get your result.
If you are really interested, there are plenty of resources on neural networks. One is https://ocw.mit.edu/courses/6-034-artificial-intelligence-spring-2005/pages/syllabus/(2 votes)
- what is a hidden layer in neural network used for ? and how do you determine how many layers do you need for a particular model ? can you please explain with example(1 vote)
- in the labeled data sets, how is a dog distinguished from a fox? Are the pictures reduced to mathematical point, for example, distance between eyes, length of ears?(0 votes)