Skip to content
Back to skills

Training And Custom Models

ASecurity

"Plan and preflight custom CellTypist model training, including

  • 247 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 8, 2026
datagoexpressapi

Works with

  • api

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill training-and-custom-models --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Training And Custom Models?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Training And Custom Models
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-training-and-custom-models/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-training-and-custom-models)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: training-and-custom-models
description: "Plan and preflight custom CellTypist model training, including
  data preparation, SGD/mini-batch options, feature selection, downsampling, and
  model save/use handoff."
disable-model-invocation: true
metadata:
  disco-role: operating
license: MIT
---

# Training and Custom Models

Use this sub-skill when a task needs a custom CellTypist model trained from reference expression data, labels, and genes, or when training inputs must be validated before an expensive run.

## Start Here

1. Read [references/api-reference.md](references/api-reference.md) for the verified `celltypist.train` and `celltypist.samples.downsample_adata` signatures and parameter caveats.
2. Use [references/training-workflows.md](references/training-workflows.md) to choose one-pass logistic regression, SGD, mini-batch SGD, two-pass feature selection, sparse-safe settings, and model persistence.
3. Run [scripts/training_data_check.py](scripts/training_data_check.py) before expensive training when the user provides CSV/label/gene fixtures or asks why a run will fail.
4. Use [references/troubleshooting.md](references/troubleshooting.md) to map validation, solver, memory, GPU, mini-batch, feature-selection, and downsampling failures to concrete fixes.

## Boundaries and Routing

- Stay here for `celltypist.train`, `celltypist.samples.downsample_adata`, training matrix/label/gene validation, algorithm choice, feature-selection settings, sparse-memory safeguards, GPU caveats, and writing a trained model.
- Route inference with a trained model to `../annotation-workflows/`.
- Route model conversion, subsetting, built-in model discovery, or model metadata management to `../model-management/`.
- Route final dotplots, result tables, and visualization polish to `../visualization-and-results/`.

## Fast Decision Rules

- Use default logistic regression for small or intermediate references when calibrated probabilities matter and runtime is acceptable.
- Use `use_SGD=True` for large matrices where runtime is the bottleneck, accepting that probability calibration may need more tuning.
- Use `use_SGD=True, mini_batch=True` only when the reference has more cells than `batch_size`; consider `balance_cell_type=True` for rare labels.
- Use `with_mean=False` for sparse input to avoid densifying during scaling; consider `check_expression=False` only when the user intentionally trains on an HVG/subset matrix that cannot pass whole-transcriptome normalization checks.
- Use `feature_selection=True` only when the number of genes is greater than `top_genes` and the extra first-pass SGD cost is justified.

Files in this skill

  • SKILL.md2.6 KB
  • references/api-reference.md6.9 KB
  • references/training-workflows.md7 KB
  • references/troubleshooting.md5.6 KB
  • scripts/training_data_check.py12.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.