Neural Network from Scratch in Cangjie: Part 1 - 仓颉从头开始的神经网络:第一部分

In this tutorial series, I will try to recreate an artificial neural network as described in the book Neural Networks from Scratch by Harrison Kinsley in Cangjie instead of Python starting from code for a single neuron, moving to layers of neurons, implement batching, activation and loss functions, backpropagation, and finally train it on actual data.

Introduction

I am sure many of you are familiar with the idea of neural networks (NN). Below is an example of a typical NN for binary classification. Here we have 5 layers. The first layer is the input layer of size 10 - your data (also called `features` or `X`).

Each input corresponds to a data point. For example, in a Twitter bot dataset, these features could be follower count, friends count, account age in hours, mean tweet length, etc. - all of which are important indicators of whether an account is a bot (1 or True) or human (0 or False) - your `y` (the predicted value).

Source: Bot or Not: an end-to-end data analysis in Python

It is important to note that values of X, or values of the input layer, need to be numeric or at least represented as such. For example, `diversity` feature in the image above refers to lexical diversity - the ratio of unique tokens to total tokens in a document - and not actual unique words.

Layers 2, 3, and 4 of size 16 are hidden layers (also referred to as `dense`)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值