We propose and validate a model for pedestrian walking behavior, based on discrete choice modeling. Two main behaviors are identified: unconstrained and constrained. The constrained patterns are captured by a leader-follower model and by a collision avoidance model. The spatial correlation between the alternatives is taken into account defining a cross nested logit model. The model is estimated by maximum likelihood estimation on a real data set of pedestrian trajectories, manually tracked from video sequences. The model is validated using a bi-directional flow data set, collected in controlled experimental conditions at Delft university.