Questions tagged [data-imputation]

Data imputation is the process of replacing missing data with substituted values. This could involve statistically representative data filling (e.g. local averages) or simply replacing the missing data with encoded values (e.g. replace NaNs with zeros).

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

handling predictions with optional or missing features

We have a few variables that are highly predictive in our modeling task. Is it sound to train models with a superset of features even though some are known NOT to be available at predict time? & ...
eliangius's user avatar
  • 351
1 vote
1 answer
18 views

Change of data shape when using IterativeImputer from sklearn

I am using the IterativeImputer from sklearn and I notice that it changes the data shape. Initially I have an (X,5) array where all columns except for the last one contain the missing value (which has ...
gmaravel's user avatar
  • 111
2 votes
0 answers
18 views

Best practices for handling "NA" when all NA values exist due to being below the limit of detection?

I am working in R, and have a data set which has a few metabolite concentration values as continuous variables. Anywhere that the concentration was too low to be detected it simply says <LOD. This ...
KLN-RDN's user avatar
  • 21
1 vote
0 answers
51 views

Imputing techniques for missing values

Currently, I am working on a project for which I would appreciate some feedback and opinions. My dataset contains data about daily solar radiation from 8 stations and covers the period from 2017 to ...
Fatima's user avatar
  • 111
1 vote
0 answers
38 views

How do I know the appropriate number of iterations when using Miceforest for imputation?

I want to know how to avoid overfitting without having to increase the number of iterations excessively in Python with the Miceforest library. I know you can make a correlation map of data sets but I ...
Eduardo Dimas's user avatar
3 votes
0 answers
111 views

Why is multiple imputation not used more widely in Data Science?

I have a background in statistics. Multiple imputation is very commonly used to handle missing data, and if it is not used it almost always results in serious criticism. Recently I have been ...
Joe King's user avatar
  • 141
0 votes
1 answer
121 views

Python SK-Learn KNN Imputer ( "ValueError: could not convert string to float: )

I have data with missing values. All columns are integer, except for a column that has missing values. These missing values, were set with a "?" which was converted to NaN using the Numpy ...
Palu's user avatar
  • 103
1 vote
1 answer
29 views

How to impute and aggregate data with ID variant variables for predictive modeling?

I have a dataset that looks like so ID var_id_invariant_1 ... var_id_invariant_p var_id_variant_1 ... var_id_variant_k target 315 25 ... a 2.4 ... A 1 246 31 ... nan 5.7 ... B 0 315 25 ... a 9.4 .....
Mateusz's user avatar
  • 125
0 votes
1 answer
23 views

Interpolating missing data given county and state totals

Problem: I have population data for states and their constituent counties over several years. Each row is uniquely identified by a state/county and a year. There are four population columns: ...
myusername's user avatar
0 votes
0 answers
27 views

How can I perform an analysis of the NHIS imputed income variables?

I have downloaded five family income variables from https://nhis.ipums.org/nhis-action/variables/group?id=economic_income (INCPPOINT1, INCPPOINT2, INCPPOINT3, INCPPOINT4, INCPPOINT5) for they years ...
tryingtogetsmth's user avatar
0 votes
1 answer
347 views

Imputation in train or test data

I'm having a rather simple question. Let's say i want to do a median imputation. I've read in some places that you should do: ...
Guilherme Raibolt's user avatar
0 votes
0 answers
29 views

Imputation of multi-peaked dataset

I am a beginner to model fitting, and I have been working on generating a model for a CO2 emissions data set. The distribution of the data points in a number of these columns are very markedly dual-...
Phindolin's user avatar
0 votes
1 answer
148 views

How can I compare the accuracy of imputation models if there is already missing dataset in the file?

Let's say I have a dataset of 50,000 where about 2% were already missing from the beginning. From what I have learned, we need to use indicators to compare the imputation model with the ground truth ...
Amisha Dhimal's user avatar
1 vote
1 answer
71 views

What is the benefit of using imputation to handle missing values in training data?

This is a bit of a theoretical question. Does imputation to handle missing values in training data add that much benefit to the final prediction accuracy? It seems to me that the imputation would be ...
user14269's user avatar
  • 111
0 votes
2 answers
35 views

Data imputation for heavily missing features

I am currently working on the dataset IEEE-CIS Fraud Detection, provided via Kaggle, with around 350 features, with around 600k instances. However, some features are missing large amounts of values, ...
Hai Nguyen's user avatar
2 votes
1 answer
132 views

Does it make sense to impute the target variable when there are a few missing target values in my dataset?

I'm relatively new to machine learning and just trying to have a solid understanding of the basics. I scraped a real estate/house prices dataset off a website, which I am in the process of cleaning ...
Baker Hans's user avatar
7 votes
5 answers
645 views

How to handle missing value if imputation doesnt make sense

I have column/feature in my dataset showing years a person has been married "years_married". Since not every person is married there are NaN fields. It does not make sense to fillna(0) "...
methus's user avatar
  • 111
1 vote
2 answers
340 views

Training a Model that Doesn't Always Have All the Features

I am creating a model that gathers data from multiple sources and determines a confidence level for an instance that is common across those sources (ie. all sources have different features, but all ...
Andrew Davis's user avatar
0 votes
1 answer
1k views

Trying to fill null values with sub-grouped mean value using pandas fillna() and groupby().transform() is doing nothing with the null values

I'm doing EDA on the US police shooting dataset where I'm stuck with filling the 482 null values for the age column. Since no strategy was mentioned on how to fill ...
forest's user avatar
  • 111
1 vote
1 answer
36 views

Imputing missing values for "days ago" feature

I have a dataset with features such as last_visit_n_days_ago, last_purchase_n_days_ago. These features are unavailable for many ...
B Arkadievich's user avatar
0 votes
1 answer
108 views

Handling NaN values in a feature representing prioritization ranking

I have a data set like so ...
bananaboy's user avatar
  • 131
0 votes
1 answer
734 views

What should you do with NaN Values?

I have a dataset with a number of NaN values in it. I believe ~13,000 rows are affected out of ~500,000, so about 2.6% of the dataset. I know that I can remove ...
Connor's user avatar
  • 631
0 votes
1 answer
66 views

Variable selection and NA

I have a very large dataset with a lot of NAs in the data. I want to perform an analysis and have to select the variables that are of most interest. I feel like I have to take 3 steps before I can ...
Wilko's user avatar
  • 13
3 votes
1 answer
117 views

What problems could arise from imputing missing values with impossible values?

I have a dataset that has a lot of missing values that it's not viable to drop the rows and it's also not viable to impute with mean/median since it's quite a significant portion of the data and I don'...
EddieStan's user avatar
2 votes
1 answer
318 views

Handling of readability scores for short texts

I have a classification problem using emails as my dataset. I would like to use scores from various readability formulas as features for the classification. However, most of them are defined for ...
liakoyras's user avatar
  • 636
3 votes
2 answers
158 views

Imputing time data for an event that hasn't occurred yet

Suppose you are trying to predict if lightning will strike in a given location in a given month. (Please ignore the meteorology here, this is not my actual problem, just a hypothetical instance of the ...
misterioso22's user avatar
0 votes
2 answers
1k views

Should I deal with missing values first then transform the data or vice versa?

I am currently working on a project involving time series banking stock price data. I have around 3000 observations, some columns have a lot of missing values (null value); they can account for 5 to ...
MINH NHỰT NGUYỄN TRẦN's user avatar
0 votes
1 answer
134 views

Is it possible to implement logistic regression (or any other ML method) to impute null values in a categorical feature with multiple values?

I'm doing a Data Science project, and I'm on the stage of cleaning categorical features. I've been researching, and it seems that imputing the mean or median can change the distribution. Therefore, a ...
Álvaro V.'s user avatar
0 votes
2 answers
403 views

How to evaluate data imputation techniques

I have a data set with 29 features 8 if them have missing values. I've tried Sklearn simple imputer and all it's strategies KNN imputer and several Number of K Iterative imputer and all combinations ...
yassine sfayhi's user avatar
0 votes
1 answer
56 views

How to compare between two methods of multivariate to filling NA

In the Titanic dataset, I performed two methods to fill Age NA. The first one is regression using Lasso: ...
Husam Khiry's user avatar
0 votes
0 answers
35 views

Is SVM a good choice for this imputing a numerical variable?

Let's say I have 10,000 training points, 100,000,000 points to impute, and 5-10 prediction variables/parameters, all numeric (for now). The target variable is numeric, skewed normal with outliers. I ...
Stonecat's user avatar
0 votes
1 answer
56 views

Handling missing values in medical data

I have a medical dataset that contains maternal and foetal data during pregnancy. There are some missing values in the dataset that I am unsure how to handle. Here is a short example of my dataset: <...
sums22's user avatar
  • 427
0 votes
2 answers
6k views

Merge two dataframes on multiple columns, only if not NaN

Given two Pandas dataframes, how can I use the second dataframe to fill in missing values, given multiple key columns? ...
krbcaypwd's user avatar
  • 130
1 vote
0 answers
18 views

Comparing two models with different (naive) baseline

I would like to compare a model with listwise deletion to a model with multiple imputation. However, the model with listwise deletion has a majority class of 70%, while the model with multiple ...
Tessa's user avatar
  • 11
1 vote
0 answers
282 views

How does Kalman filtering work backwards?

For time series missing value imputation I am using the Kalman filter/smoothing approach, given in the imputeTS package. As Kalman filter is iterative and needs a view data points to make its estimate ...
LGe's user avatar
  • 145
0 votes
2 answers
160 views

Can I impute with median if median = 0?

I want to impute a numerical feature using the median, but the median for that feature is 0 and mean = 106. Should I go ahead and impute or is there anything else I can do? PS: I don't want to create ...
spectre's user avatar
  • 2,085
3 votes
0 answers
2k views

Identify MCAR, MNAR and MAR in the data

If I have missing values in a dataset, I can't just blindly impute them with mean/median/mode or any other technique. I have to identify what kind of missing values they are, namely: MCAR (missing ...
spectre's user avatar
  • 2,085
2 votes
1 answer
36 views

Imputing Data that Isn't Missing

I have two columns, [Date Activated] and [Date Closed]. One is the date an account was activated, and the other column is the date an account is closed. There are three scenarios: Case 1 (1/6 data) ...
data wannabe's user avatar
3 votes
1 answer
145 views

Can data leakage be sometimes acceptable?

I have recently started using kaggle and I have stumbled on a few examples of practices I would consider do be data leakage. Many of them were done by people well established on the platform and I ...
Mateusz's user avatar
  • 125
3 votes
4 answers
248 views

Dropping columns or inputing numbers

After looking at the various different ways of inputting data to replace NaN in a dataset vs. dropping observations or columns based on a threshold, the right ...
Roger Steinberg's user avatar
2 votes
2 answers
11k views

Check if a particular value is a datetime and assigning a particular column value in pandas

I have a pandas data frame that contains a partially corrupted data field as below. It has numbers (which are not a date) or nans. The real data frame has an incredibly large number of rows as well. I ...
Gandharv Bakshi's user avatar
4 votes
1 answer
5k views

XGBoost - Imputing Vs keeping NaN

What is the benefit of imputing numerical or categorical features when using DT methods such as XGBoost that can handle missing values? This question is mainly for when the values are missing not at ...
thereandhere1's user avatar
0 votes
2 answers
1k views

Using scikit-learn iterative imputer with extra tree regressor eats a lot of RAM

I'm imputing a table around 150K by 60 floats and has about 45% missing values, I'm using ExtraTreeRegressor with IterativeImputer ...
pseudoDust's user avatar
0 votes
1 answer
42 views

Impute missing value: transpose or not?

I'm building a model that fills the missing values from a Dataframe that contains the number of visitors for different stores, each day: day store_a store_b store_c 2021-01-01 100 200 300 2021-01-...
Be Chiller Too's user avatar
2 votes
1 answer
603 views

kNN for non-ordinal variables

kNN is a distance-based method, so it requires the input to be in numerical form. I was wondering if it is possible to use kNN imputer for non-ordinal categorical variables (like color). Since the ...
Szymon Adamik's user avatar
1 vote
1 answer
377 views

Is there potentially data leakage during imputation for time-varying sensor data?

I have a time-varying dataset that contains some missing data. I have sensors that continuously monitor some properties at evenly-spaced intervals and I would like to impute the missing values using ...
Evan's user avatar
  • 185
1 vote
1 answer
808 views

How to impute missing value in Test Set using a custom Imputer created on training dataset

I am working on a toy project to predict claims. One of the input features has null values on which I have applied a custom imputation technique. Under this technique, I replaced missing values with ...
tanmay's user avatar
  • 173
0 votes
0 answers
619 views

Impute missing values in feature column on the basis of Target column

I am working on a toy project for insurance claim prediction. In the input data for one of the feature (numeric data type) half of the values are missing. My target variable is binary which indicates ...
tanmay's user avatar
  • 173
1 vote
1 answer
1k 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 ...
user avatar
1 vote
1 answer
26 views

Dropping Missing Observations under MAR Assumption

Some of the outcome data in my data set are missing. I believe that the missing data mechanism is missing at random (MAR) as the observed characteristics significantly differ between the missing and ...
Elina's user avatar
  • 11