摘要: 一、机器学习模型按照可使用的数据类型分为监督学习和无监督学习两大类。 1-监督学习主要包括用于分类和用于回归的模型: 1)分类:线性分类器(如LR)、支持向量机(SVM)、朴素贝叶斯(NB)、K近邻(KNN)、决策树(DT)、集成模型(RF/GDBT等) 2)回归:线性回归、支持向量机(SVM)、K 阅读全文
posted @ 2017-02-05 23:29 big_brother 阅读(16883) 评论(0) 推荐(0) 编辑
摘要: 目前,工业界比较高效、常用的预测分析类算法主要分为两种: 1.惩罚线性回归 2.集成方法(ensemble method) 面对绝大多数预测问题,上述两种方法都能达到最优或者接近最优的性能。比如boosted decision trees、RF、Bagged decision trees属于集成方法 阅读全文
posted @ 2017-01-05 10:48 big_brother 阅读(1726) 评论(0) 推荐(0) 编辑
摘要: 该题较为简单,但是需要知道罗马数字的表示以及取值。用了一下map,其实之前没用过,但仔细看了一下跟python的字典实际上差不多,扫了一遍函数就直接可以用了、 阅读全文
posted @ 2016-12-08 00:00 big_brother 阅读(491) 评论(0) 推荐(0) 编辑
摘要: 最近准备结束自己的科研生涯,准备要开始找工作了,准备在LEETCODE刷刷题...刷的前40题全部用python刷的,各种调包速度奇快,后被师哥告知这样没意义,于是准备开始回归C++,Python用的多了再用C++总是忘记敲分号和括号,甚至Compile Error了几次 = =。尴尬 链表反转比较 阅读全文
posted @ 2016-12-07 23:53 big_brother 阅读(1754) 评论(0) 推荐(0) 编辑
摘要: ************************************* 原文地址 CSDN(Linux小白学习入门过程): http://blog.csdn.net/sundenskyqq/article/details/47169369 **************************** 阅读全文
posted @ 2016-02-25 14:27 big_brother 阅读(386) 评论(0) 推荐(0) 编辑
摘要: li=[[1,2,3,4,5],[1,2,3,4,5],[1,2,3,4,5],[1,2,3,4,5],[1,2,3,4,5]]s=0for i in range(0,5): for j in range(0,5): print li[i][j], print ""print "+++++++++... 阅读全文
posted @ 2015-11-02 15:08 big_brother 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 字符串函数:chr() 数字转ASCII chr(96)="a"ord() ASCII转数字 ord("a")=96isspace() 判断是否为空格 s="abcde" s.isspace() 返回true or falsefind() 返回字符串的索引,查不到返回-1. s="abcde" s.... 阅读全文
posted @ 2015-11-02 14:56 big_brother 阅读(161) 评论(0) 推荐(0) 编辑
摘要: #2015.10.29 s='''http://baidu.com http://qq.com'''#抓取地址head="http:"tail=".com"posh=0post=0for i in range(0,s.count(head)): posh=s.find(head,post) post... 阅读全文
posted @ 2015-10-29 10:55 big_brother 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 回归与梯度下降: 回归在数学上来说是给定一个点集,能够用一条曲线去拟合之,如果这个曲线是一条直线,那就被称为线性回归,如果曲线是一条二次曲线,就被称为二次回归,回归还有很多的变种,如locally weighted回归,logistic回归,等等,这个将在后面去讲。 用一个很简单的例子来说明回归,这... 阅读全文
posted @ 2015-09-07 11:28 big_brother 阅读(462) 评论(0) 推荐(0) 编辑
摘要: # coding=utf-8 定义后可使用中文#var定义输出i=1print(i)#ifif i>0: print(i)else: print("x")#循环+字符串拼接for i in range(1,100): print("hello {0} {1}".format... 阅读全文
posted @ 2015-08-23 10:37 big_brother 阅读(177) 评论(0) 推荐(0) 编辑