<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[ltc8600的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/ltc8600</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; ltc8600]]></copyright><item><title><![CDATA[Python学习笔记——sklearn]]></title><link>https://blog.youkuaiyun.com/ltc8600/article/details/80735249</link><guid>https://blog.youkuaiyun.com/ltc8600/article/details/80735249</guid><author>ltc8600</author><pubDate>Tue, 19 Jun 2018 16:06:16 +0800</pubDate><description><![CDATA[练习题目：1. Create a classiﬁcation dataset (n samples 1000, n features 10)    2. Split the dataset using 10-fold cross validation    3. Train the algorithms        I GaussianNB        I SVC (possible C va...]]></description><category></category></item><item><title><![CDATA[Python学习笔记——Pandas、Seaborn]]></title><link>https://blog.youkuaiyun.com/ltc8600/article/details/80657363</link><guid>https://blog.youkuaiyun.com/ltc8600/article/details/80657363</guid><author>ltc8600</author><pubDate>Mon, 11 Jun 2018 20:24:23 +0800</pubDate><description><![CDATA[练习题目来源：https://nbviewer.jupyter.org/github/schmit/cme193-ipython-notebooks-lecture/blob/master/Exercises.ipynb#Anscombe's-quartetPart 1For each of the four datasets...Compute the mean and variance of ...]]></description><category></category></item><item><title><![CDATA[Python学习笔记——scipy]]></title><link>https://blog.youkuaiyun.com/ltc8600/article/details/80584644</link><guid>https://blog.youkuaiyun.com/ltc8600/article/details/80584644</guid><author>ltc8600</author><pubDate>Tue, 05 Jun 2018 17:36:01 +0800</pubDate><description><![CDATA[Exercise 10.1: Least squares Generate matrix A ∈ Rm×n with m&amp;gt; n. Also generate some vector b ∈ Rm. Now ﬁnd x = argminxkAx−bk2. Print the norm of the residual.#最小二乘法
import numpy as np  
import scip...]]></description><category></category></item><item><title><![CDATA[Python学习笔记——matplotlib]]></title><link>https://blog.youkuaiyun.com/ltc8600/article/details/80498308</link><guid>https://blog.youkuaiyun.com/ltc8600/article/details/80498308</guid><author>ltc8600</author><pubDate>Tue, 29 May 2018 16:38:28 +0800</pubDate><description><![CDATA[Exercise 11.1: Plotting a function Plot thefunctionf(x) = sin2(x−2)e−x2 over the interval [0,2]. Add proper axis labels, a title, etc.Exercise 11.2: Data Create a data matrix Xwith 20 observations of ...]]></description><category></category></item><item><title><![CDATA[Python学习笔记——numpy]]></title><link>https://blog.youkuaiyun.com/ltc8600/article/details/80402975</link><guid>https://blog.youkuaiyun.com/ltc8600/article/details/80402975</guid><author>ltc8600</author><pubDate>Tue, 22 May 2018 11:08:47 +0800</pubDate><description><![CDATA[numpy是python中一个类似于c语言中math的函数库，可以简化许多数学方法的使用。以下是练习题和代码：Generate matrices A, with random Gaussian entries, B, a Toeplitz matrix, where A ∈Rn×m and B ∈Rm×m, for n = 200, m = 500.Exercise 9.1: Matrix ope...]]></description><category></category></item><item><title><![CDATA[Python学习笔记——编程练习（4）]]></title><link>https://blog.youkuaiyun.com/ltc8600/article/details/80195402</link><guid>https://blog.youkuaiyun.com/ltc8600/article/details/80195402</guid><author>ltc8600</author><pubDate>Fri, 04 May 2018 15:07:30 +0800</pubDate><description><![CDATA[题目from： https://leetcode.com/problems/integer-to-roman/description/12. Integer to RomanRoman numerals are represented by seven different symbols: I, V, X, L, C, D and M.Symbol       Value
I           ...]]></description><category></category></item><item><title><![CDATA[Python学习笔记——编程练习（3）]]></title><link>https://blog.youkuaiyun.com/ltc8600/article/details/80192050</link><guid>https://blog.youkuaiyun.com/ltc8600/article/details/80192050</guid><author>ltc8600</author><pubDate>Fri, 04 May 2018 10:55:21 +0800</pubDate><description><![CDATA[题目来源于leetcode（https://leetcode.com/problems/3sum/description/） 3Sum Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c =0? Find all unique triplets in the array ...]]></description><category></category></item><item><title><![CDATA[Python学习笔记——编程练习（2）]]></title><link>https://blog.youkuaiyun.com/ltc8600/article/details/80115904</link><guid>https://blog.youkuaiyun.com/ltc8600/article/details/80115904</guid><author>ltc8600</author><pubDate>Sat, 28 Apr 2018 09:28:11 +0800</pubDate><description><![CDATA[题目来源于leetcode（https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/）Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the ...]]></description><category></category></item><item><title><![CDATA[Python学习笔记——编程练习（1）]]></title><link>https://blog.youkuaiyun.com/ltc8600/article/details/80112928</link><guid>https://blog.youkuaiyun.com/ltc8600/article/details/80112928</guid><author>ltc8600</author><pubDate>Fri, 27 Apr 2018 20:29:31 +0800</pubDate><description><![CDATA[本次的python学习进入到编程练习阶段，选取的练习题来源于leetcode。下面是这次选取的练习题：（https://leetcode.com/problems/regular-expression-matching/description/）Regular Expression MatchingGiven an input string (s) and a pattern (p), imple...]]></description><category></category></item><item><title><![CDATA[Python学习笔记——测试代码]]></title><link>https://blog.youkuaiyun.com/ltc8600/article/details/79872136</link><guid>https://blog.youkuaiyun.com/ltc8600/article/details/79872136</guid><author>ltc8600</author><pubDate>Mon, 09 Apr 2018 20:35:54 +0800</pubDate><description><![CDATA[本章学习了如何科学合理地进行代码的测试，这里用到了python中的unittest模块，unittest提供了若干函数，可以测试结果是否相同或不同、是否包含、是否为真或假等。以下是练习题的实现'''
#11-2  测试函数
import unittest
def get_city(city,country,population=0):  #函数实现，返回一个标准格式的字符串
    if popu...]]></description><category></category></item><item><title><![CDATA[Python学习笔记——文件和异常]]></title><link>https://blog.youkuaiyun.com/ltc8600/article/details/79849992</link><guid>https://blog.youkuaiyun.com/ltc8600/article/details/79849992</guid><author>ltc8600</author><pubDate>Sun, 08 Apr 2018 12:02:38 +0800</pubDate><description><![CDATA[本章学习了文件的读取、写入和异常处理，还有在文件中存储数据文件的读取和写入使用 with open('文件路径\文件名') as file 语句open('文件路径\文件名')视作只读模式，写入模式需要使用open('文件路径\文件名','w')，附加模式使用open('文件路径\文件名','a')，附加模式下不可修改文件，但是可以添加内容一般不使用close()来关闭文件，而是由python决定...]]></description><category></category></item><item><title><![CDATA[Python学习笔记——类]]></title><link>https://blog.youkuaiyun.com/ltc8600/article/details/79793583</link><guid>https://blog.youkuaiyun.com/ltc8600/article/details/79793583</guid><author>ltc8600</author><pubDate>Mon, 02 Apr 2018 19:14:20 +0800</pubDate><description><![CDATA[本章学习了python中的class（类），学习了如何创建一个类，利用__init__（）函数为类的变量赋初始值，定义类中的函数，修改类中的变量，以及类的继承等。python中的类与C++不同的是，没有了private,public,protect的限制，使得类的实现、变量的操作和多态的实现等很多方面的操作都变得非常方便。以下是本章部分练习题实现的代码，主要是实现了一个类，运用了本章提到的基本操作...]]></description><category></category></item><item><title><![CDATA[Python学习笔记——函数]]></title><link>https://blog.youkuaiyun.com/ltc8600/article/details/79733506</link><guid>https://blog.youkuaiyun.com/ltc8600/article/details/79733506</guid><author>ltc8600</author><pubDate>Wed, 28 Mar 2018 20:35:13 +0800</pubDate><description><![CDATA[今天学习了python中函数的基本操作，包括简单的函数定义，传递实参，返回实参，以及对参数的一些操作，以下是关于函数这一章节的部分练习题，本章中的内容基本都有涉及（模块部分没有涉及）：#8-1  定义函数
