[Python / Machine Learning] Why Deep Learning # 1 Perceptron Neural Network

Introduction

Keep a record of your learning to become a machine learning engineer. I will write it constantly.

This time, I will explain the perceptron and neural network that are the basis of deep learning.

Caution

This article is a memo that I have learned while reading "Deep Learning from Zero" (Author: Mr. Yasuki Saito). Please do not take the content and read it as a reference until you get tired of it. (Points and questions are welcome, but only in gentle words.) Link: Deep Learning from scratch

table of contents

・ What is Perceptron? ・ What is a neural network?

Of this article

What is Perceptron?

It is an algorithm that returns one output for multiple inputs. It's like AND / OR / NAND in logic circuits. Deep learning, which is also a neural network, is based on this algorithm.

image.png

#Write an AND circuit with 2 inputs with a perceptron
def AND(x1,x2,bias=0.5):
    tmp = w1*x1 +w2*x2 - bias
    if tmp <= 0:
        return 0
    elif tmp > 0:
        return 1   

The variables that affect the output are the input value, weight, and bias. These are called parameters. The neural network adjusts the parameters and trains them.

What is a neural network?

image.png Looking at the figure, it looks like a multi-layer perceptron. However, there is a big difference from Perceptron.

Using a non-linear activation function

What is the activation function?

The total of the input signals (input value, bias, weight) changes with the threshold value as the boundary. (set a fire) Perceptron also has an activation function that does not change anything, In neural networks, the type of activation function changes depending on the classification problem and regression problem.

Why we need an activation function

By having an activation function, more various values can be output. In addition to adjusting the input value, weight, and bias, the output value can be changed by changing the function.

Non-linear function

Whether it's a classification problem or a regression problem, the purpose of machine learning is to improve accuracy. Therefore, it is necessary to find the optimum value for the parameter while adjusting the weight and bias. The fine-tuning cannot be solved by linear functions. (Because changing the value a little will make a big difference) It can be solved by using a non-linear function.

Recommended Posts

[Python / Machine Learning] Why Deep Learning # 1 Perceptron Neural Network
Python & Machine Learning Study Memo ③: Neural Network
Python Deep Learning
Deep learning × Python
Why Python is chosen for machine learning
Chapter 7 [Neural Network Deep Learning] P252 ~ 275 (first half) [Learn by moving with Python! New machine learning textbook]
Python: Deep Learning Practices
Python learning memo for machine learning by Chainer Chapter 13 Neural network training ~ Chainer completed
[Note] Python, when starting machine learning / deep learning [Links]
Python: Deep Learning Tuning
Python vs Ruby "Deep Learning from scratch" Chapter 3 Implementation of 3-layer neural network
[Deep Learning] Execute SONY neural network console from CUI
Three Reasons Why Machine Learning Learners Should Use Python
Neural network with Python (scikit-learn)
Machine learning with Python! Preparation
Python Machine Learning Programming> Keywords
Machine learning algorithm (simple perceptron)
Neural network implementation in python
Beginning with Python machine learning
Try to build a deep learning / neural network with scratch
Non-information graduate student studied machine learning from scratch # 2: Neural network
[Deep learning] Image classification with convolutional neural network [DW day 4]
Neural network with OpenCV 3 and Python 3
Machine learning with python (1) Overall classification
Machine learning summary by Python beginners
PRML Chapter 5 Neural Network Python Implementation
Perceptron learning experiment learned with Python
<For beginners> python library <For machine learning>
Organize machine learning and deep learning platforms
Python: Preprocessing in Machine Learning: Overview
Implemented Perceptron learning rules in Python
"Scraping & machine learning with Python" Learning memo
(python) Deep Learning Library Chainer Basics Basics
Lua version Deep Learning from scratch Part 6 [Neural network inference processing]
Multi Layer Perceptron for Deep Learning (Deep Learning with Python; MPS Yokohama Deep Learning Series)
Machine learning beginners take Coursera's Deep learning course
Notes on PyQ machine learning python grammar
Amplify images for machine learning with python
Use machine learning APIs A3RT from Python
Machine learning with python (2) Simple regression analysis
I installed Python 3.5.1 to study machine learning
Implementation of 3-layer neural network (no learning)
[python] Frequently used techniques in machine learning
"Python Machine Learning Programming" Summary Note (Jupyter)
Python vs Ruby "Deep Learning from scratch" Chapter 2 Logic circuit by Perceptron
Python: Preprocessing in machine learning: Data acquisition
Machine learning
[Shakyo] Encounter with Python for machine learning
[Python] First data analysis / machine learning (Kaggle)
python learning
Python: Gender Identification (Deep Learning Development) Part 1
Python: Gender Identification (Deep Learning Development) Part 2
[Python] When an amateur starts machine learning
[Python] Web application design for machine learning
Python and machine learning environment construction (macOS)
Python learning memo for machine learning by Chainer Chapter 13 Basics of neural networks
An introduction to Python for machine learning
[Python] Saving learning results (models) in machine learning
Python: Preprocessing in machine learning: Data conversion
Deep Learning
Python & Machine Learning Study Memo ④: Machine Learning by Backpropagation