|
15 | 15 | "The dataset is available at openML." |
16 | 16 | ] |
17 | 17 | }, |
| 18 | + { |
| 19 | + "cell_type": "code", |
| 20 | + "execution_count": null, |
| 21 | + "metadata": {}, |
| 22 | + "outputs": [], |
| 23 | + "source": [ |
| 24 | + "# making sure imbalanced-learn and scikit-learn are in compatible versions:\n", |
| 25 | + "!pip install -U 'scikit-learn>=0.23' 'imbalanced-learn==0.7.0'" |
| 26 | + ] |
| 27 | + }, |
18 | 28 | { |
19 | 29 | "cell_type": "code", |
20 | 30 | "execution_count": 1, |
|
37 | 47 | } |
38 | 48 | ], |
39 | 49 | "source": [ |
40 | | - "pip install -q openml" |
41 | | - ] |
42 | | - }, |
43 | | - { |
44 | | - "cell_type": "code", |
45 | | - "execution_count": 2, |
46 | | - "metadata": {}, |
47 | | - "outputs": [ |
48 | | - { |
49 | | - "name": "stdout", |
50 | | - "output_type": "stream", |
51 | | - "text": [ |
52 | | - "Requirement already satisfied: imbalanced-learn in /Users/ben/anaconda3/lib/python3.6/site-packages (0.7.0)\n", |
53 | | - "Requirement already satisfied: scikit-learn>=0.23 in /Users/ben/anaconda3/lib/python3.6/site-packages (from imbalanced-learn) (0.23.2)\n", |
54 | | - "Requirement already satisfied: joblib>=0.11 in /Users/ben/anaconda3/lib/python3.6/site-packages (from imbalanced-learn) (0.16.0)\n", |
55 | | - "Requirement already satisfied: scipy>=0.19.1 in /Users/ben/anaconda3/lib/python3.6/site-packages (from imbalanced-learn) (1.5.2)\n", |
56 | | - "Requirement already satisfied: numpy>=1.13.3 in /Users/ben/anaconda3/lib/python3.6/site-packages (from imbalanced-learn) (1.19.1)\n", |
57 | | - "Requirement already satisfied: threadpoolctl>=2.0.0 in /Users/ben/anaconda3/lib/python3.6/site-packages (from scikit-learn>=0.23->imbalanced-learn) (2.1.0)\n", |
58 | | - "Note: you may need to restart the kernel to use updated packages.\n" |
59 | | - ] |
60 | | - } |
61 | | - ], |
62 | | - "source": [ |
63 | | - "pip install imbalanced-learn" |
64 | | - ] |
65 | | - }, |
66 | | - { |
67 | | - "cell_type": "code", |
68 | | - "execution_count": 3, |
69 | | - "metadata": {}, |
70 | | - "outputs": [ |
71 | | - { |
72 | | - "name": "stdout", |
73 | | - "output_type": "stream", |
74 | | - "text": [ |
75 | | - "Requirement already up-to-date: scikit-learn in /Users/ben/anaconda3/lib/python3.6/site-packages (0.23.2)\n", |
76 | | - "Requirement already satisfied, skipping upgrade: threadpoolctl>=2.0.0 in /Users/ben/anaconda3/lib/python3.6/site-packages (from scikit-learn) (2.1.0)\n", |
77 | | - "Requirement already satisfied, skipping upgrade: numpy>=1.13.3 in /Users/ben/anaconda3/lib/python3.6/site-packages (from scikit-learn) (1.19.1)\n", |
78 | | - "Requirement already satisfied, skipping upgrade: scipy>=0.19.1 in /Users/ben/anaconda3/lib/python3.6/site-packages (from scikit-learn) (1.5.2)\n", |
79 | | - "Requirement already satisfied, skipping upgrade: joblib>=0.11 in /Users/ben/anaconda3/lib/python3.6/site-packages (from scikit-learn) (0.16.0)\n", |
80 | | - "Note: you may need to restart the kernel to use updated packages.\n" |
81 | | - ] |
82 | | - } |
83 | | - ], |
84 | | - "source": [ |
85 | | - "pip install --upgrade scikit-learn" |
| 50 | + "!pip install -q openml" |
86 | 51 | ] |
87 | 52 | }, |
88 | 53 | { |
|
1519 | 1484 | }, |
1520 | 1485 | { |
1521 | 1486 | "cell_type": "code", |
1522 | | - "execution_count": 23, |
| 1487 | + "execution_count": 2, |
1523 | 1488 | "metadata": { |
1524 | 1489 | "colab": {}, |
1525 | 1490 | "colab_type": "code", |
1526 | 1491 | "id": "cyJyWqnoclf1" |
1527 | 1492 | }, |
1528 | | - "outputs": [], |
| 1493 | + "outputs": [ |
| 1494 | + { |
| 1495 | + "name": "stdout", |
| 1496 | + "output_type": "stream", |
| 1497 | + "text": [ |
| 1498 | + "Requirement already up-to-date: scikit-learn>=0.23 in /Users/ben/anaconda3/lib/python3.6/site-packages (0.23.2)\n", |
| 1499 | + "Requirement already up-to-date: imbalanced-learn==0.7.0 in /Users/ben/anaconda3/lib/python3.6/site-packages (0.7.0)\n", |
| 1500 | + "Requirement already satisfied, skipping upgrade: joblib>=0.11 in /Users/ben/anaconda3/lib/python3.6/site-packages (from scikit-learn>=0.23) (0.16.0)\n", |
| 1501 | + "Requirement already satisfied, skipping upgrade: scipy>=0.19.1 in /Users/ben/anaconda3/lib/python3.6/site-packages (from scikit-learn>=0.23) (1.5.2)\n", |
| 1502 | + "Requirement already satisfied, skipping upgrade: threadpoolctl>=2.0.0 in /Users/ben/anaconda3/lib/python3.6/site-packages (from scikit-learn>=0.23) (2.1.0)\n", |
| 1503 | + "Requirement already satisfied, skipping upgrade: numpy>=1.13.3 in /Users/ben/anaconda3/lib/python3.6/site-packages (from scikit-learn>=0.23) (1.18.5)\n" |
| 1504 | + ] |
| 1505 | + } |
| 1506 | + ], |
1529 | 1507 | "source": [ |
1530 | | - "#if you run into problems with importing imblearn, you might have to downgrade scikit-learn:\n", |
1531 | | - "#!pip install --upgrade scikit-learn==0.20.3\n", |
1532 | | - "\n", |
1533 | 1508 | "from imblearn.ensemble import (\n", |
1534 | 1509 | " BalancedRandomForestClassifier,\n", |
1535 | 1510 | " RUSBoostClassifier,\n", |
|
0 commit comments