Skip to content

Commit

Permalink
chore: upgrade all examples and case studies
Browse files Browse the repository at this point in the history
  • Loading branch information
f-aguzzi committed Jun 27, 2024
1 parent d7da7b7 commit c084b78
Show file tree
Hide file tree
Showing 16 changed files with 164 additions and 117 deletions.
32 changes: 16 additions & 16 deletions case studies/concat_vs_outer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29435,7 +29435,7 @@
"# QEPAS-only\n",
"\n",
"from chemfusekit.df import DFSettings, DF, Table\n",
"from chemfusekit.lr import LRSettings, LR, GraphMode\n",
"from chemfusekit.lr import LRSettings, LR\n",
"\n",
"# Let's import a table of QEPAS data (needs SNV preprocessing)\n",
"table1 = Table(\n",
Expand All @@ -29449,7 +29449,7 @@
"data = df.fused_data\n",
"\n",
"# Perform LR on the imported QEPAS data\n",
"lr_settings = LRSettings(output=GraphMode.GRAPHIC, test_split=True)\n",
"lr_settings = LRSettings(output='graphical', test_split=True)\n",
"lr = LR(lr_settings, data)\n",
"lr.train()"
]
Expand Down Expand Up @@ -58922,7 +58922,7 @@
"# LLDF concat\n",
"\n",
"from chemfusekit.df import DFSettings, DF, Table\n",
"from chemfusekit.lr import LRSettings, LR, GraphMode\n",
"from chemfusekit.lr import LRSettings, LR\n",
"\n",
"# Let's import a table of QEPAS data (needs SNV preprocessing)\n",
"table1 = Table(\n",
Expand All @@ -58942,7 +58942,7 @@
"data = df.fused_data\n",
"\n",
"# Perform LR on the imported QEPAS data\n",
"lr_settings = LRSettings(output=GraphMode.GRAPHIC, test_split=True)\n",
"lr_settings = LRSettings(output='graphical', test_split=True)\n",
"lr = LR(lr_settings, data)\n",
"lr.train()"
]
Expand Down Expand Up @@ -88375,7 +88375,7 @@
"# LLDF outer\n",
"\n",
"from chemfusekit.df import DFSettings, DF, Table\n",
"from chemfusekit.lr import LRSettings, LR, GraphMode\n",
"from chemfusekit.lr import LRSettings, LR\n",
"\n",
"# Let's import a table of QEPAS data (needs SNV preprocessing)\n",
"table1 = Table(\n",
Expand All @@ -88395,7 +88395,7 @@
"data = df.fused_data\n",
"\n",
"# Perform LR on the imported QEPAS data\n",
"lr_settings = LRSettings(output=GraphMode.GRAPHIC, test_split=True)\n",
"lr_settings = LRSettings(output='graphical', test_split=True)\n",
"lr = LR(lr_settings, data)\n",
"lr.train()"
]
Expand Down Expand Up @@ -112951,7 +112951,7 @@
"# QEPAS only + PCA\n",
"\n",
"from chemfusekit.df import DFSettings, DF, Table\n",
"from chemfusekit.lr import LRSettings, LR, GraphMode\n",
"from chemfusekit.lr import LRSettings, LR\n",
"from chemfusekit.pca import PCASettings, PCA\n",
"\n",
"# Let's import a table of QEPAS data (needs SNV preprocessing)\n",
Expand All @@ -112970,7 +112970,7 @@
"data = pca.rescaled_data\n",
"\n",
"# Perform LR on the imported QEPAS data\n",
"lr_settings = LRSettings(output=GraphMode.GRAPHIC, test_split=True)\n",
"lr_settings = LRSettings(output='graphical', test_split=True)\n",
"lr = LR(lr_settings, data)\n",
"lr.train()"
]
Expand Down Expand Up @@ -137439,7 +137439,7 @@
"# LLDF concat + PCA\n",
"\n",
"from chemfusekit.df import DFSettings, DF, Table\n",
"from chemfusekit.lr import LRSettings, LR, GraphMode\n",
"from chemfusekit.lr import LRSettings, LR\n",
"from chemfusekit.pca import PCASettings, PCA\n",
"\n",
"# Let's import a table of QEPAS data (needs SNV preprocessing)\n",
Expand All @@ -137463,7 +137463,7 @@
"data = pca.rescaled_data\n",
"\n",
"# Perform LR on the imported QEPAS data\n",
"lr_settings = LRSettings(output=GraphMode.GRAPHIC, test_split=True)\n",
"lr_settings = LRSettings(output='graphical', test_split=True)\n",
"lr = LR(lr_settings, data)\n",
"lr.train()"
]
Expand Down Expand Up @@ -162056,7 +162056,7 @@
"# LLDF outer + PCA\n",
"\n",
"from chemfusekit.df import DFSettings, DF, Table\n",
"from chemfusekit.lr import LRSettings, LR, GraphMode\n",
"from chemfusekit.lr import LRSettings, LR\n",
"\n",
"# Let's import a table of QEPAS data (needs SNV preprocessing)\n",
"table1 = Table(\n",
Expand All @@ -162079,7 +162079,7 @@
"data = pca.rescaled_data\n",
"\n",
"# Perform LR on the imported QEPAS data\n",
"lr_settings = LRSettings(output=GraphMode.GRAPHIC, test_split=True)\n",
"lr_settings = LRSettings(output='graphical', test_split=True)\n",
"lr = LR(lr_settings, data)\n",
"lr.train()"
]
Expand Down Expand Up @@ -186719,7 +186719,7 @@
"# MLDF concat\n",
"\n",
"from chemfusekit.df import DFSettings, DF, Table\n",
"from chemfusekit.lr import LRSettings, LR, GraphMode\n",
"from chemfusekit.lr import LRSettings, LR\n",
"\n",
"# Let's import a table of QEPAS data (needs SNV preprocessing)\n",
"table1 = Table(\n",
Expand All @@ -186740,7 +186740,7 @@
"data = df.fused_data\n",
"\n",
"# Perform LR on the imported QEPAS data\n",
"lr_settings = LRSettings(output=GraphMode.GRAPHIC, test_split=True)\n",
"lr_settings = LRSettings(output='graphical', test_split=True)\n",
"lr = LR(lr_settings, data)\n",
"lr.train()"
]
Expand Down Expand Up @@ -211333,7 +211333,7 @@
"# MLDF outer\n",
"\n",
"from chemfusekit.df import DFSettings, DF, Table\n",
"from chemfusekit.lr import LRSettings, LR, GraphMode\n",
"from chemfusekit.lr import LRSettings, LR\n",
"\n",
"# Let's import a table of QEPAS data (needs SNV preprocessing)\n",
"table1 = Table(\n",
Expand All @@ -211354,7 +211354,7 @@
"data = df.fused_data\n",
"\n",
"# Perform LR on the imported QEPAS data\n",
"lr_settings = LRSettings(output=GraphMode.GRAPHIC, test_split=True)\n",
"lr_settings = LRSettings(output='graphical', test_split=True)\n",
"lr = LR(lr_settings, data)\n",
"lr.train()"
]
Expand Down
27 changes: 21 additions & 6 deletions case studies/concat_vs_outer_3_tables.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"metadata": {},
"outputs": [],
"source": [
"from chemfusekit.df import DFSettings, DF, Table, GraphMode\n",
"from chemfusekit.knn import KNNSettings, KNN, GraphMode\n",
"from chemfusekit.df import DFSettings, DF, Table\n",
"from chemfusekit.knn import KNNSettings, KNN\n",
"from chemfusekit.pca import PCASettings, PCA\n",
"\n",
"# Set up the import settings for the first table (IMS spectral data)\n",
Expand Down Expand Up @@ -43,26 +43,41 @@
"print(data.y)\n",
"\n",
"# Set up and perform KNN\n",
"knn_settings = KNNSettings(output=GraphMode.GRAPHIC, test_split=True)\n",
"knn_settings = KNNSettings(output='graphical', test_split=True)\n",
"knn = KNN(knn_settings, data)\n",
"knn.train()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.12.3 ('.venv': venv)",
"display_name": "Python 3.10.14 ('.venv': venv)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"version": "3.12.3"
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.14"
},
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "0adf20f4cd3c09df9458869b76345de81eb21527fdd82bbecfd21ff585123f63"
"hash": "81d8f80a3d553cdb5a29fb03d9deaaaac5f47c6ba9e68f5e3a3f03e89cd14d92"
}
}
},
Expand Down
37 changes: 18 additions & 19 deletions case studies/concat_vs_outer_knn.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3273,10 +3273,9 @@
}
],
"source": [
"# QEPAS\n",
"\n",
"from chemfusekit.df import DFSettings, DF, Table\n",
"from chemfusekit.knn import KNNSettings, KNN, GraphMode\n",
"from chemfusekit.knn import KNNSettings, KNN\n",
"\n",
"# Let's import a table of QEPAS data (needs SNV preprocessing)\n",
"table1 = Table(\n",
Expand All @@ -3290,7 +3289,7 @@
"data = df.fused_data\n",
"\n",
"# Perform KNN on the imported QEPAS data\n",
"knn_settings = KNNSettings(output=GraphMode.GRAPHIC, test_split=True)\n",
"knn_settings = KNNSettings(output='graphical', test_split=True)\n",
"knn = KNN(knn_settings, data)\n",
"knn.train()"
]
Expand Down Expand Up @@ -6582,7 +6581,7 @@
"# LLDF concat\n",
"\n",
"from chemfusekit.df import DFSettings, DF, Table\n",
"from chemfusekit.lr import LRSettings, LR, GraphMode\n",
"from chemfusekit.lr import LRSettings, LR\n",
"\n",
"# Let's import a table of QEPAS data (needs SNV preprocessing)\n",
"table1 = Table(\n",
Expand All @@ -6602,7 +6601,7 @@
"data = df.fused_data\n",
"\n",
"# Perform KNN on the imported QEPAS data\n",
"knn_settings = KNNSettings(output=GraphMode.GRAPHIC, test_split=True)\n",
"knn_settings = KNNSettings(output='graphical', test_split=True)\n",
"knn = KNN(knn_settings, data)\n",
"knn.train()"
]
Expand Down Expand Up @@ -9894,7 +9893,7 @@
"# LLDF outer\n",
"\n",
"from chemfusekit.df import DFSettings, DF, Table\n",
"from chemfusekit.lr import LRSettings, LR, GraphMode\n",
"from chemfusekit.lr import LRSettings, LR\n",
"\n",
"# Let's import a table of QEPAS data (needs SNV preprocessing)\n",
"table1 = Table(\n",
Expand All @@ -9914,7 +9913,7 @@
"data = df.fused_data\n",
"\n",
"# Perform KNN on the imported QEPAS data\n",
"knn_settings = KNNSettings(output=GraphMode.GRAPHIC, test_split=True)\n",
"knn_settings = KNNSettings(output='graphical', test_split=True)\n",
"knn = KNN(knn_settings, data)\n",
"knn.train()"
]
Expand Down Expand Up @@ -13195,7 +13194,7 @@
"# QEPAS + PCA\n",
"\n",
"from chemfusekit.df import DFSettings, DF, Table\n",
"from chemfusekit.lr import LRSettings, LR, GraphMode\n",
"from chemfusekit.lr import LRSettings, LR\n",
"from chemfusekit.pca import PCASettings, PCA\n",
"\n",
"# Let's import a table of QEPAS data (needs SNV preprocessing)\n",
Expand All @@ -13214,7 +13213,7 @@
"data = pca.rescaled_data\n",
"\n",
"# Perform KNN on the imported QEPAS data\n",
"knn_settings = KNNSettings(output=GraphMode.GRAPHIC, test_split=True)\n",
"knn_settings = KNNSettings(output='graphical', test_split=True)\n",
"knn = KNN(knn_settings, data)\n",
"knn.train()"
]
Expand Down Expand Up @@ -16511,7 +16510,7 @@
"data = pca.rescaled_data\n",
"\n",
"# Perform KNN on the imported QEPAS data\n",
"knn_settings = KNNSettings(output=GraphMode.GRAPHIC, test_split=True)\n",
"knn_settings = KNNSettings(output='graphical', test_split=True)\n",
"knn = KNN(knn_settings, data)\n",
"knn.train()"
]
Expand Down Expand Up @@ -19803,7 +19802,7 @@
"# LLDF outer + PCA\n",
"\n",
"from chemfusekit.df import DFSettings, DF, Table\n",
"from chemfusekit.lr import LRSettings, LR, GraphMode\n",
"from chemfusekit.lr import LRSettings, LR\n",
"\n",
"# Let's import a table of QEPAS data (needs SNV preprocessing)\n",
"table1 = Table(\n",
Expand All @@ -19826,7 +19825,7 @@
"data = pca.rescaled_data\n",
"\n",
"# Perform KNN on the imported QEPAS data\n",
"knn_settings = KNNSettings(output=GraphMode.GRAPHIC, test_split=True)\n",
"knn_settings = KNNSettings(output='graphical', test_split=True)\n",
"knn = KNN(knn_settings, data)\n",
"knn.train()"
]
Expand Down Expand Up @@ -23107,7 +23106,7 @@
"# MLDF concat\n",
"\n",
"from chemfusekit.df import DFSettings, DF, Table\n",
"from chemfusekit.lr import LRSettings, LR, GraphMode\n",
"from chemfusekit.lr import LRSettings, LR\n",
"\n",
"# Let's import a table of QEPAS data (needs SNV preprocessing)\n",
"table1 = Table(\n",
Expand All @@ -23128,7 +23127,7 @@
"data = df.fused_data\n",
"\n",
"# Perform KNN on the imported QEPAS data\n",
"knn_settings = KNNSettings(output=GraphMode.GRAPHIC, test_split=True)\n",
"knn_settings = KNNSettings(output='graphical', test_split=True)\n",
"knn = KNN(knn_settings, data)\n",
"knn.train()"
]
Expand Down Expand Up @@ -26420,7 +26419,7 @@
"# MLDF outer\n",
"\n",
"from chemfusekit.df import DFSettings, DF, Table\n",
"from chemfusekit.lr import LRSettings, LR, GraphMode\n",
"from chemfusekit.lr import LRSettings, LR\n",
"\n",
"# Let's import a table of QEPAS data (needs SNV preprocessing)\n",
"table1 = Table(\n",
Expand All @@ -26441,7 +26440,7 @@
"data = df.fused_data\n",
"\n",
"# Perform KNN on the imported QEPAS data\n",
"knn_settings = KNNSettings(output=GraphMode.GRAPHIC, test_split=True)\n",
"knn_settings = KNNSettings(output='graphical', test_split=True)\n",
"knn = KNN(knn_settings, data)\n",
"knn.train()"
]
Expand All @@ -26456,7 +26455,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.12.3 ('.venv': venv)",
"display_name": "Python 3.10.14 ('.venv': venv)",
"language": "python",
"name": "python3"
},
Expand All @@ -26470,12 +26469,12 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.3"
"version": "3.10.14"
},
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "0adf20f4cd3c09df9458869b76345de81eb21527fdd82bbecfd21ff585123f63"
"hash": "81d8f80a3d553cdb5a29fb03d9deaaaac5f47c6ba9e68f5e3a3f03e89cd14d92"
}
}
},
Expand Down
Loading

0 comments on commit c084b78

Please sign in to comment.