Skip to content

Getting Started

1. Install

pip install cranalytics
# or: uv add cranalytics

Visualization (matplotlib, plotly, seaborn) and survival analysis (lifelines) are included in the base install.

If you choose an external modeling backend, install that backend directly:

uv add optbinning  # optimal WoE binning
uv add xgboost     # xgboost model families
uv add lightgbm    # lightgbm challenger workflows

2. Run the canonical first command

cranalytics quickstart

This is the recommended first-run experience. It shows the package workflows, walks through synthetic examples, and tells you what real-world data shape you need next. Your goal is one first win and one clear next step, not a full tour of every command.

If you already know the workflow you want, use the same entry point without the interactive menu:

cranalytics quickstart --workflow vintage
cranalytics quickstart --workflow lifetime-loss --show-requirements
cranalytics quickstart --workflow vintage --write-template
cranalytics quickstart --workflow feature-analytics --write-template

3. Pick the right workflow

Use one of these pages next:

If you already know the right workflow, those pages also point to the stable direct demo command, such as:

cranalytics demo vintage

quickstart is still the default recommendation for a new user.

4. Validate or prepare your own data

If you are starting with a portfolio snapshot, see what columns the built-in portfolio validator expects first:

cranalytics check --show-schema

Then validate your portfolio file:

cranalytics check your_data.csv

check auto-detects portfolio, vintage, rollforward, and feature-analytics schemas. Use <slug> check to select a workflow explicitly. Rollforward data also has a dedicated pre-flight command:

cranalytics rollforward check your_rollforward_data.csv --output-dir rollforward_readiness_out

For advanced ML modeling, survival, or other shapes without a CLI validator, use the workflow-specific references and tutorials, starting with Input Data Contracts.

Workflow Starter template Validation path
Lifetime loss forecasting Portfolio template cranalytics check your_data.csv
FICO segmentation Portfolio template cranalytics check your_data.csv
Portfolio simulation Portfolio template cranalytics check your_data.csv
Rollforward workflow Rollforward template cranalytics rollforward check your_rollforward_data.csv --output-dir rollforward_readiness_out
Vintage curve fitting Vintage template cranalytics vintage check your_data.csv
Feature analytics Feature analytics template cranalytics feature-analytics check your_data.csv
Advanced ML modeling, survival No starter template cranalytics <slug> check your_data.csv; see cranalytics <slug> run --help for required semantic mappings

5. Go deeper by workflow

6. Reference