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_typestr, optional

type of spatial weights matrix to include in the transition model, by default “queen”

w_optionsdict, optional

additional keyword arguments passed to the libpysal weights constructor

base_yearint or str, 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_colnamestr, optional

new column name to store predicted labels under. Defaults to “predicted”

time_stepsint, optional

the number of time-steps to simulate, by default 1

incrementstr or int, 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

Returns:
geopandas.GeoDataFrame

long-form geodataframe with predicted cluster labels stored in the new_colname column