Support Vector Machines and Perceptrons: Learning, Optimization, Classification, and Application to Social Networks