Orthogonal Linear Regression in 3D-space by using PCA

버전 1.3.0.1 (2.44 KB) 작성자: Ivo Petras
Orthogonal Linear Regression by using PCA
다운로드 수: 8.1K
업데이트 날짜: 2018/10/16

라이선스 보기

Orthogonal Linear Regression in 3D-space by using Principal Components Analysis

This is a wrapper function to some pieces of the code from the Statistics Toolbox demo titled "Fitting an Orthogonal Regression Using Principal Components Analysis"
(https://www.mathworks.com/examples/statistics/mw/stats_featured-ex25288136-fitting-an-orthogonal-regression-using-principal-components-analysis), which is Copyrighted by the MathWorks, Inc.

Input parameters:
- XData: input data block -- x: axis
- YData: input data block -- y: axis
- ZData: input data block -- z: axis
- geometry: type of approximation ('line','plane')
- visualization: figure ('on','off') -- default is 'on'
- sod: show orthogonal distances ('on','off') -- default is 'on'

Return parameters:
- Err: error of approximation - sum of orthogonal distances
- N: normal vector for plane, direction vector for line
- P: point on plane or line in 3D space

Example:

>> XD = [4.8 6.7 6.2 6.2 4.1 1.9 2.0]';
>> YD = [13.4 9.9 5.8 6.1 6.7 10.6 11.5]';
>> ZD = [13.7 13.1 11.3 11.8 12.5 16.2 18.5]';
>> fit_3D_data(XD,YD,ZD,'line','on','on');
>> fit_3D_data(XD,YD,ZD,'plane','on','off');

Note: Written for Matlab 7.0 (R14) with Statistics Toolbox

We sincerely thank Peter Perkins, the author of the demo, and John D'Errico for their comments.

Ivo Petras, Igor Podlubny, May 2006
(ivo.petras@tuke.sk, igor.podlubny@tuke.sk)

An example of application can be found at:
http://uk.arxiv.org/abs/math/0609789

For additional codes for the Orthogonal Linear Regression also known as Total Least Squares Method see link:
http://www.mathworks.com/matlabcentral/fileexchange/31109

인용 양식

Ivo Petras (2024). Orthogonal Linear Regression in 3D-space by using PCA (https://www.mathworks.com/matlabcentral/fileexchange/12395-orthogonal-linear-regression-in-3d-space-by-using-pca), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2018b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.3.0.1

Updated description.

1.3.0.0

Updated description. Added screenshot.

1.0.0.0

Minor changes.