- 博客(15)
- 收藏
- 关注
原创 第十五周作业
【题目要求】【代码】from sklearn import datasetsfrom sklearn import cross_validationfrom sklearn.naive_bayes import GaussianNBfrom sklearn.svm import SVCfrom sklearn.ensemble import RandomForestClassifierf...
2018-07-13 23:39:16 180
原创 第十四周作业
%matplotlib inlineimport randomimport numpy as npimport scipy as spimport pandas as pdimport matplotlib.pyplot as pltimport seaborn as snsimport statsmodels.api as smimport statsmodels.form...
2018-07-13 23:15:19 434
原创 第十三周作业
import numpy as npimport scipy.spatialimport scipy.optimizeimport math#ex 10.1print("#Exercise 10.1: Least squares")A=np.random.normal(size=(3,2))x=np.random.normal(size=(2,1))b=np.dot(A,x)p...
2018-07-13 21:55:58 156
原创 第十二周作业
import matplotlib.pyplot as pltimport numpy as npimport scipy.stats#ex 11.1print("ex 11.1")x=np.linspace(0,2,1000)# y=np.power(np.sin(x-2),2)*np.exp(-np.power(x,2))y=(np.sin(x-2))**2*np.exp(-(...
2018-07-13 21:47:58 175
原创 第十一周作业
import numpy as npimport scipy.linalgimport matplotlib.pyplot as plt #initializen, m = 200, 500A = np.mat(np.random.normal(size = (200, 500)))B = np.mat(scipy.linalg.toeplitz([np.random.normal(...
2018-07-13 21:37:26 128
原创 【LeetCode解题报告】164. Maximum Gap
题目来源:https://leetcode.com/problems/maximum-gap/description/题目:Given an unsorted array, find the maximum difference between the successive elements in its sorted form.Return 0 if the array contains les...
2018-05-15 14:04:26 164
原创 【LeetCode解题报告】74. Search a 2D Matrix
题目来源:https://leetcode.com/problems/search-a-2d-matrix/description/题目:Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:Integers in eac...
2018-05-15 13:55:01 176
原创 【LeetCode解题报告】75. Sort Colors
题目来源:https://leetcode.com/problems/sort-colors/description/题目:Given an array with n objects colored red, white or blue, sort them in-place so that objects of the same color are adjacent, with the colo...
2018-05-15 13:42:51 158
原创 【LeetCode解题报告】53. Maximum Subarray
题目来源:https://leetcode.com/problems/maximum-subarray/description/ 题目:Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its ...
2018-05-15 13:34:53 138
原创 第五周作业
一.第九章“动手试一试” 9-1: 9-2: 9-4: 9-6:二.第十章“动手试一试” 10-1: 10-2: 10-3: 10-4:
2018-04-09 00:08:49 117
原创 第四周作业
一.教材第七章“动手试一试” 7-1: 7-3: 7-4: 7-8:二.教材第八章“动手试一试” 8-1: 8-2: 8-5: 8-6:
2018-04-02 00:31:12 198
原创 第三周作业
一.教程第五章“动手试一试” 5-1: 5-3: 5-7: 5-8:二.教材第六章“动手试一试” 6-1: 6-5: 6-7: 6-9:...
2018-03-25 22:49:26 145
原创 第二周作业
一. 教材第三章练习 3-1: 3-2: 3-3: 3-4: 3-5: 3-6: 3-8: 3-9:二.教材第四章练习 4-2: 4-3: 4-5: 4-8: 4-10: 4-13:...
2018-03-19 00:39:19 142
原创 第一周作业
一. 初识Python(逛Python主页(https://www.python.org/)) 1. 映入眼帘的第一句话便是: Python is a programming language that lets you work quickly and integrate systems more effectively. 可以看出,Python官网对自己这...
2018-03-11 22:28:59 222 1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人