Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature suggestion: check monotonicity #214

Open
jstover79 opened this issue Apr 21, 2023 · 4 comments
Open

Feature suggestion: check monotonicity #214

jstover79 opened this issue Apr 21, 2023 · 4 comments

Comments

@jstover79
Copy link

Given a Markov chain object (e.g. with a transition matrix), it would be nice to have a method that checks if it is a monotone transition matrix. Just for reference, in case this is an unfamiliar property, it means that row $i$ is stochastically dominated by row $j$ whenever $i < j$. Each row is of course s discrete probability distribution. Assume we have state space ${0,1,\ldots,k}$. Probability distribution $x$ is stochastically dominated by distribution $y$ if the $x_m+x_{m+1}+\cdots+x_k\leq y_m+y_{m+1}+\cdots+y_k$ for every value of $m$.

For example $x=(0.6,0.1,0.3)$ is stochastically dominated by $y=(0.5,0.2,0.3)$.

Monotonicity is interesting because it allows one to couple two copies of the chain so that one is always above the other.

Maybe there isn't demand for such a feature, but I just thought I'd try to suggest it. Please forgive me if it is inappropriate to suggest features here.

@spedygiorgio
Copy link
Owner

HI @jstover79 thank you for your message. Your FR is interesting, but currently I have little time to develop. Would you like to forward a pull request?

@jstover79
Copy link
Author

Thanks for the reply. I can try that. In fact, that would be a good chance for me to refresh my git skills. I did successfully push an edit to AOSP once, but it was a long time ago. I can code this up, but it probably just won't be the most efficient way to do so.

@ScipioneParmigiano
Copy link

Hi @jstover79, I think that feature would be AMAZING. Is there any chance I can contribute to this?

@jstover79
Copy link
Author

@ScipioneParmigiano Please do. I have been meaning to sit down and try to do it, but I just haven't had the time to figure out how to properly propose the feature on the git project here. I'd love to try just to learn how, but don't want to mess anything up. It would be an easy method to code up, but I'm just not sure if it needs to be done in C++ or whatever. I can easily write an R script though. But carefully debugging it to make sure it handles all possible cases would need some care.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants