Enabling unattended-upgrades from a shell scriptI accidentally deleted /etc/apt/apt.conf.d/20auto-upgradesHow can I stop unattended-upgrades from rebooting the machine?Why is unattended-upgrades activated by default?Unattended upgradesProgrammatically check unattended upgrades result

Undesired blank space between some words

Why aren't we seeing carbon taxes in practice?

Is there a word/short phrase for "the most" of something (not necessarily the majority)?

Why is 1>a.txt 2>&1 different from 1>a.txt 2>a.txt ? (Example shown)

How to get a bowl with one liter of water

Who started calling the matrix multiplication "multiplication"?

Why does China have so few nuclear weapons?

How to join many tables side by side?

Is this a valid use of Deflect Missiles according to RAW?

Berlin 1923 & 1925 Address Book Abbreviations "I", "E", "Kgst" and "Mb"

Declining a paper review after accepting it and seeing the manuscript

one list minus another

Is harmlessly appearing to be a school bus driver a crime?

Pass on your radiation

Would a uranium 235 fuel pellet the size of Earth explode?

Could the barycenter orbit of our sun be greatly underestimated?

What's the current status of the Vehicle Routing Problem in the logistics industry?

Is a datagram from an upper network layer converted 1:1 to one of the lower layer?

DIY inkjet transparency film or photopaper

What Lego set has the biggest box?

Short story: Man gains X-ray vision, cheats at cards, sees a clot in his blood

Shp is not valid or recognized data source using QGIS

Which seat 'predicts' the outcomes of UK General Elections the best?

What's the greatest number of hands I can have to annoy my mother-in-law with?



Enabling unattended-upgrades from a shell script


I accidentally deleted /etc/apt/apt.conf.d/20auto-upgradesHow can I stop unattended-upgrades from rebooting the machine?Why is unattended-upgrades activated by default?Unattended upgradesProgrammatically check unattended upgrades result






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









17


















I have a shell script to automatically configure new Ubuntu virtual machines for my purposes. I would like this script to install and enable unattended-upgrades, but I cannot figure out how to do so without user interaction.



The usual way to enable upgrades is dpkg-reconfigure unattended-upgrades, but of course that is interactive. The noninteractive front end avoids asking any questions at all, and the text front end seems bound and determined to do its I/O with the tty and not with stdin/stdout.










share|improve this question




















  • 1





    I've not used this tool before, but it looks like enabling it writes a 1 to the two lines in the file /etc/apt/apt.conf.d/20auto-upgrades. If you manually write that file will it work?

    – mfisch
    Nov 17 '12 at 3:43

















17


















I have a shell script to automatically configure new Ubuntu virtual machines for my purposes. I would like this script to install and enable unattended-upgrades, but I cannot figure out how to do so without user interaction.



The usual way to enable upgrades is dpkg-reconfigure unattended-upgrades, but of course that is interactive. The noninteractive front end avoids asking any questions at all, and the text front end seems bound and determined to do its I/O with the tty and not with stdin/stdout.










share|improve this question




















  • 1





    I've not used this tool before, but it looks like enabling it writes a 1 to the two lines in the file /etc/apt/apt.conf.d/20auto-upgrades. If you manually write that file will it work?

    – mfisch
    Nov 17 '12 at 3:43













17













17









17


2






I have a shell script to automatically configure new Ubuntu virtual machines for my purposes. I would like this script to install and enable unattended-upgrades, but I cannot figure out how to do so without user interaction.



The usual way to enable upgrades is dpkg-reconfigure unattended-upgrades, but of course that is interactive. The noninteractive front end avoids asking any questions at all, and the text front end seems bound and determined to do its I/O with the tty and not with stdin/stdout.










share|improve this question














I have a shell script to automatically configure new Ubuntu virtual machines for my purposes. I would like this script to install and enable unattended-upgrades, but I cannot figure out how to do so without user interaction.



The usual way to enable upgrades is dpkg-reconfigure unattended-upgrades, but of course that is interactive. The noninteractive front end avoids asking any questions at all, and the text front end seems bound and determined to do its I/O with the tty and not with stdin/stdout.







server upgrade scripts dpkg






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Oct 20 '12 at 4:24









Grant WatsonGrant Watson

1711 silver badge4 bronze badges




1711 silver badge4 bronze badges










  • 1





    I've not used this tool before, but it looks like enabling it writes a 1 to the two lines in the file /etc/apt/apt.conf.d/20auto-upgrades. If you manually write that file will it work?

    – mfisch
    Nov 17 '12 at 3:43












  • 1





    I've not used this tool before, but it looks like enabling it writes a 1 to the two lines in the file /etc/apt/apt.conf.d/20auto-upgrades. If you manually write that file will it work?

    – mfisch
    Nov 17 '12 at 3:43







