geosnap.analyze.ModelResults.predict_markov_labels¶
- ModelResults.predict_markov_labels(w_type='queen', w_options=None, base_year=None, new_colname=None, time_steps=1, increment=None, seed=None, verbose=True)[source]¶
Predict neighborhood labels from the model in future time periods using a spatial Markov transition model
- Parameters:
- w_type
str
, optional type of spatial weights matrix to include in the transition model, by default “queen”
- w_options
dict
, optional additional keyword arguments passed to the libpysal weights constructor
- base_year
int
orstr
, optional the year from which to begin simulation (i.e. the set of labels to define the first period of the Markov sequence). Defaults to the last year of available labels
- new_colname
str
, optional new column name to store predicted labels under. Defaults to “predicted”
- time_steps
int
, optional the number of time-steps to simulate, by default 1
- increment
str
orint
, optional styled increment each time-step referrs to. For example, for a model fitted to decadal Census data, each time-step refers to a period of ten years, so an increment of 10 ensures that the temporal index aligns appropriately with the time steps being simulated
- w_type
- Returns:
geopandas.GeoDataFrame
long-form geodataframe with predicted cluster labels stored in the new_colname column