How to use the hyperactive.memory.delete_model function in hyperactive

To help you get started, we’ve selected a few hyperactive examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SimonBlanke / Hyperactive / tests / test_memory_helpers.py View on Github external
def test_split_model_IDs():
    delete_model(model1)
    delete_model(model2)

    connect_model_IDs(model1, model2)

    split_model_IDs(model1, model2)

    c_time = time.time()
    opt = Hyperactive(X, y, memory="long")
    opt.search(search_config1, n_iter=1000)
    diff_time_0 = time.time() - c_time

    c_time = time.time()
    opt = Hyperactive(X, y, memory="long")
    opt.search(search_config2, n_iter=1000)
    diff_time_1 = time.time() - c_time

    assert diff_time_0 / 2 < diff_time_1
github SimonBlanke / Hyperactive / tests / test_memory_helpers.py View on Github external
def test_connect_model_IDs():
    delete_model(model1)
    delete_model(model2)

    connect_model_IDs(model1, model2)

    c_time = time.time()
    opt = Hyperactive(X, y, memory="long")
    opt.search(search_config1, n_iter=1000)
    diff_time_0 = time.time() - c_time

    c_time = time.time()
    opt = Hyperactive(X, y, memory="long")
    opt.search(search_config2, n_iter=1000)
    diff_time_1 = time.time() - c_time

    assert diff_time_0 / 2 > diff_time_1
github SimonBlanke / Hyperactive / tests / test_memory_helpers.py View on Github external
def test_connect_model_IDs():
    delete_model(model1)
    delete_model(model2)

    connect_model_IDs(model1, model2)

    c_time = time.time()
    opt = Hyperactive(X, y, memory="long")
    opt.search(search_config1, n_iter=1000)
    diff_time_0 = time.time() - c_time

    c_time = time.time()
    opt = Hyperactive(X, y, memory="long")
    opt.search(search_config2, n_iter=1000)
    diff_time_1 = time.time() - c_time

    assert diff_time_0 / 2 > diff_time_1
github SimonBlanke / Hyperactive / tests / test_memory_helpers.py View on Github external
def test_delete_model():
    delete_model(model)

    opt = Hyperactive(X, y, memory="long")
    opt.search(search_config)

    delete_model(model)
github SimonBlanke / Hyperactive / tests / test_memory_helpers.py View on Github external
def test_split_model_IDs():
    delete_model(model1)
    delete_model(model2)

    connect_model_IDs(model1, model2)

    split_model_IDs(model1, model2)

    c_time = time.time()
    opt = Hyperactive(X, y, memory="long")
    opt.search(search_config1, n_iter=1000)
    diff_time_0 = time.time() - c_time

    c_time = time.time()
    opt = Hyperactive(X, y, memory="long")
    opt.search(search_config2, n_iter=1000)
    diff_time_1 = time.time() - c_time
github SimonBlanke / Hyperactive / tests / test_memory.py View on Github external
def test_long_term_memory_times():
    def _model_(para, X_train, y_train):
        model = DecisionTreeClassifier(max_depth=para["max_depth"])
        scores = cross_val_score(model, X_train, y_train, cv=2)

        return scores.mean()

    search_config = {_model_: {"max_depth": range(2, 500)}}

    delete_model(_model_)

    c_time = time.time()
    opt = Hyperactive(X, y, memory="long")
    opt.search(search_config, n_iter=1000)
    diff_time_0 = time.time() - c_time

    c_time = time.time()
    opt = Hyperactive(X, y, memory="long")
    opt.search(search_config, n_iter=1000)
    diff_time_1 = time.time() - c_time

    assert diff_time_0 / 2 > diff_time_1