贝叶斯分类(classify-20newsgroups)

原创文章,转载请注明: 转载自慢慢的回味

本文链接地址: 贝叶斯分类(classify-20newsgroups)

一 理论分析

Tackling the Poor Assumptions of Naive Bayes Text Classifiers

贝叶斯的多项式模型如下公式。表示一个文档由一系列单词构成。为在类c的条件下,当前文档为文档d的概率。

表示类c的参数向量,表示文档共有m个类,一个类向量由n个单词的概率参数表示。如表示类c中单词i的概率。

为了求文档d的似然概率,通常再加上类c的先验概率就可得到d的似然函数。不过往往先验概率都相同。
继续阅读“贝叶斯分类(classify-20newsgroups)”本作品采用知识共享署名 4.0 国际许可协议进行许可。

Lesson 47 CG Vertex Shader

原创文章,转载请注明: 转载自慢慢的回味

本文链接地址: Lesson 47 CG Vertex Shader

Using vertex and fragment (or pixel) shaders to do some rendering dirty work can have numerous benefits. The most obvious is the movement of some of the graphics related CPU load off the CPU and onto the GPU. Cg provides a (reasonably) simple language for writing very powerful shaders. This tutorial has multiple aims. The first is to present a simple vertex shader that actually does something, without introducing unnecessary lighting etc… The second is to provide the basic mechanism for running the vertex shader with visible results using OpenGL. As such, it is aimed at the beginner interested in Cg who has a little experience in OpenGL. This tutorial was written by Owen Bourne. If you enjoy it, please take the time to email him and let him know!本作品采用知识共享署名 4.0 国际许可协议进行许可。