Government policy regarding the discourse on the use of renewable energy in electricity, this discourse is widely discussed in the community, especially on social media twitter. The public's response to the implementation of the use of renewable energy varies, there are positive, negative and neutral responses to this government policy. Sentiment analysis is part of Machine Learning which aims to identify responses in the form of text. The data used in this study amounted to 1,367 tweets. The purpose of this study is to determine the sentiment analysis of government discourse related to the use of renewable energy using an optimisation-based Support Vector Machine (SVM) algorithm approach. This research involves several stages including data collection, data pre-processing, experiments and modelling and evaluation. The data is divided into 3 classes, 120 positive, 1221 neutral and 26 negative. In this research, there are five optimisation models used namely Forward Selection, Backward Elimination, Optimised Selection, Bagging and AdaBoost. The results obtained are the use of Optimised Selection (OS) optimisation with the Support Vector Machine (SVM) algorithm obtained an increase in accuracy from 93% to 96%. The increase in the use of SVM using selection optimization obtained the highest increase, because other optimization techniques only reached 1% and 2% of the original results using the SVM algorithm, namely the accuracy value of 93% to 96% (high accuracy). From the research that has been done, it is certainly important to understand public sentiment towards renewable energy policies, especially renewable energy electricity, the hope is that this research will become a reference for the government.