def display_message():
    print('Chapter 8 function\n')

display_message()

#8-2 函数参数，函数返回值
def ...]]></description><category></category></item><item><title><![CDATA[Python学习笔记——输入语句和while循环]]></title><link>https://blog.youkuaiyun.com/ltc8600/article/details/79701437</link><guid>https://blog.youkuaiyun.com/ltc8600/article/details/79701437</guid><author>ltc8600</author><pubDate>Mon, 26 Mar 2018 17:46:23 +0800</pubDate><description><![CDATA[在这节课我们学习到了python中的输入语句（读取一行的字符串）和while循环内容也比较简单，直接使用input（）函数和while语句即可实现，以下是部分练习题的代码：#7-3 输入整数
num=int(input('Plz enter a number: '))
if num%10==0:
    print('The number is mutiple of 10.')
else:
   ...]]></description><category></category></item><item><title><![CDATA[Python学习笔记——字典]]></title><link>https://blog.youkuaiyun.com/ltc8600/article/details/79645966</link><guid>https://blog.youkuaiyun.com/ltc8600/article/details/79645966</guid><author>ltc8600</author><pubDate>Wed, 21 Mar 2018 21:08:54 +0800</pubDate><description><![CDATA[本章学习了python中非常重要的一个数据结构——字典。字典相当于是一个列表，字典中的一个元素分别是键和对应的值，类似于C++中的pair和map，但是在使用中更加方便和灵活。以下是关于字典的简单代码，常用的简单操作基本上都有涉及。#6-1 建立字典
