append_timestamp = False
save_best_model = True

if use_saved_model:
    n_reps = 1

acc_train_vect = {}
acc_test_vect = {}

output_filename = "naive_bayes_1"

prep = Preprocessing()

if config["one_hot_encoding"]:
    prep.create_encoder(
        prep.adapt_input(generator.generate_binary(config["n_valves"])))

if config["run_clean"] and not use_saved_model:
    loader.clean(root_crt_model_folder)


def init_vect(vect):
    for key in vect["data"]:
        # print(key)
        vect["data"][key].append(None)

    vect["count"].append(None)
    vect["files"].append(None)


def update_vect(vect, index, acc, count, dt, fsize, file1):
use_randomforest = True

prep = Preprocessing()

if use_randomforest:
    root_crt_model_folder = config["root_model_container"] + "/dtree_multi"
    output_filename = "dtree_2_multioutput"
else:
    root_crt_model_folder = config["root_model_container"] + "/dtree"
    output_filename = "dtree_1"

# output_filename = "eval_deep_3_rnn_random_"
# output_filename = "eval_deep_5_rnn_random_"

if config["one_hot_encoding"]:
    binv = generator.generate_binary(config["n_valves"])
    print("binv:")
    print(binv)
    binv = prep.adapt_input(binv)
    print("adapted:")
    print(binv)
    # print("to list")
    # print(prep.str_to_list(binv))
    prep.create_encoder(binv)

# quit()

use_random_exp = True
use_matching_random_model = False
from_file = True