Reem commited on
Commit
bb092fe
Β·
1 Parent(s): 5437e78

removed-nb

Browse files
Files changed (1) hide show
  1. Untitled.ipynb +0 -107
Untitled.ipynb DELETED
@@ -1,107 +0,0 @@
1
- {
2
- "cells": [
3
- {
4
- "cell_type": "code",
5
- "execution_count": 7,
6
- "id": "6de1a7e2-d47b-4de4-a006-882bc270d9d3",
7
- "metadata": {},
8
- "outputs": [
9
- {
10
- "ename": "ModuleNotFoundError",
11
- "evalue": "No module named 'xgboost'",
12
- "output_type": "error",
13
- "traceback": [
14
- "\u001b[31m---------------------------------------------------------------------------\u001b[39m",
15
- "\u001b[31mModuleNotFoundError\u001b[39m Traceback (most recent call last)",
16
- "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[7]\u001b[39m\u001b[32m, line 3\u001b[39m\n\u001b[32m 1\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mA5\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01mCorrelationFilter\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m CorrelationFilter\n\u001b[32m 2\u001b[39m \u001b[38;5;28;01mimport\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mpickle\u001b[39;00m\n\u001b[32m----> \u001b[39m\u001b[32m3\u001b[39m \u001b[38;5;28;01mimport\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mxgboost\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mas\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mxgb\u001b[39;00m\n\u001b[32m 4\u001b[39m \u001b[38;5;28;01mimport\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mlightgbm\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mas\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mlgb\u001b[39;00m\n\u001b[32m 5\u001b[39m \u001b[38;5;28;01mwith\u001b[39;00m \u001b[38;5;28mopen\u001b[39m(\u001b[33m\"\u001b[39m\u001b[33mA5/models/ensemble_classification_champion.pkl\u001b[39m\u001b[33m\"\u001b[39m, \u001b[33m\"\u001b[39m\u001b[33mrb\u001b[39m\u001b[33m\"\u001b[39m) \u001b[38;5;28;01mas\u001b[39;00m f:\n",
17
- "\u001b[31mModuleNotFoundError\u001b[39m: No module named 'xgboost'"
18
- ]
19
- }
20
- ],
21
- "source": []
22
- },
23
- {
24
- "cell_type": "code",
25
- "execution_count": 8,
26
- "id": "dff0f7ab-3b6e-4299-a61e-bb49a895167f",
27
- "metadata": {},
28
- "outputs": [
29
- {
30
- "name": "stdout",
31
- "output_type": "stream",
32
- "text": [
33
- "Collecting xgboost\n",
34
- " Downloading xgboost-3.2.0-py3-none-macosx_12_0_arm64.whl.metadata (2.1 kB)\n",
35
- "Collecting lightgbm\n",
36
- " Downloading lightgbm-4.6.0-py3-none-macosx_12_0_arm64.whl.metadata (17 kB)\n",
37
- "Requirement already satisfied: numpy in /Users/reemothman/miniconda3/lib/python3.12/site-packages (from xgboost) (1.26.4)\n",
38
- "Requirement already satisfied: scipy in /Users/reemothman/miniconda3/lib/python3.12/site-packages (from xgboost) (1.17.0)\n",
39
- "Downloading xgboost-3.2.0-py3-none-macosx_12_0_arm64.whl (2.3 MB)\n",
40
- "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.3/2.3 MB\u001b[0m \u001b[31m23.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
41
- "\u001b[?25hDownloading lightgbm-4.6.0-py3-none-macosx_12_0_arm64.whl (1.6 MB)\n",
42
- "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.6/1.6 MB\u001b[0m \u001b[31m26.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
43
- "\u001b[?25hInstalling collected packages: xgboost, lightgbm\n",
44
- "Successfully installed lightgbm-4.6.0 xgboost-3.2.0\n"
45
- ]
46
- }
47
- ],
48
- "source": [
49
- "!pip install xgboost lightgbm"
50
- ]
51
- },
52
- {
53
- "cell_type": "code",
54
- "execution_count": 9,
55
- "id": "d93e2239-29aa-434e-a82f-cc00cde6064a",
56
- "metadata": {},
57
- "outputs": [
58
- {
59
- "name": "stdout",
60
- "output_type": "stream",
61
- "text": [
62
- "dict_keys(['model', 'model_name', 'scaler', 'feature_columns', 'cv_metrics', 'test_metrics', 'a4_champion_f1', 'improvement_pct'])\n"
63
- ]
64
- }
65
- ],
66
- "source": [
67
- "from A5.CorrelationFilter import CorrelationFilter\n",
68
- "import pickle\n",
69
- "import xgboost as xgb\n",
70
- "import lightgbm as lgb\n",
71
- "with open(\"A5/models/ensemble_classification_champion.pkl\", \"rb\") as f:\n",
72
- " artifact = pickle.load(f)\n",
73
- "\n",
74
- "print(artifact.keys())"
75
- ]
76
- },
77
- {
78
- "cell_type": "code",
79
- "execution_count": null,
80
- "id": "b96efe6a-86f0-4e45-94ed-98ff1da1b8e9",
81
- "metadata": {},
82
- "outputs": [],
83
- "source": []
84
- }
85
- ],
86
- "metadata": {
87
- "kernelspec": {
88
- "display_name": "Python 3 (ipykernel)",
89
- "language": "python",
90
- "name": "python3"
91
- },
92
- "language_info": {
93
- "codemirror_mode": {
94
- "name": "ipython",
95
- "version": 3
96
- },
97
- "file_extension": ".py",
98
- "mimetype": "text/x-python",
99
- "name": "python",
100
- "nbconvert_exporter": "python",
101
- "pygments_lexer": "ipython3",
102
- "version": "3.12.8"
103
- }
104
- },
105
- "nbformat": 4,
106
- "nbformat_minor": 5
107
- }