Shivashankar commited on
Commit
fe69984
1 Parent(s): 2605465

Upload 7 files

Browse files
Files changed (7) hide show
  1. .gitignore +162 -0
  2. LICENSE +201 -0
  3. Makefile +39 -0
  4. README.md +22 -13
  5. notebook.ipynb +1135 -0
  6. requirements.txt +6 -0
  7. train.py +67 -0
.gitignore ADDED
@@ -0,0 +1,162 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+ .vscode
29
+ ./flagged
30
+
31
+ # PyInstaller
32
+ # Usually these files are written by a python script from a template
33
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
34
+ *.manifest
35
+ *.spec
36
+
37
+ # Installer logs
38
+ pip-log.txt
39
+ pip-delete-this-directory.txt
40
+
41
+ # Unit test / coverage reports
42
+ htmlcov/
43
+ .tox/
44
+ .nox/
45
+ .coverage
46
+ .coverage.*
47
+ .cache
48
+ nosetests.xml
49
+ coverage.xml
50
+ *.cover
51
+ *.py,cover
52
+ .hypothesis/
53
+ .pytest_cache/
54
+ cover/
55
+
56
+ # Translations
57
+ *.mo
58
+ *.pot
59
+
60
+ # Django stuff:
61
+ *.log
62
+ local_settings.py
63
+ db.sqlite3
64
+ db.sqlite3-journal
65
+
66
+ # Flask stuff:
67
+ instance/
68
+ .webassets-cache
69
+
70
+ # Scrapy stuff:
71
+ .scrapy
72
+
73
+ # Sphinx documentation
74
+ docs/_build/
75
+
76
+ # PyBuilder
77
+ .pybuilder/
78
+ target/
79
+
80
+ # Jupyter Notebook
81
+ .ipynb_checkpoints
82
+
83
+ # IPython
84
+ profile_default/
85
+ ipython_config.py
86
+
87
+ # pyenv
88
+ # For a library or package, you might want to ignore these files since the code is
89
+ # intended to run in multiple environments; otherwise, check them in:
90
+ # .python-version
91
+
92
+ # pipenv
93
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
94
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
95
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
96
+ # install all needed dependencies.
97
+ #Pipfile.lock
98
+
99
+ # poetry
100
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
101
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
102
+ # commonly ignored for libraries.
103
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
104
+ #poetry.lock
105
+
106
+ # pdm
107
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
108
+ #pdm.lock
109
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
110
+ # in version control.
111
+ # https://pdm.fming.dev/#use-with-ide
112
+ .pdm.toml
113
+
114
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
115
+ __pypackages__/
116
+
117
+ # Celery stuff
118
+ celerybeat-schedule
119
+ celerybeat.pid
120
+
121
+ # SageMath parsed files
122
+ *.sage.py
123
+
124
+ # Environments
125
+ .env
126
+ .venv
127
+ env/
128
+ venv/
129
+ ENV/
130
+ env.bak/
131
+ venv.bak/
132
+
133
+ # Spyder project settings
134
+ .spyderproject
135
+ .spyproject
136
+
137
+ # Rope project settings
138
+ .ropeproject
139
+
140
+ # mkdocs documentation
141
+ /site
142
+
143
+ # mypy
144
+ .mypy_cache/
145
+ .dmypy.json
146
+ dmypy.json
147
+
148
+ # Pyre type checker
149
+ .pyre/
150
+
151
+ # pytype static type analyzer
152
+ .pytype/
153
+
154
+ # Cython debug symbols
155
+ cython_debug/
156
+
157
+ # PyCharm
158
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
159
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
160
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
161
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
162
+ #.idea/
LICENSE ADDED
@@ -0,0 +1,201 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
Makefile ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ install:
2
+ pip install --upgrade pip &&\
3
+ pip install -r requirements.txt
4
+
5
+ format:
6
+ black *.py
7
+
8
+ train:
9
+ python train.py
10
+
11
+ eval:
12
+ echo "## Model Metrics" > report.md
13
+ cat ./Results/metrics.txt >> report.md
14
+
15
+ echo '\n## Confusion Matrix Plot' >> report.md
16
+ echo '![Confusion Matrix](./Results/model_results.png)' >> report.md
17
+
18
+ cml comment create report.md
19
+
20
+ update-branch:
21
+ git config --global user.name $(USER_NAME)
22
+ git config --global user.email $(USER_EMAIL)
23
+ git commit -am "Update with new results"
24
+ git push --force origin HEAD:update
25
+
26
+ hf-login:
27
+ pip install -U "huggingface_hub[cli]"
28
+ git pull origin update
29
+ git switch update
30
+ huggingface-cli login --token $(HF) --add-to-git-credential
31
+
32
+ push-hub:
33
+ huggingface-cli upload kingabzpro/Drug-Classification ./App --repo-type=space --commit-message="Sync App files"
34
+ huggingface-cli upload kingabzpro/Drug-Classification ./Model /Model --repo-type=space --commit-message="Sync Model"
35
+ huggingface-cli upload kingabzpro/Drug-Classification ./Results /Metrics --repo-type=space --commit-message="Sync Model"
36
+
37
+ deploy: hf-login push-hub
38
+
39
+ all: install format train eval update-branch deploy
README.md CHANGED
@@ -1,13 +1,22 @@
1
- ---
2
- title: Drug Classification
3
- emoji: 🐢
4
- colorFrom: yellow
5
- colorTo: pink
6
- sdk: gradio
7
- sdk_version: 4.26.0
8
- app_file: app.py
9
- pinned: false
10
- license: apache-2.0
11
- ---
12
-
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
1
+ # CICD-for-Machine-Learning
2
+
3
+ Learn how to automate model training, evaluation, versioning, and deployment using GitHub Actions with the easiest MLOps guide available online.
4
+
5
+ ## Project Description
6
+ In this project, we will be using scikit-learn pipelines to train our random forest algorithm and build a drug classifier. After training, we will automate the evaluation process using CML. Finally, we will build and deploy the web application to Hugging Face Hub.
7
+
8
+ From training to evaluation, the entire process will be automated using GitHub actions. All you have to do is push the code to your GitHub repository, and within two minutes, the model will be updated on Hugging Face with the updated app, model, and results.
9
+
10
+
11
+
12
+ ## Pipeline
13
+
14
+
15
+ ![CICD](./asset/CICD-pipeline.png)
16
+
17
+ ## Results
18
+ | Model | Accuracy | F1 Score |
19
+ |------------------------|----------|----------|
20
+ | RandomForestClassifier | 97.0% | 94.0% |
21
+
22
+ ![CM](./Results/model_results.png)
notebook.ipynb ADDED
@@ -0,0 +1,1135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 1,
6
+ "metadata": {},
7
+ "outputs": [
8
+ {
9
+ "data": {
10
+ "text/html": [
11
+ "<div>\n",
12
+ "<style scoped>\n",
13
+ " .dataframe tbody tr th:only-of-type {\n",
14
+ " vertical-align: middle;\n",
15
+ " }\n",
16
+ "\n",
17
+ " .dataframe tbody tr th {\n",
18
+ " vertical-align: top;\n",
19
+ " }\n",
20
+ "\n",
21
+ " .dataframe thead th {\n",
22
+ " text-align: right;\n",
23
+ " }\n",
24
+ "</style>\n",
25
+ "<table border=\"1\" class=\"dataframe\">\n",
26
+ " <thead>\n",
27
+ " <tr style=\"text-align: right;\">\n",
28
+ " <th></th>\n",
29
+ " <th>Age</th>\n",
30
+ " <th>Sex</th>\n",
31
+ " <th>BP</th>\n",
32
+ " <th>Cholesterol</th>\n",
33
+ " <th>Na_to_K</th>\n",
34
+ " <th>Drug</th>\n",
35
+ " </tr>\n",
36
+ " </thead>\n",
37
+ " <tbody>\n",
38
+ " <tr>\n",
39
+ " <th>176</th>\n",
40
+ " <td>48</td>\n",
41
+ " <td>M</td>\n",
42
+ " <td>HIGH</td>\n",
43
+ " <td>NORMAL</td>\n",
44
+ " <td>10.446</td>\n",
45
+ " <td>drugA</td>\n",
46
+ " </tr>\n",
47
+ " <tr>\n",
48
+ " <th>119</th>\n",
49
+ " <td>61</td>\n",
50
+ " <td>F</td>\n",
51
+ " <td>HIGH</td>\n",
52
+ " <td>HIGH</td>\n",
53
+ " <td>25.475</td>\n",
54
+ " <td>DrugY</td>\n",
55
+ " </tr>\n",
56
+ " <tr>\n",
57
+ " <th>65</th>\n",
58
+ " <td>68</td>\n",
59
+ " <td>F</td>\n",
60
+ " <td>NORMAL</td>\n",
61
+ " <td>NORMAL</td>\n",
62
+ " <td>27.050</td>\n",
63
+ " <td>DrugY</td>\n",
64
+ " </tr>\n",
65
+ " </tbody>\n",
66
+ "</table>\n",
67
+ "</div>"
68
+ ],
69
+ "text/plain": [
70
+ " Age Sex BP Cholesterol Na_to_K Drug\n",
71
+ "176 48 M HIGH NORMAL 10.446 drugA\n",
72
+ "119 61 F HIGH HIGH 25.475 DrugY\n",
73
+ "65 68 F NORMAL NORMAL 27.050 DrugY"
74
+ ]
75
+ },
76
+ "execution_count": 1,
77
+ "metadata": {},
78
+ "output_type": "execute_result"
79
+ }
80
+ ],
81
+ "source": [
82
+ "import pandas as pd\n",
83
+ "\n",
84
+ "drug_df = pd.read_csv(\"Data/drug.csv\")\n",
85
+ "drug_df = drug_df.sample(frac=1)\n",
86
+ "drug_df.head(3)"
87
+ ]
88
+ },
89
+ {
90
+ "cell_type": "code",
91
+ "execution_count": 2,
92
+ "metadata": {},
93
+ "outputs": [],
94
+ "source": [
95
+ "from sklearn.model_selection import train_test_split\n",
96
+ "\n",
97
+ "X = drug_df.drop(\"Drug\", axis=1).values\n",
98
+ "y = drug_df.Drug.values\n",
99
+ "\n",
100
+ "X_train, X_test, y_train, y_test = train_test_split(\n",
101
+ " X, y, test_size=0.3, random_state=125\n",
102
+ ")"
103
+ ]
104
+ },
105
+ {
106
+ "cell_type": "code",
107
+ "execution_count": 3,
108
+ "metadata": {},
109
+ "outputs": [
110
+ {
111
+ "data": {
112
+ "text/html": [
113
+ "<style>#sk-container-id-1 {\n",
114
+ " /* Definition of color scheme common for light and dark mode */\n",
115
+ " --sklearn-color-text: black;\n",
116
+ " --sklearn-color-line: gray;\n",
117
+ " /* Definition of color scheme for unfitted estimators */\n",
118
+ " --sklearn-color-unfitted-level-0: #fff5e6;\n",
119
+ " --sklearn-color-unfitted-level-1: #f6e4d2;\n",
120
+ " --sklearn-color-unfitted-level-2: #ffe0b3;\n",
121
+ " --sklearn-color-unfitted-level-3: chocolate;\n",
122
+ " /* Definition of color scheme for fitted estimators */\n",
123
+ " --sklearn-color-fitted-level-0: #f0f8ff;\n",
124
+ " --sklearn-color-fitted-level-1: #d4ebff;\n",
125
+ " --sklearn-color-fitted-level-2: #b3dbfd;\n",
126
+ " --sklearn-color-fitted-level-3: cornflowerblue;\n",
127
+ "\n",
128
+ " /* Specific color for light theme */\n",
129
+ " --sklearn-color-text-on-default-background: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, black)));\n",
130
+ " --sklearn-color-background: var(--sg-background-color, var(--theme-background, var(--jp-layout-color0, white)));\n",
131
+ " --sklearn-color-border-box: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, black)));\n",
132
+ " --sklearn-color-icon: #696969;\n",
133
+ "\n",
134
+ " @media (prefers-color-scheme: dark) {\n",
135
+ " /* Redefinition of color scheme for dark theme */\n",
136
+ " --sklearn-color-text-on-default-background: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, white)));\n",
137
+ " --sklearn-color-background: var(--sg-background-color, var(--theme-background, var(--jp-layout-color0, #111)));\n",
138
+ " --sklearn-color-border-box: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, white)));\n",
139
+ " --sklearn-color-icon: #878787;\n",
140
+ " }\n",
141
+ "}\n",
142
+ "\n",
143
+ "#sk-container-id-1 {\n",
144
+ " color: var(--sklearn-color-text);\n",
145
+ "}\n",
146
+ "\n",
147
+ "#sk-container-id-1 pre {\n",
148
+ " padding: 0;\n",
149
+ "}\n",
150
+ "\n",
151
+ "#sk-container-id-1 input.sk-hidden--visually {\n",
152
+ " border: 0;\n",
153
+ " clip: rect(1px 1px 1px 1px);\n",
154
+ " clip: rect(1px, 1px, 1px, 1px);\n",
155
+ " height: 1px;\n",
156
+ " margin: -1px;\n",
157
+ " overflow: hidden;\n",
158
+ " padding: 0;\n",
159
+ " position: absolute;\n",
160
+ " width: 1px;\n",
161
+ "}\n",
162
+ "\n",
163
+ "#sk-container-id-1 div.sk-dashed-wrapped {\n",
164
+ " border: 1px dashed var(--sklearn-color-line);\n",
165
+ " margin: 0 0.4em 0.5em 0.4em;\n",
166
+ " box-sizing: border-box;\n",
167
+ " padding-bottom: 0.4em;\n",
168
+ " background-color: var(--sklearn-color-background);\n",
169
+ "}\n",
170
+ "\n",
171
+ "#sk-container-id-1 div.sk-container {\n",
172
+ " /* jupyter's `normalize.less` sets `[hidden] { display: none; }`\n",
173
+ " but bootstrap.min.css set `[hidden] { display: none !important; }`\n",
174
+ " so we also need the `!important` here to be able to override the\n",
175
+ " default hidden behavior on the sphinx rendered scikit-learn.org.\n",
176
+ " See: https://github.com/scikit-learn/scikit-learn/issues/21755 */\n",
177
+ " display: inline-block !important;\n",
178
+ " position: relative;\n",
179
+ "}\n",
180
+ "\n",
181
+ "#sk-container-id-1 div.sk-text-repr-fallback {\n",
182
+ " display: none;\n",
183
+ "}\n",
184
+ "\n",
185
+ "div.sk-parallel-item,\n",
186
+ "div.sk-serial,\n",
187
+ "div.sk-item {\n",
188
+ " /* draw centered vertical line to link estimators */\n",
189
+ " background-image: linear-gradient(var(--sklearn-color-text-on-default-background), var(--sklearn-color-text-on-default-background));\n",
190
+ " background-size: 2px 100%;\n",
191
+ " background-repeat: no-repeat;\n",
192
+ " background-position: center center;\n",
193
+ "}\n",
194
+ "\n",
195
+ "/* Parallel-specific style estimator block */\n",
196
+ "\n",
197
+ "#sk-container-id-1 div.sk-parallel-item::after {\n",
198
+ " content: \"\";\n",
199
+ " width: 100%;\n",
200
+ " border-bottom: 2px solid var(--sklearn-color-text-on-default-background);\n",
201
+ " flex-grow: 1;\n",
202
+ "}\n",
203
+ "\n",
204
+ "#sk-container-id-1 div.sk-parallel {\n",
205
+ " display: flex;\n",
206
+ " align-items: stretch;\n",
207
+ " justify-content: center;\n",
208
+ " background-color: var(--sklearn-color-background);\n",
209
+ " position: relative;\n",
210
+ "}\n",
211
+ "\n",
212
+ "#sk-container-id-1 div.sk-parallel-item {\n",
213
+ " display: flex;\n",
214
+ " flex-direction: column;\n",
215
+ "}\n",
216
+ "\n",
217
+ "#sk-container-id-1 div.sk-parallel-item:first-child::after {\n",
218
+ " align-self: flex-end;\n",
219
+ " width: 50%;\n",
220
+ "}\n",
221
+ "\n",
222
+ "#sk-container-id-1 div.sk-parallel-item:last-child::after {\n",
223
+ " align-self: flex-start;\n",
224
+ " width: 50%;\n",
225
+ "}\n",
226
+ "\n",
227
+ "#sk-container-id-1 div.sk-parallel-item:only-child::after {\n",
228
+ " width: 0;\n",
229
+ "}\n",
230
+ "\n",
231
+ "/* Serial-specific style estimator block */\n",
232
+ "\n",
233
+ "#sk-container-id-1 div.sk-serial {\n",
234
+ " display: flex;\n",
235
+ " flex-direction: column;\n",
236
+ " align-items: center;\n",
237
+ " background-color: var(--sklearn-color-background);\n",
238
+ " padding-right: 1em;\n",
239
+ " padding-left: 1em;\n",
240
+ "}\n",
241
+ "\n",
242
+ "\n",
243
+ "/* Toggleable style: style used for estimator/Pipeline/ColumnTransformer box that is\n",
244
+ "clickable and can be expanded/collapsed.\n",
245
+ "- Pipeline and ColumnTransformer use this feature and define the default style\n",
246
+ "- Estimators will overwrite some part of the style using the `sk-estimator` class\n",
247
+ "*/\n",
248
+ "\n",
249
+ "/* Pipeline and ColumnTransformer style (default) */\n",
250
+ "\n",
251
+ "#sk-container-id-1 div.sk-toggleable {\n",
252
+ " /* Default theme specific background. It is overwritten whether we have a\n",
253
+ " specific estimator or a Pipeline/ColumnTransformer */\n",
254
+ " background-color: var(--sklearn-color-background);\n",
255
+ "}\n",
256
+ "\n",
257
+ "/* Toggleable label */\n",
258
+ "#sk-container-id-1 label.sk-toggleable__label {\n",
259
+ " cursor: pointer;\n",
260
+ " display: block;\n",
261
+ " width: 100%;\n",
262
+ " margin-bottom: 0;\n",
263
+ " padding: 0.5em;\n",
264
+ " box-sizing: border-box;\n",
265
+ " text-align: center;\n",
266
+ "}\n",
267
+ "\n",
268
+ "#sk-container-id-1 label.sk-toggleable__label-arrow:before {\n",
269
+ " /* Arrow on the left of the label */\n",
270
+ " content: \"▸\";\n",
271
+ " float: left;\n",
272
+ " margin-right: 0.25em;\n",
273
+ " color: var(--sklearn-color-icon);\n",
274
+ "}\n",
275
+ "\n",
276
+ "#sk-container-id-1 label.sk-toggleable__label-arrow:hover:before {\n",
277
+ " color: var(--sklearn-color-text);\n",
278
+ "}\n",
279
+ "\n",
280
+ "/* Toggleable content - dropdown */\n",
281
+ "\n",
282
+ "#sk-container-id-1 div.sk-toggleable__content {\n",
283
+ " max-height: 0;\n",
284
+ " max-width: 0;\n",
285
+ " overflow: hidden;\n",
286
+ " text-align: left;\n",
287
+ " /* unfitted */\n",
288
+ " background-color: var(--sklearn-color-unfitted-level-0);\n",
289
+ "}\n",
290
+ "\n",
291
+ "#sk-container-id-1 div.sk-toggleable__content.fitted {\n",
292
+ " /* fitted */\n",
293
+ " background-color: var(--sklearn-color-fitted-level-0);\n",
294
+ "}\n",
295
+ "\n",
296
+ "#sk-container-id-1 div.sk-toggleable__content pre {\n",
297
+ " margin: 0.2em;\n",
298
+ " border-radius: 0.25em;\n",
299
+ " color: var(--sklearn-color-text);\n",
300
+ " /* unfitted */\n",
301
+ " background-color: var(--sklearn-color-unfitted-level-0);\n",
302
+ "}\n",
303
+ "\n",
304
+ "#sk-container-id-1 div.sk-toggleable__content.fitted pre {\n",
305
+ " /* unfitted */\n",
306
+ " background-color: var(--sklearn-color-fitted-level-0);\n",
307
+ "}\n",
308
+ "\n",
309
+ "#sk-container-id-1 input.sk-toggleable__control:checked~div.sk-toggleable__content {\n",
310
+ " /* Expand drop-down */\n",
311
+ " max-height: 200px;\n",
312
+ " max-width: 100%;\n",
313
+ " overflow: auto;\n",
314
+ "}\n",
315
+ "\n",
316
+ "#sk-container-id-1 input.sk-toggleable__control:checked~label.sk-toggleable__label-arrow:before {\n",
317
+ " content: \"▾\";\n",
318
+ "}\n",
319
+ "\n",
320
+ "/* Pipeline/ColumnTransformer-specific style */\n",
321
+ "\n",
322
+ "#sk-container-id-1 div.sk-label input.sk-toggleable__control:checked~label.sk-toggleable__label {\n",
323
+ " color: var(--sklearn-color-text);\n",
324
+ " background-color: var(--sklearn-color-unfitted-level-2);\n",
325
+ "}\n",
326
+ "\n",
327
+ "#sk-container-id-1 div.sk-label.fitted input.sk-toggleable__control:checked~label.sk-toggleable__label {\n",
328
+ " background-color: var(--sklearn-color-fitted-level-2);\n",
329
+ "}\n",
330
+ "\n",
331
+ "/* Estimator-specific style */\n",
332
+ "\n",
333
+ "/* Colorize estimator box */\n",
334
+ "#sk-container-id-1 div.sk-estimator input.sk-toggleable__control:checked~label.sk-toggleable__label {\n",
335
+ " /* unfitted */\n",
336
+ " background-color: var(--sklearn-color-unfitted-level-2);\n",
337
+ "}\n",
338
+ "\n",
339
+ "#sk-container-id-1 div.sk-estimator.fitted input.sk-toggleable__control:checked~label.sk-toggleable__label {\n",
340
+ " /* fitted */\n",
341
+ " background-color: var(--sklearn-color-fitted-level-2);\n",
342
+ "}\n",
343
+ "\n",
344
+ "#sk-container-id-1 div.sk-label label.sk-toggleable__label,\n",
345
+ "#sk-container-id-1 div.sk-label label {\n",
346
+ " /* The background is the default theme color */\n",
347
+ " color: var(--sklearn-color-text-on-default-background);\n",
348
+ "}\n",
349
+ "\n",
350
+ "/* On hover, darken the color of the background */\n",
351
+ "#sk-container-id-1 div.sk-label:hover label.sk-toggleable__label {\n",
352
+ " color: var(--sklearn-color-text);\n",
353
+ " background-color: var(--sklearn-color-unfitted-level-2);\n",
354
+ "}\n",
355
+ "\n",
356
+ "/* Label box, darken color on hover, fitted */\n",
357
+ "#sk-container-id-1 div.sk-label.fitted:hover label.sk-toggleable__label.fitted {\n",
358
+ " color: var(--sklearn-color-text);\n",
359
+ " background-color: var(--sklearn-color-fitted-level-2);\n",
360
+ "}\n",
361
+ "\n",
362
+ "/* Estimator label */\n",
363
+ "\n",
364
+ "#sk-container-id-1 div.sk-label label {\n",
365
+ " font-family: monospace;\n",
366
+ " font-weight: bold;\n",
367
+ " display: inline-block;\n",
368
+ " line-height: 1.2em;\n",
369
+ "}\n",
370
+ "\n",
371
+ "#sk-container-id-1 div.sk-label-container {\n",
372
+ " text-align: center;\n",
373
+ "}\n",
374
+ "\n",
375
+ "/* Estimator-specific */\n",
376
+ "#sk-container-id-1 div.sk-estimator {\n",
377
+ " font-family: monospace;\n",
378
+ " border: 1px dotted var(--sklearn-color-border-box);\n",
379
+ " border-radius: 0.25em;\n",
380
+ " box-sizing: border-box;\n",
381
+ " margin-bottom: 0.5em;\n",
382
+ " /* unfitted */\n",
383
+ " background-color: var(--sklearn-color-unfitted-level-0);\n",
384
+ "}\n",
385
+ "\n",
386
+ "#sk-container-id-1 div.sk-estimator.fitted {\n",
387
+ " /* fitted */\n",
388
+ " background-color: var(--sklearn-color-fitted-level-0);\n",
389
+ "}\n",
390
+ "\n",
391
+ "/* on hover */\n",
392
+ "#sk-container-id-1 div.sk-estimator:hover {\n",
393
+ " /* unfitted */\n",
394
+ " background-color: var(--sklearn-color-unfitted-level-2);\n",
395
+ "}\n",
396
+ "\n",
397
+ "#sk-container-id-1 div.sk-estimator.fitted:hover {\n",
398
+ " /* fitted */\n",
399
+ " background-color: var(--sklearn-color-fitted-level-2);\n",
400
+ "}\n",
401
+ "\n",
402
+ "/* Specification for estimator info (e.g. \"i\" and \"?\") */\n",
403
+ "\n",
404
+ "/* Common style for \"i\" and \"?\" */\n",
405
+ "\n",
406
+ ".sk-estimator-doc-link,\n",
407
+ "a:link.sk-estimator-doc-link,\n",
408
+ "a:visited.sk-estimator-doc-link {\n",
409
+ " float: right;\n",
410
+ " font-size: smaller;\n",
411
+ " line-height: 1em;\n",
412
+ " font-family: monospace;\n",
413
+ " background-color: var(--sklearn-color-background);\n",
414
+ " border-radius: 1em;\n",
415
+ " height: 1em;\n",
416
+ " width: 1em;\n",
417
+ " text-decoration: none !important;\n",
418
+ " margin-left: 1ex;\n",
419
+ " /* unfitted */\n",
420
+ " border: var(--sklearn-color-unfitted-level-1) 1pt solid;\n",
421
+ " color: var(--sklearn-color-unfitted-level-1);\n",
422
+ "}\n",
423
+ "\n",
424
+ ".sk-estimator-doc-link.fitted,\n",
425
+ "a:link.sk-estimator-doc-link.fitted,\n",
426
+ "a:visited.sk-estimator-doc-link.fitted {\n",
427
+ " /* fitted */\n",
428
+ " border: var(--sklearn-color-fitted-level-1) 1pt solid;\n",
429
+ " color: var(--sklearn-color-fitted-level-1);\n",
430
+ "}\n",
431
+ "\n",
432
+ "/* On hover */\n",
433
+ "div.sk-estimator:hover .sk-estimator-doc-link:hover,\n",
434
+ ".sk-estimator-doc-link:hover,\n",
435
+ "div.sk-label-container:hover .sk-estimator-doc-link:hover,\n",
436
+ ".sk-estimator-doc-link:hover {\n",
437
+ " /* unfitted */\n",
438
+ " background-color: var(--sklearn-color-unfitted-level-3);\n",
439
+ " color: var(--sklearn-color-background);\n",
440
+ " text-decoration: none;\n",
441
+ "}\n",
442
+ "\n",
443
+ "div.sk-estimator.fitted:hover .sk-estimator-doc-link.fitted:hover,\n",
444
+ ".sk-estimator-doc-link.fitted:hover,\n",
445
+ "div.sk-label-container:hover .sk-estimator-doc-link.fitted:hover,\n",
446
+ ".sk-estimator-doc-link.fitted:hover {\n",
447
+ " /* fitted */\n",
448
+ " background-color: var(--sklearn-color-fitted-level-3);\n",
449
+ " color: var(--sklearn-color-background);\n",
450
+ " text-decoration: none;\n",
451
+ "}\n",
452
+ "\n",
453
+ "/* Span, style for the box shown on hovering the info icon */\n",
454
+ ".sk-estimator-doc-link span {\n",
455
+ " display: none;\n",
456
+ " z-index: 9999;\n",
457
+ " position: relative;\n",
458
+ " font-weight: normal;\n",
459
+ " right: .2ex;\n",
460
+ " padding: .5ex;\n",
461
+ " margin: .5ex;\n",
462
+ " width: min-content;\n",
463
+ " min-width: 20ex;\n",
464
+ " max-width: 50ex;\n",
465
+ " color: var(--sklearn-color-text);\n",
466
+ " box-shadow: 2pt 2pt 4pt #999;\n",
467
+ " /* unfitted */\n",
468
+ " background: var(--sklearn-color-unfitted-level-0);\n",
469
+ " border: .5pt solid var(--sklearn-color-unfitted-level-3);\n",
470
+ "}\n",
471
+ "\n",
472
+ ".sk-estimator-doc-link.fitted span {\n",
473
+ " /* fitted */\n",
474
+ " background: var(--sklearn-color-fitted-level-0);\n",
475
+ " border: var(--sklearn-color-fitted-level-3);\n",
476
+ "}\n",
477
+ "\n",
478
+ ".sk-estimator-doc-link:hover span {\n",
479
+ " display: block;\n",
480
+ "}\n",
481
+ "\n",
482
+ "/* \"?\"-specific style due to the `<a>` HTML tag */\n",
483
+ "\n",
484
+ "#sk-container-id-1 a.estimator_doc_link {\n",
485
+ " float: right;\n",
486
+ " font-size: 1rem;\n",
487
+ " line-height: 1em;\n",
488
+ " font-family: monospace;\n",
489
+ " background-color: var(--sklearn-color-background);\n",
490
+ " border-radius: 1rem;\n",
491
+ " height: 1rem;\n",
492
+ " width: 1rem;\n",
493
+ " text-decoration: none;\n",
494
+ " /* unfitted */\n",
495
+ " color: var(--sklearn-color-unfitted-level-1);\n",
496
+ " border: var(--sklearn-color-unfitted-level-1) 1pt solid;\n",
497
+ "}\n",
498
+ "\n",
499
+ "#sk-container-id-1 a.estimator_doc_link.fitted {\n",
500
+ " /* fitted */\n",
501
+ " border: var(--sklearn-color-fitted-level-1) 1pt solid;\n",
502
+ " color: var(--sklearn-color-fitted-level-1);\n",
503
+ "}\n",
504
+ "\n",
505
+ "/* On hover */\n",
506
+ "#sk-container-id-1 a.estimator_doc_link:hover {\n",
507
+ " /* unfitted */\n",
508
+ " background-color: var(--sklearn-color-unfitted-level-3);\n",
509
+ " color: var(--sklearn-color-background);\n",
510
+ " text-decoration: none;\n",
511
+ "}\n",
512
+ "\n",
513
+ "#sk-container-id-1 a.estimator_doc_link.fitted:hover {\n",
514
+ " /* fitted */\n",
515
+ " background-color: var(--sklearn-color-fitted-level-3);\n",
516
+ "}\n",
517
+ "</style><div id=\"sk-container-id-1\" class=\"sk-top-container\"><div class=\"sk-text-repr-fallback\"><pre>Pipeline(steps=[(&#x27;preprocessing&#x27;,\n",
518
+ " ColumnTransformer(transformers=[(&#x27;encoder&#x27;, OrdinalEncoder(),\n",
519
+ " [1, 2, 3]),\n",
520
+ " (&#x27;num_imputer&#x27;,\n",
521
+ " SimpleImputer(strategy=&#x27;median&#x27;),\n",
522
+ " [0, 4]),\n",
523
+ " (&#x27;num_scaler&#x27;,\n",
524
+ " StandardScaler(), [0, 4])])),\n",
525
+ " (&#x27;model&#x27;,\n",
526
+ " RandomForestClassifier(n_estimators=10, random_state=125))])</pre><b>In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook. <br />On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.</b></div><div class=\"sk-container\" hidden><div class=\"sk-item sk-dashed-wrapped\"><div class=\"sk-label-container\"><div class=\"sk-label fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-1\" type=\"checkbox\" ><label for=\"sk-estimator-id-1\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">&nbsp;&nbsp;Pipeline<a class=\"sk-estimator-doc-link fitted\" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.pipeline.Pipeline.html\">?<span>Documentation for Pipeline</span></a><span class=\"sk-estimator-doc-link fitted\">i<span>Fitted</span></span></label><div class=\"sk-toggleable__content fitted\"><pre>Pipeline(steps=[(&#x27;preprocessing&#x27;,\n",
527
+ " ColumnTransformer(transformers=[(&#x27;encoder&#x27;, OrdinalEncoder(),\n",
528
+ " [1, 2, 3]),\n",
529
+ " (&#x27;num_imputer&#x27;,\n",
530
+ " SimpleImputer(strategy=&#x27;median&#x27;),\n",
531
+ " [0, 4]),\n",
532
+ " (&#x27;num_scaler&#x27;,\n",
533
+ " StandardScaler(), [0, 4])])),\n",
534
+ " (&#x27;model&#x27;,\n",
535
+ " RandomForestClassifier(n_estimators=10, random_state=125))])</pre></div> </div></div><div class=\"sk-serial\"><div class=\"sk-item sk-dashed-wrapped\"><div class=\"sk-label-container\"><div class=\"sk-label fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-2\" type=\"checkbox\" ><label for=\"sk-estimator-id-2\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">&nbsp;preprocessing: ColumnTransformer<a class=\"sk-estimator-doc-link fitted\" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.compose.ColumnTransformer.html\">?<span>Documentation for preprocessing: ColumnTransformer</span></a></label><div class=\"sk-toggleable__content fitted\"><pre>ColumnTransformer(transformers=[(&#x27;encoder&#x27;, OrdinalEncoder(), [1, 2, 3]),\n",
536
+ " (&#x27;num_imputer&#x27;,\n",
537
+ " SimpleImputer(strategy=&#x27;median&#x27;), [0, 4]),\n",
538
+ " (&#x27;num_scaler&#x27;, StandardScaler(), [0, 4])])</pre></div> </div></div><div class=\"sk-parallel\"><div class=\"sk-parallel-item\"><div class=\"sk-item\"><div class=\"sk-label-container\"><div class=\"sk-label fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-3\" type=\"checkbox\" ><label for=\"sk-estimator-id-3\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">encoder</label><div class=\"sk-toggleable__content fitted\"><pre>[1, 2, 3]</pre></div> </div></div><div class=\"sk-serial\"><div class=\"sk-item\"><div class=\"sk-estimator fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-4\" type=\"checkbox\" ><label for=\"sk-estimator-id-4\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">&nbsp;OrdinalEncoder<a class=\"sk-estimator-doc-link fitted\" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.preprocessing.OrdinalEncoder.html\">?<span>Documentation for OrdinalEncoder</span></a></label><div class=\"sk-toggleable__content fitted\"><pre>OrdinalEncoder()</pre></div> </div></div></div></div></div><div class=\"sk-parallel-item\"><div class=\"sk-item\"><div class=\"sk-label-container\"><div class=\"sk-label fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-5\" type=\"checkbox\" ><label for=\"sk-estimator-id-5\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">num_imputer</label><div class=\"sk-toggleable__content fitted\"><pre>[0, 4]</pre></div> </div></div><div class=\"sk-serial\"><div class=\"sk-item\"><div class=\"sk-estimator fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-6\" type=\"checkbox\" ><label for=\"sk-estimator-id-6\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">&nbsp;SimpleImputer<a class=\"sk-estimator-doc-link fitted\" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.impute.SimpleImputer.html\">?<span>Documentation for SimpleImputer</span></a></label><div class=\"sk-toggleable__content fitted\"><pre>SimpleImputer(strategy=&#x27;median&#x27;)</pre></div> </div></div></div></div></div><div class=\"sk-parallel-item\"><div class=\"sk-item\"><div class=\"sk-label-container\"><div class=\"sk-label fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-7\" type=\"checkbox\" ><label for=\"sk-estimator-id-7\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">num_scaler</label><div class=\"sk-toggleable__content fitted\"><pre>[0, 4]</pre></div> </div></div><div class=\"sk-serial\"><div class=\"sk-item\"><div class=\"sk-estimator fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-8\" type=\"checkbox\" ><label for=\"sk-estimator-id-8\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">&nbsp;StandardScaler<a class=\"sk-estimator-doc-link fitted\" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.preprocessing.StandardScaler.html\">?<span>Documentation for StandardScaler</span></a></label><div class=\"sk-toggleable__content fitted\"><pre>StandardScaler()</pre></div> </div></div></div></div></div></div></div><div class=\"sk-item\"><div class=\"sk-estimator fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-9\" type=\"checkbox\" ><label for=\"sk-estimator-id-9\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">&nbsp;RandomForestClassifier<a class=\"sk-estimator-doc-link fitted\" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.ensemble.RandomForestClassifier.html\">?<span>Documentation for RandomForestClassifier</span></a></label><div class=\"sk-toggleable__content fitted\"><pre>RandomForestClassifier(n_estimators=10, random_state=125)</pre></div> </div></div></div></div></div></div>"
539
+ ],
540
+ "text/plain": [
541
+ "Pipeline(steps=[('preprocessing',\n",
542
+ " ColumnTransformer(transformers=[('encoder', OrdinalEncoder(),\n",
543
+ " [1, 2, 3]),\n",
544
+ " ('num_imputer',\n",
545
+ " SimpleImputer(strategy='median'),\n",
546
+ " [0, 4]),\n",
547
+ " ('num_scaler',\n",
548
+ " StandardScaler(), [0, 4])])),\n",
549
+ " ('model',\n",
550
+ " RandomForestClassifier(n_estimators=10, random_state=125))])"
551
+ ]
552
+ },
553
+ "execution_count": 3,
554
+ "metadata": {},
555
+ "output_type": "execute_result"
556
+ }
557
+ ],
558
+ "source": [
559
+ "from sklearn.compose import ColumnTransformer\n",
560
+ "from sklearn.ensemble import RandomForestClassifier\n",
561
+ "from sklearn.impute import SimpleImputer\n",
562
+ "from sklearn.pipeline import Pipeline\n",
563
+ "from sklearn.preprocessing import OrdinalEncoder, StandardScaler\n",
564
+ "\n",
565
+ "cat_col = [1,2,3]\n",
566
+ "num_col = [0,4]\n",
567
+ "\n",
568
+ "transform = ColumnTransformer(\n",
569
+ " [\n",
570
+ " (\"encoder\", OrdinalEncoder(), cat_col),\n",
571
+ " (\"num_imputer\", SimpleImputer(strategy=\"median\"), num_col),\n",
572
+ " (\"num_scaler\", StandardScaler(), num_col),\n",
573
+ " ]\n",
574
+ ")\n",
575
+ "pipe = Pipeline(\n",
576
+ " steps=[\n",
577
+ " (\"preprocessing\", transform),\n",
578
+ " (\"model\", RandomForestClassifier(n_estimators=10, random_state=125)),\n",
579
+ " ]\n",
580
+ ")\n",
581
+ "pipe.fit(X_train, y_train)"
582
+ ]
583
+ },
584
+ {
585
+ "cell_type": "code",
586
+ "execution_count": 4,
587
+ "metadata": {},
588
+ "outputs": [
589
+ {
590
+ "name": "stdout",
591
+ "output_type": "stream",
592
+ "text": [
593
+ "Accuracy: 90.0% F1: 0.85\n"
594
+ ]
595
+ }
596
+ ],
597
+ "source": [
598
+ "from sklearn.metrics import accuracy_score, f1_score\n",
599
+ "\n",
600
+ "predictions = pipe.predict(X_test)\n",
601
+ "accuracy = accuracy_score(y_test, predictions)\n",
602
+ "f1 = f1_score(y_test, predictions, average=\"macro\")\n",
603
+ "\n",
604
+ "print(\"Accuracy: \", str(round(accuracy, 2) * 100) + \"%\", \"F1: \", round(f1, 2))"
605
+ ]
606
+ },
607
+ {
608
+ "cell_type": "code",
609
+ "execution_count": 5,
610
+ "metadata": {},
611
+ "outputs": [],
612
+ "source": [
613
+ "# Write metrics to file\n",
614
+ "with open(\"Results/metrics.txt\", \"w\") as outfile:\n",
615
+ " outfile.write(f\"\\nAccuracy = {round(accuracy,2)}, F1 Score = {round(f1,2)}.\")"
616
+ ]
617
+ },
618
+ {
619
+ "cell_type": "code",
620
+ "execution_count": 6,
621
+ "metadata": {},
622
+ "outputs": [
623
+ {
624
+ "data": {
625
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAhQAAAGwCAYAAADxH/yAAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAA9hAAAPYQGoP6dpAABPoUlEQVR4nO3deXxM9/4/8NckGZNtspENqS0EtQuqWkIb5NbW9mv5qYuWqKWWWtra4zak1rq4pXVJohelLdqqvUQXJaSCVsQaQkOC7JFt5vP7I83UCDHjzMyZjNfz8TiPh/nMOZ95n7eRvH0+n3OOQgghQERERCSBndwBEBERUdXHgoKIiIgkY0FBREREkrGgICIiIslYUBAREZFkLCiIiIhIMhYUREREJJmD3AHYAq1Wiz///BNqtRoKhULucIiIyAhCCOTm5qJmzZqwszPf/7MLCwtRXFxskr6qVasGR0dHk/RlKiwoTODPP/9EQECA3GEQEZEEqampqF27tln6LiwsRL06rriZrjFJf35+frhy5YpVFRUsKExArVYDAK7+VhdurpxFqsyrjZrLHQIRkZ5SlOBn7NL9LDeH4uJi3EzX4GpCXbippf2eyMnVok7bFBQXF7OgsDXl0xxurnaSvyi2zkGhlDsEIiJ9fz2AwhJT1q5qBVzV0j5HC+ucWmdBQUREZCEaoYVG4hO0NEJrmmBMjAUFERGRhWghoIW0ikLq8ebC8XkiIiKSjCMUREREFqKFFlInLKT3YB4sKIiIiCxEIwQ0QtqUhdTjzYVTHkRERCQZRyiIiIgsxJYXZbKgICIishAtBDQ2WlBwyoOIiIgk4wgFERGRhXDKg4iIiCTjVR5EREREleAIBRERkYVo/9qk9mGNWFAQERFZi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Vz574kOOybAwaXyX/yPU5pfhGP9VhgV7/jx47Fjxw78+OOPqFevnq798uXLaNCgAX777Te0bt1a1963b194eHggNjbW4Lhkvw+FOS1ZsgSnTp3CxYsXsXLlSsTGxmLYsGFyh0VERGQRQgi888472LZtGw4ePKhXTABAvXr14Ofnh/379+vaiouLcfjwYTz//PNGfZbsUx7mFB8fj0WLFiE3Nxf169fHihUrMHLkSLnDIiKip9T9iyql9GGocePGYdOmTfjmm2+gVqt1aybc3d3h5OQEhUKBSZMmYcGCBWjYsCEaNmyIBQsWwNnZGYMHDzYqLpsuKLZu3Sp3CERERDqWftro6tWrAZQ9xft+0dHRGD58OADgvffew7179zB27FhkZmaiQ4cO2LdvH9RqNYxh0wUFERGRNbH0CIUhyyQVCgUiIiIqvULEEDa9hoKIiIgsgyMUREREFiJMMOUhdYTDXFhQEBERWYhAxQekPUkf1ohTHkRERCQZRyiIiIgsRAsFFCa6U6a1YUFBRERkIZa+ysOSOOVBREREknGEgoiIyEK0QgGFBW9sZUksKIiIiCxECBNc5WGll3lwyoOIiIgk4wgFERGRhdjyokwWFERERBbCgoKIiIgks+VFmVxDQURERJJxhIKIiMhCbPkqDxYUREREFlJWUEhdQ2GiYEyMUx5EREQkGUcoiIiILIRXeRAREZFk4q9Nah/WiFMeREREJBlHKIiIiCyEUx5EREQknQ3PebCgICIishQTjFDASkcouIaCiIiIJOMIBRERkYXwTplEREQkGRdlEpmI4sgpuUOoEhz8fOUOoUoovXlL7hCI6C8sKIiIiCxFKKQvquQIBRER0dPNltdQ8CoPIiIikowjFERERJbCG1sRERGRVE/9VR4rVqwwuMMJEyY8cTBERERUNRlUUHz88ccGdaZQKFhQEBERVcZKpyykMqiguHLlirnjICIisnm2POXxxFd5FBcXIzk5GaWlpaaMh4iIyHYJE21WyOiCoqCgACNGjICzszOeffZZXLt2DUDZ2omPPvrI5AESERGR9TO6oJg+fTpOnTqFuLg4ODo66tpffvllbNmyxaTBERER2RaFiTbrY/Rlozt27MCWLVvw3HP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
626
+ "text/plain": [
627
+ "<Figure size 640x480 with 2 Axes>"
628
+ ]
629
+ },
630
+ "metadata": {},
631
+ "output_type": "display_data"
632
+ }
633
+ ],
634
+ "source": [
635
+ "import matplotlib.pyplot as plt\n",
636
+ "from sklearn.metrics import ConfusionMatrixDisplay, confusion_matrix\n",
637
+ "\n",
638
+ "predictions = pipe.predict(X_test)\n",
639
+ "cm = confusion_matrix(y_test, predictions, labels=pipe.classes_)\n",
640
+ "disp = ConfusionMatrixDisplay(confusion_matrix=cm, display_labels=pipe.classes_)\n",
641
+ "disp.plot()\n",
642
+ "plt.savefig(\"Results/model_results.png\", dpi=120)"
643
+ ]
644
+ },
645
+ {
646
+ "cell_type": "code",
647
+ "execution_count": 7,
648
+ "metadata": {},
649
+ "outputs": [],
650
+ "source": [
651
+ "import skops.io as sio\n",
652
+ "\n",
653
+ "sio.dump(pipe, \"Model/drug_pipeline.skops\")"
654
+ ]
655
+ },
656
+ {
657
+ "cell_type": "code",
658
+ "execution_count": 8,
659
+ "metadata": {},
660
+ "outputs": [
661
+ {
662
+ "data": {
663
+ "text/html": [
664
+ "<style>#sk-container-id-2 {\n",
665
+ " /* Definition of color scheme common for light and dark mode */\n",
666
+ " --sklearn-color-text: black;\n",
667
+ " --sklearn-color-line: gray;\n",
668
+ " /* Definition of color scheme for unfitted estimators */\n",
669
+ " --sklearn-color-unfitted-level-0: #fff5e6;\n",
670
+ " --sklearn-color-unfitted-level-1: #f6e4d2;\n",
671
+ " --sklearn-color-unfitted-level-2: #ffe0b3;\n",
672
+ " --sklearn-color-unfitted-level-3: chocolate;\n",
673
+ " /* Definition of color scheme for fitted estimators */\n",
674
+ " --sklearn-color-fitted-level-0: #f0f8ff;\n",
675
+ " --sklearn-color-fitted-level-1: #d4ebff;\n",
676
+ " --sklearn-color-fitted-level-2: #b3dbfd;\n",
677
+ " --sklearn-color-fitted-level-3: cornflowerblue;\n",
678
+ "\n",
679
+ " /* Specific color for light theme */\n",
680
+ " --sklearn-color-text-on-default-background: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, black)));\n",
681
+ " --sklearn-color-background: var(--sg-background-color, var(--theme-background, var(--jp-layout-color0, white)));\n",
682
+ " --sklearn-color-border-box: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, black)));\n",
683
+ " --sklearn-color-icon: #696969;\n",
684
+ "\n",
685
+ " @media (prefers-color-scheme: dark) {\n",
686
+ " /* Redefinition of color scheme for dark theme */\n",
687
+ " --sklearn-color-text-on-default-background: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, white)));\n",
688
+ " --sklearn-color-background: var(--sg-background-color, var(--theme-background, var(--jp-layout-color0, #111)));\n",
689
+ " --sklearn-color-border-box: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, white)));\n",
690
+ " --sklearn-color-icon: #878787;\n",
691
+ " }\n",
692
+ "}\n",
693
+ "\n",
694
+ "#sk-container-id-2 {\n",
695
+ " color: var(--sklearn-color-text);\n",
696
+ "}\n",
697
+ "\n",
698
+ "#sk-container-id-2 pre {\n",
699
+ " padding: 0;\n",
700
+ "}\n",
701
+ "\n",
702
+ "#sk-container-id-2 input.sk-hidden--visually {\n",
703
+ " border: 0;\n",
704
+ " clip: rect(1px 1px 1px 1px);\n",
705
+ " clip: rect(1px, 1px, 1px, 1px);\n",
706
+ " height: 1px;\n",
707
+ " margin: -1px;\n",
708
+ " overflow: hidden;\n",
709
+ " padding: 0;\n",
710
+ " position: absolute;\n",
711
+ " width: 1px;\n",
712
+ "}\n",
713
+ "\n",
714
+ "#sk-container-id-2 div.sk-dashed-wrapped {\n",
715
+ " border: 1px dashed var(--sklearn-color-line);\n",
716
+ " margin: 0 0.4em 0.5em 0.4em;\n",
717
+ " box-sizing: border-box;\n",
718
+ " padding-bottom: 0.4em;\n",
719
+ " background-color: var(--sklearn-color-background);\n",
720
+ "}\n",
721
+ "\n",
722
+ "#sk-container-id-2 div.sk-container {\n",
723
+ " /* jupyter's `normalize.less` sets `[hidden] { display: none; }`\n",
724
+ " but bootstrap.min.css set `[hidden] { display: none !important; }`\n",
725
+ " so we also need the `!important` here to be able to override the\n",
726
+ " default hidden behavior on the sphinx rendered scikit-learn.org.\n",
727
+ " See: https://github.com/scikit-learn/scikit-learn/issues/21755 */\n",
728
+ " display: inline-block !important;\n",
729
+ " position: relative;\n",
730
+ "}\n",
731
+ "\n",
732
+ "#sk-container-id-2 div.sk-text-repr-fallback {\n",
733
+ " display: none;\n",
734
+ "}\n",
735
+ "\n",
736
+ "div.sk-parallel-item,\n",
737
+ "div.sk-serial,\n",
738
+ "div.sk-item {\n",
739
+ " /* draw centered vertical line to link estimators */\n",
740
+ " background-image: linear-gradient(var(--sklearn-color-text-on-default-background), var(--sklearn-color-text-on-default-background));\n",
741
+ " background-size: 2px 100%;\n",
742
+ " background-repeat: no-repeat;\n",
743
+ " background-position: center center;\n",
744
+ "}\n",
745
+ "\n",
746
+ "/* Parallel-specific style estimator block */\n",
747
+ "\n",
748
+ "#sk-container-id-2 div.sk-parallel-item::after {\n",
749
+ " content: \"\";\n",
750
+ " width: 100%;\n",
751
+ " border-bottom: 2px solid var(--sklearn-color-text-on-default-background);\n",
752
+ " flex-grow: 1;\n",
753
+ "}\n",
754
+ "\n",
755
+ "#sk-container-id-2 div.sk-parallel {\n",
756
+ " display: flex;\n",
757
+ " align-items: stretch;\n",
758
+ " justify-content: center;\n",
759
+ " background-color: var(--sklearn-color-background);\n",
760
+ " position: relative;\n",
761
+ "}\n",
762
+ "\n",
763
+ "#sk-container-id-2 div.sk-parallel-item {\n",
764
+ " display: flex;\n",
765
+ " flex-direction: column;\n",
766
+ "}\n",
767
+ "\n",
768
+ "#sk-container-id-2 div.sk-parallel-item:first-child::after {\n",
769
+ " align-self: flex-end;\n",
770
+ " width: 50%;\n",
771
+ "}\n",
772
+ "\n",
773
+ "#sk-container-id-2 div.sk-parallel-item:last-child::after {\n",
774
+ " align-self: flex-start;\n",
775
+ " width: 50%;\n",
776
+ "}\n",
777
+ "\n",
778
+ "#sk-container-id-2 div.sk-parallel-item:only-child::after {\n",
779
+ " width: 0;\n",
780
+ "}\n",
781
+ "\n",
782
+ "/* Serial-specific style estimator block */\n",
783
+ "\n",
784
+ "#sk-container-id-2 div.sk-serial {\n",
785
+ " display: flex;\n",
786
+ " flex-direction: column;\n",
787
+ " align-items: center;\n",
788
+ " background-color: var(--sklearn-color-background);\n",
789
+ " padding-right: 1em;\n",
790
+ " padding-left: 1em;\n",
791
+ "}\n",
792
+ "\n",
793
+ "\n",
794
+ "/* Toggleable style: style used for estimator/Pipeline/ColumnTransformer box that is\n",
795
+ "clickable and can be expanded/collapsed.\n",
796
+ "- Pipeline and ColumnTransformer use this feature and define the default style\n",
797
+ "- Estimators will overwrite some part of the style using the `sk-estimator` class\n",
798
+ "*/\n",
799
+ "\n",
800
+ "/* Pipeline and ColumnTransformer style (default) */\n",
801
+ "\n",
802
+ "#sk-container-id-2 div.sk-toggleable {\n",
803
+ " /* Default theme specific background. It is overwritten whether we have a\n",
804
+ " specific estimator or a Pipeline/ColumnTransformer */\n",
805
+ " background-color: var(--sklearn-color-background);\n",
806
+ "}\n",
807
+ "\n",
808
+ "/* Toggleable label */\n",
809
+ "#sk-container-id-2 label.sk-toggleable__label {\n",
810
+ " cursor: pointer;\n",
811
+ " display: block;\n",
812
+ " width: 100%;\n",
813
+ " margin-bottom: 0;\n",
814
+ " padding: 0.5em;\n",
815
+ " box-sizing: border-box;\n",
816
+ " text-align: center;\n",
817
+ "}\n",
818
+ "\n",
819
+ "#sk-container-id-2 label.sk-toggleable__label-arrow:before {\n",
820
+ " /* Arrow on the left of the label */\n",
821
+ " content: \"▸\";\n",
822
+ " float: left;\n",
823
+ " margin-right: 0.25em;\n",
824
+ " color: var(--sklearn-color-icon);\n",
825
+ "}\n",
826
+ "\n",
827
+ "#sk-container-id-2 label.sk-toggleable__label-arrow:hover:before {\n",
828
+ " color: var(--sklearn-color-text);\n",
829
+ "}\n",
830
+ "\n",
831
+ "/* Toggleable content - dropdown */\n",
832
+ "\n",
833
+ "#sk-container-id-2 div.sk-toggleable__content {\n",
834
+ " max-height: 0;\n",
835
+ " max-width: 0;\n",
836
+ " overflow: hidden;\n",
837
+ " text-align: left;\n",
838
+ " /* unfitted */\n",
839
+ " background-color: var(--sklearn-color-unfitted-level-0);\n",
840
+ "}\n",
841
+ "\n",
842
+ "#sk-container-id-2 div.sk-toggleable__content.fitted {\n",
843
+ " /* fitted */\n",
844
+ " background-color: var(--sklearn-color-fitted-level-0);\n",
845
+ "}\n",
846
+ "\n",
847
+ "#sk-container-id-2 div.sk-toggleable__content pre {\n",
848
+ " margin: 0.2em;\n",
849
+ " border-radius: 0.25em;\n",
850
+ " color: var(--sklearn-color-text);\n",
851
+ " /* unfitted */\n",
852
+ " background-color: var(--sklearn-color-unfitted-level-0);\n",
853
+ "}\n",
854
+ "\n",
855
+ "#sk-container-id-2 div.sk-toggleable__content.fitted pre {\n",
856
+ " /* unfitted */\n",
857
+ " background-color: var(--sklearn-color-fitted-level-0);\n",
858
+ "}\n",
859
+ "\n",
860
+ "#sk-container-id-2 input.sk-toggleable__control:checked~div.sk-toggleable__content {\n",
861
+ " /* Expand drop-down */\n",
862
+ " max-height: 200px;\n",
863
+ " max-width: 100%;\n",
864
+ " overflow: auto;\n",
865
+ "}\n",
866
+ "\n",
867
+ "#sk-container-id-2 input.sk-toggleable__control:checked~label.sk-toggleable__label-arrow:before {\n",
868
+ " content: \"▾\";\n",
869
+ "}\n",
870
+ "\n",
871
+ "/* Pipeline/ColumnTransformer-specific style */\n",
872
+ "\n",
873
+ "#sk-container-id-2 div.sk-label input.sk-toggleable__control:checked~label.sk-toggleable__label {\n",
874
+ " color: var(--sklearn-color-text);\n",
875
+ " background-color: var(--sklearn-color-unfitted-level-2);\n",
876
+ "}\n",
877
+ "\n",
878
+ "#sk-container-id-2 div.sk-label.fitted input.sk-toggleable__control:checked~label.sk-toggleable__label {\n",
879
+ " background-color: var(--sklearn-color-fitted-level-2);\n",
880
+ "}\n",
881
+ "\n",
882
+ "/* Estimator-specific style */\n",
883
+ "\n",
884
+ "/* Colorize estimator box */\n",
885
+ "#sk-container-id-2 div.sk-estimator input.sk-toggleable__control:checked~label.sk-toggleable__label {\n",
886
+ " /* unfitted */\n",
887
+ " background-color: var(--sklearn-color-unfitted-level-2);\n",
888
+ "}\n",
889
+ "\n",
890
+ "#sk-container-id-2 div.sk-estimator.fitted input.sk-toggleable__control:checked~label.sk-toggleable__label {\n",
891
+ " /* fitted */\n",
892
+ " background-color: var(--sklearn-color-fitted-level-2);\n",
893
+ "}\n",
894
+ "\n",
895
+ "#sk-container-id-2 div.sk-label label.sk-toggleable__label,\n",
896
+ "#sk-container-id-2 div.sk-label label {\n",
897
+ " /* The background is the default theme color */\n",
898
+ " color: var(--sklearn-color-text-on-default-background);\n",
899
+ "}\n",
900
+ "\n",
901
+ "/* On hover, darken the color of the background */\n",
902
+ "#sk-container-id-2 div.sk-label:hover label.sk-toggleable__label {\n",
903
+ " color: var(--sklearn-color-text);\n",
904
+ " background-color: var(--sklearn-color-unfitted-level-2);\n",
905
+ "}\n",
906
+ "\n",
907
+ "/* Label box, darken color on hover, fitted */\n",
908
+ "#sk-container-id-2 div.sk-label.fitted:hover label.sk-toggleable__label.fitted {\n",
909
+ " color: var(--sklearn-color-text);\n",
910
+ " background-color: var(--sklearn-color-fitted-level-2);\n",
911
+ "}\n",
912
+ "\n",
913
+ "/* Estimator label */\n",
914
+ "\n",
915
+ "#sk-container-id-2 div.sk-label label {\n",
916
+ " font-family: monospace;\n",
917
+ " font-weight: bold;\n",
918
+ " display: inline-block;\n",
919
+ " line-height: 1.2em;\n",
920
+ "}\n",
921
+ "\n",
922
+ "#sk-container-id-2 div.sk-label-container {\n",
923
+ " text-align: center;\n",
924
+ "}\n",
925
+ "\n",
926
+ "/* Estimator-specific */\n",
927
+ "#sk-container-id-2 div.sk-estimator {\n",
928
+ " font-family: monospace;\n",
929
+ " border: 1px dotted var(--sklearn-color-border-box);\n",
930
+ " border-radius: 0.25em;\n",
931
+ " box-sizing: border-box;\n",
932
+ " margin-bottom: 0.5em;\n",
933
+ " /* unfitted */\n",
934
+ " background-color: var(--sklearn-color-unfitted-level-0);\n",
935
+ "}\n",
936
+ "\n",
937
+ "#sk-container-id-2 div.sk-estimator.fitted {\n",
938
+ " /* fitted */\n",
939
+ " background-color: var(--sklearn-color-fitted-level-0);\n",
940
+ "}\n",
941
+ "\n",
942
+ "/* on hover */\n",
943
+ "#sk-container-id-2 div.sk-estimator:hover {\n",
944
+ " /* unfitted */\n",
945
+ " background-color: var(--sklearn-color-unfitted-level-2);\n",
946
+ "}\n",
947
+ "\n",
948
+ "#sk-container-id-2 div.sk-estimator.fitted:hover {\n",
949
+ " /* fitted */\n",
950
+ " background-color: var(--sklearn-color-fitted-level-2);\n",
951
+ "}\n",
952
+ "\n",
953
+ "/* Specification for estimator info (e.g. \"i\" and \"?\") */\n",
954
+ "\n",
955
+ "/* Common style for \"i\" and \"?\" */\n",
956
+ "\n",
957
+ ".sk-estimator-doc-link,\n",
958
+ "a:link.sk-estimator-doc-link,\n",
959
+ "a:visited.sk-estimator-doc-link {\n",
960
+ " float: right;\n",
961
+ " font-size: smaller;\n",
962
+ " line-height: 1em;\n",
963
+ " font-family: monospace;\n",
964
+ " background-color: var(--sklearn-color-background);\n",
965
+ " border-radius: 1em;\n",
966
+ " height: 1em;\n",
967
+ " width: 1em;\n",
968
+ " text-decoration: none !important;\n",
969
+ " margin-left: 1ex;\n",
970
+ " /* unfitted */\n",
971
+ " border: var(--sklearn-color-unfitted-level-1) 1pt solid;\n",
972
+ " color: var(--sklearn-color-unfitted-level-1);\n",
973
+ "}\n",
974
+ "\n",
975
+ ".sk-estimator-doc-link.fitted,\n",
976
+ "a:link.sk-estimator-doc-link.fitted,\n",
977
+ "a:visited.sk-estimator-doc-link.fitted {\n",
978
+ " /* fitted */\n",
979
+ " border: var(--sklearn-color-fitted-level-1) 1pt solid;\n",
980
+ " color: var(--sklearn-color-fitted-level-1);\n",
981
+ "}\n",
982
+ "\n",
983
+ "/* On hover */\n",
984
+ "div.sk-estimator:hover .sk-estimator-doc-link:hover,\n",
985
+ ".sk-estimator-doc-link:hover,\n",
986
+ "div.sk-label-container:hover .sk-estimator-doc-link:hover,\n",
987
+ ".sk-estimator-doc-link:hover {\n",
988
+ " /* unfitted */\n",
989
+ " background-color: var(--sklearn-color-unfitted-level-3);\n",
990
+ " color: var(--sklearn-color-background);\n",
991
+ " text-decoration: none;\n",
992
+ "}\n",
993
+ "\n",
994
+ "div.sk-estimator.fitted:hover .sk-estimator-doc-link.fitted:hover,\n",
995
+ ".sk-estimator-doc-link.fitted:hover,\n",
996
+ "div.sk-label-container:hover .sk-estimator-doc-link.fitted:hover,\n",
997
+ ".sk-estimator-doc-link.fitted:hover {\n",
998
+ " /* fitted */\n",
999
+ " background-color: var(--sklearn-color-fitted-level-3);\n",
1000
+ " color: var(--sklearn-color-background);\n",
1001
+ " text-decoration: none;\n",
1002
+ "}\n",
1003
+ "\n",
1004
+ "/* Span, style for the box shown on hovering the info icon */\n",
1005
+ ".sk-estimator-doc-link span {\n",
1006
+ " display: none;\n",
1007
+ " z-index: 9999;\n",
1008
+ " position: relative;\n",
1009
+ " font-weight: normal;\n",
1010
+ " right: .2ex;\n",
1011
+ " padding: .5ex;\n",
1012
+ " margin: .5ex;\n",
1013
+ " width: min-content;\n",
1014
+ " min-width: 20ex;\n",
1015
+ " max-width: 50ex;\n",
1016
+ " color: var(--sklearn-color-text);\n",
1017
+ " box-shadow: 2pt 2pt 4pt #999;\n",
1018
+ " /* unfitted */\n",
1019
+ " background: var(--sklearn-color-unfitted-level-0);\n",
1020
+ " border: .5pt solid var(--sklearn-color-unfitted-level-3);\n",
1021
+ "}\n",
1022
+ "\n",
1023
+ ".sk-estimator-doc-link.fitted span {\n",
1024
+ " /* fitted */\n",
1025
+ " background: var(--sklearn-color-fitted-level-0);\n",
1026
+ " border: var(--sklearn-color-fitted-level-3);\n",
1027
+ "}\n",
1028
+ "\n",
1029
+ ".sk-estimator-doc-link:hover span {\n",
1030
+ " display: block;\n",
1031
+ "}\n",
1032
+ "\n",
1033
+ "/* \"?\"-specific style due to the `<a>` HTML tag */\n",
1034
+ "\n",
1035
+ "#sk-container-id-2 a.estimator_doc_link {\n",
1036
+ " float: right;\n",
1037
+ " font-size: 1rem;\n",
1038
+ " line-height: 1em;\n",
1039
+ " font-family: monospace;\n",
1040
+ " background-color: var(--sklearn-color-background);\n",
1041
+ " border-radius: 1rem;\n",
1042
+ " height: 1rem;\n",
1043
+ " width: 1rem;\n",
1044
+ " text-decoration: none;\n",
1045
+ " /* unfitted */\n",
1046
+ " color: var(--sklearn-color-unfitted-level-1);\n",
1047
+ " border: var(--sklearn-color-unfitted-level-1) 1pt solid;\n",
1048
+ "}\n",
1049
+ "\n",
1050
+ "#sk-container-id-2 a.estimator_doc_link.fitted {\n",
1051
+ " /* fitted */\n",
1052
+ " border: var(--sklearn-color-fitted-level-1) 1pt solid;\n",
1053
+ " color: var(--sklearn-color-fitted-level-1);\n",
1054
+ "}\n",
1055
+ "\n",
1056
+ "/* On hover */\n",
1057
+ "#sk-container-id-2 a.estimator_doc_link:hover {\n",
1058
+ " /* unfitted */\n",
1059
+ " background-color: var(--sklearn-color-unfitted-level-3);\n",
1060
+ " color: var(--sklearn-color-background);\n",
1061
+ " text-decoration: none;\n",
1062
+ "}\n",
1063
+ "\n",
1064
+ "#sk-container-id-2 a.estimator_doc_link.fitted:hover {\n",
1065
+ " /* fitted */\n",
1066
+ " background-color: var(--sklearn-color-fitted-level-3);\n",
1067
+ "}\n",
1068
+ "</style><div id=\"sk-container-id-2\" class=\"sk-top-container\"><div class=\"sk-text-repr-fallback\"><pre>Pipeline(steps=[(&#x27;preprocessing&#x27;,\n",
1069
+ " ColumnTransformer(transformers=[(&#x27;encoder&#x27;, OrdinalEncoder(),\n",
1070
+ " [1, 2, 3]),\n",
1071
+ " (&#x27;num_imputer&#x27;,\n",
1072
+ " SimpleImputer(strategy=&#x27;median&#x27;),\n",
1073
+ " [0, 4]),\n",
1074
+ " (&#x27;num_scaler&#x27;,\n",
1075
+ " StandardScaler(), [0, 4])])),\n",
1076
+ " (&#x27;model&#x27;,\n",
1077
+ " RandomForestClassifier(n_estimators=10, random_state=125))])</pre><b>In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook. <br />On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.</b></div><div class=\"sk-container\" hidden><div class=\"sk-item sk-dashed-wrapped\"><div class=\"sk-label-container\"><div class=\"sk-label fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-10\" type=\"checkbox\" ><label for=\"sk-estimator-id-10\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">&nbsp;&nbsp;Pipeline<a class=\"sk-estimator-doc-link fitted\" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.pipeline.Pipeline.html\">?<span>Documentation for Pipeline</span></a><span class=\"sk-estimator-doc-link fitted\">i<span>Fitted</span></span></label><div class=\"sk-toggleable__content fitted\"><pre>Pipeline(steps=[(&#x27;preprocessing&#x27;,\n",
1078
+ " ColumnTransformer(transformers=[(&#x27;encoder&#x27;, OrdinalEncoder(),\n",
1079
+ " [1, 2, 3]),\n",
1080
+ " (&#x27;num_imputer&#x27;,\n",
1081
+ " SimpleImputer(strategy=&#x27;median&#x27;),\n",
1082
+ " [0, 4]),\n",
1083
+ " (&#x27;num_scaler&#x27;,\n",
1084
+ " StandardScaler(), [0, 4])])),\n",
1085
+ " (&#x27;model&#x27;,\n",
1086
+ " RandomForestClassifier(n_estimators=10, random_state=125))])</pre></div> </div></div><div class=\"sk-serial\"><div class=\"sk-item sk-dashed-wrapped\"><div class=\"sk-label-container\"><div class=\"sk-label fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-11\" type=\"checkbox\" ><label for=\"sk-estimator-id-11\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">&nbsp;preprocessing: ColumnTransformer<a class=\"sk-estimator-doc-link fitted\" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.compose.ColumnTransformer.html\">?<span>Documentation for preprocessing: ColumnTransformer</span></a></label><div class=\"sk-toggleable__content fitted\"><pre>ColumnTransformer(transformers=[(&#x27;encoder&#x27;, OrdinalEncoder(), [1, 2, 3]),\n",
1087
+ " (&#x27;num_imputer&#x27;,\n",
1088
+ " SimpleImputer(strategy=&#x27;median&#x27;), [0, 4]),\n",
1089
+ " (&#x27;num_scaler&#x27;, StandardScaler(), [0, 4])])</pre></div> </div></div><div class=\"sk-parallel\"><div class=\"sk-parallel-item\"><div class=\"sk-item\"><div class=\"sk-label-container\"><div class=\"sk-label fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-12\" type=\"checkbox\" ><label for=\"sk-estimator-id-12\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">encoder</label><div class=\"sk-toggleable__content fitted\"><pre>[1, 2, 3]</pre></div> </div></div><div class=\"sk-serial\"><div class=\"sk-item\"><div class=\"sk-estimator fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-13\" type=\"checkbox\" ><label for=\"sk-estimator-id-13\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">&nbsp;OrdinalEncoder<a class=\"sk-estimator-doc-link fitted\" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.preprocessing.OrdinalEncoder.html\">?<span>Documentation for OrdinalEncoder</span></a></label><div class=\"sk-toggleable__content fitted\"><pre>OrdinalEncoder()</pre></div> </div></div></div></div></div><div class=\"sk-parallel-item\"><div class=\"sk-item\"><div class=\"sk-label-container\"><div class=\"sk-label fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-14\" type=\"checkbox\" ><label for=\"sk-estimator-id-14\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">num_imputer</label><div class=\"sk-toggleable__content fitted\"><pre>[0, 4]</pre></div> </div></div><div class=\"sk-serial\"><div class=\"sk-item\"><div class=\"sk-estimator fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-15\" type=\"checkbox\" ><label for=\"sk-estimator-id-15\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">&nbsp;SimpleImputer<a class=\"sk-estimator-doc-link fitted\" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.impute.SimpleImputer.html\">?<span>Documentation for SimpleImputer</span></a></label><div class=\"sk-toggleable__content fitted\"><pre>SimpleImputer(strategy=&#x27;median&#x27;)</pre></div> </div></div></div></div></div><div class=\"sk-parallel-item\"><div class=\"sk-item\"><div class=\"sk-label-container\"><div class=\"sk-label fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-16\" type=\"checkbox\" ><label for=\"sk-estimator-id-16\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">num_scaler</label><div class=\"sk-toggleable__content fitted\"><pre>[0, 4]</pre></div> </div></div><div class=\"sk-serial\"><div class=\"sk-item\"><div class=\"sk-estimator fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-17\" type=\"checkbox\" ><label for=\"sk-estimator-id-17\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">&nbsp;StandardScaler<a class=\"sk-estimator-doc-link fitted\" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.preprocessing.StandardScaler.html\">?<span>Documentation for StandardScaler</span></a></label><div class=\"sk-toggleable__content fitted\"><pre>StandardScaler()</pre></div> </div></div></div></div></div></div></div><div class=\"sk-item\"><div class=\"sk-estimator fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-18\" type=\"checkbox\" ><label for=\"sk-estimator-id-18\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">&nbsp;RandomForestClassifier<a class=\"sk-estimator-doc-link fitted\" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.ensemble.RandomForestClassifier.html\">?<span>Documentation for RandomForestClassifier</span></a></label><div class=\"sk-toggleable__content fitted\"><pre>RandomForestClassifier(n_estimators=10, random_state=125)</pre></div> </div></div></div></div></div></div>"
1090
+ ],
1091
+ "text/plain": [
1092
+ "Pipeline(steps=[('preprocessing',\n",
1093
+ " ColumnTransformer(transformers=[('encoder', OrdinalEncoder(),\n",
1094
+ " [1, 2, 3]),\n",
1095
+ " ('num_imputer',\n",
1096
+ " SimpleImputer(strategy='median'),\n",
1097
+ " [0, 4]),\n",
1098
+ " ('num_scaler',\n",
1099
+ " StandardScaler(), [0, 4])])),\n",
1100
+ " ('model',\n",
1101
+ " RandomForestClassifier(n_estimators=10, random_state=125))])"
1102
+ ]
1103
+ },
1104
+ "execution_count": 8,
1105
+ "metadata": {},
1106
+ "output_type": "execute_result"
1107
+ }
1108
+ ],
1109
+ "source": [
1110
+ "sio.load(\"Model/drug_pipeline.skops\", trusted=True)"
1111
+ ]
1112
+ }
1113
+ ],
1114
+ "metadata": {
1115
+ "kernelspec": {
1116
+ "display_name": "PY312",
1117
+ "language": "python",
1118
+ "name": "python3"
1119
+ },
1120
+ "language_info": {
1121
+ "codemirror_mode": {
1122
+ "name": "ipython",
1123
+ "version": 3
1124
+ },
1125
+ "file_extension": ".py",
1126
+ "mimetype": "text/x-python",
1127
+ "name": "python",
1128
+ "nbconvert_exporter": "python",
1129
+ "pygments_lexer": "ipython3",
1130
+ "version": "3.9.18"
1131
+ }
1132
+ },
1133
+ "nbformat": 4,
1134
+ "nbformat_minor": 2
1135
+ }
requirements.txt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ pandas
2
+ scikit-learn
3
+ numpy
4
+ matplotlib
5
+ skops
6
+ black
train.py ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pandas as pd
2
+ import skops.io as sio
3
+ from sklearn.compose import ColumnTransformer
4
+ from sklearn.ensemble import RandomForestClassifier
5
+ from sklearn.impute import SimpleImputer
6
+ from sklearn.metrics import accuracy_score, f1_score
7
+ from sklearn.pipeline import Pipeline
8
+ from sklearn.preprocessing import OrdinalEncoder, StandardScaler
9
+
10
+ # Loading the Data
11
+ drug_df = pd.read_csv("Data/drug.csv")
12
+ drug_df = drug_df.sample(frac=1)
13
+
14
+ # Train Test Split
15
+ from sklearn.model_selection import train_test_split
16
+
17
+ X = drug_df.drop("Drug", axis=1).values
18
+ y = drug_df.Drug.values
19
+
20
+ X_train, X_test, y_train, y_test = train_test_split(
21
+ X, y, test_size=0.3, random_state=125
22
+ )
23
+
24
+ # Pipeline
25
+ cat_col = [1, 2, 3]
26
+ num_col = [0, 4]
27
+
28
+ transform = ColumnTransformer(
29
+ [
30
+ ("encoder", OrdinalEncoder(), cat_col),
31
+ ("num_imputer", SimpleImputer(strategy="median"), num_col),
32
+ ("num_scaler", StandardScaler(), num_col),
33
+ ]
34
+ )
35
+ pipe = Pipeline(
36
+ steps=[
37
+ ("preprocessing", transform),
38
+ ("model", RandomForestClassifier(n_estimators=10, random_state=125)),
39
+ ]
40
+ )
41
+
42
+ # Training
43
+ pipe.fit(X_train, y_train)
44
+
45
+ # Model Evaluation
46
+ predictions = pipe.predict(X_test)
47
+ accuracy = accuracy_score(y_test, predictions)
48
+ f1 = f1_score(y_test, predictions, average="macro")
49
+
50
+ print("Accuracy:", str(round(accuracy, 2) * 100) + "%", "F1:", round(f1, 2))
51
+
52
+ # Confusion Matrix Plot
53
+ import matplotlib.pyplot as plt
54
+ from sklearn.metrics import ConfusionMatrixDisplay, confusion_matrix
55
+
56
+ predictions = pipe.predict(X_test)
57
+ cm = confusion_matrix(y_test, predictions, labels=pipe.classes_)
58
+ disp = ConfusionMatrixDisplay(confusion_matrix=cm, display_labels=pipe.classes_)
59
+ disp.plot()
60
+ plt.savefig("./Results/model_results.png", dpi=120)
61
+
62
+ # Write metrics to file
63
+ with open("./Results/metrics.txt", "w") as outfile:
64
+ outfile.write(f"\nAccuracy = {round(accuracy, 2)}, F1 Score = {round(f1, 2)}")
65
+
66
+ # Saving the model file
67
+ sio.dump(pipe, "./Model/drug_pipeline.skops")