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
5
votes
1 answer

PyMC: Setting Constraints when fitting Models

I am trying to set constraints when fitting variables via a MCMC approach with PyMC For instance, I defined the following stochastic models in PyMC import pymc as…
5
votes
2 answers

Programing Logistic regression with Stochastic gradient descent in R

I’m trying to program the logistic regression with stochastic descending gradient in R. For example I have followed the example of Andrew Ng named: “ex2data1.txt”. The point is that the algorithm works properly, but thetas estimation is not exactly…
user3488416
  • 51
  • 1
  • 3
5
votes
2 answers

Tutorial on stochastic simulation in Haskell

I'd like to use Haskell for stochastic simulation, but I don't know how. I've read Hutton's 'Programming in Haskell', and I'm comfortable writing deterministic functional programs. However, I don't know how to start writing stochastic simulations of…
Marius Kempe
  • 413
  • 3
  • 9
4
votes
0 answers

Vanishing gradient problem for recent stochastic recurrent neural networks

Recently, I've found some papers about generative recurrent models. All have attached sub-networks like prior/encoder/decoder/etc. to well-known LSTM cell for composing an aggregation of new-type RNN cell. I am just curious about whether the…
4
votes
1 answer

efficient sampling from beta-binomial distribution in python

for a stochastic simulation I need to draw a lot of random numbers which are beta binomial distributed. At the moment I implemented it this way (using python): import scipy as scp from scipy.stats import rv_discrete class…
4
votes
1 answer

How to solve / fit a geometric brownian motion process in Python?

For example, the below code simulates Geometric Brownian Motion (GBM) process, which satisfies the following stochastic differential equation: The code is a condensed version of the code in this Wikipedia article. import numpy as…
Greg
  • 6,043
  • 8
  • 41
  • 93
4
votes
1 answer

Gradient descent stochastic update - Stopping criterion and update rule - Machine Learning

My dataset has m features and n data points. Let w be a vector (to be estimated). I'm trying to implement gradient descent with stochastic update method. My minimizing function is least mean square. The update algorithm is shown below: for i = 1 ...…
3
votes
1 answer

Struggling to understand Q1 calculation

suppose we have the following data set (length 24): x <- c(30L, 49L, 105L, 115L, 118L, 148L, 178L, 185L, 196L, 210L, 236L, 236L, 278L, 287L, 329L, 362L, 366L, 399L, 430L, 434L, 451L, 451L, 477L, 488L, 508L, 531L, 533L, 542L) If we calculate the…
RAKY
  • 51
  • 2
3
votes
3 answers

pine script with two indicators one overlaid on the chart and another on its own?

I am trying to write a pine script with two indicators one overlaid on the chart (EMA) and another on its own?(Stoch) I cannot seem to find any info on how to separate these (Visually) but keep them within 1 pine script, ie to be able to take…
3
votes
1 answer

How do I solve stochastic differential equations in Julia?

I try to understand how to solve stochastic differential equations (SDEs) numerically (I have no experience in any language, but for some reasons I chose Julia). As a starting model, I decided to use Lotka-Volterra equations. I read manual and…
zlon
  • 802
  • 7
  • 19
3
votes
1 answer

Stochastic gradient descent Vs Mini-batch size 1

Is stochastic gradient descent basically the name given to mini-batch training where batch size = 1 and selecting random training rows? i.e. it is the same as 'normal' gradient descent, it's just the manner in which the training data is supplied…
3
votes
1 answer

Have I implemented Milstein's method/Euler-Maruyama correctly?

I have an stochastic differential equation (SDE) that I am trying to solve using Milsteins method but am getting results that disagree with experiment. The SDE is which I have broken up into 2 first order equations: eq1: eq2: Then I have used…
3
votes
3 answers

Stochastic hill climbing vs first-choice hill climbing algorithms

What is the difference between stochastic hill climbing and first-choice hill climbing algorithms?
3
votes
1 answer

Preventing a Gillespie SSA Stochastic Model From Running Negative

I have produce a stochastic model of infection (parasitic worm), using a Gillespie SSA. The model used the "GillespieSSA"package (https://cran.r-project.org/web/packages/GillespieSSA/index.html). In short the code models a population of discrete…
Rnought
  • 33
  • 3
3
votes
2 answers

Is OptaPlanner able to model stochastic programs?

At work, we are trying to optimize the number of goods produced to fulfil an uncertain demand. We know the probability distribution of the demand by analyzing the demand that occured before. In mathematical terms, this problem is a multi-staged…
1
2
3
13 14