Prerequisites
The instructions below assume you are following best practices and have downloaded this git repo into a parent directory at: ~/atai. If you have already installed the ATAI Python Library and cloned the cookbook repository, proceed directly to Quickstart.Install Conda
Setup dev environment
Install ATAI Python Library
Clone Cookbook Repository
Quick Start
Analyze time-series sensor data to classify machine states using few-shot learning with example patterns.Running the Demo
From the cookbook root directory with your conda environment activated:Sample CSV files are provided in the
sample-files/ directory, including a data file and example focus files for testing the demo.Interactive Prompts
- API Key: Your API key
- Data File: Path to CSV file containing sensor data to analyze (drag & drop supported)
- Focus Files: Paths to example CSV files for each state you want to classify
- Window Configuration: Size and step parameters for analysis windows
Example Session
Sample Data
The demo includes sample files in thesample_files/ directory:
data.csv- Sensor data to analyzefocus/healthy.csv- Example of healthy machine statefocus/broken.csv- Example of broken machine state
Classification Tips
Naming Convention
Class names are automatically derived from focus file names:healthy.csvcreates class “healthy”broken.csvcreates class “broken”normal_operation.csvcreates class “normal_operation”
Window Size Configuration (to be reviewed)
The window size parameter determines how many data points Newton analyzes in each inference cycle. This affects the granularity of state classification.Recommended Settings
- Default: Auto-calculated based on focus file lengths
- High-frequency sensors (greater than 100Hz): 256-512 points
- Low-frequency sensors (less than 10Hz): 64-128 points
- Maximum: 1024 points
How It Works
Each window represents a time segment of sensor data. The system compares these windows against your focus examples to classify the machine state. Non-overlapping windows (step size = window size) provide independent classifications, while overlapping windows offer smoother state transitions.Constraints
- Window size cannot exceed the length of your shortest focus file
- Minimum window size is 16 data points for meaningful analysis