ComplexityMeasures.jl icon indicating copy to clipboard operation
ComplexityMeasures.jl copied to clipboard

Slices of higher-dimensional `Counts` and `Probabilities` should yield new `Counts` and `Probabilities`

Open kahaaga opened this issue 1 year ago • 3 comments

Relevant outcomes also must be propagated

kahaaga avatar Dec 21 '23 14:12 kahaaga

On second thought, this is speculative.

Slicing a Probabilities array means the Probabilities will be re-normalized. In most use cases, that is probably not what a user would want.

The reason I thought of it is that viewing a probabilities array should look nice (outcomes should be displayed in the margins) even when slicing. But I don't immediately see how this can be achieved without breaking the contract that the probabilities must sum to 1.

kahaaga avatar Dec 22 '23 11:12 kahaaga

Does this has any use to begin with...? Marginal propabilities are not slices anyways.

Datseris avatar Dec 28 '23 10:12 Datseris

For counts it has meaning to slice. For probabilities less so - it would have to be a new type.

In terms of pretty printing, it does have meaning to slice, because one may want to look at some subset of the data other than the default printed slice. But I don't consider this important enough to postpone 3.0. It can be done at a later stage, perhaps by just creating a view that explicitly lets the user know that they are looking at a subset. If we deem it necessary.

kahaaga avatar Dec 28 '23 12:12 kahaaga