02 2016 档案
摘要:double_edge_swap(G) 这是一个连边置乱的函数,输入的G必须为无向图,且图节点不小于4 # Instead of choosing uniformly at random from a generated edge list, # this algorithm chooses non
阅读全文
摘要:编写检验网络的匹配特性的程序时,涉及到节点的强度(与节点相连边的权重和)这个概念,后才明白nx.degree()还有如此强大的功能。 直接上例子: import networkx as nxG=nx.Graph()G.add_edge(1,2, weight=1)G.add_edge(1,3, we
阅读全文
摘要:Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For exa
阅读全文
摘要:Write an algorithm to determine if a number is "happy". A happy number is a number defined by the following process: Starting with any positive intege
阅读全文
摘要:Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is like:
阅读全文
摘要:You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 ston
阅读全文
摘要:http://hr.tencent.com/position_detail.php?id=22922&keywords=&tid=87&lid=2156 刷题: SVM核函数: 线性核函数、多项式核函数、径向基核函数、傅里叶核函数、样条核函数、Sigmoid核函数 CRF模型对于HMM和MEMM模型
阅读全文
摘要:分类的目标是,使得类别内的点距离越近越好(集中),类别间的点越远越好。 在机器学习领域,不少的地方都要用到特征值的计算,比如说图像识别、pagerank、LDA、PCA等等。 LDA是最简单的线性分类器,可以看做是简化版的SVM。LDA和PCA有较强的相关性,从推导、求解到算法最终的结果都有相当的相
阅读全文
摘要:在开发“零模型置乱”时,遇到该错误 'ascii' codec can't decode byte 0xe6 in position 25: ordinal not in range(128), 其实跟编解码无关,完全是程序bug, 断边重连时要断开的边不存在导致的
阅读全文
摘要:http://bbs.pkbigdata.com/topic/32573ad1120342cca9127811cfc870c8.html http://bbs.pkbigdata.com/topic/73dda4cb230b4fdc9657b04f96050b0e.html http://bbs.p
阅读全文
摘要:降维 参考网址http://dataunion.org/20803.html 【低方差滤波 (Low Variance Filter)】需先对数据做归一化处理 【高相关滤波】认为当两列数据变化趋势相似时,它们包含的信息也相似 【随机森林】对目标属性产生许多巨大的树,然后根据对每个属性的统计结果找到信
阅读全文
摘要:bin -将整数转换为二进制。 eg:光棍的悲哀 http://www.pythontip.com/coding/code_oj_case/13 enumerate - 枚举 np.meshgrid - 参考http://docs.scipy.org/doc/numpy/reference/gene
阅读全文

浙公网安备 33010602011771号