lasdi.param =========== .. py:module:: lasdi.param Attributes ---------- .. autoapisummary:: lasdi.param.getParam1DSpace Classes ------- .. autoapisummary:: lasdi.param.ParameterSpace Functions --------- .. autoapisummary:: lasdi.param.get_1dspace_from_list lasdi.param.create_uniform_1dspace Module Contents --------------- .. py:function:: get_1dspace_from_list(config) .. py:function:: create_uniform_1dspace(config) .. py:data:: getParam1DSpace .. py:class:: ParameterSpace(config) .. py:attribute:: param_list :value: [] .. py:attribute:: param_name :value: [] .. py:attribute:: n_param :value: 0 .. py:attribute:: train_space :value: None .. py:attribute:: test_space :value: None .. py:attribute:: n_init :value: 0 .. py:attribute:: test_grid_sizes :value: [] .. py:attribute:: test_meshgrid :value: None .. py:method:: n_train() .. py:method:: n_test() .. py:method:: createInitialTrainSpace(param_list) .. py:method:: createInitialTrainSpaceForHull(param_list) Concatenates the provided lists of training points into a 2D array. :Parameters: **param_list** (:obj:`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)). :rtype: :obj:`numpy.array` .. py:method:: createTestGridSpace(param_list) .. py:method:: createTestGridSpaceForHull(param_list) Builds an initial uniform grid for the testing parameters when the test_space is 'hull'. :Parameters: **param_list** (:obj:`list(dict)`) -- A list of parameter dictionaries :returns: * **gridSizes** (:obj:`list(int)`) -- A list containing the number of elements on the grid in each parameter. * **mesh_grids** (:obj:`numpy.array`) -- tuple of numpy nd arrays, corresponding to each parameter. Dimension of the array equals to the number of parameters. * **param_grid** (:obj:`numpy.array`) -- numpy 2d array of size (grid size x number of parameters). .. py:method:: 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** (:obj:`list(dict)`) -- A list of parameter dictionaries :returns: * **gridSizes** (:obj:`list(int)`) -- A list containing the number of elements on the grid in each parameter. * **mesh_grids** (:obj:`numpy.array`) -- tuple of numpy nd arrays, corresponding to each parameter. Dimension of the array equals to the number of parameters. * **test_space** (:obj:`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)). .. py:method:: getParameter(param_vector) convert numpy array parameter vector to a dict. Physics class takes the dict for solve/initial_condition. .. py:method:: 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 .. py:method:: 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. .. py:method:: appendTrainSpace(param) .. py:method:: export() .. py:method:: load(dict_)