Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
39 views

I have read around a bit and never asked a question on stackoverflow before. It seems there is a solution to my problem, but I don't understand the way it is written and computed. Fit mixture of two ...
Manuel Lenz's user avatar
1 vote
3 answers
184 views

I need help coming up with an efficient algorithm that calculates the limits of the area of a rectangle in R based on the proportion of points that fall into it. Let me start with some example data. ...
John Smith's user avatar
1 vote
2 answers
167 views

My goal is to use curand_uniform() to have every kernel thread generate a single random number. I am testing the randomness my program generates by treating each generated numbers as an index into a ...
wxz's user avatar
  • 2,636
1 vote
2 answers
157 views

I have a list of items, each item has a weight; std::vector<float> weights{0.5, 2, 5}; this list is at most 100 items long, and at least 2 items long. I want to inversely proportionately ...
NeomerArcana's user avatar
  • 2,373
0 votes
1 answer
74 views

Good afternoon, dear colleagues. In the process of working on the project we have problems with fitting the parameters of the distribution law using the maximum likelihood method. Please help me to ...
n_nikitin's user avatar
0 votes
1 answer
100 views

I am trying to model counts distribute across groups in JAGS, but I need to add a random effect for the presence of multiple counts from the same individual. The model is taken from here enter link ...
stefano's user avatar
  • 425
2 votes
1 answer
525 views

I have been trying to run the below code to calculate upper and lower confidence intervals using t distribution, but it keeps throwing the error in the subject. The piece of code is as below: import ...
dskmrjt's user avatar
  • 47
0 votes
1 answer
45 views

I am attempting to perform an image classification task on a dataset with 𝐿 classes. The network I am using is divided into a feature extractor and a classifier. When an image is passed through the ...
kkyub's user avatar
  • 5
1 vote
2 answers
107 views

I'm trying to split items evenly through groups with a max on each group. I have a function which receives a $groups array which declares the maximum capacity of each "group" and an $items ...
Ered's user avatar
  • 517
3 votes
1 answer
167 views

I am fitting a Log Pearson III distribution to my streamflow data. After the fitting, I'd like to plot the observed values and the fitted distribution. However, the figure is not what I expect: 1. The ...
Yang Yang's user avatar
  • 922
1 vote
1 answer
77 views

I am trying to make a program in C# that would generate n number of points, which form centers of non colliding circles with radius r in 200 by 200 plane (coordinates for both x and y are [-100+r, 100 ...
hard_work_exploiter's user avatar
2 votes
0 answers
118 views

I'm trying to fit a log-logistic distribution (truncated) with GAMLSS and can't find how to do it. In the documentation, it says that for Generalized Beta 2 (GB2) : Setting ν = 1 and τ = 1 in (15.20) ...
Fr4nck's user avatar
  • 21
0 votes
1 answer
84 views

I am attempting to write R code that will draw from a binomial distribution but will repeat for every value in a specified column in a data frame. I generated a data frame in r such that the first ...
Ducky's user avatar
  • 15
0 votes
0 answers
107 views

I wish to compare two datasets. To this end, I want to represent the first as a violin and the second as points. Unfortunately, there is a discrepancy between the two plots, as can be seen in the ...
Appolinaire Derbetini's user avatar
1 vote
0 answers
45 views

I'm encountering an issue when trying to use the elements of the matrix D[i] inside a for loop in my JAGS model. The matrix D[i] is derived from a Wishart distribution, and when I try to use it within ...
user26829365's user avatar
0 votes
0 answers
83 views

I need to train a neural network to convert a 1d uniform distribution to a 2d gaussian distribution. I've constructed a simple feedforward network with leaky ReLu activation and trained using MMD as ...
intern5's user avatar
  • 19
0 votes
1 answer
115 views

I am doing Monte Carlo simulation using a triangular distribution in R. rtriangle(n = 10000, a = 9100, b = 13234, c = 11585) In this example, I am doing 10,000 iterations where 'a' is the minimum ...
hadi's user avatar
  • 67
-1 votes
1 answer
74 views

