public class InstancesTools extends Object
| Constructor and Description |
|---|
InstancesTools() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
checkCompatibility(weka.core.Instance inst1,
weka.core.Instance inst2)
Checks whether the instances are compatible.
|
static boolean |
checkCompatibility(weka.core.Instances dataset,
weka.core.Instance inst)
Checks the compatibility of the instance and the dataset
|
static boolean |
checkEquall(weka.core.Instance inst1,
weka.core.Instance inst2,
boolean checkClass)
Check whether the instances are equall
|
static weka.core.Instance |
copyInstance(weka.core.Instance inst)
Creates a copy of the instance
|
static int[] |
getClassCounts(weka.core.Instances dataset)
Count instances belonging to classes
|
public static int[] getClassCounts(weka.core.Instances dataset)
dataset - public static boolean checkCompatibility(weka.core.Instances dataset,
weka.core.Instance inst)
throws Exception
dataset - inst - Exception - -- when there is some kind of incompatibilitypublic static boolean checkCompatibility(weka.core.Instance inst1,
weka.core.Instance inst2)
throws Exception
inst1 - inst2 - Exception - if the instances are incompatiblepublic static boolean checkEquall(weka.core.Instance inst1,
weka.core.Instance inst2,
boolean checkClass)
throws Exception
inst1 - -- instance 1inst2 - -- instance 2checkClass - -- determines if the class attribute is checkedException - if something goes wrongpublic static weka.core.Instance copyInstance(weka.core.Instance inst)
inst - Copyright © 2020. All rights reserved.