KRL Commuter Line is a common transportation that is in great demand by the public. Affordable rates are the reason why commuter lines are in high demand. With so many users of this transportation service, the KRL Commuter Line must continue to improve services. In the process, there are often obstacles that cause users to make complaints. Users of Commuter Line often make complaints or give their opinions via social media twitter. In this study, sentiment analysis was carried out to Commuter Line users. Sentiment analysis is performed for the classification of tweets or tweets regarding commuter line service into positive and negative sentiments. The focus of this study is to compare the Support Vector Machine (SVM), SVM-Particle Swarm Optimization, Naive Bayes and NB-Adaboost algorithms. The data used was 1001 tweet data on Twiiter @CommuterLine. The comparison results obtained average values for SVM: 78.15%, SVM-PSO: 79.47%, NB: 76.67% and NB-Adaboost: 78.80%. So that it can be seen that the classification of algorithms using optimization methods can increase the average value. In this study, the SVM algorithm with the PSO optimization method is a better classification used compared to the SVM algorithm, Naive Baiyes and Naive Bayes with AdaBoost optimization.