org.apache.mahout.utils.vectors.arff
Class ARFFVectorIterable

java.lang.Object
  extended by org.apache.mahout.utils.vectors.arff.ARFFVectorIterable
All Implemented Interfaces:
Iterable<Vector>

public class ARFFVectorIterable
extends Object
implements Iterable<Vector>

Read in ARFF (http://www.cs.waikato.ac.nz/~ml/weka/arff.html) and create Vectors

Attribute type handling:

NOTE: This class does not set the label bindings on every vector. If you want the label bindings, call MapBackedARFFModel.getLabelBindings(), as they are the same for every vector.


Constructor Summary
ARFFVectorIterable(File file, ARFFModel model)
           
ARFFVectorIterable(File file, Charset encoding, ARFFModel model)
           
ARFFVectorIterable(Reader reader, ARFFModel model)
           
ARFFVectorIterable(String arff, ARFFModel model)
           
 
Method Summary
 ARFFModel getModel()
          Returns info about the ARFF content that was parsed.
 Iterator<Vector> iterator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ARFFVectorIterable

public ARFFVectorIterable(File file,
                          ARFFModel model)
                   throws IOException
Throws:
IOException

ARFFVectorIterable

public ARFFVectorIterable(File file,
                          Charset encoding,
                          ARFFModel model)
                   throws IOException
Throws:
IOException

ARFFVectorIterable

public ARFFVectorIterable(String arff,
                          ARFFModel model)
                   throws IOException
Throws:
IOException

ARFFVectorIterable

public ARFFVectorIterable(Reader reader,
                          ARFFModel model)
                   throws IOException
Throws:
IOException
Method Detail

iterator

public Iterator<Vector> iterator()
Specified by:
iterator in interface Iterable<Vector>

getModel

public ARFFModel getModel()
Returns info about the ARFF content that was parsed.

Returns:
the model


Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.