An algorithm is a set of instructions for processing information. A learning algorithm is a set of instructions that changes itself over time.
Examples:
You have a 8 red balls and 2 yellow balls in a bag. What is the algorithm for predicting the odds of a red ball?
Odds = 8 / (8+2) = 80% <- that’s because you divide the number of balls by the number of red balls.
However, after you drew 8 balls, those odds would be pretty inaccurate. A dumb algorithm would keep predicting an 80% chance of a red ball *even if we already drew all the yellow balls*.
The learning algorithm would be the same thing, except every time it draws a ball, it would remove that ball from consideration before the next attempt.
So attempt 1, odds = 8/(8+2). You draw a red ball. The algorithm changes to 7/(7+2).
Attempt 2, odds = 7/(7+2). You draw a yellow ball. The algorithm changes to 7/(7+1)
This is a very basic example, but you can see how powerful a learning algorithm can be.
There are many different learning algorithms that all work in different ways, but broadly:
* The algorithm stars knowing nothing about the task it is told to do.
* The algorithm is trained by having it randomly make decisions, then evaluating those decisions to see how well they worked at accomplishing the task. This evaluation can be done by a human, by another simpler program, or by a competing learning algorithm training to compete with the first.
* Using the results of the evaluation, the learning algorithm modifies itself slightly so its choices are slightly less random. For instance, “Genetic” algorithms make new, slightly modified versions of themselves and the worst-performing versions are deleted while neural nets adjust their neurons’ weights.
* The modified version is made to attempt the task again. The results are again scored, and the feedback is used to modify the algorithm again.
* This repeats many, *many* times. Each iteration is slightly better at the task than the last.
* The end result after several hundreds or thousands of hours of training, is an algorithm that can perform its task impressively well. Or impressively badly if the training data or assessment was off in some way (one of the earlier prototypes of ChatGPT infamously became extremely lewd because its training software had an extra negative sign somewhere in the code that inverted “bad” scores into “good” scores so the more the team tried to stop it, the nastier it got).
Latest Answers