ML models for DIII-D BES data
To use this repo, clone it and add the repo directory to $PYTHONPATH
. To contribute to this repo, branch off of main
, push the feature branch to Github, and submit PRs. Prior to submitting PRs, pull and merge any updates from main
and run pytest.
bes_ml/
contains modules and classes to create, train, and analyze BES ML models. bes_ml.base
contains the base classes, and other modules under bes_ml
contain specific applications that import bes_ml.base
. Each application directory should contain train.py
and analyze.py
modules. Example usage:
from elm_regression import Trainer, Analyzer
model = Trainer()
model.train()
model_analyzer = Analyzer()
model_analyzer.plot_training()
model_analyzer.run_inference()
model_analyzer.plot_inference()
model_analyzer.show()
The primary code objects are:
- Base class
_Trainer
inbes_ml.base.train_base
and application-specific subclasses likeELM_Classification_Trainer
inbes_ml.elm_classification.train
. - Similarly, base class
_Analyzer
inbes_ml.base.analyze_base
and applicaiton-specific subclasses likeELM_Regression_Analyzer
inbes_ml.elm_classification.analyze
- Model class
Multi_Features_Model
inbes_ml.base.models
.Multi_Features_Model
is composed of different types of features such as CNN features, dense features, FFT features, etc. All feature are a subclass of_Base_Features
inbes_ml.base.models
.
bes_data/
contains small sample datasets (~10 MB HDF5 files) to assist with code development and tools to package BES data on the GA cluster. test/
contains pytest tests.
Additional examples can be inferred from the test scripts and from if __name__ == ...
blocks in modules.