Questions tagged [subsampling]
116 questions
0
votes
1 answer
How to generate monthly period index with annual frequency?
How would generate in the most concise way a monthly period index that is observed only every 12 months?
I came up with the following solution
pd.period_range(start=pd.Period('1975-07'),
end=pd.Period('1985-07'),
…

user64150
- 59
- 5
0
votes
2 answers
How to subsample time series (bursts of GPS locations)
I have a time series as below:
**Date_time**
2018-06-26 17:19:30
2018-06-26 17:20:40
2018-06-26 17:20:41
2018-06-26 17:20:42
[...]
2018-06-26 17:21:36
2018-06-26 17:21:37
2018-06-26 17:21:38
2018-06-26 17:21:39
2018-06-26 17:23:15
I would like to…

Jujulie
- 3
- 3
0
votes
1 answer
Statistical reasoning: how and why does tf.keras.preprocessing.sequence skipgrams use sampling_table this way?
The sampling_table parameter is only used in the tf.keras.preprocessing.sequence.skipgrams method once to test if the probability of the target word in the sampling_table is smaller than some random number drawn from 0 to 1 (random.random()).
If…

user12346170
- 88
- 6
0
votes
0 answers
Create a subsample from a data frame in R
I have five data frames among which I want to run regressions:
df1: stock returns
df2: housing returns
df3: actual inflation rate
df4: expected inflation rate
df5: unexpected inflation rate
Dataframe example
Each of the data frames has the same…

Albi351
- 1
- 1
0
votes
0 answers
Subsample a large Armadillo matrix or vector
I've been skimming through the Armadillo documentation and examples, but it seems there is no real efficient way to subsample (or resample) a large vector or matrix, such that if you had N elements originally, you end up with N / k elements. There…

StarShine
- 1,940
- 1
- 27
- 45
0
votes
1 answer
Drawing a random sub-sample from a df proportionally to categories
I have a dataframe like this
names = ["Patient 1", "Patient 2", "Patient 3", "Patient 4", "Patient 5", "Patient 6", "Patient 7"]
categories = ["Internal medicine, Gastroenterology", "Internal medicine, General Med, Endocrinology", "Pediatrics,…

lordy
- 610
- 15
- 30
0
votes
1 answer
More efficient way of subsampling sound files?
Apologies in advance if this has already been asked and for my wording of this question as I am new to R.
Is there any way of making my code for subsampling sound files more efficient? I have 148 hours of recordings from 9 sites, for each site I am…

HarHar
- 35
- 5
0
votes
1 answer
How to subsample windows of a DataSet in Spark?
Let's say I have a DataSet that look like this:
Name | Grade
---------------
Josh | 94
Josh | 87
Amanda | 96
Karen | 78
Amanda | 90
Josh | 88
I would like to create a new DataSet where each name has 3 rows, where the additional rows…

shakedzy
- 2,853
- 5
- 32
- 62
0
votes
1 answer
How to resample without replacement considering consecutive three as one unit for each choice
The goal is to sample the n number of data points from the original population. But the original population has serial correlation (consider it as time series data) and I want to choose neighboring three as one unit for each choice. That is to say,…

hbadger19042
- 151
- 1
- 8
0
votes
1 answer
Gensim word2vec downsampling sample=0
Does sample= 0 in Gensim word2vec mean that no downsampling is being used during my training? The documentation says just that
"useful range is (0, 1e-5)"
However putting the threshold to 0 would cause P(wi) to be equal to 1, meaning that no word…

Leonardo Sanna
- 57
- 7
0
votes
1 answer
In Matlab, how can I use chroma subsampling to downscale a 4:4:4 image to 4:2:0 when the image is in YCbCr?
I have already converted the jpg images from RGB to YCbCr but must now use Chroma Subsampling to make them 4:2:0. I have searched but have not found any information on how to do this (note: I am very new to Matlab)
Edit: I now have this but at the…

dcalvert
- 73
- 1
- 11
0
votes
1 answer
Creating overlapping, square patches for rectangular images
Given be a rectangular image img and patch s. Now I would like to cover the whole image with square patches of side length s, so that every pixel in img is in at least one patch using the minimal number of patches. Furthermore I want neighboured…

Imago
- 521
- 6
- 29
0
votes
1 answer
How does Gensim implement subsampling in Word2Vec?
I am trying to reimplement wor2vec in pytorch. I implemented subsamping according to the code of the original paper. However, I am trying to understand how subsampling is implemented in Gensim. I looked at the source code, but I did not manage to…

Pietro
- 415
- 6
- 16
0
votes
1 answer
Is there an "easy" way to create stratified split of frames using h2o.ai?
Stratified sampling is old, and very significant.
Donald Knuth (high priest of computer science) uses it for evaluating the work of his PhD students, and for teaching his deeply and sincerely held religious beliefs. (link)
Royal Society article…

EngrStudent
- 1,924
- 31
- 46
0
votes
0 answers
two stage cluster sampling in R
In R,a data set with 30 categories (N cluster=30),in each cluster there are unequal number of units (in ith cluster, there can be 24, 25,26,27, or 28 units). I want to take two stage sampling, first take n cluster from N, second, within these n…

Grace
- 173
- 2
- 10