Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to use a generated spatial markov chain to predict the next n states #161

Open
stuartlynn opened this issue Nov 30, 2015 · 6 comments

Comments

@stuartlynn
Copy link

It would be great to have a method to use a trained spatial Markov chain to predict the next n states for a set of geometries.

sm = pysal.Spatial_Markov(data, weights, fixed = True, k = 7)
prediction = sm.predict( inital_state,  weights= weights, steps=10, k=7)

where inital_state would be a list of the current state of each regions and prediction would be a list of lists which would contain the predictions for the next n steps for each region.

In addition there could be a function

prediction = sm.predict_ensembl( inital_state,  weights= weights, steps=10, trials=100, k=7)

where trials is the number of randomly seeded predictions to make. The result would be a list of the mean and variance of the predictions for the next N steps

@khalibartan
Copy link

Is this issue fixed. If not Can you tell me how you want to things to be implemented ? I haven't worked with pysal till of now but I have worked in probabilistic graphical models, and currently was working on implementing sampling based on Hamiltonian Monte Carlo. With help I can work this off. Can you suggest starting point specifically code base section that I should go through.

@weikang9009
Copy link
Member

I've experimented with this before and is currently reorganizing the code to make it complete and convenient to use.

@khalibartan
Copy link

Looking forward.

@ljwolf
Copy link
Member

ljwolf commented Jul 11, 2017

This'll move to giddy & is still an active interest.

@sjsrey sjsrey transferred this issue from pysal/pysal Jul 3, 2020
@knaaptime
Copy link
Member

Trying to reconstruct a timeline from memory today for how geosnap came into being, I went looking for this old issue assuming it was over here.

Instead I saw this issue for the first time in years 😂. To close the loop, I've got a simple version of this implemented over in geosnap. It only does a single draw from the spatially-conditioned probs, but should be trivial to wrap in a loop to generate the parameters @stuartlynn wants, no?

Either way, I'd think if that implementation is correct, we should move it here then extend if @ljwolf and @weikang9009 agree?

@knaaptime
Copy link
Member

(we'd have to generalize the geosnap version for continuous data, obviously, but i mean the core logic should live here, yeah?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants