dice.data.io
Class LibsvmReader

java.lang.Object
  extended by dice.data.io.LibsvmReader
All Implemented Interfaces:
DataReader

public class LibsvmReader
extends java.lang.Object
implements DataReader

An DataReader implementations can read libsvm data files. The usage of that class is demonstrated in BinaryClassification

Version:
0.000
Author:
Xiatian Zhang

Field Summary
private  java.lang.String[] filePaths
          The source file paths array.
private static java.lang.String PSPLIT
          The split character to split attribute index and value in a data element pair.
private static java.lang.String SPLIT
          The split character to split different element in a row.
 
Constructor Summary
LibsvmReader()
           
 
Method Summary
 SimpleInstances getInstances()
          Get the data set object Instances.
 void setFilePath(java.lang.String[] filePaths)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SPLIT

private static final java.lang.String SPLIT
The split character to split different element in a row.

See Also:
Constant Field Values

PSPLIT

private static final java.lang.String PSPLIT
The split character to split attribute index and value in a data element pair.

See Also:
Constant Field Values

filePaths

private java.lang.String[] filePaths
The source file paths array.

Constructor Detail

LibsvmReader

public LibsvmReader()
Method Detail

setFilePath

public void setFilePath(java.lang.String[] filePaths)

getInstances

public SimpleInstances getInstances()
Description copied from interface: DataReader
Get the data set object Instances.

Specified by:
getInstances in interface DataReader
Returns:
The Instances object.