Questions tagged [convergence]
303 questions
1
vote
0 answers
How to communicate two parallel processes (without terminating) in Python multiprocessing?
How to communicate two parallel processes (without terminating) and call a function to process partial results in Python multiprocessing?
I have a Metropolis-Hasting algorithm, and I already parallelize this and can generate two (or more) outputs…

Isidrogv
- 26
- 2
1
vote
1 answer
How can I handle divergence failure manually when using optimize.newton in SciPy?
I'm using newton optimize from SciPy to solve an equation and depending on the initial guess sometimes the solution does not converge and crashes.
x = optimize.newton(fun,1/1000)
Would it be possible to print a message instead of the python crash…

melody
- 113
- 4
1
vote
2 answers
PDF and CDF for Biased die using Matlab with Central Limit Theorem
I am trying to plot the PDF and CDF for a biased die roll for 10^4 samples using Central Limit Theorem.(CLT)
The die is biased or unfair where even sides are twice as likely as odd sides. Here is the diefaces = [1,3,2,4,6,2].What can I use in Matlab…

ESLearner
- 87
- 1
- 14
1
vote
0 answers
Why are my rewards converging but still have a lot of variations
I am training a reinforcement learning agent on an episodic task of fixed episode length. I am tracking the training process by plotting the cumulative rewards over an episode. I am using tensorboard for plotting the rewards. I have trained my agent…

chink
- 1,505
- 3
- 28
- 70
1
vote
0 answers
Applying a change of variables inside fmincon
(Disclaimer: I also posted to mathworks in the hope of a speedy answer. I hope this is not frowned upon.)
I want to minimize a very well-behaved real-valued objective function $f$ from R^I. Feasible points are inside the convex hull of a finite set…

mimuller
- 155
- 6
1
vote
2 answers
How to use convergence criteria in a loop to furness matrices in Python
I have an original matrix
originalOD = np.array([[1,2,4], [3,2,3], [4,2,2]])
#### Now we can sum productions and attractions####
originalD=np.sum(originalOD,axis=0)
originalO=np.sum(originalOD,axis=1)
And would like to have original and original…

Kacper Rossa
- 77
- 7
1
vote
0 answers
Glmm with interaction between categorical and nummeric variable
I´m trying to find a glmm, which is convergent with an interaction between my categorical and nummeric variable. My experiment consists of different plot types (A, B, C & D), which were mapped in the years 0, 1, 2 & 3.
Now I want to know how…

Klara Albert
- 11
- 2
1
vote
1 answer
Function moisture flux convergence?
I have to compute several thermodynamic indices and MetPy offers plenty of sounding based parameters (e.g. CAPE, CIN, ...). For the evolution of thunderstorms, the vertically integrated moisture flux convergence is a good predictor. Does MetPy offer…

akann
- 37
- 4
1
vote
0 answers
Convergence diagnostic with Gelman-Rubin PSRF: R coda package vs Runjags
I run Bayesian models with Runjags and then convert the output in MCMC.list with the coda package. I check convergence with the Gelman-Rubin diagnostic (univariate).
Sometimes, the PSRF is large just because a chain sampled a large value at some…

user3192383
- 63
- 3
1
vote
1 answer
Improving Convergence Algorithms with Numerical Iterator in R
I am performing iterative computations to examine how y varies over x in R. My goal is to estimate the x-intercept. Now each iteration is computationally expensive so the fewer iterations needed to achieve this the better.
Here is an image of y…

JustGettinStarted
- 784
- 7
- 21
1
vote
0 answers
Max iterations for Multivariate Adaptive Regression Splines in Earth Package in R
I am running a Multivariate Adaptive Regression Splines model with the earth package in R. When I run the model as an additive model I have no problem with convergence. However, when I allow the model to estimate interactions between hinge functions…

Kreitz Gigs
- 369
- 1
- 9
1
vote
1 answer
Try-catch slowing down simulation of linear mixed effects
I am simulating linear mixed effects in R, but sometimes the model does not converge. Therefore, I wrap it in a try function so the simulation keeps running even if the model fails. However, my simulation is very slow, and I think it's because of my…

Jay Schyler Raadt
- 75
- 10
1
vote
1 answer
Bisection doesn't return a value
The function below, bisection, is supposed to find a root given three inputs: a function f, and an interval defined using the two parameters a and b. The intention is that the value of a and b are changed within the function to approach a common…

oxodo
- 149
- 5
1
vote
0 answers
Convergence issues with GLMM from lme4
I am new to mixed models and am having some trouble getting my models to converge. I've looked at the other questions on Stack Overflow and elsewhere and worked through this sheet, but with no luck.
I have several variables derived from sweep net…

James
- 1,164
- 2
- 15
- 36
1
vote
0 answers
"can't find uphill direction" when doing garch loop in stata
I am using a panel data of n=478 and t=1988-2014, daily data. I use GARCH model and loop code. Each time when running the regression, the following appears, can somebody please help me figure out?
my code is:
forvalues i=1 (1) 478 {
arch ut…

Y. LI
- 21
- 3