Skip to main content

Dipole Amplitude Predictor Module

Overview

The Dipole Amplitude Predictor is a module designed for predicting dipole amplitudes using a trained RandomForest model. The module is easy to install and use, providing a ready-to-use model for your applications.

Installation

To install the module via PyPI, simply use:

pip install DipoleAmplitudePredictor

Alternatively, you can refer to the code in the following GitHub repositories for more details:

Usage

Once installed, you can use the module as follows:

from DipoleAmplitudePredictor import RandomForestModel
import numpy as np

# Example input array (X_new) to predict dipole amplitudes
X_new = [6.80213521e-05, 7.60105631e-05, 8.49278899e-05, 9.48961447e-05, 1.06028156e-04, 1.18472109e-04, 1.32375933e-04, 1.47911787e-04, 1.65270689e-04, 1.84666744e-04, 2.06338769e-04, 2.30553961e-04, 2.57610535e-04, 2.87841893e-04, 3.21620436e-04, 3.59362142e-04, 4.01532030e-04, 4.48649085e-04, 5.01293915e-04, 5.60114007e-04, 6.25834181e-04, 6.99262232e-04, 7.81302824e-04, 8.72963753e-04, 9.75373848e-04, 1.08979043e-03, 1.21762157e-03, 1.36043585e-03, 1.51998909e-03, 1.69823794e-03, 1.89737105e-03, 2.11982869e-03, 2.36833796e-03, 2.64594136e-03, 2.95603541e-03, 3.30241181e-03, 3.68929871e-03, 4.12141876e-03, 4.60403227e-03, 5.14301691e-03, 5.74491243e-03, 6.41702695e-03, 7.16748365e-03, 8.00535812e-03, 8.94072927e-03, 9.98485026e-03, 1.11502092e-02, 1.24507328e-02, 1.39018663e-02, 1.55208053e-02, 1.73266076e-02, 1.93404444e-02, 2.15857595e-02, 2.40885269e-02, 2.68774740e-02, 2.99843248e-02, 3.34441065e-02, 3.72953477e-02, 4.15804846e-02, 4.63459745e-02, 5.16428064e-02, 5.75264818e-02, 6.40576123e-02, 7.13017086e-02, 7.93298126e-02, 8.82180267e-02, 9.80480664e-02, 1.08906458e-01, 1.20884816e-01, 1.34078623e-01, 1.48586950e-01, 1.64510703e-01, 1.81951410e-01, 2.01008806e-01, 2.21778229e-01, 2.44347425e-01, 2.68792050e-01, 2.95171693e-01, 3.23523061e-01, 3.53855443e-01, 3.86141501e-01, 4.20312850e-01, 4.56249093e-01, 4.93774961e-01, 5.32649387e-01, 5.72566639e-01, 6.13148821e-01, 6.53954286e-01, 6.94478267e-01, 7.34171849e-01, 7.72455242e-01, 8.08748270e-01, 8.42497531e-01, 8.73213445e-01, 9.00505412e-01, 9.24111984e-01, 9.43929546e-01, 9.60016623e-01, 9.72598746e-01, 9.82034747e-01, 9.88802034e-01]
c2_value = 2.5
x_bj_target = 1e-3
X_new.append(c2_value)
X_new.append(x_bj_target)
X_new = np.array(X_new).reshape(1, -1)
# Note: Ensure that X_new has a shape of (no. of samples, 103), where the first 101 features correspond to the R_grid. Append the C2 value and the x_bj value for the prediction.

# Initialize the model and make predictions
rf_model = RandomForestModel()
predictions = rf_model.predict(X_new)  
print(predictions)
print("R values: ", rf_model.Rgrid()) # R-Grid

Note: Ensure that X_new has a shape of (no. of samples, 103), where the first 101 features correspond to the R_grid. Append the C2 value and the x_bj value for the prediction.

Refer to the GitHub repositories for additional examples and details on the input format.

Contributing

Feel free to open issues or submit pull requests if you have improvements or feature requests. You can find detailed contributions guidelines in the GitHub repositories.

License

Check the GitHub repositories for licensing details.

Metadata

Release files for DipoleAmplitudePredictor 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for DipoleAmplitudePredictor 0.2.1
File Size Uploaded
dipoleamplitudepredictor-0.2.1.tar.gz 5.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for DipoleAmplitudePredictor 0.2.1
File Interpreter ABI Platform
DipoleAmplitudePredictor-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 10.3 kB

Release files / dipoleamplitudepredictor-0.2.1.tar.gz

Download URL dipoleamplitudepredictor-0.2.1.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
96282ee9b2956d9c7c058789d86a764047961712a71507e2e09d2540148e5f02
BLAKE2b-256 checksum
How to use checksums
c982b2d8b489969e6a84dd95816b0614af42fec94bd2663cb68b4abb6ed62c7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.4

Release files / DipoleAmplitudePredictor-0.2.1-py3-none-any.whl

Download URL DipoleAmplitudePredictor-0.2.1-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e58a768578f46ea5c9b62fb2f1e60b8803936bb89062a19d3ebd42cf421aac00
BLAKE2b-256 checksum
How to use checksums
f13a39321c7623fe224d3db1480ecbc80ba9ed8b7774e87dec25a472b6237dde
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.4

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page