自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(105)
  • 收藏
  • 关注

转载 【深度学习】 读书笔记 壹 深度学习概述

深度学习的前世今生。前言概念AI深度学习:层次化的概念让计算机构建较简单的概念来学习复杂概念。如果绘制出这些概念如何建立在彼此之上的图,我们将得到一张“深”(层次很多)的图。出于这个原因,我们称这种方法为AI深度学习。知识图谱(knowledge base)方法: 计算机可以通过这些形式化语言自动地使用逻辑推理规则来理解声明。机器学习(machine learning): A...

2017-02-09 21:14:00 186

转载 Happy Number 分类: Leetcode(查找) ...

1. 题目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 integer, replace the number b...

2015-07-17 10:00:00 175

转载 不要被阶乘吓到 分类: 编程之美 2015-04-2...

1.给定整数N,那么N的阶乘N!末尾有多少个0?这个问题经过质因子分解转换为求5的指数ret = 0;for(i = 1; i <= N ; i++) { j = i; while (j % 5 == 0) { ret++; j /=5; }}[N/k] 等于1,2,3....

2015-04-26 13:52:00 193

转载 求二进制数中1的个数 分类: 编程之美 2015-0...

这道题我一开始能想到的就只有位运算+右移,最直观。二进制最后一位 对应于mod2,右移一位对应于/2int count(int v) { int num = 0; while(v) { if(v % 2 == 1) { num++; } v /= 2; } return n...

2015-04-24 19:25:00 163

转载 Surrounded Regions 分类: Leetcode(广度优先搜索...

Surrounded RegionsGiven a 2D board containing'X'and'O', capture all regions surrounded by'X'.A region is captured by flipping all'O's into'X's in that surrounded region....

2015-04-23 11:01:00 109

转载 Word Ladder 分类: Leetcode(广度优先搜索) ...

Word LadderGiven two words (beginWordandendWord), and a dictionary, find the length of shortest transformation sequence frombeginWordtoendWord, such that:Only one lette...

2015-04-22 09:49:00 78

转载 2015编程之美资格赛题目3 : 基站选址 分类: 算法 ...

描述需要在一个N × M的网格中建立一个通讯基站,通讯基站仅必须建立在格点上。网格中有A个用户,每个用户的通讯代价是用户到基站欧几里得距离的平方。网格中还有B个通讯公司,维护基站的代价是基站到最近的一个通讯公司的路程(路程定义为曼哈顿距离)。在网格中建立基站的总代价是用户通讯代价的总和加上维护基站的代价,最小总代价。输入第一行为一个整数T,...

2015-04-21 15:15:00 322

转载 2015编程之美资格赛题目2 : 回文字符序列 分类: 算法 ...

描述给定字符串,求它的回文子序列个数。回文子序列反转字符顺序后仍然与原序列相同。例如字符串aba中,回文子序列为"a", "a", "aa", "b", "aba",共5个。内容相同位置不同的子序列算不同的子序列。输入第一行一个整数T,表示数据组数。之后是T组数据,每组数据为一行字符串。输出对于每组数据输出一行,格式为"Case #X: Y...

2015-04-21 11:40:00 110

转载 2015编程之美资格赛题目1 : 2月29日 分类: 算法 ...

描述给定两个日期,计算这两个日期之间有多少个2月29日(包括起始日期)。只有闰年有2月29日,满足以下一个条件的年份为闰年:1. 年份能被4整除但不能被100整除2. 年份能被400整除输入第一行为一个整数T,表示数据组数。之后每组数据包含两行。每一行格式为"month day, year",表示一个日期。month为{"January...

2015-04-21 11:28:00 143

转载 Palindrome Partitioning II 分类: Leetcod...

Palindrome Partitioning IIGiven a string s, partition s such that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partit...

2015-04-14 11:01:00 92

转载 Palindrome Partitioning 分类: Leetcode(动...

Palindrome PartitioningGiven a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioning ofs.For exam...

2015-04-14 11:00:00 71

转载 Triangle 分类: Leetcode(动态规划) ...

TriangleGiven a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the following tria...

2015-04-14 09:33:00 73

转载 Search a 2D Matrix 分类: Leetcode(查找) ...

Search a 2D MatrixWrite an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row are sorted ...

2015-04-11 10:19:00 83

转载 Search for a Range 分类: Leetcode(查找) ...

Search for a RangeGiven a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the orde...

2015-04-10 15:34:00 73

转载 First Missing Positive 分类: Leetcode(排序...

First Missing PositiveGiven an unsorted integer array, find the first missing positive integer.For example,Given[1,2,0]return3,and[3,4,-1,1]return2.Your algorithm shou...

2015-04-09 17:13:00 57

转载 Insertion Sort List 分类: Leetcode(排序) ...

Insertion Sort ListSort a linked list using insertion sort.很简单的一道题,思路跟数组的插入排序一样/** * Definition for singly-linked list. * struct ListNode { * int val...

2015-04-09 11:26:00 86

转载 Merge k Sorted Lists 分类: Leetcode(树) ...

Merge k Sorted ListsMergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity./** * Definition for singly-linked list. * struct ListNode ...

2015-04-09 09:35:00 65

转载 Merge Two Sorted Lists 分类: Leetcode(排序...

Merge Two Sorted ListsMerge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists....

2015-04-08 21:59:00 81

转载 Merge Sorted Array 分类: Leetcode(排序) ...

Merge Sorted ArrayGiven 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 tom+n) ...

2015-04-08 21:52:00 63

转载 Sum Root to Leaf Numbers 分类: Leetcode(...

Sum Root to Leaf NumbersGiven a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-leaf path1->...

2015-04-04 21:25:00 62

转载 Remove Duplicates from Sorted Array II 分类: ...

Remove Duplicates from Sorted Array IIFollow up for "Remove Duplicates":What if duplicates are allowed at mosttwice?For example,Given sorted array A =[1,1,1,2,2,3]...

2015-03-25 21:20:00 63

转载 Remove Duplicates from Sorted Array 分类: ...

Remove Duplicates from Sorted ArrayGiven a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra spa...

2015-03-25 16:10:00 48

转载 Binary Tree Preorder Traversal 分类: Lee...

</pre><p>Binary Tree Preorder Traversal</p>Given a binary tree, return the preorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 ...

2015-03-24 17:04:00 78

转载 深度学习基础(七)Self-Taught Learning to Deep Networks 分类...

有了自学算法去提取特征,我们可以进一步扩展模型这个模型是在特征模型的基础上多了一步分类器,这个分类器的引入使得我们可以进一步调整参数。微调(fine-tune)指的的是通过输入有标记的再通过牛顿下降法来调整参数从而减小训练误差什么时候可以使用微调呢?当然是有大量的有标记样本啦。上面这个模型试简单的三层神经网络因为每一个隐层代表了对前一层的一次非线性...

2015-03-20 21:27:00 230

转载 深度学习基础(六)Self-Taught Learning 分类: 深度学习...

要想提高学习类的算法,最简单的方法就是使用更多的数据,但是有标签的数据往往是很难获取的,因此对于无标签的数据的学习,我们有自学习算法和无监督特学习算法。有两类常用的特征学习算法,自学习算法的前提假设是无标签的数据和有标签的数据不一定满足一样的分布,而无监督学习算法的前提假设是两者的分布是一样的。我们先来介绍一下特征学习:我们之前讲过自编码器,输入时有标签的数据...

2015-03-20 14:55:00 449

转载 Remove Duplicates from Sorted List 分类: ...

Remove Duplicates from Sorted ListGiven a sorted linked list, delete all duplicates such that each element appear onlyonce.For example,Given1->1->2, return1->2.Given...

2015-03-03 21:16:00 60

转载 Partition List 分类: Leetcode(链表) ...

Partition List TGiven a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.You should preserve the original relative or...

2015-03-03 21:13:00 62

转载 深度学习基础(五)Softmax Regression 分类: 深度学习 ...

Softmax RegressionSoftmax Regression是 Logistic Regression的推广假设我们有训练集Logistic Regression:对于每个特征,标签Softmax Regression:对于每个特征,标签Softmax Regr...

2015-02-28 10:28:00 145

转载 Add Two Numbers 分类: Leetcode(链表) ...

Add Two NumbersYou are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add ...

2015-02-17 11:09:00 67

转载 Gas Station 分类: Leetcode(线性表) ...

Gas StationThere are N gas stations along a circular route, where the amount of gas at station i is gas[i].You have a car with an unlimited gas tank and it costs cost[i] of g...

2015-02-15 11:06:00 296

转载 Valid Sudoku 分类: Leetcode(线性表) ...

Valid SudokuDetermine if a Sudoku is valid, according to:Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are filled with the ch...

2015-02-04 22:05:00 54

转载 3Sum 分类: Leetcode(线性表) 201...

3SumGiven an arraySofnintegers, are there elementsa,b,cinSsuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.Note:...

2015-02-04 10:51:00 68

转载 Two Sum 分类: Leetcode(线性表) ...

Two SumGiven an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers such that they a...

2015-02-04 10:05:00 82

转载 Longest Consecutive Sequence 分类: Leetc...

Longest Consecutive SequenceGiven an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given[100, 4, 200, 1, 3, 2],T...

2015-02-04 09:54:00 72

转载 Median of Two Sorted Arrays 分类: Leetco...

Median of Two Sorted ArraysThere are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O...

2015-02-04 09:05:00 114

转载 Python+Scrapy(完整包全安装过程) 分类: 安装配置说明 ...

4最近需要爬图,所以需要学Python和Scrapy。看了一些安装教程,索性自己整理添加一个完整包和安装教程。Python+Scrapy完整包下载:链接: http://pan.baidu.com/s/1qWNW5iO 密码: oklc1.安装Python2.7https://www.python.org/downloads/release/python-27...

2015-02-02 21:29:00 180

转载 Remove Element 分类: Leetcode(线性表) ...

Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't matter what you leave beyond the new l...

2015-01-29 10:47:00 57

转载 Search in Rotated Sorted Array 分类: Lee...

Search in Rotated Sorted ArraySuppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).You are given...

2015-01-29 10:23:00 63

转载 机器学习基础(四)LMS,代价函数的求解和概率意义 分类: 机器学习 ...

专门看一下代价函数的求解参数求解:上式这个更新公式就叫做LMS(least mean square)更新规则,也叫Widrow-Hoff学习规则。这是一维的情况,我们可以拓展到多维的情况,由此得到两种不同的学习(迭代方法),即批处理梯度下降法和随机梯度下降法。1.批处理梯度下降法(每次迭代都遍历所有样本,所欲样本遍历一遍再走第一步)2.随机...

2015-01-26 14:52:00 619

转载 机器学习基础(一)线性回归

线性回归模型是最简单的监督式学习模型:所谓的监督式学习模型就是需要通过已有的数据训练出一个最优的模型,能够表示这些已有的模型并能够预测新的数据。怎么判断模型是不是最优的呢?这就需要引入代价函数(Cost Function):怎么得到最优的模型呢?这就需要求解代价函数的最小值,也就需要引入梯度下降法。梯度下降法就是通过迭代,每一次都比之前已次更加接近代价函数的最小值,最后在...

2015-01-26 10:05:00 132

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除