ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

R Tutorial: Tidy your models with broom

Автор: DataCamp

Загружено: 2020-03-19

Просмотров: 2731

Описание: Want to learn more? Take the full course at https://learn.datacamp.com/courses/ma... at your own pace. More than a video, you'll learn hands-on coding & quickly apply skills to your daily work.

---
Now that you know how to work with list columns in a tidy manner you can begin to work with the tools you need to explore and evaluate machine learning models.

As you can probably imagine, the bulk of the work of machine learning resides in step two of this workflow. Since you can store complex model objects in your dataframe you can also work with these objects using the tools available in various R packages.

In this video, we will focus on the broom package. A package designed to convert useful model outputs into tidy dataframes.

The core of broom is encapsulated by three functions which aim to extract conceptually different information from any model.

tidy() is used to extract the statistical findings of a model.
glance() provides a one row summary of a model, and
augmment() appends the predicted values of a model to the data being modeled.

Let's explore each of these in greater detail by reviewing the results of the linear model that you created for Algeria.

If you look at the summary() of the Algeria model you can see that there is a lot of useful information here. However, this information is not particularly easy to extract directly from the object as it is to simply print it. But using tidy() and glance() you can easily extract this information into dataframes.

The tidy() function collects the statistical findings of a model into a dataframe.

When used with a linear model, tidy() returns the coefficients and their corresponding statistics for that model.

To extract these statistics you simply apply the tidy() function to the model object as shown here.

The next broom function, glance(), is used to return a one row summary of a model.

For a linear model, this summary contains various statistics about the fit of the model such as the r squared.

Extracting this information into a dataframe is as simple as calling the function on the model object.

Finally, the augment() function builds an observation-level dataframe containing the original data used to build the model as well as the predicted value for each observation as the column dot fitted. Furthermore, augment() appends model-specific statistics of fit for each observation.

By constructing a dataframe containing both the original values and those predicted by our model you can explore the fit of the model.

For instance, you can visualize how well your model fits the data by plotting the predicted and actual values of life expectancy with respect to year.
In this plot the actual values are the black points and the fit of the model, or predicted values, is shown as the red line.

By examining this plot you can learn that a simple linear model may not be the best approach for this example and would consider either including more features or using a non-linear approach to better capture this relationship.

Using these three tools makes it easy to extract model coefficients, fit statistics and observation-level performance for many different machine learning models.

In chapter two we will use broom as a part of the list column workflow to do this for all 77 of our country-level models with just a few lines of code. But first, let's review what you have learned with a few exercises.

#RTutorial #DataCamp #Foundations #machinelearning #Tidyverse #map

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
R Tutorial: Tidy your models with broom

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

How to purrr

How to purrr

Using the purrr and broom R packages to easily perform thousands of statistical tests (CC112)

Using the purrr and broom R packages to easily perform thousands of statistical tests (CC112)

Broom: Converting Statistical Models to Tidy Data Frames

Broom: Converting Statistical Models to Tidy Data Frames

Обзоры пакетов R | уборщик | очистите свои данные!

Обзоры пакетов R | уборщик | очистите свои данные!

R demo | Many (Grouped / Nested) Models Simultaneously are Very Effective

R demo | Many (Grouped / Nested) Models Simultaneously are Very Effective

Циклы с использованием программирования R

Циклы с использованием программирования R

ИДЕАЛЬНЫЕ СТОЛЫ В #R! 💪 {gtsummary}

ИДЕАЛЬНЫЕ СТОЛЫ В #R! 💪 {gtsummary}

Hadley Wickham: Managing many models with R

Hadley Wickham: Managing many models with R

R List Columns: purrr map and nesting (STAT 545 Episode 2-B)

R List Columns: purrr map and nesting (STAT 545 Episode 2-B)

Alex Hayes | Solving the model representation problem with broom | RStudio (2019)

Alex Hayes | Solving the model representation problem with broom | RStudio (2019)

Statistical Methods Series:  Structural Equation Modeling

Statistical Methods Series: Structural Equation Modeling

Creating and tidying linear models in R with

Creating and tidying linear models in R with "broom" | R Tutorial (2020)

TidyX Episode 77 |  Tidymodels - LM

TidyX Episode 77 | Tidymodels - LM

Create a Financial AI Copilot

Create a Financial AI Copilot

POLS3316: Lab 4 Recording

POLS3316: Lab 4 Recording

Выучите R за 39 минут

Выучите R за 39 минут

Paige Bailey | Deep Learning with R | RStudio (2020)

Paige Bailey | Deep Learning with R | RStudio (2020)

Regression diagnostics and analysis workflow

Regression diagnostics and analysis workflow

Evals for Agents with Arize

Evals for Agents with Arize

The broom R package - Tidy statistical objects in R

The broom R package - Tidy statistical objects in R

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]