Med Lasers 2023; 12(4): 243-250
An improved machine learning model for calculation of intraocular lens power during cataract surgery in Republic of Korea: development
Jaeku Kang1, Seung Yong Choi1, Sejong Oh2, Kyong Jin Cho1
1Department of Ophthalmology, Dankook University Hospital, Dankook University College of Medicine, Cheonan, Republic of Korea
2Department of Software Science, Dankook University, Yongin, Republic of Korea
Received: October 4, 2023; Accepted: October 26, 2023; Published online: November 22, 2023.
© Korean Society for Laser Medicine and Surgery. All rights reserved.

This is an open access article distributed under the terms of the Creative Commons Attribution Non-Commercial License ( which permits unrestricted noncommercial use, distribution, and reproduction in any medium, provided the original work is properly cited.
Background: To assess an improved machine learning model for calculation of intraocular lens (IOL) power during cataract surgery.
Methods: We reviewed 346 medical records of cataract surgery patients from the Dankook University Hospital and developed a machine regression model to calculate IOL power. Well-known machine learning algorithms such as random forest, gradient boosting machine, support vector machine (SVM), and eXtreme Gradient Boosting were tested to develop the best prediction model. The model accuracy was judged by comparing the difference between the predicted refractory powers and the actual postoperative refractory ones based on ±0.25, ±0.5, ±0.75, and ±1 D. The prediction error was also evaluated by statistical measures. The proposed model was compared with existing formulas, such as SRK/T, Barrett Universal II, Hill-RBF, and Kane.
Results: The proposed SVM model produced an accuracy of 43.3%, 77.2%, 87.0%, and 95.4% for refraction powers based on ±0.25, ±0.5, ±0.75, and ±1 D, respectively. In contrast, the Barrett Universal II formula produced an accuracy of 34.3%, 60.8%, 83.2%, and 93.0% for refraction powers.
Conclusion: The proposed machine learning prediction model showed better performance than the current formulas. This improved machine learning model using machine learning calculations could thus be used in IOL power calculations.
Keywords: Cataract; Lens; Machine learning

Globally, cataract is a major cause of blindness in eye diseases. It is an illness caused by clouding of the lens, and there are various causes such as uveitis and side effects of steroid drugs. The commonest cause is the aging of the eyes and it is called senile cataracts. Treatment methods include medication and surgery but the surgery is required for the ultimate treatment, and medication is used as a supplement to surgery. The timing of the surgery is determined by considering the patient’s symptoms, type of cataract, and visual acuity. At present, the most commonly used surgery methods are phacoemulsification using ultrasonic waves and posterior intraocular lens (IOL) insertion. It is necessary to calculate the power accurately when performing surgery and insert the suitable IOL for the patient. This is because even if the IOL power is slightly different, there will be a large difference in postoperative refraction. Formulas for calculating the power have evolved using regression equations with several features that start with theoretical formulas and reflect the post-surgery results back to the equations. Nowadays, there are also methods using more features and through machine learning (ML).

In 2018, a research to calculate IOL power directly using multilayer perceptron was conducted [1]. They compared the accuracy of 1 to 5 layers. The evaluation was done by the difference between the refraction of IOL power predicted by the model and the refraction after the actual surgery, with respect to 0.5 and 1 D (diopter). In 2019, Sramka et al. [2] predicted IOL power by support vector machine (SVM) and multilayer neural network ensemble model. The five features (age, keratometry means, anterior chamber depth [ACD], axial length (AL), and preoperative refraction) are used for the prediction, and IOL ideal (IOLIdeal) was obtained as the target to correct the error after surgery. In 2021, Carmona González and Palomino Bautista [3] used Ratio B/Fx100, AL, ACD, lens thickness, white to white, K-mean anterior, K-mean posterior, and anterior segment depth (ASD) features in model. ML models (k-nearest neighbors, artificial neural networks, support vector machine, and random forest [RF]) predicted the IOL power using an ensemble technique. The ML models were compared with the existing formulas SRK-T [4], Barrett Universal II (BU-II) [5], Hill-RBF (HR) [6], and Kane formula [7]. The evaluation also included the difference between the refraction of the model and the refraction after surgery according to ±0.25, ±0.5, ±0.75, and ±1 D.

In this study, we conducted a more accurate IOL power calculation using a new ML model and compared it with the existing methods. We collected data with various features and test ML algorithms including SVM [8,9], RF [10], gradient boosting machine (GBM) [11,12], and eXtreme Gradient Boosting (XGBoost) [13]. The accuracy is judged by comparing the difference between the predicted refraction and the actual postoperative refraction.

Ethics statement: The study was approved by the Institutional Review Board (IRB) of Dankook University Hospital before initiation (IRB#DKUH2020-12-003-009). This study was a retrospective investigation, and data were collected from patient medical records.

The research work follows the process in Fig. 1. We collected data from medical devices and EMR (electric medical record) in Dankook University Hospital. Using features in base dataset, we synthesized several features, and add them to base dataset, and we performed feature selection to select best features for ML models. After feature selection, we performed model development. Four ML algorithms are tested with hyper parameter tuning. Each algorithm was evaluated and best performed algorithm was selected for a final model. Whole workflow was implemented by R ( and its packages.

Figure 1. Research workflow. GBM, gradient boosting machine; SVM, support vector machine; XGBoost, eXtreme Gradient Boosting; RMSE, root mean square error.

Data acquisition

The data used in this study were collected from 346 eyes of 272 patients who underwent the same procedure at Dankook University Hospital from 2014 to 2020. All patients underwent transparent corneal incision, followed by cataract surgery by phacoemulsification, and IOLs were inserted into the lens capsules. The IOLs inserted were ZCB00 (Abbott Medical Optics Inc.). Patients with no history of refractive surgery or ophthalmic diseases were enrolled. Data was collected from patients whose goal refraction was 0 D after surgery and the absolute value of the refraction was 1 D or less 1 month after surgery. The absolute value of cylinder values in all patients was less than 2 D, and the difference in AL between both eyes was less than 0.3 mm. To reduce the error, all patients were calculated IOL power using the SRK/T formula.

Feature engineering

To develop ML calculation models, we collected 24 numerical features. Biometry measurement (AL, K, K1D, K1mm, K1a, K2D, K2mm, K2a, ACD, CYLD, CYLa, RSEmm) are measures by IOL Master 500® (Carl Zeiss). CCT was measured using SP-3000P (Topcon). IOPpre was measured using CT-1P (non-contact tonometer; Topcon). Last four features are categorical and others are numerical.

1ELP=Cheight+ACDconst 3.336;ACDconst= 0.62467A  68.7472Cheight= R  R2Cwidth /221/23Cwidth= 5.41 + 0.58412*coAL + 0.098*337.5/R, where coAL = AL(if AL  24.4mm)      = 3.446 + 1.716*AL  0.0237*AL2if AL > 24.4mm4coAL=AL(ifAL24.4mm)= 3.446 + 1.716AL 0.0237AL2ifAL>24.4mm

Eq 1. Effective lens position (ELP) formula

Four features (K1DAL, RAL, ACDAL, Cheight, Cwidth, ASD) are synthesized one. K1DAL [14] is the product of the corneal keratometry values in the flat axes (K1D) and AL. RAL is the product of RSEmm and AL. ACDAL is the product of ACD and AL. Cwidth and Cheight is the effective lens position (ELP) of the IOL in cataract surgery Eq 1. As formulas evolved, there have been many efforts to predict ELP [4]. In the SRK/T formula, a linear equation for obtaining ELP was proposed [15,16].

We could finally select 7 features by checking the performance of all feature combinations. K1D, K1mm, K2D, CCT, HTN, age, K1DAL. Table 1 shows the distribution of the selected features. In Table 1, correlation is a linear correlation with the target feature IOLIdeal. And p-value is the significance probability of cor.test [17], a correlation analysis, and it has a negative correlation with K1DAL with a correlation coefficient of –0.905. No significant correlation was observed in the other features.

Table 1 . Numeric features distribution


SD, standard deviation; K, keratometry; CCT, corneal central thickness; K1DAL, product of K1D and AL; IOLIdeal, IOL ideal.

a)IOL Master 500® (Carl Zeiss), b)SP-3000P (Topcon).

c)Values calculated based on the acquired data.


