开始使用免费开始使用

以整洁方式提取模型统计量

在本练习中,您将使用 tidy()glance() 函数,以整洁的方式从 algeria_model 中提取信息。

对于线性模型,tidy() 会提取模型系数,而 glance() 会返回模型统计量,例如 $R^2$。

本练习是课程的一部分

Tidyverse 中的机器学习

查看课程

练习说明

  • 使用 tidy()algeria_model 的系数信息提取为一个整洁的数据框。
  • 使用 glance() 提取 algeria_model 的模型统计量。

交互式实操练习

通过完成这段示例代码来试试这个练习。

library(broom)

# Extract the coefficients of the algeria_model as a data frame
___

# Extract the statistics of the algeria_model as a data frame
___
编辑并运行代码