|
12 | 12 | }, |
13 | 13 | { |
14 | 14 | "cell_type": "code", |
15 | | - "execution_count": null, |
| 15 | + "execution_count": 2, |
16 | 16 | "metadata": {}, |
17 | 17 | "outputs": [], |
18 | 18 | "source": [ |
19 | | - "\n", |
20 | 19 | "import pandas as pd\n", |
21 | 20 | "\n", |
22 | 21 | "import numpy as np\n", |
23 | 22 | "from tlpath.utils import (\n", |
24 | 23 | " predict_telomere_length,\n", |
25 | 24 | " predict_all_tissues,\n", |
26 | 25 | " predict_batch,\n", |
27 | | - ")\n", |
28 | | - "\n" |
| 26 | + ")\n" |
29 | 27 | ] |
30 | 28 | }, |
31 | 29 | { |
|
37 | 35 | }, |
38 | 36 | { |
39 | 37 | "cell_type": "code", |
40 | | - "execution_count": null, |
| 38 | + "execution_count": 3, |
41 | 39 | "metadata": {}, |
42 | 40 | "outputs": [], |
43 | 41 | "source": [ |
44 | | - "models_dir = '/shares/sinha/anamikay/TLPath_results/models'" |
| 42 | + "# Tissue models directory\n", |
| 43 | + "models_dir = '../TLPath/models/' " |
45 | 44 | ] |
46 | 45 | }, |
47 | 46 | { |
|
53 | 52 | }, |
54 | 53 | { |
55 | 54 | "cell_type": "code", |
56 | | - "execution_count": null, |
| 55 | + "execution_count": 4, |
57 | 56 | "metadata": {}, |
58 | 57 | "outputs": [ |
59 | 58 | { |
|
111 | 110 | }, |
112 | 111 | { |
113 | 112 | "cell_type": "code", |
114 | | - "execution_count": 20, |
| 113 | + "execution_count": 5, |
115 | 114 | "metadata": {}, |
116 | | - "outputs": [], |
| 115 | + "outputs": [ |
| 116 | + { |
| 117 | + "name": "stderr", |
| 118 | + "output_type": "stream", |
| 119 | + "text": [ |
| 120 | + "/mnt/beegfs/home/kalvarez/miniforge3/envs/TLPath_test/lib/python3.10/site-packages/sklearn/base.py:380: InconsistentVersionWarning: Trying to unpickle estimator DecisionTreeRegressor from version 1.6.0 when using version 1.6.1. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:\n", |
| 121 | + "https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations\n", |
| 122 | + " warnings.warn(\n", |
| 123 | + "/mnt/beegfs/home/kalvarez/miniforge3/envs/TLPath_test/lib/python3.10/site-packages/sklearn/base.py:380: InconsistentVersionWarning: Trying to unpickle estimator RandomForestRegressor from version 1.6.0 when using version 1.6.1. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:\n", |
| 124 | + "https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations\n", |
| 125 | + " warnings.warn(\n" |
| 126 | + ] |
| 127 | + } |
| 128 | + ], |
117 | 129 | "source": [ |
118 | 130 | "# Single tissue prediction\n", |
119 | 131 | "telomere_length_pancreas = predict_telomere_length(models_dir, pancreas_feature, \"Pancreas\")" |
120 | 132 | ] |
121 | 133 | }, |
122 | 134 | { |
123 | 135 | "cell_type": "code", |
124 | | - "execution_count": 21, |
| 136 | + "execution_count": 6, |
125 | 137 | "metadata": {}, |
126 | 138 | "outputs": [ |
127 | 139 | { |
|
138 | 150 | }, |
139 | 151 | { |
140 | 152 | "cell_type": "code", |
141 | | - "execution_count": 22, |
| 153 | + "execution_count": 7, |
142 | 154 | "metadata": {}, |
143 | | - "outputs": [], |
| 155 | + "outputs": [ |
| 156 | + { |
| 157 | + "name": "stderr", |
| 158 | + "output_type": "stream", |
| 159 | + "text": [ |
| 160 | + "/mnt/beegfs/home/kalvarez/miniforge3/envs/TLPath_test/lib/python3.10/site-packages/sklearn/base.py:380: InconsistentVersionWarning: Trying to unpickle estimator DecisionTreeRegressor from version 1.6.0 when using version 1.6.1. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:\n", |
| 161 | + "https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations\n", |
| 162 | + " warnings.warn(\n", |
| 163 | + "/mnt/beegfs/home/kalvarez/miniforge3/envs/TLPath_test/lib/python3.10/site-packages/sklearn/base.py:380: InconsistentVersionWarning: Trying to unpickle estimator RandomForestRegressor from version 1.6.0 when using version 1.6.1. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:\n", |
| 164 | + "https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations\n", |
| 165 | + " warnings.warn(\n", |
| 166 | + "/mnt/beegfs/home/kalvarez/miniforge3/envs/TLPath_test/lib/python3.10/site-packages/sklearn/base.py:380: InconsistentVersionWarning: Trying to unpickle estimator DecisionTreeRegressor from version 1.6.0 when using version 1.6.1. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:\n", |
| 167 | + "https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations\n", |
| 168 | + " warnings.warn(\n", |
| 169 | + "/mnt/beegfs/home/kalvarez/miniforge3/envs/TLPath_test/lib/python3.10/site-packages/sklearn/base.py:380: InconsistentVersionWarning: Trying to unpickle estimator RandomForestRegressor from version 1.6.0 when using version 1.6.1. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:\n", |
| 170 | + "https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations\n", |
| 171 | + " warnings.warn(\n", |
| 172 | + "/mnt/beegfs/home/kalvarez/miniforge3/envs/TLPath_test/lib/python3.10/site-packages/sklearn/base.py:380: InconsistentVersionWarning: Trying to unpickle estimator DecisionTreeRegressor from version 1.6.0 when using version 1.6.1. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:\n", |
| 173 | + "https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations\n", |
| 174 | + " warnings.warn(\n", |
| 175 | + "/mnt/beegfs/home/kalvarez/miniforge3/envs/TLPath_test/lib/python3.10/site-packages/sklearn/base.py:380: InconsistentVersionWarning: Trying to unpickle estimator RandomForestRegressor from version 1.6.0 when using version 1.6.1. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:\n", |
| 176 | + "https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations\n", |
| 177 | + " warnings.warn(\n" |
| 178 | + ] |
| 179 | + } |
| 180 | + ], |
144 | 181 | "source": [ |
145 | 182 | "# Multiple tissue prediction\n", |
146 | 183 | "tissue_features = {\n", |
|
153 | 190 | }, |
154 | 191 | { |
155 | 192 | "cell_type": "code", |
156 | | - "execution_count": 25, |
| 193 | + "execution_count": 8, |
157 | 194 | "metadata": {}, |
158 | 195 | "outputs": [ |
159 | 196 | { |
|
162 | 199 | "array([0.90414792])" |
163 | 200 | ] |
164 | 201 | }, |
165 | | - "execution_count": 25, |
| 202 | + "execution_count": 8, |
166 | 203 | "metadata": {}, |
167 | 204 | "output_type": "execute_result" |
168 | 205 | } |
|
180 | 217 | }, |
181 | 218 | { |
182 | 219 | "cell_type": "code", |
183 | | - "execution_count": 30, |
| 220 | + "execution_count": 9, |
184 | 221 | "metadata": {}, |
185 | 222 | "outputs": [ |
186 | 223 | { |
|
214 | 251 | ], |
215 | 252 | "metadata": { |
216 | 253 | "kernelspec": { |
217 | | - "display_name": "Python 3 (ipykernel)", |
| 254 | + "display_name": "TLPath_test", |
218 | 255 | "language": "python", |
219 | 256 | "name": "python3" |
220 | 257 | }, |
|
228 | 265 | "name": "python", |
229 | 266 | "nbconvert_exporter": "python", |
230 | 267 | "pygments_lexer": "ipython3", |
231 | | - "version": "3.10.0" |
| 268 | + "version": "3.10.16" |
232 | 269 | } |
233 | 270 | }, |
234 | 271 | "nbformat": 4, |
|
0 commit comments