Skip to content

MicrochipTech/mplab-ml-sdk-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Microchip Edge AI

Status Platforms Domain ML License

MPLAB ML SDK Examples

Practical examples and tutorials for working with the MPLAB ML Development Suite Python SDK.

Quick Start

1. Get an API Key

Follow the API key creation guide to set up authentication.

2. Install Dependencies

pip install mplabml pandas matplotlib seaborn

3. Run Your First Notebook

Start with getting-started.ipynb to:

  • Authenticate with MPLAB ML
  • Explore available SDK functions
  • List your projects

Repository Structure

mplabml-sdk-examples/
├── notebooks/                      # Interactive tutorials
│   ├── getting-started.ipynb       # ✅ Start here!
│   ├── sharing-projects.ipynb      # ✅ Collaborate with others
│   ├── understanding-data.ipynb    # ✅ Prepare your data
│   ├── import-research-dataset.ipynb  # ✅ Import labeled datasets
│   └── auto-label-with-events.ipynb   # ✅ Event-triggered labeling
│
├── datasets/                       # Sample data for examples
│   ├── series_load_sample.csv      # Arc fault data example
│   └── gesture_sample.csv          # Gesture with button events
│
├── docs/                           # Documentation
│   └── getting-started/
│       └── creating-an-api-key.md  # ✅ API key setup guide
│
└── scripts/                        # Utility scripts

Available Notebooks

✅ Ready to Use

getting-started.ipynb - Start here!

  • Authentication and SDK setup
  • Explore available functions
  • List your projects

sharing-projects.ipynb - Collaborate with others

  • Download and share complete projects
  • Transfer between accounts

understanding-data.ipynb - Prepare your data

  • Sequential vs wide formats
  • Data quality checks and visualization
  • Find and fix common issues

import-research-dataset.ipynb - Use existing labeled data

  • Import from IEEE, Kaggle, or your own research
  • Work with pre-labeled datasets
  • Create manifest and upload to MPLAB ML

auto-label-with-events.ipynb - Automate labeling with triggers

  • Use button press, GPIO, or PWM signals
  • Detect rising/falling edges automatically
  • Label gesture or activity segments

Using Datasets from the Repository

Datasets are included in this repository for easy access in notebooks. You can load them directly:

Option 1: Clone the Repository

git clone https://github.com/MicrochipTech/mplabml-sdk-examples.git
cd mplabml-sdk-examples
jupyter notebook

Then in your notebook:

import pandas as pd

# Load arc fault sample
df = pd.read_csv('datasets/series_load_sample.csv')

# Or load gesture sample
df = pd.read_csv('datasets/gesture_sample.csv')

Option 2: Download Directly from GitHub

import pandas as pd

# Arc fault detection sample
url = 'https://raw.githubusercontent.com/MicrochipTech/mplabml-sdk-examples/main/datasets/series_load_sample.csv'
df = pd.read_csv(url)

# Gesture with button events sample
url = 'https://raw.githubusercontent.com/MicrochipTech/mplabml-sdk-examples/main/datasets/gesture_sample.csv'
df = pd.read_csv(url)

Datasets Included

Arc Fault Detection Sample

  • Source: IEEE Low Voltage DC Series Arc Fault dataset
  • Format: Sequential (Time, current_signal, label)
  • Size: 200,000 samples (~12.5 seconds)
  • Sampling rate: 16 kHz
  • Labels: -1 (normal), 0 (transient), 1 (arc fault)
  • Location: datasets/series_load_sample.csv

Gesture with Button Events Sample

  • Format: Sequential (AccelerometerX/Y/Z, GyroscopeX/Y/Z, Trigger)
  • Size: 950 samples (~9.5 seconds)
  • Sampling rate: 100 Hz
  • Events: 3 wave gestures with button triggers
  • Location: datasets/gesture_sample.csv

Learning Paths

🚀 Complete Workflow

Follow this path to go from setup to trained model:

  1. SetupCreate API Key
  2. AuthenticateGetting Started
  3. Prepare DataUnderstanding Data Formats
  4. Import Data → Choose your path:
  5. Train Model → Use MPLAB ML web interface for pipeline building and training
  6. CollaborateSharing Projects (optional)

📊 I Have Labeled Data

Skip straight to importing your research or proprietary datasets:

  1. Create API Key - Set up authentication
  2. Getting Started - Connect to MPLAB ML
  3. Understanding Data - Verify your data format
  4. Import Research Dataset - Upload with labels

🎯 I Need to Label Data with Events

Collect data with hardware triggers and auto-label:

  1. Create API Key - Set up authentication
  2. Getting Started - Connect to MPLAB ML
  3. Auto-Label with Events - Button/GPIO labeling

🎓 Quick Reference

Just need one thing?

Requirements

Python Dependencies

mplabml
pandas
numpy
matplotlib
seaborn
jupyter

Install all at once:

pip install -r requirements.txt

What is MPLAB ML?

MPLAB ML Development Suite is Microchip's cloud-based machine learning platform for embedded systems. It enables:

  • 🎯 Edge ML: Create compact supervised and anomaly-detection algorithms that can run on tiny edges for MCUs, dsPIC® DSCs and MPUs
  • 📊 Data Processing: Time-series feature extraction and pipeline building
  • 🔧 AutoML: Automated model training and optimization
  • 💾 Knowledge Packs: Generate optimized C code for deployment
  • 🚀 No ML Expertise Required: GUI-driven workflow for engineers

Contributing

This repository is growing:

  • 📓 Additional example notebooks
  • 📊 New sample datasets
  • 📝 Documentation improvements

Support


Last Updated: December 2025

About

Comprehensive examples for working with the MPLAB ML Python SDK

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published