# Questions tagged [monte-carlo]

The tag has no usage guidance.

37 questions
Filter by
Sorted by
Tagged with
46 views

### Transformer model conditional probability distribution of sub-sentences

I have a simple transformer model (decoder only) which is trained on some dataset containing sentences to do next-word prediction. The model captures a probability distribution $P_{\theta}(\mathbf{a})$...
29 views

### Combining monte carlo with deep learning to improve the estimation

I am in situation where i need to estimate the attenuation of an EM wave . we consider EM wave as collection of photons. These photons when strike with some dust particles they scatter in different ...
44 views

### Sample Size for Adaptive Lasso

Be gentle, I'm learning here. I have a fairly simple adaptive lasso regression that I'm trying to test for a minimum sample size. I used cross-validated mean squared error as the "score" of ...
69 views

### Hamiltonian Monte Carlo - Is it generally a good method for obtaining random variables in Machine Learning?

I once saw the Hamiltonian Monte Carlo method for use in machine learning. But It seems to me that it is not actually a random sampling; It follows the dynamical equation of motion. Is it generally a ...
• 103
1 vote
94 views

### CDF/PDF vs Monte Carlo

I’m a developer reading the book Bayesian statistics the fun way In chapter 15 they use hypothesis testing using Monte Carlo simulation to pick random values from two intercepting beta distributions I ...
24 views

### Mplus Monte Carlo Sim w/Covariates

I have an Mplus INP file with which I am running a Monte Carlo sim for a latent class analysis. I have the class solution working properly, but I genuinely cannot figure out how to add in covariates ...
• 1
1 vote
21 views

### Calculating an integral with as few grid points as possible

