Using Predefined Splits in PCR function R PLS packageGrouping functions (tapply, by, aggregate) and the *apply family100% accuracy from libsvmCompute Random Forest with a leave one ID out cross validationGrouping rows from an R dataframe together when randomly assigning to training/testing datasetsHow to apply classifier from one set to another in weka & graph training/testing errornumpy: How can I select specific indexes in an np array for k-fold cross validation?Splitting multi-tier data into 5 folds using pythonsklearn Group K-fold and groups parameters in other cross-validators similarityUsing Scikit-Learn GridSearchCV for cross validation with PredefinedSplit - Suspiciously good cross validation resultsUse train package for cross validation taking forever in R

Filling a listlineplot with a texture

How can I unambiguously ask for a new user's "Display Name"?

If someone uses the Command spell and says "drop", what happens?

Does obstensible/specious make sense in this sentence?

Immediate Smaller Element Time Limit Exceeded

Duplicate instruments in unison in an orchestra

Need to number each equation in an optimization problem

What is the difference between "Grippe" and "Männergrippe"?

Does this VCO produce a sine wave or square wave

Removal of て in Japanese novels

Read file lines into shell line separated by space

Where does learning new skills fit into Agile?

Are the players on the same team as the DM?

Why is there a difference between predicting on Validation set and Test set?

Can a giant mushroom be used as a material to build watercraft or sailing ships?

Athens airport 1-hour connection at normal walking speed

What is a natural problem in theory of computation?

What does "rel" in `mathrel` and `stackrel` stands for?

If an earthquake can destroy buildings why it cant kill us according to physics?

How do proponents of Sola Scriptura address the ministry of those Apostles who authored no parts of Scripture?

moon structure ownership

How do I prevent other wifi networks from showing up on my computer?

"Opusculum hoc, quamdiu vixero, doctioribus emendandum offero."?

Could George I (of Great Britain) speak English?



Using Predefined Splits in PCR function R PLS package


Grouping functions (tapply, by, aggregate) and the *apply family100% accuracy from libsvmCompute Random Forest with a leave one ID out cross validationGrouping rows from an R dataframe together when randomly assigning to training/testing datasetsHow to apply classifier from one set to another in weka & graph training/testing errornumpy: How can I select specific indexes in an np array for k-fold cross validation?Splitting multi-tier data into 5 folds using pythonsklearn Group K-fold and groups parameters in other cross-validators similarityUsing Scikit-Learn GridSearchCV for cross validation with PredefinedSplit - Suspiciously good cross validation resultsUse train package for cross validation taking forever in R






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















In order to to ensure a good population representation I have created custom validation sets from my training data. However, I am not sure how I interface this in PCR in R



I have tried to add a list in the segments argument with each index similar to what you do in python predefined splits cv iterator, which runs but takes forever. So I feel I must be making an error somewhere



 pcr(y~X,scale=FALSE,data=tdata,validation="CV",segments=test_fold)


where test fold is a list containing the validation set which belongs in the index



For example if the training data is composed on 9 samples and I want to use the first three as the first validation set on son



test_fold<-c(1,1,1,2,2,2,3,3,3) 


This runs but it is very slow where if I do regular "CV" it runs in minutes. So far the results look okay but I have a over a thousand runs I need to do and it took 1 hr to get through one. So if anybody knows how I can speed this up I would be grateful.










