自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(13)
  • 收藏
  • 关注

原创 高级编程技术 sklearn课后作业

作业要求:1、Create a classification dataset (n samples ≥ 1000, n features ≥ 10)2、Split the dataset using 10-fold cross validation3、Train the algorithms:GaussianNBSVC (possible C values [1e-02, 1e-01, 1e00,...

2018-06-21 15:04:30 242

原创 高级编程技术 数据处理课后作业

给定一个csv文件,完成:Part 1: For each of the four datasets:Compute the mean and the variance of both x and yCompute the correlation coefficient between x and yCompute the linear regression line: y = β0 + β1x ...

2018-06-21 14:53:09 208

原创 高级编程技术 scipy课后作业

Exercise 10.1: Least squaresfrom scipy import linalg, statsimport numpy as npimport mathimport matplotlib.pyplot as pltm = 20n = 11A = np.random.randint(-10, 10, size = (m, n))b = np.random.ra...

2018-06-06 16:44:15 206

原创 高级编程技术 matplotlib课后作业

Exercise 11.1: Plotting a functionimport numpy as np import matplotlib.pyplot as plt x = np.linspace(0, 2, 200) f1 = x-2 f2 = np.exp(-1*np.power(x, 2)) f3 = np.sin(f1*f2) y = np.power(f...

2018-06-06 16:01:53 204

原创 高级编程技术 numpy课后作业

题意:Generate matrices A, with random Gaussian entries, B, a Toeplitz matrix,where A∈Rn×m and B∈Rm×m, for n = 200, m = 500.

2018-06-06 15:48:50 190

原创 高级编程技术 Python 第九周作业

Move Zeroes (#283)来源:https://leetcode.com/problems/move-zeroes/description/题意:给定一个数组 nums,编写一个函数将所有 0 移动到数组的末尾,同时保持非零元素的相对顺序。示例:输入: [0,1,0,3,12]输出: [1,3,12,0,0]分析:访问一遍数组,记录0的个数tot,并在数组末尾append上tot个0,...

2018-05-15 12:31:46 257

原创 高级编程技术 Python 第八周作业

Maximum Subarray (#53)来源:https://leetcode.com/problems/maximum-subarray/description/题意:给定一个整数数组 nums ,找到一个具有最大和的连续子数组(子数组最少包含一个元素),返回其最大和。示例:输入: [-2,1,-3,4,-1,2,1,-5,4],输出: 6解释: 连续子数组 [4,-1,2,1] 的和最...

2018-05-15 12:23:21 402

原创 高级编程技术 Python 第七周作业

Rotate Array (#189)来源:https://leetcode.com/problems/rotate-array/description/分析:给定一个数组和一个整数k,要求把数组的最后k个数按原序移到开头去。做法:使用O(n)的额外空间复杂度,把数组的后k个数和前n-k个数依次放入tmp数组中,再覆盖原有的数组。def rotate(self, nums, k): """...

2018-05-15 12:11:37 316

原创 高级编程技术 Python 第五周作业

第九章:类#9-1class Restaurant(): def __init__(self, name, cuisine_type): self.name = name self.type = cuisine_type def describe_restaurant(self): print('Restauran...

2018-04-08 20:43:33 222

原创 高级编程技术 Python 第四周作业

第七章:input和while#7-2a = input('How many people are there to have dinner? Please input: ')a = int(a)if (a > 8): print('There is no enough seats left.')else: print('There is enough seats. W...

2018-04-02 01:04:54 199

原创 高级编程技术 Python 第三周作业

第五章:if语句#5-6age = 100if (age < 2): print("Infant")elif (age < 4): print("Learning Walk")elif (age < 13): print("Child")elif (age < 20): print("Teenager")elif (age &amp

2018-04-02 00:10:15 210

原创 高级编程技术 Python 第二周作业

本周主要内容为列表和元组的基本操作。一、教材第三章练习选做3-1、3-2:基本的列表使用,没有任何难度。#3-1, 3-2names = ['Okabe Rintaro', 'Makise Kurisu', 'Shiina Mayuri']for name in names: print(name.title())for name in names: print(name.t...

2018-03-18 19:54:46 283

原创 高级编程技术 Python 第一周作业

一、浏览Python主页,可以看到Python是一门效率很高的语言,它的语法有助于创建整洁的代码,清晰的缩进等特性也使得Python代码易于阅读和调试。个人认为,Python的最大优势在于其拥有庞大并且实用的扩展库,囊括了Web、图形、数据库、爬虫,乃至机器学习等诸多领域。同时,Python也拥有一个有效的社区,帮助programmers解决问题。和C++隔几年出一次标准不同,Python采用频繁...

2018-03-11 15:12:51 180

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除