- 博客(13)
- 收藏
- 关注
原创 推荐系统学习点滴
1,推荐系统分成两类:协同过滤和基于内容过滤。其中协同过滤基于假设:“people who agreed in the past will agree in the future, and that they will like similar kinds of items as they liked in the past”。核心思想是:找到历史上与当前用户有公共交集(比例达到一定程度)的人
2015-09-08 10:54:21
486
原创 Regex of HTML
Regex regexHtmlComment = new Regex(@"]*>",RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);Regex regexHtmlLink = new Regex(@"]+>(?.+?)",RegexOptions.Compiled| R
2015-06-19 11:17:35
355
原创 Regex for HTML filtering
Regex regexHtmlComment = new Regex(@"]*>",RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);Regex regexHtmlLink = new Regex(@"]+>(?.+?)",RegexOptions.Compiled| R
2015-06-19 11:16:52
305
转载 【转载】Kmeans、Kmeans++和KNN算法比较
转自:http://blog.youkuaiyun.com/loadstar_kun/article/details/39450615K-Means介绍 K-means算法是聚类分析中使用最广泛的算法之一。它把n个对象根据他们的属性分为k个聚类以便使得所获得的聚类满足:同一聚类中的对象相似度较高;而不同聚类中的对象相似度较小。其聚类过程可以用下图表示:
2015-06-16 16:55:50
491
转载 【转载】从决策树学习谈到贝叶斯分类算法、EM、HMM
转自:http://blog.youkuaiyun.com/v_july_v/article/details/7577684仅作学习备用。======从决策树学习谈到贝叶斯分类算法、EM、HMM引言 最近在面试中,除了基础 & 算法 & 项目之外,经常被问到或被要求介绍和描述下自己所
2015-06-16 16:47:01
922
原创 猫抓老鼠
老鼠以固定速度v从x0点出发沿x轴前进,v为 单位是n unit/s, x0是非负整数。猫可以走任意非负整数长的距离,走到点上可以知道老鼠在与不在这个点,但不能知道老鼠在该点的前方还是后方。问:如果设计猫的策略来保证猫一定可以抓到老鼠。解答:其实这题考的是穷举罗列。先简化一下题干,如果x0=0,如何设计猫的策略。答:让猫一次探测1,4,9,16,25.。。。肯定能在某个n平方处逮到老鼠。原理就
2015-04-01 20:59:11
554
原创 ELS ranker training
Ranker Training的主要过程:1,从Training Data生成input和selection,依次调用pipeline生成每一个selection的一系列Features值2,因为实体走内部编号,故需要做一个Training Data和内部编号的mapping3,从Training Data生成内部编号标示的Training数据,交给platform进行model tr
2015-03-27 15:31:06
342
原创 HashMap 的 hash函数 jdk1.8
/** * Computes key.hashCode() and spreads (XORs) higher bits of hash * to lower. Because the table uses power-of-two masking, sets of * hashes that vary only in bits above the curre
2015-03-18 21:54:59
557
转载 深入理解HashMap(及hash函数的真正巧妙之处)
原文地址:http://www.iteye.com/topic/539465 /** *@author annegu *@date 2009-12-02 */ Hashmap是一种非常常用的、应用广泛的数据类型,最近研究到相关的内容,就正好复习一下。网上关于hashmap的文章很多,但到底是自己学习的总结,就发出来跟大家一起分享,一起讨论
2015-03-17 16:40:52
419
转载 Java中HashTable和HashMap区别
1, Table线程同步,Map不同步2,Table不允许null value,Map允许3,都实现了Map, 但Table 扩展了Dictionary, Map扩展了AbstractMap4,Table用Enumeration,Map用Iterator5,Table中Hash数组的默认11,增长old*2+1,Map默认16,增长*2转自:http://blog.cs
2015-03-17 14:22:38
282
原创 删除单链表中的某个节点
Node deleteCNode(Node header, Node c){ if(header == null || c == null) return null; else{ if(c == header) return header.next; else{ Node index = header; while(index != null &&
2015-03-09 14:49:57
400
原创 找单向链表中离尾节点长度为n的节点
分析:建立两个pointers: p1, p2,使得两者间距为n。然后p2 move到尾部,p1的位置就是所找的节点。注意考虑例外情况。Node findNthNode(Node header, int n){if(header == null || n return null;else{int i = 1;Node index2 = header, while( i
2015-03-07 18:16:50
365
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人