摘要:
该模块完成一些有关图取交集取并集等操作的功能 Unary operations on graphs 一元操作 complement(G[, name]) Return the graph complement of G. 返回图G的补集 reverse(G[, copy]) Return the r 阅读全文
摘要:
def cumulative_distribution(distribution): """Return normalized cumulative distribution from discrete distribution."""#将离散分布转换成累积分布 cdf=[] #累积分布列表 cdf 阅读全文
摘要:
logistic核函数不是SVM核函数 径向基核函数(RBF) 阅读全文
摘要:
解决隐马模型中预测问题的算法是(维特比算法) 前向、后向算法解决的是一个评估问题,即给定一个模型,求某特定观测序列的概率,用于评估该序列最匹配的模型 Baum-Welch算法解决的是一个模型训练问题,即参数估计,是一种无监督的训练方法,主要通过EM迭代实现 维特比算法解决的是给定 一个模型和某个特定 阅读全文
摘要:
参考博文http://kb.cnblogs.com/page/176818/ KMP是字符串匹配常用算法之一,经典之处在于巧用“部分匹配值”(巧妙的消除了指针回溯问题),复杂度为O(m+n) "部分匹配值"就是"前缀"(该字符的全部头部组合)和"后缀"(该字符的全部尾部组合)的最长的共有元素的长度 阅读全文
摘要:
Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the 阅读全文
摘要:
Given a positive integer, return its corresponding column title as appear in an Excel sheet. For example: 阅读全文
摘要:
Given a column title as appear in an Excel sheet, return its corresponding column number. For example: A -> 1 B -> 2 C -> 3 ... Z -> 26 AA -> 27 AB -> 阅读全文
摘要:
Given two strings s and t, write a function to determine if t is an anagram of s. For example, s = "anagram", t = "nagaram", return true. s = "rat", t 阅读全文
摘要:
用三叉链表作二叉树的存储结构,当二叉树中有n个结点时,有(n+2)个空指针 三叉链表每个节点有三个指针域(左、亲、右),共3n个指针。 其中非空指针=亲(n-1个,因为根节点没有双亲)+左右(n-1,因为n个节点的二叉树有n-1条边)=2n-2; 所以空指针=3n-(2n-2)=n+2。 查找效率: 阅读全文