Machine learning with sklearn vs. scipy stats 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) 2019 Moderator Election Q&A - Questionnaire 2019 Community Moderator Election ResultsLinearly increasing data with manual resetAWS machine learning prediction schema problemsTo learn machine learning which one is good?Could not convert string to float error on KDDCup99 datasetSklearn regression problemHow can I know how to interpret the output coefficients (`coefs_`) from the model sklearn.svm.LinearSVC()?Elastic Regression fitting good mean and bad varianceHow does scikit-learn decision function method work?Machine learning - 'train_test_split' function in scikit-learn: should I repeat it several times?Single machine learning algorithm for multiple classes of data : One hot encoder

The variadic template constructor of my class cannot modify my class members, why is that so?

Keeping a retro style to sci-fi spaceships?

Finding the path in a graph from A to B then back to A with a minimum of shared edges

Difference between "generating set" and free product?

Hopping to infinity along a string of digits

Why did all the guest students take carriages to the Yule Ball?

Can withdrawing asylum be illegal?

What was the last x86 CPU that did not have the x87 floating-point unit built in?

First use of “packing” as in carrying a gun

Why can't wing-mounted spoilers be used to steepen approaches?

He got a vote 80% that of Emmanuel Macron’s

Arduino Pro Micro - switch off LEDs

Mortgage adviser recommends a longer term than necessary combined with overpayments

Does Parliament hold absolute power in the UK?

What are these Gizmos at Izaña Atmospheric Research Center in Spain?

Scientific Reports - Significant Figures

Can the DM override racial traits?

How to pronounce 1ターン?

Why is superheterodyning better than direct conversion?

How to delete random line from file using Unix command?

how can a perfect fourth interval be considered either consonant or dissonant?

Match Roman Numerals

Does the AirPods case need to be around while listening via an iOS Device?

What can I do if neighbor is blocking my solar panels intentionally?



Machine learning with sklearn vs. scipy stats



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)
2019 Moderator Election Q&A - Questionnaire
2019 Community Moderator Election ResultsLinearly increasing data with manual resetAWS machine learning prediction schema problemsTo learn machine learning which one is good?Could not convert string to float error on KDDCup99 datasetSklearn regression problemHow can I know how to interpret the output coefficients (`coefs_`) from the model sklearn.svm.LinearSVC()?Elastic Regression fitting good mean and bad varianceHow does scikit-learn decision function method work?Machine learning - 'train_test_split' function in scikit-learn: should I repeat it several times?Single machine learning algorithm for multiple classes of data : One hot encoder










0












$begingroup$


I've created 50 random x and y points (with slope of y = 2x-1).



First, I used Linear Regression from sklearn to fit the model onto my dataset where I got a slope of 2.0066... and intercept of -0.535...



My Question: is fitting the model to our dataset considered training? For each given x value, since it has a y-value (supervised), does our machine go through each x,y match and create line of best fit based upon that? Thus, is our model trained?



