xgs01
选用的对象的集合是数据集
每个单独的对象叫样本sample
对象中包含的每一条信息叫属性/特征
属性的数量叫维数
所有对象张成的空间叫样本空间
【我们认识的所有奥特曼是数据集,每个单独的奥特曼是样本,奥特曼的穿搭、技能是属性/特征,M78星云是样本空间】
从数据中学习得到模型的过程是“学习”或“训练”
数据集对应分为训练集、验证集、测试集
学出来的规律叫假设prediction
规律本身叫ground-truth
数据包含的结果信息叫标签label
有标签的样本叫样例example
所有的label叫label空间
预测离散值是分类任务
预测连续值是回归任务
学的模型在没见过的数据上也能work叫泛化能力
假设M78星云每个奥特曼都是独立飞到地球的,就是“独立同分布”
飞来的奥特曼越多,我们对M78星云(样本空间)的了解就越多。越可能得到强泛化能力的模型
机器学习基本属于归纳的过程,也称为“归纳学习”
侠义上归纳学习要学得“概念”concept,但概念学习很困难。我们都是广义上的归纳,数据驱动的。
训练的模型要有“归纳偏好”,就是要能有基本的判断能力,而不是瞎猜。
分类中分错的占样本 ...
数字图像处理——图像复原
图像复原:倾向于对“退化”建模,并用相反的处理恢复原始图像
$$g(x, y) = H[f(x,y)]+\eta(x,y)$$
对给定$g(x,y)$,已知退化函数$H$,加性噪声$\eta(x,y)$,可得复原图像$\hat{f}(x,y)$。如果$H$是线性的,对应$h(x,y)$是其空间表示。则
$$g(x,y) = h(x,y) \star f(x,y) + \eta(x,y)$$
频域表示为
$$G(u,v) = H(u,v)F(u,v) + N(u,v)$$
$H(u,v)$称为光传递函数(OTF),对应空间域中$h(x,y)$称为点扩散函数(PSF)。
复原处理有时被称为反卷积。
仅有噪声的复原——空间滤波
统计滤波
自适应滤波:
考虑图像特性在不同位置之间存在差异(自适应窗口大小),例如:
自适应中值滤波:若$S_{x,y}$表示将被处理的中心位于(x,y)的子图像。令$Z_{min}=S_{x,y}$中的最小亮度值,$Z_{max}=S_{x,y}$中的最大亮度值,$Z_{med}=S_{x,y}$中的中值,$Z_{x,y}=$坐标$(x,y)$处 ...
deeponettrans
2021年,《Nature Machine Intelligence》
题目:
DeepONet:基于算子的通用近似定理学习非线性算子以识别微分方程
作者:
LuLu, Pengzhan Jin, George Em Karniadakis* (布朗大学应用数学系教授, 美国工程院院士)
单位:
Division of Applied Mathematics, Brown University, Providence, RI 02912, USA
LSEC, ICMSEC, Academy of Mathematics and Systems Science, Chinese Academy of Sciences, Beijing 100190, China
摘要
虽然,众所周知神经网络是连续函数的通用近似器,但一个鲜为人知且可能更加强大的结果是,具有单个隐藏层的神经网络能够准确地近似任何非线性连续运算符。这个通用近似定理暗示了神经网络在从数据中学习非线性算子方面的潜在应用。然而,这一定理只保证足够大的网络有小的近似误差,且没有考虑重要的优化和泛化误差。为在实践中实现这一定理,我们 ...
手撕求解偏微分方程——龙格库塔法
1%reset -f
四阶RK法:
首先将方程转化为标准形式:
$$\begin{cases}\dot{\mathrm{y_1}}&=\mathrm{f_1}\left(\mathrm{y_1},\cdots,\mathrm{y_n},\mathrm{t}\right)\\ &\vdots\\ \dot{\mathrm{y_n}}&=\mathrm{f_n}\left(\mathrm{y_1},\cdots,\mathrm{y_n},\mathrm{t}\right)\end{cases}$$
$$\begin{cases}
h_m =& t_{m+1} - t_m \\
k_{1i}^m =& f_i(y_1^m, \cdots, y_i^m, \cdots, y_n^m, t_m) \\
k_{2i}^m =& f_i(y_1^m, \cdots, y_i^m + \frac{h_m}{2}k_{1i}^m, \cdots, y_n^m, t_m + \frac{h_m}{2}) \\
k_{3i}^m =& f_i(y_1^ ...
手撕求解偏微分方程——差分法
1%reset -f
解偏微分方程——差分法
$$\dfrac{\partial u}{\partial t}=\nu\dfrac{\partial^2u}{\partial x^2}+\nu\dfrac{\partial^2u}{\partial y^2}$$
$$\dfrac{u_{i,j}^{n+1}-u_{i,j}^n}{\Delta t}=\nu\dfrac{u_{i+1,j}^n-2u_{i,j}^n+u_{i-1,j}^n}{\Delta x^2}+\nu\dfrac{u_{i,j+1}^n-2u_{i,j}^n+u_{i,j-1}^n}{\Delta y^2}$$
$$u_{i,j}^{n+1}=u_{i,j}^n+\dfrac{\nu\Delta t}{\Delta x^2}\big(u_{i+1,j}^n-2u_{i,j}^n+u_{i-1,j}^n\big)+\dfrac{\nu\Delta t}{\Delta y^2}\big(u_{i,j+1}^n-2u_{i,j}^n+u_{i,j-1}^n\big)$$
12345678910111213141516171 ...
深度学习方法求解偏微分方程知识基础(4)—— 求解热传导方程
神经网络解热传导方程
1234567891011# import matplotlib.pyplot as plt# import numpy as np# from # import torch.nn.functional as F# import torch.optim as optim# import matplotlib.pyplot as plt# from mpl_toolkits.mplot3d import Axes3D# from scipy.stats import norm# from matplotlib import cm
12345678910111213141516171819import torch import torch.nn as nnclass Net(nn.Module): # NL: the number of hidden layers # NN: the number of vertices in each layer def __init__(self, NL, NN): super(Net, self) ...
深度学习方法求解偏微分方程知识基础(3)—— 求解Burgers方程
神经网络解偏微分方程
1%reset -f
123import torch.nn as nnimport torchfrom torch.autograd import Function
12345678910111213141516class NN(nn.Module): def __init__(self): # NL是有多少层隐藏层 # NN是每层的神经元数量 super(NN, self).__init__() self.input_layer = nn.Linear(2, 20) self.hidden_layer = nn.ModuleList([nn.Linear(20, 20) for _ in range(4)]) self.output_layer = nn.Linear(20, 1) self.act = nn.Tanh() def forward(self, x): o = self.act(self.input_layer(x)) ...
深度学习方法求解偏微分方程知识基础(2)—— 求解常微分方程
神经网络解常微分方程
解方程:
$$ \begin{cases}f’(x)=f(x) \\ f(0) = 1 \end{cases}$$
12345import torchimport torch.nn as nnfrom torch.autograd import Functionfrom matplotlib import pyplot as plt%matplotlib inline
1234567891011121314class NN(nn.Module): def __init__(self): super(NN, self).__init__() self.input_layer = nn.Linear(1, 20) self.hidden_layer = nn.ModuleList([nn.Linear(20, 20) for _ in range(4)]) self.output_layer = nn.Linear(20, 1) self.act = nn.Tanh() def forw ...