lasdi.param

Attributes

getParam1DSpace

Classes

ParameterSpace

Functions

get_1dspace_from_list(config)

create_uniform_1dspace(config)

Module Contents

lasdi.param.get_1dspace_from_list(config)
lasdi.param.create_uniform_1dspace(config)
lasdi.param.getParam1DSpace
class lasdi.param.ParameterSpace(config)
param_list = []
param_name = []
n_param = 0
train_space = None
test_space = None
n_init = 0
test_grid_sizes = []
test_meshgrid = None
n_train()
n_test()
createInitialTrainSpace(param_list)
createInitialTrainSpaceForHull(param_list)

Concatenates the provided lists of training points into a 2D array.

Parameters:

param_list (list(dict)) – A list of parameter dictionaries

Returns:

mesh_grids – np.array of size [d, k], where d is the number of points provided on the exterior of the training space and k is the number of parameters (k == len(param_list)).

Return type:

numpy.array

createTestGridSpace(param_list)
createTestGridSpaceForHull(param_list)

Builds an initial uniform grid for the testing parameters when the test_space is ‘hull’.

Parameters:

param_list (list(dict)) – A list of parameter dictionaries

Returns:

  • gridSizes (list(int)) – A list containing the number of elements on the grid in each parameter.

  • mesh_grids (numpy.array) – tuple of numpy nd arrays, corresponding to each parameter. Dimension of the array equals to the number of parameters.

  • param_grid (numpy.array) – numpy 2d array of size (grid size x number of parameters).

createTestHullSpace(param_list)

This function builds an initial uniform grid for the testing parameters, and then returns any testing points which are within the convex hull of the provided training parameters.

Parameters:

param_list (list(dict)) – A list of parameter dictionaries

Returns:

  • gridSizes (list(int)) – A list containing the number of elements on the grid in each parameter.

  • mesh_grids (numpy.array) – tuple of numpy nd arrays, corresponding to each parameter. Dimension of the array equals to the number of parameters.

  • test_space (numpy.array) – numpy 2d array of size [d, k], where d is the number of testing points within convex hull of the training space and k is the number of parameters (k == len(param_list)).

getParameter(param_vector)

convert numpy array parameter vector to a dict. Physics class takes the dict for solve/initial_condition.

createHyperMeshGrid(param_ranges)
param_ranges: list of numpy 1d arrays, each corresponding to 1d parameter grid space.

The list size is equal to the number of parameters.

Output: paramSpaces
  • tuple of numpy nd arrays, corresponding to each parameter. Dimension of the array equals to the number of parameters

createHyperGridSpace(mesh_grids)
mesh_grids: tuple of numpy nd arrays, corresponding to each parameter.

Dimension of the array equals to the number of parameters

Output: param_grid
  • numpy 2d array of size (grid size x number of parameters).

grid size is the size of a numpy nd array.

appendTrainSpace(param)
export()
load(dict_)