Collective motion phenomena in large groups of social organisms have long fascinated the observer, especially in cases, such as bird flocks or fish schools, where large-scale highly coordinated actions emerge in the absence of obvious leaders. However, the mechanisms involved in this self-organized behavior are still poorly understood, because the individual-level interactions underlying them remain elusive. Here, we demonstrate the power of a bottom-up methodology to build models for animal group motion from data gathered at the individual scale. Using video tracks of fish shoal in a tank, we show how a careful, incremental analysis at the local scale allows for the determination of the stimulus/response function governing an individual's moving decisions. We find in particular that both positional and orientational effects are present, act upon the fish turning speed, and depend on the swimming speed, yielding a novel schooling model whose parameters are all estimated from data. Our approach also leads to identify a density-dependent effect that results in a behavioral change for the largest groups considered. This suggests that, in confined environment, the behavioral state of fish and their reaction patterns change with group size. We debate the applicability, beyond the particular case studied here, of this novel framework for deciphering interactions in moving animal groups.