vindy.callbacks package
Submodules
vindy.callbacks.pdf_threshold_callback module
- class PDFThresholdCallback(*args: Any, **kwargs: Any)[source]
Bases:
CallbackCallback for the VINDy layer to cancel coefficients based on PDF thresholding.
This callback sets all coefficients of the VINDy layer to zero if their corresponding probability density function at zero is above the threshold.
- Parameters:
freq (int, default=1) – Frequency of coefficient cancellation (every freq-th epochs).
threshold (float, default=1) – Threshold for cancellation (coefficients with pdf(0) > threshold are zeroed).
on_train_end (bool, default=False) – Perform thresholding at end of training.
**kwargs – Additional keyword arguments passed to tf.keras.callbacks.Callback.
- __init__(freq=1, threshold=1, on_train_end=False, **kwargs)[source]
Callback for the VINDy layer to cancel coefficients based on PDF thresholding.
This callback sets all coefficients of the VINDy layer to zero if their corresponding probability density function at zero is above the threshold.
- Parameters:
freq (int, default=1) – Frequency of coefficient cancellation (every freq-th epochs).
threshold (float, default=1) – Threshold for cancellation (coefficients with pdf(0) > threshold are zeroed).
on_train_end (bool, default=False) – Perform thresholding at end of training.
**kwargs – Additional keyword arguments passed to tf.keras.callbacks.Callback.
vindy.callbacks.save_coefficients_callback module
- class SaveCoefficientsCallback(*args: Any, **kwargs: Any)[source]
Bases:
CallbackCallback for logging SINDy coefficients during training.
- Parameters:
freq (int, default=1) – Frequency of saving the coefficients (every freq-th epoch).
**kwargs – Additional keyword arguments passed to
tf.keras.callbacks.Callback.
vindy.callbacks.spotify_callback module
vindy.callbacks.threshold_prune_callback module
- class ThresholdPruneCallback(*args: Any, **kwargs: Any)[source]
Bases:
CallbackCallback for thresholding SINDy coefficients during training.
This callback sets all coefficients of the SINDy layer to zero if their value is below a certain threshold.
- Parameters:
freq (int, default=1) – Frequency of coefficient cancellation (every freq-th epochs).
threshold (float, default=0.01) – Threshold for cancellation (coefficients with |value| < threshold are zeroed).
on_train_end (bool, default=False) – Perform thresholding at end of training.
start_epoch (int, default=0) – First epoch for which the thresholding is applied.
- __init__(freq=1, threshold=0.01, on_train_end=False, start_epoch=0)[source]
Callback for thresholding SINDy coefficients during training.
This callback sets all coefficients of the SINDy layer to zero if their value is below a certain threshold.
- Parameters:
freq (int, default=1) – Frequency of coefficient cancellation (every freq-th epochs).
threshold (float, default=0.01) – Threshold for cancellation (coefficients with |value| < threshold are zeroed).
on_train_end (bool, default=False) – Perform thresholding at end of training.
start_epoch (int, default=0) – First epoch for which the thresholding is applied.