A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

Questions tagged [sampling]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
0answers
26 views

How to estimate the accuracy on a large dataset?

Given that I have a deep learning model(handover from former colleague). For some reason, the train/dev set was missing. In my situation, I want to classify my dataset into 100 categories. The ...
2
votes
0answers
18 views

Difference between Gibbs sampling and variational Bayes inference

After reading in blogs and books, I came to the conclusion that Gibbs sampling and variation Bayes are methods for estimating or inference of posterior. Below link described but it's difficult to ...
3
votes
0answers
27 views

Stratified selection based on the y response creates a bias in information (Berkson's bias)?

I have a database which has individuals in different months and a target variable which indicates wheter an event happened or not, let's say: ...
1
vote
0answers
17 views

Is there an algorithm for sampling shortest paths?

I have a triangle matrix NxN of distances between vertices (vertex i connected only with vectices j>i) and I'd like to sample path from first to the last and use it as a training sample. Is there an ...
2
votes
1answer
31 views

Using Majority Class to Predict Minority Class

Suppose I want to train a binary model in order to predict the probability of who will buy a personal loan and in the dataset only 5 percent of the examples are people who marked as bought a personal ...
3
votes
1answer
102 views

How are samples selected from training data in Xgboost

In Random Forest, each tree is not fed with the full batch of training data, only a sample. How does this work for Xgboost? If this sampling happens as well, how does it work for this ML algorithm?
2
votes
1answer
18 views

Gaussian Process for Classification: How to do predictions using MCMC methods

Problem I was reading about Gaussian Processes for regression in the "Gaussian Processes for Classification" textbook and in a few other online resources. Everywhere I look people seem to avoid ...
0
votes
0answers
14 views

undersampling problem in imblanced dataset ValueError: Unknown label type: 'continuous'

I would like to undersampling the data but I encounter the following error? ...
2
votes
2answers
54 views

How to perform bootstrap validation?

I am working on a binary classification problem. I ran cross-validation and grid-search on train data. Later I validated the model on my test data as shown below ...
1
vote
0answers
15 views

Bayesian network in Python: both construction and sampling

For a project, I need to create synthetic categorical data containing specific dependencies between the attributes. This can be done by sampling from a pre-defined Bayesian Network. After some ...
3
votes
2answers
28 views

Does Sampling size matters in Multi classification Model

I am working on a multi class classification model where few of the class are with less data compare to other classes. I used random sampling technique to create a sample from the population keeping ...
1
vote
1answer
25 views

Adjust predicted probability after smote

i have an imbalance data set and I used smote to oversample the minority class and undersample the majority class. now, I want to check the test AUC using predict_proba of the model. I have two ...
0
votes
0answers
10 views

What are accepted methods for sampling data that will be sampled?

I have a very large (TBs) dataset that I need to sample to a smaller more manageable size. However, I know that the sample will also be sampled to get statistics after it leaves my hands. Are there ...
0
votes
1answer
44 views

Correctly evaluate model with oversampling and cross-validation

I'm dealing with a classic case of dataset with binary imbalanced target (event 3%, non event 97%). My idea is to apply some sort of sampling (over/under, SMOTE etc.) to address the issue. As I see, ...
0
votes
2answers
104 views

How to find whether a dataset is blanced or imbalanced?

I have few dataset to experiment classification(Multi-class). These datasets are about 400GB. I wanted to know whether the dataset is balanced or imbalanced. How to know that dataset is balance or ...
0
votes
0answers
10 views

How to compare two 3d vectors, which differ by sampling start time

I have some curve, assume it is given by some function f(x(t),y(t)). This 3d curve is sampled twice: t=0..99, no noise. This ...
1
vote
0answers
25 views

Training data requirements for NLP models

Are there general guidelines for how much data is required for natural language processing (NLP) classification models? I understand this may depend on the text quality, text length, how accurate the ...
2
votes
3answers
55 views

Highly Imbalanced dataset fro classes more than 200

I have a text dataset where I need to train a classifier to classify the titles into categories. The dataset shape is more than 575000. There are 256 target classes here. The problem is the dataset is ...
4
votes
3answers
139 views

Why did sampling boost the performance of my model?

I have an imbalanced dataset with 88 positive samples and 128575 negative samples. I was reluctant to over/undersample the data since it's a biological dataset and I didn't want to introduce synthetic ...
0
votes
0answers
14 views

How to compare two samples taken from the same dataset?

I have data from almost 10 different sensors and was trying to downsample the data. I tried the reservoir algorithm and the uniform sampling and the random sampling techniques. I was wondering how I ...
1
vote
0answers
14 views

Sampling trying to keep as much multivariate variance as possible

We can use PCA for dimensionality reduction, but at the cost of getting "uninterpretable" variables. I was thinking if anyone considered a sampling technique that would try to aim keeping as much of ...
0
votes
0answers
18 views

Sampling user IDs from a large data set for retention analysis

Let's say I have a data set with user identities and their respective orders, of the form: ...
0
votes
1answer
197 views

train_test_split ValueError: Input contains NaN

I tried to do a stratified sampling by way of train_test_split in order to save myself some trouble later. So I wrote the following lines: ...
0
votes
0answers
24 views

Can we have a sampled sigmoid instead of softmax?

Thh solution proposed here: is for softmax negative sampling. How do we do a sigmoid negative sampling? I couldnt find a corresponding 'tf.nn.sampled_sigmoid_loss' function.
0
votes
1answer
44 views

Random forest with zero precision for unbalanced test data

Apologies if this is a basic question. I have a very unbalanced dataset in which the records are labelled by one of two classes, class1 (negative class) and class2 (positive class): class 1: 1.5 ...
1
vote
0answers
31 views

Which machine learning methods can be used to address MonteCarlo sampling problems?

I would like to pick the brains of machine learning experts here to point me to a branch of machine learning technique that is best suited for my context. I would like to estimate the average value $\...
0
votes
0answers
15 views

how to read all my audio file from one directory and store the outputs for all the files in one variable (matrix)

I would like to run the program over all the samples of audio file and store the output in a single variable. For example, if my folder is "audio" inside that I have 10 audio files (...
1
vote
0answers
56 views

Variable Importance changes with oversampling

I am currently using Xgboost for a binary classification problem with highly imbalanced data in R. I have used oversampling to train the model. This worked well, now however it comes to measuring ...
0
votes
0answers
6 views

Balanced sampling of a dataset on 2 or more regression targets

I'm given a dataset with 2 regression labels, $y_1$ and $y_2$ in the range $[0, 1]$. My goal is to sample from this dataset such that I come as close as possible to a uniform distribution for both $...
0
votes
0answers
10 views

How to deal with features of majorly different sampling rates in neural networks?

Consider you have neural network with two different time series as input features. The first is sampled once every second. The second is sampled once every minute. I want the network to perform ...
0
votes
1answer
22 views

Forcing class imbalance to mirror the target data

I'm trying to do binary classification on some data, my source data has a class split of 40% A / 60% B while my target data has a split of 70% A / 30% B. Is it a worthwhile strategy to use SMOTE to ...
3
votes
2answers
215 views

Is it OK to use the testing sample to compare algorithms?

I'm working on a little project where my dataset have 6k lines and around 300 features, with a simple binary outcome. Since I'm still learning ML, I want to try all the algorithms I can manage to ...
3
votes
1answer
596 views

SVM SMOTE fit_resample() function runs forever with no result

Problem fit_resample(X,y) is taking too long to complete execution for 2million rows. Dataset specifications I have a labeled dataset about network features, ...
0
votes
1answer
47 views

Sampling Big Data for Predictive Analytics in Python

In practice, how does one go about sampling a from big data set (eg. +/- 50 million distinct observations) to perform ML using Python? Most non-parametric models (e.g., SVM, ensemble models) start to ...
0
votes
1answer
117 views

Choosing sample from large dataset?

How to choose sample from a large dataset such that each unique row from the dataset is selected at least once in the sample? Is there a way of doing this in python?
1
vote
1answer
931 views

Using SMOTE for Synthetic Data generation to improve performance on unbalanced data

I presently have a dataset with 21392 samples, of which, 16948 belong to the majority class (class A) and the remaining 4444 belong to the minority class (class B). I am presently using SMOTE (...
0
votes
0answers
46 views

Cross-validation and out-of-bag bootstrap applications

I have a question regarding steps on which a specific resample method should be used in general. As far as I know: out-of-bag bootstrap is the resample method with replacement, which has lower ...
1
vote
1answer
150 views

How to do k-folds in python whilst splitting into 3 sets?

Consider the following data: ...
3
votes
1answer
30 views

Sub-sampling so that sample statistics match population statistics

I want to investigate the impact of various testing strategies on a product. Let's say chairs. I start with 500 random chairs that I've picked up from garage/yard sales. They come in all shapes and ...
0
votes
0answers
95 views

Why am I getting such a low precision after performing oversampling and undersampling?

I am performing fraud analysis on credit card fraud committed dataset. I am performing oversampling by .sample(oversampled_class_size) and undersampling by .sample(undersampled_class_size). I am ...
2
votes
1answer
112 views

In Machine Learning, what is the point of using stratified sampling in selecting test set data?

I am currently learning machine learning via this book "Hands-On Machine Learning with Sci-kit learn and Tensorflow" by Aurelien Geron. In page 76 and 77, the author talks about using stratified ...
6
votes
1answer
1k views

Cross validation for highly imbalanced data with undersampling

In my problem, I am dealing with a highly imbalanced data set, say for every positive class there are 10000 negative one. A normal starting method to train a model is to undersample the data. In this ...
1
vote
0answers
136 views

Relation between using stratify and class weights for imbalanced classes

I'm working on a multi-class classification problem where the classes are imbalanced (70:25:5). Train-Test Split ...
0
votes
0answers
13 views

sample n unique items from dataset

I have a dataset that has N of different unique items and each item appears Ai times (every item appears different times). This is mean that I have the ...
2
votes
1answer
424 views

Oversampling before Cross-Validation, is it a problem?

I have a multi-class classification problem to solve which is highly imbalanced. Obviously I'm doing oversampling, but I'm doing cross-validation with the over-sampled dataset, as a result of which I ...
0
votes
2answers
70 views

Disadvantages of hyperparameter tuning on a random sample of dataset

I often work with very large datasets where it would be impractical to check all relevant combinations of hyperparameters when constructing a machine learning model. I'm considering randomly sampling ...
0
votes
1answer
20 views

Optimal proportion between the amount of Class = 1 and the amount of Class = 0?

I am quite new machine learning methods, so I may not write proper technical formulas. My question is about the optimal proportion between sample size in Class = 1 ...
1
vote
0answers
19 views

SmoteBoost: Should SMOTE be ran individually for each iteration/tree in the boosting?

As per the paper on SmoteBoost, SMOTE is ran for each iteration of the boosting, generating N samples, which are further added to the original training data and the weight distribution of the ...
0
votes
1answer
109 views

How can I extract bootstrap generated datasets into individual dataframes?

I am having a bit of trouble understanding Bootstrapping and what/how I can manipulate the bootstrap created dataset. This is all in R My original dataset is structured like this: ...
1
vote
1answer
90 views

A few questions to understand a random forest blog [closed]

I'm trying to understand a nice blog on the trade-off between sensitivity versus specificity with the random forest and logistic regression models. I have a few questions: 1) The blog used a 10 fold ...