Coder Social home page Coder Social logo

pla's Introduction

PLA的基本思路

  • 每个特征都有权重,表示该特征的重要程度,当综合所有的特征与权重计算一个最终分分数,当这个分数超过某个阈值,表示成功,否则表示失败

PLA的算法步骤

  • step1: 随便找一条直线,记随便找一个n维向量w,赋初值
  • step2: 如果这条直线正好把训练数据正确切分,训练结束
  • step3: 如果有一个样本没有被正确的切分,即在权值计算中对权值进行一些修正
  • step4: 跳转到step2

数据结构

******************************
* age * price ***   click    *
******************************
* 23  * 234   ***    1       *
* 12  * 435   ***   -1       *
* 45  * 264   ***    1       *
******************************

数据的合成

本次实验数据是用一个公式 3.14x + 2.3y - 1000合成的数据,并且将数据保存在一个xls文件当中,然后在从这个文件获得数据。

权值修正方法

wi = wi + weight_change weight_change = learning_rate(label - prediction) label: 代表的就是click prediction: 代表的就是你这个预测的值

具体参考博客

一定要看博客:http://geek.csdn.net/news/detail/172477

最终结果

pla's People

Contributors

derfei avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.