Second, I used stats.linregress(x,y) from scipy to get slope and intercept (which seem really close if not the same to the slope and intercept I've got from using sklearn Linear Regression).



My Question: If both methods give the same result, why not just use scipy to get formula for the best fit line to make predictions? What is the benefit of using machine learning?










share|improve this question











$endgroup$
















    0












    $begingroup$


    I've created 50 random x and y points (with slope of y = 2x-1).



    First, I used Linear Regression from sklearn to fit the model onto my dataset where I got a slope of 2.0066... and intercept of -0.535...



    My Question: is fitting the model to our dataset considered training? For each given x value, since it has a y-value (supervised), does our machine go through each x,y match and create line of best fit based upon that? Thus, is our model trained?



    Second, I used stats.linregress(x,y) from scipy to get slope and intercept (which seem really close if not the same to the slope and intercept I've got from using sklearn Linear Regression).



    My Question: If both methods give the same result, why not just use scipy to get formula for the best fit line to make predictions? What is the benefit of using machine learning?










    share|improve this question











    $endgroup$














      0












      0








      0





      $begingroup$


      I've created 50 random x and y points (with slope of y = 2x-1).



      First, I used Linear Regression from sklearn to fit the model onto my dataset where I got a slope of 2.0066... and intercept of -0.535...



      My Question: is fitting the model to our dataset considered training? For each given x value, since it has a y-value (supervised), does our machine go through each x,y match and create line of best fit based upon that? Thus, is our model trained?



      Second, I used stats.linregress(x,y) from scipy to get slope and intercept (which seem really close if not the same to the slope and intercept I've got from using sklearn Linear Regression).



      My Question: If both methods give the same result, why not just use scipy to get formula for the best fit line to make predictions? What is the benefit of using machine learning?










      share|improve this question











      $endgroup$




      I've created 50 random x and y points (with slope of y = 2x-1).



      First, I used Linear Regression from sklearn to fit the model onto my dataset where I got a slope of 2.0066... and intercept of -0.535...



      My Question: is fitting the model to our dataset considered training? For each given x value, since it has a y-value (supervised), does our machine go through each x,y match and create line of best fit based upon that? Thus, is our model trained?



      Second, I used stats.linregress(x,y) from scipy to get slope and intercept (which seem really close if not the same to the slope and intercept I've got from using sklearn Linear Regression).



      My Question: If both methods give the same result, why not just use scipy to get formula for the best fit line to make predictions? What is the benefit of using machine learning?







      machine-learning python scikit-learn numpy scipy






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 1 at 3:14









      Ethan

      697625




      697625










      asked Mar 31 at 18:25









      h_muskh_musk

      1




      1




















          1 Answer
          1






          active

          oldest

          votes


















          1












          $begingroup$

          1. Yes fitting the data and finding the best fitting line is called training the model.

          2. If you look at the source code of scikit-learn linear regression you can find the its using scipy linalg.lstsq module for finding the coefficients and intercept (most cases). See the source code for more details . Machine learning is fancy word for Application of mathematics (on data mostly) using computers (machines)





          share|improve this answer











          $endgroup$













            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "557"
            ;
            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%2fdatascience.stackexchange.com%2fquestions%2f48308%2fmachine-learning-with-sklearn-vs-scipy-stats%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









            1












            $begingroup$

            1. Yes fitting the data and finding the best fitting line is called training the model.

            2. If you look at the source code of scikit-learn linear regression you can find the its using scipy linalg.lstsq module for finding the coefficients and intercept (most cases). See the source code for more details . Machine learning is fancy word for Application of mathematics (on data mostly) using computers (machines)





            share|improve this answer











            $endgroup$

















              1












              $begingroup$

              1. Yes fitting the data and finding the best fitting line is called training the model.

              2. If you look at the source code of scikit-learn linear regression you can find the its using scipy linalg.lstsq module for finding the coefficients and intercept (most cases). See the source code for more details . Machine learning is fancy word for Application of mathematics (on data mostly) using computers (machines)





              share|improve this answer











              $endgroup$















                1












                1








                1





                $begingroup$

                1. Yes fitting the data and finding the best fitting line is called training the model.

                2. If you look at the source code of scikit-learn linear regression you can find the its using scipy linalg.lstsq module for finding the coefficients and intercept (most cases). See the source code for more details . Machine learning is fancy word for Application of mathematics (on data mostly) using computers (machines)





                share|improve this answer











                $endgroup$



                1. Yes fitting the data and finding the best fitting line is called training the model.

                2. If you look at the source code of scikit-learn linear regression you can find the its using scipy linalg.lstsq module for finding the coefficients and intercept (most cases). See the source code for more details . Machine learning is fancy word for Application of mathematics (on data mostly) using computers (machines)






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Mar 31 at 19:43

























                answered Mar 31 at 19:38









                tamtam

                1014




                1014



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Data Science 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%2fdatascience.stackexchange.com%2fquestions%2f48308%2fmachine-learning-with-sklearn-vs-scipy-stats%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

                    Adding axes to figuresAdding axes labels to LaTeX figuresLaTeX equivalent of ConTeXt buffersRotate a node but not its content: the case of the ellipse decorationHow to define the default vertical distance between nodes?TikZ scaling graphic and adjust node position and keep font sizeNumerical conditional within tikz keys?adding axes to shapesAlign axes across subfiguresAdding figures with a certain orderLine up nested tikz enviroments or how to get rid of themAdding axes labels to LaTeX figures

                    Tähtien Talli Jäsenet | Lähteet | NavigointivalikkoSuomen Hippos – Tähtien Talli

                    Do these cracks on my tires look bad? The Next CEO of Stack OverflowDry rot tire should I replace?Having to replace tiresFishtailed so easily? Bad tires? ABS?Filling the tires with something other than air, to avoid puncture hassles?Used Michelin tires safe to install?Do these tyre cracks necessitate replacement?Rumbling noise: tires or mechanicalIs it possible to fix noisy feathered tires?Are bad winter tires still better than summer tires in winter?Torque converter failure - Related to replacing only 2 tires?Why use snow tires on all 4 wheels on 2-wheel-drive cars?