浏览代码

Small updates for recent versions of sklearn & seaborn

Nelle Varoquaux 3 年之前
父节点
当前提交
0649d02881
共有 5 个文件被更改,包括 9 次插入8 次删除
  1. 2 2
      01-PCA.ipynb
  2. 1 1
      02-FeatureProcessing.ipynb
  3. 4 4
      03-linear-and-logistic-regression.ipynb
  4. 1 1
      LICENSE
  5. 1 0
      README.md

+ 2 - 2
01-PCA.ipynb

@@ -337,7 +337,7 @@
    "outputs": [],
    "source": [
     "# fancier plot with seaborn : https://seaborn.pydata.org/\n",
-    "import seaborn.apionly as sns\n",
+    "import seaborn as sns\n",
     "sns.set_style('whitegrid')\n",
     "\n",
     "sns.jointplot('Shot.put', 'High.jump', data = my_data, \n",
@@ -610,7 +610,7 @@
    "name": "python",
    "nbconvert_exporter": "python",
    "pygments_lexer": "ipython3",
-   "version": "3.4.3"
+   "version": "3.8.3"
   }
  },
  "nbformat": 4,

+ 1 - 1
02-FeatureProcessing.ipynb

@@ -497,7 +497,7 @@
    "name": "python",
    "nbconvert_exporter": "python",
    "pygments_lexer": "ipython3",
-   "version": "3.4.3"
+   "version": "3.8.3"
   }
  },
  "nbformat": 4,

+ 4 - 4
03-linear-and-logistic-regression.ipynb

@@ -93,8 +93,8 @@
    "outputs": [],
    "source": [
     "# set up folds for cross_validation\n",
-    "from sklearn import cross_validation\n",
-    "folds_regr = cross_validation.KFold(y_regr.size, n_folds=10, shuffle=True)"
+    "from sklearn import model_selection\n",
+    "folds_regr = model_selection.KFold(y_regr.size, n_folds=10, shuffle=True)"
    ]
   },
   {
@@ -233,8 +233,8 @@
    "outputs": [],
    "source": [
     "# Set up folds for cross_validation\n",
-    "from sklearn import cross_validation\n",
-    "folds_clf = cross_validation.StratifiedKFold(y_clf, n_folds=10, shuffle=True)"
+    "from sklearn import model_selection\n",
+    "folds_clf = model_selection.StratifiedKFold(y_clf, n_folds=10, shuffle=True)"
    ]
   },
   {

+ 1 - 1
LICENSE

@@ -1,6 +1,6 @@
 MIT License
 
-Copyright (c) 2019 Chloe-Agathe Azencott
+Copyright (c) 2019 Chloe-Agathe Azencott, N. Varoquaux
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal

+ 1 - 0
README.md

@@ -4,6 +4,7 @@ https://www.hpc-ai.mines-paristech.fr/
 
 ## Requirements
 The labs were developed for Python3. All required packages are part of the [Anaconda platform](https://www.anaconda.com/download/) so you can simply install Anaconda3 on your machine. If you'd rather install just the required packages with pip, that is also possible. The labs were developed for Python 3.4.3, with the following libraries:
+
 * numpy 1.16.5
 * scipy 1.2.2
 * matplotlib 2.2.4