Machine learning study of D:A1:A2 ternary organic solar cells