This repository contains Python notebooks that demonstrate the Numerics .NET library through pythonnet. The goal is to provide practical, reproducible examples for distributions, MCMC, optimization, statistics, time series, machine learning, and linear models.
notebooks/Jupyter notebooks organized by topicexamples/Focused scripts and end-to-end demos
00_getting_started.ipynbSetup and first run01_distributions.ipynbDistribution basics and plotting02_distribution_fitting.ipynbMOM/MLE/L-moments + goodness-of-fit03_mcmc_basics.ipynbIntro Bayesian inference and RWMH04_mcmc_bayesian_inference.ipynbPractical workflows and comparisons05_mcmc_adaptive.ipynbAdaptive MCMC samplers06_mcmc_diagnostics.ipynbDiagnostics (ESS, mixing, multimodal)07_integration_and_root_finding.ipynbNumerical methods08_optimization.ipynbLocal/global optimization09_statistics.ipynbCore statistics and tests10_time_series.ipynbTime series objects and analysis11_machine_learning.ipynbRF, KNN, trees, clustering12_linear_models.ipynbLinear/GLM workflows
- Windows with .NET installed (or .NET 6+ runtime on Linux/macOS)
- Python with pythonnet
- Numerics built locally so the DLL exists at the path used in notebooks
- Create and activate a Python environment.
- Install notebook requirements:
pip install -r notebook-requirements.txt. - Build Numerics and confirm the DLL path matches what the notebooks expect.
- Open notebooks in Jupyter or VS Code and run cells top to bottom.
- These notebooks compare Numerics to common Python libraries where relevant. When comparing MCMC chains, align warmup/thinning settings.
- Many examples use synthetic data to keep results consistent and easy to interpret.
If your Numerics build output is in a different location, update the DLL path in the setup cell of each notebook. Search for Numerics.dll and replace the path with your local build output.
See the Numerics project license for usage and distribution terms.