Questions tagged [sampling]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
20 views

class label is less than 1 percent in classification problem

I am working on a ML problem where one class label is very less than even 1 percent. i.e 0.0002% I have tried undersampling, oversampling, SMOTE but the results are not satisfactory on the model. I ...
  • 101
0 votes
0 answers
13 views

Use two different but correlated time-series signals as two different samples to train a model

I want to train a forecasting model for signal A initially. In the future, forecasts B and C may be required. These are all financial time-series signals with the same resolution. The issue I am ...
4 votes
3 answers
124 views

Timing of applying random oversampling on the dataset

I tried to learn classification using machine learning algorithms. I went through Breast Cancer - EDA, Balancing and ML the notebook. In this notebook ...
  • 297
0 votes
0 answers
14 views

How to subset a 'representative sample'?

Sometimes I need to subsample a dataset for my analysis/modelling. What are the strategies/things to check for to select a subsample that's representative of the entire sample? And in addition, how to ...
  • 359
0 votes
0 answers
13 views

Interview Question: A/B Survey Results Non-Random Sampling

How would you respond to the following case/question: Assume you are testing the effect of an ad campaign at a social media company. The study is divided into two groups, 5,000 subjects who are shown ...
2 votes
1 answer
88 views

Why we do random sampling when we select the training set?

The usual workflow when building a machine learning model starts with random splitting the data set into training and test set. What I can't understand is why we do this. For example lets say we have ...
  • 151
1 vote
0 answers
10 views

Data collection after the model is built and deployed

I have built a machine learning model which predicts whether a customer will buy a product or not. The model performs well on cross validation tests. Now, I will deploy it in production to recommend ...
  • 123
0 votes
0 answers
9 views

Optimally sample from multiple distributions

I have two datasets both of the form from the table below. I am interested in downselecting from dataset A by sampling from the distribution of values from dataset B. However, I want to consider both ...
0 votes
0 answers
20 views

Slice NumPy arrays differently along axes (without looping)

I am trying to analyze a temporal signal sampled by a 2D sensor. Effectively, this means integrating the signal values for each sensor pixel (array row/column coordinate) at the times each pixel is ...
0 votes
0 answers
16 views

How to improve L2 loss for generative autoencoder

I am working with a modified generative autoencoder and having issues getting the L2 sufficiently low. I think problem is that because my data is over a very large range and is standardized to values ...
0 votes
0 answers
8 views

Difference between Jackknife vs bootsrap vs cross validation

I have doubts about the differences between these three methods and I would like to clarify the following: Main differences Advantages of one over the other Context of use of each method etc... If ...
  • 302
0 votes
0 answers
9 views

the mean and standard deviation aren't the same as those of the input data i provided after sampling

I have a log-normal mean and a standard deviation. after i converted them to the underlying normal distribution's parameters mu and sigma, I sampled from the log-normal distribution however when i ...
0 votes
0 answers
91 views

under sample to get specific number of samples per class using tomek links of imblearn

I have a dataset with classes in my target column distributed like shown below. ...
0 votes
0 answers
19 views

How to use Splitting for startifying in sklearn for multiple files

I have csv data file for binary classification. I divided it into 5 multiple files and tried to apply the stratification technique so the class label has the same proportion for all the files. but I ...
  • 175
0 votes
0 answers
17 views

KDE Sampling with negative density and/or class-specific weighting

I have a dataset which contains two overlapping distributions/classes of points. I have been trying to sample from just one of these distributions/classes using the scikit learn Kernel Density class, ...
0 votes
0 answers
19 views

Scikit Learn Random Forest Classifier Hyperparameter Min Target Sample Size

From reading the docs on Scikit Learn, I haven't been able to find an answer, but does anyone know if there is a way to specify to always include a specific number out of the max sample size of ...
0 votes
0 answers
40 views

Generating new sample with same distribution

I have a timeseries data for 1 week. The data contains readings from a device for certain hours of the day. There are about 8-10 readings per day at different timestamps. The timestamps recorded for ...
  • 1
