Open amirzia opened 5 months ago
@ashvardanian Does the algorithm look good to you? If so, I'll proceed with implementing the same for other archs.
The code looks good, but looking at it, two passes over data look expensive. I'd assume a lot of people would pre-normalized series if they want to search them, and in that case they would simply call the dot product and divide the result. What do you think might be more useful - covariance, RMSD, or maybe Pearson correlation, @amirzia?
I found the single-pass version of covariance estimator, which I can implement.
I think among these, the Pearson correlation and then covariance are the most useful. In case the data is normalized the covariance and correlation are the same and they can be easily calculated.
I think still many people work with unnormalized data and having covariance or correlation estimators is valuable. For example, I found these two instances where libraries need to calculate covariance between two time series without assuming that data is normalized:
How do you think we should proceed?
Btw, we can add regression error metrics (RMSE, MAPE, ...) to simsimd. They're common in ML and time-series analysis.
Just leaving this here for future research - heal-research/vstat 🤗
Ref: #90