1




1





I've not used this tool before, but it looks like enabling it writes a 1 to the two lines in the file /etc/apt/apt.conf.d/20auto-upgrades. If you manually write that file will it work?

– mfisch
Nov 17 '12 at 3:43





I've not used this tool before, but it looks like enabling it writes a 1 to the two lines in the file /etc/apt/apt.conf.d/20auto-upgrades. If you manually write that file will it work?

– mfisch
Nov 17 '12 at 3:43










5 Answers
5






active

oldest

votes


















20







+50












Just make a copy of /etc/apt/apt.conf.d/20auto-upgrades after configuring it the way you like, and drop that into place on your target machine. You could embed it in your script, or you could rsync or wget it in from a server, or whatever.



So basically your script might do something like this:



apt-get install unattended-upgrades
wget -O /etc/apt/apt.conf.d/20auto-upgrades http://myserver.mytld/confs/20auto-upgrades
/etc/init.d/unattended-upgrades restart


There's really no reason to monkey with the dpkg-reconfigure script at all.



If you don't want to fetch the conf file from a remote server, it's VERY very short and simple - the default version, which fetches and installs security updates only, looks like this:



APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";


So you can just echo those lines into the config file directly with the following:



echo -e "APT::Periodic::Update-Package-Lists "1";nAPT::Periodic::Unattended-Upgrade "1";n" > /etc/apt/apt.conf.d/20auto-upgrades