1 vote
0 answers
23 views

Interrupted Time Series with Unevenly Distributed Samples

I'm working on causal inference using Interrupted Time Series Design. I have multiple samples per day and am selecting my analysis bandwidth based on pre-treatment RMSE on leave-on-out cross ...
0 votes
1 answer
18 views

How can I distribute samples optimally to fit a model?

I'm trying to fit a model to a low number (~5-10) of data points. I might be able to suggest the optimal distribution of the data points beforehand, knowing a bit about the data and the model I ...
  • 101
0 votes
1 answer
29 views

Recommended number of features for regression problem

In the following link the answer recommends a feauture amount of N/3 for regression (or it is quoted). Where N corresponds to the sample size: How many features to sample using Random Forests Is there ...
0 votes
0 answers
44 views

Sampling from Discrete Space using Latin Hypercube

I wanted to use Discrete Latin Hypercube to sample 20 samples from a space created by an array that has 4096 values. So my desired output would be something like the following: ...
0 votes
0 answers
27 views

How to detect data drift for a small size serving dataset with respect to a large training dataset?

The training data contains almost 6 million records and the serving/inference data that I get in batch contains about 400 records. Before my model does any predictions on the inference data I need to ...
2 votes
3 answers
91 views

What could go wrong if I sample before classification?

I have a million entries in a table that I can use to train a binary classifier. Only 30 thousand of them are positive. Is there anything fundamentally wrong with selecting around 30 thousand negative ...
  • 186
0 votes
0 answers
12 views

how to convert an array of non regularly interleaved coordinates to a matrix of weights using interpolation to obtain uniform sampling

I have an array of coordinates each one with an associated timestamp. Something like: ...
  • 101
0 votes
0 answers
46 views

Train Test Split for Imbalance Data set for credit card transaction data set

I am currently working on a credit card transaction datasets for fraud detection, and I am unsure how to go about splitting the data. Transactions are time related data, do I split them like how you ...
0 votes
0 answers
113 views

Negative samples generation for Q&A model training

I'm pondering over what's the best time to generate negative samples for a Q&A dataset for training a sentence-bert model for a semantic similarity task. I have a dataset in the form of pairs: ...
0 votes
1 answer
24 views

Sampling a data based on average and variance of another data

I have a set of textual datasets that have the following average and variance tokens lengths: ...
  • 242
0 votes
0 answers
111 views

under sampling the dataset of multi-label classifiction

I have a multi-label dataset, whose label distribution looks something like this, with label on x-axis and number of rows it occurs in the dataset in y-axis. ...
0 votes
0 answers
115 views

Is it always appropriate to use SMOTE in an imbalanced multiclass dataset?

Is it good practice to always use SMOTE and random undersampling in an imbalanced multiclass dataset or are there exceptions? In context, I am using a traditional machine learning model (SVC) for ...
0 votes
0 answers
31 views

Compare standard deviations in different samples?

I have some data which you can group based on different variables. I know how to test if they have significantly different means. But what the deviation inside the samples?
2 votes
1 answer
66 views

How create a representative small subset from a huge dataset, for local development?

​ I have a time series problem and the dataset I'm using is rather huge. Around 100GB. For local development I'm trying to subset this into a very small batch around 50MB, just to make sure unit tests ...
1 vote
0 answers
26 views

Stratified sampling - use of proxy variable

For splitting of the data into train/test/val I use stratified sampling. Is it appropriate to define strata using information extracted from the dataset? E.g. use machine-learning to model proxy ...
1 vote
1 answer
35 views

Sampling Technique for mixed data type

I am looking for a very specific sampling technique which pertains to a very large dataset with mixed data type i.e, I have categorical as well as continous variables and want to have a sample that ...
2 votes
1 answer
30 views

Discrepency in 25th percentile of standard deviation calculation

For each of the following sample sizes [3,5,7,9], I Need to calculate the 25th percentile of the standard deviation for the values sampled. And the total number of trials will be 10. DataFrame ...
0 votes
0 answers
43 views

