Queer European MD passionate about IT
浏览代码

Update Mission213Solution.ipynb

darinbradley 3 年之前
父节点
当前提交
c35d06f897
共有 1 个文件被更改,包括 18 次插入42 次删除
  1. 18 42
      Mission213Solution.ipynb

+ 18 - 42
Mission213Solution.ipynb

@@ -3,9 +3,7 @@
   {
   {
    "cell_type": "code",
    "cell_type": "code",
    "execution_count": 9,
    "execution_count": 9,
-   "metadata": {
-    "collapsed": false
-   },
+   "metadata": {},
    "outputs": [
    "outputs": [
     {
     {
      "data": {
      "data": {
@@ -170,9 +168,7 @@
   {
   {
    "cell_type": "code",
    "cell_type": "code",
    "execution_count": 10,
    "execution_count": 10,
-   "metadata": {
-    "collapsed": false
-   },
+   "metadata": {},
    "outputs": [
    "outputs": [
     {
     {
      "data": {
      "data": {
@@ -210,9 +206,7 @@
   {
   {
    "cell_type": "code",
    "cell_type": "code",
    "execution_count": 11,
    "execution_count": 11,
-   "metadata": {
-    "collapsed": false
-   },
+   "metadata": {},
    "outputs": [
    "outputs": [
     {
     {
      "data": {
      "data": {
@@ -270,17 +264,15 @@
    "cell_type": "markdown",
    "cell_type": "markdown",
    "metadata": {},
    "metadata": {},
    "source": [
    "source": [
-    "## Error metric\n",
+    "## Error Metric\n",
     "\n",
     "\n",
-    "The mean squared error metric makes the most sense to evaluate our error.  MSE works on continuous numeric data, which fits our data quite well."
+    "The mean squared error metric makes the most sense to evaluate our error. MSE works on continuous numeric data, which fits our data quite well."
    ]
    ]
   },
   },
   {
   {
    "cell_type": "code",
    "cell_type": "code",
    "execution_count": 13,
    "execution_count": 13,
-   "metadata": {
-    "collapsed": false
-   },
+   "metadata": {},
    "outputs": [],
    "outputs": [],
    "source": [
    "source": [
     "train = bike_rentals.sample(frac=.8)"
     "train = bike_rentals.sample(frac=.8)"
@@ -289,9 +281,7 @@
   {
   {
    "cell_type": "code",
    "cell_type": "code",
    "execution_count": 14,
    "execution_count": 14,
-   "metadata": {
-    "collapsed": false
-   },
+   "metadata": {},
    "outputs": [],
    "outputs": [],
    "source": [
    "source": [
     "test = bike_rentals.loc[~bike_rentals.index.isin(train.index)]"
     "test = bike_rentals.loc[~bike_rentals.index.isin(train.index)]"
@@ -300,9 +290,7 @@
   {
   {
    "cell_type": "code",
    "cell_type": "code",
    "execution_count": 18,
    "execution_count": 18,
-   "metadata": {
-    "collapsed": false
-   },
+   "metadata": {},
    "outputs": [
    "outputs": [
     {
     {
      "data": {
      "data": {
@@ -332,9 +320,7 @@
   {
   {
    "cell_type": "code",
    "cell_type": "code",
    "execution_count": 19,
    "execution_count": 19,
-   "metadata": {
-    "collapsed": false
-   },
+   "metadata": {},
    "outputs": [
    "outputs": [
     {
     {
      "data": {
      "data": {
@@ -360,15 +346,13 @@
    "source": [
    "source": [
     "## Error\n",
     "## Error\n",
     "\n",
     "\n",
-    "The error is very high, which may be due to the fact that the data has a few extremely high rental counts, but otherwise mostly low counts.  Larger errors are penalized more with MSE, which leads to a higher total error."
+    "The error is very high, which may be due to the fact that the data has a few extremely high rental counts but otherwise mostly low counts. Larger errors are penalized more with MSE, which leads to a higher total error."
    ]
    ]
   },
   },
   {
   {
    "cell_type": "code",
    "cell_type": "code",
    "execution_count": 25,
    "execution_count": 25,
-   "metadata": {
-    "collapsed": false
-   },
+   "metadata": {},
    "outputs": [
    "outputs": [
     {
     {
      "data": {
      "data": {
@@ -395,9 +379,7 @@
   {
   {
    "cell_type": "code",
    "cell_type": "code",
    "execution_count": 26,
    "execution_count": 26,
-   "metadata": {
-    "collapsed": false
-   },
+   "metadata": {},
    "outputs": [
    "outputs": [
     {
     {
      "data": {
      "data": {
@@ -419,9 +401,7 @@
   {
   {
    "cell_type": "code",
    "cell_type": "code",
    "execution_count": 28,
    "execution_count": 28,
-   "metadata": {
-    "collapsed": false
-   },
+   "metadata": {},
    "outputs": [
    "outputs": [
     {
     {
      "data": {
      "data": {
@@ -448,7 +428,7 @@
    "cell_type": "markdown",
    "cell_type": "markdown",
    "metadata": {},
    "metadata": {},
    "source": [
    "source": [
-    "## Decision tree error\n",
+    "## Decision Tree Error\n",
     "\n",
     "\n",
     "By taking the nonlinear predictors into account, the decision tree regressor appears to have much higher accuracy than linear regression."
     "By taking the nonlinear predictors into account, the decision tree regressor appears to have much higher accuracy than linear regression."
    ]
    ]
@@ -456,9 +436,7 @@
   {
   {
    "cell_type": "code",
    "cell_type": "code",
    "execution_count": 30,
    "execution_count": 30,
-   "metadata": {
-    "collapsed": false
-   },
+   "metadata": {},
    "outputs": [
    "outputs": [
     {
     {
      "data": {
      "data": {
@@ -485,9 +463,7 @@
   {
   {
    "cell_type": "code",
    "cell_type": "code",
    "execution_count": 31,
    "execution_count": 31,
-   "metadata": {
-    "collapsed": false
-   },
+   "metadata": {},
    "outputs": [
    "outputs": [
     {
     {
      "data": {
      "data": {
@@ -510,7 +486,7 @@
    "cell_type": "markdown",
    "cell_type": "markdown",
    "metadata": {},
    "metadata": {},
    "source": [
    "source": [
-    "## Random forest error\n",
+    "## Random Forest Error\n",
     "\n",
     "\n",
     "By removing some of the sources of overfitting, the random forest accuracy is improved over the decision tree accuracy."
     "By removing some of the sources of overfitting, the random forest accuracy is improved over the decision tree accuracy."
    ]
    ]
@@ -532,7 +508,7 @@
    "name": "python",
    "name": "python",
    "nbconvert_exporter": "python",
    "nbconvert_exporter": "python",
    "pygments_lexer": "ipython3",
    "pygments_lexer": "ipython3",
-   "version": "3.6.4"
+   "version": "3.8.5"
   }
   }
  },
  },
  "nbformat": 4,
  "nbformat": 4,