Skip to content

Conversation

@JaLuka98
Copy link
Owner

@JaLuka98 JaLuka98 commented Sep 3, 2025

This pull request introduces the initial implementation of the NPKit library, a toolkit for frequentist inference and Neyman construction, along with examples and documentation updates. The main changes include the introduction of core modules for observables, likelihoods, Neyman belt construction, and plotting, as well as project renaming and dependency updates. Below are the most important changes:

Core Library Implementation:

  • Added the initial NPKit package in src/npkit/, including modules for observables (observables.py), measurements (measurements.py), likelihoods (likelihood.py), Neyman belt construction and inversion (neyman.py), statistical utilities (stats.py), and plotting (plot.py). The main entry point and exports are defined in __init__.py. [1] [2] [3] [4] [5] [6]

Examples:

  • Added example scripts demonstrating basic usage of the library for single and multiple observables, Neyman belt construction and inversion, and removed the old root-finding example. [1] [2] [3]

Project Renaming and Metadata:

  • Renamed the project from template-python-lib to NPKit across all files, including pyproject.toml, documentation, and URLs. Updated the project description and dependencies (added scipy). [1] [2] [3] [4] [5]

Documentation:

  • Updated documentation files (README.md, Sphinx config, and index) to reflect the new project name and purpose, and removed template-related instructions. [1] [2] [3]

Tooling and Linting:

  • Removed the .flake8 configuration file, indicating a shift to other linting tools (e.g., Ruff).

@JaLuka98 JaLuka98 requested a review from Copilot September 3, 2025 08:04
@JaLuka98 JaLuka98 self-assigned this Sep 3, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces the initial stable implementation of NPKit, a Python library for frequentist inference and Neyman construction. The changes transform a template Python library into a complete statistical toolkit focused on confidence interval construction using profile likelihood ratios and Neyman belts.

  • Replaces the template library structure with a comprehensive statistical inference toolkit
  • Implements core functionality for observables, Gaussian models, likelihood computation, and Neyman belt construction
  • Updates project metadata, documentation, and examples to reflect the new library purpose

Reviewed Changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/npkit/__init__.py Main package initialization with core exports for the NPKit library
src/npkit/observables.py Observable and ObservableSet classes for defining model predictions
src/npkit/measurements.py Combination class for handling measured data with covariance
src/npkit/likelihood.py Gaussian model and likelihood implementations for statistical inference
src/npkit/stats.py Statistical utilities including MLE fitting and profile likelihood ratios
src/npkit/neyman.py Neyman belt construction and confidence interval inversion
src/npkit/plot.py Plotting utilities for visualizing Neyman belts
src/npkit/utils.py Utility functions for random number generation
tests/test_wilks_linear.py Test for linear model Wilks theorem validation
tests/test_chernoff_boundary.py Test for Chernoff boundary behavior at parameter boundaries
examples/minimal_example.py Basic usage example demonstrating single observable case
examples/multiple_observable_example.py Example showing multiple observable inference
pyproject.toml Updated project metadata, name, and dependencies
README.md Simplified documentation reflecting new project purpose
docs/source/conf.py Updated Sphinx configuration for NPKit documentation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@JaLuka98 JaLuka98 merged commit 0e589f9 into main Sep 3, 2025
2 checks passed
@JaLuka98 JaLuka98 deleted the first_version branch September 3, 2025 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants