From d58cf539de02b6f3815c76971d1b92ff1cb32d32 Mon Sep 17 00:00:00 2001 From: vasiliev Date: Wed, 1 Jan 2025 20:07:29 +0300 Subject: [PATCH] Cleared code --- demonstration/Dissertation/memory.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/demonstration/Dissertation/memory.py b/demonstration/Dissertation/memory.py index 1254925..efc875a 100644 --- a/demonstration/Dissertation/memory.py +++ b/demonstration/Dissertation/memory.py @@ -1,10 +1,10 @@ # import pandas as pd -# import numpy as np -# # import os -# # import time -# # import copy -# # import pathlib, tempfile -# +import numpy as np +# import os +# import time +# import copy +# import pathlib, tempfile + import matplotlib.pyplot as plt import seaborn as sns sns.set() @@ -27,10 +27,13 @@ import cProfile import pstats - from sklearn.model_selection import train_test_split, StratifiedKFold from survivors.experiments.grid import generate_sample, prepare_sample, count_metric +from memory_profiler import memory_usage +from survivors.tree import CRAID +import sys + # X, y, features, categ, sch_nan = ds.load_actg_dataset() X, y, features, categ, sch_nan = ds.load_smarto_dataset() # X, y, features, categ, sch_nan = ds.load_wuhan_dataset() @@ -42,10 +45,6 @@ X_TR, X_HO = train_test_split(X, stratify=discr, test_size=0.33, random_state=42) X_tr, y_tr, X_HO, y_HO, bins_HO = prepare_sample(X, y, X_TR.index, X_HO.index) -from memory_profiler import memory_usage -from survivors.tree import CRAID -import sys - p = {'balance': None, 'categ': categ, 'criterion': 'wilcoxon', 'cut': False, 'depth': 10, 'ens_metric_name': 'IBS_REMAIN', 'l_reg': 0.0, 'leaf_model': 'base_zero_after', 'max_features': 0.9, 'min_samples_leaf': 0.01, 'n_jobs': 1, 'n_jobs_loop': 1, 'signif': 1, 'woe': True}