colleagues. I am trying to build a distribution diagram that will satisfy the following conditions: Shows percentage of the values lying in each bin. Bin size is specified by user. All the bars are ...
forkintheass's user avatar
0 votes
2 answers
264 views

I have a metric with 900K users, and I can't generate a distribution that would roughly repeat the existing one. I need this to quickly generate samples for AA AB tests (with guaranteed uplift). Here ...
Roman Stasiuk's user avatar
0 votes
1 answer
63 views

I have following data that shows distribution of fruits on each date. I want to achieve the following format via Pivot Table, that shows percentage of Apple on each day and show the average at the ...
Zam's user avatar
  • 152
0 votes
1 answer
56 views

I cannot figure out how to convert np.random.logistic to scipy.stats.fisk, here's my code: import numpy as np import numpy.random as npr import scipy.stats as ss import matplotlib.pyplot as plt SEED =...
E.Z's user avatar
  • 1,996
-1 votes
1 answer
99 views

I´m working on an energy investment projects dataframe (DF). In this DF, I have two datetime type columns with 'initial_data' and 'final_data' and one float type column 'total_cost'. I need to create ...
Barbara Bressan Rocha's user avatar
1 vote
1 answer
119 views

I'm trying to check if my data is distributed according to some distribution, however I always get NLLF values that doesn't make sense. For example, here I'm generating 10K data points using a normal ...
Hadar Shavit's user avatar
0 votes
1 answer
236 views

I'm having a problem estimating the Weibull three parameters using ML and optimization methods. My results in some of the methods do not look right. However, when a plot the curve looks fine with the ...
Gabriel Maciel's user avatar
1 vote
1 answer
222 views

I am trying to use the predicted probabilities from a multinomial regression using multinom function from the nnet package in R to estimate the parameters for a Dirichlet distribution while taking ...
Marco Pastor Mayo's user avatar
3 votes
1 answer
349 views

I am trying to create examples to compare and contrast Bayesian MCMC (e.g. HMC) with non-Bayesian equivalents. One of the cases I am finding difficult is creating a mixture of gamma distributions. I ...
Galen's user avatar
  • 1,394
0 votes
1 answer
192 views

I want to use a distribution that is not built in to the rugarch package in R. More specifically, the EGB2 distribution. If I have the PDF of the distribution, is it then possible to use this ...
Andy Van's user avatar
0 votes
1 answer
40 views

There is probably a really easy solution to this, but I’m coming up short. I have code in rstan where I fit a Pareto distribution to data, and I’m looking to find out what the alpha parameter is for ...
aeiche01's user avatar
0 votes
1 answer
260 views

Im trying to get electric potential distribution due to charge (or charges) in one plane (1D). To get it I'm solving Poisson Equation using FDM in Python. In my example, the Poisson equation looks ...
Andrzej Sołtys's user avatar
1 vote
1 answer
74 views

I am generating random variates distributed according to a truncated normal distribution using the function v_in defined below. import numpy as np from scipy.stats import truncnorm from scipy.stats ...
zare023's user avatar
  • 13
0 votes
1 answer
160 views

My aim is to first create two plots (which I correctly created), each of them representing the CDF of the number of Puts and Calls still open in the market. For each plot, I also wanted to draw the ...
Ricter's user avatar
  • 122
-1 votes
2 answers
371 views

I use scipy.stats.logistic.fit() with fixed location value, to get an estimated scale parameter, while the residual does not hold normality from qqplot. How should I improve it and how to visualize ...
Emma's user avatar
  • 1
2 votes
1 answer
611 views

I have a data set of household incomes. I want to fit a log-normal distribution to the data then generate random numbers from that distribution. The approach below using the MASS package seems to give ...
Sam Hollon's user avatar
1 vote
1 answer
107 views

I am working on a hobby project and have run into an issue that I wonder if there is a "simple" solution for. The problem is as follows: Assume a 2-dimensional grid with a rectangle defined ...
erik p's user avatar
  • 422
0 votes
0 answers
173 views

