|
a |
|
b/simdeep/simdeep_distributed.py |
|
|
1 |
import ray |
|
|
2 |
from simdeep.simdeep_analysis import SimDeep |
|
|
3 |
|
|
|
4 |
from simdeep.config import NB_CLUSTERS |
|
|
5 |
from simdeep.config import CLUSTER_ARRAY |
|
|
6 |
from simdeep.config import PVALUE_THRESHOLD |
|
|
7 |
from simdeep.config import CINDEX_THRESHOLD |
|
|
8 |
from simdeep.config import CLASSIFIER_TYPE |
|
|
9 |
|
|
|
10 |
from simdeep.config import MIXTURE_PARAMS |
|
|
11 |
from simdeep.config import PATH_RESULTS |
|
|
12 |
from simdeep.config import PROJECT_NAME |
|
|
13 |
from simdeep.config import CLASSIFICATION_METHOD |
|
|
14 |
|
|
|
15 |
from simdeep.config import CLUSTER_EVAL_METHOD |
|
|
16 |
from simdeep.config import CLUSTER_METHOD |
|
|
17 |
from simdeep.config import NB_THREADS_COXPH |
|
|
18 |
from simdeep.config import NB_SELECTED_FEATURES |
|
|
19 |
from simdeep.config import LOAD_EXISTING_MODELS |
|
|
20 |
from simdeep.config import NODES_SELECTION |
|
|
21 |
from simdeep.config import PATH_TO_SAVE_MODEL |
|
|
22 |
|
|
|
23 |
from simdeep.config import USE_AUTOENCODERS |
|
|
24 |
from simdeep.config import FEATURE_SURV_ANALYSIS |
|
|
25 |
from simdeep.config import CLUSTERING_OMICS |
|
|
26 |
from simdeep.config import USE_R_PACKAGES_FOR_SURVIVAL |
|
|
27 |
|
|
|
28 |
|
|
|
29 |
@ray.remote |
|
|
30 |
class SimDeepDistributed(SimDeep): |
|
|
31 |
def __init__( |
|
|
32 |
self, |
|
|
33 |
nb_clusters=NB_CLUSTERS, |
|
|
34 |
pvalue_thres=PVALUE_THRESHOLD, |
|
|
35 |
cindex_thres=CINDEX_THRESHOLD, |
|
|
36 |
use_autoencoders=USE_AUTOENCODERS, |
|
|
37 |
feature_surv_analysis=FEATURE_SURV_ANALYSIS, |
|
|
38 |
cluster_method=CLUSTER_METHOD, |
|
|
39 |
cluster_eval_method=CLUSTER_EVAL_METHOD, |
|
|
40 |
classifier_type=CLASSIFIER_TYPE, |
|
|
41 |
project_name=PROJECT_NAME, |
|
|
42 |
path_results=PATH_RESULTS, |
|
|
43 |
cluster_array=CLUSTER_ARRAY, |
|
|
44 |
nb_selected_features=NB_SELECTED_FEATURES, |
|
|
45 |
mixture_params=MIXTURE_PARAMS, |
|
|
46 |
node_selection=NODES_SELECTION, |
|
|
47 |
nb_threads_coxph=NB_THREADS_COXPH, |
|
|
48 |
classification_method=CLASSIFICATION_METHOD, |
|
|
49 |
load_existing_models=LOAD_EXISTING_MODELS, |
|
|
50 |
clustering_omics=CLUSTERING_OMICS, |
|
|
51 |
path_to_save_model=PATH_TO_SAVE_MODEL, |
|
|
52 |
metadata_usage=None, |
|
|
53 |
feature_selection_usage='individual', |
|
|
54 |
use_r_packages=USE_R_PACKAGES_FOR_SURVIVAL, |
|
|
55 |
alternative_embedding=None, |
|
|
56 |
kwargs_alternative_embedding={}, |
|
|
57 |
do_KM_plot=True, |
|
|
58 |
verbose=True, |
|
|
59 |
_isboosting=False, |
|
|
60 |
dataset=None, |
|
|
61 |
deep_model_additional_args={}): |
|
|
62 |
""" |
|
|
63 |
""" |
|
|
64 |
SimDeep.__init__( |
|
|
65 |
self, |
|
|
66 |
nb_clusters=nb_clusters, |
|
|
67 |
pvalue_thres=pvalue_thres, |
|
|
68 |
cindex_thres=cindex_thres, |
|
|
69 |
cluster_method=cluster_method, |
|
|
70 |
cluster_eval_method=cluster_eval_method, |
|
|
71 |
classifier_type=classifier_type, |
|
|
72 |
project_name=project_name, |
|
|
73 |
clustering_omics=clustering_omics, |
|
|
74 |
path_results=path_results, |
|
|
75 |
use_autoencoders=use_autoencoders, |
|
|
76 |
feature_surv_analysis=feature_surv_analysis, |
|
|
77 |
cluster_array=cluster_array, |
|
|
78 |
nb_selected_features=nb_selected_features, |
|
|
79 |
mixture_params=mixture_params, |
|
|
80 |
node_selection=node_selection, |
|
|
81 |
nb_threads_coxph=nb_threads_coxph, |
|
|
82 |
feature_selection_usage=feature_selection_usage, |
|
|
83 |
metadata_usage=metadata_usage, |
|
|
84 |
classification_method=classification_method, |
|
|
85 |
load_existing_models=load_existing_models, |
|
|
86 |
path_to_save_model=path_to_save_model, |
|
|
87 |
do_KM_plot=do_KM_plot, |
|
|
88 |
alternative_embedding=alternative_embedding, |
|
|
89 |
kwargs_alternative_embedding=kwargs_alternative_embedding, |
|
|
90 |
verbose=verbose, |
|
|
91 |
use_r_packages=use_r_packages, |
|
|
92 |
_isboosting=_isboosting, |
|
|
93 |
dataset=dataset, |
|
|
94 |
deep_model_additional_args=deep_model_additional_args) |