概率分布总结

常见分布 均匀分布: $rand(M,N)$ 伯努利分布(01分布,两点分布): $x=rand(M,N); y=(sign(x-P+eps)+1)/2, P为1的概率$ 二项分布:N个独立的伯努利分布中1的次数,$binornd(N,P,m)$ 泊松分布:描述单位时间内随机事件发生次数的概率分布,$poissrnd()$ 正态分布(高斯分布):$normrnd()$ 标准正态分布:……

阅读全文

pymaBandit说明

分布 Bernoulli distribution Poisson distribution Exponential distribution 策略 Gittin’s Bayesian optimal strategy for binary rewards [1] The classical UCB policy [2] The UCB-V policy [3] The KL-UCB policy [4] The Clopper-Pearson policy for binary rewards [4] The MOSS policy [5] The DMED policy [6] The Emipirical Likelihood UCB [7] The Bayes-UCB policy [8] The Thompson sampling policy [9] [1] Bandit Processes and Dynamic Allocation Indices J. C. Gittins. Journal of the Royal Statistical Society. Series B (Methodological) Vol. 41, No. 2. 1979 pp. 148–177 [2] Finite-time analysis of the multiarmed bandit problem Peter Auer, Nicolò Cesa-Bianchi and Paul Fischer. Machine Learning 47 2002 pp.235-256 [3] Exploration-exploitation trade-off using variance estimates in multi-armed bandits J.-Y. Audibert, R. Munos, Cs. Szepesvár……

阅读全文

Xcode6.1下ios8.1免证书真机调试

iOS9开始已经允许开发者创建免费证书进行真机调试了. 一个必要条件是机器必需为越狱且装有appsync,不然不能运行. 现在appsync for iOS 8 还是beta阶段,但也可以用了,具体见官方说明. 对于低版本的xcode其实有一个比较方便的软件:JailCoder,可惜作者不更新了. 自己……

阅读全文

Xcode子工程及cocoapods管理

iOS应用总会用到很多库,而苹果只允许使用第三方的静态库.所以,开发者不能制作简单的framework供其它开发者调用. 而且,静态库加入到自己的工程也是个比较麻烦的事情,特别是有些工程没有制作静态库的target,这时还要自己制作静态库目标. 自定义静态库 新建自己的工程,git化.……

阅读全文

iOS视图控制器初始化总结

首先,区别viewcontroller初始化的三种方式:完全代码化,半代码化初始和IB初始的区别 代码化:完全没有Xib之类的东西,通过纯代码实现加载. 半代码化:设计xib,然后在程序中用代码调用xib来初始化. 完全IB化:设计xib之类,然后加入到其它xib里.如MainWind……

阅读全文

iOS完全代码化开发

视图 把自定义视图控制器赋给Delegation-window-rootViewController,在自定义视图控制器的loadView方法中初始化view. NOIBDelegation.h 1 2 3 @class NOIBViewController; @property (strong, nonatomic) NOIBViewController *viewController; NOIBAppDelegate.m – didFinishLaunchingWithOptions: 1 self.window.rootViewController = viewController; NOIBViewController.h 1 @property (strong, nonatomic) UILabel *label; NOIBViewController.m 1 2 3 4 5 6 7 8 9 10 - (void)loadView { CGRect frame = CGRectMake(0, 0, 320, 480); self.view = [[UIView alloc] initWithFrame:frame]; self.view.backgroundColor = [UIColor whiteColor]; frame = CGRectMake(0, 0, 100, 50);……

阅读全文

iOSframe和bound的理解

翻译自此文 在iOS中,viewController是一个控制view层次的对象.主要负责MVC中Model和View之间的交互. viewController中有一个根视图self.view. self.view的范围是从状态栏下面到属于该控制器的下界(iOS7中已经改成透明状态栏了……

阅读全文

KDE4下gtk程序很丑

gtk程序如chromium和eclipse,在kde下的按钮像是到了win95年代 查了一下,发现只要安装gtk-qt-engine,然后在系统设置中调整成qt.现在貌似得到AUR里去下载gtk-qt-enqine了.……

阅读全文

python科学计算环境搭建

安装homebrew 安装python,设置环境变量 安装forgtran 下载numpy包,python setup.py(不能用pip安装,已坏) pip install scipy 安装matplotlib: brew install freetype,libpng; pip install matplotlib.……

阅读全文

wordpress的markdown

Markdown快速参考 强调 1 2 *Emphasize* _emphasize_ **Strong** __Strong__ 超链接 1 A [link](http://example.com "Title"). 或 1 2 3 Some text with [a link][1] and another [link][2]. [1]: http://example.com/ "Title" [2]: http://example.org/ "Title" 图片 1 Logo: ![Alt](/wp.png "Title") 或 1 2 Smaller logo: ![Alt][1] [1]: /wp-smaller.png "Title" 脚注 1 2 I have more [^1] to say up here. [^1]: To say down here. 换行 wordpress不支持双空格换行,只能支持回车换行 列表 1 2 * Item - Item 或 1 2 3 4 5 1. Item 2. Item * Mixed * Mixed 3. Item 区块 1 2 3 > Block 1 > Block 2……

阅读全文