Skip to main content
Filter by
Sorted by
Tagged with
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
275 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
175 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
42 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
182 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
1 vote
2 answers
97 views

In order to create a dataset to test a statistical calculation package, I want to be able to generate a sample that is correlated to a reference sample with a given searman coefficient. I managed to ...
BayesianMonk's user avatar
0 votes
1 answer
120 views

I have a OneVsOne model running fine with textual feature and target fields. To progress to a multi-class model (i.e. with multiple textual feature fields), I believe OneVsRest with Logistic ...
ChrisTeBurg's user avatar
0 votes
2 answers
111 views

I'm working with a dataset of 2,500 samples, and I need to extract a random subset of 666 samples while meeting specific conditions based on two boolean columns. The dataset (df) contains the ...
taiyaki's user avatar
  • 13
2 votes
1 answer
169 views

I am attempting to write a function which should solve the integral The data points that are used follow a Power-law proces and can become quite large numbers. The data is simulated using the code, ...
TK99's user avatar
  • 143
0 votes
0 answers
91 views

I am trying to implement the approach used by the paper 'On Modeling Change Points in Non-Homogeneous Poisson Processes' by F. Ruggeri and S. Sivaganesan. In their paper they define the full ...
TK99's user avatar
  • 143
1 vote
1 answer
217 views

