Journal of Medical Internet Research - International Scientific Journal for Medical Research, Information and Communication on the Internet #Preprint #PeerReviewMe: Warning: This is a unreviewed preprint. Readers are warned that the document has not been peer-reviewed by expert/patient reviewers or an academic editor, may contain misleading claims, and is likely to undergo changes before final publication, if accepted, or may have been rejected/withdrawn. Readers with interest and expertise are encouraged to sign up as peer-reviewer, if the paper is within an open peer-review period. Please cite this preprint only for review purposes or for grant applications and CVs (if you are the author). Background: Virtually all organisms on Earth have their own circadian rhythm, and humans are no exception. Circadian rhythms are associated with various human states, especially mood disorders and disturbance of circadian rhythm is known to be very closely related. Attempts have also been made to derive clinical implications associated with mood disorders using the acquiring vast amounts of the digital log as digital technologies develop and using computational analysis techniques. Objective: The present study was conducted to evaluate the mood state/episode, activity, sleep, light exposure, and heart rate during a period of about two years by acquiring various digital log data through wearable devices and smartphone applications as well as conventional clinical assessments. We investigated a mood prediction algorithm developed with machine learning using passive data phenotypes based on circadian rhythms. Methods: We performed a prospective observational cohort study on fifty-five patients with mood disorders (major depressive disorder, bipolar disorder type 1 and 2; MDD, BD I, and BD II, respectively) for two years. A smartphone application for self-recording daily mood scores and detecting light exposure (using the installed sensor) were provided. From daily worn activity trackers, digital log data of activity, sleep, and heart rate were collected. Passive digital phenotypes were processed into 130 features based on circadian rhythms, and a mood prediction algorithm was developed by random forest. Results: The mood state prediction accuracies for next three days in all patients, MDD, BD I, and BD II were 65, 65, 64, and 65%, with 0.7, 0.69, 0.67, and 0.67 area under the curve (AUC) values, respectively. The accuracies of all patients for no episode (NE), depressive episode (DE), manic episode (ME) and hypomanic episode (HME) were 85.3, 87, 94, and 91.2%, with 0.87, 0.87, 0.958, and 0.912 of AUCs, respectively. The prediction accuracy in BD II patients was distinctively balanced high showing 82.6, 74.4, and 87.5% of the accuracies (with generally good sensitivity and specificity), with 0.919, 0.868, and 0.949 of the AUCs for NE, DE, and HME, respectively. Conclusions: Based on the theoretical basis of chronobiology, this study proposed a good model of future research by developing a mood prediction algorithm using machine learning by processing and reclassifying digital log data. In addition to academic value, it is expected that this study will be of practical help to improve the prognosis of patients with mood disorder by making it possible to apply actual clinical application due to the rapid expansion of digital technology. Clinical Trial: ClinicalTrials.gov: NCT03088657