The study of animal behavior is a fundamental pursuit for answering scientific questions across a variety of fields — including neuroscience, psychology, ecology, genetics, and evolution.While the task of collecting accurate and complete behavioral data has typically always been difficult, laborious, and subjective, in recent years there has been rapid progress in methods for automatically quantifying behavior objectively and at scale. This progress has been primarily driven by the emergence of new computational hardware, software, and algorithms for measuring behavior. In order to reveal core insights about how animals organize their behavior with the increased quality and resolution of these data comes the need for new methods for data-driven modeling. Here, in this thesis, I focus on computational tools—the development of new algorithms and software—for measuring and modeling behavior using methods from computer vision, deep learning, Bayesian inference, and probabilistic programming, while also synthesizing these approaches with ideas from other relevant areas such as information theory, nonlinear dynamics, and statistical physics. First, I developed a barcode tracking system for automated behavioral studies where the location and identity of individuals can be reliably tracked over several weeks (or potentially longer) using conventional computer vision (Chapter 1). Next, I developed general-purpose deep learning methods for measuring animal posture — any set of user-selected body parts — in the laboratory and field (Chapter 2). Finally, I introduce methods for using these posture data to model behavior with techniques from machine learning andBayesian statistical inference (Chapter 3). Together these methods reduce barriers to measuring and modeling animal behavior and allow researchers to answer scientific questions that were previously intractablepublishe