自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 [RL] 5 Monte Carlo Methods (1)

——清明给自己放了假,见了高中老铁和他妻子,谨以此博客献给这幸福的一对,就这样度过一生哦:)  我们开始讲我们的第一个估计value functions、发现optimal policies的学习方法。 由于这一系列[RL]的博客都是围绕着增强学习问题讲的,因此建议从[RL] 3 Finite Markov Decision Processes (1)看起,至少需要了解建好的MDP模型。  与

2017-04-05 23:20:11 1643

原创 [NLP] Word Vectors (1)

最近博客开的分支有点多,PRML、RL、TensorFlow,现在又开一个NLP,有点忙不过来了。主要是组内最近开了RL和NLP两个方向,而我都需要跟进,当然NLP不是我的主要方向,因此写博客我也就写得简略一些。   学习的主要的参考材料是Stanford的公开课程。Cooccurrence Matrix  Word vectors的主要思想,是用在文档中某个词附近出现的词来表示这个词(也就是说,

2017-03-30 01:02:21 2124

原创 [RL] 4 Dynamic Programming (2)

接上一篇博客[RL] 4 Dynamic Programming (1)。Policy Iteration  对于给定的policyπpolicy \,\,\pi,一旦我们通过vπv_\pi改进后得到π′\pi',我们就可以计算新的value functionv′πv_\pi',然后我们就可以进一步改进π′\pi'得到π′′\pi''。因此我们可以得到policies和value functions

2017-03-29 16:11:14 542 2

原创 [RL] 4 Dynamic Programming (1)

Introduction  在这里,动态规划(Dynamic Programming, DP)指的是一类算法,在MDP中,给定一个完美的environment的模型,它们可以计算相应的optimal policy。 关于MDP,详见之前的三篇博客:[RL] 3 Finite Markov Decision Processes (1)、[RL] 3 Finite Markov Decision P

2017-03-28 16:13:06 566

原创 [TensorFlow] TensorFlow Get Started (2)

接上一篇博客[TensorFlow] TensorFlow Get Started (1)。tf.train API  TensorFlow提供了optimizers,可以缓慢地更改每个变量,最大程度地最小化损失函数(loss function)。最简单的optimizer是gradient descent(梯度下降)。它根据损失函数的梯度方向改变变量的值。一般,人工计算梯度是复杂的而

2017-03-25 15:26:40 409

原创 [RL] 3 Finite Markov Decision Processes (3)

Previous Blog  在开始新的内容之前,我们先回顾一下前两篇博客[RL] 3 Finite Markov Decision Processes (1) 、[RL] 3 Finite Markov Decision Processes (2)给出的重要概念和式子:state:   St=s∈SS_t = s \in \mathcal Saction:   At=a∈A(St

2017-03-24 20:41:17 460

原创 [RL] 3 Finite Markov Decision Processes (2)

在上一篇博客[RL] 3 Finite Markov Decision Processes (1) 中,我们将问题抽象成一个模型,本篇博客,我们将着手解这个模型。The Markov Property  在增强学习中,agent根据evironment给出的state做出决策。这里我们先详细探讨一下state:一些state应该满足的条件以及不应该期望state满足的条件。   state表示所有

2017-03-23 00:09:00 539

原创 [RL] 3 Finite Markov Decision Processes (1)

最近在学习Reinforcement Learning,参考sutton老爷爷的教材。由于最近需要在组内分享一下第三章,所以先写了这篇博客,前面两章之后补上吧。The Agent-Environment Interfaceagent : 学习者和决策者。environment : 与agent交互、在agent外部的所有。  agent与environment持续地交互,agent选择acti

2017-03-21 23:32:05 707

原创 [TensorFlow] TensorFlow Get Started (1)

本篇博客主要参考TensorFlow官网上的Get Started文档Get Started。Tensors  在TensorFlow中,数据的主要单元称为tensor。tensor将一组原始值封装成一个任意维数的阵列。tensor的rank是它的维数。 3 # rank为0的tensor,是一个大小为[]的标量 [1., 2., 3.] # rank为1的tensor,是一个大小为[3]

2017-03-20 22:53:49 363

原创 [TensorFlow] win10安装TensorFlow

安装指南  Instaling TensorFlow on Windows安装CUDA Toolkit 8.0  CUDA Toolkit安装说明   CUDA Toolkit下载地址   选择对应的Toolkit下载,在win10下,双击.exe安装即可。安装完毕后,需要看一下环境变量是否配置。 图1 下载CUDA Toolkit安装cuDNN v5.1  cuDNN下载地址   下载

2017-03-19 20:47:10 626

原创 [PRML] Bayesian Learning 贝叶斯学习方法 - 后续

前面的故事  上一篇[PRML] Bayesian Learning 贝叶斯学习方法 的最后,富翁又向我们提出了新的问题。富翁:现在我给你一个骰子,你能告诉我掷一次每个点数出现的概率吗?-:恩,我可以用差不多的方法解决你的问题。给富翁的解释  实际上,这个问题只是把θ\theta从一个变量扩展成了一维变量θθ\pmb{\theta}。   我们设θθ={θ1,...,θr},θ1+...+θ

2017-03-17 12:01:36 3705

原创 [PRML] Bayesian Learning 贝叶斯学习方法

问题引入  在上一篇博客[PRML] Point Estimation 点估计 的最后,难搞的富翁提了一个无厘头的问题,他固执地认为,图钉头朝上和屁股朝上的概率和抛硬币一样是五五开。尽管我们很好地用理论阐述了为什么图钉头朝上的概率是3/5,但富翁还是要我们解释一下为什么。没办法,谁让人家给钱呢:(θ\theta的概率分布  在点估计中,我们假设图钉头朝上的概率是一个单值,现在,更一般地,我们假设θ\

2017-03-16 15:15:39 5916

原创 [PRML] Point Estimation 点估计

问题引入——一份咨询工作  你的第一份工作是一份咨询工作,一天,一位来自北京的亿万富翁向你咨询一个问题。富翁: 我丢一枚图钉,有多大的可能它的尖端向上。你:可以丢几次图钉。丢图钉结果:你:有3/5的概率尖端向上。富翁:为什么是3/5?你:因为……二项分布  设Heads为尖端向上,它的概率为θ\theta,Tails为尾巴向上,D为几次丢图钉的观测结果,H表示一次丢图钉观测到Heads

2017-03-15 09:40:43 1378

原创 [LeetCode] Merge k Sorted Lists 解题报告

[题目] Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.[中文翻译] 合并k个已排好序的链表,并将其作为一个链表返回。 分析和描述其复杂性。[解题思路] 这题的朴素思路可以先参考[LeetCode] Merge Two Sorted Lists

2017-03-13 21:51:42 202

原创 [LeetCode] Generate Parentheses 解题报告

[题目] Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is: [ “((()))”, “(()())”, “(())()”,

2017-03-13 20:26:03 253

原创 [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.[中文翻译] 合并两个已排好序的链表,并将其作为新的链表返回。 新链表需要通过将原有链表的节点拼接在一起获

2017-03-13 16:52:51 278

原创 [LeetCode] Valid Parentheses 解题报告

[题目] Given a string containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[‘ and ‘]’, determine if the input string is valid. The brackets must close in the correct order, “()” and “()[]{}” are all val

2017-03-04 15:55:52 198

原创 [LeetCode] Remove Nth Node From End of List 解题报告

[题目] Given a linked list, remove the nth node from the end of list and return its head. For example, Given linked list: 1->2->3->4->5, and n = 2. After removing the second node from the end, the

2017-03-04 15:36:32 183

原创 [LeetCode] 4Sum 解题报告

[题目] Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target. Note: The solutio

2017-03-03 19:34:23 236

原创 [LeetCode] Letter Combinations of a Phone Number 解题报告

[题目] Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telephone buttons) is given below. Input: Digit s

2017-02-21 18:52:04 292

原创 [LeetCode] 3Sum Closest 解题报告

[题目] Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have ex

2017-02-21 16:45:37 240

原创 [LeetCode] 3Sum 解题报告

[题目] Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0 ? Find all unique triplets in the array which gives the sum of zero. Note: The solution set must not conta

2017-02-21 16:24:51 266

原创 [LeetCode] Longest Common Prefix 解题报告

[题目] Write a function to find the longest common prefix string amongst an array of strings.[中文翻译] 写一个函数查找字符串数组的最长公共前缀。[解题思路] 枚举最长公共子串的长度。对于当前枚举到的位置,判断字符串数组当前位的字符是否都相同,如果不是都相同,则已获得了最长公共子串的长度,否则,继续枚举。

2017-02-21 15:27:28 180

原创 [LeetCode] Roman to Integer 解题报告

[题目] Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999.[中文翻译] 给定一个罗马数字,将其转换为整数。 输入保证在1到3999的范围内。[解题思路] 罗马数字转换为整数的规律较为简单。 罗马数字 整数 ‘I’

2017-02-21 15:19:41 320

原创 [LeetCode] Integer to Roman 解题报告

[题目] Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999.[中文翻译] 给定一个整数,将其转换为罗马数字。 输入保证在1到3999的范围内。[解题思路] 一开始错了几次,然后发现罗马数字的规则还是挺复杂的。 原本是打算找一下

2017-02-20 20:21:45 229

原创 [LeetCode] Container With Most Water 解题报告

[题目] Given n non-negative integers a1, a2, …, an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find t

2017-02-20 20:14:43 869

原创 [LeetCode] Regular Expression Matching 解题报告

[题目] mplement regular expression matching with support for ‘.’ and ‘*’. ‘.’ Matches any single character. ‘*’ Matches zero or more of the preceding element. The matching should cover the ent

2017-02-20 19:36:20 275

原创 [LeetCode] Palindrome Number 解题报告

[题目] Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) If you are thinking of converting the integer to string,

2017-02-20 19:03:22 159

原创 分布式缓存框架Ehcache简介

一、什么是Ehcache  Ehcache是纯java的开源缓存框架,具有快速、精干等特点,是Hibernate中默认的CacheProvider。它主要面向通用缓存、Java EE和轻量级容器,具有内存和磁盘存储、缓存加载器、缓存扩展、缓存异常处理程序。   Ehcache最初由Greg Luck于2003年开始开发。2009年,该项目被Terracotta购买。

2017-01-18 16:44:33 769

原创 Memcached与Redis比较

上一篇文章我们详细介绍了分布式缓存服务器Memcached,本文将比较另一个缓存服务器Redis。一、服务方式  Memcached和Redis均可在本地作为独立进程提供服务,也可以在远端提供服务。在本地服务时,支持进程间通信,在远端服务时,支持tcp和udp协议。

2017-01-18 13:16:48 212

原创 Memcached内存管理与分布式算法

上一篇文章简单介绍了分布式内存对象缓存系统Memcached,本文将从内存管理和分布式算法两个方面介绍Memcached的内部实现原理。一、Slab Allocation机制  Memcached默认采用Slab Allocation机制分配管理内存。

2017-01-18 01:45:43 428

原创 Memcached初探

Memcached初探 在数据驱动的Web开发中,经常要重复从数据库中取出相同的数据,这极大的增加了数据库负载。根据“二八原则”,即80%的请求访问了20%的数据,缓存热数据是解决这个问题的好办法。   Memcached 是一个高性能的分布式内存对象缓存系统,由LiveJournal旗下Danga Interactive公司的Brad Fitzpatric带头开发

2017-01-17 23:30:39 193

原创 [LeetCode] String to Integer (atoi) 解题报告

—— write for my baby, mua[题目]Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask

2016-10-15 09:49:23 191

原创 [LeetCode] Reverse Integer 解题报告

—— write for my baby, mua[题目]Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321[中文翻译]将整数的数字反向。例子1: x = 123, 返回 321例子2: x = -123, 返回 -32

2016-10-12 10:05:51 262

原创 [LeetCode] ZigZag Conversion 解题报告

—— write for my baby, mua[题目]The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for bette

2016-10-12 09:06:56 331

原创 [LeetCode] Longest Palindromic Substring 解题报告

—— write for my baby, mua[题目]Given a string S, find the longest palindromic substring in S. You may assume that the maximum length ofS is 1000, and there exists one unique longest palindro

2016-10-11 13:12:36 260

原创 [LeetCode] Median of Two Sorted Arrays 解题报告

—— write for my baby, mua[题目]There are two sorted arrays nums1 and nums2 of size m and n respectively.Find the median of the two sorted arrays. The overall run time complexity should be

2016-10-10 16:30:51 219

原创 [LeetCode] Longest Substring Without Repeating Characters 解题报告

—— write for my baby, mua[题目]Given a string, find the length of the longest substring without repeating characters.Examples:Given "abcabcbb", the answer is"abc", which the length i

2016-10-09 20:10:49 222

原创 [LeetCode] Add Two Numbers 解题报告

—— write for my baby, mua[题目]You 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. Ad

2016-10-09 16:06:05 315

原创 [LeetCode] Two Sum 解题报告

—— write for my baby, mua[题目]Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly on

2016-10-08 11:01:04 254

空空如也

空空如也

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

TA关注的人

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