019f0c822cd8f2833d3b25855f2df99cd5a465a4,auto_ml/utils_model_training.py,FinalModelATC,fit,#FinalModelATC#Any#Any#,57

Before Change


                self.model.fit(X_fit, y)

        except TypeError as e:
            if scipy.sparse.issparse(X_fit):
                X_fit = X_fit.todense()
            self.model.fit(X_fit, y)

        except KeyboardInterrupt as e:
            print("Stopping training at this point because we heard a KeyboardInterrupt")

After Change




            cat_feature_indices = self.get_categorical_feature_indices()
            if cat_feature_indices is None:
                self.model.fit(X_fit, y, eval_set=[(X_test, y_test)], early_stopping_rounds=50, eval_metric=eval_metric, eval_names=["random_holdout_set_from_training_data"])
            else:
                self.model.fit(X_fit, y, eval_set=[(X_test, y_test)], early_stopping_rounds=50, eval_metric=eval_metric, eval_names=["random_holdout_set_from_training_data"], categorical_feature=cat_feature_indices)


        elif self.model_name[:8] == "CatBoost":
            X_fit = X_fit.toarray()

            if self.type_of_estimator == "classifier" and len(pd.Series(y).unique()) > 2:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: ClimbsRocks/auto_ml
Commit Name: 019f0c822cd8f2833d3b25855f2df99cd5a465a4
Time: 2017-08-17
Author: ClimbsBytes@gmail.com
File Name: auto_ml/utils_model_training.py
Class Name: FinalModelATC
Method Name: fit


Project Name: stellargraph/stellargraph
Commit Name: 59266e34e076ed25852bccf5ce13025b5408406f
Time: 2019-05-28
Author: andrew.docherty@data61.csiro.au
File Name: stellargraph/mapper/node_mappers.py
Class Name: FullBatchNodeGenerator
Method Name: __init__


Project Name: scipy/scipy
Commit Name: 824a16d535383cfc1a8dd653fdf1b749535a7456
Time: 2013-05-06
Author: argriffi@ncsu.edu
File Name: scipy/sparse/linalg/_expm_action.py
Class Name:
Method Name: _exact_1_norm