07 2016 档案
摘要:#include<iostream>#include<vector>#include<algorithm>#include<stdint.h>using namespace std;#include<list>#include<map>#include<queue>struct node{ int
阅读全文
摘要:本博文中含有来源多处的总结,没有能够将所有的来源引用 python中删除list中的元素方法:remove,pop,del str=[1,77,8,0] remove:按值删除 str.remove(8) pop:按索引删除,会返回被删除的元素 str.pop(2) del:按索引删除,还可以删除指
阅读全文
摘要:RF随着树的增加不会过拟合 GBDT随着树的增加会过拟合 RF还会对特征进行random,例如特征的个数m=sqrt(原特征个数) RF的每个树都是随机选择m个样本(有放回的)和n个特征来进行构建
阅读全文
摘要:#include<iostream>#include<vector>#include<algorithm>#include<stdint.h>using namespace std;#include<list>#include<map>#include<queue> struct TreeNode
阅读全文
摘要:/** * Definition of TreeNode: * class TreeNode { * public: * int val; * TreeNode *left, *right; * TreeNode(int val) { * this->val = val; * this->left = this->right...
阅读全文
摘要:来源:http://hxraid.iteye.com/blog/649831 题目:在一个文件中有 10G 个整数,乱序排列,要求找出中位数。内存限制为 2G。只写出思路即可(内存限制为 2G的意思就是,可以使用2G的空间来运行程序,而不考虑这台机器上的其他软件的占用内存)。 分析: 既然要找中位数
阅读全文
摘要:牛顿法推导 牛顿法相当于已知一点的函数值,一介函数值,二阶函数值,可以拟合出一个二次方程的曲线,然后二次方程的最低点也就是下一次更新的x值 但是会面对二阶导非正定的情况,加上hessen矩阵求非常麻烦,所以就有了拟牛顿BFGS B0的初始值,工程上不是I,取为yk/sk,也就是近似的二阶导
阅读全文
摘要:list是双向链表,map保存key对应到list中的迭代器的位置,list保存<key,value>
阅读全文
摘要:#include<iostream>#include<vector>#include<queue>#include<string>#include<map>using namespace std;struct node{ int val; node * left,*right; node(int _
阅读全文
摘要:int getposition(int arr[],int left,int right) { int tmp=arr[left]; while(left<right) { while(left<right&&arr[right]>=tmp) right--; arr[left]=arr[right
阅读全文

浙公网安备 33010602011771号