Skip to main content

A Python library that implements Parametric Neural Networks (PNN) for use in high-energy physics and beyond.

Project description

PNNplus

PNNplus is a Python library that implements Parametric Neural Networks (PNN) for use in high-energy physics and beyond.

Installation

pip install pnnplus

Usage

Function descriptions can be found in pnnplus.py.

Example usage:

from pnnplus import *

pnn_plus = PNNplus(features=['f1', 'f2', 'f3', 'f4'], mass_columns=['mass'], weight_column='weight')
pnn_plus.load_dataset('../dataset/signal.csv', '../dataset/background.csv')

pnn_plus.plot_feature_distribution()
feature_correlation = pnn_plus.calc_feature_correlation_all()
pnn_plus.plot_mass_distribution()

pnn_plus.transform_dataset(save_feature_scaler='feature_scaler.pkl', save_mass_scaler='mass_scaler.pkl')
# pnn_plus.transform_dataset(load_feature_scaler='feature_scaler.pkl', load_mass_scaler='mass_scaler.pkl')

pnn_plus.train_model(save_file='model.keras')
# pnn_plus.load_model(save_file='model.keras')
# evaluate_results = pnn_plus.evaluate_model()

auc_df = pnn_plus.calc_auc_all()
pnn_plus.plot_score_all()
pnn_plus.plot_cut_efficiency_all()
importance_dfs = pnn_plus.calc_feature_importance_all()

License

PNNplus is licensed under the GNU General Public License v3.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pnnplus-0.1.5.tar.gz (25.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pnnplus-0.1.5-py3-none-any.whl (24.7 kB view details)

Uploaded Python 3

File details

Details for the file pnnplus-0.1.5.tar.gz.

File metadata

  • Download URL: pnnplus-0.1.5.tar.gz
  • Upload date:
  • Size: 25.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.11

File hashes

Hashes for pnnplus-0.1.5.tar.gz
Algorithm Hash digest
SHA256 a51ed4f5b54fc9f6398950f283ff0fe597d75d522b26e109b6857245fc4b486d
MD5 19a8e3c926084ed270ad031d694f65de
BLAKE2b-256 aa95f6cd414766fb66b7364edb80a24baae77f7a8452a220cc0f24f110e52c36

See more details on using hashes here.

File details

Details for the file pnnplus-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: pnnplus-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 24.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.11

File hashes

Hashes for pnnplus-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 5485e41a0feb67473e4513527546ed9ca8f4f6835b071016c318c19c88bb96fd
MD5 ee8398fd12732ace8a5eeafeac69b599
BLAKE2b-256 75c7bd7cf3afb1040635c71473e215307b5e616082470cfda95ad528f2178fb7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page