I have the following telemetry processor: public class ExcludeInProcInvokeTelemetryProcessor(ITelemetryProcessor next) : ITelemetryProcessor { private readonly ITelemetryProcessor _next = next; ...
yggdrasiljsp's user avatar
0 votes
1 answer
51 views

I have made a big Anylogic model with fluid library, and I see that it’s work not fast. I tried to make a profiling with sampling , and it’s shows me that many time used to some Tank is anylogic own ...
QQYu's user avatar
  • 11
0 votes
1 answer
374 views

I was trying to re-implement the model.generate() function of transformers' models from huggingface. I did that so I could implement logit-bias, that normal function does not allow. But before I could ...
AndreiS's user avatar
  • 11
0 votes
2 answers
78 views

This is the data frame I am using and I am trying to subsample column V2(position) evenly (min:1130, max: 4406748) in a way that there is only one representative of column V4(lineage) in the final ...
Mary's user avatar
  • 51
4 votes
1 answer
424 views

Why do the following grouping methods results in different samples. My assumption was that the grouping results to similar samples? small <- data.frame( id = 1:100, gender = rep(c('male', '...
B.M Njuguna's user avatar
0 votes
1 answer
116 views

Person ID Condition 1 Condition 2 Condition 3 A Yes No Yes B No Yes No C Yes No No Hi! I have to generate a sample from a fairly large dataset, and the inclusion criteria are a little more complicated ...
user avatar
2 votes
1 answer
107 views

I have created a pandas dataframe as follows: import pandas as pd import numpy as np ds = {'col1' : [1,1,1,1,1,1,1,2,2,2,2,3,3,3,3,3,4,4,4,4,4,4,4,4,4], 'col2' : [12,3,4,5,4,3,2,3,4,6,7,8,3,3,...
Giampaolo Levorato's user avatar
1 vote
1 answer
61 views

I have a data da that has some date frequency distribution (see below). I have another data db, in which each id may have one or multiple records. Is there a feasible way to get one record (no more ...
Miao  Cai's user avatar
  • 1,054
1 vote
0 answers
57 views

I want to perform GMM in R and specify sampling weights but I do not know how to do it. I am using gmm from gmm package and all weight options are about weighting matrix of GMM estimation. Can you ...
Hanifa Pilvar's user avatar
1 vote
1 answer
348 views

I'm trying to understand the sampling data. And I can't seem to find the exact wording anywhere. Sometimes I just happen to not have all the logs from my application in the traces. I have treated to ...
Katarina's user avatar
1 vote
0 answers
44 views

I have a monte carlo simulation that samples three independent variables from their respective (continuous and skewed) distribution. I need to fix one variable and only sample from the other two ...
Behzad Jamali's user avatar
0 votes
1 answer
262 views

Here is the process of creating the datasets. I saved in both rds and csv format in case any internal data characteristics changes during the saving process: # Save the data frame saveRDS(...
LCheng's user avatar
  • 400
0 votes
0 answers
32 views

Here is an example with sample data library(caret) library(logistf) library(data.table) library(ggplot2) # Create a synthetic dataset set.seed(123) n <- 100 data <- data.table( predictor1 = ...
LCheng's user avatar
  • 400
1 vote
1 answer
69 views

I am trying to understand what is causing this bug in my R code and I feel like R is gaslighting me. The sample() function seems to change depending on how I assign it? Anyways, here is the MRE: #...
ssm1020's user avatar
  • 45
0 votes
1 answer
56 views

I have a set of sampled data consisting of date/time of sample and sample value for a number of days. I would like to determine the time at which the minimum value for each day is measured: Datetime ...
pdv2001's user avatar
  • 25
0 votes
1 answer
591 views

I'm using Open3D in Python to sample 1000 points on the same .obj file to get a point cloud. But every time you process the same .obj file, you end up with a different point cloud. Is there a way to ...
hu changpan's user avatar
1 vote
1 answer
67 views

Here is my dataset schema: request_type | request_body 1 body A 2 body B 3 ... 4 5 6 .. 32 body XXX I need to get 500 records in total. there are 32 ...
Capacytron's user avatar
  • 3,818
0 votes
2 answers
44 views

Which is the most efficient way to generate m dataframes, where each one has a variable that includes random values, and append them? Here's an example: df <- data.frame(id = 1:10, var = sample(1:...
jeff's user avatar
  • 335
0 votes
0 answers
213 views

I am trying to implement a fast sampling algorithm for point clouds. The idea is to overlay a regular grid over the point cloud and cluster all points within the same voxel. I do this with the ...
Costas's user avatar
  • 1
0 votes
0 answers
162 views

I am getting a -inf or nan value from my PyMC model and wanted some help to debug it and figure out where the problem is. Here is my model: # -----------------------------------------------------------...
Rvdb's user avatar
  • 11
0 votes
1 answer
268 views

I am trying to figure out how to randomly sample IDs matching a group variable, but specifically randomly sampling by weighting each grouping variable. For instance, take this data: I want to weight ...
halowiz's user avatar
  • 25
0 votes
0 answers
40 views

Consider the following dataset: df <- data.frame(id = c(1,1,1,1,1,2,2,2,2,2), v1 = c(1,2,3,4,5,6,7,8,9,10)) My intention is to sample randomly (with replacement) rows of size n=3 ...
iGada's user avatar
  • 643
3 votes
2 answers
84 views

I want to sample integers in R, but also set constraints that for example, "3 comes always before 2" and "8 comes always before 5". EDIT: The integers need not to be next to each ...
Aku-Ville Lehtimäki's user avatar
0 votes
0 answers
221 views

The graph data is loaded from a wave file and only 1600 samples are used. For resampling, I have used resampled_audio_data = scipy.signal.resample(audio_data, len(audio_data) // 10) Here is the code ...
Prashant's user avatar
  • 947
0 votes
0 answers
42 views

I am trying to assign reviewers to projects with the condition that the author of the project cannot be assigned as a reviewer to a project in their own portfolio. I created a dataset with variables ...
Jeaniewiththelightbrownhair's user avatar
0 votes
0 answers
62 views

I trying to use the mstage() function in R to draw a multi-stage stratified sample and don't know how to. I wonder if anyone can help? The data is in the end. What I want to achieve is: At the first ...
zeming's user avatar
  • 1
1 vote
1 answer
445 views

I am running a regression task on a dataset which is composed of both authentic and augmented samples. The augmented samples are generated by jittering the authentic ones. I would like to select the ...
majpark's user avatar
  • 103
0 votes
1 answer
687 views

My simplified Dataset looks like: class MyDataset(Dataset): def __init__(self) -> None: super().__init__() self.images: torch.Tensor[n, w, h, c] # n images in memmory - ...
Mateusz Konopelski's user avatar
-1 votes
1 answer
130 views

I'm trying to design a training flow for sampling samples during training. My data look like this: defaultdict(list, {'C1629836-28004480': [0, 5, 6, 12, 17, 19, 28], 'C0021846-...
jupyter's user avatar
  • 351
1 vote
1 answer
138 views

This is my first question to the stack overflow. We are doing statistics for simulation data and I wanted to implement the bootstrap in Oracle-SQL (sampling data with replacement). My approach is as ...
WedgeCountry's user avatar

1
2 3 4 5
33