Basics of Neural Network Programming - Binary Classification

This article is the notes when I learn the class "Neural Networks & Deep Learning" by teacher Andrew Ng. It shows info of Binary classification which is the basics of Neural Network Programming. Shares it with you and hope it helps.


Here's an example of a binary classification problem.

Figure-1

You might have an input of an image like the left of figure-1, and want to output a label to recognize this image as being either a cat (y=1) or non-cat (y=0).

Let's look at how an image is represented in a computer. An image is store in the computer in three separate matrices corresponding to the Red, Green, and Blue color channels of the image (as the right of figure-1). 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 (Note:5 x 4 only for demo purpose). The value in a cell represents the pixel intensity which will be used to create a feature vector of n-dimension.

Figure-2

Logistic regression is an algorithm of binary classification. To use logistic regression, we need create a feature vector, 𝑥. The pixel intensity values will be “unroll” or “reshape” for each color, as shown in figure-2. The dimension of the input feature vector 𝑥 is n_{x}=64\times 64\times 3=12,288.

In binary classification, 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).

Let's now lay out some of the notations we'll use next:

<end>

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值