上一页 1 2 3 4 5 6 7 ··· 18 下一页
摘要: 题目描述: Write a function that takes a string as input and returns the string reversed. Example:Given s = "hello", return "olleh". 解题思路: 见代码。 代码如下: 阅读全文
posted @ 2016-07-14 00:14 scottwang 阅读(528) 评论(0) 推荐(0) 编辑
摘要: 正则化方法:防止过拟合,提高泛化能力 在训练数据不够多时,或者overtraining时,常常会导致overfitting(过拟合)。其直观的表现如下图所示,随着训练过程的进行,模型复杂度增加,在training data上的error渐渐减小,但是在验证集上的error却反而渐渐增大——因为训练出 阅读全文
posted @ 2016-05-13 19:50 scottwang 阅读(857) 评论(0) 推荐(0) 编辑
摘要: Jackknife,Bootstraping, bagging, boosting, AdaBoosting, Rand forest 和 gradient boosting 这些术语,我经常搞混淆,现在把它们放在一起,以示区别。(部分文字来自网络,由于是之前记的笔记,忘记来源了,特此向作者抱歉) 阅读全文
posted @ 2016-05-13 16:51 scottwang 阅读(293) 评论(0) 推荐(0) 编辑
摘要: 传统的神经网络中采用的是BP算法,存在的主要问题: 数据获取问题 我们需要依赖于有标签的数据才能进行训练。然而有标签的数据通常是稀缺的,因此对于许多问题,我们很难获得足够多的样本来拟合一个复杂模型的参数。例如,考虑到深度网络具有强大的表达能力,在不充足的数据上进行训练将会导致过拟合。 局部极值问题 阅读全文
posted @ 2016-04-08 12:14 scottwang 阅读(3471) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For example,Given n = 3, there are a total of 5 uniqu 阅读全文
posted @ 2016-04-03 19:18 scottwang 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given an array of integers, every element appears three times except for one. Find that single one. 解题思路: 具体参考Detailed explanation and generaliz 阅读全文
posted @ 2016-04-03 18:28 scottwang 阅读(304) 评论(0) 推荐(0) 编辑
摘要: 深度优先遍历 1.深度优先遍历的递归定义 假设给定图G的初态是所有顶点均未曾访问过。在G中任选一顶点v为初始出发点(源点),则深度优先遍历可定义如下:首先访问出发点v,并将其标记为已访问过;然后依次从v出发搜索v的每个邻接点w。若w未曾访问过,则以w为新的出发点继续进行深度优先遍历,直至图中所有和源 阅读全文
posted @ 2016-03-28 15:17 scottwang 阅读(709) 评论(0) 推荐(0) 编辑
摘要: 题目描述: The thief has found himself a new place for his thievery again. There is only one entrance to this area, called the "root." Besides the root, ea 阅读全文
posted @ 2016-03-24 23:11 scottwang 阅读(1210) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a string array words, find the maximum value of length(word[i]) * length(word[j]) where the two words do not share common letters. You may 阅读全文
posted @ 2016-03-24 15:47 scottwang 阅读(724) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a binary tree, return the inorder traversal of its nodes' values. For example:Given binary tree {1,#,2,3}, return [1,3,2]. 解题思路: 使用栈。从根节点开 阅读全文
posted @ 2016-03-23 15:32 scottwang 阅读(169) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 18 下一页