ace.model module
The Model module is a front-end to the ace.ace module.
ACE itself just gives transformations back as discontinuous data points. This module loads data, runs ACE, and then performs interpolations on the results, giving the user continuous functions that may be evaluated at any point within the range trained.
This is a convenience/frontend/demo module. If you want to control ACE yourself, you may want to just use the ace module manually.
- ace.model.read_column_data_from_txt(fname)[source]
Read data from a simple text file.
Format should be just numbers. First column is the dependent variable. others are independent. Whitespace delimited.
- Returns:
- x_valueslist
List of x columns
- y_valueslist
list of y values
- ace.model.linear_interpolator(x_values, y_values)[source]
Build a piecewise-linear function through scattered (x, y) points.
Beyond the range of the data, the function holds the y value of the nearest end point.
- Parameters:
- x_valuesiterable
abscissas, in any order
- y_valuesiterable
ordinates corresponding to each x value
- Returns:
- function
Callable that evaluates the interpolation at a float or array of x values
- class ace.model.Model[source]
Bases:
objectA continuous model of data based on ACE regressions.
- build_model_from_txt(fname)[source]
Construct the model and perform regressions based on data in a txt file.
- Parameters:
- fnamestr
The name of the file to load.
- build_model_from_xy(x_values, y_values)[source]
Construct the model and perform regressions based on x, y data.