I’m trying to convert a csv file into an arff file using the following code. This code works, but the problem is the following. In my attributes list, I have a nominal attribute with values {yes, no} and i need that the arff header shows as first value yes. To be clearer, I need @attribute nominal_attr {yes,no} and not @attribute
Tag: weka
Using SMOTE on java raises Comparison method violates its general contract
I’m working on a project in java and I need to use Weka’s API. I use Maven to manage dependencies and, in particular, I have the following one: In this version, the SMOTE class is not kept, but I really need it; that’s why I also added in my pom.xml the following dependency: In my Java code, i also try
Load a file in Resources with FileInputStream
I know the safe way to open a file in the resources is: now the problem is that my file is a model for a decider in the Weka Wrapper package and the Decider class has only a method: load takes the file and opens it as a FileInputStream. Do you see a workaround? I really would like to ship
Creating a string attribute in Weka Java API
I’m trying to create a new string Attribute using Weka’s Java API… Reading through the API javadocs, it appears that the way to do so is to use this constructor: but I’m stuck as to what I should pass into the attributeValues parameter… when I put in null, Java complains about protected objects when I put in Null, it’s syntax