diff --git a/2-Regression/1-Tools/README.md b/2-Regression/1-Tools/README.md index 066929b4..1b4874e2 100644 --- a/2-Regression/1-Tools/README.md +++ b/2-Regression/1-Tools/README.md @@ -1,7 +1,7 @@ # Get started with Python and Scikit-Learn for Regression models -> Sketchnote Placeholder -> +> Sketchnote on three types of Regression + ## [Pre-lecture quiz](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/5/) ## Introduction diff --git a/2-Regression/2-Data/README.md b/2-Regression/2-Data/README.md index 0b2aacf3..b8575919 100644 --- a/2-Regression/2-Data/README.md +++ b/2-Regression/2-Data/README.md @@ -1,17 +1,17 @@ # Build a Regression Model using Scikit-Learn: Prepare and Visualize Data -> Sketchnote +> Sketchnote on data and visualization ## [Pre-lecture quiz](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/7/) ### Introduction +Now that you are set up with the tools you need to start tackling machine learning model-building with Scikit-Learn, you are ready to start asking questions of your data. As you work with data and apply ML solutions, it's very important to understand how to ask the right question to properly unlock the potentials of your dataset. + In this lesson, you will learn: - Preparing your data for model-building -- Two data visualization techniques and libraries +- Using Matplotlib for data visualization ### Asking the Right Question -As you work with data and apply ML solutions, it's very important to understand how to ask the right question to properly unlock the potentials of your dataset. - The question you need answered will determine what type of ML algorithms you will leverage. For example, do you need to determine the differences between cars and trucks as they cruise down a highway via a video feed? You will need some kind of highly performant classification model to make that differentiation. It will need to be able to perform object detection, probably by showing bounding boxes around detected cars and trucks. > infographic here diff --git a/2-Regression/3-Linear/README.md b/2-Regression/3-Linear/README.md index 4c7faafb..377e86b3 100644 --- a/2-Regression/3-Linear/README.md +++ b/2-Regression/3-Linear/README.md @@ -1,4 +1,6 @@ # Build a Regression Model using Scikit-Learn: Regression Two Ways + +> Sketchnote on Linear vs. Polynomial Regression ## [Pre-lecture quiz](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/9/) ### Introduction diff --git a/2-Regression/4-Logistic/README.md b/2-Regression/4-Logistic/README.md index 3602022f..7df75a4e 100644 --- a/2-Regression/4-Logistic/README.md +++ b/2-Regression/4-Logistic/README.md @@ -1,49 +1,25 @@ # Logistic Regression to Predict Categories -- orange or white by price -- - -Add a sketchnote if possible/appropriate - -![Embed a video here if available](video-url) - +> Sketchnote on Logistic Regression ## [Pre-lecture quiz](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/11/) -Describe what we will learn - ### Introduction -Describe what will be covered +In this final lesson on Regression, one of the basic 'classic' ML techniques, we will take a look at Logistic Regression. You would use this technique to discover patterns to predict categories. -> Notes +In this lesson, you will learn: +- A new library for data visualization +- Techniques for Logistic Regression +## Prerequisite -### Prerequisite - -What steps should have been covered before this lesson? +Having worked with the pumpkin data, we are now familiar enough with it to realize that there's one small category that we can work with: Color. Let's build a Logistic Regression model to predict that, given a pumpkin's size, what color it will be (orange or white). There is also a 'striped' category in our dataset but there are few instances, so we will not use it. +> 🎃 Fun fact, we sometimes call white pumpkins 'ghost' pumpkins. They aren't very easy to carve, so they aren't as popular as the orange ones but they are cool looking! ### Preparation -Preparatory steps to start this lesson - ---- - -[Step through content in blocks] - -## [Topic 1] - -### Task: - -Work together to progressively enhance your codebase to build the project with shared code: - -```html -code blocks -``` - -✅ Knowledge Check - use this moment to stretch students' knowledge with open questions +We have loaded up the [starter notebook](./notebook.ipynb) with pumpkin data once again and cleaned it so as to preserve a dataset containing Color and Item Size. -## [Topic 2] -## [Topic 3] --- ## 🚀Challenge diff --git a/2-Regression/4-Logistic/solution/notebook.ipynb b/2-Regression/4-Logistic/solution/notebook.ipynb index 1b4a0cc9..c6ee6470 100644 --- a/2-Regression/4-Logistic/solution/notebook.ipynb +++ b/2-Regression/4-Logistic/solution/notebook.ipynb @@ -26,16 +26,14 @@ "source": [ "## Logistic Regression - Lesson 4\n", "\n", - "Load up required libraries and dataset. Convert the data to a dataframe containing a subset of the data: \n", - "\n", - "Let's look at the relationship between color and variety" + "Load up required libraries and dataset. Convert the data to a dataframe containing a subset of the data" ], "cell_type": "markdown", "metadata": {} }, { "cell_type": "code", - "execution_count": 152, + "execution_count": 184, "metadata": {}, "outputs": [ { @@ -68,7 +66,7 @@ "text/html": "
\n | City Name | \nType | \nPackage | \nVariety | \nSub Variety | \nGrade | \nDate | \nLow Price | \nHigh Price | \nMostly Low | \n... | \nUnit of Sale | \nQuality | \nCondition | \nAppearance | \nStorage | \nCrop | \nRepack | \nTrans Mode | \nUnnamed: 24 | \nUnnamed: 25 | \n
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \nBALTIMORE | \nNaN | \n24 inch bins | \nNaN | \nNaN | \nNaN | \n4/29/17 | \n270.0 | \n280.0 | \n270.0 | \n... | \nNaN | \nNaN | \nNaN | \nNaN | \nNaN | \nNaN | \nE | \nNaN | \nNaN | \nNaN | \n
1 | \nBALTIMORE | \nNaN | \n24 inch bins | \nNaN | \nNaN | \nNaN | \n5/6/17 | \n270.0 | \n280.0 | \n270.0 | \n... | \nNaN | \nNaN | \nNaN | \nNaN | \nNaN | \nNaN | \nE | \nNaN | \nNaN | \nNaN | \n
2 | \nBALTIMORE | \nNaN | \n24 inch bins | \nHOWDEN TYPE | \nNaN | \nNaN | \n9/24/16 | \n160.0 | \n160.0 | \n160.0 | \n... | \nNaN | \nNaN | \nNaN | \nNaN | \nNaN | \nNaN | \nN | \nNaN | \nNaN | \nNaN | \n
3 | \nBALTIMORE | \nNaN | \n24 inch bins | \nHOWDEN TYPE | \nNaN | \nNaN | \n9/24/16 | \n160.0 | \n160.0 | \n160.0 | \n... | \nNaN | \nNaN | \nNaN | \nNaN | \nNaN | \nNaN | \nN | \nNaN | \nNaN | \nNaN | \n
4 | \nBALTIMORE | \nNaN | \n24 inch bins | \nHOWDEN TYPE | \nNaN | \nNaN | \n11/5/16 | \n90.0 | \n100.0 | \n90.0 | \n... | \nNaN | \nNaN | \nNaN | \nNaN | \nNaN | \nNaN | \nN | \nNaN | \nNaN | \nNaN | \n
5 rows × 26 columns
\nCity Name | Package | Variety | Origin | Item Size | Color | |
---|---|---|---|---|---|---|
City Name | \n1.000000 | \n0.145078 | \n-0.009344 | \n0.200548 | \n-0.189651 | \n-0.028224 | \n
Package | \n0.145078 | \n1.000000 | \n-0.330067 | \n0.048547 | \n-0.301333 | \n-0.270385 | \n
Variety | \n-0.009344 | \n-0.330067 | \n1.000000 | \n0.294407 | \n0.105008 | \n0.051986 | \n
Origin | \n0.200548 | \n0.048547 | \n0.294407 | \n1.000000 | \n-0.061450 | \n0.073486 | \n
Item Size | \n-0.189651 | \n-0.301333 | \n0.105008 | \n-0.061450 | \n1.000000 | \n0.224603 | \n
Color | \n-0.028224 | \n-0.270385 | \n0.051986 | \n0.073486 | \n0.224603 | \n1.000000 | \n