10 2016 档案
用Python对excel文件的简单操作
摘要:#-*-coding:utf8-*- import xlrd #代开excel文件读取数据 data = xlrd.open_workbook("C:\\Users\\hyl\\Desktop\\1.xls") #通过索引顺序获取一个工作表 table = data.sheet_by_index(0 阅读全文
posted @ 2016-10-27 11:44 Google-boy 阅读(253) 评论(0) 推荐(0)
matplotlib example
摘要:# This file generates an old version of the matplotlib logofrom __future__ import print_function# Above import not necessary for Python 3 onwards. Rec 阅读全文
posted @ 2016-10-26 20:12 Google-boy 阅读(404) 评论(0) 推荐(0)
numpy之sum
摘要:Definition : sum(a, axis=None, dtype=None, out=None, keepdims=False) axis: None or int or tuple of ints, optional Axis or axes along which a sum is pe 阅读全文
posted @ 2016-10-26 17:37 Google-boy 阅读(221) 评论(0) 推荐(0)
矩阵基本运算的 Python 实现
摘要:from...import与import区别在于import直接导入指定的库,而from....import则是从指定的库中导入指定的模块 import...as则是将import A as B,给予A库一个B的别称,帮助记忆 在机器学习中,对象是指含有一组特征的行向量。这个领域最出色的技术就是使用 阅读全文
posted @ 2016-10-26 11:29 Google-boy 阅读(1880) 评论(0) 推荐(0)
好用的工具
摘要:DItto:一款很好用的剪切板管理工具 Evernote:一款很好用的记录工作笔记的工具 SublimeText:一款很好的代码编辑器 Anaconda:包含Python以及一些基础依赖包(numpy,scipy,matplotlib,statemodels等),所以无需另外安装python及相关依 阅读全文
posted @ 2016-10-24 15:30 Google-boy 阅读(405) 评论(0) 推荐(0)
朴素贝叶斯分类器
摘要:这种方法之所以被冠以朴素,是因为它假设将要被组合的各个概率是彼此独立的。 阅读全文
posted @ 2016-10-20 22:02 Google-boy 阅读(145) 评论(0) 推荐(0)
C++基础
摘要:#include<iostream>using namespace std;class Point{ public://C++中类和结构体的起到的作用类似但是类可以进行对外的访问控制 int x; int y; /*void init(){ x = 0; y = 0; }*/ Point(){ x= 阅读全文
posted @ 2016-10-20 20:54 Google-boy 阅读(129) 评论(0) 推荐(0)
机器学习入门学习线路
摘要:1.搞明白机器学习十大算法,理解解决问题的思路。 2.看ng的公开课讲义,学会基础的推导过程是怎样的。 3.学习李老师的书,理论性的理解。 机器学习10大经典算法如下: 1、C4.5 C4.5算法是机器学习算法中的一种分类决策树算法,其核心算法是ID3算法. C4.5算法继承了ID3算法的优点,并在 阅读全文
posted @ 2016-10-20 09:52 Google-boy 阅读(292) 评论(0) 推荐(0)
C\C++对文件的读写操作
摘要:在C语言中我们如何来读写文件?只需调用freopen函数,stdin表示读入,而stdout标输出。具体操作如下: 输出样例: 在desktop文件夹中会有一个Output.txt C++中操作文件,它包含一个类,ofstream,(感觉跟Python的写法很像。。。)在头文件<fstream>中, 阅读全文
posted @ 2016-10-19 21:27 Google-boy 阅读(585) 评论(0) 推荐(0)
python 函数基础
摘要:定义: def intersect(seq1,seq2): res = [] for x in seq1: if x in seq2: res.append(x) yield res 运行效果 >>> s1 = "ATGC">>> s2 = "TGC">>> intersect(s1,s2)<gen 阅读全文
posted @ 2016-10-16 17:39 Google-boy 阅读(168) 评论(0) 推荐(0)
关于string的练习题目
摘要:/*Are they equal*/#include<iostream>#include<string>using namespace std;int n;string deal(string s, int & e){ int k = 0; while(s.length() > 0 && s[0] 阅读全文
posted @ 2016-10-16 16:28 Google-boy 阅读(258) 评论(0) 推荐(0)
C++之STL之string
摘要:/*C 语言中字符数组一般会采用char str[]来存放,但是显得会比较麻烦,C++在stl中加入了string类型,对字符串常用的功能进行了封装,操作起来比较方便*/ 输出结果如下: hello world 通过迭代器进行访问 /*string的拼接*/ 输出结果:: hello world h 阅读全文
posted @ 2016-10-16 12:24 Google-boy 阅读(188) 评论(0) 推荐(0)
C++STL库之set的用法
摘要:/*set意为集合,是一个内部自动排序不含重复元素的容器*/ 输出结果如下: 235 阅读全文
posted @ 2016-10-16 11:50 Google-boy 阅读(240) 评论(0) 推荐(0)
C++ STL库之vector
摘要:vector直译有“容器”之意,我们可以把它理解成是一个不限长度的数组。 我们可以通过代码进一步理解vector。 示例代码如下: 输出结果如下: 12345 /*vector的常见用途: 存储数据; 用邻接表存储图*/ 输出结果如下: 012 0812 0 关于vector更详细的介绍:http: 阅读全文
posted @ 2016-10-15 10:59 Google-boy 阅读(180) 评论(0) 推荐(0)