How N-Shot Works
Instead of training a new model, n-shot examples are provided as part of the lens configuration. Newton uses these examples to understand the pattern you want it to follow, then applies that pattern to new incoming data. Key advantage: N-shot classification works with very few examples (often just one per class), eliminating the need for retraining or fine-tuning when you have limited labeled data.Configuration
N-shot examples are configured differently depending on the lens type. The general pattern is to provide labeled examples in themodel_parameters section.
Example: Machine State Lens
For time-series classification, provide CSV files for each state:Requirements for N-Shot Examples
Format consistency Your examples must match the format of your incoming data:- Same sampling rate
- Same variates (columns/channels)
- Same data formats
- Same timestamp formats (for time-series data)
- No leaking of incorrect examples into other n-shot example files.
When to Use N-Shot Examples
N-shot examples are appropriate when:- You have limited labeled data (even just one example per class)
- You need to classify states or detect patterns that Newton doesn’t recognize by default
- You want to customize behavior without the overhead of fine-tuning
- Your classification needs may change frequently, as you can update examples without retraining