当前位置:网站首页>Extrapolated scatter data
Extrapolated scatter data
2022-07-03 11:40:00 【jk_ one hundred and one】
Catalog
Factors affecting the accuracy of extrapolation
Compare the extrapolation of coarse sampling and fine sampling scatter data
Factors affecting the accuracy of extrapolation
scatteredInterpolant It provides the function of finding approximate solutions to points outside the convex hull .'linear' The extrapolation method is based on the least square approximation of the gradient at the convex hull boundary . The value returned for the query point outside the convex hull is based on the value at the boundary and the gradient . The quality of the solution depends on the way the data is sampled . If it is rough data sampling , The quality of extrapolation is poor .
Besides , Triangulation near the convex hull boundary may have strip triangles . These triangles will affect the extrapolation results , It will affect the interpolation results . The extrapolation results should be visually checked with knowledge of the external behavior of the domain .
Compare the extrapolation of coarse sampling and fine sampling scatter data
This example shows how to insert two different samples of the same parabolic function . This example shows that a better distribution of sampling points can produce better extrapolation results .
around 10 Concentric circles are created with a spacing of 10 Radial distribution point of degree . Use bsxfun Calculate the coordinate x=cosθ and y=sinθ.
theta = 0:10:350;
c = cosd(theta);
s = sind(theta);
r = 1:10;
x1 = bsxfun(@times,r.',c);
y1 = bsxfun(@times,r.',s);
figure
plot(x1,y1,'*b')
axis equal
As shown in the figure :
Create a second set of points with a coarser distribution . Use rand Function in range [-10, 10] Create random samples in .
rng default;
x2 = -10 + 20*rand([25 1]);
y2 = -10 + 20*rand([25 1]);
figure
plot(x2,y2,'*')
As shown in the figure :
Parabola function at two point sets v(x,y) sampling .
v1 = x1.^2 + y1.^2;
v2 = x2.^2 + y2.^2;
in the light of v(x,y) For each sample created scatteredInterpolant.
F1 = scatteredInterpolant(x1(:),y1(:),v1(:));
F2 = scatteredInterpolant(x2(:),y2(:),v2(:));
Create a grid of query points that will extend outside each domain .
[xq,yq] = ndgrid(-20:20);
Calculation F1 And draw the results .
figure
vq1 = F1(xq,yq);
surf(xq,yq,vq1)
As shown in the figure :
Calculation F2 And draw the results .
figure
vq2 = F2(xq,yq);
surf(xq,yq,vq2)
As shown in the figure :
Due to v2 The points in are roughly sampled ,F2 The extrapolation quality of is poor .
3D data extrapolation
This example shows how to use scatteredInterpolant Extrapolate the well sampled 3D mesh dataset . The query point is located on a flat grid completely outside the domain .
Create a 10×10×10 grid . The points in each dimension are in the range [-10, 10] in .
[x,y,z] = ndgrid(-10:10);
The function at the sampling point v(x,y,z) sampling .
v = x.^2 + y.^2 + z.^2;
establish scatteredInterpolant, And specify linear interpolation and extrapolation .
F = scatteredInterpolant(x(:),y(:),z(:),v(:),'linear','linear');
Calculation x-y Grid midspan [-20,20] Range and elevation is z =15 Interpolation of time .
[xq,yq,zq] = ndgrid(-20:20,-20:20,15);
vq = F(xq,yq,zq);
figure
surf(xq,yq,vq)
As shown in the figure :
Because the function is well sampled , Extrapolation returns better results .
边栏推荐
- Machine learning 3.2 decision tree model learning notes (to be supplemented)
- PHP Basics
- Driver development based on I2C protocol
- Redis things
- (数据库提权——Redis)Redis未授权访问漏洞总结
- POI excel cell wrap
- C language two-dimensional array
- Encapsulate a koa distributed locking middleware to solve the problem of idempotent or repeated requests
- 基于turtlebot3实现SLAM建图及自主导航仿真
- The LINQ expression node type 'ArrayIndex' is not supported in LINQ to Entities
猜你喜欢
Abandon the Internet after 00: don't want to enter a big factory after graduation, but go to the most fashionable Web3
This article explains the complex relationship between MCU, arm, MCU, DSP, FPGA and embedded system
After using the thread pool for so long, do you really know how to reasonably configure the number of threads?
Arctangent entropy: the latest SCI paper in July 2022
Software testing weekly (issue 78): the more confident you are about the future, the more patient you are about the present.
How to get started embedded future development direction of embedded
聊聊Flink框架中的状态管理机制
2022 东北四省赛 VP记录/补题
Kubernetes 三打探针及探针方式
(2) Base
随机推荐
MATLAB提取不規則txt文件中的數值數據(簡單且實用)
Spl06-007 air pressure sensor (example of barometer)
The excel table is transferred to word, and the table does not exceed the edge paper range
STL教程9-容器元素深拷贝和浅拷贝问题
Driver development based on I2C protocol
Numpy np. Max and np Maximum implements the relu function
[vtk] interpretation of source code comments of vtkwindowedsincpolydatafilter
Mysql根据时间搜索常用方法整理
uniapp实现点击加载更多
[vtk] source code interpretation of vtkpolydatatoimagestencil
Kubernetes 三打探针及探针方式
软考中级软件设计师该怎么备考
How to: configure ClickOnce trust prompt behavior
Incremental database backup - DB incr DB full
量化计算调研
Leetcode 46: full arrangement
Viewing binary bin files with notepad++ editor
Solicitation for JGG special issue: spatio-temporal omics
C language log base zlog basic use
After setting up ADG, instance 2 cannot start ora-29760: instance_ number parameter not specified