Hepatitis B is a liver infection caused by the hepatitis B virus and is considered a global health issue. Although traditional hepatitis B detection is performed through blood tests, these conventional methods in healthcare are increasingly being replaced or supplemented by Artificial Intelligence (AI) models. Machine Learning, a field of AI, enables computers to learn from data sets. Machine Learning has been applied in the healthcare sector, assisting medical experts in decision-making and yielding favorable results. This study proposes diagnosing hepatitis B through a new classification model that uses hyperplanes to partition the dimensional space into sections where vectors belong to the same class. This partitioning infers a decision tree, allowing for the diagnosis of hepatitis B. The proposed model was applied to the hepatitis dataset from the University of California, Irvine (UCI) Machine Learning Repository and was compared with other state-of-the-art classification models. The performance evaluation metrics used were Sensitivity, Specificity, and Accuracy. The evaluation metrics obtained with the proposed model were 71%, 96%, and 90.63% for Sensitivity, Specificity, and Accuracy, respectively, achieving superior results compared to the models with which it was compared.