To help a person make proper decisions, we must first understand the person's preferences. A natural way to determine these preferences is to learn them from the person's choices. In principle, we can use the traditional machine learning techniques: we start with all the pairs (x,y) of options for which we know the person's choices, and we train, e.g., the neural network to recognize these choices. However, this process does not take into account that a rational person's choices are consistent: e.g., if a person prefers a to b and b to c, this person should also prefer a and c. Since the usual learning algorithms do not take this consistency into account, the resulting choice-prediction algorithm may be inconsistent. It is therefore desirable to explicitly take consistency into account when training the network. In this paper, we show how this can be done.