Hiqh-quality diffusion tractography depends on the accurate estimation of orientation distribution functions (ODFs). Existing estimation methods often use modeling assumptions that are violated by real data, lack theoretical characterization, and/or are only applicable to a narrow class of q-space sampling patterns. As a result, existing approaches may be suboptimal. This work proposes a novel ODF estimation approach that learns a linear ODF estimator from training data. The approach can be applied to arbitrary q-space sampling schemes, has strong theoretical justification, and it can be shown that the trained estimators will generalize to new settings they weren’t trained for.