Skip to main content

Questions tagged [sampling]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
4 views

Optimizing Sampling Strategy to Enhance Uniformity Under Conditional Constraints

I am facing a challenge in a project that involves sampling from a design space defined by 10 variables. I use Latin Hypercube Sampling (LHS) and/or Sobol sequences, and initially, the samples are ...
Chris's user avatar
  • 11
0 votes
0 answers
42 views

When is sampling bias acceptable?

Overview: Dataset is small and a bit messy and the task is to classify 5 classes wherein the targets are ordinal. Feature Engineering and Selection, Model Tuning, etc. did not produce acceptable ...
easymoneysniper's user avatar
0 votes
0 answers
18 views

Is balancing imbalanced validation set for retraining model after hyperparameter tuning required?

The following are basic steps to modelling, but would like to ask in the case of imbalanced data, is balancing of train dataset required when retraining model on train + validation set after ...
curious-24-7's user avatar
4 votes
1 answer
43 views

Algorithm for picking N random uniformly distributed samples, in irregular polygon?

Say want to pick a fixed number of samples from a large 2D dataset, such that they relatively evenly distributed over the whole sample area. Imagine places in a country - so the border of the data is ...
barryhunter's user avatar
1 vote
1 answer
44 views

Top_p parameter in langchain

I am trying to understand the top_p parameter in langchain (nucleus sampling) but I can't seem to grasp it. Based on this we sort the probabilities and select a ...
Labyrinthian's user avatar
0 votes
0 answers
11 views

sampling points on an interpolated curve

I have this interpolated curve (black) using black data points. I used scipy.interpolate.griddata to obtain the curve, I was wondering if there's a way to sample function values from this ...
user159958's user avatar
0 votes
0 answers
19 views

Is using Probability Classification to predict whether a restaurant will purchase the best approach?

I have a data set that contains data about restaurants in the United states including menu, foot traffic, type of cuisine, type of restaurant, and other restaurant attributes. I also have a small ...
erich's user avatar
  • 1
1 vote
1 answer
65 views

Correct way to take a subset of a dataset?

I am attempting a binary classification problem (using Weka). My dataset has 100,000 rows, 14 attributes (1 output variable). It takes already too long just to open the dataset in excel so I just know ...
FlexMcMurphy's user avatar
0 votes
0 answers
24 views

statistical analysis of two data sets have different number of sampling

I have two datasets from my statistical fault analysis: one with 400 iterations and another with 500 iterations. Both datasets have the same maximum and minimum values, and some data points are ...
Fadi's user avatar
  • 1
1 vote
1 answer
502 views

Why is 0.7, in general, the default value of temperature for LLMs?

I have recently read through a lot of documentation and articles about Large Language Models (LLMs), and I have come to the conclusion that 0.7 is, most of the time, the default value for the ...
jmpion's user avatar
  • 11
0 votes
0 answers
47 views

Training Biased/Uneven Categorical Data with CatBoost, Unbalanced/Unseen Categories Handling

Summary: I am training a discount eligibility model where the dataset represents historical data for products where people availed discounts based on simple features like product category, discount ...
glory9211's user avatar
  • 101
0 votes
1 answer
40 views

how to evaluate a model on our data when the model is imported from a library and thus not trained by us?

The company I work for has deployed a trained rule-based sentiment analyzer model vader to make predictions on customer's attitude. We import the model from nltk library directly, so we didn't train ...
Shelby's user avatar
  • 3
1 vote
0 answers
20 views

Calculating an integral with as few grid points as possible

