自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

freeliao的专栏 在路上奔跑。。。

热爱技术,热爱生活。

  • 博客(57)
  • 收藏
  • 关注

原创 Sum Root to Leaf Numbers

Sum Root to Leaf Numbers Total Accepted: 26533 Total Submissions: 89186My SubmissionsQuestion Solution Given a binary tree containing digits from 0-9 only, each root-to-leaf pa

2014-11-09 22:51:29 997

原创 word2vec浅析

本文是参考神经网络语言模型、word2vec相关论文和网上博客等资料整理的学习笔记,仅记录自己的学习历程,欢迎拍砖。     word2vec是2013年google提出的一种神经网络的语言模型,通过神经网络来学习词语的联合概率分布,同时可以得到词向量,有了词向量可以做很多NLP相关的事情。其实,早在2000年初就有学者在用神经网络来学习语言模型了,通过多年的改进、演变,得到我们现

2014-11-09 17:15:55 1752

原创 Search in Rotated Sorted Array

Search in Rotated Sorted Array Total Accepted: 22300 Total Submissions: 77945My SubmissionsSuppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6

2014-08-25 20:08:58 643

原创 N-Queens

N-Queens Total Accepted: 12866 Total Submissions: 49759My SubmissionsThe n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each oth

2014-08-24 21:32:50 833

原创 Candy

Candy Total Accepted: 16107 Total Submissions: 85614My SubmissionsThere are N children standing in a line. Each child is assigned a rating value.You are giving candies to these c

2014-08-24 16:04:20 1006

原创 Triangle

Triangle Total Accepted: 16109 Total Submissions: 60327My SubmissionsGiven a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row

2014-08-23 15:53:07 966

原创 Remove Duplicates from Sorted Array

Remove Duplicates from Sorted Array Total Accepted: 22879 Total Submissions: 70824My SubmissionsGiven a sorted array, remove the duplicates in place such that each element appear only on

2014-08-23 14:51:52 790

原创 Remove Duplicates from Sorted List

Remove Duplicates from Sorted List II Total Accepted: 17137 Total Submissions: 69046My SubmissionsGiven a sorted linked list, delete all nodes that have duplicate numbers, leaving only d

2014-08-23 13:55:20 926

原创 Restore IP Addresses

Restore IP Addresses Total Accepted: 12696 Total Submissions: 61955My SubmissionsGiven a string containing only digits, restore it by returning all possible valid IP address combinations

2014-08-22 19:57:01 659

原创 leetcode-Palindrome Partitioning II

Palindrome Partitioning II Total Accepted: 11791 Total Submissions: 66110My SubmissionsGiven a string s, partition s such that every substring of the partition is a palindrome.Return t

2014-07-27 18:09:12 1046

原创 leetcode-Word Search

Word Search Total Accepted: 11535 Total Submissions: 58659My SubmissionsGiven a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of seq

2014-07-24 22:10:15 681

原创 leetcode-Unique Binary Search Trees II

Unique Binary Search Trees II Total Accepted: 10486 Total Submissions: 39239My SubmissionsGiven n, generate all structurally unique BST's (binary search trees) that store values 1...n.

2014-07-24 21:22:33 778

原创 leetcode-Gas Station

Gas Station Total Accepted: 12195 Total Submissions: 50108My SubmissionsThere are N gas stations along a circular route, where the amount of gas at station i is gas[i].You have a car w

2014-06-02 23:01:42 1038

原创 leetcode-Subsets

Subsets Total Accepted: 13267 Total Submissions: 48509My SubmissionsGiven a set of distinct integers, S, return all possible subsets.Note:Elements in a subset must be in non-desc

2014-06-02 09:52:39 1182

原创 leetcode-Reverse Words in a String

Reverse Words in a String Total Accepted: 15012 Total Submissions: 108513My SubmissionsGiven an input string, reverse the string word by word.For example,Given s = "the sky is blue",

2014-06-01 23:56:15 1014

原创 leetcode-Word Ladder II

Word Ladder II Total Accepted: 6164 Total Submissions: 58601My SubmissionsGiven two words (start and end), and a dictionary, find all shortest transformation sequence(s) from start to en

2014-05-31 23:40:15 1061

原创 leetcode-WordLadder

Word Ladder Total Accepted: 10237 Total Submissions: 58140My SubmissionsGiven two words (start and end), and a dictionary, find the length of shortest transformation sequence from start

2014-05-24 18:11:17 1073

原创 记阿里腾讯实习面试

自从被内推了阿里之后,一直在等待阿里的面试。我要面试的岗位是机器学习相关的算法工程师,自己也一直在学习机器学习方面的知识和技术。其实我比较喜欢数学和计算机科学结合的学科,机器学习正是要用到这两个方面,不过有时候心里也想研发产品,心里还是有点矛盾的,但是想想就算了,我也可以应用机器学习到产品研发中,能做好一样就很不错了。3月26号接到杭州打来的电话,告知我明天下午面试,呵呵,这个倒挺好的,还有提

