statistical-ml

Trains classical statistical and machine learning models on tabular neuroimaging features.

89|5|Updated Mar 25, 2026
One-click install
npx skills add https://github.com/CUHK-AIM-Group/NeuroDiscovery --skill statistical-ml-cuhk-aim-group
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: statistical-ml
Source: https://github.com/CUHK-AIM-Group/NeuroDiscovery/tree/main/skills/statistical-ml
Command: npx skills add https://github.com/CUHK-AIM-Group/NeuroDiscovery --skill statistical-ml-cuhk-aim-group

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, pandas, scipy, scikit-learn, statsmodels, joblib, xgboost, and includes scripts (resource) components.

What problem does it solve? Researchers working with neuroimaging-derived tabular data need reproducible classical statistical inference and machine learning without data leakage from preprocessing steps applied outside cross-validation folds. ## Core Features & Use Cases - Classification and Regression: Train logistic regression, Ridge, Elastic Net, SVM/SVR, and XGBoost models with scikit-learn pipelines that keep imputation, scaling, and feature selection inside each training fold. - Statistical Inference: Compute Cohen's d effect sizes, robust formula-based OLS/GLM, and linear mixed-effects models for dose, time, and treatment analyses via statsmodels. - Site-Aware Validation: Use group-aware cross-validation so recording sites are never split between training and test folds. - Use Case: Given a CSV of subject-level ROI features and diagnosis labels from multiple acquisition sites, train a logistic regression classifier with site-aware 5-fold cross-validation and obtain AUROC metrics, fold assignments, and a run manifest. ## Quick Start Run the training script on your features CSV with a target column, model type such as logistic or ridge, and an output directory to get cross-validated metrics and predictions.

Frequently Asked Questions about statistical-ml

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

FAQPage Schema
How do I train a logistic regression model on neuroimaging features?

Run the train_reference.py script with your features CSV, specifying the target column, subject ID column, logistic model, and classification task. The script performs cross-validation and writes metrics, predictions, and fold assignments to the output directory.

What machine learning models are supported for tabular neuroimaging data?

Classification supports logistic regression, ridge, elastic net, SVM, and XGBoost. Regression supports OLS, ridge, elastic net, SVR, and XGBoost. Inference utilities provide Cohen's d, robust OLS/GLM, and linear mixed-effects models.

How do I prevent data leakage in cross-validation with scikit-learn?

This skill uses scikit-learn pipelines so imputation, scaling, and feature selection are fitted only inside each training fold. This prevents preprocessing statistics from leaking between training and test splits.

Can I keep recording sites together during cross-validation splits?

Yes, pass a grouping column such as site with the group-col argument. The splitter then ensures all observations from one site stay in the same fold, avoiding optimistic performance estimates from site leakage.

When should I use mixed-effects models instead of standard regression?

Use mixed-effects models for longitudinal or clustered data, such as dose, time, or treatment analyses with repeated observations per subject. Standard OLS assumes independent observations and underestimates variance in grouped data.

Is XGBoost required to use this skill?

No, XGBoost is optional and loaded only when requested as the model. Core functionality works with numpy, pandas, scipy, scikit-learn, statsmodels, and joblib.