<commit_before>"""
Markov based methods for spatial dynamics

"""
__author__= "<NAME> <<EMAIL>"


import numpy as np
import numpy.linalg as la
from ergodic import fmpt, steady_state
from scipy import stats
import pysal

__all__=["Markov","LISA_Markov","Spatial_Markov", "fmpt", "steady_state"]


class Markov:
    """
    Classic Markov transition matrices

    Parameters
    ----------
    class_ids    : array (n,t) 
                   One row per observation, one column recording the state of each
                   observation, with as many columns as time periods
    classes      : array (k) 
                   All different classes (bins) of the matrix

    Attributes
    ----------
    p            : matrix (k,k)
                   transition probability matrix

    steady_state : matrix (k,1)
                   ergodic distribution

    transitions  : matrix (k,k)
                   count of transitions between each state i and j

    Examples<commit_msg>Removed ergodic imports from "all". <commit_after>"""
Markov based methods for spatial dynamics

"""
__author__= "<NAME> <<EMAIL>"


import numpy as np
import numpy.linalg as la
from ergodic import fmpt, steady_state
from scipy import stats
import pysal

__all__=["Markov","LISA_Markov","Spatial_Markov" ]


class Markov:
    """
    Classic Markov transition matrices

    Parameters
    ----------
    class_ids    : array (n,t) 
                   One row per observation, one column recording the state of each
                   observation, with as many columns as time periods
    classes      : array (k) 
                   All different classes (bins) of the matrix

    Attributes
    ----------
    p            : matrix (k,k)
                   transition probability matrix

    steady_state : matrix (k,1)
                   ergodic distribution

    transitions  : matrix (k,k)
                   count of transitions between each state i and j

    Examples
{'fraction_non_alphanumeric': 0.08367556468172485, 'fraction_numerical': 0.001026694045174538, 'mean_word_length': 2.01702786377709, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5878354', 'n_tokens_mistral': 537, 'n_tokens_neox': 497, 'n_words': 194}