当前位置:网站首页>Data interpolation -- normalize data of different magnitude
Data interpolation -- normalize data of different magnitude
2022-07-28 21:52:00 【Frost Creek】
In some cases , Normalization can improve the interpolation results , But in other cases, it may affect the accuracy of the solution . Whether to use normalization needs to be judged according to the nature of interpolation data .
advantage : Normalized data may improve the interpolation results when the independent variables have different units and different scales . under these circumstances , Scaling the input to a similar magnitude can improve the numerical shape of interpolation .
Be careful : If each variable has the same unit , Be careful when normalizing the data , Even if the scale of each variable is different . For data of the same unit , Normalization will affect the basic triangulation and eventually reduce the accuracy of interpolation due to adding direction deviation , So that the solution is distorted . for example , If x and y Both represent positions and are represented by “ rice ” In units of , Then normalization is wrong . At this time, it is not recommended to x and y Make inconsistent scaling , Because Zhengdong 10 Meter and true north 10 Meters are the same in space distance .

Create some sample data , among y The value ratio in x The value in is several orders of magnitude larger . hypothesis x and y Have different units .
x = rand(1,1000)/100;
y = 2.*(rand(1,1000)-0.5).*90;
z = x.^2;
Use the above sample data to build a grid data , Interpolate based on the sample data on the grid and draw the results .
x1 = linspace(min(x),max(x),25);
y1= linspace(min(y),max(y),25);
[X, Y] = meshgrid(x1,y1);
Z = griddata(x,y,z,X,Y);
plot3(x,y,z,'co')
hold on
mesh(X,Y,Z)

griddata The result is not very smooth , There seems to be noisy data . This is because the independent variables have different scales , Because a small change in the size of one variable will lead to a huge change in the size of another variable .
because x and y Have different units , Normalize them to a similar order , It should help produce better results . Normalize the sample points , And use griddata Regenerate interpolation .
% Normalized data
x = mapminmax(x);
y = mapminmax(y);
% Generating grid data
x1 = linspace(min(x),max(x),25);
y1 = linspace(min(y),max(y),25);
[X,Y] = meshgrid(x1,y1);
% Data interpolation
Z= griddata(x,y,z,X,Y);
plot3(x,y,z,'co')
hold on
mesh(X,Y,Z)

under these circumstances , Normalizing the sample points will make griddata Calculate a smoother solution .
This shows that when the data magnitude varies greatly , Direct interpolation is not a very wise choice , Try to process the data , This is an important skill .
The articles
边栏推荐
- Leetcode 19. delete the penultimate node of the linked list [knowledge points: speed pointer, recursion, stack]
- Uniapp progress bar customization
- SkiaSharp 之 WPF 自绘 拖曳小球(案例版)
- Coolpad voluntarily terminated the patent infringement lawsuit against Xiaomi
- 融合LSTM与逻辑回归的中文专利关键词抽取
- 基于复杂网络的大群体应急决策专家意见与信任信息融合方法及应用
- Achieve waterfall effect
- 30. Learn highcharts label rotation histogram
- OA项目之会议通知(查询&是否参会&反馈详情)
- 苹果M1处理器详解:性能及能效成倍提升,Intel酷睿i9也不是对手!
猜你喜欢

基于知识元的外文专利文献知识描述框架

Bus, protocol, specification, interface, data acquisition and control system in industrial communication field

中国科学家首次用DNA构造卷积人工神经网络,可完成32类分子模式识别任务,或用于生物标志物信号分析和诊断

JVM 内存布局详解(荣耀典藏版)

How is nanoid faster and more secure than UUID implemented? (glory Collection Edition)

Uniapp progress bar customization

Edited by vimtutor

MySQL 是如何归档数据的呢?

Knowledge description framework of foreign patent documents based on knowledge elements

Information fusion method and application of expert opinion and trust in large group emergency decision-making based on complex network
随机推荐
Zhuzhou Jiufang middle school carried out drowning prevention and fire safety education and training activities
Why does Baidu search only crawl, but not show the page?
C语言入门【详细】
基于Xception-TD的中华传统刺绣分类模型构建
传微软已获得向华为供货许可!华为将迎来全面解禁?
小程序开发需要什么技术
瑞典法院取消对华为和中兴的5G频谱拍卖禁令
标准C语言学习总结10
Using El date picker to report errors in sub components
磷脂偶联抗体/蛋白试剂盒的存储与步骤
微信小程序开发公司你懂得选择吗?
Pytoch learning record (III): random gradient descent, neural network and full connection
Leetcode interview question 02.07. Linked list intersection [knowledge points: Double pointers, stack]
What is the purpose of database read-write separation [easy to understand]
Research on the recognition method of move function information of scientific paper abstract based on paragraph Bert CRF
MSI Bao'an factory is on fire! Official response: no one was injured, and the production line will not be affected!
Coolpad voluntarily terminated the patent infringement lawsuit against Xiaomi
基于BRNN的政务APP评论端到端方面级情感分析方法
详解visual studio 2015在局域网中远程调试程序
顺序表的实现