Model Types - Interactml/iml-unreal GitHub Wiki

Models

There are three types of model available in InteractML (described in more detail further down the page) these are:

Classification Model Icon
Classification
Regression Model Icon
Regression
Dynamic Timewarp Model Icon
Dynamic Timewarp

Each model operates in a slightly different way and produces slightly different outputs. It is up to you to decide the best fit for the task you have in mind. The options are: Sampling Mode (single or series) and Output Generation (discrete or continuous).

We also consider operational costs for each model, typically these are all fast, but there are always some conditions under which they can be slow and need to be used asynchoronously to avoid performance issues in some realtime applications. It's always possible to overload any software system.

Any additional notes or considerations are included to help you decide.

Sampling Mode

The input parameters passed in as training data and later for running the model can be considered as sampled in two different ways: Single or Series.

Single Sampling

This is a snapshot of parameters taken at a particular moment in time, like taking a photo of something. The expected outputs are associated with the parameters on a snapshot by snapshot basis.

💡NOTE: Even though these are single snapshots, it could be that when running a model you are actually taking a snapshot every frame tick to pass to the running model and it would produce a new output every frame (although obviously it may not actually change each frame).

Series Sampling

This is taking a series or sequence of snapshots and bundling them up into one example, like taking a short video of something moving. The expected outputs are associated with the complete sequence of parameters all at once.

💡NOTE: The series of parmeters would usually be from recording over a period of time, accumulating a snapshot of the values every frame, but this doesn't always have to be the case. For example; perhaps when recording gestures you might want to ignore any time the pen isn't down between strokes of a glyph and not record any values during that time.

Output Generation

Outputs are recreated by the model as it recognises them in the input parameters according to how it was trained. This is performed in two different ways: Discrete and Continuous.

Discrete Outputs

This is where only the set of expected outputs a model was trained on are produced at the output, no other values are allowed. This means the outputs can be used to directly control things that expect only a certain set of values (e.g. text description strings, on/off states of switches, or triggering a number of predefined actions).

Continuous Outputs

Models can also perform interpolation of output values where they are mapping the input parameters to an 'output space' where the results can move smoothly between values as the inputs change.

There are a couple of implications of this mode of operation:

  1. Outputs are unlikely to exactly match any of the trained outputs.
  2. Multi-dimensional outputs (see Labels) can be operate orthogonally and be largely independant of each other, and better cover the parameter-space and output-space.
  3. Sometimes values outside of the trained ranges can be produced.

The Classification Model

Sampling : Single

Output : Discrete

Performance : Fast to train, fast to run

Considerations : A good starting point for many applications

A Classification model takes single sets of parameters and tries to find the closest match to the examples it was trained on and produces the output it was originally associated with.

  • Training - Observing how parameters map to output values
  • Running - Mapping unfamiliar parameters to suitable discrete output values

Uses :

  • Is the player inside a room?
  • Which letter is the player signalling?
  • What colour is this thing?
  • Which enemy should I target next?

The Regression Model

Sampling : Single

Output : Continuous

Performance : Slow to train, fast to run

Considerations : Can produce output values outside the expected ranges.

A Regression model takes single sets of parameters and tries to find a weighted match to the examples it was trained on and produces a blend between the output values to best correspond to them. This is a like a 'fuzzy' version of the Classification model.

  • Training - Observing how parameters map to output values
  • Running - Mapping unfamiliar parameters to suitable interpolated output values

Training time is largely affected by the complexity of the output values (i.e. number of simultaneous outputs it's being asked to produce) and not so much by the quantity of examples.

Uses :

  • Which way is the player is facing?
  • Follow the player with a spotlight
  • Hot/cold level in a game of hide-and-seek
  • How difficult should the next enemy wave be?

The Dynamic Timewarp Model

Sampling : Series

Output : Discrete

Performance : Fast to train, slow to run

Considerations : Can be tricky to know how/when to collect the series of input parameters

A Dynamic Timewarp (DTW for short) model is like a Classification model but for sequences of values. It takes a recorded series of input parameters and finds the closest match to the examples it was trained on and produces the output it was originally associated with.

  • Training - Observing how parameter sequences map to output values
  • Running - Mapping unfamiliar parameter sequences to suitable discrete output values

Run time is largely affected by the length of the input series (i.e. number of samples) being tested, regardless of the number of examples it was trained on.

Uses :

  • What letter did the user write?
  • What magic spell did the players just cast?
  • What sound did I just hear?
  • Is the player clapping?

👈 Machine Learning | 🏠 Home | Asset Types 👉

⚠️ **GitHub.com Fallback** ⚠️