2014-04-25 14:44:49 2479

转载 理解矩阵

矩阵的意义非常重要,理解好矩阵对于学习矩阵论、统计学、机器学习等很重要,如何去真正去理解矩阵呢?看了孟岩老师写的理解矩阵系列,受益匪浅!理解矩阵一:转载自:http://blog.csdn.net/myan/article/details/647511前不久chensh出于不可告人的目的,要充当老师,教别人线性代数。于是我被揪住就线性代数中一些务虚性的问题与他讨

2014-02-22 20:17:49 1003

原创 Convolution and Pooling

博文参考standford UFLDL教程working with large images小节。1、卷积特征提取之前做过的练习如sparse autoencoders、softmax regression、stacked autoencoders等处理的都是比较小的图像,如8x8啊,28x28啊,那时用的是全联通网络(full connected networks),就是隐含

2014-02-22 19:21:50 2336

原创 Linear Decoders

博文参考standford UFLDL网页教程线性解码器。1、线性解码器                    前面说过的稀疏自编码器是一个三层的feed-forward神经网络结构,包含输入层、隐含层和输出层,隐含层和输出层采用的激活函数都是sigmoid函数,由于sigmoid函数的y值范围在[0,1],这就要求输入也要在这个范围内,MNIST数据是在这个范围内的,但是对于

2014-02-21 22:10:56 1664

原创 Stacked Autoencoders

博文内容参照网页Stacked Autoencoders,Stacked Autocoders是栈式的自编码器(参考网页Autoencoder and Sparsity和博文自编码与稀疏性),就是多层的自编码器,把前一层自编码器的输出(中间隐藏层)作为后一层自编码器的输入,其实就是把很多自编码器的编码部分叠加起来,然后再叠加对应自编码器的解码部分,这样就是一个含有多个隐含层的自编码器了。本博文

2014-02-21 17:08:24 7770 15

原创 Self-Taught Learning To Deep Networds

本博客是参照UFLDL教程的Self-Taught Learning to Deep Networds写的,也感谢tornadomeet,看了他的博客也对自己的理解帮助不小。一、从自我学习到深层网络        在自我学习(参考本博客Self-Taught Learning)中,我们用未标注的数据来学习自编码器,然后用学到的特征表示对已标注数据学习特征,然后用该特征作为softm

2014-02-20 16:20:13 1810

原创 Self-Taught Learning

自编码器是一个三层的feed-forward神经网络模型,输入层经过隐含层的特征表示后再重构出跟输入层逼近的输出层,中间的隐含层是特征表示层,表示对输入层学习到的特征,这些特征可能更好地表示了数据,如果用学到的特征来训练数据分类或回归可能学习效果更好,于是就有了自我学习和无监督特征学习。    如果我们有很多的未标注数据,那就更好了,我们可以用自编码器学习特征表示,然后用学到的特征表示

2014-02-19 20:49:34 3564 2

原创 Softmax Regression练习

