Skip to main content

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.
Before proceeding, check the requirements and correct Python version for the ATAI Python Library. To upgrade your Python client settings, please check our Python Client library.

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

  1. API Endpoint: Your ArchetypeAI API endpoint (press Enter to use the default)
  2. Data File: Path to the CSV file containing sensor data to analyze
  3. Focus Files: Paths to example CSV files for each state you want to classify. Type done when finished adding files.
  4. Window Size: Number of data points per analysis window (default: 1024)
  5. Step Size: Number of data points to advance between windows (default: same as window size)

Example Session

Sample Data

The demo includes sample files in the sample_files/ directory:
  • data.csv - Sensor data to analyze
  • focus/healthy.csv - Example of healthy machine state
  • focus/broken.csv - Example of broken machine state

Classification Tips

Naming Convention

Class names are automatically derived from focus file names:
  • healthy.csv creates class “healthy”
  • broken.csv creates class “broken”
  • normal_operation.csv creates class “normal_operation”

Window Size Configuration

The window size parameter determines how many data points Newton analyzes in each inference cycle. This affects the granularity of state classification.

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