Welcome to simulai’s documentation!

simulai models

class simulai.models.ByPassModel
class simulai.models.DenseNetwork(architecture=None, config=None)
construct(input_dim, output_dim)

set the parameters and run the model

Parameters
  • input_dim – int number of input dimensions

  • output_dim – int number of output dimensions

Returns

fit(n_epochs, input_data=None, target_data=None, use_second_order_opt=True)
Parameters
  • n_epochs – int

  • input_data – np.ndarray

  • target_data

  • use_second_order_opt

Returns

None

network(input_data, weights, biases)
Parameters
  • input_data – np.ndarray

  • weights

  • biases

Returns

property weights
Returns

List[tf.Variable]

static xavier_init(size, index)

Based on https://github.com/maziarraissi/PINNs/blob/master/main/continuous_time_identification%20(Navier-Stokes)/NavierStokes.py

Parameters
  • size – List

  • index – int

Returns

tf.Variable

class simulai.models.Model

Models class

simulai simulation

class simulai.simulation.Pipeline(stages=None)

Pipeline class manages the execution of multiple operations such as data pre-processing (DataPreparer), ROM, and ML modeling (Model)

exec(data=None, input_data=None, target_data=None, reference_data=None, data_generator=None, fit_kwargs=None, extra_kwargs=None)
Parameters
  • data (np.ndarray) –

  • input_data (np.ndarray) –

  • target_data (np.ndarray) –

  • reference_data

  • data_generator

  • fit_kwargs

  • extra_kwargs

Returns

class simulai.simulation.Surrogate(input_var_names=None, target_var_names=None, forcing_var_names=None, data_preparer='no_preparer', model='no_model', rom='no_rom', hypersearch='no_hypersearch', postprocess_op='no_post_process_op', metric='no_metric', data_generator=None, model_config=None, data_preparer_config=None, rom_config=None, hypersearch_config=None, postprocess_op_config=None, data_generator_config=None, **kwargs)

Surrogate class.

Parameters
  • input_var_names (list(str)) – names of the surrogate input variables

  • target_var_names (list(str)) – names of the surrogate output variables

  • model (str) – Name of the model to be used (implemented in SimulAI)

  • rom (str) – Name of the Reduced Order Model to be used (implemented in SimulAI)

  • hypersearch – Name of the hyperparameter optimization method to be used (implemented in SimulAI)

  • model_config (dict) – Setup of the model object

  • rom_config (dict) – Setup of the rom object

  • hypersearch_config (dict) – Setup of the hypersearch object

simulai losses

simulai.losses.mse(output_data_ph, output_data_pred, regularization_penalty=None, weights=None)
Parameters
  • output_data_ph – tf.Variable description

  • output_data_pred – tf.Variable

  • regularization_penalty – float

  • weights – tf.Variable

Returns

Indices and tables