title: C5.0 returns tree of size 1
body: <p>I'm working with LendingClub's publicly available data on approved loans from 2012-2015: <a href="https://www.lendingclub.com/info/download-data.action" rel="nofollow noreferrer">https://www.lendingclub.com/info/download-data.action</a></p>
  
  <p>What it looks like</p>
  
  <p><a href="https://i.stack.imgur.com/gjvjA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gjvjA.png" alt="enter image description here"></a></p>
  
  <pre><code>library(C50)
  library(dplyr)
  library(ggplot2)
  
  #Preprocessed in terminal with 'tail -n +2 LoanStats3c.csv &gt; approved.csv'
  setwd("~/Dropbox/dataprojects/Lending Club/")
  approval &lt;- read.csv("approved.csv")
  approved_2014 &lt;- read.csv("approved_2014.csv")
  approved_2013 &lt;- read.csv("approved_2013.csv")
  
  #Create a big dataframe
  approved &lt;- rbind(approval, approved_2014, approved_2013)
  #Filter it
  approved &lt;- filter(approved, application_type == "INDIVIDUAL", purpose=="debt_consolidation")
  keep &lt;- c("loan_status","addr_state", "annual_inc", "delinq_2yrs", "dti", "grade","sub_grade", "home_ownership", "emp_length", "loan_amnt", "installment", "int_rate", "open_acc", "zip_code", "inq_last_6mths", "verification_status", "pub_rec", "term", "revol_bal", "revol_util")
  approved &lt;- approved[keep]
  #Scramble it
  set.seed(12345)
  approved &lt;- approved[order(runif(429949)), ]
  #Drop Unused Levels -- necessary for C5.0
  approved &lt;- droplevels(approved)
  
  num_examples = dim(approved)[1]
  
  #Prepares class variables.
  approved$loan_status &lt;- as.character(approved$loan_status)
  approved$loan_status[approved$loan_status=="Charged Off"] &lt;- "0"
  approved$loan_status[approved$loan_status=="Default"] &lt;- "0"
  approved$loan_status[approved$loan_status=="Late (31-120 days)"] &lt;- "0"
  approved$loan_status[approved$loan_status=="Current"] &lt;- "1"
  approved$loan_status[approved$loan_status=="Fully Paid"] &lt;- "1"
  approved$loan_status[approved$loan_status=="Issued"] &lt;- "1"
  approved$loan_status[approved$loan_status=="In Grace Period"] &lt;- "1"
  approved$loan_status[approved$loan_status=="Late (16-30 days)"] &lt;- "1"
  approved$loan_status[approved$loan_status==""] &lt;- "missing"
  approved$loan_status &lt;- as.factor(approved$loan_status)
  summary(approved$loan_status)
  
  #Change these to numerics so they can be normalized
  approved$int_rate &lt;- as.numeric(sub("%", "", approved$int_rate))
  approved$revol_util &lt;- as.numeric(sub("%", "", approved$revol_util))
  approved$term &lt;- as.numeric(sub("months", "", approved$term))
  
  #Normalize Numeric Columns
  ind &lt;- sapply(approved, is.numeric)
  approved[ind] &lt;- lapply(approved[ind], scale)
  levels(approved)[levels(approved) == ""] &lt;- "missing"
  
  #Create Train/Test Split
  split_pt2 = ceiling(num_examples*0.7) 
  split_pt1 = floor(num_examples*0.7)
  approved_train &lt;- approved[1:split_pt1,]
  approved_test &lt;- approved[split_pt2:num_examples,]
  
  train_class &lt;- approved_train$loan_status
  test_class &lt;- approved_test$loan_status
  #Remove the class from the training/testing data
  approved_train &lt;- approved_train[,2:20]
  approved_test &lt;- approved_test[,2:20]
  
  
  m &lt;- C5.0(approved_train, train_class, trials=10)
  summary(m)
  p &lt;- predict(m, approved_test)
  summary(p)
  </code></pre>
  
  <p>I'm new to R &amp; C5.0, so I might be overlooking something very obvious. Not sure whats wrong here. Thanks for any insight you can provide.</p>
  
  <pre><code>Call:
  C5.0.default(x = approved_train, y = train_class, trials = 10)
  
  
  C5.0 [Release 2.07 GPL Edition]     Tue Nov 24 16:38:41 2015
  -------------------------------
  
  Class specified by attribute `outcome'
  
  Read 128985 cases (20 attributes) from undefined.data
  
  -----  Trial 0:  -----
  
  Decision tree:
   1 (128985/8250)
  
  -----  Trial 1:  -----
  
  Decision tree:
   1 (128985/36371.2)
  
  *** boosting reduced to 1 trial since last classifier is very inaccurate
  
  *** boosting abandoned (too few classifiers)
  
  
  Evaluation on training data (128985 cases):
  
          Decision Tree   
        ----------------  
        Size      Errors  
  
           1 8250( 6.4%)   &lt;&lt;
  
  
          (a)    (b)    &lt;-classified as
        -----  -----
                8250    (a): class 0
              120735    (b): class 1
  </code></pre>