<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article">
 <front>
  <journal-meta>
   <journal-id journal-id-type="publisher-id">
    jdaip
   </journal-id>
   <journal-title-group>
    <journal-title>
     Journal of Data Analysis and Information Processing
    </journal-title>
   </journal-title-group>
   <issn pub-type="epub">
    2327-7211
   </issn>
   <issn publication-format="print">
    2327-7203
   </issn>
   <publisher>
    <publisher-name>
     Scientific Research Publishing
    </publisher-name>
   </publisher>
  </journal-meta>
  <article-meta>
   <article-id pub-id-type="doi">
    10.4236/jdaip.2024.124031
   </article-id>
   <article-id pub-id-type="publisher-id">
    jdaip-137299
   </article-id>
   <article-categories>
    <subj-group subj-group-type="heading">
     <subject>
      Articles
     </subject>
    </subj-group>
    <subj-group subj-group-type="Discipline-v2">
     <subject>
      Computer Science 
     </subject>
     <subject>
       Communications, Physics 
     </subject>
     <subject>
       Mathematics
     </subject>
    </subj-group>
   </article-categories>
   <title-group>
    An Analysis and Prediction of Health Insurance Costs Using Machine Learning-Based Regressor Techniques 
   </title-group>
   <contrib-group>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Gagan Kumar
      </surname>
      <given-names>
       Patra
      </given-names>
     </name> 
     <xref ref-type="aff" rid="aff1"> 
      <sup>1</sup>
     </xref>
    </contrib>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Chandrababu
      </surname>
      <given-names>
       Kuraku
      </given-names>
     </name> 
     <xref ref-type="aff" rid="aff2"> 
      <sup>2</sup>
     </xref>
    </contrib>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Siddharth
      </surname>
      <given-names>
       Konkimalla
      </given-names>
     </name> 
     <xref ref-type="aff" rid="aff3"> 
      <sup>3</sup>
     </xref>
    </contrib>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Venkata Nagesh
      </surname>
      <given-names>
       Boddapati
      </given-names>
     </name> 
     <xref ref-type="aff" rid="aff4"> 
      <sup>4</sup>
     </xref>
    </contrib>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Manikanth
      </surname>
      <given-names>
       Sarisa
      </given-names>
     </name> 
     <xref ref-type="aff" rid="aff5"> 
      <sup>5</sup>
     </xref>
    </contrib>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Mohit Surender
      </surname>
      <given-names>
       Reddy
      </given-names>
     </name> 
     <xref ref-type="aff" rid="aff4"> 
      <sup>4</sup>
     </xref>
    </contrib>
   </contrib-group> 
   <aff id="aff1">
    <addr-line>
     aTata Consultancy Services, Charlotte, NC, USA
    </addr-line> 
   </aff> 
   <aff id="aff2">
    <addr-line>
     aMitaja Corportaion, Woodlawn, MD, USA
    </addr-line> 
   </aff> 
   <aff id="aff3">
    <addr-line>
     aAdobe, Seattle, WA, USA
    </addr-line> 
   </aff> 
   <aff id="aff4">
    <addr-line>
     aMicrosoft, Charlotte, NC, USA
    </addr-line> 
   </aff> 
   <aff id="aff5">
    <addr-line>
     aAlly Financial Inc, Charlotte, NC, USA
    </addr-line> 
   </aff> 
   <pub-date pub-type="epub">
    <day>
     06
    </day> 
    <month>
     09
    </month>
    <year>
     2024
    </year>
   </pub-date> 
   <volume>
    12
   </volume> 
   <issue>
    04
   </issue>
   <fpage>
    581
   </fpage>
   <lpage>
    596
   </lpage>
   <history>
    <date date-type="received">
     <day>
      30,
     </day>
     <month>
      September
     </month>
     <year>
      2024
     </year>
    </date>
    <date date-type="published">
     <day>
      9,
     </day>
     <month>
      September
     </month>
     <year>
      2024
     </year> 
    </date> 
    <date date-type="accepted">
     <day>
      9,
     </day>
     <month>
      November
     </month>
     <year>
      2024
     </year> 
    </date>
   </history>
   <permissions>
    <copyright-statement>
     © Copyright 2014 by authors and Scientific Research Publishing Inc. 
    </copyright-statement>
    <copyright-year>
     2014
    </copyright-year>
    <license>
     <license-p>
      This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/
     </license-p>
    </license>
   </permissions>
   <abstract>
    One of the most significant annual expenses that a person has is their health insurance coverage. Health insurance accounts for one-third of GDP, and everyone needs medical treatment to varying degrees. Changes in medicine, pharmaceutical trends, and political factors are only a few of the many factors that cause annual fluctuations in healthcare costs. This paper describes how a system may analyse a person’s medical history to display their insurance plans and make predictions about their health insurance premiums. The performance of four ML models—XGBoost, Lasso, KNN, and Ridge—is evaluated using R2-score and RMSE. The analysis of medical health insurance cost prediction using Lasso regression, Ridge regression, and K-Nearest Neighbours (KNN), and XGBoost (XGB) highlights notable differences in performance. KNN has the lowest R
    <sup>2</sup>-score of 55.21 and an RMSE of 4431.1, indicating limited predictive ability. Ridge Regression improves on this by an R
    <sup>2</sup>-score of 78.38 but has a higher RMSE of 4652.06. Lasso Regression slightly edges out Ridge with an R
    <sup>2</sup>-score of 79.78, yet it suffers from an advanced RMSE of 5671.6. In contrast, XGBoost excels with the highest R
    <sup>2</sup>-score of 86.81 and the lowermost RMSE of 4450.4, demonstrating superior predictive accuracy and making it the most effective model for this task. The best method for accurately predicting health insurance premiums was XGBoost Regression. The findings beneficial for policymakers, insurers, and healthcare providers as they can use this information to allocate resources more efficiently and enhance cost-effectiveness in the healthcare industry.
   </abstract>
   <kwd-group> 
    <kwd>
     Medical Cost
    </kwd> 
    <kwd>
      Health Insurance
    </kwd> 
    <kwd>
      Cost Prediction
    </kwd> 
    <kwd>
      Medical Cost Personal Datasets
    </kwd> 
    <kwd>
      Machine Learning
    </kwd>
   </kwd-group>
  </article-meta>
 </front>
 <body>
  <sec id="s1">
   <title>1. Introduction</title>
   <p>Healthcare costs are now the world’s most critical problem. A significant instrument for enhancing accountability in healthcare is now people’s healthcare expense predictions. Due to a lack of proper analysis, the vast quantities of patient, illness, and diagnosis data produced by the healthcare business are meaningless, despite the high cost of treating real people <xref ref-type="bibr" rid="scirp.137299-1">
     [1]
    </xref> <xref ref-type="bibr" rid="scirp.137299-2">
     [2]
    </xref>. The cost of losses brought on by a range of risks may be covered or reduced by a health insurance policy. Healthcare and insurance costs are influenced by a number of variables <xref ref-type="bibr" rid="scirp.137299-3">
     [3]
    </xref>. Numerous stakeholders and health authorities rely on prediction models for accurate cost estimates of individual treatment <xref ref-type="bibr" rid="scirp.137299-4">
     [4]
    </xref> <xref ref-type="bibr" rid="scirp.137299-5">
     [5]
    </xref>. Accurate cost estimations are useful in helping healthcare delivery organizations and health insurers make long-term plans and allocate scarce resources for care management in a more efficient manner <xref ref-type="bibr" rid="scirp.137299-6">
     [6]
    </xref> <xref ref-type="bibr" rid="scirp.137299-7">
     [7]
    </xref>. Additionally, by being aware of their expected future costs in advance, patients may choose insurance plans with suitable rates and deductibles. The creation of insurance policies is influenced by these factors <xref ref-type="bibr" rid="scirp.137299-8">
     [8]
    </xref>.</p>
   <p>Stakeholders and health authorities must properly estimate individual healthcare expenditures using prediction models due to the large number of factors that affect insurance or healthcare costs <xref ref-type="bibr" rid="scirp.137299-9">
     [9]
    </xref>. Having reliable cost projections is crucial for healthcare delivery organisations and health insurers when it comes to long-term planning and allocating scarce resources for care management <xref ref-type="bibr" rid="scirp.137299-10">
     [10]
    </xref>. The insurance industry may benefit from ML by using it to improve the efficiency of policy language <xref ref-type="bibr" rid="scirp.137299-11">
     [11]
    </xref>. Forecasting expensive, high-need patient spending is one area where ML algorithms excel in healthcare <xref ref-type="bibr" rid="scirp.137299-12">
     [12]
    </xref>-<xref ref-type="bibr" rid="scirp.137299-14">
     [14]
    </xref>. In this work, we compared and contrasted the performance of several regression models for forecasting health insurance premiums using supervised ML models.</p>
   <sec id="s1_1">
    <title>1.1. Contribution and Aim of Paper</title>
    <p>The contribution of this study lies in developing a robust approach to forecasting medical insurance costs employing advanced ML techniques. This research has made the following contributions:</p>
   </sec>
   <sec id="s1_2">
    <title>1.2. Structure of Paper</title>
    <p>The remainder of the paper adheres to this format. Section II provides an overview of medical health insurance. Section III provides a detailed description of the method. In Section IV, the results, analysis, and conclusions are contrasted. The study’s findings and possible directions for the future are outlined in depth in Section V.</p>
    <sec id="s1">
     <title>
      <xref ref-type="bibr" rid="scirp.137299-"></xref>2. Literature Review</title>
     <p>
      <xref ref-type="bibr" rid="scirp.137299-"></xref>In the literature review, various studies are discussed regarding the prediction of health insurance premiums and healthcare costs using machine learning algorithms that are provided in this section.</p>
     <p>In Vijayalakshmi, Selvakumar and Panimalar (2023), For insurance cost prediction, the dataset with 24 characteristics was used, which included all relevant attributes. It is implemented utilising R programming’s regression methods, including LR, DT, Lasso, Ridge, RF, Elastic Net, SVR, KNN, and Neural Network. Using an RS squared value of 0.9533, RFR demonstrated superior performance <xref ref-type="bibr" rid="scirp.137299-15">
       [15]
      </xref>.</p>
     <p>In Marinova and Todorova, (2023) evaluate the model’s performance, we used R-Squared, RMSE, and training time as measurement measures. There is a 0.94 accuracy rate for the BMI feature model using the Bagged method, according to the testing data. Models built using the Bagged technique have a MSE of 0.06 for the attributes Smoker and Blood Pressure. It takes more time to train models that were constructed using the SVM compared to other methods <xref ref-type="bibr" rid="scirp.137299-16">
       [16]
      </xref>.</p>
     <p>In Thejeshwar et al. (2023), seeks to educate the general people about insurance in order to facilitate their acquisition at an accurate and reasonable cost. The models’ predictions were enhanced by training on a dataset. By contrasting the estimated quantity with the actual data, the model was examined and verified. They evaluated the models’ levels of accuracy. This approach works well in RFR because, compared to competing methods, it finds the performance measure with the greatest accuracy rate (87%) with much less processing time <xref ref-type="bibr" rid="scirp.137299-8">
       [8]
      </xref>.</p>
     <p>In Dutta et al. (2021), emphasizes the need of calculating the patient’s portion of the healthcare expenditure. The best prediction analysis is achieved by using a variety of data employing regression techniques, including DT, RF, polynomial regression, and linear regression. The best method for accurately predicting health insurance premiums was RFR, which achieved a r2 score of 0.862533 when utilised as intended <xref ref-type="bibr" rid="scirp.137299-17">
       [17]
      </xref>.</p>
     <p>In Baro, Oliveira and De Souza Britto Junior (2022), investigate three data sets to extract characteristics, namely, medical specialty, the International Classification of Diseases and an account of the event. Also, a dataset with 34,930 patient records totalling 38,524 medical occurrences was provided. In order to evaluate and establish a standard for this fresh dataset, we have used two popular ensemble techniques: RF and GB. When the models from the three feature sets that were examined were combined using GB, the best outcomes (AUC = 0.82) were obtained <xref ref-type="bibr" rid="scirp.137299-18">
       [18]
      </xref>.</p>
     <p>In Luo et al. (2021), information gathered between 2012 and 2014 from actual asthmatic patients in a large Chinese city was used to train prediction models, such as LR, RF, SVM, classification regression tree, and BPNN. According to the risk analysis of comorbidity on cost, the two main risks for asthmatic patients that impact treatment costs are respiratory diseases (36.38% in the adjusted odds ratio (95% Confidence Interval: 27.61%, 47.86%) and disorders of the circulatory system (23.83%; 95%CI: 15.95%, 35.22%) <xref ref-type="bibr" rid="scirp.137299-19">
       [19]
      </xref>.</p>
     <p>
      <xref ref-type="table" rid="table1">
       Table 1
      </xref> below summarizes prior research on predicting health insurance premiums using ML and DL methodologies.</p>
     <table-wrap id="table1">
      <label>
       <xref ref-type="table" rid="table1">
        Table 1
       </xref></label>
      <caption>
       <title>
        <xref ref-type="bibr" rid="scirp.137299-"></xref>Table 1. Comparative study on health insurance cost prediction using machine and deep learning methods.</title>
      </caption>
      <table class="MsoTableGrid custom-table" border="0" cellspacing="0" cellpadding="0"> 
       <tr> 
        <td class="custom-bottom-td aleft" width="12.18%"><p style="text-align:left">Author</p></td> 
        <td class="custom-bottom-td aleft" width="14.11%"><p style="text-align:left">Dataset</p></td> 
        <td class="custom-bottom-td aleft" width="18.45%"><p style="text-align:left">Methods</p></td> 
        <td class="custom-bottom-td aleft" width="20.47%"><p style="text-align:left">Performance</p></td> 
        <td class="custom-bottom-td aleft" width="34.80%"><p style="text-align:left">Limitation/Contribution</p></td> 
       </tr> 
       <tr> 
        <td class="custom-top-td aleft" width="12.18%"><p style="text-align:left">Vijayalakshmi, Selvakumar, and Panimalar <xref ref-type="bibr" rid="scirp.137299-15">
           [15]
          </xref></p></td> 
        <td class="custom-top-td aleft" width="14.11%"><p style="text-align:left">24 features related to insurance cost</p></td> 
        <td class="custom-top-td aleft" width="18.45%"><p style="text-align:left">Linear Regression, DT, Lasso, Ridge, Random Forest, Elastic Net, SVR, KNN, Neural Network (R)</p></td> 
        <td class="custom-top-td aleft" width="20.47%"><p style="text-align:left">Best: Random Forest (R<sup>2</sup> = 0.9533); Metrics: MSE, RMSE, MAE, MAPE, R<sup>2</sup>, Adj. R<sup>2</sup>, EVS</p></td> 
        <td class="custom-top-td aleft pli" width="34.80%"><p style="text-align:left">Accurate insurance cost prediction with minimal manual work.</p><p style="text-align:left">May not generalize to other datasets or different insurance types.</p></td> 
       </tr> 
       <tr> 
        <td class="aleft" width="12.18%"><p style="text-align:left">Marinova and Todorova <xref ref-type="bibr" rid="scirp.137299-16">
           [16]
          </xref></p></td> 
        <td class="aleft" width="14.11%"><p style="text-align:left">BMI, smoker, blood pressure</p></td> 
        <td class="aleft" width="18.45%"><p style="text-align:left">Bagged Algorithm, SVM</p></td> 
        <td class="aleft" width="20.47%"><p style="text-align:left">Best: Bagged Algorithm (Accuracy = 0.94, MSE = 0.06 R<sup>2</sup>, RMSE, Training Time</p></td> 
        <td class="aleft pli" width="34.80%"><p style="text-align:left">Improved model performance for specific health features.</p><p style="text-align:left">SVM has high training time. Results specific to BMI, Smoker, and Blood Pressure features.</p></td> 
       </tr> 
       <tr> 
        <td class="aleft" width="12.18%"><p style="text-align:left">Thejeshwar et al. <xref ref-type="bibr" rid="scirp.137299-8">
           [8]
          </xref></p></td> 
        <td class="aleft" width="14.11%"><p style="text-align:left">Variables related to public awareness and insurance demand</p></td> 
        <td class="aleft" width="18.45%"><p style="text-align:left">Linear Regression, SVM, Random Forest</p></td> 
        <td class="aleft" width="20.47%"><p style="text-align:left">Best: Random Forest (Accuracy = 87%); Metrics: Accuracy</p></td> 
        <td class="aleft pli" width="34.80%"><p style="text-align:left">Helps in pricing insurance premiums accurately and efficiently.</p><p style="text-align:left">Study focused more on awareness rather than broader insurance cost determinants.</p></td> 
       </tr> 
       <tr> 
        <td class="aleft" width="12.18%"><p style="text-align:left">Dutta et al. <xref ref-type="bibr" rid="scirp.137299-17">
           [17]
          </xref></p></td> 
        <td class="aleft" width="14.11%"><p style="text-align:left">Health insurance cost prediction</p></td> 
        <td class="aleft" width="18.45%"><p style="text-align:left">DT, RF, Polynomial Regression, LR</p></td> 
        <td class="aleft" width="20.47%"><p style="text-align:left">Best: Random Forest (R<sup>2</sup> = 0.862533); Metrics: R<sup>2</sup>, RMSE, MSE</p></td> 
        <td class="aleft pli" width="34.80%"><p style="text-align:left">Random Forest excels in predicting health insurance costs.</p><p style="text-align:left">Limited comparison with more advanced models like Neural Networks or Gradient Boosting.</p></td> 
       </tr> 
       <tr> 
        <td class="aleft" width="12.18%"><p style="text-align:left">Baro, Oliveira et al. <xref ref-type="bibr" rid="scirp.137299-18">
           [18]
          </xref></p></td> 
        <td class="aleft" width="14.11%"><p style="text-align:left">38,524 records from 34,930 patients</p></td> 
        <td class="aleft" width="18.45%"><p style="text-align:left">RF, GB</p></td> 
        <td class="aleft" width="20.47%"><p style="text-align:left">Best: Gradient Boosting (AUC = 0.82); Metrics: AUC</p></td> 
        <td class="aleft pli" width="34.80%"><p style="text-align:left">New dataset for hospitalization prediction.</p><p style="text-align:left">Results limited to the provided dataset; further validation needed for other use cases.</p></td> 
       </tr> 
       <tr> 
        <td class="aleft" width="12.18%"><p style="text-align:left">Luo et al. <xref ref-type="bibr" rid="scirp.137299-19">
           [19]
          </xref></p></td> 
        <td class="aleft" width="14.11%"><p style="text-align:left">Real-world data of asthmatic patients</p></td> 
        <td class="aleft" width="18.45%"><p style="text-align:left">Logistic Regression, Random Forest, SVM, CART, Neural Network</p></td> 
        <td class="aleft" width="20.47%"><p style="text-align:left">Best: Random Forest, Comorbidity Portfolio; Metrics: AUC, Sensitivity (46.89% improvement in AUC)</p></td> 
        <td class="aleft pli" width="34.80%"><p style="text-align:left">Contribution: Advanced cost prediction and comorbidity management for asthmatic patients.</p><p style="text-align:left">Focused on asthma patients, limiting generalizability to other conditions.</p></td> 
       </tr> 
      </table>
     </table-wrap>
    </sec>
    <sec id="s2_3">
     <title>Research Gaps</title>
     <p>Most studies depend on conventional algorithms; however, the research gap reveals a lack of investigation into advanced models of machine learning, such as ensemble approaches or deep learning. Many of these studies only look at small subsets of features or populations, which means their results are not relevant to the real world. Computational efficiency is still an issue, especially for complicated models like SVM, and there is an absence of real-time prediction systems that are responsive to changing data. There is a need for more study on the ethical implications and wider social effects of predictive models <xref ref-type="bibr" rid="scirp.137299-20">
       [20]
      </xref>-<xref ref-type="bibr" rid="scirp.137299-22">
       [22]
      </xref>, particularly in the area of insurance cost estimation, so that we may better understand how to reduce bias and ensure equality in these systems.</p>
    </sec>
   </sec>
   <sec id="s3">
    <title>3. Research Design</title>
    <p>The research approach entails various steps and phases, as shown in the data flow diagram in <xref ref-type="fig" rid="fig1">
      Figure 1
     </xref>. The methodology begins with collecting a medical cost personal dataset by a KAGGLE repository, which comprises 1388 entries and seven features. Cleansing and preparing the dataset for analysis is the purpose of data preprocessing. This entails verifying missing values, which may result from incomplete data entries or equipment malfunctions, and removing duplicate entries to ensure data integrity. Feature extraction finds that important features like age, BMI, and smoking status are major factors affecting medical costs. To ensure consistency among features, min-max scaling is implemented, which normalizes the values to a range of 0 to 1. After the dataset has been preprocessed, it is often partitioned and separated into testing and training sets, often with a 70% training and 30% testing ratio. Multiple regression models, such as Ridge, Lasso, XGBoost, and KNN, predict medical insurance costs. The accuracy and reliability of each model in predicting insurance charges are assessed using metrics such as the R<sup>2</sup> score and RMSE. These evaluations facilitate the comparison and selection of the most effective model.</p>
    <p>The following lists every step and stage of the data flow diagram in <xref ref-type="fig" rid="fig1">
      Figure 1
     </xref> are briefly explained below:</p>
    <sec id="s3_1">
     <title>3.1. Data Collection</title>
     <p>Personal datasets on medical costs are sourced from the KAGGLE repository. There is a grand total of 1388 items per column in the dataset, including seven characteristics with nonnull attributes.</p>
    </sec>
    <sec id="s3_2">
     <title>3.2. Data Preprocessing</title>
     <p>Data pre-processing is the process of preparing unprocessed data for use in a more organised dataset. Stated differently, even while data is gathered from a variety of sources, it is not acquired in a format that has been processed and is ready for analysis. Preprocessing is any alteration done to the dataset before supplying it to the algorithm. The preprocessing techniques listed below are explained in:</p>
     <fig id="fig1" position="float">
      <label>Figure 1</label>
      <caption>
       <title>Figure 1. Health insurance cost data flow diagram.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/2870742-rId14.jpeg?20241112104639" />
     </fig>
    </sec>
    <sec id="s3_3">
     <title>3.3. Feature Extraction</title>
     <p>Feature engineering in ML aims to increase the effectiveness of ML algorithms by using domain expertise to extract relevant features from unprocessed data. Factors like age, BMI, and smoking status are the most influential in the medical insurance cost dataset <xref ref-type="bibr" rid="scirp.137299-23">
       [23]
      </xref>.</p>
    </sec>
    <sec id="s3_4">
     <title>3.4. Feature Scaling with Min-Max Scaler</title>
     <p>Min-max scaling is a specific method within feature scaling that rescales all values of a particular feature to fit within a predefined minimum and maximum range, typically 0 and 1. This process helps maintain consistency and comparability among different features. The following Equation (1) scale the dataset.</p>
     <p>
      <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
        <mover accent="true"> 
         <mi>
           x 
         </mi> 
         <mo>
           ˜ 
         </mo> 
        </mover> 
        <mo>
          = 
        </mo> 
        <mfrac> 
         <mrow> 
          <mi>
            x 
          </mi> 
          <mo>
            − 
          </mo> 
          <mtext>
            min 
          </mtext> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mi>
             x 
           </mi> 
           <mo>
             ) 
           </mo> 
          </mrow> 
         </mrow> 
         <mrow> 
          <mi>
            max 
          </mi> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mi>
             x 
           </mi> 
           <mo>
             ) 
           </mo> 
          </mrow> 
          <mo>
            − 
          </mo> 
          <mtext>
            min 
          </mtext> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mi>
             x 
           </mi> 
           <mo>
             ) 
           </mo> 
          </mrow> 
         </mrow> 
        </mfrac> 
       </mrow> 
      </math> (1)</p>
    </sec>
    <sec id="s3_5">
     <title>3.5. Data Splitting</title>
     <p>In machine learning modeling, dataset splitting is an essential step that aids in various stages, from training to evaluating the model. There are two separate subsets of the dataset: a testing set and a training set. 30% of the data is used for testing and 70% of the data is used for training throughout the experimental phase.</p>
    </sec>
    <sec id="s3_6">
     <title>3.6. Applying Machine Learning Models</title>
     <p>Choose various regression models, such as the KNN, Ridge, Lasso, and XGB models that are described below, to estimate health insurance costs:</p>
     <p>1) K-nearest neighbor</p>
     <p>The KNN approach finds the K data items or training patterns that are nearest to an input pattern, and then it chooses the model class with the highest number of models. The number of nearest neighbours that will be taken into account for predicting class labels in test data is known as the K value. K was selected by neighbouring K’s class vote. Utilise the Euclidean Distance formula (2) to determine distances between neighbours <xref ref-type="bibr" rid="scirp.137299-24">
       [24]
      </xref>:</p>
     <p>
      <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
        <mi>
          d 
        </mi> 
        <mi>
          x 
        </mi> 
        <mi>
          y 
        </mi> 
        <mo>
          = 
        </mo> 
        <msqrt> 
         <mrow> 
          <mstyle displaystyle="true"> 
           <msubsup> 
            <mo>
              ∑ 
            </mo> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mo>
               = 
             </mo> 
             <mn>
               1 
             </mn> 
            </mrow> 
            <mi>
              n 
            </mi> 
           </msubsup> 
           <mrow> 
            <msup> 
             <mrow> 
              <mrow> 
               <mo>
                 ( 
               </mo> 
               <mrow> 
                <msub> 
                 <mi>
                   x 
                 </mi> 
                 <mi>
                   i 
                 </mi> 
                </msub> 
                <mo>
                  − 
                </mo> 
                <msub> 
                 <mi>
                   y 
                 </mi> 
                 <mi>
                   i 
                 </mi> 
                </msub> 
               </mrow> 
               <mo>
                 ) 
               </mo> 
              </mrow> 
             </mrow> 
             <mn>
               2 
             </mn> 
            </msup> 
           </mrow> 
          </mstyle> 
         </mrow> 
        </msqrt> 
       </mrow> 
      </math> (2)</p>
     <p>The prediction 
      <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
        <msub> 
         <mover accent="true"> 
          <mi>
            y 
          </mi> 
          <mo>
            ^ 
          </mo> 
         </mover> 
         <mi>
           i 
         </mi> 
        </msub> 
       </mrow> 
      </math> for a new point x is given by formula (3):</p>
     <p>
      <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
        <msub> 
         <mover accent="true"> 
          <mi>
            y 
          </mi> 
          <mo>
            ^ 
          </mo> 
         </mover> 
         <mi>
           i 
         </mi> 
        </msub> 
        <mo>
          = 
        </mo> 
        <mfrac> 
         <mn>
           1 
         </mn> 
         <mi>
           k 
         </mi> 
        </mfrac> 
        <munderover> 
         <mstyle displaystyle="true" mathsize="140%"> 
          <mo>
            ∑ 
          </mo> 
         </mstyle> 
         <mrow> 
          <mi>
            i 
          </mi> 
          <mo>
            = 
          </mo> 
          <mn>
            1 
          </mn> 
         </mrow> 
         <mi>
           k 
         </mi> 
        </munderover> 
        <mtext>
            
        </mtext> 
        <msub> 
         <mi>
           y 
         </mi> 
         <mi>
           i 
         </mi> 
        </msub> 
       </mrow> 
      </math> (3)</p>
     <p>where 
      <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
        <msub> 
         <mi>
           y 
         </mi> 
         <mi>
           i 
         </mi> 
        </msub> 
       </mrow> 
      </math> are the target values of the k nearest neighbors.</p>
     <p>2) Ridge regression</p>
     <p>Ridge regression is used when dealing with data that exhibit multi-collinearity. It is a method for fine-tuning the analysis of multi-collinear data. If the independent variables have a strong correlation, we may approximate the regression model’s coefficient in this scenario. In order to avoid overfitting, ridge regression is a kind of linear regression that incorporates a 𝐿 2 regularisation term. The formula defines the cost function for Ridge regression (4):</p>
     <p>
      <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
        <mi>
          j 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mi>
           θ 
         </mi> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          = 
        </mo> 
        <munderover> 
         <mstyle displaystyle="true" mathsize="140%"> 
          <mo>
            ∑ 
          </mo> 
         </mstyle> 
         <mrow> 
          <mi>
            i 
          </mi> 
          <mo>
            = 
          </mo> 
          <mn>
            1 
          </mn> 
         </mrow> 
         <mi>
           m 
         </mi> 
        </munderover> 
        <msup> 
         <mrow> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mrow> 
            <msub> 
             <mi>
               y 
             </mi> 
             <mi>
               i 
             </mi> 
            </msub> 
            <mo>
              − 
            </mo> 
            <msub> 
             <mover accent="true"> 
              <mi>
                y 
              </mi> 
              <mo>
                ^ 
              </mo> 
             </mover> 
             <mi>
               i 
             </mi> 
            </msub> 
           </mrow> 
           <mo>
             ) 
           </mo> 
          </mrow> 
         </mrow> 
         <mn>
           2 
         </mn> 
        </msup> 
        <mo>
          + 
        </mo> 
        <mi>
          λ 
        </mi> 
        <munderover> 
         <mstyle displaystyle="true" mathsize="140%"> 
          <mo>
            ∑ 
          </mo> 
         </mstyle> 
         <mrow> 
          <mi>
            j 
          </mi> 
          <mo>
            = 
          </mo> 
          <mn>
            1 
          </mn> 
         </mrow> 
         <mi>
           n 
         </mi> 
        </munderover> 
        <mtext>
            
        </mtext> 
        <msubsup> 
         <mi>
           θ 
         </mi> 
         <mi>
           j 
         </mi> 
         <mn>
           2 
         </mn> 
        </msubsup> 
       </mrow> 
      </math> (4)</p>
     <p>where:</p>
     <p>
      <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
        <msub> 
         <mi>
           y 
         </mi> 
         <mi>
           i 
         </mi> 
        </msub> 
       </mrow> 
      </math> = is the true value.</p>
     <p>
      <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
        <msub> 
         <mover accent="true"> 
          <mi>
            y 
          </mi> 
          <mo>
            ^ 
          </mo> 
         </mover> 
         <mi>
           i 
         </mi> 
        </msub> 
       </mrow> 
      </math> = is the predicted value.</p>
     <p>
      <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
         λ 
       </mi> 
      </math> = is the regularization parameter.</p>
     <p>
      <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
        <msub> 
         <mi>
           θ 
         </mi> 
         <mi>
           j 
         </mi> 
        </msub> 
       </mrow> 
      </math> = are the coefficients of the model.</p>
     <p>3) Lasso regression</p>
     <p>Ridge regression is extremely similar to Lasso, also referred to as the Selection Operator and Least Absolute Shrinkage. In ML, Lasso regression is used to pick a significant subset of variables. In general, Lasso regression prediction Lasso regression is similar to Ridge regression but employs 𝐿 1 regularization, promoting sparsity in the model coefficients. s are more accurate than those made by other models formulate as Equation (5).</p>
     <p>
      <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
        <mi>
          j 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mi>
           θ 
         </mi> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          = 
        </mo> 
        <munderover> 
         <mstyle mathsize="140%" displaystyle="true"> 
          <mo>
            ∑ 
          </mo> 
         </mstyle> 
         <mrow> 
          <mi>
            i 
          </mi> 
          <mo>
            = 
          </mo> 
          <mn>
            1 
          </mn> 
         </mrow> 
         <mi>
           m 
         </mi> 
        </munderover> 
        <msup> 
         <mrow> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mrow> 
            <msub> 
             <mi>
               y 
             </mi> 
             <mi>
               i 
             </mi> 
            </msub> 
            <mo>
              − 
            </mo> 
            <msub> 
             <mover accent="true"> 
              <mi>
                y 
              </mi> 
              <mo>
                ^ 
              </mo> 
             </mover> 
             <mi>
               i 
             </mi> 
            </msub> 
           </mrow> 
           <mo>
             ) 
           </mo> 
          </mrow> 
         </mrow> 
         <mn>
           2 
         </mn> 
        </msup> 
        <mo>
          + 
        </mo> 
        <mi>
          λ 
        </mi> 
        <munderover> 
         <mstyle mathsize="140%" displaystyle="true"> 
          <mo>
            ∑ 
          </mo> 
         </mstyle> 
         <mrow> 
          <mi>
            j 
          </mi> 
          <mo>
            = 
          </mo> 
          <mn>
            1 
          </mn> 
         </mrow> 
         <mi>
           n 
         </mi> 
        </munderover> 
        <mrow> 
         <mo>
           | 
         </mo> 
         <mrow> 
          <msub> 
           <mi>
             θ 
           </mi> 
           <mi>
             j 
           </mi> 
          </msub> 
         </mrow> 
         <mo>
           | 
         </mo> 
        </mrow> 
       </mrow> 
      </math> (5)</p>
     <p>where 
      <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
        <mrow> 
         <mo>
           | 
         </mo> 
         <mrow> 
          <msub> 
           <mi>
             θ 
           </mi> 
           <mi>
             j 
           </mi> 
          </msub> 
         </mrow> 
         <mo>
           | 
         </mo> 
        </mrow> 
       </mrow> 
      </math> represents the absolute value of the coefficients, encouraging some coefficients to be exactly zero.</p>
     <p>4) XGBoost regressor</p>
     <p>The XGBoost model <xref ref-type="bibr" rid="scirp.137299-25">
       [25]
      </xref> is an integrated model based on gradient boosting and tree-based. The fundamental structure is composed of numerous CARTs, which calculate the final prediction result by adding the desired value as well as each decision tree’s predicted values from the past. Once each decision tree has finished training, a consensus is obtained. Pruning decision trees created during XGBoost model training is necessary to avoid overfitting, which occurs when each new tree is learnt using the previously trained tree. For the purpose of minimizing error, the XGBoost model uses the error that each tree produces as an input to train subsequent trees. By gradually reducing prediction error, this procedure forces the model’s predicted outcome to be closer to the actual value. Assume the sample used for training is ( 
      <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
        <msub> 
         <mi>
           x 
         </mi> 
         <mi>
           i 
         </mi> 
        </msub> 
       </mrow> 
      </math>, 
      <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
        <msub> 
         <mi>
           y 
         </mi> 
         <mi>
           i 
         </mi> 
        </msub> 
       </mrow> 
      </math>). XGB prediction model may thus be written as (63) <xref ref-type="bibr" rid="scirp.137299-26">
       [26]
      </xref>:</p>
     <p>
      <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
        <msub> 
         <mover accent="true"> 
          <mi>
            y 
          </mi> 
          <mo>
            ^ 
          </mo> 
         </mover> 
         <mi>
           i 
         </mi> 
        </msub> 
        <mo>
          = 
        </mo> 
        <munderover> 
         <mstyle displaystyle="true" mathsize="140%"> 
          <mo>
            ∑ 
          </mo> 
         </mstyle> 
         <mrow> 
          <mi>
            k 
          </mi> 
          <mo>
            = 
          </mo> 
          <mn>
            1 
          </mn> 
         </mrow> 
         <mi>
           k 
         </mi> 
        </munderover> 
        <mtext>
            
        </mtext> 
        <msub> 
         <mi>
           f 
         </mi> 
         <mi>
           k 
         </mi> 
        </msub> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <msub> 
           <mi>
             x 
           </mi> 
           <mi>
             i 
           </mi> 
          </msub> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          , 
        </mo> 
        <mtext>
            
        </mtext> 
        <msub> 
         <mi>
           f 
         </mi> 
         <mi>
           k 
         </mi> 
        </msub> 
        <mo>
          ∈ 
        </mo> 
        <mi>
          F 
        </mi> 
       </mrow> 
      </math> (6)</p>
     <p>where 
      <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
        <mi>
          x 
        </mi> 
        <mo>
          ∈ 
        </mo> 
        <msup> 
         <mi>
           R 
         </mi> 
         <mi>
           m 
         </mi> 
        </msup> 
       </mrow> 
      </math>, 
      <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
        <mi>
          y 
        </mi> 
        <mo>
          ∈ 
        </mo> 
        <mi>
          R 
        </mi> 
       </mrow> 
      </math>, x is the eigenvector, y is the sample label, and kth decision tree is represented by 
      <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
        <msub> 
         <mi>
           f 
         </mi> 
         <mi>
           k 
         </mi> 
        </msub> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <msub> 
           <mi>
             x 
           </mi> 
           <mi>
             i 
           </mi> 
          </msub> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mrow> 
      </math>.</p>
    </sec>
   </sec>
   <sec id="s4">
    <title>
     <xref ref-type="bibr" rid="scirp.137299-"></xref>4. Results and Discussion</title>
    <p>
     <xref ref-type="bibr" rid="scirp.137299-"></xref>Datasets derived from freely accessible sources should have their analytical results detailed in this section. The machine learning model experents and their outcomes are presented in terms of RMSE, and R<sup>2</sup>-score is also provided in this section.</p>
    <sec id="s4_1">
     <title>4.1. Data Analysis</title>
     <p>A kind of data analysis known as exploratory data analysis (EDA) seeks to discover broad patterns from the collected information. Notable data features and outliers are all part of these patterns. EDA is a critical initial stage in any data analysis. Histograms and boxplots are graphical methods for analysing the data’s distribution. Some visualization graphs are given in below:</p>
     <p>The heat map Dependencies of Medical Charges in <xref ref-type="fig" rid="fig2">
       Figure 2
      </xref> demonstrates sex, age, correlation between BMI, area, number of children, smoking status, and medical costs. Purple suggests strong positive connections, green suggests strong negative correlations, and beige suggests weak or no relationships. Smokers incur greater medical bills; therefore, dark purple indicates that.</p>
     <fig id="fig2" position="float">
      <label>Figure 2</label>
      <caption>
       <title>Figure 2. Elation matrix with a heat map.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/2870742-rId51.jpeg?20241112104642" />
     </fig>
     <fig id="fig3" position="float">
      <label>Figure 3</label>
      <caption>
       <title>Figure 3. Sex vs. insurance charge features.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/2870742-rId52.jpeg?20241112104641" />
     </fig>
     <p>The red bar in <xref ref-type="fig" rid="fig3">
       Figure 3
      </xref> indicates that typical insurance charges for Sex Category “0” are just over 12,000, while the blue bar for Sex Category “1” are just below 12,000; the error lines indicate small differences between the two groups.</p>
     <p>
      <xref ref-type="fig" rid="fig4">
       Figure 4
      </xref> shows the plot for age, where the horizontal axis represents age, with intervals of 10 years from 20 to 60 vertical axis represents the count, ranging from 0 to 200. The graph displays variable distribution across age groups, with the highest count around age 20 and subsequent counts below 200. It aids in demographic analysis and pattern understanding.</p>
     <p>
      <xref ref-type="fig" rid="fig5">
       Figure 5
      </xref> shows the distribution of BMI values as a histogram superimposed on top of a line graph. The x-axis ranges from 15 to 50, and the y-axis ranges from 0 to 140. The tallest bar around a BMI value of 25 shows that this value has the highest frequency in the dataset. This visualization aids in understanding the spread of BMI values across the population.</p>
     <fig id="fig4" position="float">
      <label>Figure 4</label>
      <caption>
       <title>Figure 4. Plot for age.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/2870742-rId53.jpeg?20241112104642" />
     </fig>
     <fig id="fig5" position="float">
      <label>Figure 5</label>
      <caption>
       <title>Figure 5. Plot for body mass index.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/2870742-rId54.jpeg?20241112104641" />
     </fig>
    </sec>
    <sec id="s4_2">
     <title>4.2. Performance Matrix</title>
     <p>To evaluate the quality of ML models, use the evaluation error matrix. Metrics like as R<sup>2</sup>-square, and Root Mean Squared Error need to be measured for us to be able to compare different algorithms.</p>
     <p>1) RMSE</p>
     <p>The RMSE is computed by calculating the MSE’s square root. The RMSE formula is (7):</p>
     <p>
      <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
        <mtext>
          RMSE 
        </mtext> 
        <mo>
          = 
        </mo> 
        <msqrt> 
         <mrow> 
          <mfrac> 
           <mn>
             1 
           </mn> 
           <mi>
             n 
           </mi> 
          </mfrac> 
          <munderover> 
           <mstyle mathsize="140%" displaystyle="true"> 
            <mo>
              ∑ 
            </mo> 
           </mstyle> 
           <mrow> 
            <mi>
              t 
            </mi> 
            <mo>
              = 
            </mo> 
            <mn>
              1 
            </mn> 
           </mrow> 
           <mi>
             n 
           </mi> 
          </munderover> 
          <msup> 
           <mrow> 
            <mrow> 
             <mo>
               ( 
             </mo> 
             <mrow> 
              <msub> 
               <msup> 
                <mi>
                  y 
                </mi> 
                <mo>
                  ′ 
                </mo> 
               </msup> 
               <mi>
                 t 
               </mi> 
              </msub> 
              <mo>
                − 
              </mo> 
              <msub> 
               <mi>
                 y 
               </mi> 
               <mi>
                 t 
               </mi> 
              </msub> 
             </mrow> 
             <mo>
               ) 
             </mo> 
            </mrow> 
           </mrow> 
           <mn>
             2 
           </mn> 
          </msup> 
         </mrow> 
        </msqrt> 
       </mrow> 
      </math>. (7)</p>
     <p>where</p>
     <p>
      <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
        <msub> 
         <msup> 
          <mi>
            y 
          </mi> 
          <mo>
            ′ 
          </mo> 
         </msup> 
         <mi>
           t 
         </mi> 
        </msub> 
       </mrow> 
      </math> is a forecasted value,</p>
     <p>
      <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
        <msub> 
         <mi>
           y 
         </mi> 
         <mi>
           t 
         </mi> 
        </msub> 
       </mrow> 
      </math> is an original value, and,</p>
     <p>n is the sum of all the test set values.</p>
     <p>2) R<sup>2</sup>-score</p>
     <p>T constant of purpose is also referred to as R-squared (R<sup>2</sup>). It is a statistical metric. It determines the degree to which the data are in close proximity to the regression line that has been fitted. R<sup>2</sup> is calculated using formula (8).</p>
     <p>
      <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
        <msup> 
         <mtext>
           R 
         </mtext> 
         <mn>
           2 
         </mn> 
        </msup> 
        <mo>
          = 
        </mo> 
        <mn>
          1 
        </mn> 
        <mo>
          − 
        </mo> 
        <mfrac> 
         <mrow> 
          <mtext>
            Unexplained Variation 
          </mtext> 
         </mrow> 
         <mrow> 
          <mtext>
            Total Variation 
          </mtext> 
         </mrow> 
        </mfrac> 
       </mrow> 
      </math> (8)</p>
     <p>where,</p>
     <p>The R<sup>2</sup> metric, also referred to as the coefficient of determination, measures the percentage of the dependent variable’s volatility that can be anticipated based on the independent variables in a regression model. It has a range of 0 to 1, where a model that predicts the dependent variable perfectly has an R<sup>2</sup> of 1 and a model that does not explain any variability in the data has an R<sup>2</sup> of 0.</p>
    </sec>
    <sec id="s4_3">
     <title>4.3. Experiment Result</title>
     <p>This section displays the machine learning model experiment outcomes. The following <xref ref-type="table" rid="table2">
       Table 2
      </xref> shows the XGB model achieves 86.81% R-score.</p>
     <table-wrap id="table2">
      <label>
       <xref ref-type="table" rid="table2">
        Table 2
       </xref></label>
      <caption>
       <title>
        <xref ref-type="bibr" rid="scirp.137299-"></xref>Table 2. Results of XGB model on medical cost personal dataset</title>
      </caption>
      <table class="MsoTableGrid custom-table" border="0" cellspacing="0" cellpadding="0"> 
       <tr> 
        <td class="custom-bottom-td acenter" width="72.64%"><p style="text-align:center">Measures</p></td> 
        <td class="custom-bottom-td acenter" width="72.66%"><p style="text-align:center">XGB</p></td> 
       </tr> 
       <tr> 
        <td class="custom-top-td acenter" width="72.64%"><p style="text-align:center">R<sup>2</sup>-score</p></td> 
        <td class="custom-top-td acenter" width="72.66%"><p style="text-align:center">86.81</p></td> 
       </tr> 
       <tr> 
        <td class="acenter" width="72.64%"><p style="text-align:center">RMSE</p></td> 
        <td class="acenter" width="72.66%"><p style="text-align:center">4450.4</p></td> 
       </tr> 
      </table>
     </table-wrap>
     <p>
      <xref ref-type="fig" rid="fig6">
       Figure 6
      </xref> XGBoost Regression’s scatter plot shows actual and forecasted costs related to one another. The red dots demonstrate that actual costs tend to increase with expected prices, suggesting that the XGBoost regression model accurately uses actual values to make cost predictions.</p>
    </sec>
    <sec id="s4_4">
     <title>4.4. Comparative Analysis</title>
     <p>
      <xref ref-type="bibr" rid="scirp.137299-"></xref>In this section, present the outcomes of a machine learning method, including KNN <xref ref-type="bibr" rid="scirp.137299-7">
       [7]
      </xref>, Ridge <xref ref-type="bibr" rid="scirp.137299-27">
       [27]
      </xref>, Lasso <xref ref-type="bibr" rid="scirp.137299-28">
       [28]
      </xref>, and XGB on the dataset. In this step, evaluate how well the model could predict. It presents the result in the procedure of bar graphs, <xref ref-type="table" rid="table3">
       Table 3
      </xref>, and figures.</p>
     <p>
      <xref ref-type="fig" rid="fig7">
       Figure 7
      </xref> shows the results of comparing the R<sup>2</sup>-scores of the different models.</p>
     <fig id="fig6" position="float">
      <label>Figure 6</label>
      <caption>
       <title>Figure 6. Predicted cost using XGBoost Regression.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/2870742-rId63.jpeg?20241112104643" />
     </fig>
     <table-wrap id="table3">
      <label>
       <xref ref-type="table" rid="table3">
        Table 3
       </xref></label>
      <caption>
       <title>
        <xref ref-type="bibr" rid="scirp.137299-"></xref>Table 3. Comparative analysis for medical health insurance cost prediction.</title>
      </caption>
      <table class="MsoTableGrid custom-table" border="0" cellspacing="0" cellpadding="0"> 
       <tr> 
        <td class="custom-bottom-td acenter" width="47.06%"><p style="text-align:center">Models</p></td> 
        <td class="custom-bottom-td acenter" width="48.46%"><p style="text-align:center">R<sup>2</sup>-score</p></td> 
        <td class="custom-bottom-td acenter" width="49.77%"><p style="text-align:center">RMSE</p></td> 
       </tr> 
       <tr> 
        <td class="custom-top-td acenter" width="47.06%"><p style="text-align:center">KNN</p></td> 
        <td class="custom-top-td acenter" width="48.46%"><p style="text-align:center">55.21</p></td> 
        <td class="custom-top-td acenter" width="49.77%"><p style="text-align:center">4431.1</p></td> 
       </tr> 
       <tr> 
        <td class="acenter" width="47.06%"><p style="text-align:center">Ridge</p></td> 
        <td class="acenter" width="48.46%"><p style="text-align:center">78.38</p></td> 
        <td class="acenter" width="49.77%"><p style="text-align:center">4652.06</p></td> 
       </tr> 
       <tr> 
        <td class="acenter" width="47.06%"><p style="text-align:center">Lasso</p></td> 
        <td class="acenter" width="48.46%"><p style="text-align:center">79.78</p></td> 
        <td class="acenter" width="49.77%"><p style="text-align:center">5671.6</p></td> 
       </tr> 
       <tr> 
        <td class="acenter" width="47.06%"><p style="text-align:center">XGB</p></td> 
        <td class="acenter" width="48.46%"><p style="text-align:center">86.81</p></td> 
        <td class="acenter" width="49.77%"><p style="text-align:center">4450.4</p></td> 
       </tr> 
      </table>
     </table-wrap>
     <fig id="fig7" position="float">
      <label>Figure 7</label>
      <caption>
       <title>Figure 7. R<sup>2</sup>-score comparison between models.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/2870742-rId64.jpeg?20241112104643" />
     </fig>
     <p>XGB fits the data the best, with a R<sup>2</sup>-score of 86.81. In a regression model, the R<sup>2</sup>-score, also known as the coefficient of determination, quantifies the percentage of the dependent variable’s variation that is accounted for by the independent variables. Lasso follows closely with an R<sup>2</sup>-score of 79.78, slightly outperforming Ridge at 78.38. KNN has the lowest R<sup>2</sup>-score at 55.21, reflecting the lowest accuracy among the models in predicting the target variable. The overall XGB model outperforms other models.</p>
     <p>
      <xref ref-type="fig" rid="fig8">
       Figure 8
      </xref> RMSE comparison reveals that KNN has an RMSE of 4431.1, slightly better than XGB with an RMSE of 4450.4, indicating better accuracy in predictions. Ridge Regression follows with an RMSE of 4652.06, and Lasso has the highest RMSE at 5671.6, suggesting it has the greatest prediction error among the models.</p>
     <fig id="fig8" position="float">
      <label>Figure 8</label>
      <caption>
       <title>Figure 8. RMSE comparison between models.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/2870742-rId65.jpeg?20241112104643" />
     </fig>
    </sec>
   </sec>
   <sec id="s5">
    <title>5. Conclusion and Future Study</title>
    <p>It’s critical for insurance firms and customers to predict health insurance premiums. This paper explores the use of regression approaches to forecast health insurance premiums. A study uses a medical cost personal dataset of insurance premiums and related variables that have the biggest effects on insurance rates. According to the study, geography and gender had very little impact on insurance costs, with age and BMI being the primary determinants. To create predictive models, the study used various regression approaches, including KNN, XGBBoost Regression, Lasso, and Ridge regression. Among the models, XGBoost showed the best performance with an R<sup>2</sup>-score86.81 and an RMSE4450.4, outperforming the other models according to accuracy and predictive power. The comparative analysis demonstrates the superior fit and prediction accuracy of XGBoost, making it the most suitable model for this dataset. The XGBoost model performed well, although the research had several drawbacks. Because of the limited sample size, it may be harder to extrapolate the findings to bigger populations. To improve prediction accuracy, future research might concentrate on growing the dataset to include more entries and more characteristics, such lifestyle or medical history. In further study, we will adjust the settings of ML and DL techniques on various datasets linked to medical health using metaheuristic and nature-inspired algorithms.</p>
   </sec>
  </sec>
 </body><back>
  <ref-list>
   <title>References</title>
   <ref id="scirp.137299-ref1">
    <label>1</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Kumar, V.V., Sahoo, A., Balasubramanian, S.K. and Gholston, S. (2024) Mitigating Healthcare Supply Chain Challenges under Disaster Conditions: A Holistic AI-Based Analysis of Social Media Data. International Journal of Production Research. &gt;https://doi.org/10.1080/00207543.2024.2316884
    </mixed-citation>
   </ref>
   <ref id="scirp.137299-ref2">
    <label>2</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Sommers, B.D. (2020) Health Insurance Coverage: What Comes after the Aca? Health Affairs, 39, 502-508. &gt;https://doi.org/10.1377/hlthaff.2019.01416
    </mixed-citation>
   </ref>
   <ref id="scirp.137299-ref3">
    <label>3</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Milovic, B. (2012) Prediction and Decision Making in Health Care Using Data Mining. International Journal of Public Health Science (IJPHS), 1, 126-136. &gt;https://doi.org/10.11591/ijphs.v1i2.1380
    </mixed-citation>
   </ref>
   <ref id="scirp.137299-ref4">
    <label>4</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Mathur, S. and Gupta, S. (2023) Classification and Detection of Automated Facial Mask to COVID-19 Based on Deep CNN Model. 2023 IEEE 7th Conference on Information and Communication Technology (CICT), Jabalpur, 15-17 December 2023, 1-6. &gt;https://doi.org/10.1109/cict59886.2023.10455699
    </mixed-citation>
   </ref>
   <ref id="scirp.137299-ref5">
    <label>5</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Morid, M.A., Kawamoto, K., Ault, T., Dorius, J. and Abdelrahman, S. (2017) Supervised Learning Methods for Predicting Healthcare Costs: Systematic Literature Review and Empirical Evaluation. AMIA Annual Symposium Proceedings, 2017, 1312-1321.
    </mixed-citation>
   </ref>
   <ref id="scirp.137299-ref6">
    <label>6</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Basile, L.J., Carbonara, N., Pellegrino, R. and Panniello, U. (2023) Business Intelligence in the Healthcare Industry: The Utilization of a Data-Driven Approach to Support Clinical Decision Making. Technovation, 120, Article ID: 102482. &gt;https://doi.org/10.1016/j.technovation.2022.102482
    </mixed-citation>
   </ref>
   <ref id="scirp.137299-ref7">
    <label>7</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Ramya, D., Manigandan, S.K. and Deepa, J. (2022) Health Insurance Cost Prediction Using Machine Learning Algorithms. 2022 International Conference on Edge Computing and Applications (ICECAA), Tamilnadu, 13-15 October 2022, 1381-1384. &gt;https://doi.org/10.1109/icecaa55415.2022.9936153
    </mixed-citation>
   </ref>
   <ref id="scirp.137299-ref8">
    <label>8</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Thejeshwar, T., Sai Harsha, T., Vamsi Krishna, V. and Kaladevi, R. (2023) Medical Insurance Cost Analysis and Prediction Using Machine Learning. 2023 International Conference on Innovative Data Communication Technologies and Application (ICIDCA), Uttarakhand, 14-16 March 2023, 113-117. &gt;https://doi.org/10.1109/icidca56705.2023.10100057
    </mixed-citation>
   </ref>
   <ref id="scirp.137299-ref9">
    <label>9</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Duijvestijn, M., de Wit, G.A., van Gils, P.F. and Wendel-Vos, G.C.W. (2023) Impact of Physical Activity on Healthcare Costs: A Systematic Review. BMC Health Services Research, 23, Article No. 572. &gt;https://doi.org/10.1186/s12913-023-09556-8
    </mixed-citation>
   </ref>
   <ref id="scirp.137299-ref10">
    <label>10</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Gabriel, J. (2024) A Machine Learning-Based Web Application for Heart Disease Prediction. Intelligent Control and Automation, 15, 9-27. &gt;https://doi.org/10.4236/ica.2024.151002
    </mixed-citation>
   </ref>
   <ref id="scirp.137299-ref11">
    <label>11</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Nori, N. (2024) Machine Learning Based Virtual Screening for Biodegradable Polyesters. Journal of Materials Science and Chemical Engineering, 12, 1-11. &gt;https://doi.org/10.4236/msce.2024.128001
    </mixed-citation>
   </ref>
   <ref id="scirp.137299-ref12">
    <label>12</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Anumandla, S.K.R., Yarlagadda, V.K., Vennapusa, S.C.R. and Kothapalli, K.R.V. (2020) Unveiling the Influence of Artificial Intelligence on Resource Management and Sustainable Development: A Comprehensive Investigation. Technology &amp; Management Review, 5, 45-65.
    </mixed-citation>
   </ref>
   <ref id="scirp.137299-ref13">
    <label>13</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Yang, C., Delcher, C., Shenkman, E. and Ranka, S. (2018) Machine Learning Approaches for Predicting High Cost High Need Patient Expenditures in Health Care. BioMedical Engineering OnLine, 17, Article No. 131. &gt;https://doi.org/10.1186/s12938-018-0568-3
    </mixed-citation>
   </ref>
   <ref id="scirp.137299-ref14">
    <label>14</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Iorliam, I.B., Ikyo, B.A., Iorliam, A., Okube, E.O., Kwaghtyo, K.D. and Shehu, Y.I. (2021) Application of Machine Learning Techniques for Okra Shelf Life Prediction. Journal of Data Analysis and Information Processing, 9, 136-150. &gt;https://doi.org/10.4236/jdaip.2021.93009
    </mixed-citation>
   </ref>
   <ref id="scirp.137299-ref15">
    <label>15</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Vijayalakshmi, V., Selvakumar, A. and Panimalar, K. (2023) Implementation of Medical Insurance Price Prediction System Using Regression Algorithms. 2023 5th International Conference on Smart Systems and Inventive Technology (ICSSIT), Tirunelveli, 23-25 January 2023, 1529-1534. &gt;https://doi.org/10.1109/icssit55814.2023.10060926
    </mixed-citation>
   </ref>
   <ref id="scirp.137299-ref16">
    <label>16</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Marinova, G. and Todorova, M. (2023) Regression Analysis for Predicting Health Insurance. 2023 4th International Conference on Communications, Information, Electronic and Energy Systems (CIEES), Plovdiv, 23-25 November 2023, 1-4. &gt;https://doi.org/10.1109/ciees58940.2023.10378755
    </mixed-citation>
   </ref>
   <ref id="scirp.137299-ref17">
    <label>17</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Dutta, K., Chandra, S., Gourisaria, M.K. and GM, H. (2021) A Data Mining Based Target Regression-Oriented Approach to Modelling of Health Insurance Claims. 2021 5th International Conference on Computing Methodologies and Communication (ICCMC), Erode, 8-10 April 2021, 1168-1175. &gt;https://doi.org/10.1109/iccmc51019.2021.9418038
    </mixed-citation>
   </ref>
   <ref id="scirp.137299-ref18">
    <label>18</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Baro, E.F., Oliveira, L.S. and de Souza Britto Junior, A. (2022) Predicting Hospitalization from Health Insurance Data. 2022 IEEE International Conference on Systems, Man, and Cybernetics (SMC), Prague, 9-12 October 2022, 2790-2795. &gt;https://doi.org/10.1109/smc53654.2022.9945601
    </mixed-citation>
   </ref>
   <ref id="scirp.137299-ref19">
    <label>19</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Luo, L., Yu, X., Yong, Z., Li, C. and Gu, Y. (2021) Design Comorbidity Portfolios to Improve Treatment Cost Prediction of Asthma Using Machine Learning. IEEE Journal of Biomedical and Health Informatics, 25, 2237-2247. &gt;https://doi.org/10.1109/jbhi.2020.3034092
    </mixed-citation>
   </ref>
   <ref id="scirp.137299-ref20">
    <label>20</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Farhud, D.D. and Zokaei, S. (2021) Ethical Issues of Artificial Intelligence in Medicine and Healthcare. Iranian Journal of Public Health, 50, i-v. &gt;https://doi.org/10.18502/ijph.v50i11.7600
    </mixed-citation>
   </ref>
   <ref id="scirp.137299-ref21">
    <label>21</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Mondal, H. and Mondal, S. (2024) Ethical and Social Issues Related to AI in Healthcare. Methods in Microbiology, 55, 247-281. &gt;https://doi.org/10.1016/bs.mim.2024.05.009
    </mixed-citation>
   </ref>
   <ref id="scirp.137299-ref22">
    <label>22</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Nill, A., Laczniak, G. and Thistle, P. (2017) The Use of Genetic Testing Information in the Insurance Industry: An Ethical and Societal Analysis of Public Policy Options. Journal of Business Ethics, 156, 105-121. &gt;https://doi.org/10.1007/s10551-017-3554-y
    </mixed-citation>
   </ref>
   <ref id="scirp.137299-ref23">
    <label>23</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Rohilla, V., Chakraborty, S. and Kumar, R. (2022) Deep Learning Based Feature Extraction and a Bidirectional Hybrid Optimized Model for Location Based Advertising. Multimedia Tools and Applications, 81, 16067-16095. &gt;https://doi.org/10.1007/s11042-022-12457-3
    </mixed-citation>
   </ref>
   <ref id="scirp.137299-ref24">
    <label>24</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Okfalisa, Gazalba, I., Mustakim, and Reza, N.G.I. (2017) Comparative Analysis of K-Nearest Neighbor and Modified K-Nearest Neighbor Algorithm for Data Classification. 2017 2nd International conferences on Information Technology, Information Systems and Electrical Engineering (ICITISEE), Yogyakarta, 1-2 November 2017, 294-298. &gt;https://doi.org/10.1109/icitisee.2017.8285514
    </mixed-citation>
   </ref>
   <ref id="scirp.137299-ref25">
    <label>25</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Chen, T. and Guestrin, C. (2016) XGBoost: A Scalable Tree Boosting System. Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, 13-17 August 2016, 785-794. &gt;https://doi.org/10.1145/2939672.2939785
    </mixed-citation>
   </ref>
   <ref id="scirp.137299-ref26">
    <label>26</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Anmol, Aggarwal, S. and Jahan Badhon, A. (2022) Medical Insurance Cost Prediction Using Machine Learning Algorithms. In: Maurya, S., Peddoju, S.K., Ahmad, B. and Chihi, I., Eds., Cyber Technologies and Emerging Sciences, Springer, 271-281. &gt;https://doi.org/10.1007/978-981-19-2538-2_27
    </mixed-citation>
   </ref>
   <ref id="scirp.137299-ref27">
    <label>27</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Ul Hassan, C.A., Iqbal, J., Hussain, S., AlSalman, H., Mosleh, M.A.A. and Sajid Ullah, S. (2021) A Computational Intelligence Approach for Predicting Medical Insurance Cost. Mathematical Problems in Engineering, 2021, Article ID: 1162553. &gt;https://doi.org/10.1155/2021/1162553
    </mixed-citation>
   </ref>
   <ref id="scirp.137299-ref28">
    <label>28</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Christobel, Y.A. and Subramanian, S. (2022) An Empirical Study of Machine Learning Regression Models to Predict Health Insurance Cost. Webology, 19, 1677-1685.
    </mixed-citation>
   </ref>
  </ref-list>
 </back>
</article>