How can I denormalize data normalized with 2-norm
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MBUNYA NERVILLE ANYANG
le 31 Mai 2023
Commenté : MBUNYA NERVILLE ANYANG
le 31 Mai 2023
Hello I need help on denormalization. I have this dataset i Have normalize using 2-norm. Please how can I denormalize the data
DT = readtable("DT.xlsx")
DN = normalize(DT,"norm",...
"DataVariables",["Tb","DH","DN","EB","GH","Z"])
I get this error when I try to denormalize it as below. please can I fix this? Thanks in advance
DA = denormalize(DN,"denorm",...
"DataVariables",["Tb","DH","DN","EB","GH","Z"])
0 commentaires
Réponse acceptée
Shaik mohammed ghouse basha
le 31 Mai 2023
There isn't any function to directly get denormalize data from normalized data. As data and scaled version of data have same normalized values you can't get exact data from only normalized values.
Proof:
Consider data of N values of form
and a scaled version of it by a constant k which will be of form
.
After normalising,
an ith element in non scaled version will be 
an ith element in scaled version wiil be
, removing
out of square root in denominator its cancels k in numerator and we are left with
.
Hence we can say scaled version of a vector has same normalized values. So, we can't deduce the original data unless we know the euclidean norm of original data.
In case of 2-norm we need 2-norm of column to get denormalized values:
Normalized values are calculate by dividing each element with 2-norm of the column vector i.e, dividing a element with square root of sum of squares of all values in column. Hence by multiplying this to normalized values you can get denormalized values.
Here is an example of how to do it:
L1 = ["X"; "Y"];
L2 = [1; 7];
L3 = [2; 8];
L4 = [3; 9];
L5 = [4; 10];
L6 = [5; 11];
L7 = [6; 12];
DT = table(L1, L2, L3, L4, L5, L6, L7)
DN = normalize(DT,"norm",...
"DataVariables",["L2", "L3", "L4", "L5", "L6", "L7"])
DA = DN;
DA.L2 = norm(DT.L2, 2) * DA.L2;
DA.L3 = norm(DT.L3, 2) * DA.L3;
DA.L4 = norm(DT.L4, 2) * DA.L4;
DA.L5 = norm(DT.L5, 2) * DA.L5;
DA.L6 = norm(DT.L6, 2) * DA.L6;
DA.L7 = norm(DT.L7, 2) * DA.L7;
disp(DA)
For your case, I think this should work fine but I can't run this since I don't have DT.xlsx file so I tried this method in above example:
DT = readtable("DT.xlsx");
DN = normalize(DT,"norm",...
"DataVariables",["Tb","DH","DN","EB","GH","Z"]) ;
DA = DN;
DA.Tb = norm(DT.Tb, 2) * DA.Tb;
DA.DH = norm(DT.DH, 2) * DA.DH;
DA.DN = norm(DT.DN, 2) * DA.DN;
DA.EB = norm(DT.EB, 2) * DA.EB;
DA.GH = norm(DT.GH, 2) * DA.GH;
DA.Z = norm(DT.Z, 2) * DA.Z;
disp(DA);
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Specialized Power Systems dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!