All Questions
Tagged with train-test-split python
6 questions
0
votes
1
answer
129
views
Capping before or after splitting the data into train and test?
I have a data set with N ~ 9000 and about 50% missing on at least one important variable. There are more than 50 continuous variables and for each variable, the values after 95th percentile seems ...
0
votes
1
answer
28
views
Is using the same person as data observation in different time stamps a way to produce data leakage in a Machine Learning model?
Let's assume we are going to train a regression model (could be any ML tabular solution for regression. Ex.: LGBM, XGBoost, Perceptron, ...) to predict a customer profit in the next month. While ...
1
vote
1
answer
537
views
How to properly impute values on the test set using imputer (missForest)
I'm trying to impute some missing values on my dataset $X$. So first I shuffle and split data to obatin the train set X_train and the test set ...
1
vote
1
answer
453
views
Can the number of Target features (y) exceed the number of Input features (X)?
I am trying to perform a train_test_split() on a dataset. Before doing so and while I am assigning data to X and y variables, I realized I have 8 Input features a.k.a. Independent variables and 45 ...
10
votes
2
answers
26k
views
What is the role of 'shuffle' in train_test_split()?
Wondering what shuffle does if I set it to True when splitting a dataset into train and test splits. Can I use shuffle on a dataset which is ordered by dates?
...
1
vote
0
answers
164
views
Python library to split dataset with token-level labels into dev, train and test [closed]
I have two datasets and I need to split them into dev, train and test. The first one is a regular dataset where in each line there is a sentence along with a label. I found the following code in a ...