(Dormann et al. 2013). We use two ML algorithms Conditional inference forests (CIF) and Least absolute shrinkage and selection operator (LASSO).

We find that ML methods outperform standard OLS in out-of-sample prediction by 14-24 percent. Also, the identified variables of importance are largely consistent across our two, very different, ML methods. ML results are in line with previous research in that commonly used teacher characteristics such as, teacher gender, education qualifications, experience etc. do not seem to hold much predictive power for student learning gains. Instead, what teachers do in terms of specific classroom practices (measured through classroom observations and student surveys) and what teachers believe in terms of how they perceive the abilities of their students and the environment around them (measured through teacher surveys) are consistently revealed to be important.

Overall, teacher covariates matter more, and differently, for Math than Kiswahili. For Math, the teacher belief that they can help disadvantaged and struggling students learn; the teacher practice of providing clear and helpful written feedback (on homework and tests); and the teacher preparation in teaching foundational concepts are the three most predictive factors for student learning gains. For Kiswahili, where teacher (and other observable) covariates are on the whole less predictive, teacher preparation, practice, and beliefs still emerge as being important. Specifically, the teacher belief that action is taken against poor teacher performance; the teacher practice of providing extra help to struggling students<sup>4</sup> ; and (as in Math) teacher preparation in teaching foundational concepts are the three most predictive teacher covariates for student learning gains.

Our paper contributes in two ways to the literature on teacher effectiveness. It demonstrates how machine learning techniques can help address long-standing prediction problems in education economics, including that of predicting student learning gains linked to a teacher. Applications of ML in education economics are still not very common. We were able to find three types– one for predicting student dropouts (Aulck et al. 2016; Adelman et al. 2018; Sansone 2019), the second for predicting student performance in international tests like TIMSS and PISA and national tests (Agasisti et al. 2018) and finally in modeling teacher productivity (Chalfin et al. 2016). By applying ML techniques to a rich set of control variables, we are able to explore the question of teacher effectiveness with much more granularity, while letting the data speak. This last part is particularly important because it allows for the use of flexible and non-parametric approaches in estimation while restricting arbitrary judgements on the part of the researcher, the scope for which only increases with a richer set of controls.

Another set of important but less overtly actionable insights relate to the importance of teacher beliefs in determining teacher effectiveness. The paper shows that teacher beliefs about whether students can learn and whether they have good relationships matter for their effectiveness. This finding corroborates a sizeable but scattered body of evidence on the importance of teacher beliefs for student outcomes (Sabarwal et. al 2021). Given that teacher beliefs have not been given much systematic attention in the design and implementation of teacher policies, these findings suggest that these beliefs might be an important but missing ingredient of programs and policies for teacher effectiveness. The question is – can these beliefs be changed through interventions and policies? Recent research from different disciplines show that they can. A body of research in education (e.g. Dweck 2006, Yeager et al. 2012, Paunesku et al. 2015) and

> 4 During breaks, lunch, or after school.

3