public static String getClassNameString(InstancesHeader context) { if (context == null) { return "[class]"; } return "[class:" + context.classAttribute().name() + "]"; }
public static String getClassNameString(InstancesHeader context) { if (context == null) { return "[class]"; } return "[class:" + context.classAttribute().name() + "]"; }
public static String getClassLabelString(InstancesHeader context, int classLabelIndex) { if ((context == null) || (classLabelIndex >= context.numClasses())) { return "<class " + (classLabelIndex + 1) + ">"; } return "<class " + (classLabelIndex + 1) + ":" + context.classAttribute().value(classLabelIndex) + ">"; }
public static String getClassLabelString(InstancesHeader context, int classLabelIndex) { if ((context == null) || (classLabelIndex >= context.numClasses())) { return "<class " + (classLabelIndex + 1) + ">"; } return "<class " + (classLabelIndex + 1) + ":" + context.classAttribute().value(classLabelIndex) + ">"; }
/** * Initiates the current chunk and class distribution variables. */ private void initVariables() { if (this.currentWindow == null) { this.currentWindow = new int[this.windowSize]; } if (this.classDistributions == null) { this.classDistributions = new long[this.getModelContext().classAttribute().numValues()]; } }
/** * Initiates the current chunk and class distribution variables. */ private void initVariables() { if (this.currentChunk == null) { this.currentChunk = new Instances(this.getModelContext()); } if (this.classDistributions == null) { this.classDistributions = new long[this.getModelContext().classAttribute().numValues()]; for (int i = 0; i < this.classDistributions.length; i++) { this.classDistributions[i] = 0; } } }
/** * Initiates the current chunk and class distribution variables. */ private void initVariables() { if (this.currentChunk == null) { this.currentChunk = new Instances(this.getModelContext()); } if (this.classDistributions == null) { this.classDistributions = new long[this.getModelContext().classAttribute().numValues()]; for (int i = 0; i < this.classDistributions.length; i++) { this.classDistributions[i] = 0; } } }
for(int i = 0; i < originalHeader.numAttributes(); i++){ Attribute att = originalHeader.attribute(i); if(att != originalHeader.classAttribute()) { attributes.add(att);