Active1 year, 4 months ago
The data section is something like this:
{60 1,248 1,279 1,316 1}
. When I use Python LIAC-ARFF library, I get error like this: ValueError: {60 1 value not in ('0', '1')
.When I use normal ARFF file, it works fine.
I am using the famous delicious.arff dataset from MULAN site.
R/read.arff.R defines the following functions. # #' @title Read an ARFF file #' @description Reads a multilabel dataset from an ARFF file in Mulan or MEKA #' and retrieves instances distinguishing attributes corresponding to labels #' @param filename Name of the dataset #' @param use_xml Specifies whether to use an #' associated XML file to. Feb 19, 2007 Reading in a arff file. C / C++ Forums on Bytes. I think his question is not so much how to get the array working, but how to read that line from a file.
Is there any other method I need to use? Can anyone help?
user691041139k1010 gold badges100100 silver badges127127 bronze badges
Sanket AgarwalSanket Agarwal
1 Answer
You can use the function scikit-multilearn provides for loading ARFF data.
Example of how to use - the first argument is the ARFF file and the format is MULAN so labels are at the end (little endian). There are 983 labels in the delicious data set and the features of delicious input data are integers and input data is already nominal as the input space in delicious is a bag of words. Remember, you should always read what the data set is in the relevant paper (source paper information for data sets is provided on the MULAN site):
What is returned?
niedakhniedakh81411 gold badge66 silver badges1515 bronze badges
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.