НачатьНачать бесплатно

Create a low-variance filter

In this exercise, you are given house_sales_df which contains seventeen continuous features. Some of those features do not have any variance. Some of them have very little variance. You will explore the variances and establish a filter using an appropriate variance threshold. This approach is useful for reducing dimensions with little to no information, but as you'll see, it has a few drawbacks.

The tidyverse and tidymodels packages have been loaded for you.

Это упражнение является частью курса

Dimensionality Reduction in R

Посмотреть курс

Интерактивное практическое упражнение

Попробуйте выполнить это упражнение, дополнив этот пример кода.

# Calculate feature variances
houses_sales_variances <- ___ %>% 
  summarize(across(everything(), ~ ___(___(., ___ = ___), na.rm = ___))) %>% 
  pivot_longer(everything(), names_to = "feature", values_to = "variance") %>% 
  ___(desc(___))

houses_sales_variances
Редактировать и запускать код