Modeling and Learning Social Influence from Opinion Dynamics