Skip to content

Commit

Permalink
Merge pull request #665 from jasleen101010/main
Browse files Browse the repository at this point in the history
Fixed hyperlinks and knitted the Rmd files to html for beginning half of the repo
  • Loading branch information
carlotta94c authored Jul 3, 2023
2 parents bf78cf8 + 8084e84 commit 1cad50d
Show file tree
Hide file tree
Showing 16 changed files with 19,690 additions and 1,558 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -355,3 +355,9 @@ MigrationBackup/

# Mac-specific
.DS_Store
.Rproj.user

.Rdata
.Rhistory
ML-For-Beginners.Rproj

2 changes: 1 addition & 1 deletion 2-Regression/1-Tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
## [Pre-lecture quiz](https://gray-sand-07a10f403.1.azurestaticapps.net/quiz/9/)

> ### [This lesson is available in R!](./solution/R/lesson_1-R.ipynb)
> ### [This lesson is available in R!](./solution/R/lesson_1.html)
## Introduction

Expand Down
3,390 changes: 3,390 additions & 0 deletions 2-Regression/1-Tools/solution/R/lesson_1.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion 2-Regression/2-Data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Infographic by [Dasani Madipalli](https://twitter.com/dasani_decoded)

## [Pre-lecture quiz](https://gray-sand-07a10f403.1.azurestaticapps.net/quiz/11/)

> ### [This lesson is available in R!](./solution/R/lesson_2-R.ipynb)
> ### [This lesson is available in R!](./solution/R/lesson_2.html)
## Introduction

Expand Down
3,534 changes: 3,534 additions & 0 deletions 2-Regression/2-Data/solution/R/lesson_2.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion 2-Regression/3-Linear/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
> Infographic by [Dasani Madipalli](https://twitter.com/dasani_decoded)
## [Pre-lecture quiz](https://gray-sand-07a10f403.1.azurestaticapps.net/quiz/13/)

> ### [This lesson is available in R!](./solution/R/lesson_3-R.ipynb)
> ### [This lesson is available in R!](./solution/R/lesson_3.html)
### Introduction

So far you have explored what regression is with sample data gathered from the pumpkin pricing dataset that we will use throughout this lesson. You have also visualized it using Matplotlib.
Expand Down
8 changes: 4 additions & 4 deletions 2-Regression/3-Linear/solution/R/lesson_3.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ We do so since we want to model a line that has the least cumulative distance fr
>
> In other words, and referring to our pumpkin data's original question: "predict the price of a pumpkin per bushel by month", `X` would refer to the price and `Y` would refer to the month of sale.
>
> ![Infographic by Jen Looper](../../images/calculation.png)
>
![Infographic by Jen Looper](../../images/calculation.png)

> Calculate the value of Y. If you're paying around \$4, it must be April!
>
> The math that calculates the line must demonstrate the slope of the line, which is also dependent on the intercept, or where `Y` is situated when `X = 0`.
Expand Down Expand Up @@ -114,7 +114,7 @@ Load up required libraries and dataset. Convert the data to a data frame contain

- Convert the price to reflect the pricing by bushel quantity

> We covered these steps in the [previous lesson](https://github.com/microsoft/ML-For-Beginners/blob/main/2-Regression/2-Data/solution/lesson_2-R.ipynb).
> We covered these steps in the [previous lesson](https://github.com/microsoft/ML-For-Beginners/blob/main/2-Regression/2-Data/solution/lesson_2.html).
```{r load_tidy_verse_models, message=F, warning=F}
# Load the core Tidyverse packages
Expand Down Expand Up @@ -285,7 +285,7 @@ That's an awesome thought! You see, once your recipe is defined, you can estimat

For that, you'll need two more verbs: `prep()` and `bake()` and as always, our little R friends by [`Allison Horst`](https://github.com/allisonhorst/stats-illustrations) help you in understanding this better!

![Artwork by \@allison_horst](../images/recipes.png){width="550"}
![Artwork by \@allison_horst](../../images/recipes.png){width="550"}

[`prep()`](https://recipes.tidymodels.org/reference/prep.html): estimates the required parameters from a training set that can be later applied to other data sets. For instance, for a given predictor column, what observation will be assigned integer 0 or 1 or 2 etc

Expand Down
3,966 changes: 3,966 additions & 0 deletions 2-Regression/3-Linear/solution/R/lesson_3.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion 2-Regression/4-Logistic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## [Pre-lecture quiz](https://gray-sand-07a10f403.1.azurestaticapps.net/quiz/15/)

> ### [This lesson is available in R!](./solution/R/lesson_4-R.ipynb)
> ### [This lesson is available in R!](./solution/R/lesson_4.html)
## Introduction

Expand Down
6 changes: 3 additions & 3 deletions 2-Regression/4-Logistic/solution/R/lesson_4.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ output:

![Infographic by Dasani Madipalli](../../images/logistic-linear.png){width="600"}

#### ** [Pre-lecture quiz](https://gray-sand-07a10f403.1.azurestaticapps.net/quiz/15/)**
#### **[Pre-lecture quiz](https://gray-sand-07a10f403.1.azurestaticapps.net/quiz/15/)**

#### Introduction

Expand Down Expand Up @@ -56,7 +56,7 @@ suppressWarnings(if (!require("pacman"))install.packages("pacman"))
pacman::p_load(tidyverse, tidymodels, janitor, ggbeeswarm)
```

## ** Define the question**
## **Define the question**

For our purposes, we will express this as a binary: 'Orange' or 'Not Orange'. There is also a 'striped' category in our dataset but there are few instances of it, so we will not use it. It disappears once we remove null values from the dataset, anyway.

Expand Down Expand Up @@ -148,7 +148,7 @@ pumpkins_select %>%

The goal of data exploration is to try to understand the `relationships` between its attributes; in particular, any apparent correlation between the *features* and the *label* your model will try to predict. One way of doing this is by using data visualization.

Given our the data types of our columns, we can `encode` them and be on our way to making some visualizations. This simply involves `translating` a column with `categorical values` for example our columns of type *char*, into one or more `numeric columns` that take the place of the original. - Something we did in our [last lesson](https://github.com/microsoft/ML-For-Beginners/blob/main/2-Regression/3-Linear/solution/lesson_3-R.ipynb).
Given our the data types of our columns, we can `encode` them and be on our way to making some visualizations. This simply involves `translating` a column with `categorical values` for example our columns of type *char*, into one or more `numeric columns` that take the place of the original. - Something we did in our [last lesson](https://github.com/microsoft/ML-For-Beginners/blob/main/2-Regression/3-Linear/solution/lesson_3.html).

Tidymodels provides yet another neat package: [recipes](https://recipes.tidymodels.org/)- a package for preprocessing data. We'll define a `recipe` that specifies that all predictor columns should be encoded into a set of integers , `prep` it to estimates the required quantities and statistics needed by any operations and finally `bake` to apply the computations to new data.

Expand Down
3,649 changes: 3,649 additions & 0 deletions 2-Regression/4-Logistic/solution/R/lesson_4.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion 4-Classification/1-Introduction/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Classification uses various algorithms to determine other ways of determining a

## [Pre-lecture quiz](https://gray-sand-07a10f403.1.azurestaticapps.net/quiz/19/)

> ### [This lesson is available in R!](./solution/R/lesson_10-R.ipynb)
> ### [This lesson is available in R!](./solution/R/lesson_10.html)
### Introduction

Expand Down
2 changes: 1 addition & 1 deletion 4-Classification/1-Introduction/solution/R/lesson_10.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ Let's now save a copy of this data for use in future lessons:

```{r save_preproc_data}
# Save preprocessed data
write_csv(preprocessed_df, "../../data/cleaned_cuisines_R.csv")
write_csv(preprocessed_df, "../../../data/cleaned_cuisines_R.csv")
```

Expand Down
3,587 changes: 3,587 additions & 0 deletions 4-Classification/1-Introduction/solution/R/lesson_10.html

Large diffs are not rendered by default.

Loading

0 comments on commit 1cad50d

Please sign in to comment.