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

from pnnplus import *

pnn_plus = PNNplus(features=['f1', 'f2', 'f3', 'f4'], mass_columns=['mass'], weight_column='weight', random_seed=69)
pnn_plus.load_data('../data/signal.csv', '../data/background.csv')

pnn_plus.plot_feature_distribution(mass_list=[[200], [400], [600]])
feature_correlation = pnn_plus.calc_feature_correlation_all(mass_list=[[200], [400], [600]])
pnn_plus.plot_mass_distribution()

pnn_plus.transform_data(save_feature_scaler='feature_scaler.pkl', save_mass_scaler='mass_scaler.pkl')
# pnn_plus.transform_data(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(mass_list=[[200], [400], [600]])
pnn_plus.plot_score_all(mass_list=[[200], [400], [600]])
pnn_plus.plot_cut_efficiency_all(mass_list=[[200], [400], [600]])
importance_dfs = pnn_plus.calc_feature_importance_all(mass_list=[[200], [400], [600]])

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.1.tar.gz (23.0 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.1-py3-none-any.whl (22.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pnnplus-0.1.1.tar.gz
  • Upload date:
  • Size: 23.0 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.1.tar.gz
Algorithm Hash digest
SHA256 471bf44be6a4ebc4f86fcbc48b6ef583a4c6351f74b9da488c173f0e29189f3f
MD5 fa8f0ef49329acb75646e4cc49c75b90
BLAKE2b-256 9641d0beef578b007238207d977cabd13a541e8e281835081cb9c8f8c9d67a40

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pnnplus-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 22.6 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2ab2ad67789375f400c06c6a4936423bb1cfc29341a456b64758771449ac6b87
MD5 b4b21f7fd653121b0b3525dc29ea5a33
BLAKE2b-256 1169ad27be0ffcaa6833d69b6aa73294b2fa2fec1d1d3c69b8c66e2a56f4d3f1

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