private static BPRMF getBprmf(CommandLine cmd) {
        BPRMF bprmf = new BPRMF();

        String learnRate = cmd.getOptionValue(CommandLineOptions.LEARNRATE);
        if (learnRate != null) {
            bprmf.setLearnRate(Float.parseFloat(learnRate));
        }

        String iters = cmd.getOptionValue(CommandLineOptions.ITERS);
        if (iters != null) {
            bprmf.setNumIterations(Integer.parseInt(iters));
        }

        String factors = cmd.getOptionValue(CommandLineOptions.FACTORS);
        if (factors != null) {
            bprmf.setNumFactors(Integer.parseInt(factors));
        }

        String regBias = cmd.getOptionValue(CommandLineOptions.REGBIAS);
        if (regBias != null) {
            bprmf.setRegBias(Float.parseFloat(regBias));
        }

        String regU = cmd.getOptionValue(CommandLineOptions.REGU);
        if (regU != null) {
            bprmf.setRegU(Float.parseFloat(regU));
        }

        String regI = cmd.getOptionValue(CommandLineOptions.REGI);
        if (regI != null) {
            bprmf.setRegI(Float.parseFloat(regI));
        }

        String regJ = cmd.getOptionValue(CommandLineOptions.REGJ);
        if (regJ != null) {
            bprmf.setRegJ(Float.parseFloat(regJ));
        }

        if (cmd.hasOption(CommandLineOptions.SKIPJUPDATE)) {
            bprmf.setUpdateJ(false);
        }

        return bprmf;
    }