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
17 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
18 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
77 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
96 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
52 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
0 answers
15 views

Performing imputation only on the test set?

I'm working on a medical machine learning problem. The key challenge is working with small datasets with quite a lot of missing data. Experimentally, I've seen complete-case analysis (i.e. dropping ...
Ben Consterdine's user avatar
0 votes
2 answers
30 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
82 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
530 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
0 votes
0 answers
94 views

Python Impute using BayesianRidge() sklearn impute.IterativeImputer regression impute analysis value error

PROBLEM Use interativeImputer from sklearn.impute.IterativeImputer, to get regression model fit for for BayesianRidge() for impute missing data in variable 'Frontage'. After the interative_imputer_fit ...
LeadershipAnalyticsManger's user avatar
0 votes
0 answers
41 views

Imputing Survival Analysis Data in R

The dataset contains 418 observations and 18 total variables. The two dependent variables are N_Days and Status. The dependent ...
E_J7's user avatar
  • 3
1 vote
2 answers
150 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
923 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
0 votes
0 answers
79 views

Minimum strategy for SimpleImputer of scikit-learn

I'm predicting Boston housing prices. There are missing values in the dataset, for example the year in which the house was built. It makes sense to replace these nan...
Zirui Wang's user avatar
1 vote
1 answer
31 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
98 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
321 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
  • 617
0 votes
0 answers
13 views

Imputing values for age of property

I have a dataset with property values for a variety of different types of property. I have the age (from build year) of each property however some of the properties are simply "undeveloped ...
idkmath28's user avatar
0 votes
1 answer
44 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
107 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
224 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
135 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
791 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
93 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
329 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
54 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
55 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
  • 417
0 votes
2 answers
5k 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
17 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
230 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 ...
Leonhard Geisler's user avatar
0 votes
2 answers
145 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
  • 1,886
3 votes
0 answers
1k 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
  • 1,886
2 votes
1 answer
29 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
137 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
  • 115
3 votes
4 answers
239 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
10k 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
4k 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
563 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
327 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
732 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
574 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
25 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
1 vote
0 answers
37 views

How to handle large systematic missing data in time series?

I have this time series, where on the weekends, the dependent variable values are missing. It's only a time series, I do not have any exogenous regressors/features. The dependent variable value is an ...
Robert Chen's user avatar
0 votes
1 answer
257 views

sklearn KNN imputation

Can I use sklearn's KNN imputer to fit the model to my training set and impute missing values in the test set using the neighbours from training set ? Is it allowed ? Or , Should I only fit and ...
AnonymousMe's user avatar
2 votes
2 answers
219 views

Missing value Imputation in dataset

I have two separate files for Testing and Training. In the training data, I am dropping rows that contain too many missing values . But , In the test data , I cannot afford to drop the rows so I have ...
Bharathi A's user avatar