pyMAISE API Reference
pyMAISE offers ML generation and evaluation using five processes:
These processes allow you to define models of interest, tune them to your or one of the data sets within pMAISE, and assess their performance. Use this page for further information on a specific function or class. Feel free to click on the functions or classes to see their docstrings outlining arguments, outputs, and use.
Settings
Every pyMAISE script begins with defining some global
settings used throughout the package. This is done through the
pyMAISE.init() function, where you can define the pyMAISE.ProblemType,
level of output from pyMAISE, the number of hyperparameter configurations saved
for each model, and more.
Functions
Initialize pyMAISE global settings. |
Classes
Enum to define the problem type. |
Data Sets
pyMAISE includes several benchmark data sets used in the benchmark notebooks, which also serve as example notebooks when using pyMAISE. These data sets derive from several nuclear engineering applications and originate from literature. For information on the data sets past what is given here and in the function’s documentation, refer to the data references.
Each of these load functions exits under the pyMAISE.datasets module.
To import the MIT reactor data, for example, we can do the following:
from pyMAISE.datasets import load_MITR
From pyMAISE, we cannot directly access the data set load functions.
Functions
Load MIT reactor data. |
|
Load reactor physics data. |
|
Load fuel performance data. |
|
Load the heat conduction data. |
|
Load BWR Micro Core data. |
|
Load HTGR Micro Reactor data. |
|
Load NEACRP C1 rod ejection accident (REA) data. |
|
Load Critical Heat Flux (CHF) synthetic data. |
|
Load loss of coolant accident (LOCA) time series data. |
|
Load time series electronic signal data from Mendeley provided by [RPW+23, RPW+22]. |
Preprocessing
Using one of the provided data sets or your own, you can utilize the preprocessing
module to read data from a CSV file, split it into training and testing data,
and scale it. This module also offers methods specific to
classification problems, such as one hot encoding. You can use
pyMAISE.preprocessing.SplitSequence to create rolling windows of
your time series data and create a correlation matrix.
Like the data sets, the pyMAISE.preprocessing module functions cannot
be accessed from pyMAISE. So we import functions using:
from pyMAISE.preprocessing import train_test_split, scale_data
Warning
For multiclass classification problems, the output must be one hot-encoded for neural network models.
Functions
Read comma-separated values (csv) file into |
|
Split data into training and testing data sets. |
|
Scale training and testing data using the scaler provided. |
|
One hot encode multiclass classification data. |
|
Create a correlation matrix for a data set. |
Classes
Split sequence function for rolling windows of time series data. |
Tuning
The pyMAISE.Tuner allows you to specify models for hyperparameter
tuning and the tuning method you’d like to use. Additionally, the class
offers the pyMAISE.Tuner.convergence_plot() method for plotting
the tuning methods results.
Classes
Hyperparameter tuning object. |
Hyperparameters
When initializing a neural network model, you can use these classes so pyMAISE knows which hyperparameters you would like to tune.
Classes
Define an integer hyperparameter. |
|
Define an floating point hyperparameter. |
|
Define choice hyperparameter. |
|
Define a boolean hyperparameter. |
|
Define fixed hyperparameter. |
Postprocessing
Following the tuning of the specified models. You can use the
pyMAISE.PostProcessor to access the performance of your models.
This offers the ability to fit the models with different hyperparameters such
as more epochs and access their performance metrics on both training and
testing data. There are additional getters and visualization tools for
in-depth evaluation.
Classes
Assess the performance of the top-performing models. |