How would you visualize a multivariate Gaussian in high dimension (>3D)?












2












$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?










share|improve this question











$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
















2












$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?










share|improve this question











$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














2












2








2





$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?










share|improve this question











$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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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


















  • $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










2 Answers
2






active

oldest

votes


















4












$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).



enter image description here



I have used the ConditionalMultinormalDistribution function from Chris.






share|improve this answer









$endgroup$





















    3












    $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]


    enter image description here






    share|improve this answer









    $endgroup$













      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
      });


      }
      });














      draft saved

      draft discarded


















      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









      4












      $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).



      enter image description here



      I have used the ConditionalMultinormalDistribution function from Chris.






      share|improve this answer









      $endgroup$


















        4












        $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).



        enter image description here



        I have used the ConditionalMultinormalDistribution function from Chris.






        share|improve this answer









        $endgroup$
















          4












          4








          4





          $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).



          enter image description here



          I have used the ConditionalMultinormalDistribution function from Chris.






          share|improve this answer









          $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).



          enter image description here



          I have used the ConditionalMultinormalDistribution function from Chris.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 5 hours ago









          Romke BontekoeRomke Bontekoe

          1,326818




          1,326818























              3












              $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]


              enter image description here






              share|improve this answer









              $endgroup$


















                3












                $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]


                enter image description here






                share|improve this answer









                $endgroup$
















                  3












                  3








                  3





                  $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]


                  enter image description here






                  share|improve this answer









                  $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]


                  enter image description here







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 5 hours ago









                  Anton AntonovAnton Antonov

                  23.5k167114




                  23.5k167114






























                      draft saved

                      draft discarded




















































                      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.




                      draft saved


                      draft discarded














                      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





















































                      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







                      Popular posts from this blog

                      Ponta tanko

                      Tantalo (mitologio)

                      Erzsébet Schaár