I would like to use an Attribute-Relation File Format with scikit-learn to do some NLP task, is this possible? How can use an .arff
file with scikit-learn
?
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
Follow renatopp's answer: assume your data is the iris dataset, there should be 5 dimensional with last one is the class label column.
I think this is something you want.
I found that scipy has a loader for arff files to load them as numpy record arrays. I am not 100% sure that those arrays are suitable for direct consumption by scikit-learn but that should get your started.
I really recommend liac-arff. It doesn't load directly to numpy, but the conversion is simple: