  Items in many datasets can be arranged to a natural order. Such orders are
useful since they can provide new knowledge about the data and may ease further
data exploration and visualization. Our goal in this paper is to define a
statistically well-founded and an objective score measuring the quality of an
order. Such a measure can be used for determining whether the current order has
any valuable information or can it be discarded.
  Intuitively, we say that the order is good if dependent attributes are close
to each other. To define the order score we fit an order-sensitive model to the
dataset. Our model resembles a Markov chain model, that is, the attributes
depend only on the immediate neighbors. The score of the order is the BIC score
of the best model. For computing the measure we introduce a fast dynamic
program. The score is then compared against random orders: if it is better than
the scores of the random orders, we say that the order is good. We also show
the asymptotic connection between the score function and the number of free
parameters of the model. In addition, we introduce a simple greedy approach for
finding an order with a good score. We evaluate the score for synthetic and
real datasets using different spectral orders and the orders obtained with the
greedy method.
