Skip to main content

All Questions

Tagged with
0 votes
0 answers
15 views

How to Fix Issues in R Code for Metropolis-Hastings Algorithm Applied to Gumbel Type II Distribution?

I am trying to implement the Metropolis-Hastings (M-H) algorithm in R to sample from the posterior distribution of a Gumbel Type II distribution. However, I'm encountering issues with my ...
Carlos Souto Dos Santos Filho's user avatar
0 votes
0 answers
86 views

How to make Matching Algorithm more efficent in Python

I've developed a Python script to calculate match scores between users based on their locations. The script generates combinations of users, calculates the average weight for each combination, ...
Joseph Adam's user avatar
0 votes
0 answers
52 views

Gauss milton Newton

This is my code. I don't know what the problem is; it's giving me results that don't make sense, The code begins by initializing the simulation parameters, such as the sample size (N), the number of ...
Ayoub hamza's user avatar
1 vote
1 answer
82 views

Calculate Probabilites of victory in a coin flip game with n flips

In this game, a coin is flipped n times. Player 1 gains a point when two heads are flipped in a row, Player 2 gains a point when a head is flipped and followed by a tails. For example, in the string &...
Peterfvn's user avatar
2 votes
1 answer
65 views

Optimization Strategy for Data Retrieval from APIs with Row Limits

I'm currently working on a data scraping project where I need to retrieve large amounts of data from several statistical APIs. These APIs, particularly older and government ones, often do not support ...
Ruben Selander's user avatar
1 vote
1 answer
58 views

How to score the consistency of angles?

I'm averaging angles by averaging their coordinates after placing them on a unit circle. I read that the length of the resulting point or centroid/center of mass is an indicator of the consistency of ...
garystu's user avatar
  • 11
0 votes
1 answer
87 views

algorithm to generate numbers which have a given average product based on distance

I am trying to come up with an algorithm which generates numbers that have a given average product based on their distance. For example, say there were 4 points on the x-axis, x1 x2 x3 and x4. Each ...
woot's user avatar
  • 33
0 votes
2 answers
78 views

Choosing a weighted task in O(1) space-time complexity

Suppose I have a list L of tasks. Each task is represented by an integer weight, which states how important the task is. The importance of a task doesn't affect its order, but affects its chance of ...
Daniel's user avatar
  • 7,635
1 vote
1 answer
159 views

Moving window Autocorrelation. One pass algorithm. Speed and Stability concerns

Helllo, I have a timeseries x for which I want to generate a 'moving window autocorrelation at lag 1' series using a window of size window_size and a step of size window_step. I have written the ...
Atharva's user avatar
  • 181
0 votes
0 answers
184 views

Calculate normalized score between two numbers

I trying to score how one number is similar to another number in one set and then create final score between normalized scores from all sets to get average score 100% similarity should occur when two ...
Damian Zborowski's user avatar
0 votes
1 answer
39 views

How to asses the total number of items?

I have a stream processing system which has a cache. cache size is 100K and the TTL for entries is 30 minutes. I want to come up with a metric that will help me assessing the total number of items ...
sleekster's user avatar
0 votes
1 answer
85 views

Quartile Array: Inclusive or Exclusive of Median Elements

Let's say that we have the following array: [3.0, 4.0, 4.0, 4.0, 7.0, 10.0, 11.0, 12.0, 14.0, 16.0, 17.0, 18.0] The inter-quartile range would be as follows: 25%: 4.0 50%: 10.5 75%: 15 If one then ...
Jake Chasan's user avatar
  • 6,500
0 votes
2 answers
440 views

Create a scoring formula to compare ratings

I have a table with 6 columns (name,1-5) representing rating number. The table has rows with item name and how many 1 stars, 2 stars etc it received For example: Item 1 2 3 4 5 -------------...
pgs0001's user avatar
1 vote
2 answers
125 views

Variation of fibonacci?

Somewhere I stumbled upon a following method/function. I initially thought it is a recursive fibonacci function, but it is not. Any idea what this function do or what would be its purpose? int ...
Shaggy's user avatar
  • 614
0 votes
1 answer
78 views

C#: Split a Single Annual Figure into Monthly amounts based on an arbitrary Y=f(X) formula

I have an annual figure, let's say for purposes of this question that the figure is 100%. What I would like to do is have C# split the 100% figure into a curved distribution of monthly percentages ...
Coruscate5's user avatar
  • 2,453

15 30 50 per page
1
2 3 4 5
36