- 博客(186)
- 资源 (14)
- 收藏
- 关注
转载 gbdt介绍
转自:前言: 决策树这种算法有着很多良好的特性,比如说训练时间复杂度较低,预测的过程比较快速,模型容易展示(容易将得到的决策树做成图片展示出来)等。但是同时,单决策树又有一些不好的地方,比如说容易over-fitting,虽然有一些方法,如剪枝可以减少这种情况,但是还是不够的。 模型组合(比如说有Boosting,Bagging等)与决策树相关的算法比较多,这些算法最终的结
2014-07-17 22:23:22
1559
转载 GBDT(MART) 迭代决策树入门教程 | 简介
在网上看到一篇对从代码层面理解gbdt比较好的文章,转载记录一下: GBDT(Gradient Boosting Decision Tree) 又叫 MART(Multiple Additive Regression Tree),是一种迭代的决策树算法,该算法由多棵决策树组成,所有树的结论累加起来做最终答案。它在被提出之初就和SVM一起被认为是泛化能力(g
2014-07-14 09:34:02
1192
原创 leetcode -day31 Subsets I II
1、SubsetsGiven a set of distinct integers, S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not contain duplicate subset
2014-06-18 17:17:44
1546
原创 leetcode -day30 Reverse Linked List II
1、Reverse Linked List II Reverse a linked list from position m to n. Do it in-place and in one-pass.For example:Given 1->2->3->4->5->NULL, m = 2 and n = 4,return 1->4->3->2->5->NULL.
2014-06-16 21:24:07
1299
原创 leetcode -day29 Binary Tree Inorder Traversal & Restore IP Addresses
1、Binary Tree Inorder TraversalGiven a binary tree, return the inorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return
2014-06-14 09:23:19
1242
原创 leetcode -day28 Unique Binary Search Trees I II
1、Unique Binary Search Trees IIGiven n, generate all structurally unique BST's (binary search trees) that store values 1...n.For example,Given n = 3, your program should return all 5 uni
2014-06-13 09:22:53
1058
原创 leetcode -day27 Recover Binary Search Tree & Interleaving String
1、Recover Binary Search TreeTwo elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(n) space is pretty
2014-06-04 10:17:42
1250
原创 leetcode -day26 Validate Binary Search Tree
1、Validate Binary Search TreeGiven a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node contains only nodes
2014-06-03 15:52:46
1066
原创 leetcodey -day25 Binary Tree Level Order Traversal & Symmetric Tree & Same Tree
1、Binary Tree Level Order TraversalGiven a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree {3,9
2014-06-02 21:48:02
1229
原创 leetcode -day24 Maximum Depth of Binary Tree & Binary Tree Zigzag Level Order Traversal
1、Maximum Depth of Binary TreeGiven a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.clas
2014-05-30 17:39:10
1223
原创 leetcode -day23 Construct Binary Tree from Inorder and Postorder Traversal & Construct Binary Tree f
1、Construct Binary Tree from Inorder and Postorder TraversalGiven inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in
2014-05-29 17:00:58
1724
原创 leetcode -day22 Binary Tree Level Order Traversal II & Convert Sorted Array to Binary Search Tree
1、Binary Tree Level Order Traversal IIGiven a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).For e
2014-05-26 09:27:31
1110
原创 leetcode -day21 Longest Substring Without Repeating Characters
1、Longest Substring Without Repeating CharactersGiven a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letter
2014-05-22 21:54:59
1077
原创 leetcode -day20 Add Two Numbers
1、Add Two Numbers You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two num
2014-05-20 22:03:02
1247
原创 leetcode -day19 Convert Sorted List to Binary Search Tree
1、Convert Sorted List to Binary Search Tree Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.分析:将一个升序排列的链表转换为平衡二叉搜索树,采用递归的方式,先找到链表
2014-05-19 13:22:03
1499
原创 leetcode -day18 Balanced Binary Tree
1、Balanced Binary TreeGiven a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subt
2014-05-18 21:39:15
1222
原创 leetcode -day17 Path Sum I II & Flatten Binary Tree to Linked List & Minimum Depth of Binary Tree
1、Path SumGiven a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.For example:Given the below
2014-05-17 09:33:25
1290
原创 leetcode -day16 ZigZag Conversion
1、ZigZag ConversionThe string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibili
2014-05-16 09:58:26
1497
转载 小白鼠与毒药解题过程分析
网上流传着一题淘宝面试题,原题如下:我们有很多瓶无色的液体,其中有一瓶是毒药,其它都是蒸馏水,实验的小白鼠喝了以后会在5分钟后死亡,而喝到蒸馏水的小白鼠则一切正常。现在有5只小白鼠,请问一下,我们用这五只小白鼠,5分钟的时间,能够检测多少瓶液体的成分()。A:5, B:6, C:31, D:32。+1只小白鼠首先可以想象只有1只小白鼠的情况,毫无疑问,1只小白鼠五分钟只能判
2014-05-14 18:57:14
1156
原创 leetcode -day 15 Distinct Subsequences
1、Distinct Subsequences Given a string S and a string T, count the number of distinct subsequences of T in S.A subsequence of a string is a new string which is formed from the original str
2014-05-14 10:42:19
1161
原创 leetcode -day14 Populating Next Right Pointers in Each Node I II
1、Populating Next Right Pointers in Each NodeGiven a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate
2014-05-13 11:03:48
968
原创 leetcode -day13 Valid Palindrome & Triangle & Pascal's Triangle I II
1、Valid PalindromeGiven a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Panama" is a palindrom
2014-05-12 10:59:50
1075
原创 leetcode --day12 Surrounded Regions & Sum Root to Leaf Numbers & Longest Consecutive Sequence
1、Surrounded RegionsGiven a 2D board containing 'X' and 'O', capture all regions surrounded by 'X'.A region is captured by flipping all 'O's into 'X's in that surrounded region.For e
2014-05-11 17:08:26
1086
原创 leetcode -day11 Clone Graph & Palindrome Partitioning I II
1、Clone GraphClone an undirected graph. Each node in the graph contains a label and a list of its neighbors.OJ's undirected graph serialization:Nodes are labeled uniquely.We use # as
2014-05-08 22:18:57
1134
原创 leetcode -day10 Word Ladder I II
1、Word LadderGiven two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that:Only one letter can be changed at a tim
2014-05-07 15:19:36
1227
原创 leetcode -day9 Candy & Gas Station & Binary Tree Maximum Path Sum
1、CandyThere are N children standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following requirements:Each child must h
2014-05-06 17:31:19
1074
原创 leetcode -day8 Copy List with Random Pointer & Single Number I II
五一中间断了几天,开始继续。。。1、Copy List with Random PointerA linked list is given such that each node contains an additional random pointer which could point to any node in the list or null.Return a
2014-05-05 14:21:12
1102
原创 leetcode day6 -- String to Integer (atoi) && Best Time to Buy and Sell Stock I II III
1、String to Integer (atoi)Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yours
2014-04-28 15:28:07
1261
原创 leetcode day5 -- Reorder List && Linked List Cycle II
1、Reorder List Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering the nodes' values.For example,Given {1,2
2014-04-28 10:01:59
873
原创 leetcode day4 -- Binary Tree Postorder(Preorder) Traversal && Edit Distance
1、Binary Tree Postorder Traversal Given a binary tree, return the postorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3retu
2014-04-27 10:56:07
1140
原创 leetcode day3 -- LRU Cache
1、LRU Cache Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set.get(key) - Get the value (will always be posi
2014-04-26 21:59:46
1051
原创 leetcode day2 -- Sort List && Insertion Sort List
1、Sort ListSort a linked list in O(n log n) time using constant space complexity.分析:对链表排序不是第一次见,但是这是对非排序链表,看复杂度O(nlgn),想到归并、快排、堆排等,但是对于链表不能随机存取,快排不适合。想到用归并的方法来实现,可以通过两个指针遍历求中点,将链表分成两端,分别排序,再
2014-04-25 15:10:33
1054
原创 leetcode day1 -- Reverse Words in a String && Evaluate Reverse Polish Notation && Max Points on a Li
以前从来没做过什么oj,发现做oj和在本地写代码或者纸上写差别还是很大的,觉得今天开始刷oj,特此记录一下。1、Reverse Words in a StringGiven an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue
2014-04-24 10:26:02
1146
转载 轻松搞定面试中的红黑树问题
版权所有,转载请注明出处,谢谢!http://blog.youkuaiyun.com/silangquan/article/details/18655795 连续两次面试都问到了红黑树,关键两次都没有答好,这次就完整地来学习整理一下。没有学习过红黑树的同学请参考:> Chapter 13 Red-Black Trees Chapter 14 Augmenting Dat
2014-04-22 17:38:57
965
转载 面试题整理18 根据上排给出十个数,在其下排填出对应的十个数
给你10分钟时间,根据上排给出十个数,在其下排填出对应的十个数 要求下排每个数都是先前上排那十个数在下排出现的次数。 上排的十个数如下: 【0,1,2,3,4,5,6,7,8,9】
2014-04-19 14:30:20
990
转载 精选30道Java笔试题解答
转自:http://www.cnblogs.com/lanxuezaipiao/p/3371224.html 精选30道Java笔试题解答 都是一些非常非常基础的题,是我最近参加各大IT公司笔试后靠记忆记下来的,经过整理献给与我一样参加各大IT校园招聘的同学们,纯考Java基础功底,老手们就不用进来了,
2014-04-16 20:44:11
889
原创 Mysql事务处理问题
今天和同学讨论起数据库事务处理的问题,感觉讨论中明白了一些,有些知识看过了,但是没有实际使用还是不理解。事务处理就是将一系列操作当做一个原子操作,要么全部执行成功,如果执行失败则保留执行期的状态。通过提交和回滚机制来实现操作,如果全部执行成功通过提交执行commit结果就会记录到数据库中,如果执行失败通过回滚操作rollback将发生错误之前的所有错误消除,回退到原来状态。事务都应该具备A
2014-04-10 20:26:39
1482
原创 sublime :[Decode error - output not utf-8]
点击运行出错提示:[Decode error - output not utf-8]这几天出现此问题有几种情况,在加了编码为utf-8时,通常是语法错误:(1)tab键和空格键混合选中一行,可以看到行前面空的是点还是线,如果发现既有线又有点,估计就是这问题了,导致缩进不一致解决方法:设置将tab键自动换为4个空格键点击 Preference -> Settings-Us
2014-04-08 22:47:01
1594
最新版本ffmpeg提取任意格式视频帧并保存
2013-09-08
ffmpeg-bin-lib-include
2013-09-08
CentOS-5.9-x86_64-bin-DVD
2013-08-26
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人