Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
0 votes
0 answers
49 views

I have a macro for inventory replenishment prediction using Markov Chain. It uses data for last 10 days including today to predict inventory replenishment (rep R) or not (blank B). The model works ...
DM_Darko's user avatar
1 vote
1 answer
47 views

I'm trying to compare an empirical sequence of discrete states against a theoretical Markov chain. I'm using the package "markovchain" in R. library(markovchain) states <- c("LRP&...
Becca Trapp's user avatar
0 votes
0 answers
28 views

I'm experiencing unexpected behavior with the MultinomialHMM in hmmlearn. When using one-hot encoded observations (with n_trials=1), the Viterbi algorithm returns the state sequence incorrectly. In my ...
Mike Azatov's user avatar
0 votes
0 answers
36 views

I cannot figure out why my Matlab code for extrapolating susceptibility using the reweighting method returns physically non-sensical graphs, even though the magnetization and energy series appear fine....
Yakiv Paroviak's user avatar
3 votes
1 answer
82 views

I have a Markov Chain in R: set.seed(123) n_states <- 5 matrix <- matrix(runif(n_states^2), nrow=n_states) # set some transitions to 0 matrix[1, 4:5] <- 0 matrix[5, 1:3] <- 0 matrix[...
farrow90's user avatar
1 vote
1 answer
295 views

My goal is to simulate a Markov chain using networkx and numpy. I write the following code import numpy as np import networkx as nx states = [ 'distance', 'strike', 'knockout' ] ...
HJA24's user avatar
  • 406
4 votes
1 answer
164 views

I have this 4 state Markov Chain in R: I wrote the following (100 iteration) simulation that simulates 100 hospital patients (all patients start in state 1) and tracks which state they are in during ...
farrow90's user avatar
0 votes
1 answer
58 views

I have a series of cumulative transition matrices (5y, 10y, ..., 30y), and am trying to get the one year annualised transition matrices defined as 1-Year Matrix ^ T = T-year Matrix So I am solving for ...
StackExchangeDisplayName's user avatar
1 vote
1 answer
77 views

I am trying to fit a two-state regime-switching model using PyMC. The full model is given below. The exact details of the model are not important (if you're curious anyways, I'm trying to fit a ...
parsiad's user avatar
  • 13
2 votes
0 answers
77 views

A Markov matrix is a matrix whose rows sum to 1 and whose determinant is 1 (at least according to one definition). I am able to make a unimodular matrix using the following operation: b = b/(np.linalg....
Popat Patel's user avatar
0 votes
1 answer
177 views

Assuming a Markov Chain of $M$ states, and assuming starting from state $X_0$, I was wondering if there is a method to calculate the probability of visiting state $X_k$ at least once during first n ...
user25510587's user avatar
3 votes
2 answers
110 views

I am trying to do matrix multiplication in R. I have successfully created and run the matrix Matrix1, but caught an error when trying to do the multiplication: Matrix1 = new("markovchain", ...
nilsinelabore's user avatar
0 votes
0 answers
79 views

Let's imagine we have the following states corresponding to the number of users in a system in a Continuous Time Markov Chain: ---- [10] ------ [11] ------ [12] ........... [17] The arrival of a new ...
v4lerO's user avatar
  • 5
0 votes
1 answer
66 views

Say I have a transition matrix with 4 states labeled 1 to 4 as follows: matrix = [[.25,.25,.5,0], [ 0,.25,.5,.25], [.25,.25,.25,.25], [.25,.25,0, .5 ]] Say I want to ...
AI92's user avatar
  • 407
1 vote
0 answers
48 views

Metropolis-Hastings (MH) algorithm is a MCMC method to compute high-dimensional integrals. It is usually formulated in the continuum version, i.e. the target function to be integrated is known. The ...
John 's user avatar
  • 29

15 30 50 per page
1
2 3 4 5
39