emulator_bank
emulator_bank
EmulatorBank domain object for history matching.
Classes
EmulatorBank
Manages storage and retrieval of emulators across iterations.
EmulatorBank
emulator_bank.EmulatorBank()
Manages storage and retrieval of emulators across iterations.
The EmulatorBank stores emulators organized by iteration number and feature name, providing methods for adding, retrieving, and managing the emulator collection.
Methods
add_emulator
emulator_bank.EmulatorBank.add_emulator(iteration, feature, emulator)
Add an emulator for a specific iteration and feature.
Parameters
iteration
int
Iteration number (1-based)
required
feature
str
Feature name
required
emulator
BaseEmulator
Trained emulator instance
required
clear
emulator_bank.EmulatorBank.clear()
Remove all emulators.
copy
emulator_bank.EmulatorBank.copy()
Create a deep copy of the emulator bank.
Returns
EmulatorBank
New EmulatorBank instance with copied emulators
get_all_emulators
emulator_bank.EmulatorBank.get_all_emulators()
Get all emulators in the bank.
get_all_features
emulator_bank.EmulatorBank.get_all_features()
Get all unique feature names across all iterations.
Returns
List [str ]
List of unique feature names
get_all_iterations
emulator_bank.EmulatorBank.get_all_iterations()
Get list of iteration numbers with emulators.
Returns
List [int ]
Sorted list of iteration numbers
get_emulator
emulator_bank.EmulatorBank.get_emulator(iteration, feature)
Retrieve a specific emulator.
Parameters
iteration
int
Iteration number
required
feature
str
Feature name
required
get_emulators_for_iteration
emulator_bank.EmulatorBank.get_emulators_for_iteration(iteration)
Get all emulators for a specific iteration.
Parameters
iteration
int
Iteration number
required
get_features_for_iteration
emulator_bank.EmulatorBank.get_features_for_iteration(iteration)
Get feature names for a specific iteration.
Parameters
iteration
int
Iteration number
required
get_latest_emulators
emulator_bank.EmulatorBank.get_latest_emulators()
Get emulators from the most recent iteration.
get_summary_statistics
emulator_bank.EmulatorBank.get_summary_statistics()
Get summary statistics about the emulator bank.
Returns
Dict
Dict with summary information
has_emulator
emulator_bank.EmulatorBank.has_emulator(iteration, feature)
Check if an emulator exists for specific iteration and feature.
Parameters
iteration
int
Iteration number
required
feature
str
Feature name
required
Returns
bool
True if emulator exists, False otherwise
has_emulators
emulator_bank.EmulatorBank.has_emulators()
Check if any emulators exist in the bank.
Returns
bool
True if any emulators exist, False otherwise
load_from_directory
emulator_bank.EmulatorBank.load_from_directory(directory_path)
Load emulators from disk.
Parameters
directory_path
str
Directory containing saved emulators
required
remove_emulator
emulator_bank.EmulatorBank.remove_emulator(iteration, feature)
Remove a specific emulator.
Parameters
iteration
int
Iteration number
required
feature
str
Feature name
required
Returns
bool
True if emulator was removed, False if not found
remove_iteration
emulator_bank.EmulatorBank.remove_iteration(iteration)
Remove all emulators for a specific iteration.
Parameters
iteration
int
Iteration number to remove
required
save_to_directory
emulator_bank.EmulatorBank.save_to_directory(directory_path)
Save all emulators to disk.
Parameters
directory_path
str
Directory to save emulators in
required
summary
emulator_bank.EmulatorBank.summary()
Human-readable summary: emulators stored, by wave and feature.