上一页 1 2 3 4 5 6 7 8 9 ··· 18 下一页
摘要: 转自:http://www.cnblogs.com/zhangziqiu/archive/2011/03/30/ComputerCode.html 一. 机器数和真值 在学习原码, 反码和补码之前, 需要先了解机器数和真值的概念. 1、机器数 一个数在计算机中的二进制表示形式, 叫做这个数的机器数。 阅读全文
posted @ 2016-03-03 23:56 scottwang 阅读(367) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given an array of integers, every element appears twice except for one. Find that single one. 解题思路: 参考别人的想法,用异或的方法实在是太绝了。A ^ A = 0 and A ^ B ^ A 阅读全文
posted @ 2016-02-26 23:49 scottwang 阅读(224) 评论(0) 推荐(0) 编辑
摘要: 1.原始问题 假设是定义在上的连续可微函数(为什么要求连续可微呢,后面再说,这里不用多想),考虑约束最优化问题: 称为约束最优化问题的原始问题。 现在如果不考虑约束条件,原始问题就是: 因为假设其连续可微,利用高中的知识,对求导数,然后令导数为0,就可解出最优解,很easy. 那么,问题来了(呵呵。 阅读全文
posted @ 2016-02-26 12:53 scottwang 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 前言: 决策树这种算法有着很多良好的特性,比如说训练时间复杂度较低,预测的过程比较快速,模型容易展示(容易将得到的决策树做成图片展示出来)等。但是同时,单决策树又有一些不好的地方,比如说容易over-fitting,虽然有一些方法,如剪枝可以减少这种情况,但是还是不够的。 模型组合(比如说有Boos 阅读全文
posted @ 2016-02-25 15:41 scottwang 阅读(352) 评论(0) 推荐(0) 编辑
摘要: GBDT(Gradient Boosting Decision Tree)算法参考:http://blog.csdn.net/dark_scope/article/details/24863289 理解机器学习算法:http://blog.csdn.net/dark_scope/article/de 阅读全文
posted @ 2016-02-22 21:48 scottwang 阅读(452) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Compare two version numbers version1 and version2.If version1 > version2 return 1, if version1 < version2 return -1, otherwise return 0. You may 阅读全文
posted @ 2016-02-22 14:54 scottwang 阅读(519) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4 阅读全文
posted @ 2016-02-22 14:21 scottwang 阅读(245) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a positive integer, return its corresponding column title as appear in an Excel sheet. For example: 1 -> A 2 -> B 3 -> C ... 26 -> Z 27 -> 阅读全文
posted @ 2016-02-22 11:13 scottwang 阅读(278) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- Push element x onto stack. pop() -- 阅读全文
posted @ 2016-02-22 10:42 scottwang 阅读(739) 评论(0) 推荐(0) 编辑
摘要: 转载自:http://www.cnblogs.com/tornadomeet 朴素贝叶斯: 有以下几个地方需要注意: 1. 如果给出的特征向量长度可能不同,这是需要归一化为通长度的向量(这里以文本分类为例),比如说是句子单词的话,则长度为整个词汇量的长度,对应位置是该单词出现的次数。 2. 计算公式 阅读全文
posted @ 2016-02-21 20:38 scottwang 阅读(2358) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 18 下一页