09.05.2023 Views

pdfcoffee

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 3

The graph shows the flow of data, ops, and nodes used in the whole process. To get

the TensorBoard graph for the estimator, you just need to define model_dir while

instantiating the Estimator class:

linear_est = tf.estimator.LinearRegressor(feature_columns=feature_

columns, model_dir = 'logs/func/')

Classification tasks and decision

boundaries

In the preceding section, we learned about the task of regression or prediction. In

this section we will talk about another important task: the task of classification. Let

us first understand the difference between regression (also sometimes referred to

as prediction) and classification:

• In classification the data is grouped into classes/categories, while in

regression the aim is to get a continuous numerical value for given data.

• For example, identifying the number of handwritten digits is a classification

task; all handwritten digits will belong to one of the ten numbers lying

between [0-9]. The task of predicting the price of the house depending upon

different input variables is a regression task.

• In the classification task, the model finds the decision boundaries separating

one class from another. In the regression task, the model approximates

a function that fits the input-output relationship.

• Classification is a subset of regression; here we are predicting classes.

Regression is much more general.

The following figure shows how the two classification and regression tasks differ. In

classification we need to find a line (or a plane or hyperplane in multidimensional

space) separating the classes.

[ 101 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!