A cognitive radio is a wireless communication system that uses the spectral environment to improve the efficiency of its operations. One of the most important phases of this system is the spectrum sensing. This process involves detecting the presence of signals in a specific frequency band. This paper presents a variety of machine learning-based solutions that are designed to improve the efficiency of the spectrum sensing process. These include K-Nearest Neighbors (KNN), Logistic regression, and Support vector machine (SVM) algorithms. The paper also shows how these solutions can be used in cooperative spectrum sensing by using non-orthogonal multiple access (NOMA) technique. The main objective of these solutions is to provide a comprehensive view of the presence of primary users (PUs) in a real-time dataset which is prepared using software defined radio (SDR). They are then used to identify the state of each user in a given area by providing an optimal boundary between presence and absence of primary users to achieve improved performance. The performance of these algorithms is analyzed by taking into account various factors such as accuracy, sensitivity, specificity, F1_score and confusion matrix.