摘要:
决策树(Decision Tree)是在已知各种情况发生概率的基础上,通过构成决策树来求取净现值的期望值大于等于零的概率,评价项目风险,判断其可行性的决策分析方法,是直观运用概率分析的一种图解法 决策树分类器就像带有终止块的流程图,终止块标示分类结果。开始处理数据集时,我们首先需要测量集合中数...
阅读全文
posted @ 2016-01-26 11:31
充实自己
阅读(220)
推荐(0)
摘要:
工作原理: 给定一个训练数据集,对新的输入实例,在训练数据集中找到与该实例最邻近的K个实例(也就是上面所说的K个邻居), 这K个实例的多数属于某个类,就把该输入实例分类到这个类中。代码实例:kNN.pyfrom numpy import *import operatordef createData...
阅读全文
posted @ 2016-01-22 11:38
充实自己
阅读(162)
推荐(0)
摘要:
multiple flowsA single Flume agent can contain several independent flows. You can list multiple sources, sinks and channels in a config. These compone...
阅读全文
posted @ 2015-11-30 19:45
充实自己
阅读(231)
推荐(0)
摘要:
抓取文件import shutil, tempfile, subprocessdef _fetch_file(host, user, filename): """Function to fetch a file from the server and copy it to the loc...
阅读全文
posted @ 2015-11-06 16:32
充实自己
阅读(625)
推荐(0)
摘要:
os.path>>> import os>>> os.path.dirname('/opt/mysql/data/ibdata1')'/opt/mysql/data'>>> os.path.dirname('ibdata1')''>>> os.path.abspath('ibdata1')'/opt...
阅读全文
posted @ 2015-11-06 11:45
充实自己
阅读(159)
推荐(0)
摘要:
1、MySQLdb模块下载安装 下载地址: http://sourceforge.net/projects/mysql-python/files/mysql-python/1.2.3/ 安装: 官网: MySQL-3.23 through 5.5 and Python-2.4 through 2.7
阅读全文
posted @ 2015-11-04 17:29
充实自己
阅读(306)
推荐(0)
摘要:
1、环境centos 72、配置master修改/etc/my.cnf增加[mysqld]log-bin = master-binlog-bin-index = master-bin.indexserver-id = 1 3、master创建一个复制用户CREATE USER repl_user;...
阅读全文
posted @ 2015-11-03 11:03
充实自己
阅读(317)
推荐(0)
摘要:
准备 mysql5.5需要使用cmake安装 下载: cmake-3.2.2-Linux-x86_64.tar.gz 解压 1、创建mysql用户 2、目录创建 3、解压安装包 4、编译 5、初始化数据库 6、设置mysql开机启动 7、配置环境变量 8、启动mysql 9、重启、关闭 10、设置r
阅读全文
posted @ 2015-10-30 15:03
充实自己
阅读(381)
推荐(0)
摘要:
maven依赖 2.8.0 org.apache.curator curator-framework ${curator.version} org.apache.curator curator...
阅读全文
posted @ 2015-10-19 19:46
充实自己
阅读(368)
推荐(0)
摘要:
查看目录[zk: localhost:2181(CONNECTED) 0] ls /[zookeeper, example1, example2]创建节点创建一个test1节点以及与它关联的字符串:[zk: localhost:2181(CONNECTED) 0] create /test1 myD...
阅读全文
posted @ 2015-10-19 19:44
充实自己
阅读(187)
推荐(0)