jgrss / mtlchmm

Multi-temporal land cover maps with a Hidden Markov Model
MIT License
14 stars 1 forks source link

A problem about Probability Transfer Matrix #1

Open myzhenghr opened 3 years ago

myzhenghr commented 3 years ago

Dear Jordan,

Thank you for making this code public. It has helped me a lot in my research.

However, I have learned from other literature that the sum of each row of the Transition Probability Matrix should be 1, which is not consistent with the matrix generated by function __transitionmatrix in your code. I've seen others do this in other literature, where the 10% probability is averaged by other possible conversion types.

I am new to Hidden Markov Models and programming, please don't mind if there is something i misunderstand.

Best Regards, Henry Zheng 2021-4-7

jgrss commented 3 years ago

Hi Henry,

You are right--the default transition matrix rows do not sum to 1, as is common practice. Originally, I translated the source code from the reference paper's code. From the paper (Section A):

A key parameter of the HMM algorithm is the transition matrix that specifies the probability that a pixel will change from one land cover class to another between two years. In the general case, this transition matrix can vary from pixel to pixel and over time, and methods have been proposed to estimate these probabilities from data [29]. In the context of land cover, the parameter matrix might be estimated from existing land cover maps to estimate the frequency of certain types of change for a given geographic area. In this paper, we restricted our transition matrix to the simplest possible model: a constant transition probability applied to all pixels and all labels. While this is clearly a simplification of reality, parameterization of space- and-time-dependent transition probabilities requires either substantial a priori information or extensive training data, which are generally not available. For this paper, we chose to err on the side of overpredicting change rather than missing actual change, and we used a transition probability of 0.1 for most of our experiments. For reference, the National Land Cover Database indicates that 1.68% of land cover in the conterminous U.S. changed between 2001 and 2006 [33]. Hence, a transition probability of 0.1 significantly overestimates the prior probability of annual land cover change for most pixels in the U.S. As part of our analysis, we evaluate the sensitivity of results from our HMM algorithm model behavior to the value prescribed for this parameter. We discuss estimation of the transition matrix further in Section V.

So I think it was a tradeoff between best practices vs. difficulty in estimating real transition probabilities between land cover classes. An easy way to avoid the default matrix is to supply your own by:

MTLCHMM(transition_prior=m)

where m is a 2d matrix of transition likelihoods.

myzhenghr commented 3 years ago

Hi, Jordan,

Thank you for your helpful advice. Actually I have now used a custom probability transition matrix. I just want to remind you of a possible error in the program. Because it doesn't follow probability theory that the probabilities do not sum to 1.

In my opinion, the transition probability of 0.1 in the article is the probability of a land cover type being converted to all other types, rather than the probability between two types. The probability of each type needs to be averaged according to the number of types, which is still a simplification (constant) of reality as mentioned in the papper.

This sentence in this article may also support my point of view:

and we used a transition probability of 0.1 for most of our experiments. For reference, the National Land Cover Database indicates that 1.68% of land cover in the conterminous U.S. changed between 2001 and 2006 [33]. Hence, a transition probability of 0.1 significantly overestimates the prior probability of annual land cover change for most pixels in the U.S. As part of our analysis

This sentence conveys to me that the probability of land cover type conversion in the United States is 1.68%, far less than the 10% used in the article.

These are just my opinions. Thanks again for the code.

Regards,