在上篇博文(http://blog.csdn.net/freeliao/article/details/19424565)介绍了Softmax Regression的模型,现在来做下该模型在MNIST数据集上的识别练习(http://ufldl.stanford.edu/wiki/index.php/Exercise:Softmax_Regression)。MNIST数据集训练集由60000张28

2014-02-19 16:21:20 2103

原创 Softmax Regression

Softmax简介记得之前做过的logistic regression的练习是一个二类分类的问题,模型的假设函数是      这个函数判断给定的x在当前的模型theta下被预测为1的概率,显然预测为0的概率就是1减去预测为1的概率即可。LR实际上就是在训练数据中的空间中找一条超平面把正负样本分开,与感知机、SVM(支持向量机)也有点类似,但是损失函数是不一样的。LR的损失函数为

2014-02-18 21:08:43 5088

原创 PCA与Whitening

一、PCA PCA即主成分分析(Principle Component Analysis),是统计机器学习、数据挖掘中对数据进行预处理的常用的一种方法。PCA的作用有2个,一个是数据降维,一个是数据的可视化。在实际应用数据中,样本的维数可能很大,远远大于样本数目,这样模型的复杂度会很大,学习到的模型会过拟合,而且训练速度也会比较慢,内存消耗比较大,但实际数据可能有些维度是线性相关的,可能也含有

2014-02-18 14:43:37 4435

原创 机器学习练习之k均值

k-means属于聚类分析的其中一种算法,聚类分析在机器学习、数据挖掘、模式识别、决策支持和图像分割中有广泛的应用。聚类是无监督的分类方法,所谓无监督就是没有给定训练数据的标签信息,所以聚类出来的结果的类别是未定义的,而分类的目标是把数据分到已知的类别中。聚类是在给定的数据集合中寻找数据子集合,每个子集合形成一个类簇,簇内间的相似性高,而簇间的相似性低。通俗地说,k-means算法就是“物以类聚人

2014-02-11 21:10:26 2140 1

原创 机器学习练习之朴素贝叶斯

练习来自http://openclassroom.stanford.edu/MainFolder/DocumentPage.php?course=MachineLearning&doc=exercises/ex6/ex6.html         贝叶斯定理是概率论中非常重要的定理, 数学家Harold Jeffreys曾说"Bayes therom is the theory of prob

2014-01-23 16:38:11 2769

原创 机器学习练习之正则化

这个练习是来自http://openclassroom.stanford.edu/MainFolder/DocumentPage.php?course=MachineLearning&doc=exercises/ex5/ex5.htmlRegularized linear regression        之前已经做过线性回归, 我们知道线性回归就是要找到 一条直线去拟合训练数据,模型的

2014-01-20 16:37:36 5169

原创 机器学习练习之逻辑斯谛回归和牛顿方法

做完前面的线性回归练习后,这里继续练习逻辑斯蒂回归模型http://openclassroom.stanford.edu/MainFolder/DocumentPage.php?course=MachineLearning&doc=exercises/ex4/ex4.html。        给出的数据是40个被大学接收的学生和40个被拒绝的学生的数据,输入是一个二维向量,表示2门科目成绩,输

2014-01-18 20:37:13 4157 10

原创 机器学习练习之多变量线性回归

在做完上一篇只有一个变量的线性回归后,这里继续完成多元线性回归模型的练习:http://openclassroom.stanford.edu/MainFolder/DocumentPage.php?course=MachineLearning&doc=exercises/ex3/ex3.html。其实模型也是完成一样的,只不过输入是多维的特征而已,这里的数据是给定了房子大小和房间数相对应的房价,给

2014-01-17 22:45:23 1884

原创 机器学习练习之线性回归

还是要打好基础吧,再做做机器学习最基本的技术和方法。这个练习是线性回归,很基本的数据预测方法,练习来自Andrew Ng的http://openclassroom.stanford.edu/MainFolder/DocumentPage.php?course=MachineLearning&doc=exercises/ex2/ex2.html课程练习。       线性回归是有监督的学习方法,

2014-01-17 17:59:20 2950

原创 自编码算法与稀疏性

前言看完神经网络及BP算法介绍后,这里做一个小实验,内容是来自斯坦福ULIDL教程,实现图像的压缩表示,模型是用神经网络模型,训练方法是BP后向传播算法。理论       在有监督学习中,训练样本是具有标签的,一般神经网络是有监督的学习方法。我们这里要讲的是自编码神经网络,这是一种无监督的学习方法,它是让输出值等于自身来实现的。           从图中可以看到,神经网络模型

2014-01-07 20:33:43 5357 20

原创 谈谈信息熵--信息的度量

信息是一个抽象的概念,表示某个事件、情况或者概率,很难给信息下一个定义。我们常常说信息的多少,这个多少却很难度量。比如我们说一部中文字典到底有多少信息量,一本50多万字的《史记》又有多少信息量。究竟信息背后有没有理论基础呢?在香农信息论诞生以前,我们没有准确的数学方法来描述信息。直到1948年,香农在他著名的论文“通信的数学原理”中提出了“信息熵”的概念,信息的度量问题才得以解决。香农的信息论如今

2014-01-07 15:19:57 5981

原创 leetcode-Recover Binary Search Tree

题目说一个二叉搜索树的两个节点被错误交换,要求不改变树的结构恢复正常的二叉搜索树。

2014-01-03 21:42:10 1051

原创 重温二叉搜索树

二叉搜索树又名为二叉查找树,是一种查找树,一种很重要的数据结构,支持多种动态集合操作,包括插入、删除、查找等操作。     二叉搜索树可以当做字典(其中键就是树节点的关键字,值为任何类型的数据,叫做卫星数据),也可以当做优先队列。       二叉搜索树是递归定义的,定义是对树中的任一节点x,左子树的关键字y不大于该节点的关键字(key[y]=key[x])。      下面是二叉搜索

2014-01-03 16:27:07 1109

原创 浅谈神经网络

神经网络简介     神经网络起源于上个世纪40年代,到现在已经有70年的历史。然而神经网络是最近几年才逐渐火起来的,因为以前相关的理论模型、训练方法和计算能力的条件都还不成熟,随着06年多伦多大学的hinton在science上发表了论文,用神经网络来把高维的

2013-12-25 22:40:37 7274

原创 leetcode-Merge Two Sorted Lists

Merge 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.要把两个有序链表合成一个新的有序链表。/** * Definition for singly-linke

2013-12-17 19:27:03 914

原创 leetcode-Interleaving String

Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.For example,Given:s1 = "aabcc",s2 = "dbbca",When s3 = "aadbbcbcac", return true.When s3 = "aadbbbaccc", ret

2013-12-17 17:37:49 861

空空如也

空空如也

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

TA关注的人

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