guangzhou
guangzhou

Reputation: 11

How to replace the old weka api Instance.missingValue()?

I had developed a project using the old version weka jar about 4 years ago, and there was one sentence Instance.missingValue() as I have replaced the old weka jar file with the newest version, the IDE gives the error

can not resolve the method missingValue.

I have read the api document of weka and found that the Instance class have been revised to the interface, but how to change the sentence Instance.missingValue()?

Upvotes: 1

Views: 77

Answers (1)

MWiesner
MWiesner

Reputation: 9043

Background

Since Weka > 3.7.1 Instance has become an interface. In this context, missingValue() was moved to into weka.core.Utils.

Solution

You can simply replace all occurrences of

Instance.missingValue() with

Utils.missingValue().

Source:
See this tutorial found in the Weka Wiki (sub section on "Missing values").

Hope it helps.

Upvotes: 1

Related Questions