{"id":66,"date":"2022-05-26T16:24:04","date_gmt":"2022-05-26T20:24:04","guid":{"rendered":"https:\/\/pressbooks.bccampus.ca\/businessanalytics\/?post_type=chapter&#038;p=66"},"modified":"2023-06-20T18:37:53","modified_gmt":"2023-06-20T22:37:53","slug":"anaconda-and-jupyter-notebooks","status":"publish","type":"chapter","link":"https:\/\/pressbooks.bccampus.ca\/businessanalytics\/chapter\/anaconda-and-jupyter-notebooks\/","title":{"raw":"Anaconda and Jupyter Notebooks","rendered":"Anaconda and Jupyter Notebooks"},"content":{"raw":"<h1>Python!<\/h1>\r\nI'm a big fan of Python for Machine Learning, and Jupyter Notebooks as teaching tools.\u00a0 You can (and should) use the tools that work for you, but the following files are based on Jupyter Notebooks (.ipynb files).\u00a0 Some of these files are included, or you can copy\/paste code into your notebook.\r\n<ul>\r\n \t<li>We will be using Jupyter Notebooks (.ipynb), running Python3<\/li>\r\n \t<li>You will need an Anaconda distribution.<\/li>\r\n \t<li><span style=\"font-family: Lato, sans-serif\"><code><\/code><\/span>The packages we use are included in Anaconda.<\/li>\r\n \t<li>You may need to update certain packages<\/li>\r\n \t<li>You can install and update packages via the pip installer or through the conda installer.<\/li>\r\n \t<li>Google is your best friend when it comes to making things work on your own computer.<\/li>\r\n \t<li>I'd recommend updating sklearn (sci-kit learn), the main machine learning library to at least version 1.0.\u00a0 This will give you the ability to create visualizations of your algorithms, which is not included in version 0.**<\/li>\r\n \t<li>pip install --upgrade scikit-learn, or depending on your permissions: \u00a0pip install --upgrade scikit-learn -user<\/li>\r\n<\/ul>\r\n<span style=\"font-family: Lato, sans-serif\"><code><\/code><\/span>\r\n\r\nI find the pip installer more straightforward than conda - but it doesn't matter as long as it works for you.\u00a0 Use these commands in the AnacondaPrompt.\r\n<h2>Alternatives to running anaconda on your laptop:<\/h2>\r\n<ul>\r\n \t<li>BCIT students: Workspace \/ Apps Anywhere lets you access a BCIT computer.\u00a0 You may need a VPN to use from home.<\/li>\r\n \t<li>BCIT students: The oddly named\u00a0 syzygy server at https:\/\/bcit.syzygy.ca\/ lets you login with your BCIT credentials.\u00a0 This lets you run programs off of the BCNet servers (physically located at UBC, but available to post-secondary institutions over BC)<\/li>\r\n \t<li>You can upload a jupyter notebook (.ipynb) to a Google Drive, and run it through Google Colab.\u00a0 This is free at the base level, and lets you run off of Google servers.\u00a0 No privacy guarantees here!\u00a0 And you may need extra code in your first block to install needed packages.<\/li>\r\n \t<li>Other cloud servers such as AWS may or may not be free.\u00a0 AWS gives students a limited amount of free credits - I'd save those for training a big neural network<\/li>\r\n \t<li>Hate Anaconda and want to use your own python distribution?\u00a0 That's fine, but you may lose the ability to run one block of code at a time.<\/li>\r\n<\/ul>","rendered":"<h1>Python!<\/h1>\n<p>I&#8217;m a big fan of Python for Machine Learning, and Jupyter Notebooks as teaching tools.\u00a0 You can (and should) use the tools that work for you, but the following files are based on Jupyter Notebooks (.ipynb files).\u00a0 Some of these files are included, or you can copy\/paste code into your notebook.<\/p>\n<ul>\n<li>We will be using Jupyter Notebooks (.ipynb), running Python3<\/li>\n<li>You will need an Anaconda distribution.<\/li>\n<li><span style=\"font-family: Lato, sans-serif\"><code><\/code><\/span>The packages we use are included in Anaconda.<\/li>\n<li>You may need to update certain packages<\/li>\n<li>You can install and update packages via the pip installer or through the conda installer.<\/li>\n<li>Google is your best friend when it comes to making things work on your own computer.<\/li>\n<li>I&#8217;d recommend updating sklearn (sci-kit learn), the main machine learning library to at least version 1.0.\u00a0 This will give you the ability to create visualizations of your algorithms, which is not included in version 0.**<\/li>\n<li>pip install &#8211;upgrade scikit-learn, or depending on your permissions: \u00a0pip install &#8211;upgrade scikit-learn -user<\/li>\n<\/ul>\n<p><span style=\"font-family: Lato, sans-serif\"><code><\/code><\/span><\/p>\n<p>I find the pip installer more straightforward than conda &#8211; but it doesn&#8217;t matter as long as it works for you.\u00a0 Use these commands in the AnacondaPrompt.<\/p>\n<h2>Alternatives to running anaconda on your laptop:<\/h2>\n<ul>\n<li>BCIT students: Workspace \/ Apps Anywhere lets you access a BCIT computer.\u00a0 You may need a VPN to use from home.<\/li>\n<li>BCIT students: The oddly named\u00a0 syzygy server at https:\/\/bcit.syzygy.ca\/ lets you login with your BCIT credentials.\u00a0 This lets you run programs off of the BCNet servers (physically located at UBC, but available to post-secondary institutions over BC)<\/li>\n<li>You can upload a jupyter notebook (.ipynb) to a Google Drive, and run it through Google Colab.\u00a0 This is free at the base level, and lets you run off of Google servers.\u00a0 No privacy guarantees here!\u00a0 And you may need extra code in your first block to install needed packages.<\/li>\n<li>Other cloud servers such as AWS may or may not be free.\u00a0 AWS gives students a limited amount of free credits &#8211; I&#8217;d save those for training a big neural network<\/li>\n<li>Hate Anaconda and want to use your own python distribution?\u00a0 That&#8217;s fine, but you may lose the ability to run one block of code at a time.<\/li>\n<\/ul>\n","protected":false},"author":883,"menu_order":1,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-66","chapter","type-chapter","status-publish","hentry"],"part":64,"_links":{"self":[{"href":"https:\/\/pressbooks.bccampus.ca\/businessanalytics\/wp-json\/pressbooks\/v2\/chapters\/66","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pressbooks.bccampus.ca\/businessanalytics\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/pressbooks.bccampus.ca\/businessanalytics\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/pressbooks.bccampus.ca\/businessanalytics\/wp-json\/wp\/v2\/users\/883"}],"version-history":[{"count":5,"href":"https:\/\/pressbooks.bccampus.ca\/businessanalytics\/wp-json\/pressbooks\/v2\/chapters\/66\/revisions"}],"predecessor-version":[{"id":299,"href":"https:\/\/pressbooks.bccampus.ca\/businessanalytics\/wp-json\/pressbooks\/v2\/chapters\/66\/revisions\/299"}],"part":[{"href":"https:\/\/pressbooks.bccampus.ca\/businessanalytics\/wp-json\/pressbooks\/v2\/parts\/64"}],"metadata":[{"href":"https:\/\/pressbooks.bccampus.ca\/businessanalytics\/wp-json\/pressbooks\/v2\/chapters\/66\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/pressbooks.bccampus.ca\/businessanalytics\/wp-json\/wp\/v2\/media?parent=66"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/pressbooks.bccampus.ca\/businessanalytics\/wp-json\/pressbooks\/v2\/chapter-type?post=66"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/pressbooks.bccampus.ca\/businessanalytics\/wp-json\/wp\/v2\/contributor?post=66"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/pressbooks.bccampus.ca\/businessanalytics\/wp-json\/wp\/v2\/license?post=66"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}