- 博客(319)
- 资源 (1)
- 收藏
- 关注
原创 Ubuntu 16.04 远程桌面
1、安装xrdpsudo apt-get install xrdp2、安装vnc4server我这里是安装xrdp的时候自动安装的。我看网上很多说是需要单独安装的。3、安装xfce4sudo apt-get install xubuntu-desktop这个软件比较大,总计需要260M。4、配置xfce4echo "xfce4-session" >~/.xsessi
2017-09-10 12:18:58
30798
3
原创 win10 python35 安装 opencv
http://www.lfd.uci.edu/~gohlke/pythonlibs/ 下载对应模块cd C:\python35\Lib\site-packages 运行 pip install 你下载的模块
2017-01-06 15:12:18
1963
原创 tensorflow安装技巧
我表示ubuntu经常出问题,已经安装了n次tensorflow了,所以在这里记下最简单最快的方法,大家安装的时候按照流程跑就可以了,有什么问题可以在评论里问我~1.下载cuda和cudnn https://developer.nvidia.com/cuda-downloads https://developer.nvidia.co
2016-06-21 17:39:40
5007
原创 theano测试代码
保存在这里,供大家参考import six.moves.cPickle as pickleimport gzipimport osimport sysimport timeitimport numpyimport theanoimport theano.tensor as Tdef load_data(dataset): with gzip.open(dataset
2016-03-07 21:07:35
2686
转载 Deep Belief Networks
NoteThis section assumes the reader has already read through Classifying MNIST digits using Logistic Regression and Multilayer Perceptron and Restricted Boltzmann Machines (RBM). Additionally it
2015-11-11 22:12:07
1156
转载 Restricted Boltzmann Machines (RBM)
NoteThis section assumes the reader has already read through Classifying MNIST digits using Logistic Regression and Multilayer Perceptron. Additionally it uses the following Theano functions and
2015-10-22 15:36:34
1186
转载 Convolutional Neural Networks (LeNet)
NoteThis section assumes the reader has already read through Classifying MNIST digits using Logistic Regression and Multilayer Perceptron. Additionally, it uses the following new Theano function
2015-09-26 21:13:48
1178
转载 Neural Networks and Backpropagation Algorithm
from UFLDL stanford Andrew NgConsider a supervised learning problem where we have access to labeled training examples (x(i),y(i)). Neural networks give a way of defining a complex, non-linear
2015-04-19 22:11:51
1182
转载 Linear-quadratic-Gaussian control
From Wikipedia, the free encyclopedia (Redirected from Linear-Quadratic-Gaussian control)In control theory, the linear-quadratic-Gaussian (LQG) control problem is one of the most fundam
2015-04-04 16:18:55
3522
原创 BestCoder Round #33 C
这次bc打跪了,rating扣了70+,差点变成紫名,B题看错题,然后推公式推了半天没搞出来,知道怎么做之后,发现爆了long long int的范围,怒跪c题开始用背包算法,直接对L排序,too naive!!没有考虑到一种情况可能达不到最优,因为之前的时间可能没有充分被利用,有可能可以交换到后面去取得更优的结果,当然是有反例的,正确方法是对 L-T排序,这样可以保证dp过程的最优性,是可以证明的,dp的方法类似0-1背包,下面是代码。。
2015-03-15 22:28:09
894
转载 Factor Analysis (2)
5 因子分析模型 上面的过程是从隐含随机变量z经过变换和误差扰动来得到观测到的样本点。其中z被称为因子,是低维的。 我们将式子再列一遍如下: 其中误差和z是独立的。 下面使用的因子分析表示方法是矩阵表示法,在参考资料中给出了一些其他的表示方法,如果不明白矩阵表示法,可以参考其他资料
2015-03-08 22:24:35
1198
转载 Factor Analysis (1)
1 问题 之前我们考虑的训练数据中样例的个数m都远远大于其特征个数n,这样不管是进行回归、聚类等都没有太大的问题。然而当训练样例个数m太小,甚至m<<n的时候,使用梯度下降法进行回归时,如果初值不同,得到的参数结果会有很大偏差(因为方程数小于参数个数)。另外,如果使用多元高斯分布(Multivariate Gaussian distribution)对数据进行拟合时,也会有问题
2015-03-08 22:23:46
1660
转载 增强学习(四) ----- 蒙特卡罗方法(Monte Carlo Methods)
1. 蒙特卡罗方法的基本思想蒙特卡罗方法又叫统计模拟方法,它使用随机数(或伪随机数)来解决计算的问题,是一类重要的数值计算方法。该方法的名字来源于世界著名的赌城蒙特卡罗,而蒙特卡罗方法正是以概率为基础的方法。一个简单的例子可以解释蒙特卡罗方法,假设我们需要计算一个不规则图形的面积,那么图形的不规则程度和分析性计算(比如积分)的复杂程度是成正比的。而采用蒙特卡罗方法是怎么计算的呢?首
2015-03-08 22:17:39
9030
转载 增强学习(三)----- MDP的动态规划解法
上一篇我们已经说到了,增强学习的目的就是求解马尔可夫决策过程(MDP)的最优策略,使其在任意初始状态下,都能获得最大的Vπ值。(本文不考虑非马尔可夫环境和不完全可观测马尔可夫决策过程(POMDP)中的增强学习)。那么如何求解最优策略呢?基本的解法有三种:动态规划法(dynamic programming methods)蒙特卡罗方法(Monte Carlo methods)
2015-03-08 22:17:00
33167
1
转载 增强学习(二)----- 马尔可夫决策过程MDP
1. 马尔可夫模型的几类子模型大家应该还记得马尔科夫链(Markov Chain),了解机器学习的也都知道隐马尔可夫模型(Hidden Markov Model,HMM)。它们具有的一个共同性质就是马尔可夫性(无后效性),也就是指系统的下个状态只与当前状态信息有关,而与更早之前的状态无关。马尔可夫决策过程(Markov Decision Process, MDP)也具有马尔可夫性,
2015-03-08 22:16:27
32543
转载 增强学习(Reinforcement Learning)
机器学习算法大致可以分为三种: 1. 监督学习(如回归,分类) 2. 非监督学习(如聚类,降维) 3. 增强学习什么是增强学习呢?增强学习(reinforcementlearning, RL)又叫做强化学习,是近年来机器学习和智能控制领域的主要方法之一。定义: Reinforcement learning is learning w
2015-03-08 22:16:25
19931
转载 The EM Algorithm
EM是我一直想深入学习的算法之一,第一次听说是在NLP课中的HMM那一节,为了解决HMM的参数估计问题,使用了EM算法。在之后的MT中的词对齐中也用到了。在Mitchell的书中也提到EM可以用于贝叶斯网络中。下面主要介绍EM的整个推导过程。1. Jensen不等式 回顾优化理论中的一些概念。设f是定义域为实数的函数,如果对于所有的实数x,,那么f是凸函数。当x是
2015-03-08 22:09:51
862
转载 线性判别分析(Linear Discriminant Analysis)(二)
4. 实例 将3维空间上的球体样本点投影到二维上,W1相比W2能够获得更好的分离效果。 PCA与LDA的降维对比: PCA选择样本点投影具有最大方差的方向,LDA选择分类性能最好的方向。 LDA既然叫做线性判别分析,应该具有一定的预测功能,比如新来一个样例x,如何确定其类别?
2015-03-08 22:07:31
800
转载 线性判别分析 (Linear Discriminant Analysis) (一)
1. 问题 之前我们讨论的PCA、ICA也好,对样本数据来言,可以是没有类别标签y的。回想我们做回归时,如果特征太多,那么会产生不相关特征引入、过度拟合等问题。我们可以使用PCA来降维,但PCA没有将类别标签考虑进去,属于无监督的。 比如回到上次提出的文档中含有“learn”和“study”的问题,使用PCA后,也许可以将这两个特征合并为一个,降了维度。但假设我们的
2015-03-08 22:05:32
985
转载 PCA and SVD
本文由LeftNotEasy发布于http://leftnoteasy.cnblogs.com, 本文可以被全部的转载或者部分使用,但请注明出处,如果有问题,请联系wheeleast@gmail.com前言: 上一次写了关于PCA与LDA的文章,PCA的实现一般有两种,一种是用特征值分解去实现的,一种是用奇异值分解去实现的。在上篇文章中便是基于特征值分解的一种解释。特征值和奇
2015-03-04 21:31:27
808
原创 BestCoder Round #27 D
最近看ML看的晕,各种数学不会,特么的最优化就算了还泛函数,能虐死你啊,还是刷刷bc补充点能量比较好#pragma comment(linker, "/STACK:102400000,102400000")#include#include#include#include#include#include#include#include#include#include#inc
2015-01-25 16:22:05
601
原创 BC\26\C
这次bc坑的很。。24分钟敲好B题结果输出超时被cha了,C题敲了好久敲好了发现公式推错了样例都过不了。。最后悲剧-200分#pragma comment(linker, "/STACK:102400000,102400000")#include#include#include#include#include#include#include#include#include
2015-01-10 22:40:00
858
原创 2014.12.7 Shanghai. Game Never Over.
今年的赛季告一段落了,5个铜也是醉了,尤其是最后这个铜三,铜一也拿过(嗯,还差一个铜二),题目不多说,坑点无数,也不再想了,隔了一年多没搞,这成绩也勉强能接受了,就像考研一样,重在参与嘛(某人别虚)接下来,真要好好搞机器学习了,导师说的很对,发高水平论文肯定比打这个比赛有说服力,可是我已经爱上这比赛了怎么破,总是在寻找那种被一道很困难的题难住然后突然解决之后的快感,那种瞬间彻底理解然后证明某个理论
2014-12-08 13:03:45
893
原创 hdu 5036 Explosion
bitset真是黑科技#pragma comment(linker, "/STACK:102400000,102400000")#include#include#include#include#include#include#include#include#include#include#include#include#include#includeusing n
2014-11-13 21:02:50
832
原创 hdu 5035 Delivery
#pragma comment(linker, "/STACK:102400000,102400000")#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;#ifdef _
2014-11-10 15:34:20
554
原创 hdu 5032 Always Cook Mushroom 离线树状数组
#pragma comment(linker, "/STACK:102400000,102400000")#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;#ifdef _
2014-11-09 21:05:51
688
转载 QR分解求矩阵全部特征值
QR算法求矩阵全部特征值的基本思想是利用矩阵的QR分解通过迭代格式 将A=A1化成相似的上三角阵,从而求出矩阵A的全部特征值。 QR方法的计算步骤如下: 下面就依次进行介绍。 一. 将一般矩阵化为上Hessenber
2014-11-08 18:57:28
47465
7
原创 hdu 5017 Ellipsoid
#pragma comment(linker, "/STACK:102400000,102400000")#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;#ifdef _
2014-11-08 18:56:46
1126
原创 hdu 5009 Paint Pearls
#pragma comment(linker, "/STACK:102400000,102400000")#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;#ifdef _
2014-11-05 18:14:22
564
原创 hdu 5008 Boring String Problem 【后缀数组】
#pragma comment(linker, "/STACK:102400000,102400000")#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;#ifdef _
2014-11-04 21:41:18
627
原创 SPOJ 7001. Visible Lattice Points 【mobius反演】
#pragma comment(linker, "/STACK:102400000,102400000")#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;#ifdef _
2014-10-31 19:27:03
650
原创 hdu 5006 求解电阻网络等效电阻
#pragma comment(linker, "/STACK:102400000,102400000")#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;#ifdef _
2014-10-31 15:05:13
809
原创 hdu 5080 2014ACM/ICPC鞍山K题 polya计数
首先,中心点是可以直接算出来的把所有的坐标相加再除n就可以然后枚举一个不靠近中心的点,枚举它绕中心点旋转的角度,只要枚举50次就可以了计算出当前枚举的的角度是否能形成一个置换群计算循环节,再用polya定理算个数#pragma comment(linker, "/STACK:102400000,102400000")#include#include#include#
2014-10-24 16:29:26
1897
原创 hdu 5072 2014ACM/ICPC鞍山C题
#pragma comment(linker, "/STACK:102400000,102400000")#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;#ifdef _
2014-10-24 14:24:51
1066
原创 ZOJ 3820 2014ACM/ICPC牡丹江赛区B题
37977142014-10-12 21:58:19Accepted3820C++135070240zz_1215比较麻烦的一道题吧,开始的时候不停的段异常,后面知道是爆栈了,然后用数组模拟递归,才ac了思路挺简单的,先找到这个树的直径,单独拿出来,可以证明最后选的两个点一定是在直径上的,我就不证了然后求出这条直径上的每个点向外延伸的最远距离
2014-10-12 22:11:59
1878
1
原创 hdu 4997 Biconnected
这题主要是计算连通子图的个数(c)和不连通子图的个数(dc)还有连通度为1的子图的个数(c1)和连通度为2以上的子图的个数(c2)之间的转化关系主要思路大概如下:用状态压缩的方法算出状态为x的子图的不连通子图个数dc[x],dc[x] = ∑ c[i]*(2^edge[x-i]),i为x的子集且i中有x的编号最小的元素,edge[x] 表示x集合内有几条边连通子图个数c[x] = 2
2014-10-08 20:03:42
1857
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人