0% found this document useful (0 votes)
102 views1 page

Binary Classification

In binary classification, the model predicts a discrete output value of either 1 or 0. For example, whether an account was hacked or not, or if a tumor is malignant or benign. The document describes classifying images as either a cat or not a cat. An image is represented by 3 matrices for red, green, and blue color channels. These are flattened into a feature vector with dimensions equal to the number of pixels times 3 for the color channels, which is then used to train a classifier to predict the label.

Uploaded by

Edward Kennway
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
102 views1 page

Binary Classification

In binary classification, the model predicts a discrete output value of either 1 or 0. For example, whether an account was hacked or not, or if a tumor is malignant or benign. The document describes classifying images as either a cat or not a cat. An image is represented by 3 matrices for red, green, and blue color channels. These are flattened into a feature vector with dimensions equal to the number of pixels times 3 for the color channels, which is then used to train a classifier to predict the label.

Uploaded by

Edward Kennway
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Binary Classification

In a binary classification problem, the result is a discrete value output.

For example - account hacked (1) or compromised (0)


- a tumor malign (1) or benign (0)

Example: Cat vs Non-Cat


The goal is to train a classifier that the input is an image represented by a feature vector, 𝑥, and predicts
whether the corresponding label 𝑦 is 1 or 0. In this case, whether this is a cat image (1) or a non-cat image
(0).

64

64

An image is store in the computer in three separate matrices corresponding to the Red, Green, and Blue
color channels of the image. The three matrices have the same size as the image, for example, the
resolution of the cat image is 64 pixels X 64 pixels, the three matrices (RGB) are 64 X 64 each.

The value in a cell represents the pixel intensity which will be used to create a feature vector of n-
dimension. In pattern recognition and machine learning, a feature vector represents an object, in this
case, a cat or no cat.

To create a feature vector, 𝑥, the pixel intensity values will be “unroll” or “reshape” for each color. The
dimension of the input feature vector 𝑥 is 𝑛𝑥 = 64 𝑥 64 𝑥 3 = 12 288.

red

green

blue

You might also like