1. 学习
  2. /
  3. 课程
  4. /
  5. Introduction to Predictive Analytics in Python

Connected

练习

Putting it all together

In the previous exercises, you defined a function create_pig_table that, given a basetable and a predictor, creates a predictor insight graph table for this predictor:

pig_table = create_pig_table(basetable,target,variable)

Next, you wrote a function plot_pig that plots the predictor insight graph based on this predictor insight graph table

plot_pig(pig_table, variable)

Often, you want to make many predictor insight graphs at once. In this exercise, you will learn how to automatically do this using a for loop.

说明

100 XP
  • For each variable in variables, create a predictor insight graph table. The basetable is loaded in basetable.
  • For each variable in variables, plot the predictor insight graph.