This function prints out detailed summaries for C5.0 models.

# S3 method for C5.0
summary(object, ...)

Arguments

object

an object of class C5.0

...

other options (not currently used)

Value

A list with values

output

a single text string with the model output

comp2

the call to this function

Details

The output of this function mirrors the output of the C5.0 command line version.

The terminal nodes have text indicating the number of samples covered by the node and the number that were incorrectly classified. Note that, due to how the model handles missing values, the sample numbers may be fractional.

There is a difference in the attribute usage numbers between this output and the nominal command line output. Although the calculations are almost exactly the same (we do not add 1/2 to everything), the C code does not display that an attribute was used if the percentage of training samples covered by the corresponding splits is very low. Here, the threshold was lowered and the fractional usage is shown.

References

Quinlan R (1993). C4.5: Programs for Machine Learning. Morgan Kaufmann Publishers, http://www.rulequest.com/see5-unix.html

See also

C5.0(), C5.0Control(), summary.C5.0(), C5imp()

Author

Original GPL C code by Ross Quinlan, R code and modifications to C by Max Kuhn, Steve Weston and Nathan Coulter

Examples


library(modeldata)
data(mlc_churn)

treeModel <- C5.0(x = mlc_churn[1:3333, -20], y = mlc_churn$churn[1:3333])
summary(treeModel)
#> 
#> Call:
#> C5.0.default(x = mlc_churn[1:3333, -20], y = mlc_churn$churn[1:3333])
#> 
#> 
#> C5.0 [Release 2.07 GPL Edition]  	Mon Feb  7 00:41:08 2022
#> -------------------------------
#> 
#> Class specified by attribute `outcome'
#> 
#> Read 3333 cases (20 attributes) from undefined.data
#> 
#> Decision tree:
#> 
#> total_day_minutes > 264.4:
#> :...voice_mail_plan = yes:
#> :   :...international_plan = no: no (45/1)
#> :   :   international_plan = yes: yes (8/3)
#> :   voice_mail_plan = no:
#> :   :...total_eve_minutes > 187.7:
#> :       :...total_night_minutes > 126.9: yes (94/1)
#> :       :   total_night_minutes <= 126.9:
#> :       :   :...total_day_minutes <= 277: no (4)
#> :       :       total_day_minutes > 277: yes (3)
#> :       total_eve_minutes <= 187.7:
#> :       :...total_eve_charge <= 12.26: no (15/1)
#> :           total_eve_charge > 12.26:
#> :           :...total_day_minutes <= 277:
#> :               :...total_night_minutes <= 224.8: no (13)
#> :               :   total_night_minutes > 224.8: yes (5/1)
#> :               total_day_minutes > 277:
#> :               :...total_night_minutes > 151.9: yes (18)
#> :                   total_night_minutes <= 151.9:
#> :                   :...account_length <= 123: no (4)
#> :                       account_length > 123: yes (2)
#> total_day_minutes <= 264.4:
#> :...number_customer_service_calls > 3:
#>     :...total_day_minutes <= 160.2:
#>     :   :...total_eve_charge <= 19.83: yes (79/3)
#>     :   :   total_eve_charge > 19.83:
#>     :   :   :...total_day_minutes <= 120.5: yes (10)
#>     :   :       total_day_minutes > 120.5: no (13/3)
#>     :   total_day_minutes > 160.2:
#>     :   :...total_eve_charge > 12.05: no (130/24)
#>     :       total_eve_charge <= 12.05:
#>     :       :...total_eve_calls <= 125: yes (16/2)
#>     :           total_eve_calls > 125: no (3)
#>     number_customer_service_calls <= 3:
#>     :...international_plan = yes:
#>         :...total_intl_calls <= 2: yes (51)
#>         :   total_intl_calls > 2:
#>         :   :...total_intl_minutes <= 13.1: no (173/7)
#>         :       total_intl_minutes > 13.1: yes (43)
#>         international_plan = no:
#>         :...total_day_minutes <= 223.2: no (2221/60)
#>             total_day_minutes > 223.2:
#>             :...total_eve_charge <= 20.5: no (295/22)
#>                 total_eve_charge > 20.5:
#>                 :...voice_mail_plan = yes: no (20)
#>                     voice_mail_plan = no:
#>                     :...total_night_minutes > 174.2: yes (50/8)
#>                         total_night_minutes <= 174.2:
#>                         :...total_day_minutes <= 246.6: no (12)
#>                             total_day_minutes > 246.6:
#>                             :...total_day_charge <= 43.33: yes (4)
#>                                 total_day_charge > 43.33: no (2)
#> 
#> 
#> Evaluation on training data (3333 cases):
#> 
#> 	    Decision Tree   
#> 	  ----------------  
#> 	  Size      Errors  
#> 
#> 	    27  136( 4.1%)   <<
#> 
#> 
#> 	   (a)   (b)    <-classified as
#> 	  ----  ----
#> 	   365   118    (a): class yes
#> 	    18  2832    (b): class no
#> 
#> 
#> 	Attribute usage:
#> 
#> 	100.00%	total_day_minutes
#> 	 93.67%	number_customer_service_calls
#> 	 87.73%	international_plan
#> 	 20.73%	total_eve_charge
#> 	  8.97%	voice_mail_plan
#> 	  8.01%	total_intl_calls
#> 	  6.48%	total_intl_minutes
#> 	  6.33%	total_night_minutes
#> 	  4.74%	total_eve_minutes
#> 	  0.57%	total_eve_calls
#> 	  0.18%	account_length
#> 	  0.18%	total_day_charge
#> 
#> 
#> Time: 0.0 secs
#>