Is it right method to remove instances that are hard to predict before train test split?

In a binary classification problem, I have a slightly unbalanced medical dataset with class distribution: 0:5600, 1:1500 0 without a problem and 1 with a problem. I tried many pipelines, automls, and ...
  • 3
1 vote
1 answer
31 views

Multiclass data redistribution

I want to redistribute the data in classes according to new proportions and wonder what is the optimal way to do it. For example I have ...
2 votes
1 answer
216 views

Negative sampling for graph representation learning

I was watching a lecture about graph representation learning (from here) and got a little bit confusing about how they define the negative samping procedure. In the presentation J. Leskovec briefly ...
1 vote
1 answer
245 views

Is there a relationship between learning rate and training set size?

I have a large dataset to use for training a Neural Network model. However, I don't have enough resources to do a proper hyperparameters tuning on the whole dataset. Therefore, my idea is to tune the ...
  • 95
1 vote
1 answer
40 views

Reducing (Variance) | the gap between my weights

I have ML ready samples. And each sample has a weight. The weights distribute between [0-1] My problem arise because there are a lot of samples which are ...
0 votes
1 answer
429 views

Controlling the sampling from Variational AutoEncoder (VAE)

Suppose a Variational Autoencoder (VAE) is trained with mnist data. To sample, one draws from normal distribution. My question is: suppose I am interested in generating only 1s and no other digits. ...
  • 103
0 votes
2 answers
190 views

Subsampling the “right” amout of data to train an ML model

I am training a machine learning model (i.e., a classifier) on a large dataset. I know that I can get the same results using less data (about 30%) but I would like to avoid the trial and error process ...
  • 1
1 vote
0 answers
34 views

Stratification sampling of a json Array [closed]

I have a json array file that i need to create a smaller sample of for testing purposes. A sample of the file looks like: ...
1 vote
1 answer
67 views

What is the proper proportion for train and test set for classification system?

I have recently googled the best proportion for training and test set for classifying physiological data between normal and abnormal. Much of the source tells that the proportion should be 70:30 or 80:...
  • 21
2 votes
2 answers
212 views

Undersampling for credit card fraud detection before or after Train/Test Split

I have a credit card dataset with 98% transactions are Non-Fraud and 2% are fraud. I have been trying to undersample the majotrity class before train and test split and get very good recall and ...
2 votes
3 answers
123 views

Sampling n data points from high dimensional data

I have some face images(of a single person), which I ran through an embedding generator to get 128-dimensional embedding. I have 1000 such embedding (shape of the dataset (1000, 128)). I have a ...
1 vote
1 answer
42 views

How to bin a distribution data reported with different frequencies ( salaries ), showing mixed linearity and non-linearity?

I am researching on pay-scales, and wish to receive advise to treat data of salaries. Objective My interest is to approximate the salary corresponding to different hierarchical levels in an ...
0 votes
0 answers
22 views

Sampling items from a population of subpopulations

I have a population of $n$ items to label and a budget to label only $m$ ($m << n$) of them before training. The population can be partitioned into subpopulations, recursively. In other words, ...
  • 677
1 vote
2 answers
49 views

Recover a integer valued function with *-learning

I have the following problem. From a technical model we have a function $f(n,p)$ approximating its runtime. The function $f$ which maps $$ f: \mathbb{N} \times \mathbb{P} \to \mathbb{R}_{+} $$ where $...
0 votes
0 answers
27 views

how to know if there is a bias in data collection methods

I am collecting data for machine learning models I want to build for some application. I started with random sampling (just simply collecting 'recent' data) but I am not getting enough records of ...
1 vote
0 answers
78 views

Follow up question regarding Upsampling for Imbalanced Data and the use of ADASYN instead of SMOTE

I have a follow-up question regarding this topic. I have been working on a project predicting success(1) or failure(0) for organizations by using the Decision Tree and Random Forest algorithms. My ...