Skip to content

Commit aa45324

Browse files
author
sbpkyle
committed
Updated directory and fixed formatting
1 parent 2d89d8b commit aa45324

1 file changed

Lines changed: 54 additions & 17 deletions

File tree

run_inference.ipynb

Lines changed: 54 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,18 @@
1212
},
1313
{
1414
"cell_type": "code",
15-
"execution_count": null,
15+
"execution_count": 2,
1616
"metadata": {},
1717
"outputs": [],
1818
"source": [
19-
"\n",
2019
"import pandas as pd\n",
2120
"\n",
2221
"import numpy as np\n",
2322
"from tlpath.utils import (\n",
2423
" predict_telomere_length,\n",
2524
" predict_all_tissues,\n",
2625
" predict_batch,\n",
27-
")\n",
28-
"\n"
26+
")\n"
2927
]
3028
},
3129
{
@@ -37,11 +35,12 @@
3735
},
3836
{
3937
"cell_type": "code",
40-
"execution_count": null,
38+
"execution_count": 3,
4139
"metadata": {},
4240
"outputs": [],
4341
"source": [
44-
"models_dir = '/shares/sinha/anamikay/TLPath_results/models'"
42+
"# Tissue models directory\n",
43+
"models_dir = '../TLPath/models/' "
4544
]
4645
},
4746
{
@@ -53,7 +52,7 @@
5352
},
5453
{
5554
"cell_type": "code",
56-
"execution_count": null,
55+
"execution_count": 4,
5756
"metadata": {},
5857
"outputs": [
5958
{
@@ -111,17 +110,30 @@
111110
},
112111
{
113112
"cell_type": "code",
114-
"execution_count": 20,
113+
"execution_count": 5,
115114
"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+
],
117129
"source": [
118130
"# Single tissue prediction\n",
119131
"telomere_length_pancreas = predict_telomere_length(models_dir, pancreas_feature, \"Pancreas\")"
120132
]
121133
},
122134
{
123135
"cell_type": "code",
124-
"execution_count": 21,
136+
"execution_count": 6,
125137
"metadata": {},
126138
"outputs": [
127139
{
@@ -138,9 +150,34 @@
138150
},
139151
{
140152
"cell_type": "code",
141-
"execution_count": 22,
153+
"execution_count": 7,
142154
"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+
],
144181
"source": [
145182
"# Multiple tissue prediction\n",
146183
"tissue_features = {\n",
@@ -153,7 +190,7 @@
153190
},
154191
{
155192
"cell_type": "code",
156-
"execution_count": 25,
193+
"execution_count": 8,
157194
"metadata": {},
158195
"outputs": [
159196
{
@@ -162,7 +199,7 @@
162199
"array([0.90414792])"
163200
]
164201
},
165-
"execution_count": 25,
202+
"execution_count": 8,
166203
"metadata": {},
167204
"output_type": "execute_result"
168205
}
@@ -180,7 +217,7 @@
180217
},
181218
{
182219
"cell_type": "code",
183-
"execution_count": 30,
220+
"execution_count": 9,
184221
"metadata": {},
185222
"outputs": [
186223
{
@@ -214,7 +251,7 @@
214251
],
215252
"metadata": {
216253
"kernelspec": {
217-
"display_name": "Python 3 (ipykernel)",
254+
"display_name": "TLPath_test",
218255
"language": "python",
219256
"name": "python3"
220257
},
@@ -228,7 +265,7 @@
228265
"name": "python",
229266
"nbconvert_exporter": "python",
230267
"pygments_lexer": "ipython3",
231-
"version": "3.10.0"
268+
"version": "3.10.16"
232269
}
233270
},
234271
"nbformat": 4,

0 commit comments

Comments
 (0)