- 博客(13)
- 资源 (1)
- 收藏
- 关注
原创 Python学习——sklearn作业
Scikit-learn Assignment 题目 In the second ML assignment you have to compare the performance of three di↵erent classification algorithms, namely Naive Bayes, SVM, and Random Forest. For this a...
2018-06-20 18:35:02
352
原创 Python学习——Anscombe’s quartet
Anscombe’s quartet Anscombe’s quartet comprises of four datasets, and is rather famous. Why? You’ll find out in this exercise. Part 1 For each of the four datasets… Compute the mean and variance ...
2018-06-09 23:32:27
477
原创 Python学习——Scipy作业
Scipy Exercises Exercise 10.1: Least squares Generate matrix A∈Rm∗nA∈Rm∗nA\in\mathbb{R}^{m*n} with m > n. Also generate some vector b∈Rmb∈Rmb\in\mathbb{R}^{m}. Now find x=argminx||Ax−b||2x=arg...
2018-06-02 21:26:46
632
原创 Python学习——matplotlib作业
Matplotlib Exercises Exercise 11.1: Plotting a function Plot the function f(x)=sin2(x−2)e−x2f(x)=sin2(x−2)e−x2f(x) = sin^{2}(x-2)e^{-x^2} over the interval [0, 2]. Add proper axis labels, a titl...
2018-05-30 18:40:38
546
原创 Python学习——numpy作业
Numpy Exercises Generate matrices A, with random Gaussian entries, B, a Toeplitz matrix, where A 2 Rn×m and B 2 Rm×m,for n = 200, m = 500. import numpy as np from scipy.linalg import toeplitz n, m...
2018-05-23 17:40:12
803
原创 Leetcode题目分析:Median of Two Sorted Arrays
4. Median of Two Sorted Arrays 题目 There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(l...
2018-05-05 22:07:13
186
原创 Leetcode题目分析:Spiral Matrix
54. Spiral Matrix 题目 Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. Example 1: Input: [ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8, 9 ] ] Output...
2018-05-01 19:38:45
159
原创 Python学习——第五周课程作业
9-3 用户 :创建一个名为User 的类,其中包含属性first_name 和last_name ,还有用户简介通常会存储的其他几个属性。在类User 中定义一个名为describe_user() 的方法,它打印用户信息摘要;再定义一个名为greet_user() 的方法,它向用户发出个性化的问候。 9-5 尝试登录次数 :在为完成练习9-3而编写的User 类中,添加一个名为login_at...
2018-05-01 14:51:16
1340
原创 Python学习——第四周课程作业
7-3 10的整数倍 :让用户输入一个数字,并指出这个数字是否是10的整数倍。 num = int(input('please input number: ')) if num % 10 == 0: print('It is a multiple of 10') else: print('It isn\'t a multiple of 10') 7-9 五香烟熏牛肉(pas...
2018-05-01 14:50:37
2439
原创 Python学习——第三周课程作业
5-8 以特殊方式跟管理员打招呼 :创建一个至少包含5个用户名的列表,且其中一个用户名为’admin’ 。想象你要编写代码,在每位用户登录网站后都打印一条问候消息。遍历用户名列表,并向每位用户打印一条问候消息。 如果用户名为’admin’ ,就打印一条特殊的问候消息,如“Hello admin, would you like to see a status report?”。 否则,打印一条普...
2018-03-25 20:45:32
2092
原创 Python序列类型用法小结(一):序列的基本操作
Python的序列类型(Sequence Types)有列表(list)和元组(tuple)。 列表是可变的(mutable),元组是不可变的(immutable),但两者的用法有很多相同之处。在Python3中,range也是一种不可变序列类型。 Python的序列其实是一种广义表,也就是说一个序列里可以存储各种不同的数据类型,然而现实中为了便于理解与操作,一般一个序列里只会...
2018-03-18 23:16:45
2795
原创 Python学习——第二周课程作业
3-4 嘉宾名单 :如果你可以邀请任何人一起共进晚餐(无论是在世的还是故去的),你会邀请哪些人?请创建一个列表,其中包含至少3个你想邀请的人;然后打印名单。 >>> Kanmusu = ['DD IJN Ayanami', 'CL USS Cleveland', 'CA KMS Prinz Eugen', 'CV IJN Akagi', 'CV IJN Kaga'] >...
2018-03-18 19:47:53
923
原创 Python学习——第一周课程作业
虽然说是第一周作业,不过在此之前我就学习了一部分语法,不算零基础入门了,这周作业也没什么可细说的,随便写写 初识Python Python最著名的特点莫过于简洁、易学习的语法和丰富的第三方库了。我也是通过Python官网提供的详细的文档学习相关语法的。 小目标 打算主要研究爬虫,希望将来能用自己编写的工具从各大插画网站上抓取插画、漫画。如果以后会学习图像识别等方面的知识,也希望能结合起...
2018-03-11 21:21:24
708
计算理论导引 第2版 中文版(带书签)
2018-09-06
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人