34b74a059dc70f49c6033d9593ca6f6b1979c058,alphapy/model.py,,predict_best,#Any#,750

Before Change



    // Record support vector for any recursive feature elimination

    if rfe and model.support[best_tag]:
        pass

    // Return the model with best estimator and predictions.

    end_time = datetime.now()
    time_taken = end_time - start_time
    logger.info("Best Model Selection Complete: %s", time_taken)

After Change



    // Record support vector for any recursive feature elimination

    if rfe:
        try:
            if model.support[best_algo]:
                logger.info("Saving RFE Support")
                full_path = SSEP.join([directory, "model", "features_support_rfe.pkl"])
                joblib.dump(model.support[best_algo], full_path)
        except:
            // no RFE support for best algorithm
            pass

    // Return the model with best estimator and predictions.

    end_time = datetime.now()
    time_taken = end_time - start_time
    logger.info("Best Model Selection Complete: %s", time_taken)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: ScottfreeLLC/AlphaPy
Commit Name: 34b74a059dc70f49c6033d9593ca6f6b1979c058
Time: 2017-04-15
Author: Mark.R.Conway@gmail.com
File Name: alphapy/model.py
Class Name:
Method Name: predict_best


Project Name: neurosynth/neurosynth
Commit Name: e4f774a55446bb6f7fab43d999dd6fea24158e26
Time: 2014-10-27
Author: tyarkoni@gmail.com
File Name: neurosynth/analysis/cluster.py
Class Name: Clusterer
Method Name: cluster


Project Name: facebookresearch/ParlAI
Commit Name: efa6044a44b0a4be1e5be8dd2e9937f6891f987a
Time: 2019-03-06
Author: jaseweston@gmail.com
File Name: parlai/agents/ir_baseline/ir_baseline.py
Class Name: IrBaselineAgent
Method Name: save