Archiu:MultivariateNormal.png
Aparència
De L'Enciclopèdia, la wikipedia en valencià
Tamany d'esta vista prèvia: 793 × 600 píxels. Atres/s resolucions: 317 × 240 píxels | 635 × 480 píxels | 842 × 637 píxels.
Resolució completa. ((842 × 637 pixels, tamany de l'archiu: 159 kB, MIME tipo: image/png))
Est archiu és de Wikimedia Commons i pot usar-se en atres proyectes. La descripció en la seua pàgina de descripció de l'archiu es mostra més avall.
Summary
Source code
%This script illustrates a multivariate Gaussian distribution and its
%marginal distributions
%This code is issued under the CC0 "license"
%Define limits of plotting
X = -5:0.1:5;
Y = -5:0.1:5;
%2-d Mean and covariance matrix
MeanVec = [0 0];
CovMatrix = [1 0.6; 0.6 2];
%Get the 1-d PDFs for the "walls"
Z_x = normpdf(X,MeanVec(1), sqrt(CovMatrix(1,1)));
Z_y = normpdf(Y,MeanVec(2), sqrt(CovMatrix(2,2)));
%Get the 2-d samples for the "floor"
Samples = mvnrnd(MeanVec, CovMatrix, 10000);
%Get the sigma ellipses by transform a circle by the cholesky decomp
L = chol(CovMatrix,'lower');
t = linspace(0,2*pi,100); %Our ellipse will have 100 points on it
C = [cos(t) ; sin(t)]; %A unit circle
E1 = 1*L*C; E2 = 2*L*C; E3 = 3*L*C; %Get the 1,2, and 3-sigma ellipses
figure; hold on;
%Plot the samples on the "floor"
plot3(Samples(:,1),Samples(:,2),zeros(size(Samples,1),1),'k.','MarkerSize',2)
%Plot the 1,2, and 3-sigma ellipses slightly above the floor
%plot3(E1(1,:), E1(2,:), 1e-3+zeros(1,size(E1,2)),'Color','g','LineWidth',2);
%plot3(E2(1,:), E2(2,:), 1e-3+zeros(1,size(E2,2)),'Color','g','LineWidth',2);
plot3(E3(1,:), E3(2,:), 1e-3+zeros(1,size(E3,2)),'Color','g','LineWidth',2);
%Plot the histograms on the walls from the data in the middle
[n_x, xout] = hist(Samples(:,1),20);%Creates 20 bars
n_x = n_x ./ ( sum(n_x) *(xout(2)-xout(1)));%Normalizes to be a pdf
[~,~,~,x_Pos,x_Height] = makebars(xout,n_x);%Creates the bar points
plot3(x_Pos, Y(end)*ones(size(x_Pos)),x_Height,'-k')
%Now plot the other histograms on the wall
[n_y, yout] = hist(Samples(:,2),20);
n_y = n_y ./ ( sum(n_y) *(yout(2)-yout(1)));
[~,~,~,y_Pos,y_Height] = makebars(yout,n_y);
plot3(X(1)*ones(size(y_Pos)),y_Pos, y_Height,'-k')
%Now plot the 1-d pdfs over the histograms
plot3(X, ones(size(X))*Y(end), Z_x,'-b','LineWidth',2);
plot3(ones(size(Y))*X(1), Y, Z_y,'-r','LineWidth',2);
%Make the figure look nice
grid on; view(45,55);
axis([X(1) X(end) Y(1) Y(end)])
Licensing
Bscan, the copyright holder of this work, hereby publishes it under the following license:
| This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication. | |
| The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
http://creativecommons.org/publicdomain/zero/1.0/deed.enCC0Creative Commons Zero, Public Domain Dedicationfalsefalse |
Captions
Add a one-line explanation of what this file represents
Items portrayed in this file
depicts English
creator English
Some value without a Wikidata item
copyright license English
Creative Commons CC0 License English
inception English
22 March 2013
source of file English
original creation by uploader English
media type English
image/png
data size English
162,413 byte
height English
637 pixel
width English
842 pixel
checksum English
41daca0e5214423672798f1800ad6989f1816987
Historial de l'image
Puncha en la data/hora per a vore l'image tal i com es mostrava en eixe moment.
| Data/Hora | Miniatura | Dimensions | Usuari | Descripció | |
|---|---|---|---|---|---|
| actual | 19:30 22 març 2013 | 842 × 637 (159 kB) | wikimediacommons>Bscan | User created page with UploadWizard |
Enllaços a l'image
Les següents pàgines enllacen ad esta image:
Metasenyes
Est archiu conté informació adicional, provablement afegida per la càmara digital o l'escàner usat per a crear-lo o digitalisar-lo. Si l'archiu ha segut modificat posteriorment, alguns detalls poden no correspondre en l'informació real de l'archiu.
| Resolució horisontal | 59,06 dpc |
|---|---|
| Resolució vertical | 59,06 dpc |
| Software utilisat |
|