Tailoring warfarin use poses a challenge for physicians and pharmacists due to its narrow therapeutic window and substantial inter-individual variability. This study aimed to create an adapted neural-fuzzy inference system (ANFIS) model using preprocessed balance data to improve the predictive accuracy of warfarin maintenance dosing in Chinese patients undergoing heart valve replacement (HVR). This retrospective study enrolled patients who underwent HVR between June 1, 2012, and June 1, 2016, from 35 centers in China. The primary outcomes were the mean difference between predicted warfarin dose by ANFIS models and actual dose and the models' predictive accuracy, including the ideal predicted percentage, the mean absolute error (MAE), and the mean squared error (MSE). The eligible cases were divided into training, internal validation, and external validation groups. We explored input variables by univariate analysis of a general linear model and created two ANFIS models using imbalanced and balanced training sets. We finally compared the primary outcomes between the imbalanced and balanced ANFIS models in both internal and external validation sets. Stratified analyses were conducted across warfarin doses (low, medium, and high doses). A total of 15,108 patients were included and grouped as follows: 12,086 in the imbalanced training set; 2820 in the balanced training set; 1511 in the internal validation set; and 1511 in the external validation set. Eight variables were explored as predictors related to warfarin maintenance doses, and imbalanced and balanced ANFIS models with multi-fuzzy rules were developed. The results showed a low mean difference between predicted and actual doses (< 0.3 mg/d for each model) and an accurate prediction property in both the imbalanced model (ideal prediction percentage, 74.39-78.16%; MAE, 0.37 mg/daily; MSE, 0.39 mg/daily) and the balanced model (ideal prediction percentage, 73.46-75.31%; MAE, 0.42 mg/daily; MSE, 0.43 mg/daily). Compared to the imbalanced model, the balanced model had a significantly higher prediction accuracy in the low-dose (14.46% vs. 3.01%; P < 0.001) and the high-dose warfarin groups (34.71% vs. 23.14%; P = 0.047). The results from the external validation cohort confirmed this finding. The ANFIS model can accurately predict the warfarin maintenance dose in patients after HVR. Through data preprocessing, the balanced model contributed to improved prediction ability in the low- and high-dose warfarin groups.