Questions tagged [resampling]

Resampling is any of a variety of methods for estimating the precision of sample statistics by jackknifing or bootstrapping. In it also used to validating models by using random subsets (bootstrapping, cross validation).

From Wiki

In statistics, resampling is any of a variety of methods for doing one of the following:

Estimating the precision of sample statistics (medians, variances, percentiles) by using subsets of available data (jackknifing) or drawing randomly with replacement from a set of data points (bootstrapping)

Exchanging labels on data points when performing significance tests (permutation tests, also called exact tests, randomization tests, or re-randomization tests)

Validating models by using random subsets (bootstrapping, cross validation)

Common resampling techniques include bootstrapping, jackknifing and permutation tests.

983 questions
0
votes
1 answer

Resample while keeping last date from input file (and not last day computed by `resample`)

Using python pandas (but open to any other solution), I would like to up-sample a DataFrame, while keeping the last date from my input file. The default way of working of DataFrame.resample is to compute the last day of the month. Here is my…
thdox
  • 1,555
  • 2
  • 17
  • 18
0
votes
1 answer

Resample pandas dataframe only knowing result measurement count

I have a dataframe which looks like this: Trial Measurement Data 0 0 12 1 4 2 12 1 0 12 1 12 2 0 12 …
TheChymera
  • 17,004
  • 14
  • 56
  • 86
0
votes
1 answer

Computing percentiles using a fixed amount of memory

I have a stream of int values arriving at a certain rate. Every 5 minutes, I'd like to compute some percentiles from the values, and start over. The problem: I don't want to waste too much memory, so I'd like to keep only a few KBs for the values.…
0
votes
1 answer

bootstrap ICC in R

Being new to R I am having difficulties to bootstrap an ICC output. I first managed to calculate a "normal" ICC using the package ICC without any problems (ICCbare(subject, variable, icc)), but when I tried to get some bootstrapped estimates it…
Begga
  • 7
  • 3
0
votes
0 answers

Poor quality jpeg resize on GD library use. Wrong steps?

So I have the following script to resize an incoming jpg and save it to the server in a new size. The created jpg file has terrible quality, even when I am making the quality 90 on the imagejpeg. I am wondering if I am messing it up earlier in my…
jeynon
  • 322
  • 6
  • 16
0
votes
1 answer

Taking samples from summarized data

I have data in a form much like the output from aggregate, except that I do not have the original non-aggregated data. Example: data <- data.frame(grade=letters[1:4], count=c(3,9,4,1)) grade count 1 a 3 2 b 9 3 c 4 4 d…
MattLBeck
  • 5,701
  • 7
  • 40
  • 56
0
votes
1 answer

Strange behavior of pandas resampling

I'm experiencing a rather strange behavior of the resampling function of a pandas time-series (Python). I use the latest version of pandas (0.12.0) Take the following time series: dates = [datetime(2011, 1, 2, 1), datetime(2011, 1, 2, 2),…
user2689410
  • 465
  • 5
  • 8
0
votes
2 answers

Gstreamer: extract audio from video (flv), resample rate and pipe to streaming sink - can't resample to stream

I am using gstreamer to extract audio from a video and resampling the audio to a different sampling rate. My pipeline worked for file to file conversation, but I couldn't setup the streaming case properly to link it to a jack interface: File to file…
Jike
  • 3
  • 1
  • 3
0
votes
1 answer

R: Row resampling loop speed improvement

I'm subsampling rows from a dataframe with c("x","y","density") columns at a variety of c("s_size","reps"). Reps= replicates, s_size= number of rows subsampled from the whole dataframe. > head(data_xyz) x y density 1 6 1 0 2 7 1 17600 3…
0
votes
0 answers

Pandas: complex resampling and groupby with Multiindex

I have the following DataFrame: df = pd.DataFrame({ 'Trader': 'Carl Mark Carl Joe Joe Carl Joe Carl'.split(), 'Product': list('AAAABBAA'), 'Quantity': [5,2,5,10,1,5,2,3], 'Start' : [ DT.datetime(2013,1,1,9,0), DT.datetime(2013,1,1,8,5), …
Andy
  • 9,483
  • 12
  • 38
  • 39
0
votes
1 answer

downsampling images as a function in Python

I am trying to resample some tiff files from 2000*2000 to 500*500. I have created a function and I tried for one file and it worked nicely. Now I want to apply it for all the available file I have. I want to write the output of the function and I…
0
votes
0 answers

FFMPEG audio upsampling/resampling to 48000 Hz causes sound wheeze/noises/dissortions

I'm using the following example http://svn.gnumonks.org/tags/21c3-video/upstream/ffmpeg-0.4.9-pre1/output_example.c to make videos. If I use 44100 Hz for the output audio format it seems that all is fine, but if I use 48000 Hz any audio gets…
okarpov
  • 864
  • 14
  • 22
0
votes
1 answer

pandas: efficient way to make calculations within groups

I am working with transactional data like this: Purchase data | Buyer | Product | Quantity -------------------------------------------------- 2013-01-01 13:00:00 | Carl | A | 5 2013-01-01 13:05:00 | Mark | B | 2 2013-01-01…
Andy
  • 9,483
  • 12
  • 38
  • 39
0
votes
1 answer

Most efficient way to upsample an image using ImageMagick?

I have a large set of images that vary in size and resolution and I'm using ImageMagick to upsample those of low resolution. Until now, I've been using the -resample option with -sharpen as follows: convert [input image] -resample 500 -sharpen 0x2…
0
votes
0 answers

Permutation analysis of group labels using replacements

I have a dataset of (two groups, replicates). My data is split based on the groups so I have 24 samples in group 1 and 20 samples in group 2. My data has replicates. So each set has 4 replicates, hence I have 6 sets in group 1 and 5 sets in group 2.…