\begin{figure}\label{fig:pseudoCode-training}
\begin{alltt}
function Training(data)
  if(numRows == 0 || depth >= 15)
    exit;
  
  for(row in data) 
    for(column in columns) 
      columnWidth = \(\frac{max(column) - min(column)}{3}\)
      row[column].value = \(\frac{row[column].value - min(column)}{columnWidth}\)
  

  choices = GetColumnWeights(data)
  
  maxChoice = max(choices);

  rule = CreateRule(maxChoice, data)
  
  return rule
  rule.true = Training(data | rule)
  rule.false = Training(data | !rule)


function CreateRule(choice, data)
  rule.function = choice
  rule.true = Training(data | choice)
  rule.false = Training(data | !choice)
  return rule


function GetColumnWeights(data)
  for(column in columns)
    for(bin in column)
      trueData = data | column.value = bin && data.class = true
      falseData = data | column.value = bin && data.class = false
      column.bin.weight = max(\(\frac{trueData.size}{data | data.class = true}\), -
\(\frac{falseData.size}{data | data.class = false}\))
\end{alltt}
\caption{Pseudo code of the Clump Training process}
\end{figure}
