-
Notifications
You must be signed in to change notification settings - Fork 18
Machine Learning
Machine learning is the application of computers to learning and recognition tasks that are normally considered human activities and referred to as "Supervised Learning". The computer can learn what something looks like from examples and then be able to recognise the same things at a later date. Instead of vision and other human senses however, the computer is given sets of numerical values to learn and recognise, and identifies them via a simple value (or set of values) later. It is up to the implementer how the real-world 'things' are mapped to values and later indicated.
A machine learning model is the embodyment of a particular algorithm or process for performing a recognition operation. This usually means a system that can learn to associate a set of inputs with an expected output such that it can later recognise inputs and predict a suitable output in response.
Training : 🗑️ Untrained Model + 📚 Example Values + 🎚️ Expected Outputs --> 🧠 Trained Model
Running : 🧠 Trained Model + 🕹️ Input Values --> 🎚️ Predicted Outputs
A corpus of examples are needed to train a model, this will effectively be a table of input parameters and the desired output values that are to be associated with them.
Here is an example training set; a list of positions around a house and the associated light states that are needed to see by in the various rooms. Examples are included that produce overlaps in the lighting for locations on the threshold of each room.
🏠 Person Location | Hall 💡 | Kitchen 💡 | Dining Area 💡 | Livingroom 💡 |
---|---|---|---|---|
1,1 (Hall) | 🟡On | ⚫Off | ⚫Off | ⚫Off |
1,2 (Hall) | 🟡On | 🟡On | ⚫Off | ⚫Off |
1,3 (Kitchen) | ⚫Off | 🟡On | ⚫Off | ⚫Off |
2,4 (Kitchen) | ⚫Off | 🟡On | ⚫Off | ⚫Off |
3,4 (Kitchen) | ⚫Off | 🟡On | 🟡On | ⚫Off |
4,3 (Dining Area) | ⚫Off | ⚫Off | 🟡On | ⚫Off |
2,3 (Kitchen) | ⚫Off | 🟡On | 🟡On | ⚫Off |
1,2 (Hall) | 🟡On | 🟡On | ⚫Off | ⚫Off |
3,2 (Livingroom) | 🟡On | ⚫Off | ⚫Off | 🟡On |
4,1 (Livingroom) | ⚫Off | ⚫Off | ⚫Off | 🟡On |
2,1 (Livingroom) | ⚫Off | ⚫Off | ⚫Off | 🟡On |
These need to be recorded into a training set ready for training, and can be added to later for retraining on more information. Generally, the more examples, the better the results (but this may incur performance cost).
Once the example set has been prepared the model is trained. This is only required once and can be done outside of the application if a fixed model behaviour is acceptable, or in-application if a more dynamic or user trainable model is desired.
The time to train may be very short, but for some example/model combinations may take longer.
Once trained, the model stores all the information it needs to perform the recognition task it has learned and can run independantely of the training set data.
A trained model can be loaded and fed input values as either a continuous process or as needed (depending on the type of inputs). As long as it is running it will produce predictions of what the input values best represent via the output values it has been taught.
The above objects and processes all combine to form a machine learning system with live parameter data flowing in and results flowing out.
👈 Setup | 🏠 Home | Model Types 👉