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

Pyaf 5.0 Final Touch 8 : Use an Optimal Choice Rule for the Quantization Signal transform #239

Closed
antoinecarme opened this issue Apr 4, 2023 · 3 comments

Comments

@antoinecarme
Copy link
Owner

When performing signal quantization, PyAF uses a set of bin numbers (Q=5, 10, 20). This is too slow. Use an optimal bin number selection rule (square root, diaconis, etc).

self.mQuantiles = [5, 10, 20]; # quintiles, deciles, and vingtiles;)

An easy rule for variable bin width, equi-frequency, is this one :

https://en.wikipedia.org/wiki/Histogram#Variable_bin_widths

The user choice, of course, will override this setting.

This issue only impacts slow modeling processes. Will not have impact by default.

@antoinecarme
Copy link
Owner Author

antoinecarme commented Apr 4, 2023

Optimal choice Detail : $Q = 2 N^{\frac{2}{5}}$

https://en.wikipedia.org/wiki/Histogram#Variable_bin_widths

image

@antoinecarme
Copy link
Owner Author

The new options parameter will server as a maximum for the number of bins (user-controllable).

self.mQuantiles = [ 20 ]; # vingtiles + use optimal rule

The optimal rule can give smaller values. The max will be 20 by default.

@antoinecarme
Copy link
Owner Author

Significant speedup : The number of threads used for quantization will go from 3 to 1.

antoinecarme added a commit that referenced this issue Apr 4, 2023
…e an Optimal Choice Rule for the Quantization Signal transform #239. Updated these logs
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

No branches or pull requests

1 participant