- 博客(15)
- 收藏
- 关注
原创 Wordcloud-try
from wordcloud import WordCloud, ImageColorGeneratorimport jiebaimport PILimport matplotlib.pyplot as plt%matplotlib inlineimport numpy as npIn [115]:def wordcloudplot(
2017-12-19 18:39:33
252
原创 Find the top5 similar issues in bugzilla system
#!/usr/bin/env python'''Created on Aug, 2017@author: menghl'''import numpy as npimport pandas as pdimport matplotlib.pyplot as pltimport reimport nltkfrom gensim import cor
2017-12-18 16:24:21
248
原创 Andrew Coursera Machine Learning
https://www.coursera.org/?skipRecommendationsRedirect=true&tab=completed
2017-12-18 16:04:39
171
原创 Kaggle-digit-v0
import pandas as pdimport matplotlib.pyplot as plt%matplotlib inlinefrom sklearn.neighbors import KNeighborsClassifierfrom sklearn.model_selection import cross_val_scoreimport time
2017-12-18 15:45:53
370
原创 Excel Sheet Column Title (easy)
Related to question Excel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corresponding column number.For example: A -> 1 B -> 2 C -> 3 ...
2015-03-19 16:47:47
244
原创 Factorial Trailing Zeroes (easy)
Given an integer n, return the number of trailing zeroes in n!.Note: Your solution should be in logarithmic time complexity.class Solution {public: int trailingZeroes(int n) { in
2015-03-18 20:52:02
217
原创 Pascal's Triangle (easy)
Given numRows, generate the first numRows of Pascal's triangle.For example, given numRows = 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1]]帕斯卡三角,也称杨辉三角class Solution
2015-03-18 10:46:39
225
原创 背包问题的几种解法总结
动态规划求解0-1背包问题,最重要的就是状态转换方程,如下:状态转换方程 f[i,j] = Max{ f[i-1,j-Wi]+Pi( j >= Wi ), f[i-1,j] }Max为什么有两部分,其实就是眼前这个东西,你放还是不放。放了,就是 f[i-1,j-Wi]+Pi( j >= Wi ),不放就是 f[i-1,j] 。例子转载于http://blog.csdn.net
2015-01-23 17:28:52
1679
转载 NP问题
首先需要介绍P(Polynomial,多项式)问题.P问题是可以在多项式时间内被确定机(通常意义的计算机)解决的问题.NP(Non-Deterministic Polynomial, 非确定多项式)问题,是指可以在多项式时间内被非确定机(他可以猜,他总是能猜到最能满足你需要的那种选择,如果你让他解决n皇后问题,他只要猜n次就能完成----每次都是那么幸运)解决的问题.这里有一个著名的问题----千
2015-01-23 10:26:09
346
转载 一些有趣的数学问题
七桥问题18世纪著名古典数学问题之一。在哥尼斯堡的一个公园里,有七座桥将普雷格尔河中两个岛及岛与河岸连接起来(如图)。问是否可能从这四块陆地中任一块出发,恰好通过每座桥一次,再回到起点?欧拉于1736年研究并解决了此问题,他把问题归结为如左图的“一笔画”问题,证明上述走法是不可能的。有关图论研究的热点问题。18世纪初普鲁士的哥尼斯堡,有一条河穿过,河上有两个小岛,有七座桥把两个
2015-01-23 10:05:37
932
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人