share|improve this question






























    0















    In order to to ensure a good population representation I have created custom validation sets from my training data. However, I am not sure how I interface this in PCR in R



    I have tried to add a list in the segments argument with each index similar to what you do in python predefined splits cv iterator, which runs but takes forever. So I feel I must be making an error somewhere



     pcr(y~X,scale=FALSE,data=tdata,validation="CV",segments=test_fold)


    where test fold is a list containing the validation set which belongs in the index



    For example if the training data is composed on 9 samples and I want to use the first three as the first validation set on son



    test_fold<-c(1,1,1,2,2,2,3,3,3) 


    This runs but it is very slow where if I do regular "CV" it runs in minutes. So far the results look okay but I have a over a thousand runs I need to do and it took 1 hr to get through one. So if anybody knows how I can speed this up I would be grateful.










    share|improve this question


























      0












      0








      0








      In order to to ensure a good population representation I have created custom validation sets from my training data. However, I am not sure how I interface this in PCR in R



      I have tried to add a list in the segments argument with each index similar to what you do in python predefined splits cv iterator, which runs but takes forever. So I feel I must be making an error somewhere



       pcr(y~X,scale=FALSE,data=tdata,validation="CV",segments=test_fold)


      where test fold is a list containing the validation set which belongs in the index



      For example if the training data is composed on 9 samples and I want to use the first three as the first validation set on son



      test_fold<-c(1,1,1,2,2,2,3,3,3) 


      This runs but it is very slow where if I do regular "CV" it runs in minutes. So far the results look okay but I have a over a thousand runs I need to do and it took 1 hr to get through one. So if anybody knows how I can speed this up I would be grateful.










      share|improve this question














      In order to to ensure a good population representation I have created custom validation sets from my training data. However, I am not sure how I interface this in PCR in R



      I have tried to add a list in the segments argument with each index similar to what you do in python predefined splits cv iterator, which runs but takes forever. So I feel I must be making an error somewhere



       pcr(y~X,scale=FALSE,data=tdata,validation="CV",segments=test_fold)


      where test fold is a list containing the validation set which belongs in the index



      For example if the training data is composed on 9 samples and I want to use the first three as the first validation set on son



      test_fold<-c(1,1,1,2,2,2,3,3,3) 


      This runs but it is very slow where if I do regular "CV" it runs in minutes. So far the results look okay but I have a over a thousand runs I need to do and it took 1 hr to get through one. So if anybody knows how I can speed this up I would be grateful.







      r cross-validation pls






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 27 at 18:54









      Joshua MannheimerJoshua Mannheimer

      561 silver badge9 bronze badges




      561 silver badge9 bronze badges

























          1 Answer
          1






          active

          oldest

          votes


















          0















          So the segments parameters needs to be a list of multiple vectors. So going again with 9 samples if I want the first three to be in the first validation set, the next three in the second validation set and so on it should be



          test_vec<-list(c(1,2,3),c(4,5,6),c(7,8,9)) 





          share|improve this answer
























            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            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: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            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%2fstackoverflow.com%2fquestions%2f55384592%2fusing-predefined-splits-in-pcr-function-r-pls-package%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









            0















            So the segments parameters needs to be a list of multiple vectors. So going again with 9 samples if I want the first three to be in the first validation set, the next three in the second validation set and so on it should be



            test_vec<-list(c(1,2,3),c(4,5,6),c(7,8,9)) 





            share|improve this answer





























              0















              So the segments parameters needs to be a list of multiple vectors. So going again with 9 samples if I want the first three to be in the first validation set, the next three in the second validation set and so on it should be



              test_vec<-list(c(1,2,3),c(4,5,6),c(7,8,9)) 





              share|improve this answer



























                0














                0










                0









                So the segments parameters needs to be a list of multiple vectors. So going again with 9 samples if I want the first three to be in the first validation set, the next three in the second validation set and so on it should be



                test_vec<-list(c(1,2,3),c(4,5,6),c(7,8,9)) 





                share|improve this answer













                So the segments parameters needs to be a list of multiple vectors. So going again with 9 samples if I want the first three to be in the first validation set, the next three in the second validation set and so on it should be



                test_vec<-list(c(1,2,3),c(4,5,6),c(7,8,9)) 






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 27 at 20:39









                Joshua MannheimerJoshua Mannheimer

                561 silver badge9 bronze badges




                561 silver badge9 bronze badges





















                    Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







                    Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


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

                    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%2fstackoverflow.com%2fquestions%2f55384592%2fusing-predefined-splits-in-pcr-function-r-pls-package%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

                    SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                    용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

                    155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해