- class aydin.regression.perceptron.PerceptronRegressor(max_epochs: int = 1024, learning_rate: float = 0.001, patience: int = 10, depth: int = 6, loss: str = 'l1')
The Perceptron Regressor uses a simple multi-layer perceptron neural network. The big disadvantage of neural-network regressors is that they are trained stochastically, which usually means that when your run them twice you also get two different results. In some cases there can be significant variance between runs which can be problematic when trying to compare results.
- fit(x_train, y_train, x_valid=None, y_valid=None, regressor_callback=None)
Fits function y=f(x) given training pairs (x_train, y_train). Stops when performance stops improving on the test dataset: (x_test, y_test). The target y_train can have multiple ‘channels’. This will cause multiple regressors to be instanciated internally to be able to predict these channels from the input features.
x training values
y training values
x validation values
y validation values
- static load(path: str)
Returns an ‘all-batteries-included’ regressor from a given path (folder).
path to load from.
- predict(x, models_to_use=None)
Predicts y given x by applying the learned function f: y=f(x) If the regressor is trained on multiple ouput channels, this will return the corresponding number of channels…
inferred y values
- recommended_max_num_datapoints() int
Recommended maximum number of datapoints
- save(path: str)
Saves an ‘all-batteries-included’ regressor at a given path (folder).
path to save to
- frozenEncoded JSON object
Stops training (can be called by another thread)