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.

256 questions
0
votes
0 answers

"Error in as.Formula(formula) : could not find function "as.Formula"" in my codee

While using sfa analysis package this error is coming,"Error in as.Formula(formula) : could not find function "as.Formula" My code: install.packages("sfa") library(frontier) library(sfa) truncated_normal<-sfa(formula = lMILK ~ lLAND + lFEED + lCOWS…
DeeDee
  • 1
  • 1
0
votes
1 answer

How to implement a system of stochastic ODEs (SDEs) in python?

I have a system of ODEs in which I am trying to include an 'error' term, so that it becomes a system of stochastic ODEs. For solving a system of ODEs in python I normally use scipy's odeint. An example derived from the Scipy Cookbook, involving the…
user213544
  • 2,046
  • 3
  • 22
  • 52
0
votes
0 answers

How do I implement stochastic gradient descent from the following gradient descent code? (trouble adding a random sample)

I'm struggling to make the gradient descent function I already have into one for stochastic gradient descent. I have the following: gd <- function(f, grad, y, X, theta0, npars, ndata, a, niters) { theta <- matrix(data=NA, nrow=niters,…
0
votes
0 answers

Excel VBA: Implementing Box Muller, Zigurrat and Ratio of Uniforms Algorithm

This is a very specific question mixing up stochastic knowledge and VBA skills. So very exciting! I'm trying to compare several methods for generating standard, normally distributed numbers given a source of uniformly distributed random numbers.…
J.schmidt
  • 721
  • 5
  • 27
0
votes
0 answers

What variables are needed for the stochastic frontier production functions to measure if a firm is minimizing costs?

I am trying to help my firm utilize better metrics for future growth. What variables are needed for the stochastic frontier production functions to measure if a firm is minimizing costs or maximizing profits?
Smw10c
  • 9
  • 1
  • 1
0
votes
1 answer

ggplot2 doesnt find an object + problems with legends

I'm trying to plot a simulation of a differential equation versus its exact analytical solution, but keep getting "Error in FUN(X[[i]], ...) : object 'value' not found", even though it is declared just the line before! It seems like I have made a…
user9264168
0
votes
1 answer

Deterministic and stochastic part of an equation

I'm on the lookout for a numerical method that can solve both a deterministic and stochastic equation. In the deterministic case, I know that a fourth order RK method is a valuable one, very effective. Unfortunately, there has not been applied to…
user10367182
0
votes
1 answer

Stochastic universal sampling

I need a sus implementation in c# for finding candidate individuals in a population this is what i have so far but im not sure if it is correct. public void sus(IEnumerablepopulation) { var ag = population.Sum(i =>…
Romaine Carter
  • 637
  • 11
  • 23
0
votes
1 answer

SGD implementation Python

I am aware that SGD has been asked before on SO but I wanted to have an opinion on my code as below: import numpy as np import matplotlib.pyplot as plt # Generating data m,n = 10000,4 x = np.random.normal(loc=0,scale=1,size=(m,4)) theta_0 =…
srkdb
  • 775
  • 3
  • 15
  • 28
0
votes
1 answer

SMPS files that are not read by SCIP 6.0

I have a set of SMPS files that are read by Coin-SMI's SMPS reader, but not by SCIP 6.0's. Actually, SCIP 6.0 shows ''Segmentation fault (core dumped)'' when it tries to read .sto file. Could you take a quick look at it please to see which part is…
0
votes
1 answer

Solving stochastic maximum bipartite matching problem

I have faced the following problem: there are two disjoint sets, A and B for each pair of elements (a, b) (a belongs to set A, where b belongs to set B) there a probability pij is known in advance. It represents the probability (certainty level)…
eold
  • 5,972
  • 11
  • 56
  • 75
0
votes
0 answers

Generation of random numbers with differences between consecutive numbers following a distribution

Good afternoon, I'm finding myself in the need to generate a column of 8760 numbers following a Weibull probability density distribution with specific parametres, which has been an easy task so far. Nevertheless, I also need another property to be…
0
votes
1 answer

Matlab Simulation(Stochastic)

Assuming I have a discretized system of SDE of the form x(:, t+1) = x(:, t) + f1(x(:, t)).*x(:, t)*dt + f2(x(:, t))./(x(:, t).*y(:, t))* sqrt(dt)*rand1; y(:, t+1) = f2(x(:, t)).*y(:, t)./x(:, t)*dt + f1(x(:, t)).*y(:, t)*sqrt(dt)*rand2; and I want…
0
votes
1 answer

how to find a transformation matrix with sgd

This seems like it would be simple, but I can't get things to work. I 100 dimension vector spaces and I have several vectors in each space that are matched. I want to find the transformation matrix (W) such that: a_vector[0] in vector space A x W =…
E G
  • 498
  • 6
  • 7
0
votes
1 answer

Add programmatically random values to a matrix using matlab

I am new to Matlab and I am trying to create programmatically a square Matrix which may have some random stochastic columns but I can't come up with a working solution. By stochastic column I mean the sum of the column elements which are positive…