mulan.data
Class DataUtils
java.lang.Object
mulan.data.DataUtils
public class DataUtils
- extends Object
Utility class for data related manipulation functions.
- Author:
- Jozef Vilcek
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataUtils
public DataUtils()
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 determinedweight
- the weight of a new instanceattrValues
- 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 determinednumAttributes
- number of attributes for new instance
- Returns:
- A new
Instance
.