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
18
votes
8 answers

Is there a statistical profiler for python? If not, how could I go about writing one?

I would need to run a python script for some random amount of time, pause it, get a stack traceback, and unpause it. I've googled around for a way to do this, but I see no obvious solution.
shino
  • 4,134
  • 4
  • 34
  • 55
10
votes
2 answers

Difference between a stochastic and a heuristic algorithm

Extending the question of streetparade, I would like to ask what is the difference, if any, between a stochastic and a heuristic algorithm. Would it be right to say that a stochastic algorithm is actually one type of heuristic?
orestis21
  • 203
  • 2
  • 5
9
votes
4 answers

How to perform rank based selection in a genetic algorithm?

I am implementing a small genetic algorithm framework - primarily for private use, unless I manage to make something reasonable at which time I will post it as open source. Right now I am focusing on selection techniques. So far I have implemented…
9
votes
2 answers

Python Code: Geometric Brownian Motion - what's wrong?

I'm pretty new to Python, but for a paper in University I need to apply some models, using preferably Python. I spent a couple of days with the code I attached, but I can't really help, what's wrong, it's not creating a random process which looks…
Sebastian Schrön
  • 103
  • 1
  • 1
  • 3
8
votes
1 answer

Stochastic gradient descent from gradient descent implementation in R

I have a working implementation of multivariable linear regression using gradient descent in R. I'd like to see if I can use what I have to run a stochastic gradient descent. I'm not sure if this is really inefficient or not. For example, for each…
Daina
  • 341
  • 1
  • 4
  • 12
8
votes
1 answer

Is there a python module to solve/integrate a system of stochastic differential equations?

I have a system of stochastic differential equations that I would like to solve. I was hoping that this issue was already address. I am a bit concerned about constructing my own solver because I fear my solver would be too slow, and there could be…
CraigF
  • 320
  • 3
  • 8
7
votes
2 answers

R: How to generate a noisy sine function

I am still pretty new to the whole R-thing. I have the following aim; I have a sine function that describes a calcium particle number over time: something like y = a * sin (b*t) + c Since in reality the generation and removal of calcium is described…
Arne
  • 287
  • 1
  • 5
  • 16
7
votes
3 answers

Java implementation of stochastic indicator for finance

Hy, I'm searching for an API/library offering an implementation of the financial stochastic technical analysis. Does someone know a ready-do-use solution? Thanks,
yondaime
  • 101
  • 1
  • 4
6
votes
2 answers

What is going on with floating point precision here?

This question is in reference is an observation from a code-golf challenge. The submitted R solution is a working solution, but a few of us (maybe just I) seems to be dumbfounded as to why the initial X=m reassignment is necessary. The code is…
6
votes
1 answer

Generate a random boolean with given probability

I am writing java code to solve a problem with simulated annealing method. I need a method to generate a random true only with probability exp(a/b) where a and b are given parameters. Thanks.
Nina
  • 63
  • 1
  • 4
6
votes
2 answers

Stochastic Hill Climbing

I am trying to implement Stoachastic Hill Climbing in Java. I understand that this algorthim makes a new solution which is picked randomly and then accept the solution based on how bad/good it is. For example, if its very bad then it will have a…
Mikey
  • 637
  • 4
  • 17
6
votes
2 answers

Generate stochastic random deviates from a density object with R

I have a density object dd created like this: x1 <- rnorm(1000) x2 <- rnorm(1000, 3, 2) x <- rbind(x1, x2) dd <- density(x) plot(dd) Which produces this very non-Gaussian distribution: alt text…
JD Long
  • 55,115
  • 51
  • 188
  • 278
5
votes
1 answer

How to improve Brownian motion monte carlo simulation speed?

I want to make my code run faster for more iterations and runs. Right now my code is too slow, but I don't know what to change to speed it up. I began by coding a kinetic Monte Carlo simulation, then editing it to become a Brownian motion…
5
votes
1 answer

Stochastic Search to lambda expression

Thanks for all your help and sharing. My question is in regards of the Stochastic Search. This technique is used to do approximations of data through a defined amount of cicles over a, an in general, mathematical calculation. Please see following…
5
votes
1 answer

pymc MAP warning : Stochastic tau's value is neither numerical nor array with floating-point dtype. Recommend fitting method fmin (default)

I have looked at a similar question here pymc warning: value is neither numerical nor array with floating-point dtype but there are no answers, can someone please tell me whether I should ignore this warning or what to do otherwise ? The model has a…
turing
  • 497
  • 1
  • 3
  • 11
1
2 3
13 14