Development of ML models

To develop an accurate ML calculation model, we tested four well known algorithms, RF, GBM, SVM, and XGboost. Table 2 describes algorithms and used parameters for experiment.

Table 2 . Parameter lists for machine learning algorithms

AlgorithmsR packageHyper parameters
RFrandomForestntree = 500, cv.folds = 5
GBMGbmdistribution = “gaussian”, cv.folds = 5, shrinkage = .03, n.minobsinnode = 7, interaction.depth = 7, n.trees = 500
SVMKernlabkernel = “ploydot”, gamma = 1, cost = 1
XGBoostXgboostnrounds = 150, eta = 0.1, max_depth = 2, subsample = 0.8, colsample_bytree = 0.6, booster = “gbtree”, gamma = 5, nthread = 0, objective = “reg:linear ”

RF, random forest; GBM, gradient boosting machine; SVM, support vector machine; XGBoost, eXtreme Gradient Boosting.

All ML models were designed and trained in R version 4.0.2 ( To find the appropriate hyperparameter, grid search was performed using the expand.grid function of the utils package. When predicting IOL power through the model, the predict function of the caret package was used. For 5-fold cross validation [18], the caret package createFolds function was used.

Evaluation criteria

For both the existing formulas and the ML models, the predicted refraction was calculated using the same equation, and the criteria were divided and compared with each other.

(1) RtheorPost = 1V1000-11000*(K1000-1/1000*(ELP1336-1/(1336*IOL1336 -1AL-ELP )))
(2) Rx05IOL= RxtheorPostIOL - RxtheorPost(IOL+0.5)
(3) IOLIdeal=IOLImplanted+(RxpostRx05IOL)*0.5

Eq 2. Calculation of IOLIdeal formula

RtheorPost is the theoretical refraction of the inserted IOL and it was calculated using the Reversed Eye Vergence Formula. V (vertex distance, mm), AL (mm), K (D) and ELP (mm) used to calculate RtheorPost Eq 2-(1). A change of the refraction at the spectacle plane by changing the IOL power value was computed using Eq 2-(2). Dioptric change of refraction at the spectacle plane in case of IOL value change of 0.5 D was calculated. IOLIdeal calculation was expressed by Eq 2-(3). IOLIdeal is the ideal IOL power that makes the predicted refraction 0 D after surgery by using the postoperative refraction (Rpost) and the implanted IOL power (IOLImplanted).

The evaluation is compared with the predicted refraction (Rpred) obtained by substituting the IOL power predicted by the existing formulas and the ML model into Eq 3. Rpred is calculated by Eq 3. In Eq 3, Rpred was derived from IOLPredicted. IOLPredicted is the expected IOLIdeal value of the test set by the model.

Rpred= IOLImplanted -IOLPredicted 0.5*Rx05IOL+Rxpost

Eq 3. Calculation of Rpred

The minimum, maximum, mean error, Mean AE (mean absolute error), Median AE (median absolute error), and SD (standard deviation) of the refraction predicted through the model were compared after surgery. Based on predicted refraction (Rpred) of the model all patients that do not exceed the standard (less than ±0.25, ±0.5, ±0.75, and ±1 D) are used for accuracy, and the ML models and existing formulas are compared. In cataract surgery, it is recommended to correct the refraction to ±0.5 D or less after surgery to obtain optimal vision and patient satisfaction. Therefore, in this experiment, ±0.5 D was mainly checked for accuracy, and ±0.25, ±0.75, and ±1 D were also investigated for the overall trend [19]. R 3.4.4 version was used as a statistical analysis tool.


Before comparing them to ML models we compared the errors and accuracy of existing formulas (SRK/T, BU-II, HR, and Kane). Error criteria were minimum, maximum, mean prediction error (ME), mean absolute prediction error (MAE), and median absolute prediction error (MedAE). Accuracy was divided into ±0.25, ±0.5, ±0.75, and ±1 D for comparison.

Table 3 shows the results of prediction of IOL power using selected 7 features in the ML models. This is the result of using 5-fold Cross Validation (CV). Fig. 2 shows compared graphs of Table 3.

Table 3 . Comparison between existing formulas and machine learning models in prediction errors 7 features

Eye within prediction error (%)
±0.25 D30.934.330.137.937.840.235.043.3
±0.5 D64.560.861.865.964.768.266.277.2
±0.75 D84.
±1 D94.593.092.595.494.596.093.795.4

BU-II, Barrett Universal II; HR, Hill-RBF; RF, random forest; GBM, gradient boosting machine; XGBoost, eXtreme Gradient Boosting; SVM, support vector machine; ME, mean prediction error; MAE, mean absolute prediction error; MedAE, median absolute prediction error; SD, standard deviation; D, diopter.

Figure 2. The accuracy (A) and error (B) SRK/T formula and support vector machine (SVM) models. SD, standard deviation; MedAE, median absolute prediction error; MAE, mean absolute prediction error; ME, mean prediction error; Max, maximum; Min, minimum.

In Table 3, the performance of the model that calculated the IOL power using ML models was better than the existing formulas. First, in error, the maximum and minimum values of the difference between the postoperative refraction and the predicted refraction are better performance in ML models. In addition, it showed good performance in ME and MAE. Although the performance of ML models is good in terms of accuracy, it could be seen that the difference in performance decreases with ±0.25, ±0.5, ±0.75, and ±1 D. However, accuracy at lower standards means much more sophisticated and accurate surgery [20]. Likewise, the HR formula is a formula that calculates the IOL power using ML, and there were models with similar performance (RF, GBM, and XGBoost) or higher performance (SVM) as ML models.

In Fig. 3, SRK/T, which showed the highest accuracy among existing formulas, and SVM, which showed the highest performance among ML models, were compared. Since HR is a calculation formula using artificial intelligence technology, it was not included in the existing formula category. There was a big difference in error and there was also a difference in accuracy. In terms of accuracy, especially at ±0.5 D, SRK/T was 64.5% and SVM was 77.2%, with the largest difference of 12.7%.

Figure 3. Accuracy comparison according to the axial length group based on ±0.5 D. BU-II, Barrett Universal II; HR, Hill-RBF; RF, random forest; GBM, gradient boosting machine; XGBoost, eXtreme Gradient Boosting; SVM, support vector machine.

Table 4 describes result of accuracy analysis according to AL group. Dataset was divided into 85 eyes of less than 23 mm (Short group), 158 eyes of more than 23 mm and less than 24 mm (Medium group), and 103 eyes of more than 24 mm (Long group). The accuracies are collected from 5-fold CV test in Table 3.

Table 4 . Accuracy in different eye axial length groups

Long (n = 103)±0.2535.941.739.841.735.
Medium (n = 158)±0.2532.935.429.134.834.737.334.248.0
Short (n = 85)±0.2521.235.320.038.831.639.031.230.6
All (n = 346)±0.2530.934.330.137.937.840.235.043.3

Values are presented as percent.

SRK/T, Barrett Universal II (BU-II), Kane, and Hill-RBF (HR) are existing formulas. Support vector machine (SVM), random forest (RF), gradient boosting machine (GBM), and eXtreme Gradient Boosting (XGBoost) are machine learning models.

First of all, Long group performed the best in the existing formulas. And the Medium group had good performance and the Short group had the worst performance. It should be noted that the Long group performed very well in the Kane formula. ML models had the best performance in the Medium group and performed well in the Long group and Short group. The characteristics did not fluctuate severely depending on the AL like the existing formulas, and it was confirmed that the accuracy of the existing formulas was higher in the Long group. Both types of calculation formulas were found to have the worst performance when the AL was short.

Comparing the accuracy of ±0.5 D, which should be noted the most, SVM performed the best at 67.0% in the short group, and SVM performed 77.9% in the medium group, and BU-II and Kane formulas were accurate in the long group. And in the entire group, the SVM model was the best at 77.2%.

In Fig. 4, the error between SRK/T and SVM can be confirmed based on ±0.5 D. Here, the error is the actual refractive index-expected refractive index after surgery. Since SRK/T is more spread than SVM, it can be seen that more errors occurred.

Figure 4. Accuracy comparison between support vector machine (SVM) (A) and SRK/T (B) based on ±0.5 D.

It can also be confirmed in previous studies that the Kane formula shows good performance in the group with an AL of 24 mm or more [21]. Compared to SRK/T, it can be seen that 25.1% absolute error was reduced in the long group and 25.5% performance was improved in the short group compared to the Hoffer-Q formula. However, there may be differences from this study because existing studies designated the long group as 26 mm or more and the short group as 22 mm group.

There are some limitations of the current study. The number of data is insufficient compared to other studies. Also, more number of A-constant values should be considered. The current study used one A-constant values to develop ML models, but it is necessary to develop a model that can calculate accurate IOL power with many different A-constant values of various IOLs. If we create a ML predictive model for each AL group, better performance is expected.

In conclusion, IOL power values were calculated using the existing formulas (SRK/T, BU-II, HR, and Kane) and ML models (SVM, RF, GBM, and XGBoost). They were compared with each other. The errors and the accuracy of the refraction were also compared, and it was shown that the ML models were more accurate than the existing formulas in the IOL power calculation. The difference from previous studies is that it has better reliability by comparing four existing formulas with four ML models. Features related to K1 such as K1mm, K1D, and K1DAL were found to play an important role. In the future, if we do research with weights on K1 when conducting further research, I think we will be able to find a more accurate IOL power calculation formula.

The accuracy of the data with ±0.5 D by the existing formulas ranges from 60.8% to 65.9%, and ML models from 64.7% to 77.2%. The absolute value of error also tends to be lower. The lower the refraction, the larger the difference, confirming that the ML model is more accurate.

In this study, new features were proposed for the calculation of the IOL power. Three features are considered in this study: K1DAL, which are the calculated values by combining existing features. K1DAL is the combined corneal keratometry value of the flat axes (K1D) and the value of AL. By multiplying the two significant features, it became more significant as it was affected by the change. This study not only improved the overall accuracy in calculating IOL power but also suggested a new standard for Korean IOL power calculation.




Conceptualization: KJC. Data curation: JK. Formal analysis: JK. Funding acquisition: KJC. Investigation: JK, SYC, SO. Methodology: SO. Project administration: KJC, SO. Software: JK. Validation: SO. Visualization: SO. Writing–original draft: JK. Writing–review & editing: all authors.


Kyong Jin Cho is an editorial board member of the journal, but was not involved in the review process of this manuscript. Otherwise, there is no conflict of interest to declare.


This work was supported by the Korea Medical Device Development Fund grant funded by the Korea government (the Ministry of Science and ICT, the Ministry of Trade, Industry and Energy, the Ministry of Health & Welfare, the Ministry of Food and Drug Safety) (RS-2020-KD000171).


Contact the corresponding author for data availability.

  1. Fernández-Álvarez JC, Hernández-López I, Cruz-Cobas PP, Cárdenas-Díaz T, Batista-Leyva AJ. Using a multilayer perceptron in intraocular lens power calculation. J Cataract Refract Surg 2019;45:1753-61.
    Pubmed CrossRef
  2. amka M Sr, Slovak M, Tuckova J, Stodulka P. Improving clinical refractive results of cataract surgery by machine learning. PeerJ 2019;7:e7202.
    Pubmed KoreaMed CrossRef
  3. Carmona González D, Palomino Bautista C. Accuracy of a new intraocular lens power calculation method based on artificial intelligence. Eye (Lond) 2021;35:517-22.
    Pubmed KoreaMed CrossRef
  4. Retzlaff JA, Sanders DR, Kraff MC. Development of the SRK/T intraocular lens implant power calculation formula. J Cataract Refract Surg 1990;16:333-40.
    Pubmed CrossRef
  5. Barrett GD. Intraocular lens calculation formulas for new intraocular lens implants. J Cataract Refract Surg 1987;13:389-96.
    Pubmed CrossRef
  6. Hill WE. Haag-Streit White Paper. Hill-RBF method [Internet]. Haag Streit; 2017. [cited 2020 Oct 28]. Available from:
  7. Connell BJ, Kane JX. Comparison of the Kane formula with existing formulas for intraocular lens power selection. BMJ Open Ophthalmol 2019;4:e000251.
    Pubmed KoreaMed CrossRef
  8. Cortes C, Vapnik V. Support-vector networks. Mach Learn 1995;20:273-97.
  9. Vapnik V, Golowich SE, Smola A. Support vector method for function approximation, regression estimation and signal processing. In: Jordan MI, Petsche T, editors, NIPS'96: Proceedings of the 9th International Conference on Neural Information Processing Systems; 1996 Dec 3-5. Denver, Colorado: MIT Press; 1996. p. 281-7.
  10. Breiman L. Classification and regression trees. Wadsworth International Group; 1984.
  11. Freund Y, Schapire RE. Experiments with a new boosting algorithm. ICML'96: Proceedings of the Thirteenth International Conference on International Conference on Machine Learning; 1996 Jul 3-6. Bari: Morgan Kaufmann Publishers Inc.; 1996. p. 148-56.
  12. Friedman JH. Greedy function approximation: a gradient boosting machine. Ann Stat 2001;29:1189-232.
  13. Chen T, He T. xgboost: eXtreme Gradient Boosting [Internet]. XGBoost; 2014. [cited 2020 Oct 28]. Available from:
  14. Jeong JH, Kim SG, Lee HJ, Lee SH, Cha DM. Theoretical and clinical comparison of the Hoffer Q and SRK/T formulas. J Korean Ophthalmol Soc 2014;55:85-92.
  15. Olsen T. Calculation of intraocular lens power: a review. Acta Ophthalmol Scand 2007;85:472-85.
    Pubmed CrossRef
  16. Olson M, Wyner AJ, Berk R. Modern neural networks generalize on small data sets. In: Bengio S, Wallach HM, Larochelle H, Grauman K, Cesa-Bianchi N, editors, NIPS'18: Proceedings of the 32nd International Conference on Neural Information Processing Systems; 2018 Dec 3-8. Montréal: Curran Associates Inc.; 2018. p. 3623-32.
  17. Yu D, Qiu W, Zhang Z, Glass K, Su J, DeMeo DL, et al. Package 'corTest' [Internet]. R Core Team. ; 2020. [cited 2020 Oct 28]. Available from:
  18. Refaeilzadeh P, Tang L, Liu H. Cross-validation. In: Liu L, Tamer Özsu M, editors, Encyclopedia of Database Systems. Springer; 2009. p. 532-8.
  19. Sigireddi RR, Weikert MP. How much astigmatism to treat in cataract surgery. Curr Opin Ophthalmol 2020;31:10-4.
    Pubmed CrossRef
  20. Kim M, Eom Y, Song JS, Kim HM. Comparative evaluation of refractive outcomes after implantation of two types of intraocular lenses with different diopter intervals (0.25 diopter versus 0.50 diopter). BMC Ophthalmol 2018;18:176.
    Pubmed KoreaMed CrossRef
  21. Kane JX, Connell B, Yip H, McAlister JC, Beckingsale P, Snibson GR, et al. Accuracy of intraocular lens power formulas modified for patients with keratoconus. Ophthalmology 2020;127:1037-42.
    Pubmed CrossRef

This Article

Cited By Articles
  • CrossRef (0)
  • Download (119)

Author ORCID Information

Funding Information


Social Network Service