mmgp.processing

Functions

read_proj_in_coord_fields(→ numpy.ndarray)

Read and concatenate coordinate fields from a Sample object.

train(→ dict)

Train a model using provided data in the ProblemDefinition and configuration settings.

infer(→ dict)

Perform inference using the provided ProblemDefinition instance and configuration settings.

Module Contents

mmgp.processing.read_proj_in_coord_fields(sample: plaid.containers.sample.Sample, zone_name: str, base_name: str) numpy.ndarray[source]

Read and concatenate coordinate fields from a Sample object.

Parameters:
  • sample (Sample) – The Sample object containing coordinate fields.

  • zone_name (str) – The zone name of the coorinates fields.

  • base_name (str) – The base name of the coordinate fields.

Returns:

A NumPy array containing concatenated coordinate fields.

Return type:

np.ndarray

mmgp.processing.train(configuration: dict, problem: plaid.problem_definition.ProblemDefinition) dict[source]

Train a model using provided data in the ProblemDefinition and configuration settings.

Parameters:
  • configuration (dict) – A dictionary containing various parameters and settings for the training process. It should include the following keys: - ‘case_name’ (str): The name or identifier for the specific case or scenario being analyzed. - ‘base_name’ (str): The name of a specific base on which to train the model. - ‘zone_name’ (str): The name of a specific zone on which to train the model. - ‘generated_data_folder’ (str): A string representing the folder where the training data and model will be saved.

  • problem (ProblemDefinition) – An instance of ProblemDefinition class containing the training data and problem-specific information, such as input and output names.

Caution

This function will load the morphed and projected PLAID dataset. Make sure it has been created and is located correctly.

mmgp.processing.infer(configuration: dict, problem: plaid.problem_definition.ProblemDefinition) dict[source]

Perform inference using the provided ProblemDefinition instance and configuration settings.

Parameters:
  • configuration (dict) – A dictionary containing various parameters and settings for the inference process. It should include the following keys: - ‘init_dataset_location’ (str): A string specifying the location or path to the initial PLAID dataset. - ‘generated_data_folder’ (str): A string representing the folder where the inference results will be saved. - ‘case_name’ (str): The name or identifier for the specific case or scenario being analyzed. - ‘base_name’ (str): The name of a specific base on which to perform inference. - ‘zone_name’ (str): The name of a specific zone on which to perform inference.

  • problem (ProblemDefinition) – An object of the ProblemDefinition class containing the inference data and problem-specific information.

Caution

This function will load the morphed and projected PLAID dataset and the initial PLAID dataset. Make sure it has been created and is located correctly.