zoukankan      html  css  js  c++  java
  • 【Machine Learning】决策树之简介(1)

    Content

    1.decision tree representation
    2.ID3:a top down learning algorithm
    3.expressiveness of data 可表达性
    4.bias of ID3 偏差
    5.best attributes 最佳属性
    Gain(S,A) 信息增益
    6.dealing with overfitting 避免过拟合

    一、简介 Decision Trees (决策树)

    1.1 Steps

    1.pick best attribute(挑选最佳属性)

    2.Ask Question

    3.follow the answer path

    4.repeat,go back to 1 until got an answer

    1.2 决策树可表达性

    • A AND B

    • A XOR B 异或

    exclusive OR,或缩写成xor异或(xor)

    理解:

    1.异或的数学符号为“⊕”,即模2加

    2.相异出 “或”的结果—— 1 (理解简记法)

    3.当人们英语表达的 or —— means either……or ,actually it's xor in math

    eg. 你是想去游泳,还是想去看电影?

    二者选其一,相异时output 为1。(你不可能同时去两个地方,相同时output为0)

    二、决策树算法之ID3

    三、其他注意事项

    3.1 when do we stop?

    1.what about noise

    2.overfitting(过拟合)

    树过大,过复杂,违反了奥卡姆剃刀定律

    3.哪些方法可以帮助避免过拟合?

    1)交叉验证(cross-validation)

    2)剪枝(Pruning)——缩小决策树

    3)output : vote

    3.2 在同一路径上重复一个询问属性有意义吗?

    解答:

    1.对于非连续属性,没必要

    2.对于连续属性,有必要

    例如 属性为age ,node:20<age<30?

    if no ,则还需要再问询age属性
    eg. node: age<20?

  • 相关阅读:
    熟悉常用的HBase操作,编写MapReduce作业
    爬虫大作业
    熟悉常用的HDFS操作
    数据结构化与保存
    获取全部校园新闻
    爬取校园新闻首页的新闻
    网络爬虫基础练习
    leetcode
    归并排序
    选择排序法
  • 原文地址:https://www.cnblogs.com/Neo007/p/8257295.html
Copyright © 2011-2022 走看看