Skip to content

Commit 87a4c45

Browse files
author
Becca McHenry
committed
undo 01 change
1 parent 010783e commit 87a4c45

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

machine-learning/01-Intro to Machine Learning.ipynb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@
135135
"metadata": {},
136136
"source": [
137137
"Now we are ready to write the code to achieve the machine learning task we need to do. Always start with creating the [MLContext](https://docs.microsoft.com/dotnet/api/microsoft.ml.mlcontext?view=ml-dotnet) which is the common context for all ML.NET operations"
138+
138139
]
139140
},
140141
{
@@ -247,6 +248,7 @@
247248
"metadata": {},
248249
"source": [
249250
"Now we have the data ready, next we'll create the ML.NET pipeline specifying the trainer we are going to use to build our machine learning model. For house price prediction, we are going to use the regression trainer. ML.NET supports other machine learning trainers which can be used for other scenarios as needed. The pipeline will create what is called [Estimator](https://docs.microsoft.com/dotnet/api/microsoft.ml.iestimator-1?view=ml-dotnet) which used to define the operations applied to the data"
251+
250252
]
251253
},
252254
{
@@ -269,6 +271,7 @@
269271
"metadata": {},
270272
"source": [
271273
"After creating the estimator, we are ready to apply the transformations and trainer defined in the pipeline to the data. To do that, call the [Fit](https://docs.microsoft.com/dotnet/api/microsoft.ml.iestimator-1.fit?view=ml-dotnet) method."
274+
272275
]
273276
},
274277
{
@@ -334,7 +337,7 @@
334337
{
335338
"output_type": "execute_result",
336339
"data": {
337-
"text/plain": "Coefficient of determination for the trained model: 0.98\r\n"
340+
"text/plain": "Coefficient of determination for the trained model: 0.97\r\n"
338341
},
339342
"execution_count": 1,
340343
"metadata": {}
@@ -346,6 +349,7 @@
346349
"metadata": {},
347350
"source": [
348351
"Now we have the trained model ready for prediction. Let's use this model to predict a sample house price. We do that by creating the the prediction engine [PredictionEngine<TSrc,TDst>](https://docs.microsoft.com/dotnet/api/microsoft.ml.predictionengine-2?view=ml-dotnet). The prediction engine is the class for making single predictions on a previously trained model (and preceding transform pipeline). Creation of the prediction engine from the trained model can be done by the following code:"
352+
349353
]
350354
},
351355
{
@@ -385,7 +389,7 @@
385389
{
386390
"output_type": "execute_result",
387391
"data": {
388-
"text/plain": "Predicted price for size: 2500 sq ft= $276.50k\r\n"
392+
"text/plain": "Predicted price for size: 2500 sq ft= $275.99k\r\n"
389393
},
390394
"execution_count": 1,
391395
"metadata": {}

0 commit comments

Comments
 (0)