person_1={'name':'XiaoMing','age':20,'city':'GuangZhou'}  #初始化字典
for inf i...]]></description><category></category></item><item><title><![CDATA[Python学习笔记——if语句]]></title><link>https://blog.youkuaiyun.com/ltc8600/article/details/79618496</link><guid>https://blog.youkuaiyun.com/ltc8600/article/details/79618496</guid><author>ltc8600</author><pubDate>Mon, 19 Mar 2018 22:10:03 +0800</pubDate><description><![CDATA[本章节的内容较少，且python中条件语句的使用较为简单，故在此仅挑选了两大道较有代表性的练习题。import random as r  #使用random模块，用于生成随机数

age=r.randint(0,100)  #5-6 if-elif-else语句的应用——根据年龄输出不同语句，这里生成了0-100的随机整数
print('age:',end='')
print(age)
if ag...]]></description><category></category></item><item><title><![CDATA[Python学习笔记——列表②]]></title><link>https://blog.youkuaiyun.com/ltc8600/article/details/79561247</link><guid>https://blog.youkuaiyun.com/ltc8600/article/details/79561247</guid><author>ltc8600</author><pubDate>Wed, 14 Mar 2018 22:22:31 +0800</pubDate><description><![CDATA[今天继续了对python中列表数据类型的学习，并且通过对列表的学习掌握&quot;for&quot;循环的方式，range()函数，列表的切片和复制，以及对元组的学习。以下是部分练习题，并通过注释说明了一些需要注意的点。pizzas=['pizza_1','pizza_2','pizza_3']  #4-1 循环输出列表
                                        #这里用的是列表...]]></description><category></category></item><item><title><![CDATA[Python学习笔记——列表①]]></title><link>https://blog.youkuaiyun.com/ltc8600/article/details/79530846</link><guid>https://blog.youkuaiyun.com/ltc8600/article/details/79530846</guid><author>ltc8600</author><pubDate>Mon, 12 Mar 2018 18:24:12 +0800</pubDate><description><![CDATA[今天学习了列表这个数据类型，通过练习熟悉了列表的一些简单操作，如添加删除元素，还有列表的简单函数，sort()，insert()，pop()以下是部分课后练习的代码：guests=['Xiaoming','Xiaohong','Xiaoma'] #3-4 建立列表
for guest in guests:
    print('Would you like to have a dinner wit...]]></description><category></category></item><item><title><![CDATA[Python学习笔记——字符串和整数]]></title><link>https://blog.youkuaiyun.com/ltc8600/article/details/79516451</link><guid>https://blog.youkuaiyun.com/ltc8600/article/details/79516451</guid><author>ltc8600</author><pubDate>Sun, 11 Mar 2018 15:03:52 +0800</pubDate><description><![CDATA[这一部分的内容比较基础也比较简单，这里直接贴上课后练习题的代码，不做赘述：str1='new string'  #2-1 新建变量并打印
print(str1)

str1='the string has been changed'  #2-2 修改变量并打印
print(str1)

name='XiaoMing'  #2-3 个性化消息
print('Good morning, '+name+...]]></description><category></category></item><item><title><![CDATA[Python学习笔记——初识Python]]></title><link>https://blog.youkuaiyun.com/ltc8600/article/details/79451284</link><guid>https://blog.youkuaiyun.com/ltc8600/article/details/79451284</guid><author>ltc8600</author><pubDate>Mon, 05 Mar 2018 21:24:39 +0800</pubDate><description><![CDATA[Python一直以来被称为是一门简单易上手的编程语言，从他的官网主页上就能有这样的感受。相比较于C++和JAVA的主页，Python的主页显然看上去就更加赏心悦目，无论是简洁大方的界面设计，还是丰富的资源和介绍，都让人感受到Python的整个社区环境是非常好的。打开主页正中央是几行简洁的代码和语言风格介绍，这里对于Python的函数、数据结构、运算、语言风格和易上手性都有简明的实例化的介绍，对于刚...]]></description><category></category></item></channel></rss>