Questions tagged [stochastic]

A stochastic system is a system which state depends or some random elements making its behavior non-deterministic. Questions with this tag should cover topics regarding random variables and non-determenistic systems.

209 questions
0
votes
1 answer

How to code a arrival generator with a varying intensity rate

This is for a simulation model: Most questions I've come about deal with how to code an generator with exponential arrival times. But I'm currently stuck on how to program a generator where the arrival rate can change within a discrete event…
Jack Shade
  • 481
  • 5
  • 13
0
votes
4 answers

Python/Biomolecular Physics- Trying to code a simple stochastic simulation of a system exhibiting conditional behavior!

*edited 6/17/10 I'm trying to understand how to improve my code (make it more pythonic). Also, I'm interested in writing more intuitive 'conditionals' that would describe scenarios that are commonplace in biochemistry. The conditional criteria in…
DocDubya
  • 13
  • 5
0
votes
1 answer

pymc and parameterize stochastic variables

I'm fairly new to python and pymc and wanted to try a problem out using pymc for learning purposes. I'm modeling a simple mendelian inheritence from grandparents down to son, but I don't understand how to reapply the same stochastic model multiple…
0
votes
1 answer

R2OpenBUGS Error: node not stochastic

I have a specific problem in Running R2OpenBUGS in R. But it runs perfectly well in OpenBUGS. I want to understand what the problem is. Here is my code: model volatility; const n=180; { # likelihood: joint distribution of ys for (t in 1:n)…
0
votes
0 answers

ODE with stochastic time dependent input

I am trying to repeat an example I found in a paper. I have to solve this ODE: 25 a + 15 v + 330000 x = p(t) where p(t) is a white noise sequence band-limited into the 10-25 Hz range; a is the acceleration, v is the velocity and x the…
Rhei
  • 127
  • 10
0
votes
2 answers

%dopar% or alternative method to speed up sequential stochastic calculation

I have written a stochastic process simulator but I would like to speed it up since it's pretty slow. The main part of the simulator is made of a for loop which I would like to re-write as a foreach with `%dopar%. I have tried doing so with a…
g_puffo
  • 553
  • 3
  • 9
  • 19
0
votes
2 answers

Computing a pagerank on a weighted graph with absolute weights

I am facing the same issue as expressed in this link (Networkx PageRank - Equal Ranks with Different Weights). Essentially, I am using networkx to compute the pagerank on a graph. Since, pagerank computation first converts the graph to a right…
Amit Gupta
  • 451
  • 4
  • 16
0
votes
1 answer

Simulating a stochastic marble in a bathtub. e

I am a biology graduate student, and trying to code a certain behavior into a model in R, and having some "lost in translation" issues. The code I have follows the post. I am trying to model this system: Imagine a bathtub with a vibrating marble.…
0
votes
1 answer

During Stochastic Gradient Descent, what's the differences between these two updating hypothese ways?

I have a question about updating the theta during the Stochastic GD. I have two ways to update theta: 1) Use the previous theta, to get all the hypotheses for all samples, and then update the theta by each sample. Like: hypothese = np.dot(X,…
0
votes
0 answers

Gillespies SSA algorithm in R

Does anyone know the syntax for Gillespie SSA in R? The codes i found were these: input n=#iterations,r=#reactions,h=step size (dt) input x(0) =initial conditions,v=state shift matrix t←0 for i= 1 to n for j= 1 to r p←uniform random…
0
votes
1 answer

Generate a sparse row stochastic matrix?

I'm trying to generate a sparse stochastic matrix with Matlab but currently running into problems. Here is where I'm currently at. N=10 i = round(rand(1,N)*10)+1 j = round(rand(1,N)*10)+1 S1 = sparse (i,j,1,N,N); S = full(S1) rowsum = sum(S,2);…
0
votes
1 answer

Defining an SDE in Matlab in which the Components Are Functions of Other SDEs

I am trying to create an SDE model in Matlab with the sde function in the Econometrics toolbox. From looking at the examples on the website, the basic case seems simple enough in that an equation like dX(t) = 0.1 X(t) dt + 0.3 X(t) dW(t) can be…
0
votes
2 answers

software for non linear dynamic system simulation

I am looking for a software package (free better) that can be used for stochastic dynamic system simulation with minimal coding. For example it should allow me to model a system by specifying: Xn = AXn−1 + Vn, Yn = BXn + α Wn where X is the state,…
suspension
  • 11
  • 3
0
votes
1 answer

Calculating the average of multiple time-series with random sampling interval

I've tried searching for answers, but couldn't find one that exactly match my problem. I'm doing a stochastic simulator of biological systems, where the outcome is a "Scatter-plot" time series with concentration levels at some random points in time.…
Sune1987
  • 25
  • 5
0
votes
1 answer

Getting largest eigenvalue of stochastic matrix in R and MATLAB

I' trying to get the largest eigenvalue of a fully-connected right stochastic matrix in R & MATLAB. From this link: http://en.wikipedia.org/wiki/Stochastic_matrix I understand that the largest eigenvalue will be 1. For example, we can see the…
Ken
  • 1
  • 1
1 2 3
13
14