curve_convergence#
- caf.toolkit.math_utils.curve_convergence(target, achieved)[source]#
Calculate the convergence between two curves.
Similar to r-squared, but weighted by the target values.
- Parameters:
target (ndarray) – A np.array listing y values on the curve we are aiming for
achieved (ndarray) – A np.array listing y values on the curve we have achieved
- Returns:
A float value between 0 and 1. Values closer to 1 indicate a better convergence.
- Return type:
convergence
- Raises:
ValueError: – If target and achieved are not the same shape