Dataset handling¶
Measurement datasets are a central part in model validation and therefore we designed the Dataset class that offer a number of useful methods to deal with them.
A typical workflow consists in casting your log-data into Signal objects and then use the created Signals to instantiate a Dataset object.
Signals¶
Signal are used to represent real-world signals.
Dymoval Signals are Typeddict with the following keys
Keys
Signal name. |
|
|
|
Signal unit. |
|
Signal sampling period. |
|
Signal sampling period. |
Functions
Dymoval offers few function for dealing with Signals. Such functions are the following
|
Perform a number of checks to verify that the passed list of |
|
Plot |
Dataset class¶
The Dataset class is used to store and manipulate datasets.
Since to validate a model you need a datasets, objects of this class are used also to instantiate ValidationSession objects, and the passed Dataset object becomes an attribute of the newly created ValidationSession object.
A Dataset object can be instantiated in two ways
Through a list of dymoval Signals (see
validate_signals()
)Through a pandas DataFrame with a specific structure (see
validate_dataframe()
)
Constructor
|
The |
Attributes
|
|
|
|
|
|
|
Manipulation methods
|
Add input signals to the |
|
Add output signals to the |
|
Remove signals from the |
|
Remove the mean value to the specified signals. |
|
Remove specified offsets to the specified signals. |
|
Replace NaN:s values in the |
|
Apply a function to specified signals and change their unit. |
|
Low-pass filter a list of specified signals. |
|
Return the FFT of the dataset as pandas DataFrame. |
|
Trim the Dataset |
Plotting methods
|
Plot the |
|
Plot a signal against another signal in a plane (XY-plot). |
|
Plot the dataset |
|
Plot the spectrum of the specified signals in the dataset in different format. |
|
Change Axes layout of an existing Matplotlib Figure. |
Other methods
Return the dataset values as a tuple (t,u,y) of numpy ndarrays. |
|
|
Write the dataset in a .mat file. |
Return the dataset values as a tuple (t,u,y) of numpy ndarrays. |
|
Return the list of signals in form (["INPUT" | "OUTPUT"], name, unit) |
|
Check if a pandas DataFrame is suitable for instantiating a |
|
|
Compare different |