Getting started
This section covers the shortest path from a clone of the repository to a fitted capacity model. The project uses a src/ package layout and Poetry for dependency management.
Recommended path
- Install the package.
- Run the quickstart.
- Read the theory overview if capacities or Möbius representations are new to you.
- Follow one of the complete examples.
- Keep the API reference open while developing.
Package layout
The repository is organized approximately as follows:
capacities_ml_fin/
├── src/capacities_ml_fin/
│ ├── base/ # capacity objects, integrals, interpretation
│ ├── ml/ # estimators, optimization, preprocessing
│ ├── finance/ # returns, features, portfolio, alignment
│ └── risk/ # distributions, distortions, measures, backtesting
├── tests/
├── notebooks/
├── docs/
├── pyproject.toml
└── mkdocs.yml
The package intentionally keeps the mathematical layer independent from any single estimator. For example, a MobiusCapacity can be created manually, recovered from an ExplicitCapacity, produced by a fitted ChoquetRegressor, interpreted with Shapley indices, or used as a finite event capacity.
Typical development loop
When working on the documentation, mkdocs serve watches both docs/ and the package source configured in mkdocs.yml, so API changes can be reflected immediately.