Contributions should help answer a concrete credit-risk or fraud-modeling question. This repository is not a catalogue of every class-imbalance algorithm.
Do not submit customer data, production thresholds, internal rules, model weights, credentials, proprietary pseudocode, or third-party binaries without explicit redistribution permission.
python -m pip install -e ".[dev]"
python -m pytest -q
python -m ruff check .
python scripts/check_repository.py
python -m build
python scripts/smoke_wheel.py- Public identifiers and docstrings use English.
- Business examples may use concise Chinese comments when they clarify the Chinese credit context.
- Stable numerical functions must reject non-finite values and ambiguous labels rather than silently coercing them.
- Sampling belongs inside a training pipeline; validation, test, and OOT partitions remain untouched.
- New stable behavior requires exact-value, invalid-input, and invariant tests.
- A D implementation must name its H source, document deliberate semantic changes, and add characterization or golden tests before refactoring.
- Do not copy or modernize Q material until its source and license are resolved.
Separate these layers explicitly:
- sample population and label observability;
- training intervention;
- ranking;
- probability interpretation;
- decision and portfolio effect.
Historical claims should be preserved with modern applicability notes, not silently rewritten as if they were current conclusions.
- Maintainer-authored commits in the 2026 preservation update use the author and committer identity
Ma Xiao. - Do not rewrite published historical authors or use
.mailmapto make modern work appear historical. - Keep H files byte-preserved. Put translations, corrections, and modern qualifications in D documents instead of editing the original.
- Record each new H-to-D relationship in
docs/history/provenance.mdand updatelegacy/MANIFEST.mdwhen the asset status changes.
Keep rules, code, tests, Chinese docs, English docs, legacy governance, packaging, and CI in separate commits. Do not mix line-ending normalization or third-party-binary removal into content edits.
Do not use git add . or git add -A; review and stage explicit paths by theme. The current phase 1-3 authorization covers the selected branch push and a draft pull request only. A default-branch merge, tag, Release, PyPI upload, deployment, rebase, force-push, or history rewrite requires separate authorization.