def __call__(self, dataset, classifier, steps=10,
                 verbose=0, random_state=42):
        X_train, X_test, y_train, y_test = dataset.train_test_split()

        scores_train = []
        scores_test = []
        sizes = []

        if verbose:
            print("          n      train      test")

        for frac in np.linspace(0.1, 1.0, num=steps):
            frac_size = int(X_train.shape[0] * frac)
            sizes.append(frac_size)
            X_train1 = X_train[:frac_size]
            y_train1 = y_train[:frac_size]

            clf = clone(classifier)
            clf.fit(X_train1, y_train1)

            predict_train = self.predict(clf, X_train1)
            predict_test = self.predict(clf, X_test)

            score_train = self.score_func(y_train1, predict_train)
            score_test = self.score_func(y_test, predict_test)

            scores_train.append(score_train)
            scores_test.append(score_test)

            if verbose:
                print("   %8d     %0.4f    %0.4f" % (
                    frac_size, score_train, score_test))

        return scores_train, scores_test, sizes
Removes hostname and timestamp
dataset/ETHPy150Open dnouri/nolearn/nolearn/metrics.py/LearningCurve.__call__--crossover with--dataset/ETHPy150Open serverdensity/sd-agent/tests/checks/mock/test_supervisord.py/TestSupervisordCheck.norm_metric