Waikato / meka

Multi-label classifiers and evaluation procedures using the Weka machine learning framework.
http://waikato.github.io/meka/
GNU General Public License v3.0
200 stars 76 forks source link

Why rename the input attributes? #67

Closed danspeck closed 1 week ago

danspeck commented 4 years ago

I've recently started working with Meka and Weka and ran into an issue with the renaming of input attributes in MULAN.java, specifically: https://github.com/Waikato/meka/blame/master/src/main/java/meka/classifiers/multilabel/MULAN.java#L139

In order to use a classifier that has been built using MULAN, I have to map my original input attributes to the renamed (a_N) and resequenced ones. I'm wondering if it wouldn't be better to just make the attributes conform to MULAN's requirements, e.g., by replacing any offensive characters (e.g., '-') by inoffensive ones. That would make applying the generated classifiers easier to use.

fracpete commented 4 years ago

I'm not familiar with MULAN, so not sure which characters it doesn't like. However, I've added a -no-rename command-line option (in the GUI it is the inverse: renameAttributes), which allows you to turn off the attribute renaming. It may or may not work with your dataset. ;-)

fracpete commented 4 years ago

Have you tried a new snapshot with the new functionality?

danspeck commented 4 years ago

First, thank you for your speedy response! I really didn't expect to get such a quick response to my issue. I have not yet built the latest branch but will try to do so soon. I initially had trouble building master because of some unresolved dependencies so I worked around the issue by building a map from the original attribute offsets to the original attribute names and then "fixed" the data after loading it.

I appreciate your work on this project and will let you know how the new option works.

danspeck commented 4 years ago

Also, I'm not using the Meka program proper but am attempting to integrate its libraries into a separate program that does multilabel classification.

fracpete commented 4 years ago

What unresolved dependencies did you encounter? The master branch gets built every night and a snapshot made available.

danspeck commented 4 years ago

I am no longer getting the same messages I got when I originally tried to compile meka from the master branch. I noticed that there were several changes made in July and I may have grabbed a version that had an issue that no longer exists. I believe the issue was with a dependency coming from the pentaho-public repo but I can't recall exactly which dependency.

fracpete commented 4 years ago

Great to hear that the build problem disappeared!