Suppose I have a function $f\colon [0,1] \to \mathbb{R}$ which is maybe continuous (it's at least in $L^1$). I have a sample of $N$ points $\{x_i\}$ taken from the domain $[0,1]$ randomly from some ...
• 111
1 vote
127 views

### How can I deal with a computationally expensive simulator method in Sequential Monte Carlo/Approximate Bayesian Computation?

I am doing Approximate Bayesian Computation with Sequential Monte Carlo with PyMC in a way that is similar to what is described in this example of the ...
• 11
76 views

### Quantifying the performance of Stepwise Regression ran on Monte Carlo generated datasets & comparing them to your method of interest

The source data files and scripts referenced here and from whom lines of code are included here can be found in my GitHub Repository for this collaborative research project exploring the properties of ...
• 167
26 views

### A simple way to store the factors selected by (BE) Stepwise Regression n run on N datasets via lapply, a For Loop then an lapply, or a function?

I am currently doing research with a coauthor and collaborator comparing a new optimal model selection procedure he has proposed via Monte Carlo Simulation of the new procedure vs 2 benchmarks, LASSO &...
• 167
472 views

### Which Model for predicting flight delays is appropriate except Random Forest and Decision Tree? (Monte Carlo?)

Im studying M.Sc Data Science and in the module "Decision Support Systems" me and my group have to make a presentation. Our Proposal is the following: Background With generally high demand ...
• 21
1 vote
12 views

### Confusion regarding which distribution Monte Carlo considers for sampling

Considering Bayesian posterior inference, which distribution does Monte Carlo sampling take samples from: posterior or prior? Posterior is intractable because the denominator (evidence) is an ...
• 161
1 vote
45 views

### Monte Carlo Markov Chain

I was trying to figure out what is a Monte Carlo Markov Chain. From what I understand it is a way of computing an approximation of a probability distribution, which cannot compute exactly. So we ...
1 vote
60 views

### How to resolve IndexError while doing Monte Carlo for 1000 runs? [closed]

Below code runs without any problem, however when I run the same code using Monte Carlo Analysis for 1000 runs, it gives IndexError. Can someone explain why this happens. Thanks ...
• 31
22 views

### Is it a good idea to use the mean and standard deviation of coefficients from other models as my prior in Bayesian Regression?

I have a dataset that I’ve been playing around with for school I have gotten very good results with a bunch of methods (Ridge, Lasso, ElasticNet, SVM, Bagging, Stacking and NN even) Now I’m having a ...
• 121
1 vote
21 views

### MCMC algorithm -- understanding some paremeters

I am trying to understand an MCMC program. I manage to run it, but I am trying to understand the meaning of the some parameters in the analysis. The code is something like this ...
• 123
28 views

### What is the most common practice of generating (X,Y) from an arbitrary CDF or PDF?

So I can generate X from arbitrary CDF F(x) by the procedure above. Can it be generalized to two variables? How, exactly? If not, what's the best way to generate <...
• 145
109 views

### Pull Random Numbers from my Data (Python)

Let's imagine I have a series of numbers that represents cash flows into some account over the past 30 days in some time window. This data is non-normal but it does represent some distribution. I ...
1 vote
28 views

### How can I build a simulation environment that assess different risk policies? [closed]

I work in fin-tech and would like to build some sort of simulation program to assess how different inputs will impact net revenue. For example, if we create new policies based on ML scores, how would ...
• 11
271 views

### Test data for statistical t-test in Python

first of all sorry if this is not the proper place to ask but i have been trying to create some dummy variables in order to run a students t-test as well as a welch t-test and then run a monte-carlo ...
611 views

### Having a reward structure which gives high positive rewards compared to the negative rewards

I am training an RL agent using PPO algorithm for a control problem. The objective of the agent is to maintain temperature in a room. It is an episodic task with episode length of 9 hrs and step size(...
• 555
258 views

### How to handle differences between training and deploying of an RL agent

Hi I am training an RL agent for a control problem. The objective of the agent is to maintain temperature in a zone. It is an episodic task with episode length of 10 hrs and actions being taken every ...
• 555
1 vote
1k views

### Different results every time I train a reinforcement learning agent

I am training an RL agent for a control problem using PPO algorithm. I am using stable-baselines library for it. The objective of an agent is to maintain a temperature of 24 deg in a zone and it ...
• 555
5k views

### Evaluating a trained Reinforcement Learning Agent?

I am new to reinforcement learning agent training. I have read about PPO algorithm and used stable baselines library to train an agent using PPO. So my question here is how do I evaluate a trained RL ...
• 555
1 vote
22 views

### Best Method for Data Analysis on a 100 numerical IVs and 200 numerical DVs

I think I might need the help of this valuable community for a task. I have been given a dataset for 100 numerical independent variables (IVs) that predict output for 200 numerical values (from monte ...
• 11
1 vote
234 views

### How to formulate reward of an rl agent with two objectives

I have started learning reinforcement learning and trying to apply it for my use case. I am developing an rl agent which can maintain temperature at a particular value, and minimize the energy ...
• 555
335 views

### MCMC for finding Bayesian Neural Network

Is someone familiar with such an approach: Suppose I want to build a bayesian neural network, with distributions over my parameters instead of point estimates. First I train my network with standard ...
• 931
289 views

### Estimating the value of $\pi$ with a Monte Carlo dartboard: $<$ or $\leq$?

I'm trying to figure out which is the proper way to estimate $\pi$ using the Monte Carlo method randomly distributing points in a square that also contains an inscribed circle. Some sources say to ...
94 views

### What is the intuition behind using Monte Carlo to solve a differential equation

Conceptually, I understand how a numerical method like Monte Carlo is used to solve a definite integral. Because integral of a function is the area bounded by the curve, the ratio of random points ...
• 611
160 views

### Evaluating value functions in RL

I'm working my way through the book Reinforcement Learning by Richar S. Sutton and Andrew G. Barto and I am stuck on the following question. The value of a state depends on the the values of the ...
• 189
20k views

### What is Monte Carlo dropout?

I understand how to use MC dropout from this answer, but I don't understand how MC dropout works, what its purpose is, and how it differs from normal dropout.
• 600
1 vote
200 views

### Why not use max(returns) instead of average(returns) in off-policy Monte Carlo control?

As I understand it, in reinforcement learning, off-policy Monte Carlo control is when the state-action value function $Q(s,a)$ is estimated as a weighted average of the observed returns. However, in ...
1 vote
45 views

### In first visit monte carlo are we assuming the environment is the same over episodes?

Watching this video (11:30) that presents the simplest algorithm for reinforcement learning: Monte Carlo Policy Evaluation, which says in general: The first time a sate is visited: increment N(s): N(...
• 196
1 vote
397 views

### How is Importance-Sampling Used in Off-Policy Monte Carlo Prediction?

In the section, "Off-Policy Prediction via Importance Sampling", found in the chapter on monte carlo methods of the second edition of Sutton and Barto's, "Reinforcement Learning: An Introduction", the ...
• 43
1 vote
267 views

### How to use pymc3 to sample the mean of a Pareto random variable?

I Have a variable which is Pareto-ly distributed 'x', with unknown alpha and m. I want to find out the distribution of its mean, so I use the following model: ...
• 11
1k views

### Parameter estimation for a model with multiple input parameters

So I've this model that simulates an ecosystem and outputs its attributes, like its chemistry, temperature etc. There are lots of input parameters to the model. My job is to write a program to figure ...
• 1