How would you visualize a multivariate Gaussian in high dimension (>3D)?
$begingroup$
Obviously, I can't do:
Plot3D[PDF[
MultinormalDistribution[{0, 0,
0}, {{1, 0, 0}, {0, 1, 0} {0, 0, 1}}], {x, y}], {x, -20,
20}, {y, -20, 20}]
How would you suggest me to effectively plot this multivariate probability density function?
plotting visualization
$endgroup$
add a comment |
$begingroup$
Obviously, I can't do:
Plot3D[PDF[
MultinormalDistribution[{0, 0,
0}, {{1, 0, 0}, {0, 1, 0} {0, 0, 1}}], {x, y}], {x, -20,
20}, {y, -20, 20}]
How would you suggest me to effectively plot this multivariate probability density function?
plotting visualization
$endgroup$
$begingroup$
What do you want out of the plot? Is it just informative, or would you plan to use it to actually determine some values of things?
$endgroup$
– MikeY
2 hours ago
$begingroup$
@MikeY, I have a 6D energy landscape I want to visualize.
$endgroup$
– 0x90
1 hour ago
add a comment |
$begingroup$
Obviously, I can't do:
Plot3D[PDF[
MultinormalDistribution[{0, 0,
0}, {{1, 0, 0}, {0, 1, 0} {0, 0, 1}}], {x, y}], {x, -20,
20}, {y, -20, 20}]
How would you suggest me to effectively plot this multivariate probability density function?
plotting visualization
$endgroup$
Obviously, I can't do:
Plot3D[PDF[
MultinormalDistribution[{0, 0,
0}, {{1, 0, 0}, {0, 1, 0} {0, 0, 1}}], {x, y}], {x, -20,
20}, {y, -20, 20}]
How would you suggest me to effectively plot this multivariate probability density function?
plotting visualization
plotting visualization
edited 1 hour ago
0x90
asked 6 hours ago
0x900x90
24719
24719
$begingroup$
What do you want out of the plot? Is it just informative, or would you plan to use it to actually determine some values of things?
$endgroup$
– MikeY
2 hours ago
$begingroup$
@MikeY, I have a 6D energy landscape I want to visualize.
$endgroup$
– 0x90
1 hour ago
add a comment |
$begingroup$
What do you want out of the plot? Is it just informative, or would you plan to use it to actually determine some values of things?
$endgroup$
– MikeY
2 hours ago
$begingroup$
@MikeY, I have a 6D energy landscape I want to visualize.
$endgroup$
– 0x90
1 hour ago
$begingroup$
What do you want out of the plot? Is it just informative, or would you plan to use it to actually determine some values of things?
$endgroup$
– MikeY
2 hours ago
$begingroup$
What do you want out of the plot? Is it just informative, or would you plan to use it to actually determine some values of things?
$endgroup$
– MikeY
2 hours ago
$begingroup$
@MikeY, I have a 6D energy landscape I want to visualize.
$endgroup$
– 0x90
1 hour ago
$begingroup$
@MikeY, I have a 6D energy landscape I want to visualize.
$endgroup$
– 0x90
1 hour ago
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
Full M-dimensional probability distributions are hard to display. However, the conditional distributions at the planes through the origin, showing the densities as cross-cut through the full distribution, can be plotted as contour plots. The conditional distribution of a multinomial Gaussian distribution is also a Gaussian distribution, and therefore the contours are ellipses.
Here are the conditional distributions for some 4-dimensional distributions (w0,w1,w2,w3).
I have used the ConditionalMultinormalDistribution function from Chris.
$endgroup$
add a comment |
$begingroup$
I am not sure what are the answers you are looking for. One way is to utilize color as a fourth dimension; another is to make multiple 3D plots over some grid for the variables non-visualized in those 3D plots.
Here is an example:
Clear[myPDF]
myPDF[x_, y_, z_] :=
Evaluate[PDF[
MultinormalDistribution[{-1, 1, 1}, {{1, 1/2, 0}, {1/2, 1, 0}, {0, 0, 1}}], {x, y, z}]];
myPDF[x, y, z]
(* E^(1/2 (-(1 + x) ((4 (1 + x))/3 -
2/3 (-1 + y)) - (-(2/3) (1 + x) + 4/3 (-1 + y)) (-1 + y) - (-1 +
z)^2))/(Sqrt[6] [Pi]^(3/2)) *)
Multicolumn[
Table[Plot3D[myPDF[x, y, z], {x, -3, 3}, {y, -6, 6},
MeshFunctions -> {#3 &}, MeshShading -> {None, Red, None, Yellow},
PlotRange -> {All, All, {0, 0.08}}, PlotPoints -> 25,
PlotLabel -> Row[{"z=", z}]], {z, -6, 6, 1}], 3]
$endgroup$
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "387"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f191164%2fhow-would-you-visualize-a-multivariate-gaussian-in-high-dimension-3d%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Full M-dimensional probability distributions are hard to display. However, the conditional distributions at the planes through the origin, showing the densities as cross-cut through the full distribution, can be plotted as contour plots. The conditional distribution of a multinomial Gaussian distribution is also a Gaussian distribution, and therefore the contours are ellipses.
Here are the conditional distributions for some 4-dimensional distributions (w0,w1,w2,w3).
I have used the ConditionalMultinormalDistribution function from Chris.
$endgroup$
add a comment |
$begingroup$
Full M-dimensional probability distributions are hard to display. However, the conditional distributions at the planes through the origin, showing the densities as cross-cut through the full distribution, can be plotted as contour plots. The conditional distribution of a multinomial Gaussian distribution is also a Gaussian distribution, and therefore the contours are ellipses.
Here are the conditional distributions for some 4-dimensional distributions (w0,w1,w2,w3).
I have used the ConditionalMultinormalDistribution function from Chris.
$endgroup$
add a comment |
$begingroup$
Full M-dimensional probability distributions are hard to display. However, the conditional distributions at the planes through the origin, showing the densities as cross-cut through the full distribution, can be plotted as contour plots. The conditional distribution of a multinomial Gaussian distribution is also a Gaussian distribution, and therefore the contours are ellipses.
Here are the conditional distributions for some 4-dimensional distributions (w0,w1,w2,w3).
I have used the ConditionalMultinormalDistribution function from Chris.
$endgroup$
Full M-dimensional probability distributions are hard to display. However, the conditional distributions at the planes through the origin, showing the densities as cross-cut through the full distribution, can be plotted as contour plots. The conditional distribution of a multinomial Gaussian distribution is also a Gaussian distribution, and therefore the contours are ellipses.
Here are the conditional distributions for some 4-dimensional distributions (w0,w1,w2,w3).
I have used the ConditionalMultinormalDistribution function from Chris.
answered 5 hours ago
Romke BontekoeRomke Bontekoe
1,326818
1,326818
add a comment |
add a comment |
$begingroup$
I am not sure what are the answers you are looking for. One way is to utilize color as a fourth dimension; another is to make multiple 3D plots over some grid for the variables non-visualized in those 3D plots.
Here is an example:
Clear[myPDF]
myPDF[x_, y_, z_] :=
Evaluate[PDF[
MultinormalDistribution[{-1, 1, 1}, {{1, 1/2, 0}, {1/2, 1, 0}, {0, 0, 1}}], {x, y, z}]];
myPDF[x, y, z]
(* E^(1/2 (-(1 + x) ((4 (1 + x))/3 -
2/3 (-1 + y)) - (-(2/3) (1 + x) + 4/3 (-1 + y)) (-1 + y) - (-1 +
z)^2))/(Sqrt[6] [Pi]^(3/2)) *)
Multicolumn[
Table[Plot3D[myPDF[x, y, z], {x, -3, 3}, {y, -6, 6},
MeshFunctions -> {#3 &}, MeshShading -> {None, Red, None, Yellow},
PlotRange -> {All, All, {0, 0.08}}, PlotPoints -> 25,
PlotLabel -> Row[{"z=", z}]], {z, -6, 6, 1}], 3]
$endgroup$
add a comment |
$begingroup$
I am not sure what are the answers you are looking for. One way is to utilize color as a fourth dimension; another is to make multiple 3D plots over some grid for the variables non-visualized in those 3D plots.
Here is an example:
Clear[myPDF]
myPDF[x_, y_, z_] :=
Evaluate[PDF[
MultinormalDistribution[{-1, 1, 1}, {{1, 1/2, 0}, {1/2, 1, 0}, {0, 0, 1}}], {x, y, z}]];
myPDF[x, y, z]
(* E^(1/2 (-(1 + x) ((4 (1 + x))/3 -
2/3 (-1 + y)) - (-(2/3) (1 + x) + 4/3 (-1 + y)) (-1 + y) - (-1 +
z)^2))/(Sqrt[6] [Pi]^(3/2)) *)
Multicolumn[
Table[Plot3D[myPDF[x, y, z], {x, -3, 3}, {y, -6, 6},
MeshFunctions -> {#3 &}, MeshShading -> {None, Red, None, Yellow},
PlotRange -> {All, All, {0, 0.08}}, PlotPoints -> 25,
PlotLabel -> Row[{"z=", z}]], {z, -6, 6, 1}], 3]
$endgroup$
add a comment |
$begingroup$
I am not sure what are the answers you are looking for. One way is to utilize color as a fourth dimension; another is to make multiple 3D plots over some grid for the variables non-visualized in those 3D plots.
Here is an example:
Clear[myPDF]
myPDF[x_, y_, z_] :=
Evaluate[PDF[
MultinormalDistribution[{-1, 1, 1}, {{1, 1/2, 0}, {1/2, 1, 0}, {0, 0, 1}}], {x, y, z}]];
myPDF[x, y, z]
(* E^(1/2 (-(1 + x) ((4 (1 + x))/3 -
2/3 (-1 + y)) - (-(2/3) (1 + x) + 4/3 (-1 + y)) (-1 + y) - (-1 +
z)^2))/(Sqrt[6] [Pi]^(3/2)) *)
Multicolumn[
Table[Plot3D[myPDF[x, y, z], {x, -3, 3}, {y, -6, 6},
MeshFunctions -> {#3 &}, MeshShading -> {None, Red, None, Yellow},
PlotRange -> {All, All, {0, 0.08}}, PlotPoints -> 25,
PlotLabel -> Row[{"z=", z}]], {z, -6, 6, 1}], 3]
$endgroup$
I am not sure what are the answers you are looking for. One way is to utilize color as a fourth dimension; another is to make multiple 3D plots over some grid for the variables non-visualized in those 3D plots.
Here is an example:
Clear[myPDF]
myPDF[x_, y_, z_] :=
Evaluate[PDF[
MultinormalDistribution[{-1, 1, 1}, {{1, 1/2, 0}, {1/2, 1, 0}, {0, 0, 1}}], {x, y, z}]];
myPDF[x, y, z]
(* E^(1/2 (-(1 + x) ((4 (1 + x))/3 -
2/3 (-1 + y)) - (-(2/3) (1 + x) + 4/3 (-1 + y)) (-1 + y) - (-1 +
z)^2))/(Sqrt[6] [Pi]^(3/2)) *)
Multicolumn[
Table[Plot3D[myPDF[x, y, z], {x, -3, 3}, {y, -6, 6},
MeshFunctions -> {#3 &}, MeshShading -> {None, Red, None, Yellow},
PlotRange -> {All, All, {0, 0.08}}, PlotPoints -> 25,
PlotLabel -> Row[{"z=", z}]], {z, -6, 6, 1}], 3]
answered 5 hours ago
Anton AntonovAnton Antonov
23.5k167114
23.5k167114
add a comment |
add a comment |
Thanks for contributing an answer to Mathematica Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f191164%2fhow-would-you-visualize-a-multivariate-gaussian-in-high-dimension-3d%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
$begingroup$
What do you want out of the plot? Is it just informative, or would you plan to use it to actually determine some values of things?
$endgroup$
– MikeY
2 hours ago
$begingroup$
@MikeY, I have a 6D energy landscape I want to visualize.
$endgroup$
– 0x90
1 hour ago