Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
2 votes
0 answers
83 views

The following algorithm is intended to uniformly sample priority (or criterion) vectors from a transformed version of the simplex (which is a surface in 3d space). The transformation involves taking ...
Engr. Moiz Ahmad's user avatar
0 votes
0 answers
52 views

According to the documentation, the SAADC (ADC) device has a maximum sampling rate of 200kHz (ksps), a value that is the sum of a minimum TACQ (acquisition time) of 3us and a conversion time of "&...
Olof Forshell's user avatar
0 votes
0 answers
79 views

I am trying to implement a basic custom sampler, and here is the code that I have been working with. As I attempt to render the scene, I encounter an error stating that the traverse() method is not ...
Shreyas Shivakumara's user avatar
5 votes
3 answers
170 views

I'm currently filtering a Java List to keep approximately a percentage of its elements using a random approach: import java.util.List; import java.util.Random; public class Main { public static ...
user30654079's user avatar
1 vote
1 answer
57 views

I'd like to sample a from the distribution c^a / (-a log (1-c)) where a is a natural number (1 to infinity) and c < 1. How can I do this in Python? I've looked at scipy.stats.rv_discrete, but it ...
serene's user avatar
  • 13
1 vote
2 answers
76 views

The following snippet samples elements with replacement from a vector: use rand::seq::IteratorRandom; fn main() { let mut rng = rand::rng(); let values = vec![1, 2, 3, 4, 5] as Vec<i32>;...
Roger V.'s user avatar
  • 803
2 votes
3 answers
276 views

I have the following population: a b b c c c c I am looking for a SQL statement to generate a the stratified sample of arbitrary size. Let's say for this example, I would like a sample size of 4. I ...
Saqib Ali's user avatar
  • 4,551
3 votes
2 answers
177 views

I am using the PyVista package to resample a .vtk mesh of nonconforming rectangular prisms onto a grid of points. However, some of the points fail to sample the dataset, which results in a "0&...
oaazeved's user avatar
0 votes
0 answers
43 views

See attached my waveform of input to channel of ADS1115, my code, and my output that I am getting I cannot get the output matplotlib waveform to plot smoothly like my input waveform from oscilloscope ...
Marc Rainey's user avatar
1 vote
1 answer
57 views

I have a dataset with two groups of people: vaccinated and unvaccinated. In the vaccinated group, each row represents a unique ID with a corresponding unique T0. In the unvaccinated group, each ID may ...
Miao Cai's user avatar
  • 1,054
0 votes
0 answers
37 views

Lets say I am looking at a sample of students and their grades achieved across 5 subjects. 90% of my sample is biased towards worst performing students and 10% of my sample is random. What is a simple ...
Alexander Churakov's user avatar
0 votes
1 answer
89 views

I have a a dataset composed of XYZ coordinates, which can be rendered in 3D bar chart as the picture below. The main question I have is: how to generate X points (X being a user input) inside said ...
Ryderc's user avatar
  • 109
1 vote
1 answer
51 views

I have a non-negative normalized vector p. I would like to sample an index from the index set of the vector. The probability getting sample k is p[k]. Using np.random.choice function, I can write the ...
Sakurai.JJ's user avatar
1 vote
2 answers
183 views

I'm working with the Polars library in Python and would like to sample values from a list based on associated probabilities, similar to how numpy.random.choice works. Here's what I'd like to achieve: ...
Pedro_Siqueira's user avatar
0 votes
1 answer
95 views

Is there any way to save weighted survey with strata and fpc as dataframe? For example, here is the simple dataframe: Data <- data.frame( X =c(1,4,6,4,1,7,3,2,2), Y = c(6,5,9,9,43,65,45,67,90), ...
Kammy Deng's user avatar

15 30 50 per page
1
2 3 4 5
108