There are questions about finding best-fit p.d.f.s given some data: How to find probability distribution and parameters for real data? (Python 3), https://medium.com/the-researchers-guide/finding-the-...
D.R's user avatar
  • 127
2 votes
2 answers
159 views

I have a non-empty integer interval [a; b). I want to generate a random non-empty integer subinterval [c; d) (where a <= c and d <= b). The [c; d) interval must be uniformly distributed in the ...
yuri kilochek's user avatar
0 votes
1 answer
57 views

I have manually fitted a lognormal distribution to my data: from scipy.stats import lognorm sigma = 0.15 mu = 2 x_fit = np.linspace(x.min(), x.max(), 100) y_fit = lognorm.pdf(x_fit, sigma, scale=np....
Roland's user avatar
  • 461
1 vote
0 answers
212 views

I am using fitdist () from fitdistrplus package to fit gamma distributions. Most of the data are fitted fine, but I get a warning for one group of data like below. It seems to be related to NaN ...
Jinjin's user avatar
  • 629
0 votes
0 answers
188 views

I write code in C++ that need to be cross-platform. I need a uniform integer pseudo-random number generator to give the same results on different platforms (not cryptographic strength). As I ...
andrebroz's user avatar
  • 336
0 votes
0 answers
71 views

I'm trying to make program from tutorial, details below: The code suppose to simulate 100 coin tosses by generating a random sequence of T and H characters. After that it should count how many sub ...
Severe Tsunamist's user avatar
3 votes
1 answer
111 views

I am working with different sampling functions, and I am wondering why these two formulations do not give the same result n=2 set.seed(1) rweibull(n,shape = 1,scale = 1) # [1] 1.3261078 0.9885284 set....
Sle R.'s user avatar
  • 119
1 vote
1 answer
76 views

I am a beginner in R and stats, so I apologize if this question has an easy answer that I am just not seeing. I am looking to solve some problems that want a cumulative answer < or > than q. ...
Rylee Baca's user avatar
1 vote
0 answers
41 views

Can anyone help me how to to define the below given custom distribution in flexsurvreg function. custom_pdf=function(y,b0,b1,b2,b3,sigma,alpha){#pdf of proposed model z=(y-b0-b1*t2-b2*t3-b3*t4)/...
Akhilraj N S's user avatar
  • 9,547
0 votes
0 answers
102 views

The following code doesn't seem to be working properly. from stemgraphic import stem_graphic stem_graphic([1,2]) This is wrong. The stem and leaf plot should show 0|2 0|1 How can I get the correct ...
Michael Covell's user avatar
1 vote
1 answer
57 views

I wrote a function U_p_law which takes 2 probability density functions (L_P and L_Q) of 2 players and 2 integer values that define how often each player one when they played each other. The ...
chritter1310's user avatar
0 votes
1 answer
471 views

Here is my code: model = Fitter(data,distributions='lognorm') model.fit() print(model.summary()) model.get_best(method='sumsquare_error') It outputs this: {'lognorm': {'s': 0.8612498618921953, 'loc': ...
Avery 's user avatar
0 votes
1 answer
825 views

I am working with a dataset that I believe follows a "Negative Binomial" distribution. However, when I fit the Negative Binomial distribution, it turns out to be a poor fit. To explore ...
Joe the Second's user avatar
-1 votes
1 answer
109 views

I’m trying to plot the distribution of scores on reddit posts, but can’t figure it out. My data frame is something like that df = pd.DataFrame({"score": [12, 19, 25987, 887, 887, 1], ...
Louis's user avatar
  • 341
0 votes
1 answer
237 views

Azure Synapse dedicated pool, when doing a join on 2 tables with different distribution, Synapse creates temporary tables (shuffle step in execution plan) with the following syntax: CREATE TABLE [...
Stéphane's user avatar
  • 119
0 votes
1 answer
89 views

I have list of degrees of nodes in a network and I want to fit a powerlaw distribution to this empirical degree distribution. I am able to do it using the powerlaw library but for some reason get bad ...
Alexandre Bloch's user avatar

1
2 3 4 5
64