当前位置:网站首页>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 .
边栏推荐
- R语言ggpubr包ggarrange函数将多幅图像组合起来、annotate_figure函数为组合图像添加注释、注解、标注信息、fig.lab参数添加图像标签、fig.lab.face参数指定样式
- Intelligent information retrieval (overview of intelligent information retrieval)
- 【Debias】Model-Agnostic Counterfactual Reasoning for Eliminating Popularity Bias in RS(KDD‘21)
- 【GCN-RS】MCL: Mixed-Centric Loss for Collaborative Filtering (WWW‘22)
- Ups and downs of Apple's supply chain in the past decade: foreign head teachers and their Chinese students
- Introduction to redis
- 创新突破!亚信科技助力中国移动某省完成核心账务数据库自主可控改造
- 【GCN-CTR】DC-GNN: Decoupled GNN for Improving and Accelerating Large-Scale E-commerce Retrieval WWW22
- [high concurrency] I summarized the best learning route of concurrent programming with 10 diagrams!! (recommended Collection)
- GPT plus money (OpenAI CLIP,DALL-E)
猜你喜欢

通过Referer请求头实现防盗链

Transformer variants (spark transformer, longformer, switch transformer)

PHP curl post length required error setting header header

2.1.2 机器学习的应用

【AI4Code】《InferCode: Self-Supervised Learning of Code Representations by Predicting Subtrees》ICSE‘21

【对比学习】Understanding the Behaviour of Contrastive Loss (CVPR‘21)

Meta-learning(元学习与少样本学习)

嵌套事务 UnexpectedRollbackException 分析与事务传播策略

【黑马早报】运营23年,易趣网宣布关停;蔚来对大众CEO抛出橄榄枝;华为天才少年曾放弃360万年薪;尹烨回应饶毅炮轰其伪科学...

Resttemplate and ribbon are easy to use
随机推荐
After having a meal with trump, I wrote this article
【黑马早报】运营23年,易趣网宣布关停;蔚来对大众CEO抛出橄榄枝;华为天才少年曾放弃360万年薪;尹烨回应饶毅炮轰其伪科学...
Go garbage collector Guide
[multimodal] transferrec: learning transferable recommendation from texture of modality feedback arXiv '22
创新突破!亚信科技助力中国移动某省完成核心账务数据库自主可控改造
Ansible
[untitled]
Median (二分答案 + 二分查找)
Client open download, welcome to try
Learning to Pre-train Graph Neural Networks(图预训练与微调差异)
Hardware connection server TCP communication protocol gateway
Web programming (II) CGI related
对比学习的应用(LCGNN,VideoMoCo,GraphCL,XMC-GAN)
Zuul网关使用
Pycharm connects to the remote server SSH -u reports an error: no such file or directory
Atomic 原子类
Transformer variants (spark transformer, longformer, switch transformer)
logstash
R语言组间均值是否相同的成对比较:使用pairwise.t.test函数执行多个分组数据均值的两两成对假设检验
flink sql client 连接mysql报错异常,如何解决?