Background: Vitamin B deficiency is common worldwide and may lead to psychiatric symptoms; however, vitamin B deficiency epidemiology in patients with intense psychiatric episode has rarely been examined. Moreover, vitamin deficiency testing is costly and time-consuming, which has hampered effectively ruling out vitamin deficiencyinduced intense psychiatric symptoms. In this study, we aimed to clarify the epidemiology of these deficiencies and efficiently predict them using machine-learning models from patient characteristics and routine blood test results that can be obtained within one hour.Methods: We reviewed 497 consecutive patients, who are deemed to be at imminent risk of seriously harming themselves or others, over a period of 2 years in a single psychiatric tertiary-care center. Machine-learning models (k-nearest neighbors, logistic regression, support vector machine, and random forest) were trained to predict each deficiency from age, sex, and 29 routine blood test results gathered in the period from Results: We found that 112 (22.5%), 80 (16.1%), and 72 (14.5%) patients had vitamin B 1 , vitamin B 12 , and folate (vitamin B 9 ) deficiency, respectively. Further, the machine-learning models were well generalized to predict deficiency in the future unseen data, especially using random forest; areas under the receiver operating characteristic curves for the validation dataset (i.e., the dataset not used for training the models) were 0.716, 0.599, and 0.796, respectively. The Gini importance of these vitamins provided further evidence of a relationship between these vitamins and the complete blood count, while also indicating a hitherto rarely considered, potential association between these vitamins and alkaline phosphatase (ALP) or thyroid stimulating hormone (TSH).