public static int getClassIndex(Instances instances, MiningSchema miningSchema) {
    """
	Retrieves the index of the class attribute. This is the attribute to be predicted.
	
	@param instances    The {@link weka.core.Instances}.
	@param miningSchema The {@link org.dmg.pmml.MiningSchema PMML MiningSchema element}.
	@return An int representing the index of the class attribute.
    """
        String className = null;
        for (MiningField miningField : miningSchema.getMiningFields()) {
            if (miningField.getUsageType() == FieldUsageType.PREDICTED) {
                className = miningField.getName().getValue();
                break;
            }
        }

        return instances.attribute(className).index();
    }
public static int getClassIndex(Instances instances, MiningSchema miningSchema) {
        String className = null;
        for (MiningField miningField : miningSchema.getMiningFields()) {
            if (miningField.getUsageType() == FieldUsageType.PREDICTED) {
                className = miningField.getName().getValue();
                break;
            }
        }

        return instances.attribute(className).index();
    }
public static int getClassIndex ( Instances instances , MiningSchema miningSchema ) { String className = null ; for ( MiningField miningField : miningSchema . getMiningFields ( ) ) { if ( miningField . getUsageType ( ) == FieldUsageType . PREDICTED ) { className = miningField . getName ( ) . getValue ( ) ; break ; } } return instances . attribute ( className ) . index ( ) ; }
Retrieves the index of the class attribute. This is the attribute to be predicted.

@param instances    The {@link weka.core.Instances}.
@param miningSchema The {@link org.dmg.pmml.MiningSchema PMML MiningSchema element}.
@return An int representing the index of the class attribute.
Retrieves the index of the class attribute . This is the attribute to be predicted .