Questions tagged [sampling]

In signal processing, sampling is the reduction of a continuous signal to a discrete signal. In statistics, sampling is the selection of a subset of individuals from within a statistical population to estimate characteristics of the whole population.

This tag should be used for questions related to programming solutions related to sampling.

Sampling can be done for functions varying in space, time, or any other dimension, and similar results are obtained in two or more dimensions. More information in Wikipedia - sampling (signal processing).

For statistical sampling, see Wikipedia - sampling (statistics) for more.

1593 questions
0
votes
1 answer

Can not apply SMOTE filter in WEKA

I want to apply the SMOTE filter in WEKA version 3.6.10 on a dataset, but the Apply button is disabled. The input file has the .arff format and the first column represents the nominal values. There are also other filters that can not be applied such…
dorinmoldovan
  • 89
  • 2
  • 7
0
votes
1 answer

Sample to create a new column

I want to create a new column that will label a certain amount of columns 1 and the remaining number of columns 0. If I want 20% of my columns to have this option I can get close by taking: test$Rand_Num <- sample(1:5, nrow(test),…
Drthm1456
  • 409
  • 9
  • 17
0
votes
1 answer

stratified sampling R: java.lang.OutOfMemoryError: Java heap space

I want to use this function here is the code on github to sample my dataset in 2 parts 90% traning data set ( for example) and 10% (the rest) are the test ( for example tried this code…
0
votes
0 answers

Sampling a Boltzmann Distribution using Python's emcee

I'm a beginner at python and am learning to use MCMC sampling methods, using python's emcee package. As a beginner exercise I want to sample a Maxwell-Boltzmann Distribution. I have an example code which samples a Gaussian, defined through the…
0
votes
1 answer

Moving players on chance on a soccer field in R plot

Background: I'm trying to come up with a coding scheme such that any of my 14 players (separately; each player is shown as numbered circles below) on the center thick line of my soccer field independently moves to left by .1 (in x-axis value unit)…
rnorouzian
  • 7,397
  • 5
  • 27
  • 72
0
votes
1 answer

How to (fake) mipmap equirectangular rendering?

When rendering an equirectangular encoded 360 texture, there is usually a lookup like u = atan(x,z) v = acos(y) The equirectangular texture is already very prefiltered. Just turning on mipmaping does not work. u is not continuous and the texture…
starmole
  • 4,974
  • 1
  • 28
  • 48
0
votes
1 answer

Detecting anti-aliased or undersampled text image

I have an image that is essentially a text document (black and white) but due to anti-aliasing/undersampling applied during scanning, the image contains a lot of color, light tone pixels and is thus saved as a full-color image i.e: takes a lot of…
PentaKon
  • 4,139
  • 5
  • 43
  • 80
0
votes
0 answers

Sampling technique for creating point in 2D Plane with MATLAB

I want to write a code in which when it runs, It create 30 point in the 2D Plane. and every time when the code runs, the points have different coordinates. I try using hammersly sampling. But the problem of this sampling technique is the points have…
0
votes
1 answer

Sampling video every N frames starting at n0 initial frame

Question I am trying to figure out how to sample a video stream x[n] every N frames, starting at frame n_i, i < N, so that I end up with N new videos of length len(x) / N. In formula this is simply: y_i[n] = x[n_i + n * N]. Here there is a diagram…
Atcold
  • 683
  • 2
  • 10
  • 31
0
votes
1 answer

systematic sampling of a raster

I would like to take a systematic sample of cells from a raster layer. The raster that I am using to select the sample has been divided into 15 sections. I would like to sample 2 cells from each section, but I would like the relative position of the…
Splash1199
  • 379
  • 3
  • 14
0
votes
1 answer

Randomly assign an integer within each group of ID's in Dataframe - R

I am trying to set a random integer within each group of existing ID's. The integers must meet the following conditions: unique, non repeating, and the highest integer for a group of ID's will not be greater than the number of rows with that ID. I…
DW1
  • 41
  • 7
0
votes
0 answers

How to enhance the running speed when doing sampling with replacement in Java?

I've dealt with the tabular-data that has approximately more than one million rows in the data and it only contains just one column. I tried to use bootstrap method also known as traditional sampling methods with replacement. Since bootstrap method…
sclee1
  • 1,095
  • 1
  • 15
  • 36
0
votes
1 answer

Sample audio from microphone to array of integers (C++/Qt)

I am developing an app that records audio from microphone to integer array. Array is then passed to FFT and MFCC. I need to make frames about n samples and I need to 50% overlaps them (they cannot be side by side). So I need 3 buffers - when the…
0
votes
1 answer

Sampling rows from numpy array efficiently

I am wondering how to sample rows efficiently from high dimensional numpy arrays. At the moment, this is what I do: n=11000000 d=28 X = np.random.randn(n, d) idx =np.random.choice(range(n), 10000000, replace=False) time_l=[] for i in range(15): …
Jonasson
  • 293
  • 1
  • 2
  • 11
0
votes
0 answers

Lack of memory for experiment designs by ccd in R

I want to generate central-composite design in R for 60 factors. I use ccd function in rsm as ccd(60). However, I got the error like below: Error in rep.int(rep.int(seq_len(nx), rep.int(rep.fac, nx)), orep) : vector is too large I know there…
Amin
  • 63
  • 10