from IPython.core.interactiveshell import InteractiveShell
from IPython.display import display, Latex
InteractiveShell.ast_node_interactivity = "all"
SciPy是基於NumPy的擴展,是數學算法的集合。
scipy.io: 數據輸入輸出
scipy.integrate: 積分
scipy.interpolate: 插值
scipy.linalg: 線性代數
scipy.optimize: 優化
scipy.cluster: 聚類
scipy.constants: 物理和數學常量
scipy.fftpack: 傅立葉變換
scipy.ndimage: n維圖像包
scipy.odr: 正交距離回歸
scipy.signal: 信號處理
scipy.sparse: 稀疏矩陣
scipy.spatial: 空間數據結構和算法
scipy.special: 一些特殊的數學函數
scipy.stats: 統計
積分import numpy as np
import scipy.integrate as integrate
(a,error) = integrate.quad(lambda x: 1, 0, 4)
a,error
integrate.quad(lambda x: x**2, 0, 4)
invexp = lambda x: np.exp(-x)
integrate.quad(invexp, 0, np.inf)
y = lambda x: 1 if x<=0 else 0
integrate.quad(y, -1, 1)
SciPy通用插值工具可用於1、2和更高維度的數據:
表示1-D中插值(interp1d)的類,提供了幾種插值方法。
griddata可以進行N維內插(N = 1,2,3,4,…)。
基於FORTRAN庫FITPACK的一維和二維(平滑)三次樣條插值函數。
使用徑向基函數進行插值。
from scipy.interpolate import interp1d
import matplotlib.pyplot as plt
x = np.linspace(0, 10, num=11, endpoint=True)
y = np.cos(x)
f = interp1d(x, y)
f2 = interp1d(x, y, kind='cubic')
xnew = np.linspace(0, 10, num=41, endpoint=True)
_= plt.plot(x, y, 'o', xnew, f(xnew), '-', xnew, f2(xnew), '--')
_= plt.legend(['data', 'linear', 'cubic'], loc='best')
plt.show()
def func(x, y):
return x*(1-x)*np.cos(4*np.pi*x) * np.sin(4*np.pi*y**2)**2
grid_x, grid_y = np.mgrid[0:1:100j, 0:1:200j]
grid_x.shape
grid_y.shape
points = np.random.rand(1000, 2)
values = func(points[:,0], points[:,1])
from scipy.interpolate import griddata
grid_z0 = griddata(points, values, (grid_x, grid_y), method='nearest')
grid_z1 = griddata(points, values, (grid_x, grid_y), method='linear')
grid_z2 = griddata(points, values, (grid_x, grid_y), method='cubic')
grid_z0.shape
import matplotlib.pyplot as plt
_= plt.subplot(221)
_= plt.imshow(func(grid_x, grid_y).T, extent=(0,1,0,1), origin='lower')
_= plt.plot(points[:,0], points[:,1], 'k.', ms=1)
_= plt.title('Original')
_= plt.subplot(222)
_= plt.imshow(grid_z0.T, extent=(0,1,0,1), origin='lower')
_= plt.title('Nearest')
_= plt.subplot(223)
_= plt.imshow(grid_z1.T, extent=(0,1,0,1), origin='lower')
_= plt.title('Linear')
_= plt.subplot(224)
_= plt.imshow(grid_z2.T, extent=(0,1,0,1), origin='lower')
_= plt.title('Cubic')
_= plt.gcf().set_size_inches(6, 6)
plt.show()
import scipy
from scipy import ndimage
from matplotlib import pyplot
import numpy as np
import scipy.ndimage as nd
img = pyplot.imread("wx.jpg")
pyplot.imsave("wx_1.jpg", img)
_= pyplot.imshow(img)
type(img),img.shape
from scipy.ndimage import correlate
a = np.arange(10)
a
correlate(a, [1, 1, 1])
correlate(a, [1, 1, 1], output=np.float64)
a = np.arange(25).reshape(5,5)
a
pyplot.imshow(a)
weights = [[9, 9, 9],
[0, 1, 0],
[0, 0, 0]]
b = correlate(a, weights)
pyplot.imshow(b)
from scipy import misc
f = misc.face()
# misc.imsave('face.png', f) # uses the Image module (PIL)
f.shape, f.dtype
import matplotlib.pyplot as plt
plt.imshow(f)
plt.show()
face = misc.face(gray=True)
face.mean(), face.max(), face.min()
import scipy.misc
import matplotlib.pyplot as plt
f = scipy.misc.face(gray=True)
_= plt.figure(figsize=(10, 3.6))
_= plt.subplot(131)
_= plt.imshow(f, cmap=plt.cm.gray)
_= plt.subplot(132)
_= plt.imshow(f, cmap=plt.cm.gray, vmin=30, vmax=200)
_= plt.axis('off')
_= plt.subplot(133)
_= plt.imshow(f, cmap=plt.cm.gray)
_= plt.contour(f, [50, 200])
_= plt.axis('off')
_= plt.subplots_adjust(wspace=0, hspace=0., top=0.99, bottom=0.01, left=0.05,right=0.99)
plt.show()
import numpy as np
import scipy.misc
from scipy import ndimage
import matplotlib.pyplot as plt
face = scipy.misc.face(gray=True)
lx, ly = face.shape
# Cropping
crop_face = face[lx//4:-lx//4, ly//4:-ly//4]
# up <-> down flip
flip_ud_face = np.flipud(face)
# rotation
rotate_face = ndimage.rotate(face, 45)
rotate_face_noreshape = ndimage.rotate(face, 45, reshape=False)
plt.figure(figsize=(12.5, 2.5))
#plt.subplot(151)
#plt.imshow(face, cmap=plt.cm.gray)
_= plt.axis('off')
_= plt.subplot(152)
_= plt.imshow(crop_face, cmap=plt.cm.gray)
_= plt.axis('off')
_= plt.subplot(153)
_= plt.imshow(flip_ud_face, cmap=plt.cm.gray)
_= plt.axis('off')
_= plt.subplot(154)
_= plt.imshow(rotate_face, cmap=plt.cm.gray)
_= plt.axis('off')
_= plt.subplot(155)
_= plt.imshow(rotate_face_noreshape, cmap=plt.cm.gray)
_= plt.axis('off')
_= plt.subplots_adjust(wspace=0.02, hspace=0.3, top=1, bottom=0.1, left=0, right=1)
_= plt.show()
import scipy
from scipy import ndimage
import matplotlib.pyplot as plt
f = scipy.misc.face(gray=True).astype(float)
blurred_f = ndimage.gaussian_filter(f, 3)
filter_blurred_f = ndimage.gaussian_filter(blurred_f, 1)
alpha = 30
sharpened = blurred_f + alpha * (blurred_f - filter_blurred_f)
_= plt.figure(figsize=(12, 4))
_= plt.subplot(131)
_= plt.imshow(f, cmap=plt.cm.gray)
_= plt.axis('off')
_= plt.subplot(132)
_= plt.imshow(blurred_f, cmap=plt.cm.gray)
_= plt.axis('off')
_= plt.subplot(133)
_= plt.imshow(sharpened, cmap=plt.cm.gray)
_= plt.axis('off')
_= plt.tight_layout()
_= plt.show()
Filters
convolve: 多維卷積。
convolve1d: 沿給定軸計算一維卷積。
correlate: 多維相關。
correlate1d: 沿給定軸計算一維相關性。
ga* ssian_filter: 多維高斯濾波器。
ga* ssian_filter1d: 一維高斯濾波器。
ga ssian_gradient_magnit de: 高斯導數多維梯度。
ga* ssian_laplace: 高斯二階導數多維拉普拉斯濾波器。
generic_filter: 使用給定的函數計算多維過濾器。
generic_filter1d: 沿給定軸計算一維濾波器。
generic_gradient_magnit* de: 使用梯度函數計算梯度。
generic_laplace: N-D拉普拉斯濾波器。
laplace: 基於近似二階導數的N-D拉普拉斯濾波器。
maxim* m_filter: 多維最大過濾器。
maxim* m_filter1d: 沿給定軸計算一維最大濾波器。
median_filter: 多維中值濾波器。
minim* m_filter: 多維最小過濾器。
minim* m_filter1d: 沿給定軸計算一維最小濾波器。
percentile_filter: 計算多維百分比濾波器。
prewitt: Prewitt過濾器。
rank_filter: 多維等級過濾器。
sobel: Sobel濾波器。
uniform_filter: 多維均勻過濾器。
uniform_filter1d: 沿給定軸計算一維均勻濾波器。
Fourier filters
fourier_ellipsoid: 多維橢球傅立葉濾波器。
fourier_gaussian: 多維高斯傅立葉濾波器。
fourier_shift: 多維傅立葉移位濾波器。
fourier_uniform: 多維均勻傅立葉濾波器。
Interpolation
affine_transform: 仿射變換。
geometric_transform: 幾何變換。
map_coordinates: 通過插值將輸入數組映射到新坐標。
rotate: 旋轉數組。
shift: 移位數組。
spline_filter: 多維樣條濾波器。
spline_filter1d: 沿給定軸計算一維樣條濾波器。
zoom: 縮放數組。
Measurements
center_of_mass: 計算標籤處數組值的質心。
extrema: 標籤處數組的最小值和最大值及其位置。
find_objects: 在標記數組中查找對象。
histogram: 數組值的直方圖。
label: 在數組中標註。
labeled_comprehension: 。
maximum: 標記區域上數組的最大值。
maximum_position: 在標籤處找到數組值的最大值的位置。
mean: 標籤處數組值的平均值。
median: 標記區域上數組值的中位數。
minim* m: 標記區域上數組的最小值。
minim* m_position: 在標籤處找到數組的最小值的位置。
standard_deviation: N-D圖像陣列的值的標準偏差,可以指定子區域。
s* m: 數組總和。
variance: 方差,可以指定子區域。
watershed_ift: 使用圖像森林變換算法
Morphology
binary_closing: 使用給定的結構化元素進行多維二進位關閉。
binary_dilation: 具有給定結構元素的多維二進位膨脹。
binary_erosion: 具有給定結構元素的多維二元侵蝕。
binary_fill_holes: 填充二進位對象中的孔。
binary_hit_or_miss: 多維二進位命中或失敗變換。
binary_opening: 具有給定結構元素的多維二進位開放。
binary_propagation: 具有給定結構元素的多維二進位傳播。
black_tophat: 多維黑色高帽過濾器。
distance_transform_bf: 通過蠻力算法實現距離變換功能。
distance_transform_cdt: 倒角類型轉換的距離轉換。
distance_transform_edt: 精確的歐氏距離變換。
generate_binary_structure: 為二進位形態學運算生成二進位結構。
grey_closing: 多維灰度關閉。
grey_dilation: 使用結構化元素或對應於平面結構化元素的足跡計算灰度擴展。
grey_erosion: 使用結構化元素或對應於平面結構化元素的足跡計算灰度侵蝕。
grey_opening: 多維灰度開口。
iterate_structure: 通過自身擴展來迭代結構。
morphological_gradient: 多維形態梯度。
morphological_laplace: 多維形態拉普拉斯。
white_tophat: 多維白色禮帽過濾器。
線性代數(scipy.linalg)scipy.linalg和numpy.linalgnumpy.matrix與2-D numpy.ndarraynumpy.matrix是矩陣類,具有比numpy.ndarray更方便的接口,用於矩陣操作。
numpy.matrix支持例如類似於MATLAB的創建語法
numpy.matrix的星號運算符,表示矩陣乘法,I和T成員作逆和轉置運算
import numpy as np
A = np.mat('[1 2;3 4]')
A
A.I
b = np.mat('[5 6]')
b
b.T
A*b.T
import numpy as np
from scipy import linalg
A = np.array([[1,3,5],[2,5,1],[2,3,8]])
A
linalg.inv(A)
np.round(A.dot(linalg.inv(A)))
We want to fit a quadratic polynomial of the form y = a + b*x**2 to this data. We first form the 「design matrix」 M, with a constant column of 1s and a column containing x**2。
We want to find the least-squares solution to M.dot(p) = y, where p is a vector with length 2 that holds the parameters a and b.
from scipy.linalg import lstsq
import matplotlib.pyplot as plt
x = np.array([1, 2.5, 3.5, 4, 5, 7, 8.5])
y = np.array([0.3, 1.1, 1.5, 2.0, 3.2, 6.6, 8.6])
M = x[:, np.newaxis]**[0, 2]
p, res, rnk, s = lstsq(M, y)
p
_= plt.plot(x, y, 'o', label='data')
xx = np.linspace(0, 9, 101)
yy = p[0] + p[1]*xx**2
_= plt.plot(xx, yy, label='least squares fit, $y = a + bx^2$')
_= plt.xlabel('x')
_= plt.ylabel('y')
_= plt.legend(framealpha=1, shadow=True)
_= plt.grid(alpha=0.25)
_= plt.show()
層次結構模塊提供了用於層次結構和聚類的功能。它從距離矩陣生成層次聚類,計算聚類的統計信息,剪切連結以生成平坦聚類以及使用樹狀圖可視化聚類。
from scipy.cluster.vq import kmeans2
import matplotlib.pyplot as plt
np.random.seed(12345678)
a = np.random.multivariate_normal([0, 6], [[2, 1], [1, 1.5]], size=45)
b = np.random.multivariate_normal([2, 0], [[1, -1], [-1, 3]], size=30)
c = np.random.multivariate_normal([6, 4], [[5, 0], [0, 1.2]], size=25)
z = np.concatenate((a, b, c))
np.random.shuffle(z)
z[:5]
centroid, label = kmeans2(z, 3, minit='points')
centroid
label
counts = np.bincount(label)
counts
w0 = z[label == 0]
w1 = z[label == 1]
w2 = z[label == 2]
_= plt.plot(w0[:, 0], w0[:, 1], 'o', alpha=0.5, label='cluster 0')
_= plt.plot(w1[:, 0], w1[:, 1], 'd', alpha=0.5, label='cluster 1')
_= plt.plot(w2[:, 0], w2[:, 1], 's', alpha=0.5, label='cluster 2')
_= plt.plot(centroid[:, 0], centroid[:, 1], 'k*', label='centroids')
_= plt.axis('equal')
_= plt.legend(shadow=True)
_= plt.show()
from scipy.cluster import hierarchy
import matplotlib.pyplot as plt
from scipy.spatial.distance import pdist
ytdist = np.array([662., 877., 255., 412., 996., 295., 468.])
ytdist2 = ytdist[:,np.newaxis]*[1,0]
C = hierarchy.ward(pdist(ytdist2))
hierarchy.fcluster(C, t=2,criterion='maxclust')
Z = hierarchy.linkage(ytdist2, 'single')
_= plt.figure()
dn = hierarchy.dendrogram(Z)
X = [[0, 0], [0, 1], [1, 0],
[0, 4], [0, 3], [1, 4],
[4, 0], [3, 0], [4, 1],
[4, 4], [3, 4], [4, 3]]
C = hierarchy.ward(pdist(X))
hierarchy.fcluster(C, t=2,criterion='maxclust')
_= plt.figure()
Z = hierarchy.linkage(C, 'single')
dn = hierarchy.dendrogram(Z)
Fast graph algorithms based on sparse matrix representations.
connected_components:連接子圖
laplacian:有向圖的拉普拉斯矩陣。
shortest_path:最短路徑圖
dijkstra:Dijkstra算法
floyd_warshall:使用Floyd-Warshall算法計算最短路徑長度
bellman_ford:使用Bellman-Ford算法計算最短路徑長度。
johnson:使用Johnson的算法計算最短路徑長度。
breadth_first_order:廣度優先遍歷。
depth_first_order:深度優先遍歷。
depth_first_tree:深度優先遍歷生成的樹。
minimum_spanning_tree:無向圖的最小生成樹
reverse_cuthill_mckee:返回以反向Cuthill McKee排序對稀疏CSR或CSC矩陣排序的置換數組。
maximum_flow:最大流。
maximum_bipartite_matching:二分圖匹配。
structure_rank:計算具有給定稀疏模式的圖結構秩
construct_dist_matrix:構造距離矩陣
csgraph_from_dense:從稠密圖構造CSR格式的稀疏圖。
csgraph_from_masked:從掩碼數組構造CSR格式的圖。
csgraph_masked_from_dense:從稠密圖構造。
csgraph_to_dense:將稀疏圖表示轉換為稠密圖。
csgraph_to_masked:將稀疏圖形表示為掩碼圖。
from scipy.sparse import csr_matrix
from scipy.sparse.csgraph import connected_components
graph = [
[ 0, 1 , 1, 0 , 0 ],
[ 0, 0 , 1 , 0 ,0 ],
[ 0, 0, 0, 0, 0],
[0, 0 , 0, 0, 1],
[0, 0, 0, 0, 0]
]
graph = csr_matrix(graph)
print(graph)
n_components, labels = connected_components(csgraph=graph, directed=False, return_labels=True)
n_components
labels
from scipy.sparse.csgraph import shortest_path
graph = [
[0, 1, 2, 0],
[0, 0, 0, 1],
[2, 0, 0, 3],
[0, 0, 0, 0]
]
graph = csr_matrix(graph)
dist_matrix, predecessors = shortest_path(csgraph=graph,
directed=False, indices=0, return_predecessors=True)
dist_matrix
predecessors
from scipy.sparse import csr_matrix
from scipy.sparse.csgraph import floyd_warshall
graph = [
[0, 1 , 2, 0],
[0, 0, 0, 1],
[2, 0, 0, 3],
[0, 0, 0, 0]
]
graph = csr_matrix(graph)
print(graph)
dist_matrix, predecessors = floyd_warshall(csgraph=graph, directed=False, return_predecessors=True)
dist_matrix
predecessors
def f(x):
return (x - 2) * x * (x + 2)**2
from scipy.optimize import minimize_scalar
res = minimize_scalar(f)
res.x
res = minimize_scalar(f, bounds=(-3, -1), method='bounded')
res.x
from scipy.optimize import minimize, rosen, rosen_der
x0 = [1.3, 0.7, 0.8, 1.9, 1.2]
res = minimize(rosen, x0, method='Nelder-Mead', tol=1e-6)
res.x
res = minimize(rosen, x0, method='BFGS', jac=rosen_der,
options={'gtol': 1e-6, 'disp': True})
res.x
help(rosen)
help(rosen_der)
fun = lambda x: (x[0] - 1)**2 + (x[1] - 2.5)**2
cons = ({'type': 'ineq', 'fun': lambda x: x[0] - 2 * x[1] + 2},
{'type': 'ineq', 'fun': lambda x: -x[0] - 2 * x[1] + 6},
{'type': 'ineq', 'fun': lambda x: -x[0] + 2 * x[1] + 2})
# Constraint type: eq = equality, ineq = inequality.
bnds = ((0, None), (0, None))
res = minimize(fun, (2, 0), method='SLSQP', bounds=bnds,constraints=cons)
res
basinhopping: basin-hopping algorithm
brute: Minimize a function over a given range by brute force.
differential_evolution,差分進化: Finds the global minimum of a multivariate function.
shgo: Finds the global minimum of a function using SHG optimization.
dual_annealing, 模擬退火: Find the global minimum of a function using Dual Annealing.
from scipy.optimize import dual_annealing
func = lambda x: np.sum(x*x - 10*np.cos(2*np.pi*x)) + 10*np.size(x)
lw = [-5.12] * 10
up = [5.12] * 10
ret = dual_annealing(func, bounds=list(zip(lw, up)), seed=1234)
ret.x
from scipy.optimize import differential_evolution
import numpy as np
def ackley(x):
arg1 = -0.2 * np.sqrt(0.5 * (x[0] ** 2 + x[1] ** 2))
arg2 = 0.5 * (np.cos(2. * np.pi * x[0]) + np.cos(2. * np.pi * x[1]))
return -20. * np.exp(arg1) - np.exp(arg2) + 20. + np.e
bounds = [(-5, 5), (-5, 5)]
result = differential_evolution(ackley, bounds)
result.x, result.fun
Nonlinear least-squares
`least_squares: Solve a nonlinear least-squares problem with bounds on the variables.
Linear least-squares
nnls: Solve argmin_x || Ax - b ||_2 for x>=0.
lsq_linear: Solve a linear least-squares problem with bounds on the variables.
Curve fitting
curve_fit: Use non-linear least squares to fit a function, f, to data.
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit
def func(x, a, b, c):
return a * np.exp(-b * x) + c
xdata = np.linspace(0, 4, 50)
y = func(xdata, 2.5, 1.3, 0.5)
np.random.seed(1729)
y_noise = 0.2 * np.random.normal(size=xdata.size)
ydata = y + y_noise
_= plt.plot(xdata, ydata, 'b-', label='data')
popt, pcov = curve_fit(func, xdata, ydata)
popt
_= plt.plot(xdata, func(xdata, *popt), 'r-', label='fit: a=%5.3f, b=%5.3f, c=%5.3f' % tuple(popt))
popt, pcov = curve_fit(func, xdata, ydata, bounds=(0, [3., 1., 0.5]))
popt
_= plt.plot(xdata, func(xdata, *popt), 'g--', label='fit: a=%5.3f, b=%5.3f, c=%5.3f' % tuple(popt))
_= plt.xlabel('x')
_= plt.ylabel('y')
_= plt.legend()
_= plt.show()
from scipy import optimize
def fun(x):
return [x[0] + 0.5 * (x[0] - x[1])**3 - 1.0,
0.5 * (x[1] - x[0])**3 + x[1]]
def jac(x):
return np.array([[1 + 1.5 * (x[0] - x[1])**2,
-1.5 * (x[0] - x[1])**2],
[-1.5 * (x[1] - x[0])**2,
1 + 1.5 * (x[1] - x[0])**2]])
sol = optimize.root(fun, [0, 0], jac=jac, method='hybr')
sol.x
scipy.optimize.linprog
c = [-1, 4]
A = [[-3, 1], [1, 2]]
b = [6, 4]
x0_bounds = (None, None)
x1_bounds = (-3, None)
from scipy.optimize import linprog
res = linprog(c, A_ub=A, b_ub=b, bounds=[x0_bounds, x1_bounds])
res
res = linprog(c, A_ub=A, b_ub=b, bounds=[x0_bounds, x1_bounds], method='revised simplex')
print(res)
Spatial data structures and algorithms (scipy.spatial)
triangulations, Voronoi diagrams, and convex hulls
KDTree: nearest-neighbor point queries,
utilities for distance computations in various metrics.
from scipy.spatial import ConvexHull
points = np.random.rand(30, 2) # 30 random points in 2-D
hull = ConvexHull(points)
import matplotlib.pyplot as plt
_= plt.plot(points[:,0], points[:,1], 'o')
for simplex in hull.simplices:
_= plt.plot(points[simplex,0], points[simplex,1], 'k-')
_= plt.show()
Signal Processing (scipy.signal)
some filtering functions, a limited set of filter design tools, and
a few B-spline interpolation algorithms for 1- and 2-D data.
sepfir2d: apply a separable 2-D FIR filter with mirror-symmetric boundary conditions to the spline coefficients.
import numpy as np
from scipy import signal, misc
import matplotlib.pyplot as plt
image = misc.ascent()
_= plt.figure()
_= plt.imshow(image)
_= plt.gray()
_= plt.title('Original image')
_= plt.show()
w = signal.gaussian(50, 10.0) # Return a Gaussian window
image_new = signal.sepfir2d(image, w, w)
_= plt.figure()
_= plt.imshow(image_new)
_= plt.gray()
_= plt.title('Filtered image')
_= plt.show()
Fourier Transforms (scipy.fft)
統計Statistics (scipy.stats)
定量分析方法第01講:課程概況
定量分析方法第02講:Python基礎
定量分析方法第03講:Numpy基礎
優化問題、模型與算法
旅行商問題(Traveling Salesman Problem)求解算法
[公開課] 物流系統優化與決策: 旅行商問題
[公開課] 物流系統優化與決策: 旅行商問題
[公開課] 物流系統優化與決策: 無容量約束倉庫選址
[公開課] 物流系統優化與決策: 容量約束倉庫選址
[公開課] 物流系統優化與決策: 無容量約束p-median選址
[公開課] 物流系統優化與決策: 容量約束p-median選址
[公開課] 物流系統優化與決策: 多源Weber選址
[公開課] 物流系統優化與決策: p-hub選址
機器學習
機器學習: 鳶尾花數據集
機器學習: Scikit-learn Getting Started
機器學習: An introduction to machine learning with scikit-learn
機器學習: 手寫數字識別
機器學習: 人臉補全
Python普通最小二乘法
[公開課]機器學習(01-04): 四個例子
[公開課]機器學習(05-06): 分類結果的評價
[公開課]機器學習(07): 從Scikit-learn看機器學習
[公開課]機器學習(08): 機器學習概念解讀
[公開課]機器學習(09):統計學習及監督學習概論
[公開課]機器學習(10): 感知機
[公開課]機器學習(11):k近鄰法
[公開課]機器學習(12):樸素貝葉斯法
[公開課]機器學習(13):樸素貝葉斯法重述、第10-12講的Python算法
[公開課]機器學習(14):梯度下降法
[公開課]機器學習(15):拉格朗日對偶
[公開課]機器學習(16):決策樹
[公開課]機器學習(17): 邏輯斯特回歸
[公開課]機器學習(18): 最大熵模型
[公開課]機器學習(19): 線性可分支持向量機
[公開課]機器學習(20): 線性支持向量機
[公開課]機器學習(21): 非線性支持向量機
[公開課]機器學習(22): 支持向量機實驗
[公開課]機器學習(23): 提升方法Adaboost
[公開課]機器學習(24): 隱馬爾科夫模型
[公開課]機器學習(25): 聚類方法
[公開課]機器學習(26): 主成分分析
[公開課]機器學習(27): 神經網絡
[公開課]機器學習(28): 集成學習
機器學習28講視頻合集
[公開課]機器學習28講視頻合集01-10
[公開課]機器學習28講視頻合集11-20
[公開課]機器學習28講視頻合集21-28
ALNS自適應大規模鄰域搜索
ALNS自適應大規模鄰域搜索: 套裁問題
ALNS自適應大規模鄰域搜索: 旅行商問題
SCIP數學規劃
SCIP數學規劃求解器: PySCIPOpt
SCIP: 奇數還是偶數
SCIP: 邏輯約束
SCIP: 四個ATSP模型
SCIP: 1D裝箱問題的算法與模型
SCIP: 多商品經濟批量訂貨模型(MEOQ)線性化
SCIP: 選址問題(k-median)
SCIP: 容量約束下多分配選址問題
SCIP: 圖著色問題(限定色數)
SCIP: 批量(lot-sizing)優化問題與割平面
SCIP: 最大穩定集問題
SCIP: permutation flow shop
SCIP: 多商品經濟批量訂貨模型(MEOQ)線性化
SCIP: 資源約束調度問題RCSP
SCIP: 魯棒生產模型(SOCP)
SCIP 05: 整數規劃例子
SCIP: 圖著色的三個模型
SCIP: Weber問題的二階錐模型
SCIP: 設施選址問題的分解模型
SCIP: 數獨(sudoku)整數規劃模型
SCIP: 割平面求解TSP的算法
Python進化計算
Python進化計算Geatpy要點
單目標單連續變量函數二進位編碼進化算法
單目標多連續變量帶約束實數編碼進化算法
帶約束的單目標旅行商問題進化算法
句子匹配單目標進化算法
混合編碼單目標進化算法
離散變量雙目標進化算法
連續變量雙目標進化算法
多目標背包進化算法
混合編碼多目標背包進化算法
Python優化
Python無約束非線性優化
Python差分進化算法
Python線性規劃
Python 數學規劃
Python數學規劃案例:單分配多樞紐站選址
Python數學規劃案例:單源設施選址
Python數學規劃案例:路徑優化CVRP
Python數學規劃案例:一維裝箱
Python數學規劃案例四:資源約束的最短路徑
Python數學規劃案例三:最短路徑
Python數學規劃案例二
Python數學規劃之Cplex之旅
Python數學規劃案例一
Python數學規劃案例一模型
Python: 數學規劃
數學規划算法十二講
單純型算法第1-4講
單純型算法第1-4講視頻
單純型算法第5-8講
單純型算法第9-10講
單純型算法第11-12講
Python數據結構
Python數據結構
Python圖
Python二叉樹
Python排序
Python查找算法
Python遞歸
Python鍊表
Python棧
Python圖(csgraph)
Python數據
Python: 資料庫之SQLite
Python: Pandas
Python資料庫
Numpy快速入門
Pandas入門
Python Web
幾分鐘做個Web應用
Python信息系統實驗:倉庫管理
Python基礎
Python基礎:沒有更簡單
Python利器
Python快速入門
Python 入門
程序設計
如何學習程序設計