Sentiment analysis of texts in social media has received a lot of attention in the fields of natural language processing and data mining in recent years as a result of the growth of social network services like Twitter and Weibo. Users of social media can share information on their platforms, and their numbers are always growing. As is common knowledge, themes and domains and sentiment analysis are strongly intertwined. It would be exceedingly challenging to manually gather enough labelled data from the large-scale social media, which covers a wide range of topics, to train sentiment classifiers for many domains. The various machine learning models is proposed in the previous years for the sentiment analysis. It is analyzed that models which are already been proposed are unable to attain good accuracy. In this paper, novel model is proposed which is the combination of PSO and genetic algorithm for the feature extraction and voting method is used for the classification. The proposed model is implemented in python and performance is measured in terms of accuracy, precision and recall. The proposed model is also tested on three different datasets with different number of instances. The datasets which are used for the sentiment analysis is of twitter and are collected using Tweepy API.