- 博客(8)
- 资源 (2)
- 收藏
- 关注
原创 数据结构与算法 LeetCode编程练习--counts Prime
Description:Count the number of prime numbers less than a non-negative number, n.Credits:Special thanks to @mithmatt for adding this problem and creating all test cases.Hint:Let's start
2015-12-23 22:03:23 675
原创 数据结构与算法 LeetCode编程练习--Contains Duplicate II
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 difference between i and jis at most k.
2015-12-22 23:57:54 442
原创 数据结构与算法 LeetCode编程练习--Delete Node in a Linked List
Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.Supposed the linked list is 1 -> 2 -> 3 -> 4 and you are given the third node with value
2015-12-22 00:09:34 522
原创 数据结构与算法 LeetCode编程练习--Search in Rotated array II
Follow up for "Search in Rotated Sorted Array":What if duplicates are allowed?Would this affect the run-time complexity? How and why?Write a function to determine if a given target is in
2015-12-20 17:25:15 452
原创 数据结构与算法 LeetCode编程练习--Search in Rotated array
Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).You are given a target value to search. If found in the array return its index
2015-12-20 00:05:38 493
原创 数据结构与算法 LeetCode编程练习--Search and Inserted in sorted array
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicates in the array.Here
2015-12-19 21:19:17 482
原创 机器学习实战python版Logistic回归
基于Logistic 回归和Sigmoid函数的分类首先我们要了解Sigmoid函数是什么样的函数,再者这个Logistic回归模型和这个函数的联系。主要内容可以参见李航的《统计学习方法》第六章有详细的讲解,我是看了里面的内容在对应着看机器学习实战中的代码学习的。二项逻辑斯蒂回归主要还是在于确定对应特征的权重,来得到Z= W*X,从而根据模型获得输出分类的Y值。权重的获得是通过梯度
2015-12-15 17:28:19 1145
原创 机器学习实战python版 朴素贝叶斯示例 垃圾邮件分类 从个人广告中获取趋于趋向
首先我们先来看如何使用朴树贝叶斯对电子邮件进行分类准备数据:切分文本对于一个文本字符串,使用python的split()就可以切分文本。>>> mySent = 'this book is the best book on python or M.L. I have even laid eyes upon.'>>> mySent.split()['this', 'book', 'i
2015-12-03 20:20:49 3170
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人