Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add covariance estimator #140

Draft
wants to merge 2 commits into
base: main-dev
Choose a base branch
from
Draft

Conversation

amirzia
Copy link

@amirzia amirzia commented Jun 12, 2024

Ref: #90

@amirzia
Copy link
Author

amirzia commented Jun 12, 2024

@ashvardanian Does the algorithm look good to you? If so, I'll proceed with implementing the same for other archs.

@ashvardanian
Copy link
Owner

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?

@amirzia
Copy link
Author

amirzia commented Jun 13, 2024

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.

@ashvardanian
Copy link
Owner

Just leaving this here for future research - heal-research/vstat 🤗

@ashvardanian ashvardanian force-pushed the main-dev branch 2 times, most recently from b0bc0da to b816617 Compare September 6, 2024 04:04
@ashvardanian ashvardanian force-pushed the main-dev branch 3 times, most recently from 54ae495 to fb1e864 Compare October 8, 2024 01:52
@ashvardanian ashvardanian force-pushed the main-dev branch 2 times, most recently from 48ac9e4 to 5d9a219 Compare November 26, 2024 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants