Pulling the principal components out of a DimensionReducerFunction? The Next CEO of Stack OverflowHow can I determine the importance of variables from Classify?Why is the classify function not giving the desired output?How to use Mathematica to train a network Using out of core classification?How to train a net for recognize the numberHow to train a network using out of core training when data have different length?FeatureSpacePlot freaks out with LatentSemanticAnalysis on wordsHow can I reproduce the result of DimensionReduction?How can I see the predictor function that Mathematica produces?Machine learning: How to fix part of the weight matrix?Ordinal subset in the set of classes

Is French Guiana a (hard) EU border?

Traveling with my 5 year old daughter (as the father) without the mother from Germany to Mexico

Can Plant Growth be repeatedly cast on the same area to exponentially increase the yield of harvests there (more than twice)?

Defamation due to breach of confidentiality

Is there such a thing as never melting snow?

My ex-girlfriend uses my Apple ID to login to her iPad, do I have to give her my Apple ID password to reset it?

Purpose of level-shifter with same in and out voltages

Expressing the idea of having a very busy time

What can the phrase “is embedded in a whale of a bill” mean?

Do scriptures give a method to recognize a truly self-realized person/jivanmukta?

(How) Could a medieval fantasy world survive a magic-induced "nuclear winter"?

What is a natural French construction for "How can you be ... ?"

Does destroying a Lich's phylactery destroy the soul within it?

Does Germany produce more waste than the US?

What steps are necessary to read a Modern SSD in Medieval Europe?

Audio Conversion With ADS1243

Are the names of these months realistic?

What does "shotgun unity" refer to here in this sentence?

"Eavesdropping" vs "Listen in on"

Prepend last line of stdin to entire stdin

What was the first Unix version to run on a microcomputer?

How to use ReplaceAll on an expression that contains a rule

Regression vs Random Forest - Combination of features

How to set page number in right side in chapter title page?



Pulling the principal components out of a DimensionReducerFunction?



The Next CEO of Stack OverflowHow can I determine the importance of variables from Classify?Why is the classify function not giving the desired output?How to use Mathematica to train a network Using out of core classification?How to train a net for recognize the numberHow to train a network using out of core training when data have different length?FeatureSpacePlot freaks out with LatentSemanticAnalysis on wordsHow can I reproduce the result of DimensionReduction?How can I see the predictor function that Mathematica produces?Machine learning: How to fix part of the weight matrix?Ordinal subset in the set of classes










2












$begingroup$


Suppose I perform dimension reduction using PCA:



dr = DimensionReduction[1, 2, 3, 2, 3, 5, 3, 5, 8, 4, 5, 
8.5, Method -> "PrincipalComponentsAnalysis"]


If I want to see the principal components themselves, in the original space, one thought is to use the "OriginalData" feature of the DimensionReducerFunction, on basis vectors in the new space:



In[8]:= dr[1.0, 0.0, "OriginalData"]
dr[0.0, 1.0, "OriginalData"]

Out[8]= 1.86006, 2.9998, 4.81724

Out[9]= 3.38701, 3.01026, 5.64163


Is this a reasonable thing to do, or am I misinterpreting how the "OriginalData" feature works? And is there a better way to pull out the principal components themselves? People often want to visualize these for various reasons.



(There are several other questions about how to solve a similar problem with the PrincipalComponents function; this is a question about a different function.)










share|improve this question









$endgroup$
















    2












    $begingroup$


    Suppose I perform dimension reduction using PCA:



    dr = DimensionReduction[1, 2, 3, 2, 3, 5, 3, 5, 8, 4, 5, 
    8.5, Method -> "PrincipalComponentsAnalysis"]


    If I want to see the principal components themselves, in the original space, one thought is to use the "OriginalData" feature of the DimensionReducerFunction, on basis vectors in the new space:



    In[8]:= dr[1.0, 0.0, "OriginalData"]
    dr[0.0, 1.0, "OriginalData"]

    Out[8]= 1.86006, 2.9998, 4.81724

    Out[9]= 3.38701, 3.01026, 5.64163


    Is this a reasonable thing to do, or am I misinterpreting how the "OriginalData" feature works? And is there a better way to pull out the principal components themselves? People often want to visualize these for various reasons.



    (There are several other questions about how to solve a similar problem with the PrincipalComponents function; this is a question about a different function.)










    share|improve this question









    $endgroup$














      2












      2








      2


      2



      $begingroup$


      Suppose I perform dimension reduction using PCA:



      dr = DimensionReduction[1, 2, 3, 2, 3, 5, 3, 5, 8, 4, 5, 
      8.5, Method -> "PrincipalComponentsAnalysis"]


      If I want to see the principal components themselves, in the original space, one thought is to use the "OriginalData" feature of the DimensionReducerFunction, on basis vectors in the new space:



      In[8]:= dr[1.0, 0.0, "OriginalData"]
      dr[0.0, 1.0, "OriginalData"]

      Out[8]= 1.86006, 2.9998, 4.81724

      Out[9]= 3.38701, 3.01026, 5.64163


      Is this a reasonable thing to do, or am I misinterpreting how the "OriginalData" feature works? And is there a better way to pull out the principal components themselves? People often want to visualize these for various reasons.



      (There are several other questions about how to solve a similar problem with the PrincipalComponents function; this is a question about a different function.)










      share|improve this question









      $endgroup$




      Suppose I perform dimension reduction using PCA:



      dr = DimensionReduction[1, 2, 3, 2, 3, 5, 3, 5, 8, 4, 5, 
      8.5, Method -> "PrincipalComponentsAnalysis"]


      If I want to see the principal components themselves, in the original space, one thought is to use the "OriginalData" feature of the DimensionReducerFunction, on basis vectors in the new space:



      In[8]:= dr[1.0, 0.0, "OriginalData"]
      dr[0.0, 1.0, "OriginalData"]

      Out[8]= 1.86006, 2.9998, 4.81724

      Out[9]= 3.38701, 3.01026, 5.64163


      Is this a reasonable thing to do, or am I misinterpreting how the "OriginalData" feature works? And is there a better way to pull out the principal components themselves? People often want to visualize these for various reasons.



      (There are several other questions about how to solve a similar problem with the PrincipalComponents function; this is a question about a different function.)







      machine-learning dimension-reduction pca






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 3 hours ago









      Michael CurryMichael Curry

      774312




      774312




















          1 Answer
          1






          active

          oldest

          votes


















          2












          $begingroup$

          Here's your data:



          data = 1, 2, 3, 2, 3, 5, 3, 5, 8, 4, 5, 8.5;
          dr = DimensionReduction[data, Method -> "PrincipalComponentsAnalysis"];


          This is not exactly a top level solution, but we can pick apart the DimensionReducerFunction and see inside. In there we have a matrix:



          Transpose[dr[[1, "Model", "Matrix"]]]



          -0.572383, -0.577502, -0.582125, 0.793367, -0.56945, -0.215163



          I think these are the components. We can try to verify:



          Transpose[Last[SingularValueDecomposition[2.0/Sqrt[3] Standardize[data], 2]]]



          -0.572383, -0.577502, -0.582125, 0.793367, -0.56945, -0.215163



          (I think we need the 2.0/Sqrt[3] because DimensionReduction appears to use biased standard deviation whereas Standardize uses the unbiased form. I'm not sure though.)





          share









          $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%2f194324%2fpulling-the-principal-components-out-of-a-dimensionreducerfunction%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2












            $begingroup$

            Here's your data:



            data = 1, 2, 3, 2, 3, 5, 3, 5, 8, 4, 5, 8.5;
            dr = DimensionReduction[data, Method -> "PrincipalComponentsAnalysis"];


            This is not exactly a top level solution, but we can pick apart the DimensionReducerFunction and see inside. In there we have a matrix:



            Transpose[dr[[1, "Model", "Matrix"]]]



            -0.572383, -0.577502, -0.582125, 0.793367, -0.56945, -0.215163



            I think these are the components. We can try to verify:



            Transpose[Last[SingularValueDecomposition[2.0/Sqrt[3] Standardize[data], 2]]]



            -0.572383, -0.577502, -0.582125, 0.793367, -0.56945, -0.215163



            (I think we need the 2.0/Sqrt[3] because DimensionReduction appears to use biased standard deviation whereas Standardize uses the unbiased form. I'm not sure though.)





            share









            $endgroup$

















              2












              $begingroup$

              Here's your data:



              data = 1, 2, 3, 2, 3, 5, 3, 5, 8, 4, 5, 8.5;
              dr = DimensionReduction[data, Method -> "PrincipalComponentsAnalysis"];


              This is not exactly a top level solution, but we can pick apart the DimensionReducerFunction and see inside. In there we have a matrix:



              Transpose[dr[[1, "Model", "Matrix"]]]



              -0.572383, -0.577502, -0.582125, 0.793367, -0.56945, -0.215163



              I think these are the components. We can try to verify:



              Transpose[Last[SingularValueDecomposition[2.0/Sqrt[3] Standardize[data], 2]]]



              -0.572383, -0.577502, -0.582125, 0.793367, -0.56945, -0.215163



              (I think we need the 2.0/Sqrt[3] because DimensionReduction appears to use biased standard deviation whereas Standardize uses the unbiased form. I'm not sure though.)





              share









              $endgroup$















                2












                2








                2





                $begingroup$

                Here's your data:



                data = 1, 2, 3, 2, 3, 5, 3, 5, 8, 4, 5, 8.5;
                dr = DimensionReduction[data, Method -> "PrincipalComponentsAnalysis"];


                This is not exactly a top level solution, but we can pick apart the DimensionReducerFunction and see inside. In there we have a matrix:



                Transpose[dr[[1, "Model", "Matrix"]]]



                -0.572383, -0.577502, -0.582125, 0.793367, -0.56945, -0.215163



                I think these are the components. We can try to verify:



                Transpose[Last[SingularValueDecomposition[2.0/Sqrt[3] Standardize[data], 2]]]



                -0.572383, -0.577502, -0.582125, 0.793367, -0.56945, -0.215163



                (I think we need the 2.0/Sqrt[3] because DimensionReduction appears to use biased standard deviation whereas Standardize uses the unbiased form. I'm not sure though.)





                share









                $endgroup$



                Here's your data:



                data = 1, 2, 3, 2, 3, 5, 3, 5, 8, 4, 5, 8.5;
                dr = DimensionReduction[data, Method -> "PrincipalComponentsAnalysis"];


                This is not exactly a top level solution, but we can pick apart the DimensionReducerFunction and see inside. In there we have a matrix:



                Transpose[dr[[1, "Model", "Matrix"]]]



                -0.572383, -0.577502, -0.582125, 0.793367, -0.56945, -0.215163



                I think these are the components. We can try to verify:



                Transpose[Last[SingularValueDecomposition[2.0/Sqrt[3] Standardize[data], 2]]]



                -0.572383, -0.577502, -0.582125, 0.793367, -0.56945, -0.215163



                (I think we need the 2.0/Sqrt[3] because DimensionReduction appears to use biased standard deviation whereas Standardize uses the unbiased form. I'm not sure though.)






                share











                share


                share










                answered 1 hour ago









                Chip HurstChip Hurst

                22.8k15892




                22.8k15892



























                    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%2f194324%2fpulling-the-principal-components-out-of-a-dimensionreducerfunction%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

                    Era Viking Índice Início da Era Viquingue | Cotidiano | Sociedade | Língua | Religião | A arte | As primeiras cidades | As viagens dos viquingues | Viquingues do Oeste e Leste | Fim da Era Viquingue | Fontes históricas | Referências Bibliografia | Ligações externas | Menu de navegação«Sverige då!»«Handel I vikingetid»«O que é Nórdico Antigo»Mito, magia e religião na volsunga saga Um olhar sobre a trajetória mítica do herói sigurd«Bonden var den verklige vikingen»«Vikingatiden»«Vikingatiden»«Vinland»«Guerreiras de Óðinn: As Valkyrjor na Mitologia Viking»1519-9053«Esculpindo símbolos e seres: A arte viking em pedras rúnicas»1679-9313Historia - Tema: VikingarnaAventura e Magia no Mundo das Sagas IslandesasEra Vikinge

                    What's the metal clinking sound at the end of credits in Avengers: Endgame?What makes Thanos so strong in Avengers: Endgame?Who is the character that appears at the end of Endgame?What happens to Mjolnir (Thor's hammer) at the end of Endgame?The People's Ages in Avengers: EndgameWhat did Nebula do in Avengers: Endgame?Messing with time in the Avengers: Endgame climaxAvengers: Endgame timelineWhat are the time-travel rules in Avengers Endgame?Why use this song in Avengers: Endgame Opening Logo Sequence?Peggy's age in Avengers Endgame

                    Are there legal definitions of ethnicities/races? The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Legal definitions in the United StatesAre there truly legal limits on US interest rates?Are gender identity and sexual orientation federally protected?Why is there an apparent legal bias against digital services?What limits are there to the powers of individual judges in the United States legal system?Are women only scholarships legal under Irish / EU law?Is the term “race” defined by Public Law enacted by Congress of the United StatesIs there a legal definition of race in the US?Neighbors are spying for landlord on Renters is it legal?Are Protected Classes Bi-directional?