msmbuilder.MSMLib.apply_mapping_to_vector

msmbuilder.MSMLib.apply_mapping_to_vector(vector, mapping)[source]

Remap an observable vector after ergodic trimming

RTM 6/27: I don’t think this function is really doing what it should. It does a reordering, but when the mapping is a many->one, don’t you really want to average things together or something?

TJL 7/1: That’s true. I wrote this with only the ergodic trimming in mind, it needs to be updated if it’s going to work w/PCCA as well...

Parameters:

vector : ndarray

1D. Some observable value associated with each states

Mapping : ndarray

1D numpy array of length equal to the number of states in Assignments. Mapping[a] = b means that the frames currently in state a are now assigned to state b, and thus their observable should be too

Returns:

new_vector : ndarray

mapped observable values

Notes

The state -1 is treated specially – it always stays -1 and is not remapped.

Versions