Research Article

EBOC: Ensemble-Based Ordinal Classification in Transportation

Algorithm 1

The pseudocode of the proposed EBOC approach.
Algorithm EBOC: Ensemble-Based Ordinal Classification
Inputs:
D:  the ordinal dataset
m: the number of instances in the dataset D
X: input feature space, an input vector xϵX
Y: class attribute, an ordinal class label , with an order
k: the number of class labels
n: ensemble size
Outputs:
M: an ensemble classification model
M(x): class label of a new sample x
Begin:
for  i = 1 to  n  do
  if (bagging)
    = bootstrap samples from D
  else if (boosting)
    =samples from D according to their weights
  // Construction of binary training sets,
  for  j = 1 to  k-1 do
   for  s = 1 to  m  do
    if ( <= )
     Add(,0)
    else
     Add(,1)
   end for
  end for
  // Construction of binary classifiers, BCij
  for  j = 1 to  k-1  do
   BCij=ClassificationAlgorithm()
  end for
  if (boosting)
   update weight values
end for
 // Classification of a new sample x
for  i = 1  to  n  do
  // Construction of ordinal classification models,
  P() = 1 − P(y > )
  for  j = 2  to  k-1  do
   P() = P(y > ) − P(y > )
  end for
  P() = P(y > )
   = max(P)
end for
 // Majority voting
if (bagging)
   
else if (boosting)
   
End Algorithm