ssm

Fits and analyzes HMM, SLDS, and LDS state-space models on neural time-series data.

1|1|Updated Feb 10, 2026
One-click install
npx skills add https://github.com/smestern/sciagent --skill ssm-smestern
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ssm
Source: https://github.com/smestern/sciagent/tree/main/docs/domains/computational-neuro/skills/ssm
Command: npx skills add https://github.com/smestern/sciagent --skill ssm-smestern

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires ssm, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill enables users to fit and analyze state-space models (HMM, SLDS, LDS) on neural time-series data, addressing the need for advanced modeling and analysis in computational neuroscience.

Core Features & Use Cases

  • Model Fitting: Fit HMM, SLDS, or LDS models to neural time-series data.
  • Missing Data Handling: Handles missing data via masks and multiple initializations.
  • Model Comparison: Offers model comparison across different numbers of states.
  • Latent State Extraction: Extracts latent states for further analysis.
  • Use Case: Ideal for researchers in computational neuroscience who need to model and analyze complex neural dynamics, such as in neurophysiology or cognitive neuroscience.

Quick Start

Fit an HMM to neural data using the ssm skill with the following command: fit_hmm neural_data

Frequently Asked Questions about ssm

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fit state-space models to neural time-series data?

You can fit state-space models to neural time-series data by providing your neural data to the fitting command. The skill supports fitting HMM, SLDS, and LDS models using the ssm package.

Can I fit Hidden Markov Models to neural data with missing values?

Yes, you can fit Hidden Markov Models to neural data with missing values. The skill handles missing data via masks and supports multiple initializations to ensure robust model fitting.

What is the best way to compare state-space models with different numbers of states?

To compare state-space models with different numbers of states, use the model comparison feature. This evaluates model performance across varying state counts to help identify the optimal configuration.

How do I extract latent states from an HMM fitted on neural time-series?

You extract latent states from an HMM fitted on neural time-series using the latent state extraction feature. This outputs the hidden dynamic states for further computational neuroscience analysis.

Does fitting LDS and SLDS models require the ssm package?

Yes, fitting LDS and SLDS models requires the ssm package. This dependency is necessary for the underlying model fitting and analysis operations on neural time-series data.

When should I use SLDS versus HMM for neural dynamics analysis?

Use SLDS versus HMM for neural dynamics analysis depending on the required complexity. SLDS combines continuous and discrete latent dynamics, while HMM models discrete state transitions in neural time-series data.