public static MiningModel getMiningModel(PMML pmml) {
        for (Model model : pmml.getModels()) {
            if (model instanceof MiningModel) {
                return (MiningModel) model;
            }
        }

        throw new RuntimeException("PMML MiningModel not found.");
    }
public static MiningModel getMiningModel(PMML pmml) {
        for (Model model : pmml.getModels()) {
            if (model instanceof MiningModel) {
                return (MiningModel) model;
            }
        }

        throw new RuntimeException("PMML MiningModel not found.");
    }
public static MiningModel getMiningModel ( PMML pmml ) { for ( Model model : pmml . getModels ( ) ) { if ( model instanceof MiningModel ) { return ( MiningModel ) model ; } } throw new RuntimeException ( "PMML MiningModel not found." ) ; }
Retrieves the {@link org.dmg.pmml.MiningModel PMML MiningModel} element in a {@link org.dmg.pmml.PMML}.

@param pmml The {@link org.dmg.pmml.PMML} from which to retrieve the {@link org.dmg.pmml.MiningModel PMML MiningModel}.
@return A {@link org.dmg.pmml.MiningModel PMML MiningModel}.
Retrieves the { @link org . dmg . pmml . MiningModel PMML MiningModel } element in a { @link org . dmg . pmml . PMML } .