Kyle Beauchamp
Kyle Beauchamp
PS think they would look something like this: ``` class SymmetricModel(object): def get_MFPT(self): pass def get_flux(self, A, B): pass def get_eigensystem(self): pass ```
Here's my vote In terms of organization: we would create a separate directory `test_systems` that sits inside the msmbuilder source directory. In `test_systems`, we would have something like `symmetric_model.py`.
We should also brainstorm for other models with analytical results. I think the obvious ones are: 1. Symmetric Hub 2. Linear model I think a reasonable number of the calculations...
The current code for building counts looks like this: ``` for A in assignments: FirstEntry = np.where(A != -1)[0] # New Code by KAB to skip pre-padded negative ones. #...
http://pandas.pydata.org/pandas-docs/dev/dsintro.html
To do this with a 1D pandas Series of assignments, it might look like this: ``` from_states = ass to_states = ass.shift(-1) ``` to_states looks like this: ``` In [82]:...
So here is the equivalent of `transitions = np.row_stack((from_states, to_states))` ``` transitions = pd.DataFrame([from_states, to_states]).dropna(axis=1) In [102]: transitions.values Out[102]: array([[ 2195., 2518., 2997., ..., 139., 67., 13.], [ 2518., 2997.,...
One key change is that dropna(axis=1) deals with the NA values. Using the `row_stack` doesn't deal with the NA.
``` In [104]: row_stack((from_states, to_states)) Out[104]: array([[ 2195., 2518., 2997., ..., 67., 13., 12.], [ 2518., 2997., 2188., ..., 13., 12., nan]]) ```
Comes with EPD and Anaconda, so it's not really new...