Lecture note Data visualization - Chapter 29
Số trang: 40
Loại file: pptx
Dung lượng: 2.99 MB
Lượt xem: 3
Lượt tải: 0
Xem trước 4 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
The main contents of the chapter consist of the following: The relational algebra, unary relational operations, relational algebra operations from set theory, binary relational operations, ER-to-Relational mapping algorithm, mapping EER model constructs to relations.
Nội dung trích xuất từ tài liệu:
Lecture note Data visualization - Chapter 29Lecture29RecapSummaryofChapter6InterpolationLinearInterpolationCubicSplineInterpolationConnectingdatapointswithstraightlinesprobablyisn’t thebestwaytoestimateintermediatevalues,althoughitis surelythesimplestAsmoothercurvecanbecreatedbyusingthecubic splineinterpolationtechnique,includedintheinterp1 function.Thisapproachusesathirdorderpolynomialto modelthebehaviorofthedataTocallthecubicspline,weneedtoaddafourthfieldto interp1: interp1(x,y,3.5,spline)Thiscommandreturnsanimprovedestimateofyatx=MultidimensionalInterpolationSupposethereisasetofdatazthatdependsontwo variables,xandy.ForexampleContinued….Inordertodeterminethevalueofzaty=3andx=1.5, twointerpolationshavetoperformedOneapproachwouldbetofindthevaluesofzaty=3 andallthegivenxvaluesbyusinginterp1andthendoa secondinterpolationinnewchartFirstlet’sdefinex,y,andzinMATLAB: y=2:2:6; x=1:4; z=[7152230 54109164218Continued….Althoughthepreviousapproachworks,performingthe calculationsintwostepsisawkwardMATLABincludesatwodimensionallinearinterpolation function,interp2,thatcansolvetheprobleminasingle step: interp2(x,y,z,1.5,3) ans= 46.2500Thefirstfieldintheinterp2functionmustbeavector definingthevalueassociatedwitheachcolumn(inthis case,x),andthesecondfieldmustbeavectordefiningContinued….MATLABalsoincludesafunction,interp3,forthree dimensionalinterpolationConsultthehelpfeatureforthedetailsonhowtousethis functionandinterpn,whichallowsyoutoperformn dimensionalinterpolationAllthesefunctionsdefaulttothelinearinterpolation techniquebutwillacceptanyoftheothertechniquesCurveFittingAlthoughinterpolationtechniquescanbeusedtofind valuesofybetweenmeasuredxvalues,itwouldbemore convenientifwecouldmodelexperimentaldataasy=f(x)ThenwecouldjustcalculateanyvalueofywewantedIfweknowsomethingabouttheunderlyingrelationship betweenxandy,wemaybeabletodeterminean equationonthebasisofthoseprinciplesMATLABhasbuiltincurvefittingfunctionsthatallow ustomodeldataempiricallyThesemodelsaregoodonlyintheregionwherewe’ve collecteddataLinearRegressionThesimplestway tomodelasetof dataisasastraight lineSupposeadataset x=0:5; y=[15,10,9,6, 2,0];Ifweplotthedata, wecantrytodraw astraightline throughthedataContinued….Lookingattheplot, thereareseveralof thepointsappearto fallexactlyonthe line,butothersare offbyvarying amountsInordertocompare thequalityofthefit ofthislinetoother possibleestimates, wefindtheContinued….Continued….Thelinearregressiontechniqueusesanapproachcalled leastsquaresfittocomparehowwelldifferentequations modelthebehaviorofthedataInthistechnique,thedifferencesbetweentheactualand calculatedvaluesaresquaredandaddedtogether.Thishas theadvantagethatpositiveandnegativedeviationsdon’t canceleachotheroutMATLABcouldbeusedtocalculatethisparameterfor data.Wehave sum_of_the_squares=sum((yy_calc).^2)Continued….LinearregressionisaccomplishedinMATLABwiththe polyfitfunctionThreefieldsarerequiredbypolyfit: avectorofx–values avectorofy–values anintegerindicatingwhatorderpolynomialshouldbeused tofitthedataSinceastraightlineisafirstorderpolynomial,enterthe number1intothepolyfitfunction: polyfit(x,y,1) ans=2.914314.2857PolynomialRegressionContinued….Wecanfindthesumofthesquarestodeterminewhether thesemodelsfitthedatabetter: y2=0.0536*x.^23.182*x+14.4643; sum((y2y).^2) ans=3.2643 y3=0.0648*x.^3+0.5398*x.^24.0701*x+14.6587 sum((y3y).^2) ans=2.9921Themoretermsweaddtoourequation,the“better”istheContinued….Inordertoplotthecurvesdefinedbythesenew equations,morethanthesixdatapointsareusedinthe linearmodelMATLABcreatesplotsbyconnectingcalculatedpoints withstraightlines,soifasmoothcurveisneeded,more pointsarerequiredWecangetmorepointsandplotthecurveswiththe followingcode: smooth_x=0:0.2:5; smooth_y2=0.0536*smooth_x.^23.182*smooth_x+
Nội dung trích xuất từ tài liệu:
Lecture note Data visualization - Chapter 29Lecture29RecapSummaryofChapter6InterpolationLinearInterpolationCubicSplineInterpolationConnectingdatapointswithstraightlinesprobablyisn’t thebestwaytoestimateintermediatevalues,althoughitis surelythesimplestAsmoothercurvecanbecreatedbyusingthecubic splineinterpolationtechnique,includedintheinterp1 function.Thisapproachusesathirdorderpolynomialto modelthebehaviorofthedataTocallthecubicspline,weneedtoaddafourthfieldto interp1: interp1(x,y,3.5,spline)Thiscommandreturnsanimprovedestimateofyatx=MultidimensionalInterpolationSupposethereisasetofdatazthatdependsontwo variables,xandy.ForexampleContinued….Inordertodeterminethevalueofzaty=3andx=1.5, twointerpolationshavetoperformedOneapproachwouldbetofindthevaluesofzaty=3 andallthegivenxvaluesbyusinginterp1andthendoa secondinterpolationinnewchartFirstlet’sdefinex,y,andzinMATLAB: y=2:2:6; x=1:4; z=[7152230 54109164218Continued….Althoughthepreviousapproachworks,performingthe calculationsintwostepsisawkwardMATLABincludesatwodimensionallinearinterpolation function,interp2,thatcansolvetheprobleminasingle step: interp2(x,y,z,1.5,3) ans= 46.2500Thefirstfieldintheinterp2functionmustbeavector definingthevalueassociatedwitheachcolumn(inthis case,x),andthesecondfieldmustbeavectordefiningContinued….MATLABalsoincludesafunction,interp3,forthree dimensionalinterpolationConsultthehelpfeatureforthedetailsonhowtousethis functionandinterpn,whichallowsyoutoperformn dimensionalinterpolationAllthesefunctionsdefaulttothelinearinterpolation techniquebutwillacceptanyoftheothertechniquesCurveFittingAlthoughinterpolationtechniquescanbeusedtofind valuesofybetweenmeasuredxvalues,itwouldbemore convenientifwecouldmodelexperimentaldataasy=f(x)ThenwecouldjustcalculateanyvalueofywewantedIfweknowsomethingabouttheunderlyingrelationship betweenxandy,wemaybeabletodeterminean equationonthebasisofthoseprinciplesMATLABhasbuiltincurvefittingfunctionsthatallow ustomodeldataempiricallyThesemodelsaregoodonlyintheregionwherewe’ve collecteddataLinearRegressionThesimplestway tomodelasetof dataisasastraight lineSupposeadataset x=0:5; y=[15,10,9,6, 2,0];Ifweplotthedata, wecantrytodraw astraightline throughthedataContinued….Lookingattheplot, thereareseveralof thepointsappearto fallexactlyonthe line,butothersare offbyvarying amountsInordertocompare thequalityofthefit ofthislinetoother possibleestimates, wefindtheContinued….Continued….Thelinearregressiontechniqueusesanapproachcalled leastsquaresfittocomparehowwelldifferentequations modelthebehaviorofthedataInthistechnique,thedifferencesbetweentheactualand calculatedvaluesaresquaredandaddedtogether.Thishas theadvantagethatpositiveandnegativedeviationsdon’t canceleachotheroutMATLABcouldbeusedtocalculatethisparameterfor data.Wehave sum_of_the_squares=sum((yy_calc).^2)Continued….LinearregressionisaccomplishedinMATLABwiththe polyfitfunctionThreefieldsarerequiredbypolyfit: avectorofx–values avectorofy–values anintegerindicatingwhatorderpolynomialshouldbeused tofitthedataSinceastraightlineisafirstorderpolynomial,enterthe number1intothepolyfitfunction: polyfit(x,y,1) ans=2.914314.2857PolynomialRegressionContinued….Wecanfindthesumofthesquarestodeterminewhether thesemodelsfitthedatabetter: y2=0.0536*x.^23.182*x+14.4643; sum((y2y).^2) ans=3.2643 y3=0.0648*x.^3+0.5398*x.^24.0701*x+14.6587 sum((y3y).^2) ans=2.9921Themoretermsweaddtoourequation,the“better”istheContinued….Inordertoplotthecurvesdefinedbythesenew equations,morethanthesixdatapointsareusedinthe linearmodelMATLABcreatesplotsbyconnectingcalculatedpoints withstraightlines,soifasmoothcurveisneeded,more pointsarerequiredWecangetmorepointsandplotthecurveswiththe followingcode: smooth_x=0:0.2:5; smooth_y2=0.0536*smooth_x.^23.182*smooth_x+
Tìm kiếm theo từ khóa liên quan:
Data visualization Lecture note Data visualization Data structures Data Visualization with C Data visualization with matlab Effective graphical displayGợi ý tài liệu liên quan:
-
Trực quan hóa dữ liệu: Vai trò & thử thách
10 trang 37 0 0 -
Ebook Eloquent JavaScript - A modern introduction to programming: Part 1
199 trang 32 0 0 -
Ebook Management support systems: Part 2 - Dr. Kamlesh Lakhwani
136 trang 31 0 0 -
Lecture Introduction to computing systems (2/e): Chapter 19 - Yale N. Patt, Sanjay J. Patel
28 trang 30 0 0 -
Ebook Introduction to algorithms (3rd edition)
1313 trang 27 0 0 -
Lecture Data Structures: Lesson 38
71 trang 26 0 0 -
Lecture Data structures and algorithms: Chapter 1 - Introduction
41 trang 26 0 0 -
Lecture note Data visualization - Chapter 22
21 trang 24 0 0 -
Lecture Data Structures: Lesson 41
18 trang 23 0 0 -
335 trang 23 0 0