Ordinal regression based on data relationship