mulan.data
Class DataUtils

java.lang.Object
  extended by mulan.data.DataUtils

public class DataUtils
extends Object

Utility class for data related manipulation functions.

Author:
Jozef Vilcek

Constructor Summary
DataUtils()
           
 
Method Summary
static Instance createInstance(Instance typeProvider, double weight, double[] attrValues)
          Creates a new Instance.
static Instance createInstance(Instance typeProvider, int numAttributes)
          Creates a new Instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataUtils

public DataUtils()
Method Detail

createInstance

public static Instance createInstance(Instance typeProvider,
                                      double weight,
                                      double[] attrValues)
Creates a new Instance. The actual type is determined based on passed instance object.

Parameters:
typeProvider - the instance from which type for new instance is determined
weight - the weight of a new instance
attrValues - attribute values for a new instance
Returns:
A new Instance.

createInstance

public static Instance createInstance(Instance typeProvider,
                                      int numAttributes)
Creates a new Instance. The actual type is determined based on passed instance object.

Parameters:
typeProvider - the instance from which type for new instance is determined
numAttributes - number of attributes for new instance
Returns:
A new Instance.