Skip to content

Commit

Permalink
Improvement to the 102 Notebook
Browse files Browse the repository at this point in the history
Add `ComputeModelStatistics` and simplify import.

Fixes #24.
  • Loading branch information
rastala authored and elibarzilay committed Jun 19, 2017
1 parent 71dec15 commit 2c9e3d0
Showing 1 changed file with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
},
"outputs": [],
"source": [
"from mmlspark.TrainRegressor import TrainRegressor\n",
"from mmlspark import TrainRegressor\n",
"from pyspark.ml.regression import LinearRegression\n",
"from pyspark.ml.feature import StringIndexer\n",
"# Convert columns to categorical\n",
Expand Down Expand Up @@ -123,6 +123,26 @@
"scoredData.limit(10).toPandas()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Compute model metrics against the entire scored dataset"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"from mmlspark import ComputeModelStatistics\n",
"metrics = ComputeModelStatistics().transform(scoredData)\n",
"metrics.toPandas()"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down

0 comments on commit 2c9e3d0

Please sign in to comment.