share|improve this answer


































    1



















    If you want to use dpkg-reconfigure, you can set the value with "debconf-set-selections", and then reconfigure it in a noninteractive way.



    echo "unattended-upgrades unattended-upgrades/enable_auto_updates boolean true" | debconf-set-selections; dpkg-reconfigure -f noninteractive unattended-upgrades





    share|improve this answer
































      0



















      You have to use sudo to echo into /etc/apt/apt.conf.d/20auto-upgrades



      if [[ ! -f /etc/apt/apt.conf.d/20auto-upgrades.bak ]]; then
      sudo cp /etc/apt/apt.conf.d/20auto-upgrades /etc/apt/apt.conf.d/20auto-upgrades.bak
      sudo rm /etc/apt/apt.conf.d/20auto-upgrades
      echo "APT::Periodic::Update-Package-Lists "1";
      APT::Periodic::Download-Upgradeable-Packages "1";
      APT::Periodic::AutocleanInterval "30";
      APT::Periodic::Unattended-Upgrade "1";" | sudo tee --append /etc/apt/apt.conf.d/20auto-upgrades
      fi





      share|improve this answer
































        0



















        dpkg-reconfigure -f noninteractive unattended-upgrades





        share|improve this answer
































          0



















          I would suggest to insert configuration parameters to configure unattended-upgrades.



          sudo touch /etc/apt/apt.conf.d/20auto-upgrades

          echo "APT::Periodic::Update-Package-Lists "1"" >> /etc/apt/apt.conf.d/20auto-upgrades

          echo "APT::Periodic::Unattended-Upgrade "1" " >> /etc/apt/apt.conf.d/20auto-upgrades


          Same way you can configure/add parameters according to your requirement in conf file /etc/apt/apt.conf.d/50unattended-upgrades.



          Don't forget to restart service to apply changes.



          /etc/init.d/unattended-upgrades restart





          share|improve this answer




























            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "89"
            ;
            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/4.0/"u003ecc by-sa 4.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%2faskubuntu.com%2fquestions%2f203337%2fenabling-unattended-upgrades-from-a-shell-script%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown


























            5 Answers
            5






            active

            oldest

            votes








            5 Answers
            5






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            20







            +50












            Just make a copy of /etc/apt/apt.conf.d/20auto-upgrades after configuring it the way you like, and drop that into place on your target machine. You could embed it in your script, or you could rsync or wget it in from a server, or whatever.



            So basically your script might do something like this:



            apt-get install unattended-upgrades
            wget -O /etc/apt/apt.conf.d/20auto-upgrades http://myserver.mytld/confs/20auto-upgrades
            /etc/init.d/unattended-upgrades restart


            There's really no reason to monkey with the dpkg-reconfigure script at all.



            If you don't want to fetch the conf file from a remote server, it's VERY very short and simple - the default version, which fetches and installs security updates only, looks like this:



            APT::Periodic::Update-Package-Lists "1";
            APT::Periodic::Unattended-Upgrade "1";


            So you can just echo those lines into the config file directly with the following:



            echo -e "APT::Periodic::Update-Package-Lists "1";nAPT::Periodic::Unattended-Upgrade "1";n" > /etc/apt/apt.conf.d/20auto-upgrades





            share|improve this answer































              20







              +50












              Just make a copy of /etc/apt/apt.conf.d/20auto-upgrades after configuring it the way you like, and drop that into place on your target machine. You could embed it in your script, or you could rsync or wget it in from a server, or whatever.



              So basically your script might do something like this:



              apt-get install unattended-upgrades
              wget -O /etc/apt/apt.conf.d/20auto-upgrades http://myserver.mytld/confs/20auto-upgrades
              /etc/init.d/unattended-upgrades restart


              There's really no reason to monkey with the dpkg-reconfigure script at all.



              If you don't want to fetch the conf file from a remote server, it's VERY very short and simple - the default version, which fetches and installs security updates only, looks like this:



              APT::Periodic::Update-Package-Lists "1";
              APT::Periodic::Unattended-Upgrade "1";


              So you can just echo those lines into the config file directly with the following:



              echo -e "APT::Periodic::Update-Package-Lists "1";nAPT::Periodic::Unattended-Upgrade "1";n" > /etc/apt/apt.conf.d/20auto-upgrades





              share|improve this answer





























                20







                +50








                20







                +50




                20






                +50





                Just make a copy of /etc/apt/apt.conf.d/20auto-upgrades after configuring it the way you like, and drop that into place on your target machine. You could embed it in your script, or you could rsync or wget it in from a server, or whatever.



                So basically your script might do something like this:



                apt-get install unattended-upgrades
                wget -O /etc/apt/apt.conf.d/20auto-upgrades http://myserver.mytld/confs/20auto-upgrades
                /etc/init.d/unattended-upgrades restart


                There's really no reason to monkey with the dpkg-reconfigure script at all.



                If you don't want to fetch the conf file from a remote server, it's VERY very short and simple - the default version, which fetches and installs security updates only, looks like this:



                APT::Periodic::Update-Package-Lists "1";
                APT::Periodic::Unattended-Upgrade "1";


                So you can just echo those lines into the config file directly with the following:



                echo -e "APT::Periodic::Update-Package-Lists "1";nAPT::Periodic::Unattended-Upgrade "1";n" > /etc/apt/apt.conf.d/20auto-upgrades





                share|improve this answer
















                Just make a copy of /etc/apt/apt.conf.d/20auto-upgrades after configuring it the way you like, and drop that into place on your target machine. You could embed it in your script, or you could rsync or wget it in from a server, or whatever.



                So basically your script might do something like this:



                apt-get install unattended-upgrades
                wget -O /etc/apt/apt.conf.d/20auto-upgrades http://myserver.mytld/confs/20auto-upgrades
                /etc/init.d/unattended-upgrades restart


                There's really no reason to monkey with the dpkg-reconfigure script at all.



                If you don't want to fetch the conf file from a remote server, it's VERY very short and simple - the default version, which fetches and installs security updates only, looks like this:



                APT::Periodic::Update-Package-Lists "1";
                APT::Periodic::Unattended-Upgrade "1";


                So you can just echo those lines into the config file directly with the following:



                echo -e "APT::Periodic::Update-Package-Lists "1";nAPT::Periodic::Unattended-Upgrade "1";n" > /etc/apt/apt.conf.d/20auto-upgrades






                share|improve this answer















                share|improve this answer




                share|improve this answer








                edited Feb 23 '15 at 21:32









                Matthew Cordaro

                4915 silver badges9 bronze badges




                4915 silver badges9 bronze badges










                answered Nov 18 '12 at 21:37









                Jim SalterJim Salter

                4,0151 gold badge12 silver badges33 bronze badges




                4,0151 gold badge12 silver badges33 bronze badges


























                    1



















                    If you want to use dpkg-reconfigure, you can set the value with "debconf-set-selections", and then reconfigure it in a noninteractive way.



                    echo "unattended-upgrades unattended-upgrades/enable_auto_updates boolean true" | debconf-set-selections; dpkg-reconfigure -f noninteractive unattended-upgrades





                    share|improve this answer





























                      1



















                      If you want to use dpkg-reconfigure, you can set the value with "debconf-set-selections", and then reconfigure it in a noninteractive way.



                      echo "unattended-upgrades unattended-upgrades/enable_auto_updates boolean true" | debconf-set-selections; dpkg-reconfigure -f noninteractive unattended-upgrades





                      share|improve this answer



























                        1















                        1











                        1









                        If you want to use dpkg-reconfigure, you can set the value with "debconf-set-selections", and then reconfigure it in a noninteractive way.



                        echo "unattended-upgrades unattended-upgrades/enable_auto_updates boolean true" | debconf-set-selections; dpkg-reconfigure -f noninteractive unattended-upgrades





                        share|improve this answer














                        If you want to use dpkg-reconfigure, you can set the value with "debconf-set-selections", and then reconfigure it in a noninteractive way.



                        echo "unattended-upgrades unattended-upgrades/enable_auto_updates boolean true" | debconf-set-selections; dpkg-reconfigure -f noninteractive unattended-upgrades






                        share|improve this answer













                        share|improve this answer




                        share|improve this answer










                        answered Jan 25 '16 at 12:25









                        user497484user497484

                        112 bronze badges




                        112 bronze badges
























                            0



















                            You have to use sudo to echo into /etc/apt/apt.conf.d/20auto-upgrades



                            if [[ ! -f /etc/apt/apt.conf.d/20auto-upgrades.bak ]]; then
                            sudo cp /etc/apt/apt.conf.d/20auto-upgrades /etc/apt/apt.conf.d/20auto-upgrades.bak
                            sudo rm /etc/apt/apt.conf.d/20auto-upgrades
                            echo "APT::Periodic::Update-Package-Lists "1";
                            APT::Periodic::Download-Upgradeable-Packages "1";
                            APT::Periodic::AutocleanInterval "30";
                            APT::Periodic::Unattended-Upgrade "1";" | sudo tee --append /etc/apt/apt.conf.d/20auto-upgrades
                            fi





                            share|improve this answer





























                              0



















                              You have to use sudo to echo into /etc/apt/apt.conf.d/20auto-upgrades



                              if [[ ! -f /etc/apt/apt.conf.d/20auto-upgrades.bak ]]; then
                              sudo cp /etc/apt/apt.conf.d/20auto-upgrades /etc/apt/apt.conf.d/20auto-upgrades.bak
                              sudo rm /etc/apt/apt.conf.d/20auto-upgrades
                              echo "APT::Periodic::Update-Package-Lists "1";
                              APT::Periodic::Download-Upgradeable-Packages "1";
                              APT::Periodic::AutocleanInterval "30";
                              APT::Periodic::Unattended-Upgrade "1";" | sudo tee --append /etc/apt/apt.conf.d/20auto-upgrades
                              fi





                              share|improve this answer



























                                0















                                0











                                0









                                You have to use sudo to echo into /etc/apt/apt.conf.d/20auto-upgrades



                                if [[ ! -f /etc/apt/apt.conf.d/20auto-upgrades.bak ]]; then
                                sudo cp /etc/apt/apt.conf.d/20auto-upgrades /etc/apt/apt.conf.d/20auto-upgrades.bak
                                sudo rm /etc/apt/apt.conf.d/20auto-upgrades
                                echo "APT::Periodic::Update-Package-Lists "1";
                                APT::Periodic::Download-Upgradeable-Packages "1";
                                APT::Periodic::AutocleanInterval "30";
                                APT::Periodic::Unattended-Upgrade "1";" | sudo tee --append /etc/apt/apt.conf.d/20auto-upgrades
                                fi





                                share|improve this answer














                                You have to use sudo to echo into /etc/apt/apt.conf.d/20auto-upgrades



                                if [[ ! -f /etc/apt/apt.conf.d/20auto-upgrades.bak ]]; then
                                sudo cp /etc/apt/apt.conf.d/20auto-upgrades /etc/apt/apt.conf.d/20auto-upgrades.bak
                                sudo rm /etc/apt/apt.conf.d/20auto-upgrades
                                echo "APT::Periodic::Update-Package-Lists "1";
                                APT::Periodic::Download-Upgradeable-Packages "1";
                                APT::Periodic::AutocleanInterval "30";
                                APT::Periodic::Unattended-Upgrade "1";" | sudo tee --append /etc/apt/apt.conf.d/20auto-upgrades
                                fi






                                share|improve this answer













                                share|improve this answer




                                share|improve this answer










                                answered Apr 12 '17 at 8:14









                                ArturoArturo

                                2892 silver badges13 bronze badges




                                2892 silver badges13 bronze badges
























                                    0



















                                    dpkg-reconfigure -f noninteractive unattended-upgrades





                                    share|improve this answer





























                                      0



















                                      dpkg-reconfigure -f noninteractive unattended-upgrades





                                      share|improve this answer



























                                        0















                                        0











                                        0









                                        dpkg-reconfigure -f noninteractive unattended-upgrades





                                        share|improve this answer














                                        dpkg-reconfigure -f noninteractive unattended-upgrades






                                        share|improve this answer













                                        share|improve this answer




                                        share|improve this answer










                                        answered Oct 1 at 9:03









                                        aexlaexl

                                        1031 silver badge4 bronze badges




                                        1031 silver badge4 bronze badges
























                                            0



















                                            I would suggest to insert configuration parameters to configure unattended-upgrades.



                                            sudo touch /etc/apt/apt.conf.d/20auto-upgrades

                                            echo "APT::Periodic::Update-Package-Lists "1"" >> /etc/apt/apt.conf.d/20auto-upgrades

                                            echo "APT::Periodic::Unattended-Upgrade "1" " >> /etc/apt/apt.conf.d/20auto-upgrades


                                            Same way you can configure/add parameters according to your requirement in conf file /etc/apt/apt.conf.d/50unattended-upgrades.



                                            Don't forget to restart service to apply changes.



                                            /etc/init.d/unattended-upgrades restart





                                            share|improve this answer































                                              0



















                                              I would suggest to insert configuration parameters to configure unattended-upgrades.



                                              sudo touch /etc/apt/apt.conf.d/20auto-upgrades

                                              echo "APT::Periodic::Update-Package-Lists "1"" >> /etc/apt/apt.conf.d/20auto-upgrades

                                              echo "APT::Periodic::Unattended-Upgrade "1" " >> /etc/apt/apt.conf.d/20auto-upgrades


                                              Same way you can configure/add parameters according to your requirement in conf file /etc/apt/apt.conf.d/50unattended-upgrades.



                                              Don't forget to restart service to apply changes.



                                              /etc/init.d/unattended-upgrades restart





                                              share|improve this answer





























                                                0















                                                0











                                                0









                                                I would suggest to insert configuration parameters to configure unattended-upgrades.



                                                sudo touch /etc/apt/apt.conf.d/20auto-upgrades

                                                echo "APT::Periodic::Update-Package-Lists "1"" >> /etc/apt/apt.conf.d/20auto-upgrades

                                                echo "APT::Periodic::Unattended-Upgrade "1" " >> /etc/apt/apt.conf.d/20auto-upgrades


                                                Same way you can configure/add parameters according to your requirement in conf file /etc/apt/apt.conf.d/50unattended-upgrades.



                                                Don't forget to restart service to apply changes.



                                                /etc/init.d/unattended-upgrades restart





                                                share|improve this answer
















                                                I would suggest to insert configuration parameters to configure unattended-upgrades.



                                                sudo touch /etc/apt/apt.conf.d/20auto-upgrades

                                                echo "APT::Periodic::Update-Package-Lists "1"" >> /etc/apt/apt.conf.d/20auto-upgrades

                                                echo "APT::Periodic::Unattended-Upgrade "1" " >> /etc/apt/apt.conf.d/20auto-upgrades


                                                Same way you can configure/add parameters according to your requirement in conf file /etc/apt/apt.conf.d/50unattended-upgrades.



                                                Don't forget to restart service to apply changes.



                                                /etc/init.d/unattended-upgrades restart






                                                share|improve this answer















                                                share|improve this answer




                                                share|improve this answer








                                                edited Oct 1 at 10:58

























                                                answered Nov 17 '12 at 4:19









                                                Ketan PatelKetan Patel

                                                12.8k9 gold badges48 silver badges67 bronze badges




                                                12.8k9 gold badges48 silver badges67 bronze badges































                                                    draft saved

                                                    draft discarded















































                                                    Thanks for contributing an answer to Ask Ubuntu!


                                                    • 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%2faskubuntu.com%2fquestions%2f203337%2fenabling-unattended-upgrades-from-a-shell-script%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

                                                    Tamil (spriik) Luke uk diar | Nawigatjuun

                                                    Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

                                                    Training a classifier when some of the features are unknownWhy does Gradient Boosting regression predict negative values when there are no negative y-values in my training set?How to improve an existing (trained) classifier?What is effect when I set up some self defined predisctor variables?Why Matlab neural network classification returns decimal values on prediction dataset?Fitting and transforming text data in training, testing, and validation setsHow to quantify the performance of the classifier (multi-class SVM) using the test data?How do I control for some patients providing multiple samples in my training data?Training and Test setTraining a convolutional neural network for image denoising in MatlabShouldn't an autoencoder with #(neurons in hidden layer) = #(neurons in input layer) be “perfect”?