toad.plot module¶
- toad.plot.badrate_plot(frame, x=None, target='target', by=None, freq=None, format=None, return_counts=False, return_proportion=False, return_frame=False)[source]¶
plot for badrate
- Parameters
frame (DataFrame) –
x (str) – column in frame that will be used as x axis
target (str) – target column in frame
by (str) – column in frame that will be calculated badrate by it
freq (str) – offset aliases string by pandas http://pandas.pydata.org/pandas-docs/stable/timeseries.html#offset-aliases
format (str) – format string for time
return_counts (bool) – if need return counts plot
return_frame (bool) – if need return frame
- Returns
badrate plot Axes: counts plot Axes: proportion plot Dataframe: grouping detail data
- Return type
Axes
- toad.plot.corr_plot(frame, figure_size=(20, 15))[source]¶
plot for correlation
- Parameters
frame (DataFrame) – frame to draw plot
- Returns
Axes
- toad.plot.proportion_plot(x=None, keys=None)[source]¶
plot for comparing proportion in different dataset
- Parameters
x (Series|list) – series or list of series data for plot
keys (str|list) – keys for each data
- Returns
Axes
- toad.plot.roc_plot(score, target, compare=None, figsize=(14, 10))[source]¶
plot for roc
- Parameters
score (array-like) – predicted score
target (array-like) – true target
compare (array-like) – another score for comparing with score
- Returns
Axes
- toad.plot.ks_plot(score, target, figsize=(14, 10))[source]¶
plot for ks
- Parameters
score (array-like) – predicted score
target (array-like) – true target
compare (array-like) – another score for comparing with score
- Returns
Axes
- toad.plot.bin_plot(frame, x=None, target='target', iv=True, annotate_format='.2f', return_frame=False, figsize=(12, 6))[source]¶
plot for bins
- Parameters
frame (DataFrame) –
x (str) – column in frame that will be used as x axis
target (str) – target column in frame
iv (bool) – if need to show iv in plot
annotate_format (str) – format str for axis annotation of chart
return_frame (bool) – if need return bin frame
figsize (tuple) – size of the figure (width, height)
- Returns
contains good, bad, badrate, prop, y_prop, n_prop, woe, iv
- Return type
Dataframe