question: finds the majority label , breaking ties randomly this method can be used when the criterion variable is the categorical attribute . concode_field_sep List<Instance> instances concode_elem_sep Dataset dataset concode_field_sep Data bagging concode_elem_sep Data bagging concode_elem_sep double[] values concode_elem_sep boolean isEmpty concode_elem_sep boolean isIdentical concode_elem_sep boolean identicalLabel concode_elem_sep Dataset getDataset concode_elem_sep boolean contains concode_elem_sep int size concode_elem_sep int hashCode concode_elem_sep Instance get concode_elem_sep boolean equals concode_elem_sep double[] extractLabels concode_elem_sep void countLabels concode_elem_sep Data clone concode_elem_sep Data rsplit concode_elem_sep Data subset
target: int function ( Random arg0 ) { int [ ] loc0 = new int [ dataset . nblabels ( ) ] ; for ( int loc1 = 0 ; loc1 < size ( ) ; loc1 ++ ) { loc0 [ ( int ) dataset . getLabel ( get ( loc1 ) ) ] ++ ; } return DataUtils . maxindex ( arg0 , loc0 ) ; }