dependents_plot

버전 1.1 (1.94 KB) 작성자: Mark Matusevich
Visualises dependents of one variable on another.
다운로드 수: 1.1K
업데이트 날짜: 2014/11/24

라이선스 보기

Visualises dependents of one variable on another.
Plots conditional statistics. The statistics plotted by default is the conditional mean. However, any other statistics also can be plotted.

For example, let's assume that you have two metrics:
- duration of atrial fibrillation during 24 hour ambulatory ECG recording (stored in vector 'holter').
- peak ischemic ST depression during cardiac stress test (stored in vector 'ST').
and you need to analyse the conditional probability distribution of the former on the later.
Use the following commands to initialize the variables:
>> N = 1e5;
>> ST = 2*pi*(1:N)/N;
>> holter = sin(ST) + randn(size(ST));

Show E(holter|ST):
>> dependents_plot(ST,holter)
Show E(holter|ST), conditional standard deviation, and maximum:
>> dependents_plot(ST,holter,[],{@mean, @std, @max})

Basically, you can show any statistics you need; all you need is to provide an appropriate function handle. For example, you can show different percentiles:
>> index_ = @(v,ii) v(ii);
>> perc = @(v,p) index_(sort(v(:)), max(round(numel(v)*p/100),1)); % find percentile (p= 0..100)
>> dependents_plot(ST,holter,[],{@(z) perc(z,10), @(z) perc(z,30), @median, @mean, @(z) perc(z,70), @(z) perc(z,90)});
>> legend('10%','30%','median','mean','70%','90%')

This submission is courtesy of Norav Medical (www.norav.com) - the leading company in the fields of PC-ECG, EKG Management systems and related non-invasive cardiac devices.

인용 양식

Mark Matusevich (2024). dependents_plot (https://www.mathworks.com/matlabcentral/fileexchange/45481-dependents_plot), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2009b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Frequently-used Algorithms에 대해 자세히 알아보기

Community Treasure Hunt

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

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

Bug fix : elements where X was equal to max(X) were counted in the lowest bin instead of the highest bin.

Also, change behavior of map2bins when mode=='center' or vBins is a number: the first and the last bins are now extended to infinity.

1.0.0.0