摘要: hive优化 group by 数据倾斜 join数据倾斜 多个job并行(union all) 减少job个数 python代码 #!/bin/bashimport sys; if __name__=='__main__': for line in sys.stdin: m=line.strip( 阅读全文
posted @ 2016-08-29 16:01 simple_wxl 阅读(454) 评论(0) 推荐(0) 编辑
摘要: 1、hashmap是线程不安全的,能够有key,value能有null hashtable是线程安全的,key,value不能有null 阅读全文
posted @ 2016-08-29 14:12 simple_wxl 阅读(199) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>#include<vector>#include<algorithm>#include<stdint.h>using namespace std;#include<list>#include<map>#include<queue>struct node{ int 阅读全文
posted @ 2016-07-11 20:28 simple_wxl 阅读(346) 评论(0) 推荐(0) 编辑
摘要: 本博文中含有来源多处的总结,没有能够将所有的来源引用 python中删除list中的元素方法:remove,pop,del str=[1,77,8,0] remove:按值删除 str.remove(8) pop:按索引删除,会返回被删除的元素 str.pop(2) del:按索引删除,还可以删除指 阅读全文
posted @ 2016-07-07 10:55 simple_wxl 阅读(348) 评论(0) 推荐(0) 编辑
摘要: RF随着树的增加不会过拟合 GBDT随着树的增加会过拟合 RF还会对特征进行random,例如特征的个数m=sqrt(原特征个数) RF的每个树都是随机选择m个样本(有放回的)和n个特征来进行构建 阅读全文
posted @ 2016-07-05 22:36 simple_wxl 阅读(764) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>#include<vector>#include<algorithm>#include<stdint.h>using namespace std;#include<list>#include<map>#include<queue> struct TreeNode 阅读全文
posted @ 2016-07-05 11:57 simple_wxl 阅读(143) 评论(0) 推荐(0) 编辑
摘要: /** * Definition of TreeNode: * class TreeNode { * public: * int val; * TreeNode *left, *right; * TreeNode(int val) { * this->val = val; * this->left = this->right... 阅读全文
posted @ 2016-07-04 21:14 simple_wxl 阅读(1352) 评论(0) 推荐(0) 编辑
摘要: 来源:http://hxraid.iteye.com/blog/649831 题目:在一个文件中有 10G 个整数,乱序排列,要求找出中位数。内存限制为 2G。只写出思路即可(内存限制为 2G的意思就是,可以使用2G的空间来运行程序,而不考虑这台机器上的其他软件的占用内存)。 分析: 既然要找中位数 阅读全文
posted @ 2016-07-03 22:25 simple_wxl 阅读(1998) 评论(2) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-07-03 21:28 simple_wxl 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 牛顿法推导 牛顿法相当于已知一点的函数值,一介函数值,二阶函数值,可以拟合出一个二次方程的曲线,然后二次方程的最低点也就是下一次更新的x值 但是会面对二阶导非正定的情况,加上hessen矩阵求非常麻烦,所以就有了拟牛顿BFGS B0的初始值,工程上不是I,取为yk/sk,也就是近似的二阶导 阅读全文
posted @ 2016-07-03 20:31 simple_wxl 阅读(211) 评论(0) 推荐(0) 编辑