@Test public void testClone(){ MultiLabelInstances clone = mlData.clone(); Assert.assertNotNull(clone); Assert.assertNotSame(mlData, clone); Assert.assertNotSame(mlData.getLabelsMetaData(), clone.getLabelsMetaData()); Assert.assertNotSame(mlData.getDataSet(), clone.getDataSet()); Assert.assertEquals(mlData.getNumLabels(), clone.getNumLabels()); Assert.assertTrue(Arrays.equals(mlData.getLabelIndices(), clone.getLabelIndices())); Assert.assertTrue(Arrays.equals(mlData.getFeatureIndices(), clone.getFeatureIndices())); }
@Override public MultiLabelInstances clone() { LabelsMetaData metaDataCopy = labelsMetaData.clone(); Instances dataSetCopy = new Instances(dataSet); try { return new MultiLabelInstances(dataSetCopy, metaDataCopy); } catch (InvalidDataFormatException ex) { throw new MulanRuntimeException(String.format( "The cloning of '%' class instance failed", getClass()), ex); } }
MultiLabelInstances implements Serializable { @Override public MultiLabelInstances clone() { LabelsMetaData metaDataCopy = labelsMetaData.clone(); Instances dataSetCopy = new Instances(dataSet); try { return new MultiLabelInstances(dataSetCopy, metaDataCopy); } catch (InvalidDataFormatException ex) { throw new MulanRuntimeException(String.format( "The cloning of '%' class instance failed", getClass()), ex); } } }
MultiLabelInstances implements Serializable { @Override public MultiLabelInstances clone() { LabelsMetaData metaDataCopy = labelsMetaData.clone(); Instances dataSetCopy = new Instances(dataSet); try { return new MultiLabelInstances(dataSetCopy, metaDataCopy); } catch (InvalidDataFormatException ex) { throw new MulanRuntimeException(String.format( "The cloning of '%' class instance failed", getClass()), ex); } } MultiLabelInstances(String arffFilePath, int numLabelAttributes);  MultiLabelInstances(InputStream arffDataStream, int numLabelAttributes);  MultiLabelInstances(InputStream arffDataStream, int numLabelAttributes,
            boolean labelsFirst);  MultiLabelInstances(Instances data, String xmlLabelsDefFilePath);  MultiLabelInstances(String arffFilePath, String xmlLabelsDefFilePath);  MultiLabelInstances(String arffFilePath, String xmlLabelsDefFilePath, boolean incremental);  MultiLabelInstances(InputStream arffDataStream, InputStream xmlLabelsDefStream);  MultiLabelInstances(Instances dataSet, LabelsMetaData labelsMetaData); }
MultiLabelInstances implements Serializable { @Override public MultiLabelInstances clone() { LabelsMetaData metaDataCopy = labelsMetaData.clone(); Instances dataSetCopy = new Instances(dataSet); try { return new MultiLabelInstances(dataSetCopy, metaDataCopy); } catch (InvalidDataFormatException ex) { throw new MulanRuntimeException(String.format( "The cloning of '%' class instance failed", getClass()), ex); } } MultiLabelInstances(String arffFilePath, int numLabelAttributes);  MultiLabelInstances(InputStream arffDataStream, int numLabelAttributes);  MultiLabelInstances(InputStream arffDataStream, int numLabelAttributes,
            boolean labelsFirst);  MultiLabelInstances(Instances data, String xmlLabelsDefFilePath);  MultiLabelInstances(String arffFilePath, String xmlLabelsDefFilePath);  MultiLabelInstances(String arffFilePath, String xmlLabelsDefFilePath, boolean incremental);  MultiLabelInstances(InputStream arffDataStream, InputStream xmlLabelsDefStream);  MultiLabelInstances(Instances dataSet, LabelsMetaData labelsMetaData); int getNumLabels(); int getNumInstances(); double getCardinality(); int[] getLabelIndices(); String[] getLabelNames(); Map<String, Integer> getLabelsOrder(); Set<Attribute> getLabelAttributes(); int[] getFeatureIndices(); Set<Attribute> getFeatureAttributes(); LabelsMetaData getLabelsMetaData(); Instances getDataSet(); MultiLabelInstances reintegrateModifiedDataSet(Instances modifiedDataSet); @Override MultiLabelInstances clone(); HashMap<String, Integer> getLabelDepth(); int getDepth(String labelName); int[] getLabelDepthIndices(); boolean hasMissingLabels(Instance instance); Instance getNextInstance(); double[] getImbalanceRatios(); double[] getImbalanceRatio(int arrayLabelIndex[]); }
MultiLabelInstances implements Serializable { @Override public MultiLabelInstances clone() { LabelsMetaData metaDataCopy = labelsMetaData.clone(); Instances dataSetCopy = new Instances(dataSet); try { return new MultiLabelInstances(dataSetCopy, metaDataCopy); } catch (InvalidDataFormatException ex) { throw new MulanRuntimeException(String.format( "The cloning of '%' class instance failed", getClass()), ex); } } MultiLabelInstances(String arffFilePath, int numLabelAttributes);  MultiLabelInstances(InputStream arffDataStream, int numLabelAttributes);  MultiLabelInstances(InputStream arffDataStream, int numLabelAttributes,
            boolean labelsFirst);  MultiLabelInstances(Instances data, String xmlLabelsDefFilePath);  MultiLabelInstances(String arffFilePath, String xmlLabelsDefFilePath);  MultiLabelInstances(String arffFilePath, String xmlLabelsDefFilePath, boolean incremental);  MultiLabelInstances(InputStream arffDataStream, InputStream xmlLabelsDefStream);  MultiLabelInstances(Instances dataSet, LabelsMetaData labelsMetaData); int getNumLabels(); int getNumInstances(); double getCardinality(); int[] getLabelIndices(); String[] getLabelNames(); Map<String, Integer> getLabelsOrder(); Set<Attribute> getLabelAttributes(); int[] getFeatureIndices(); Set<Attribute> getFeatureAttributes(); LabelsMetaData getLabelsMetaData(); Instances getDataSet(); MultiLabelInstances reintegrateModifiedDataSet(Instances modifiedDataSet); @Override MultiLabelInstances clone(); HashMap<String, Integer> getLabelDepth(); int getDepth(String labelName); int[] getLabelDepthIndices(); boolean hasMissingLabels(Instance instance); Instance getNextInstance(); double[] getImbalanceRatios(); double[] getImbalanceRatio(int arrayLabelIndex[]);  }