Diagnosing bipolar disorder presents significant challenges due to the disorder's diverse mood patterns, which complicate the accurate identification of mood fluctuations. However, with systematic evaluation and comprehensive analysis, enhancing diagnostic precision and improving treatment outcomes is feasible. The unclear etiology is influenced by multiple factors, such as changes in brain structure, genetic predispositions, and environmental conditions. The current diagnostic challenges prompt the exploration of machine learning (ML). This study presents a novel computational framework that uses machine learning to help diagnose bipolar disorder, with a focus on mood swing patterns derived from behavioral stimulation. The proposed framework comprises three operational models: a dynamic mood transition model based on stochastic processes, a binary mood state classification model using a Bayesian neural network, with a predictive analysis model powered by Recurrent Neural Decision Trees. Performance comparisons with existing methods demonstrate the proposed framework's enhanced accuracy and reduced processing time, providing a refined approach to feature extraction, classification, and learning optimization for enhanced diagnostic accuracy in bipolar disorder. The proposed approach holds significant promise for enhancing bipolar disorder diagnosis.