Model.classification_report¶
In [ ]:
Model.classification_report(cutoff: float = 0.5)
Computes a classification report using multiple metrics to evaluate the model (AUC, accuracy, PRC AUC, F1...).
Parameters¶
| Name | Type | Optional | Description |
|---|---|---|---|
cutoff | float / list | ✓ | Model Cutoff. If it is empty or invalid, the best cutoff will be used. |
Returns¶
tablesample : An object containing the result. For more information, see utilities.tablesample.
Example¶
In [46]:
from verticapy.learn.ensemble import RandomForestClassifier
# Binary Classification
model = RandomForestClassifier(name = "public.RF_titanic",
n_estimators = 20,
max_features = "auto",
max_leaf_nodes = 32,
sample = 0.7,
max_depth = 3,
min_samples_leaf = 5,
min_info_gain = 0.0,
nbins = 32)
model.fit("public.titanic", ["age", "fare", "gender"], "survived")
# Binary Classification: the cutoff is the probability
# to accept the class 1
model.classification_report(cutoff = 0.5)
Out[46]:
In [47]:
# Binary Classification: automatic cutoff
model.classification_report()
Out[47]:
