Evaluate NeurEco Parametric Frequency Sweep model with the Python API#

To evaluate a NeurEco Parametric Frequency Sweep model in Python API, NeurEcoFrequential library:

from NeurEco import NeurEcoFrequential as Frequential

Initialize a NeurEco object to handle the Parametric Frequency Sweep problem:

model = Frequential.PFS()

Build NeurEco Parametric Frequency Sweep model with the Python API or load previously build and saved to “the/path/to/the/saved/parametric/frequency/sweep/model.efnn” model:

model.load("the/path/to/the/saved/parametric/frequency/sweep/model.efnn")

Once model contains a Parametric Frequency Sweep model, call method evaluate with the parameters set accordingly to the data to evaluate:

model.evaluate(inputs,
               vec=None)

Evaluates a Parametric Frequency Sweep model.

inputs

required, NumPy array, dtype=float64 : input data array: shape \((n,\ m)\) where \(n\) is the number of samples and \(m\) is the number of input variables.

vec

optional, NumPy array: perform evaluation with the model’s weights set to values in vec

return

NumPy array of outputs: shape \((n, p)\), where \(n\) is the number of samples and \(p\) is the number of output variables

For more information on the data format, see Data preparation for NeurEco Parametric Frequency Sweep with the Python API.