m_Filter = null;
Instances transformedInsts;
Filter convertToProp = new MultiInstanceToPropositional();
Filter convertToMI = new PropositionalToMultiInstance();
//transform the data into single-instance format
if (m_minimax){
/* using SimpleMI class minimax transform method.
this method transforms the multi-instance dataset into minmax feature space (single-instance) */
SimpleMI transMinimax = new SimpleMI();
transMinimax.setTransformMethod(
new SelectedTag(
SimpleMI.TRANSFORMMETHOD_MINIMAX, SimpleMI.TAGS_TRANSFORMMETHOD));
transformedInsts = transMinimax.transform(insts);
}
else {
convertToProp.setInputFormat(insts);
transformedInsts=Filter.useFilter(insts, convertToProp);
}
if (m_Missing != null) {
m_Missing.setInputFormat(transformedInsts);
transformedInsts = Filter.useFilter(transformedInsts, m_Missing);
}
if (m_NominalToBinary != null) {
m_NominalToBinary.setInputFormat(transformedInsts);
transformedInsts = Filter.useFilter(transformedInsts, m_NominalToBinary);
}
if (m_Filter != null) {
m_Filter.setInputFormat(transformedInsts);
transformedInsts = Filter.useFilter(transformedInsts, m_Filter);
}
// convert the single-instance format to multi-instance format
convertToMI.setInputFormat(transformedInsts);
insts = Filter.useFilter( transformedInsts, convertToMI);
m_classIndex = insts.classIndex();
m_classAttribute = insts.classAttribute();