Googles appar
Huvudmeny

Post a Comment On: cbloom rants

"02-10-14 - Understanding ANS - 9"

6 Comments -

1 – 6 of 6
Blogger Jarek Duda said...

Hi Charles,
I think your "bias 1 works better for the real data" corresponds to the fact that in real data there happen extremely low probable symbols - bias 1/2 approximates them as 1/L, while bias 1 a bit lower.
If we encode p_s sequence with encoder optimal for q_s distribution, the least probable symbols are the most significant:
deltaH ~ sum_s (p_s-q_s)^2/p_s

So for a good initializer, I would first take the extremely low probable symbols (let say < 0.5/L) as a singletons to the end of the table, and then use precise initialization for the remaining ones.
Additionally, as f[s]/L ~ p[s] quantization is not exact, for example the "bias" could be individually chosen: as a bit larger if p[s] < f[s]/L, or smaller otherwise.
... but the details need further work.
Best,
Jarek

February 10, 2014 at 5:16 PM

Blogger Cyan said...

I find the 1/x distribution picture very interesting. Maybe there could be a way to use that in calculating more precisely distribution weight.

February 12, 2014 at 10:45 AM

Blogger Cyan said...

I tried to reproduce your result, but so far got only a hint that it was the "general direction", not something as clean as your distribution picture.

Some differences :
- I'm using real-world input, not synthetic
- FSE distribution is not the same as yours, and is likely introducing some noise & distortion.

Anyway, it shows that the probability of a state is not necessarily a clean 1/X distribution graph, and will vary a lot depending on symbol distribution over the state table, something you hinted into your second graph.

March 20, 2014 at 4:43 PM

Blogger cbloom said...

Yes, you only get the perfect 1/x when the statistics of the data match the normalized counts exactly (eg. with synthetic data), and when the sort is "Duda's precise".

I still don't entirely understand the 1/x.

I'd like to see a proof that the optimal sort order must lead to a 1/x distribution, or vice-versa that a 1/x distribution must provide minimum code length.

March 21, 2014 at 7:56 AM

Blogger Pascal said...

note that you need to make sure that 'b' is not a power of 2. Otherwise, 'x' will be constant.


/skal

November 17, 2014 at 4:35 AM

Blogger Pascal said...

and, for the record, here is a C-version of the iteration, showing the emerging 1/x stationary distribution:

http://pastebin.com/NPqmsR8L

November 17, 2014 at 5:37 AM

You can use some HTML tags, such as <b>, <i>, <a>

This blog does not allow anonymous comments.

Comment moderation has been enabled. All comments must be approved by the blog author.

You will be asked to sign in after submitting your comment.