<commit_before>"""
Markov based methods for PySAL



To do:

    add mobility measures 
    add homogeneity and Markov property tests
"""

import numpy as np
import numpy.linalg as la
import pysal


class Markov:
    """Classic Markov transition matrices

    Parameters
    ----------
    trans       : array (n,t) where each row represents the different states
                  of each observation, being the columns the time
                  periods
    classes     : array (k) with all the classes (bins) of the matrix

    Attrinutes
    ----------
    p           : transition matrix
    steady_state: steady state

    Examples:<commit_msg>Style fix of documentation for class Markov to fit guidelines<commit_after>"""
Markov based methods for PySAL



To do:

    add mobility measures 
    add homogeneity and Markov property tests
"""

import numpy as np
import numpy.linalg as la
import pysal


class Markov:
    """Classic Markov transition matrices

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

    Attrinutes
    ----------
    p           : transition matrix
    steady_state: steady state

    Examples:
{'fraction_non_alphanumeric': 0.07090643274853801, 'fraction_numerical': 0.0, 'mean_word_length': 1.9956236323851204, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6163738', 'n_tokens_mistral': 362, 'n_tokens_neox': 327, 'n_words': 153}