当前位置:网站首页>Introduction to neural network (Part 2)
Introduction to neural network (Part 2)
2022-07-04 07:31:00 【Uncertainty!!】
Introduction to neural networks ( Next )
Note source :Neural Networks Demystified
Statement : I am Xiaobai , First time to learn relevant knowledge , This is a study note , If there is a mistake , Please correct me !
Observation = Signal + Noise
The model should adapt to the signal , Instead of adapting to noise
What is Noise in Machine Learning?
Humans are prone to making mistakes when collecting data, and data collection instruments may be unreliable, resulting in dataset errors. The errors are referred to as noise. Data noise in machine learning can cause problems since the algorithm interprets the noise as a pattern and can start generalizing from it. -- Excerpt from :What is Noise in Machine Learning
Machine learning noise detection and removal
PCA attempts to eliminate corrupted data from a signal or picture using preservative noise while maintaining the critical features– Excerpt from :What is Noise in Machine Learning
About PCA I wrote a note before , Portal : Principal component analysis (Principal Component Analysis,PCA)
1.1 Over fitting (Overfitting)
Over fitting phenomenon (Overfitting)
In mathematical modeling, overfitting is “the production of an analysis that corresponds too closely or exactly to a particular set of data, and may therefore fail to fit to additional data or predict future observations reliably” -- Excerpt from :Overfitting
The green line represents the fitting model ( That's a function ), It can well match the training data , But the dependence on training data is too high , Once the unknown data that is not in the training data is predicted, there will be a large deviation , The over fitting model lacks generalization ability
The black line represents the regularization model ( Improvement of over fitting model , Improve the generalization ability )
Add a set of data , Make the over fitting more obvious
After adding data , We retrain
Draw the graph after adding new data
New training model ( Surfaces ) as follows
Black dots are training set data
We found that some data have been inconsistent with the facts , This is caused by the over fitting of the model
As shown in the figure below , When Hours Sleep When fixed at a value , With Hours Study An increase in ,TestScore It will decrease first and then increase , This is obviously not in line with reality
1.2 Tested
How to detect whether the model is over fitted ?
First, we divide the data set into : Training set and test set
1. Training set
Your training data is a subset of your dataset that you use to teach a machine learning model to recognize patterns or perform your criteria. -- Excerpt from :What is Training Data?
2. Test set
Once your machine learning model is built (with your training data), you need unseen data to test your model. This data is called testing data, and you can use it to evaluate the performance and progress of your algorithms’ training and adjust or optimize it for improved results. -- Excerpt from :What is Testing Data?
Testing data has two main criteria. It should:
1.Represent the actual dataset
2.Be large enough to generate meaningful predictions
Content extension : Compare datasets (Contrastive dataset)
Assume you need to clean a noisy dataset that includes big background patterns as noise that a data scientist isn’t interested in. Then, using an adaptive noise cancellation approach, this method offers a solution by eliminating the noisy signal. This technique employs two signals: one is the target signal, and the other is a noise-free background signal.– Excerpt from :What is Noise in Machine Learning
The Fourier transform
Researches have already shown that our signal or data has a structure, we can remove noise from it directly. The Fourier Transform of the signal is used to translate the signal into the frequency domain in this process.– Excerpt from :What is Noise in Machine Learning
The Fourier transform of the signal often turns the signal to the frequency domain , So as to remove a corresponding noise
I wrote a note about Fourier transform before , Portal : Fourier series 、 The Fourier transform 、 spectrum
The following figure comes from LaTeX Studio
Original data set
Training set and test set
We have tested the fitting through the test set
1.3 Regularization (Regularization)
What is regularization?
Regularization is a process that changes the result answer to be “simpler”.– Excerpt from :Regularization
Regularization is to add a term to our cost function that penalizes overly complex models
Repair over fitting by regularization
Modify initialization function , add to lambda In the cost function J as well as dJdW1 and dJdW2 Add regular items to
Other functions have not been changed
stay trainer Add the following new content
All modifications are completed , Next, let's retrain
The following figure shows the errors of the model in the test set and the training set Our goal is to constantly adjust lambda bring Testing Error Gradually close Training Error, To improve the generalization ability of the model
Training error Is the average error of the model on the training set , The fitting of the model to the training set is measured . The large training error indicates that the characteristics of the training set are not learned enough , The training error is too small, which indicates that the characteristics of the training set are over learned , It's easy to get fitted .– Excerpt from Model evaluation —— Training error and test error 、 Over fitting and under fitting 、 Confusion matrix
Test error Is the average error of the model on the test set , The generalization ability of the model is measured . In practice , I hope the smaller the test error is, the better .– Excerpt from Model evaluation —— Training error and test error 、 Over fitting and under fitting 、 Confusion matrix
The model no longer fits all the data perfectly , This completes the repaired fitting
Corresponding contour chart
边栏推荐
- com. alibaba. nacos. api. exception. NacosException
- 如何用MOS管来实现电源防反接电路
- Would you like to go? Go! Don't hesitate if you like it
- How to send mail with Jianmu Ci
- Vulhub vulnerability recurrence 77_ zabbix
- Cell reports: Wei Fuwen group of the Institute of zoology, Chinese Academy of Sciences analyzes the function of seasonal changes in the intestinal flora of giant pandas
- 大厂技术专家:架构设计中常用的思维模型
- tornado项目之路由装饰器
- Directory of tornado
- Guoguo took you to write a linked list, and the primary school students said it was good after reading it
猜你喜欢
The cloud native programming challenge ended, and Alibaba cloud launched the first white paper on application liveliness technology in the field of cloud native
Boosting the Performance of Video Compression Artifact Reduction with Reference Frame Proposals and
L1-027 rental (20 points)
神经网络入门(下)
Introduction to deep learning Ann neural network parameter optimization problem (SGD, momentum, adagrad, rmsprop, Adam)
MySQL中的文本处理函数整理,收藏速查
时序数据库 InfluxDB 2.2 初探
提升复杂场景三维重建精度 | 基于PaddleSeg分割无人机遥感影像
Summary of MySQL common judgment functions!! Have you used it
BUUCTF(4)
随机推荐
Rhcsa day 3
【森城市】GIS数据漫谈(一)
Blog stop statement
This article is enough for learning advanced mysql
com. alibaba. nacos. api. exception. NacosException
Blue Bridge Cup Quick sort (code completion)
Text processing function sorting in mysql, quick search of collection
The most effective futures trend strategy: futures reverse merchandising
[Flink] temporal semantics and watermark
MySQL storage engine
电子协会 C语言 1级 35 、银行利息
在所有SwiftUI版本(1.0-4.0)中原生实现Charts图表视图之思路
The number of patent applications in China has again surpassed that of the United States and Japan, ranking first in the world for 11 consecutive years
Book list | as the technical support Party of the Winter Olympics, Alibaba cloud's technology is written in these books!
Rhcsa the next day
[MySQL transaction]
大学阶段总结
[Mori city] random talk on GIS data (I)
Amd RX 7000 Series graphics card product line exposure: two generations of core and process mix and match
[untitled] notice on holding "2022 traditional fermented food and modern brewing technology"