"DummyBasis" for pre-segmented data?

23 views
Skip to first unread message

Andrew Medford

unread,
Apr 29, 2016, 8:05:42 AM4/29/16
to PyMKS General
In pyMKS 0.2 it was easy to do 2pt stats on pre-segmented data, since the "discretize" call happened outside of the "correlate" function. It looks like a more sophisticated approach has been used in pyMKS 0.3, likely to account for indexed data like the Euler angles for the GSH basis. However, in the even that you have pre-segmented data, it is now unclear how to work with it. 

How much effort would be required to create a "DummyBasis" or "PreSegmentedBasis" that assumes that the input data is already discretized? I looked into this briefly, but it seems like it might be easier for someone more familiar with the current interaction between the basis class and the correlate function.

Daniel Wheeler

unread,
Apr 29, 2016, 9:54:04 AM4/29/16
to PyMKS General
Sorry, forgot to hit reply-all for this.


---------- Forwarded message ----------
From: Andrew Medford <ajme...@gmail.com>
Date: Fri, Apr 29, 2016 at 9:37 AM
Subject: Re: "DummyBasis" for pre-segmented data?
To: Daniel Wheeler <daniel....@gmail.com>


Thanks Daniel. I created an issue... there is no rush since I am just
playing around with some proof-of-concept stuff and can just use pyMKS
0.2 for now, but it seems like a useful addition that shouldn't be too
much work.

On Fri, Apr 29, 2016 at 9:25 AM, Daniel Wheeler
<daniel....@gmail.com> wrote:
>
> Hi Andrew,
>
> I think that would be easy to implement. Would you like to submit an
> issue on Github for that? If no one else does, I'll try and take care
> off it the week after next.
>
> Thanks,
>
> Daniel
> > --
> > You received this message because you are subscribed to the Google Groups
> > "PyMKS General" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to pymks-genera...@googlegroups.com.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/pymks-general/e3ff59b7-bc4f-4aaa-989a-df48ae2e7a3f%40googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> Daniel Wheeler




--
Daniel Wheeler

David Brough

unread,
Apr 29, 2016, 11:37:22 AM4/29/16
to PyMKS General
Andrew,

You can use the PrimitiveBasis with data that is already segmented.

For instance in PyMKS 0.3, if your segmented data has three local states
and the labels are (0, 1, 2), you can do the following:

X = our_data
p_basis = PrimitiveBasis(n_states=3, domain=[0, 2])
X_corr = correlate(X, p_basis)

The extra discretized step created an unnecessary copy of the data
and it was removed to improve memory management.

Maybe we should add something to the documentation that discusses
presentment data for clarity?

Thanks,

David

Reply all
Reply to author
Forward
0 new messages