Questions tagged [data-leakage]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
32 views

K-Fold cross validation and data leakage

I want to do K-Fold cross validation and also I want to do normalization or feature scaling for each fold. So let's say we have k folds. At each step we take one fold as validation set and the ...
2
votes
1answer
51 views

How to split up my dataset in a train and testset, in order to prevent data leakage?

I realize that this could be considered a duplicate of this question, Is using samples from the same person in both trainset and testset considers being a data leakage?, where it is stated that "...
1
vote
1answer
13 views

Is it right to maintain the train distribution in test set for unbalanced data?

If the training set was unbalanced the chances are the model will be biased. But if the data distribution in the test set is the same distribution as the train set, this kind of bias is not going to ...
0
votes
0answers
14 views

Data leakage when setting class_weight to tackle imbalanced time series data?

I'm using a random forest classifier from sklearn to predict whether a stock's return for the next period is greater than a certain threshold (say -2%), so negative is 0 and positive is 1, a binary ...
0
votes
0answers
23 views

Train test leakage doubt for Time series

I have a very silly doubt about potential leakage of information during train test splitting. My dataset is a timeseries of multiple features for the year of 2018 where every row are observations ...
6
votes
3answers
901 views

Does label encoding an entire dataset cause data leakage?

I have a dataset on which one of the features has a lot of different categorical values. Trying to use a LabelEncoder, OrdinalEncoder or a OneHotEncoder results in an error, since when splitting the ...
2
votes
1answer
29 views

Is using samples from the same person in both trainset and testset considers being a data leakage?

Suppose a neural network is built for a binary classification problem such as recognize the face as a smiley face or not, by using a dataset of 1000 persons and each person has ten images of his face. ...
1
vote
0answers
47 views

Will setting up time series data in this way cause data leakage?

I am trying to predict future stock market values using a gradient boosted tree model. As far as I know, gradient boosted trees use the data in one row, and only that row, to predict the target ...
1
vote
1answer
31 views

Can I apply feature selection before splitting by requiring selection occurs > 90% of time

I want to move the feature selection step to before splitting to save time and allow bigger input dataset. If, in repeated subsamples, a feature is selected in over X percentage of cases I will keep ...
1
vote
1answer
68 views

Mean encoding in times series

Considering a TS from 1-5 blocks and using 1-4 block as train data. Is it invalid to build mean encode on whole train data / or I should mean encode block 1 / block 1-2 / ... / block 1-2-3-4 ? Edit 1 :...
0
votes
2answers
74 views

Need help understanding data leakage

I am a newbie to this stuff so I am sorry if my question is stupid~ I need help understanding what data leakage between X_train and X_test is and when exactly it happens. I am currently working on a ...
1
vote
1answer
32 views

Normalizing dependent feature by one of the independent ones

I have a data set with three different features (x1, x2, x3) and I am going to use a regression model to predict y based on the features. x3 is the total amount of money that a customer invest and y ...
0
votes
0answers
26 views

Handle OneHot Encoder in a pipeline with unseen data

so I have my data and split it in the beginning in test and train set. Then I apply following Pipelines on it: ...
1
vote
0answers
34 views

Identifying possible data leakage

I am building a binary classification model for imbalanced dataset using XGBoost. I tuned the hyperparameters for four different models based on 2 training datasets and 2 optimization metrics. Class ...
1
vote
0answers
88 views

Data leakage in bidirectional LSTM timeseries data

Does it cause data leakage to train a bidirectional LSTM on data where a user can be a sample in the training data multiple times? Each row is a snapshot at a different point in time for a given ...
0
votes
0answers
25 views

Is data leakage in time series due to both I's of the IID principe or only one?

I am sure that the Independent part of the IID principle gives you data leakage because of the correlation. But the identical part I am not so sure. Identical in time series means that your data is ...
4
votes
2answers
23 views

Does using user-specific accumulative variables causes data leakage?

Let's say I have a scenario in which my observational unit is a bill that was issued after a certain service was given and my goal is to predict if this bill is going to be paid or not. I have users ...
1
vote
1answer
131 views

How to keep the test data from leaking into the training process of a machine learning algorithm?

I read in many different sources that I need to split my data into a training set and a test set. Then I have to make sure that the algorithm is trained only on the training data, and do my best to ...
0
votes
0answers
274 views

Why do I have leakage while using Stratified Group K Fold?

I have the following case: Training data in the form of x, y coordinates on different frames (from a video). Based on this I computed some features, using only the training data and labels. A model is ...
0
votes
1answer
643 views

Frequency/Count encoding

How do I perform frequency/count encoding for a train and test set? The implementations of this encoding I've seen simply frequency encode the categorical variables on a particular dataset (no ...
1
vote
1answer
83 views

Will historical data lead to target leakage?

I'm bulding a employee churn model. I've employee data from 2016 to 2019 (of people who stayed/left the company), my goal is to train using data from 2016 to 2018 and predict on 2019. Since there's ...
0
votes
2answers
64 views

Is it safe to use labels created from unsupervised model to train a supervised model using the same data?

I have a dataset where I have to detect anomalies. Now, I use a subset of the data(let's call that subset A) and apply the DBSCAN algorithm to detect anomalies on set A.Once the anomalies are detected,...
3
votes
2answers
170 views

Manual feature engineering based on the output

So, I'm working on a ML model that would have as potential predictors : age , a code for his city , his social status ( married / single and so on ) , number of his children and the output signed ...
3
votes
1answer
369 views

Is normalizing the validation set of time series a kind of look ahead bias?

Here's the data normalization process of a time series in a paper about stock prediction using LSTM: Split train and test set based on time (e.g. training set: 2001-2010, test set:2011-2012). This ...
6
votes
1answer
689 views

How to deal with possible data leakage in time series data?

I have historical consumer data who have taken out a loan at some point in time. The task is to predict if a consumer will default when requesting a loan. My issue is that for some customer in the ...
1
vote
1answer
149 views

Data leakage and predictive models: should we use past predictions as a feature?

I want to develop a Random Forest Classifier model to predict whether or not a customer will convert 7 days from today. The model is re-trained once a week and makes predictions for the following week....
2
votes
2answers
163 views

Can preprocessing the whole population cause data leakage?

Introduction I understand the problem of data leakage that could be caused by the preprocessing step when our training and test sets are just samples of an unknown population. The preprocessing ...
1
vote
1answer
199 views

Dropping less frequently used categorical data?

I'm new to the datascience field and working on an assignment. I have a dataset with 150K rows with a categorical and numerical data, the target is a boolean. A categorical column consist of quite ...
1
vote
1answer
91 views

What is the difference between data leakage and endogeneity?

I have the impression the former is used in ML whereas the latter is used in econometrics. They both carry the idea that information from the target is "leaking" in explanatory variables. Is there ...
2
votes
0answers
53 views

information leakage when using empirical Bayesian to generate a predictor

Consider the following problem: I want to predict the next bat of a set of baseball player. I have a training data set, where it contains the historical bat records (0-1 encoded, which is our target ...
2
votes
1answer
101 views

classification feature selection

I have a system which sends invitations to users to participate in online questionnaires and want to use machine learning in order to predict the likelihood of fulfilling the questionnaires in a ...