Titus Pullo
Titus Pullo

Reputation: 3821

Numeric Filter and missing values (Weka)

I'm using SMOTE to oversample my dataset (affected by class imbalance). Some of my attributes have integer values, others have only two decimals but SMOTE creates new instances with many decimals. So to solve this problems I thought to use NumericCleaner Filter and set the number of decimals I desire. This seems to work but I've got problems with missing values. Each missing values is replaced with a 0.0 value, I need to evaluate my model using missing values in dataset. So how can I use NumericCleaner (or other filters that permit to round values) and keep my missing values?

Upvotes: 1

Views: 2232

Answers (1)

Rushdi Shams
Rushdi Shams

Reputation: 2423

Very interesting question. Okay, here is the solution:

  1. use SMOTE to oversample the minority group (this produces decimal points but the missing values remain missing values)
  2. then select weka filter->unsupervised->attribute->NumericTransform
  3. then click on this filter and set the attribute instances (where you are having decimal points features) and in the methodName instead of "abs", put "ceil".

I hope that solves the problem.

Upvotes: 1

Related Questions