当前位置:网站首页>Basic concepts of NLP 1
Basic concepts of NLP 1
2022-07-25 12:15:00 【bolite】
notes : This note is from 《 Li Hongyi 2021/2022 Spring machine learning course 》p1-p4 What to learn
Reinforcement learning , Supervised learning , Unsupervised learning
Supervised learning
Supervised learning First by mark Correct Training set Training , After training “ Experience ” It's called a model , Then pass the unknown data into the model , The machine can pass through “ Experience ” Infer the correct result 
Unsupervised learning
Unsupervised learning It's essentially a Statistical means ( It can also be understood as a means of classification ), It has no purposeful way of training , You can't know in advance what the result is , therefore No need to label . Its principle is similar to regression in supervised learning , But there is no label in the regression results .
Reinforcement learning
Reinforcement learning It refers to the generalization ability of the computer to make correct solutions to problems that have not been learned , It can be understood as Reinforcement learning = Supervised learning + Unsupervised learning . Like supervised learning , It also needs human intervention .
Two major tasks of machine learning
1.Regression( Return to ) Is to find a function function, By inputting features x , Output a value Scalar .


2.Classification( classification ) It is to let the machine choose a task as output among the options set by human beings


Find the functional formula
1. First assume that the function tries Y=b+wX1(X For input in training data ,Y by X Corresponding output ,b and w Is an unknown parameter , The formula is a guess, not necessarily right , The following data can be modified after training )
2. Definition Loss function :L(b,w) The parameter is the previous b and w,Loss The output of the function indicates that the b and w When set to this value , Is the corresponding accuracy good or bad
Loss How to get the function : Can be x Input to a specific b and w Get the predicted y, Then the predicted y And the actual y The difference is absolutely worth it e, It will be all e Add to average .
3. Optimize

An optimization method —— Gradient descent method

My understanding is to beg Loss Function about w The slope of , When the slope is less than 0 When w Move forward , When the slope is less than 0 When w Just go back . Keep updating until you find the differential as 0 Or the number of initial setting updates reaches .
among , How much forward and backward depends on his differentiation and learning rate ( Red landau It means ,hyperparameter Set the value for yourself in the experiment , The learning rate here is set by ourselves )
The model is more complex
Because most of the models are not similar to this form of univariate quadratic function , So for finding functional 3 There are also some steps that need to be changed .
We can split a complex function into several simple functions and a constant : The red in the figure is the objective function , You can use a constant 0 and 3 Synthesis of blue functions with different labels .( black b Is constant , Green bi yes sigmoid The parameters of the function )
A curve similar to this radian , We can also take points on the curve , Then use the above method to get the result
About a single simple blue function
We can adjust constantly sigmoid function ( Activation function , It can also be represented by other activation functions ) Make him constantly change the corresponding single blue function 

Corresponding to the above simple model, the result after change (x Is the previous variable , Training input data )
Analyze the following formula

hypothesis i and j Only 1,2,3 Three data , Then the operation in blue brackets can be regarded as a matrix operation 
And then r The value of is carried into sigmoid Function 
Loss function Loss The variable of
Some changes need to be made on the input side of calculating the loss function
By the previous b,w Change to θ
θ Expressed as W, Green b,c, black b( All unknown parameters ) One dimensional vector composed of vertical arrangement
The remaining calculation method is the same as the previous 
neural network
When we get the first y The result of is passed into a new sigmoid Function , Form one or more new nested operations , It becomes a neural network . But it is not that the deeper the neural network is, the more accurate the result of the data is .
边栏推荐
- PHP curl post x-www-form-urlencoded
- 嵌套事务 UnexpectedRollbackException 分析与事务传播策略
- 【多模态】《HiT: Hierarchical Transformer with Momentum Contrast for Video-Text Retrieval》ICCV 2021
- [untitled]
- Zuul gateway use
- 【AI4Code】《GraphCodeBERT: Pre-Training Code Representations With DataFlow》 ICLR 2021
- 从云原生到智能化,深度解读行业首个「视频直播技术最佳实践图谱」
- 创新突破!亚信科技助力中国移动某省完成核心账务数据库自主可控改造
- flink sql client 连接mysql报错异常,如何解决?
- 【GCN多模态RS】《Pre-training Representations of Multi-modal Multi-query E-commerce Search》 KDD 2022
猜你喜欢

OSPF综合实验

那些离开网易的年轻人

Musk's "eternal soul": half hype, half flicker

【GCN-RS】MCL: Mixed-Centric Loss for Collaborative Filtering (WWW‘22)

Video Caption(跨模态视频摘要/字幕生成)

Pycharm connects to the remote server SSH -u reports an error: no such file or directory

马斯克的“灵魂永生”:一半炒作,一半忽悠

【CTR】《Towards Universal Sequence Representation Learning for Recommender Systems》 (KDD‘22)

Transformer variants (routing transformer, linformer, big bird)

Figure neural network for recommending system problems (imp-gcn, lr-gcn)
随机推荐
Those young people who left Netease
【CTR】《Towards Universal Sequence Representation Learning for Recommender Systems》 (KDD‘22)
dirReader. Readentries compatibility issues. Exception error domexception
Atomic atomic class
Week303 of leetcode (20220724)
R语言ggplot2可视化:使用ggpubr包的ggstripchart函数可视化点状条带图、设置palette参数配置不同水平数据点的颜色、设置add参数在点状条带图中添加均值标准差竖线
'C:\xampp\php\ext\php_ zip. Dll'-%1 is not a valid Win32 Application Solution
【AI4Code】《CodeBERT: A Pre-Trained Model for Programming and Natural Languages》 EMNLP 2020
Web programming (II) CGI related
Brpc source code analysis (V) -- detailed explanation of basic resource pool
keepalived实现mysql的高可用
Median (two point answer + two point search)
GPT plus money (OpenAI CLIP,DALL-E)
Data transmission under the same LAN based on tcp/ip
知识图谱用于推荐系统问题(MVIN,KERL,CKAN,KRED,GAEAT)
那些离开网易的年轻人
【图攻防】《Backdoor Attacks to Graph Neural Networks 》(SACMAT‘21)
图神经网络用于推荐系统问题(IMP-GCN,LR-GCN)
monit安装和使用
NLP knowledge - pytorch, back propagation, some small pieces of notes for predictive tasks