1. 文本表示:从one-hot到word2vec。
    1.1 词袋模型:离散、高维、稀疏。
    1.2 分布式表示:连续、低维、稠密。word2vec词向量原理并实践,用来表示文本。

    简单神经网络

    • 1. Word vectors
      • 1.1 传统词向量
        • 1.1.1 one-hot
        • 1.1.2 Bag-of-Words (BoW)
        • 1.1.2 TF-IDF
        • 1.1.3 Distributional Embeddings
      • 1.2 Neural Word Embeddings
        • 1.2.1 Word2Vec
          • a) Continuous bag-of-words (CBOW)
          • b) Continuous skip-gram
        • 1.2.2 GloVe
        • 1.2.3 FastText

1. Word vectors

把词变成计算机看的懂的语言就是词向量。
看这里:Understanding word vectors

1.1 传统词向量

1.1.1 one-hot

最简单的词向量之一叫one-hot encoded vectors。
譬如,有一组词{magic, dragon, king, queen},用one-hot表示:

For high-cardinality variables — those with many unique categories — the dimensionality of the transformed vector becomes unmanageable.
The mapping is completely uninformed: “similar” categories are not placed closer to each other in embedding space.

1.1.2 Bag-of-Words (BoW)

The limitation of this method is that it results in extremely large feature dimensions and sparse vectors. But this model can still be used when you want to create a baseline model in just a few lines of code and when your dataset is small.

1.1.2 TF-IDF

Term Frequency – Inverse Document Frequency

Albeit these two techniques helping solve many problems in NLP, they still didn’t capture the true meaning of words.

1.1.3 Distributional Embeddings

1.2 Neural Word Embeddings

While building word embeddings, we aim to develop dense vector representations which somehow capture their meaning in the different contexts they were seen in in the documents. here

1.2.1 Word2Vec

Word2Vec was developed by Tomas Mikolov in 2013 at Google.

a) Continuous bag-of-words (CBOW)

根据上下文猜特定词

b) Continuous skip-gram

用某词猜特定上下文

See the full example code in: tensorflow_word2vec_basic, tensorflow_word2vec

1.2.2 GloVe

1.2.3 FastText

awaiting…

【NLP】简单神经网络相关推荐

  1. 【NLP】神经网络基础组件

    [NLP]神经网络基础组件 神经网络基础组件 感知机:最简单的神经网络 激活函数 Sigmoid Tanh ReLU Softmax 损失函数 均方误差损失 类别交叉熵损失 二元交叉熵 深入监督学习 ...

  2. MNIST数据集合在PaddlePaddle环境下使用简单神经网络识别效果

    简 介: 通过PaddlePaddle构造的简单神经网络对于MNIST数据库进行实验,可以看到使用普通的稠密网络,便可以达到很高的识别效果.训练结果存在一定的随机性.这取决于训练其实的条件.由于在Pa ...

  3. tensorflow3 非线性回归、mnist、简单神经网络

    mnist数据集 手写数字的数据集. 60000行训练数据集,10000行测试数据集 下载地址:http://yann.lecun.com/exdb/mnist/index.html mnist数据集 ...

  4. python神经网络实例_Python编程实现的简单神经网络算法示例

    本文实例讲述了Python编程实现的简单神经网络算法.分享给大家供大家参考,具体如下: python实现二层神经网络 包括输入层和输出层 # -*- coding:utf-8 -*- #! pytho ...

  5. PyTorch入门(二)--实现简单神经网络

    实现简单神经网络 1. 神经网络基本介绍 2. Autograd包 3. 实现神经网络 3.1 定义神经网络与训练流程 3.2 运行神经网络与计算损失 3.3 反向传递与权值更新 3.4 神经网络中损 ...

  6. Python手撸机器学习系列(十五):简单神经网络

    目录 神经网络 1.简单算法推导 2.简单代码实现 3.矩阵形式优化 4.矩阵形式代码实现 神经网络 1.简单算法推导 搭建一个将二维平面坐标点分开的简单神经网络,输入维度为2*1(特征为2),神经网 ...

  7. 【深度学习】Numpy实现简单神经网络

    原文地址:点击访问 许久未更,是因为开学之后学习任务太充实了.每天都有做不完的事情,每件事情都又想把它做好. 我航中秋国庆假期长达8天,真应了那句话:该放的假一天不少,该补的课一次没有.期间,有多门作 ...

  8. 莫烦Python--Tensorflow(5):简单神经网络

    构建简单神经网络 import tensorflow as tf import numpy as np# creat data x_data = np.random.rand(100).astype( ...

  9. 【AI】利用简单神经网络做动作识别——基于coco关键点

    前言 coco数据集包含了关键点检测,如果想利用提取到的这些关键点做行为识别,该怎么办呢?下文主要通过搭建一个简单神经网络(多层感知机)来做关键点的分类. 任务:假如需要对打电话和玩手机的动作做分类. ...

最新文章

  1. iOS - OC - XML 解析 - NSXMLParser
  2. WM-Tcode集合
  3. php版本个版本区别,PHP版本不一样有什么区别
  4. 线程池,远没你想象的那么简单
  5. 解决苹果os 10.9 和 parallels desktop 8 兼容问题
  6. Flutter WillPopScope 双击返回与界面退出提示
  7. 犀牛插件-插件开发-rhino-插件开发形式
  8. 质因数分解-P1069 [NOIP2009 普及组] 细胞分裂
  9. Android 高德地图自定义定位图标的显示
  10. 如何顺利接手一个中途的项目
  11. Python 脚本帮你找出微信上删除了你的“好友“
  12. Simulink三相异步电机仿真
  13. heatmap热力图
  14. 把php放入火车头采集,火车头采集文章并导入帝国CMS
  15. 尚医通项目学习笔记Part1
  16. 导入mysql文件报错:ERROR: ASCII ‘\0‘ appeared in the statement, but this is not allowed unless option --bin
  17. 《刷新》读书笔记(一)
  18. listview简单应用之BaseAdapter(二)
  19. python 查看 文件MD5值
  20. docker 打包上传到仓库

热门文章

  1. 医学图像分割制作标签数据
  2. java ftp 设置编码_java ftp上传下载,下载文件编码设置
  3. 阿里云服务器宝塔面板设置FTP
  4. Vector3——简单的3D向量类
  5. 公园安防建设:如何基于EasyCVR技术打造城市公园智能化视频监控?
  6. Java面试知识点(全)- Java面试基础部分一
  7. SpringCloud Alibaba Sentinel实现熔断与限流-微服务(三十三)
  8. 关于腾讯buglly符号表问题
  9. word中的表格里面的字体居中
  10. 职业对口升学计算机英语2016,2016河南对口升学(英语).docx