2017年10月23日

决策树

摘要: 决策树是一种基本的分类与回归方法。决策树模型呈树形结构,可以认为是if-then规则的集合,也可以认为是定义在特征空间与类空间上的条件概率分布。其主要优点是模型具有可读性,分类速度快。学习时,利用训练数据,根据损失函数最小化的原则建立决策树模型。预测时,对新的数据,利用决策树模型进行分类。决策树学习 阅读全文

posted @ 2017-10-23 16:12 Peyton_Li 阅读(3616) 评论(1) 推荐(0) 编辑

2017年10月11日

回文数判断

摘要: Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) If you are thi 阅读全文

posted @ 2017-10-11 16:20 Peyton_Li 阅读(143) 评论(0) 推荐(0) 编辑

将字符串转换成整数

摘要: 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 阅读全文

posted @ 2017-10-11 15:22 Peyton_Li 阅读(196) 评论(0) 推荐(0) 编辑

ZigZag Conversion

摘要: 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 阅读全文

posted @ 2017-10-11 00:02 Peyton_Li 阅读(131) 评论(0) 推荐(0) 编辑

2017年10月9日

最长回文子串

摘要: Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example: Input: "babad" Output: "b 阅读全文

posted @ 2017-10-09 23:03 Peyton_Li 阅读(180) 评论(0) 推荐(0) 编辑

最长的无重复字母的子串

摘要: Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the leng 阅读全文

posted @ 2017-10-09 14:53 Peyton_Li 阅读(197) 评论(0) 推荐(0) 编辑

2017年10月3日

最大熵模型

摘要: 曾经被问,Logistic回归为什么用sigmoid函数。一时语塞······ Logistic回归采用sigmoid函数与最大熵有关。 最大熵原理是概率模型学习的一个准则。最大熵原理认为,学习概率模型时,在所有可能的概率模型(分布)中,熵最大的模型是最好的模型。 假设离散随机变量X的概率分布是P( 阅读全文

posted @ 2017-10-03 23:20 Peyton_Li 阅读(657) 评论(0) 推荐(0) 编辑

2017年10月2日

模型小型化

摘要: 实习终于结束了,现把实习期间做的基于人体姿态估计的模型小型化的工作做个总结。 现在深度学习模型开始走向应用,因此我们需要把深度学习网络和模型部署到一些硬件上,而现有一些模型的参数量由于过大,会导致在一些硬件上的运行速度很慢,所以我们需要对深度学习模型进行小型化处理。模型小型化旨在保证模型效果不会明显 阅读全文

posted @ 2017-10-02 16:11 Peyton_Li 阅读(1116) 评论(0) 推荐(0) 编辑

Logistic回归和SVM的异同

摘要: 这个问题在最近面试的时候被问了几次,让谈一下Logistic回归(以下简称LR)和SVM的异同。由于之前没有对比分析过,而且不知道从哪个角度去分析,一时语塞,只能不知为不知。 现在对这二者做一个对比分析,理清一下思路。 相同点 1、LR和SVM都是分类算法(曾经我认为这个点简直就是废话,了解机器学习 阅读全文

posted @ 2017-10-02 14:11 Peyton_Li 阅读(8887) 评论(0) 推荐(2) 编辑

2017年9月29日

从Softmax回归到Logistic回归

摘要: Softmax回归是Logistic回归在多分类问题上的推广,是有监督的。 回归的假设函数(hypothesis function)为,我们将训练模型参数,使其能够最小化代价函数: 在Softmax回归中,我们解决的是多分类问题,类标y可以取k个不同的值。对于给定的测试输入x,我们想用假设函数针对每 阅读全文

posted @ 2017-09-29 19:34 Peyton_Li 阅读(919) 评论(0) 推荐(0) 编辑

导航