Пример #1
0
    def test_pickling_sklearn(self, sklearn_model: SKLearnModel):
        fp = BytesIO()

        pickle.dump(sklearn_model, fp)
        fp.flush()
        fp.seek(0)
        actual_model = pickle.load(fp)

        assert_models_equal(sklearn_model, actual_model, pickled=True)
Пример #2
0
    def test_pickling_pygam(self, pygam_model: GAM):
        fp = BytesIO()

        pickle.dump(pygam_model, fp)
        fp.flush()
        fp.seek(0)
        actual_model = pickle.load(fp)

        assert_models_equal(pygam_model, actual_model, pickled=True)
Пример #3
0
    def test_pickling(self, gamr_model: GAMR):
        fp = BytesIO()

        pickle.dump(gamr_model, fp)
        fp.flush()
        fp.seek(0)
        actual_model = pickle.load(fp)

        assert_models_equal(gamr_model, actual_model, pickled=True)
Пример #4
0
 def test_deep_copy_pygam(self, pygam_model: GAM):
     assert_models_equal(pygam_model, deepcopy(pygam_model), deepcopy=True)
Пример #5
0
 def test_shallow_copy_pygam(self, pygam_model: GAM):
     assert_models_equal(pygam_model, copy(pygam_model), deepcopy=False)
Пример #6
0
 def test_deep_copy_sklearn(self, sklearn_model: SKLearnModel):
     assert_models_equal(sklearn_model, deepcopy(sklearn_model), deepcopy=True)
Пример #7
0
 def test_shallow_copy_sklearn(self, sklearn_model: SKLearnModel):
     assert_models_equal(sklearn_model, copy(sklearn_model), deepcopy=False)
Пример #8
0
 def test_deep_copy(self, gamr_model: GAMR):
     assert_models_equal(gamr_model, deepcopy(gamr_model), deepcopy=True)
Пример #9
0
 def test_shallow_copy(self, gamr_model: GAMR):
     assert_models_equal(gamr_model, copy(gamr_model), deepcopy=False)