Suppose I have a function $f\colon [0,1] \to \mathbb{R}$ which is maybe continuous (it's at least in $L^1$). I have a sample of $N$ points $\{x_i\}$ taken from the domain $[0,1]$ randomly from some ...
math_guy's user avatar
  • 111
0 votes
0 answers
25 views

Comparing Models based on two different sample sets of a single data set

I want to compare the performance of two different ML models like M1 and M2. I have a very huge data set and having two different downsampling of this data set, call them S1 and S2. Can I compare the ...
Vahid Shams's user avatar
0 votes
0 answers
22 views

How to refine sampling of points via averaging?

I am working with a generative model which is generating points that are less accurate than I would like. I have strong reason to believe the errors should average out along a particular axis (to give ...
vermillion flycatcher's user avatar
0 votes
0 answers
14 views

Ranking 10^10 random strings

I would like to model a biological process that starts from a pool of 10^10+ random strings (a string can be 6-24 letters long; the alphabet contains 20 letters, say A-T) and I want to order those ...
isthisthat's user avatar
0 votes
1 answer
39 views

Question about collapsing variable and oversampling minority classes

i have imbalanced data consisting of nine classes, and i am planning to collapse them into two classes. i performed stratified (proportionate) sampling between test, validation, and training sets ...
RyRy the Fly Guy's user avatar
1 vote
0 answers
10 views

Group or find associations and orderings for elements that appear in different samples (analyzing examples of input files for undocumented code)

I'm trying to understand and use a physics simulation code that was written decades ago. It uses input files that have their origins in stacks of punch cards as input. In other words each line is a ...
uhoh's user avatar
  • 121
0 votes
1 answer
79 views

Is Logistic Regression possible using a Convenience Sample?

I've collected some survey data on homeless individuals, surveying their drug use, education level, age, gender etc. I hope to run a logistic regression to see how impactful homelessness (+other ...
JS Holding's user avatar
0 votes
1 answer
148 views

Understanding bootstrapping in bias variance decomposition

I was going through bias and variance tradeoff article and it makes use of bias_variance_decomp function from mlxtend library. ...
Mahesha999's user avatar
0 votes
1 answer
49 views

Determining the information loss due to undersampling

I have an image dataset that I need to segment into directories (train, validation and test) using ImageDataGenerator in TensorFlow/Keras. The dataset is highly imbalanced: For this I have decided to ...
Harsh Khare's user avatar
1 vote
1 answer
510 views

Creating a dataframe using roll-forward window on multivariate time series

Based on the simplifed sample dataframe ...
user1934212's user avatar
1 vote
2 answers
63 views

Strategy to choose maximum value from an unknown array of n numbers

Suppose you have an array of n normally distributed numbers whose values are initially unknown(and the probability parameters are unknown too). You must choose one number and you want it to have ...
AutisticRat's user avatar
0 votes
0 answers
78 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 ...
MUK's user avatar
  • 101
4 votes
3 answers
212 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 ...
Encipher's user avatar
  • 359
1 vote
0 answers
148 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 ...
Student's user avatar
  • 411
2 votes
1 answer
931 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 ...
ado sar's user avatar
  • 181
1 vote
0 answers
16 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 ...
Sanyo Mn's user avatar
  • 123
0 votes
0 answers
21 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 ...
Bipbupbop's user avatar
1 vote
0 answers
58 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 ...
Matheus Schmitz's user avatar
0 votes
1 answer
21 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 ...
Matthias's user avatar
  • 101
0 votes
1 answer
37 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 ...
qwertzi's user avatar
2 votes
3 answers
101 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 ...
Bruce's user avatar
  • 196
0 votes
1 answer
34 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: ...
Minions's user avatar
  • 252
0 votes
0 answers
703 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 ...
mcnat1701's user avatar
0 votes
0 answers
32 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?
Borut Flis's user avatar
2 votes
1 answer
278 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 ...
Farhood ET's user avatar
1 vote
0 answers
33 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 ...
holoubekm's user avatar
1 vote
1 answer
82 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 ...
ml_learner15's user avatar
2 votes
1 answer
41 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 ...
freshman_2021's user avatar
0 votes
0 answers
74 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 ...
DOT's user avatar
  • 103
1 vote
1 answer
43 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 ...
James Flash's user avatar
2 votes
1 answer
573 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 ...
elfinorr's user avatar
1 vote
1 answer
1k 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 ...
jakes's user avatar
  • 95
1 vote
1 answer
63 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 ...
Eran Moshe's user avatar
0 votes
1 answer
853 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. ...
Schach21's user avatar
  • 103
1 vote
2 answers
749 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 ...
giz's user avatar
  • 11
1 vote
0 answers
50 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: ...
meltedhead's user avatar
1 vote
1 answer
480 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:...
Naufal's user avatar
  • 21
2 votes
2 answers
379 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 ...
Vardaan Khanted's user avatar