shappiron commited on
Commit
471c3c0
·
verified ·
1 Parent(s): d6529c0

added usage principles with sklearn-based models

Browse files
Files changed (1) hide show
  1. README.md +26 -1
README.md CHANGED
@@ -120,7 +120,32 @@ it can be either rounded by the researchers to full years, or converted from mon
120
 
121
  ## Usage Guidelines
122
 
123
- <...>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
124
 
125
  ## Additional Information
126
 
 
120
 
121
  ## Usage Guidelines
122
 
123
+ Suppose you trained brand-new epigenetic aging clocks model using classic `scikit-learn` library. You saved your model as `pickle` file. Then, the following block of code can be used for benchmarking your model. We also added several other published aging clocks for comparison with yours.
124
+ ```python
125
+ from computage import run_benchmark
126
+
127
+ #first define NaN imputation method for in_library models
128
+ #for simlicity here we recommend to use imputation with zeros
129
+ imputation = 'none'
130
+ models_config = {
131
+ "in_library":{
132
+ 'HorvathV1':{'imputation':imputation},
133
+ 'Hannum':{'imputation':imputation},
134
+ 'PhenoAgeV2':{'imputation':imputation},
135
+ },
136
+ #here we should define a name of our new model as well as path
137
+ #to the pickle file (.pkl) of the model
138
+ "new_models":{
139
+ #'my_new_model_name': {'path':/path/to/model.pkl}
140
+ }
141
+ }
142
+ #now run the benchmark
143
+ bench = run_benchmark(models_config,
144
+ experiment_prefix='my_model_test',
145
+ output_folder='./benchmark'
146
+ )
147
+ #upon completion, the results will be saved in the folder you specified
148
+ ```
149
 
150
  ## Additional Information
151