Skip to content

Instantly share code, notes, and snippets.

View JeremyWhittaker's full-sized avatar

Jeremy Whittaker JeremyWhittaker

View GitHub Profile
@JeremyWhittaker
JeremyWhittaker / MARDE
Created April 7, 2023 16:28
Mean Absolute Relative Difference Error (MARDE) Metric for Improved Forecasting Evaluation
def mean_absolute_volatility_error(y_true: Union[List[float], np.ndarray], y_pred: Union[List[float], np.ndarray]) -> float:
"""
Calculate the mean absolute volatility error for the given true and predicted values.
:param y_true: List or numpy array of true values
:param y_pred: List or numpy array of predicted values
:return: Mean absolute volatility error (in percentage)
"""
# Convert input lists to numpy arrays
y_true, y_pred = np.array(y_true), np.array(y_pred)
@JeremyWhittaker
JeremyWhittaker / pdf_to_mp3.ipynb
Last active February 26, 2024 18:46
pdf_to_mp3.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.