We propose and validate a model for pedestrian walking behavior, based on discrete choice modeling. Two main types of behavior are identified: unconstrained and constrained. By unconstrained, we refer to behavior patterns which are independent from other individuals. The constrained patterns are captured by a leader-follower model and by a collision avoidance model. The spatial correlation between the alternatives is captured by 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 successfully validated using a bi-directional flow data set, collected in controlled experimental conditions at Delft university.