Apriori算法是数据挖掘中一种挖掘关联规则的频繁项集算法。其核心是基于两阶段频集思想的递推算法。
先来了解下关联规则挖掘:
发现事务数据库,关系数据, 或其它信息库中项或数据对象集合间的频繁模式。关联,相关,或因果关系结构。
频繁模式:在数据库中频繁出现的模式(项集, 序列, 等)。
动机是发现数据中的规律性。
如:
购物篮分析:哪些产品更经...
分类:
其他好文 时间:
2014-06-01 09:52:13
阅读次数:
245
所谓推荐算法就是利用用户的一些行为,通过一些数学算法,推测出用户可能喜欢的东西。
在推荐系统简介中,我们给出了推荐系统的一般框架。很明显,推荐方法是整个推荐系统中最核心、最关键的部分,很大程度上决定了推荐系统性能的优劣。目前,主要的推荐方法包括:基于内容推荐、协同过滤推荐、基于关联规则推荐、基于效用推荐、基于知识推荐和组合推荐。
一、基于内容推荐
基于内容的推荐(Content-based Recommendation)是信息过滤技术的延续与发展,它是建立在项目的内容信息上作出推荐的,而不需要...
分类:
Web程序 时间:
2014-06-01 09:41:45
阅读次数:
312
【题目】
Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.
Below is one possible representation of s1 = "great":
great
/ gr eat
/ \ / g r e at
/ ...
分类:
其他好文 时间:
2014-06-01 09:41:05
阅读次数:
196
2048 原作者就是用Js写的,一直想尝试,但久久未动手。昨天教学生学习JS代码。不妨就做个有趣的游戏好了。2048这么火,是一个不错的选择。思路:1. 数组 ,2维数组4x42. 移动算法,移动后有数字的对齐,无数字(我用的0,但不显示)补齐。移动前移动后(注意程序合并了第一行2个2,并产生了新的2)移动算法分2步:第一步骤:移动第二步骤:合并移动代码参考:[html] view plainco...
分类:
编程语言 时间:
2014-06-01 09:37:52
阅读次数:
320
【题目】
Given two sorted integer arrays A and B, merge B into A as one sorted array.
Note:
You may assume that A has enough space (size that is greater or equal to m + n) to hold additional elements from B. The number of elements initialized in A and B are...
分类:
其他好文 时间:
2014-06-01 09:21:16
阅读次数:
292
【题目】
A message containing letters from A-Z is being encoded to numbers using the following mapping:
'A' -> 1
'B' -> 2
...
'Z' -> 26
Given an encoded message containing digits, determine the total number of ways to decode it.
For example,
Given encoded ...
分类:
其他好文 时间:
2014-06-01 08:59:37
阅读次数:
258
在Linux/Unix系统中,每个进程都有一个非负整型表示的唯一进程ID。虽然是唯一的,但是进程的ID可以重用。当一个进程终止后,其进程ID就可以再次使用了。大多数Linux/Unix系统采用延迟重用的算法,使得赋予新建进程ID不同于最近终止进程所使用的ID,这主要是为了防止将新进程误认为是使用同一ID的某个已终止的先前进程。本文讨论了Linux/Unix分配进程ID的方法以及源码实现。...
分类:
系统相关 时间:
2014-06-01 08:57:45
阅读次数:
387
【题目】
Given a collection of integers that might contain duplicates, S, return all possible subsets.
Note:
Elements in a subset must be in non-descending order.
The solution set must not contain duplicate subsets.
For example,
If S = [1,2,2], a solution ...
分类:
其他好文 时间:
2014-06-01 08:51:06
阅读次数:
292
LRU算法,即Last Recently Used ---选择最后一次访问时间距离当前时间最长的一页并淘汰之——即淘汰最长时间没有使用的页
按照最多5块的内存分配情况,实现LRU算法代码如下:
public class LRU {
private int theArray[];
private int back; //定义队尾
private int currentS...
分类:
编程语言 时间:
2014-06-01 02:14:41
阅读次数:
316
详细看:http://blog.csdn.net/lyy289065406/article/details/6645852
简单说一下:每个物品是一个结点,边的权值是,edge[u][v]的值表示用物品u换物品v的价格
一开始所有物品都置为原价,即所有dist[i]为原价,用dijkstra算法,算出0点(啥物品都没有)到各点的最短距离,求出dist[1]即为花费
枚举每个物品的等级为这条交...
分类:
其他好文 时间:
2014-05-31 23:10:48
阅读次数:
500