edu.georgetown.gucs.clustering
Class WekaConverter

java.lang.Object
  extended by edu.georgetown.gucs.utility.Converter
      extended by edu.georgetown.gucs.clustering.WekaConverter

public class WekaConverter
extends Converter


Constructor Summary
WekaConverter()
           
 
Method Summary
static weka.core.Instances byteArrayToBinaryInstances(byte[] bytes)
          Creates a schema for a set of instances with binary attributes based on the specified byte array.
static weka.core.Instance byteArrayToInstance(byte[] bytes, weka.core.Instances instances)
          Converts a byte array to an instance based on the specified instances.
static weka.core.Instances byteArrayToNumericInstances(byte[] bytes)
          Creates a schema for a set of instances with numeric attributes based on the specified byte array.
static weka.core.SparseInstance byteArrayToSparseInstance(byte[] bytes, weka.core.Instances instances)
          Converts a byte array to a sparse instance based on the specified instances.
static void main(java.lang.String[] args)
           
 
Methods inherited from class edu.georgetown.gucs.utility.Converter
asHex, bitSetToByteArray, byteArrayToBitSet, byteArrayToIndices
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WekaConverter

public WekaConverter()
Method Detail

byteArrayToInstance

public static weka.core.Instance byteArrayToInstance(byte[] bytes,
                                                     weka.core.Instances instances)
Converts a byte array to an instance based on the specified instances.

Parameters:
bytes - the byte array
instances - the specified instances
Returns:
the instance

byteArrayToSparseInstance

public static weka.core.SparseInstance byteArrayToSparseInstance(byte[] bytes,
                                                                 weka.core.Instances instances)
Converts a byte array to a sparse instance based on the specified instances.

Parameters:
bytes - the byte array
instances - the specified instances
Returns:
the sparse instance

byteArrayToNumericInstances

public static weka.core.Instances byteArrayToNumericInstances(byte[] bytes)
Creates a schema for a set of instances with numeric attributes based on the specified byte array.

Parameters:
bytes - the byte array
Returns:
the instances

byteArrayToBinaryInstances

public static weka.core.Instances byteArrayToBinaryInstances(byte[] bytes)
Creates a schema for a set of instances with binary attributes based on the specified byte array.

Parameters:
bytes - the byte array
Returns:
the instances

main

public static void main(java.lang.String[] args)