当前位置:网站首页>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
边栏推荐
- JVM 内存布局详解(荣耀典藏版)
- Log slimming operation: how to optimize from 5g to 1g! (glory Collection Edition)
- Leetcode 142. circular linked list II [knowledge points: speed pointer, hash table]
- Bully is filed for bankruptcy! The company has become a "Lao Lai", and the legal person is restricted from high consumption
- High salary in the workplace | "intermediate and advanced test" interview questions
- Divide and conquer, upload large files in pieces
- Pytorch learning record (4): over fitting, convolution neural network CNN
- The ref value ‘xxx‘ will likely have changed by the time this effect function runs. If this ref......
- fluke dtx-1800测试精度有必要进行原厂校准吗?
- 微信小程序开发入门,自己开发小程序
猜你喜欢
High salary in the workplace | "intermediate and advanced test" interview questions
8、 QoS queue scheduling and message discarding
物联网技术栈之网关技术
HCIA综合实验(以华为eNSP为例)
Chinese patent keyword extraction based on LSTM and logistic regression
Meeting notice of OA project (Query & whether to attend the meeting & feedback details)
Is it necessary to calibrate the fluke dtx-1800 test accuracy?
Pytorch learning record (4): over fitting, convolution neural network CNN
Discussion: if you want to land Devops, is it enough to only consider a good PAAS container platform?
中文招聘文档中专业技能词抽取的跨域迁移学习
随机推荐
Modify the port number of MySQL (is there a problem modifying the port number of MySQL)
30. Learn highcharts label rotation histogram
The general strike of three factories in St France may make the shortage of chips more serious!
Coolpad voluntarily terminated the patent infringement lawsuit against Xiaomi
基于属性词补全的武器装备属性抽取研究
基于知识元的外文专利文献知识描述框架
Assign a string pointer to an array [easy to understand]
基于Xception-TD的中华传统刺绣分类模型构建
Information fusion method and application of expert opinion and trust in large group emergency decision-making based on complex network
Bully is filed for bankruptcy! The company has become a "Lao Lai", and the legal person is restricted from high consumption
【英雄哥七月集训】第 28天:动态规划
Zhuzhou Jiufang middle school carried out drowning prevention and fire safety education and training activities
It is said that Microsoft has obtained the supply license for Xianghua! Will Huawei usher in the full lifting of the ban?
分而治之,大型文件分片上传
RHCSA第一天
Discussion: if you want to land Devops, is it enough to only consider a good PAAS container platform?
Leetcode linked list question - interview question 02.07. linked list intersection (learn linked list by one question and one article)
Nano gold coupled antibody / protein Kit (20nm, 1mg/100 μ g/500 μ G coupling amount) preparation
B+ tree height calculation of MySQL
【Bluetooth蓝牙开发】八、BLE协议之传输层