datamod package

Module contents

Data handling module.

The aim of the datamod package is to handle the data.

class datamod.get_data(file)

Bases: object

Import data from an external file.

dim_in

Number of input dimensions.

Type:int
col_names

Names of columns.

Type:list
dim_out

Number of output dimensions.

Type:int
coordinates

Samples coordinates.

Type:np.array
response

Sample response.

Type:np.array
input

Normalized input samples.

Type:np.array
output

Normalized output samples.

Type:np.array
norm_in

Input normalization factors.

Type:np.array
norm_out

Output normalization factors.

Type:np.array
range_in

Range of the input data.

Type:np.array
range_out

Range of the output data.

Type:np.array
datamod.get_range(data)

Determine the range of the data.

Parameters:data (np.array) – Data to analyze.
Returns:Ranges of the given data.
Return type:ranges (np.array)
datamod.load_problem(name)

Load a pre-defined benchmark problem.

Parameters:name (str) – Name of the desired problem.
Returns:Benchmark problem. range_in (np.array): Input parameter allowable ranges. dim_in (int): Number of input dimensions. dim_out (int): Number of output dimensions. n_constr (int): Number of constraints.
Return type:problem ()
datamod.normalize(data)

Normalize the data to the [-1,1] range.

Parameters:data (np.array) – Data to normalize.
datamod.scale(data, ranges)

Scale data from [-1,1] range to original range.

Parameters:
  • data (np.array) – Data to scale.
  • ranges (np.array) – Normalization ranges.
Returns (np.array):
data_scale: Scaled data.