Automating with MLflow and BentoML

Flask App for ML Prediction

Flask App for ML Prediction
 1from flask import Flask, render_template, request
 2import pandas as pd
 3import requests
 4import base64
 5import io
 6
 7app = Flask(__name__)
 8
 9# Route for the home page
10@app.route('/')
11def index():
12    return render_template('index.html')
13
14# Route to handle the CSV file upload and prediction
15@app.route('/predict', methods=['POST'])
16def predict():
17    file_data = request.form.get('file')
18    
19    # Decode the Base64 encoded file content
20    decoded_file = base64.b64decode(file_data.split(',')[1])
21
22    # Read the decoded content into a DataFrame
23    df = pd.read_csv(io.StringIO(decoded_file.decode('utf-8')))
24
25    # Separate the 'claim_id' column if it exists
26    if 'claim_id' in df.columns:
27        claim_ids = df['claim_id']
28        df = df.drop(columns=['claim_id'])
29    else:
30        claim_ids = None
31
32    # Send the DataFrame to the BentoML service
33    response = requests.post(
34        'http://127.0.0.1:3000/predict',  # BentoML endpoint
35        json=df.to_dict(orient='records')
36    )
37
38    # Get predictions from the response
39    predictions = response.json()['predictions']
40
41    # Add predictions to the DataFrame
42    df['Prediction'] = predictions
43
44    # Reattach the 'claim_id' column to the DataFrame
45    if claim_ids is not None:
46        df['claim_id'] = claim_ids
47
48    # Reorder columns to have 'claim_id' first
49    if 'claim_id' in df.columns:
50        df = df[['claim_id'] + [col for col in df.columns if col != 'claim_id']]
51
52    # Render the DataFrame as an HTML table
53    return render_template('result.html', tables=[df.to_html(classes='data', header="true")])
54
55if __name__ == '__main__':
56    app.run(debug=True, port=5005)

README

README
 1Here is the converted `README.md` file for your project:
 2
 3```markdown
 4# Health Claims Fraud Detection Project
 5
 6This project involves building a Flask web application that uses an Isolation Forest model to detect potentially fraudulent health claims. It leverages BentoML for model serving and MLflow for experiment tracking.
 7
 8## Setup Instructions
 9
10### 1. Environment Setup
11
12- Load the bash profile and set up the virtual environment:
13
14```bash
15source ~/.bash_profile
16virtualenv venv
17source venv/bin/activate
18```
19
20- Install required dependencies:
21
22```bash
23pip3 install -r requirements.txt
24```
25
26### 2. BentoML and Model Management
27
28- List BentoML models:
29
30```bash
31bentoml models list
32```
33
34- Run the synthetic data generator script:
35
36```bash
37python3 synthetic_health_claims.py
38```
39
40- Train and evaluate the Isolation Forest model:
41
42```bash
43python3 isolation_model.py
44```
45
46### 3. MLflow for Experiment Tracking
47
48- Start the MLflow UI to track experiments:
49
50```bash
51mlflow ui
52```
53
54### 4. Run the Flask Web Application
55
56- Open a new terminal window, source the environment, and run the Flask app:
57
58```bash
59source ~/.bash_profile
60source venv/bin/activate
61python3 flask_app.py
62```
63
64### 5. Register Model and Serve with BentoML
65
66- In another terminal, run the following commands to register and serve the model with BentoML:
67
68```bash
69source ~/.bash_profile
70source venv/bin/activate
71python3 isolation_model.py
72python3 register_model.py
73bentoml serve service.py --reload
74```
75
76## Additional Notes
77
78- Ensure that all commands are executed in the correct order for proper setup and functioning of the application.
79- Use BentoML to serve models and integrate them with the Flask app for real-time fraud detection.
80- The MLflow UI helps to track experiments and evaluate model performance.
81```
82
83This `README.md` file gives a clear step-by-step guide for setting up and running your project. Let me know if you'd like any additional adjustments!

Model Registration Script

Model Registration Script
 1import bentoml
 2import pickle
 3
 4# Load the model from the downloaded PKL file using pickle
 5model_path = "model.pkl"  # Replace with your actual path
 6
 7with open(model_path, 'rb') as model_file:  # Open in binary mode
 8    model = pickle.load(model_file)
 9
10# Save the model to BentoML
11bento_model = bentoml.sklearn.save_model("health_insurance_anomaly_detector", model)
12
13print(f"Model registered with BentoML: {bento_model}")

Python Requirements

Python Requirements
1mlflow
2pandas
3numpy
4bentoml

ML Service

ML Service
 1import bentoml
 2from bentoml.io import JSON, PandasDataFrame
 3
 4# Load the registered model
 5model_runner = bentoml.sklearn.get("health_insurance_anomaly_detector:latest").to_runner()
 6
 7# Create a BentoML Service
 8svc = bentoml.Service("health_insurance_anomaly_detection_service", runners=[model_runner])
 9
10# Define an API endpoint for prediction
11@svc.api(input=PandasDataFrame(), output=JSON())
12def predict(data):
13    # Make predictions
14    predictions = model_runner.predict.run(data)
15    # Return predictions as JSON
16    return {"predictions": predictions.tolist()}

Synthetic Claims Generator

Synthetic Claims Generator
 1import pandas as pd
 2import numpy as np
 3
 4# Set random seed for reproducibility
 5np.random.seed(42)
 6
 7# Generate synthetic data
 8num_samples = 1000
 9data = {
10    'claim_id': np.arange(1, num_samples + 1),
11    'claim_amount': np.random.normal(1000, 250, num_samples),
12    'num_services': np.random.randint(1, 10, num_samples),
13    'patient_age': np.random.randint(18, 90, num_samples),
14    'provider_id': np.random.randint(1, 50, num_samples),
15    'days_since_last_claim': np.random.randint(0, 365, num_samples),
16}
17
18# Convert to DataFrame
19df = pd.DataFrame(data)
20
21# Introduce some anomalies (e.g., very high claim amounts)
22num_anomalies = 50
23anomalies = {
24    'claim_id': np.arange(num_samples + 1, num_samples + num_anomalies + 1),
25    'claim_amount': np.random.normal(10000, 2500, num_anomalies),  # Much higher amounts
26    'num_services': np.random.randint(10, 20, num_anomalies),
27    'patient_age': np.random.randint(18, 90, num_anomalies),
28    'provider_id': np.random.randint(1, 50, num_anomalies),
29    'days_since_last_claim': np.random.randint(0, 365, num_anomalies),
30}
31
32df_anomalies = pd.DataFrame(anomalies)
33
34# Combine normal data with anomalies
35df = pd.concat([df, df_anomalies]).reset_index(drop=True)
36
37# Shuffle the dataset
38df = df.sample(frac=1).reset_index(drop=True)
39
40# Save the data to CSV
41df.to_csv('synthetic_health_claims.csv', index=False)
42
43print("Synthetic data generated and saved to 'synthetic_health_claims.csv'.")

Claim Test

Claim Test
 1import requests
 2import pandas as pd
 3
 4# Define 10 different test inputs
 5test_data = [
 6    {"claim_amount": 1000, "num_services": 2, "patient_age": 30, "provider_id": 1, "days_since_last_claim": 100},
 7    {"claim_amount": 2000, "num_services": 5, "patient_age": 45, "provider_id": 2, "days_since_last_claim": 200},
 8    {"claim_amount": 15000, "num_services": 10, "patient_age": 50, "provider_id": 3, "days_since_last_claim": 300},
 9    {"claim_amount": 500, "num_services": 1, "patient_age": 25, "provider_id": 4, "days_since_last_claim": 10},
10    {"claim_amount": 7500, "num_services": 8, "patient_age": 60, "provider_id": 5, "days_since_last_claim": 50},
11    {"claim_amount": 2500, "num_services": 3, "patient_age": 35, "provider_id": 6, "days_since_last_claim": 120},
12    {"claim_amount": 9000, "num_services": 15, "patient_age": 70, "provider_id": 7, "days_since_last_claim": 180},
13    {"claim_amount": 400, "num_services": 2, "patient_age": 22, "provider_id": 8, "days_since_last_claim": 365},
14    {"claim_amount": 11000, "num_services": 6, "patient_age": 55, "provider_id": 9, "days_since_last_claim": 250},
15    {"claim_amount": 600, "num_services": 4, "patient_age": 40, "provider_id": 10, "days_since_last_claim": 30},
16]
17
18# Convert to DataFrame
19df_test = pd.DataFrame(test_data)
20
21# Make the prediction request
22response = requests.post("http://127.0.0.1:3000/predict", json=df_test.to_dict(orient="records"))
23
24# Check the response
25if response.status_code == 200:
26    predictions = response.json()["predictions"]
27    for i, prediction in enumerate(predictions):
28        print(f"Test Case {i+1}: Prediction: {prediction}")
29else:
30    print(f"Error: {response.status_code} - {response.text}")

Flask App v2

Flask App v2
 1from flask import Flask, render_template, request, redirect, url_for
 2import pandas as pd
 3import requests
 4import base64
 5import io
 6import matplotlib.pyplot as plt
 7import os
 8
 9app = Flask(__name__)
10
11# Route for the home page
12@app.route('/')
13def index():
14    return render_template('index.html')
15
16# Route to handle the CSV file upload and prediction
17@app.route('/predict', methods=['POST'])
18def predict():
19    file_data = request.form.get('file')
20    
21    # Decode the Base64 encoded file content
22    decoded_file = base64.b64decode(file_data.split(',')[1])
23
24    # Read the decoded content into a DataFrame
25    df = pd.read_csv(io.StringIO(decoded_file.decode('utf-8')))
26
27    # Separate the 'claim_id' column if it exists
28    if 'claim_id' in df.columns:
29        claim_ids = df['claim_id']
30        df = df.drop(columns=['claim_id'])
31    else:
32        claim_ids = None
33
34    # Send the DataFrame to the BentoML service
35    response = requests.post(
36        'http://127.0.0.1:3000/predict',  # BentoML endpoint
37        json=df.to_dict(orient='records')
38    )
39
40    # Get predictions from the response
41    predictions = response.json()['predictions']
42
43    # Add predictions to the DataFrame
44    df['Prediction'] = predictions
45
46    # Reattach the 'claim_id' column to the DataFrame
47    if claim_ids is not None:
48        df['claim_id'] = claim_ids
49
50    # Reorder columns to have 'claim_id' first
51    if 'claim_id' in df.columns:
52        df = df[['claim_id'] + [col for col in df.columns if col != 'claim_id']]
53
54    # Save the DataFrame to a session file for visualization
55    df.to_csv('session_data.csv', index=False)
56
57    # Render the DataFrame as an HTML table with a link to visualize
58    return render_template('result.html', tables=[df.to_html(classes='data', header="true")])
59
60# Route to handle the visualization
61@app.route('/visualize')
62def visualize():
63    # Load the session data
64    df = pd.read_csv('session_data.csv')
65
66    # Create a pie chart based on the 'Prediction' column
67    prediction_counts = df['Prediction'].value_counts()
68    plt.figure(figsize=(8, 8))
69    plt.pie(prediction_counts, labels=prediction_counts.index, autopct='%1.1f%%', startangle=140)
70    plt.title('Prediction Distribution')
71
72    # Save the pie chart as an image
73    if not os.path.exists('static'):
74        os.makedirs('static')
75    chart_path = 'static/prediction_pie_chart.png'
76    plt.savefig(chart_path)
77    plt.close()
78
79    # Render the visualization page with the pie chart
80    return render_template('visualize.html', chart_path=chart_path)
81
82if __name__ == '__main__':
83    app.run(debug=True, port=5005)

Templates

index.html
 1<!DOCTYPE html>
 2<html lang="en">
 3<head>
 4    <meta charset="UTF-8">
 5    <meta name="viewport" content="width=device-width, initial-scale=1.0">
 6    <title>Health Insurance Anomaly Detection</title>
 7    <style>
 8        .drag-area {
 9            border: 2px dashed #ccc;
10            border-radius: 10px;
11            width: 100%;
12            height: 200px;
13            text-align: center;
14            padding: 20px;
15            font-size: 20px;
16            color: #333;
17        }
18        .drag-area.hover {
19            border-color: #333;
20            background-color: #f0f0f0;
21        }
22        .drag-area p {
23            margin: 30px 0;
24        }
25        .drag-area button {
26            margin-top: 10px;
27        }
28    </style>
29</head>
30<body>
31    <h1>Upload CSV File</h1>
32    <div class="drag-area" id="drag-area">
33        <p>Drag & Drop your CSV file here or click to upload</p>
34        <input type="file" id="fileInput" name="file" style="display: none;" accept=".csv">
35        <button onclick="document.getElementById('fileInput').click();">Browse Files</button>
36    </div>
37    <form id="uploadForm" action="/predict" method="post" enctype="multipart/form-data">
38        <input type="hidden" name="file" id="hiddenFileInput">
39    </form>
40
41    <script>
42        const dragArea = document.getElementById('drag-area');
43        const fileInput = document.getElementById('fileInput');
44        const hiddenFileInput = document.getElementById('hiddenFileInput');
45        const uploadForm = document.getElementById('uploadForm');
46
47        dragArea.addEventListener('dragover', (e) => {
48            e.preventDefault();
49            dragArea.classList.add('hover');
50        });
51
52        dragArea.addEventListener('dragleave', () => {
53            dragArea.classList.remove('hover');
54        });
55
56        dragArea.addEventListener('drop', (e) => {
57            e.preventDefault();
58            dragArea.classList.remove('hover');
59            const file = e.dataTransfer.files[0];
60            handleFile(file);
61        });
62
63        fileInput.addEventListener('change', (e) => {
64            const file = e.target.files[0];
65            handleFile(file);
66        });
67
68        function handleFile(file) {
69            if (file && file.type === 'text/csv') {
70                const reader = new FileReader();
71                reader.readAsDataURL(file);
72                reader.onload = () => {
73                    hiddenFileInput.value = reader.result;
74                    uploadForm.submit();
75                };
76            } else {
77                alert('Please upload a valid CSV file.');
78            }
79        }
80    </script>
81</body>
82</html>
result.html
 1<!DOCTYPE html>
 2<html lang="en">
 3<head>
 4    <meta charset="UTF-8">
 5    <meta name="viewport" content="width=device-width, initial-scale=1.0">
 6    <title>Prediction Results</title>
 7    <style>
 8        table {
 9            width: 100%;
10            border-collapse: collapse;
11        }
12        table, th, td {
13            border: 1px solid black;
14        }
15        th, td {
16            padding: 10px;
17            text-align: left;
18        }
19    </style>
20</head>
21<body>
22    <h1>Prediction Results</h1>
23    {% for table in tables %}
24        {{ table|safe }}
25    {% endfor %}
26    <a href="/">Go Back</a>
27</body>
28</html>
visualize.html
 1<!DOCTYPE html>
 2<html lang="en">
 3<head>
 4    <meta charset="UTF-8">
 5    <meta name="viewport" content="width=device-width, initial-scale=1.0">
 6    <title>Visualization</title>
 7</head>
 8<body>
 9    <h1>Prediction Distribution</h1>
10    <img src="{{ url_for('static', filename='prediction_pie_chart.png') }}" alt="Prediction Pie Chart">
11    <br><br>
12    <a href="/">Go Back</a>
13</body>
14</html>

ML Model for Insurance Claims

_images/mlmodel_for_insurance_claims.png

Initial Setup Script

Initial Setup Script
 1Automating with MLflow and BentoML
 2
 31. Develope the Model
 42. Store the experiments
 53. Finalize the survey
 6
 7ML-Model to accelerate insurance claims
 8
 9What advantages it brings when we use ML-Model
10
111. Faster Processing - ML Models can automate tasks like claim validation and fraud detection, significantly reducing the processing time.
122. Improved Accuracy - ML models can analyze vast amounts of data to identify patterns and anomalies human might miss, leading to fewer errors.
133. Increased efficiency - Automation frees up human adjusters to focus on complex or high value claims
14
15
16Speed, Accuracy and Efficiency
17
181. Reduced Costs
192. Enhanced Customer Satisfaction
203. Better Risk Assessment

Claims Dataset

Claims Dataset
   1claim_id,claim_amount,num_services,patient_age,provider_id,days_since_last_claim
   21008,12064.315907367947,11,32,2,33
   3346,1058.0124843394092,3,80,49,75
   4264,743.9030896664275,4,49,29,228
   5695,1148.275314492096,9,77,27,38
   615,568.7705418717418,4,56,27,185
   731,849.5733469426508,8,70,43,141
   8999,857.2052525543008,9,25,4,146
   9773,1158.1019347638803,4,27,10,277
  10147,690.7623222804796,2,74,18,208
  11507,851.9015189402827,6,67,15,360
  12847,1072.2921609769546,8,70,38,29
  13418,1028.9186585732148,9,83,2,238
  14951,939.6909855359175,4,60,45,187
  15876,1448.639465879447,1,74,20,10
  1629,849.8403275202987,7,38,22,75
  17952,1088.0138491285743,6,37,14,153
  18160,1164.1384021584574,4,60,46,165
  19462,1008.8158879929322,9,62,11,106
  20196,1096.329344932209,9,86,15,238
  21933,637.996524895939,9,50,44,315
  2224,643.8129534466358,6,42,16,295
  23592,880.5856383087208,5,24,19,45
  241036,8214.38472236602,10,30,38,275
  25818,1222.4076989058592,9,21,19,29
  26217,806.793696365607,9,46,19,295
  27604,1338.9094647012378,6,38,46,103
  28661,856.5844982799409,2,76,28,363
  29137,804.1866769159408,3,55,40,75
  30972,829.7370856312798,2,23,23,110
  31351,1077.7268913995013,9,34,15,314
  32245,699.9258982360559,6,55,21,145
  3367,981.9974696049165,2,78,26,65
  34607,806.5527002241067,8,66,5,334
  35400,1309.4540779933654,6,36,15,271
  36912,1054.7875819159847,1,51,17,34
  37684,1122.3436403069795,3,62,30,297
  38379,1547.450733304418,5,65,30,70
  39943,1162.5502944896652,8,82,11,0
  40930,983.562434731753,5,60,15,332
  41995,749.5949975262711,2,46,28,113
  42184,1120.6181038107964,4,63,18,19
  43138,919.4846209485811,6,23,11,277
  44469,867.3747130973682,2,33,30,94
  45360,793.1922641119193,8,36,1,253
  46456,801.781791934414,4,89,37,272
  47858,1117.853889096601,4,55,38,28
  48839,1246.080599619146,9,21,31,199
  49542,717.5732863355955,7,32,8,77
  50948,827.0229825296889,8,81,15,305
  51540,855.7770326192128,5,61,18,158
  5223,1016.882051171981,2,75,35,303
  53358,927.8353402699655,8,34,28,11
  5466,1339.0600071427057,2,70,19,88
  55430,560.3151283942215,6,88,37,277
  56838,750.4114898153023,8,41,14,43
  57467,1153.5416750108564,8,34,45,326
  58770,1453.1121394992322,9,84,32,86
  59315,1326.3697017885822,7,47,10,333
  60133,734.4240715684738,5,51,5,246
  61698,687.2216059036742,6,48,9,266
  621010,13492.403951144599,12,80,13,5
  63585,1045.4665637646237,3,55,5,205
  64646,931.8191075630824,7,42,17,57
  65136,1387.483601254385,7,89,34,344
  66666,1026.6075569229743,3,45,2,72
  67486,644.4365726005815,8,47,38,330
  68946,732.4788084184619,1,23,9,109
  691037,9541.281892503732,19,29,36,111
  701044,9064.850876021788,11,40,47,190
  71626,872.1960808922037,5,71,21,277
  72643,935.1021621590988,8,54,22,19
  73628,968.5532699750879,1,46,5,218
  7447,884.8403072600531,6,47,30,282
  75571,1004.6045947973879,1,59,22,95
  76281,1028.379336312812,6,36,44,246
  77239,834.5533838079031,9,62,49,363
  78560,894.7538797949343,1,30,15,313
  79227,1016.0700047738657,3,44,25,286
  80791,1107.4045547831465,4,75,25,70
  81613,1069.992156579955,1,70,42,272
  82923,1033.242418536719,3,81,21,174
  83305,994.774601508963,3,21,28,280
  84428,1171.5128649996097,3,25,8,74
  851026,7491.9645240248965,11,59,24,89
  86742,680.1057583160746,2,21,11,234
  87837,1387.6251232035193,5,41,26,69
  88893,1266.6686723972884,7,27,24,223
  896,941.4657607627049,9,32,5,268
  90986,710.4088277018644,2,85,2,147
  91290,844.3251200448515,9,81,42,17
  92353,1214.4149058005048,4,36,43,78
  93944,975.2060340551543,6,86,34,265
  94916,1069.7553814425848,7,23,32,76
  95201,1089.4468400870708,4,64,1,43
  96326,696.4528468030669,3,34,48,208
  97252,1229.4654867636941,4,70,41,150
  9850,559.2399611593165,1,31,3,162
  99141,1056.8649836510324,5,78,11,110
 100800,1007.4390348739358,9,39,15,298
 101640,676.2303069840959,5,76,15,217
 102737,1064.0074335784689,4,35,8,10
 103412,718.8394770405328,7,84,31,179
 104725,1042.7163595319855,6,28,34,207
 105142,1326.7856885706071,1,29,16,320
 106516,1188.847806456439,5,25,12,362
 107277,1049.7649238933675,4,82,21,290
 108419,1294.8242960159566,9,58,49,334
 109345,882.2404235954193,4,18,1,297
 110545,382.08887496817766,2,66,38,14
 111497,740.6884614183859,4,40,21,83
 112269,889.9888783257541,9,51,32,322
 113842,1168.704873041651,2,74,8,18
 114115,951.9097588047193,8,43,26,239
 115484,1050.8659089668058,2,82,32,305
 116478,1077.812538635884,3,84,26,105
 117396,882.7060869738237,1,65,18,325
 118261,768.2673821054792,4,80,30,145
 1191024,7496.603751923622,18,30,47,188
 120614,718.6277381754059,4,63,20,82
 121288,1147.079301621144,6,66,43,269
 122489,1421.7854087681412,3,38,38,194
 12321,1366.4121922303884,3,84,34,283
 124432,490.1919555599749,4,24,45,299
 12560,1243.8862817805898,3,88,41,131
 126863,1386.8763003325155,1,85,32,270
 127102,894.8386693086602,5,26,17,191
 128845,1041.613052053264,7,40,32,253
 129941,679.9239003322764,3,66,44,277
 130493,1019.3420769119045,9,74,30,143
 131662,863.285264689902,2,21,26,203
 132896,1162.1774718974107,4,65,45,118
 1331016,8870.077525963776,12,33,35,173
 134316,1005.2509604081897,5,59,40,354
 135297,1224.8999688583126,4,48,42,82
 136333,1018.9511395484316,9,51,24,330
 137857,791.9111067239428,5,24,32,246
 138648,986.4262833705469,1,72,46,128
 1397,1394.8032038768479,6,52,28,307
 140153,829.9938196053773,7,66,3,189
 141109,1064.387597680691,3,57,47,236
 142727,1004.6084832663483,9,87,38,88
 143859,861.9442389297571,9,78,8,160
 144100,941.3532166562131,2,50,48,202
 14562,953.5852558340457,4,36,2,175
 146752,662.0788485959166,3,82,13,285
 147716,1275.8254705041304,6,79,42,323
 14837,1052.215898751189,6,23,20,117
 1491032,8175.147635244881,18,28,35,221
 150437,1407.1538863928229,8,54,37,105
 151602,769.4586689555937,6,71,24,282
 152881,1631.7331064684054,9,71,45,92
 1531027,12299.263233067913,18,78,41,175
 154420,1016.8796203525272,1,41,9,147
 155231,817.4083420707158,2,33,45,279
 156320,967.4642364080788,3,23,29,265
 15755,1257.7498806239878,4,20,9,174
 158202,1140.1961315920587,2,66,38,359
 159794,680.8128560449226,7,27,12,290
 160808,880.3128445841307,9,43,26,46
 161678,1438.0676108559057,9,76,22,110
 162421,1515.1869812204968,3,52,28,8
 163888,910.1769773032352,8,49,33,54
 164860,1158.2329544388779,7,20,8,234
 165744,1006.5227625527084,3,76,8,25
 166365,1172.5359979277782,6,64,44,291
 167190,621.2881938285338,9,89,22,248
 168203,1270.7628107938192,6,64,38,316
 169868,1083.6141974967563,7,30,49,258
 170578,1192.7162984717418,7,88,36,364
 171712,975.8217220324019,4,86,39,262
 172235,1535.9860223313315,8,29,5,200
 17348,1264.280556554729,1,42,34,112
 174645,938.564233978514,3,24,47,192
 175111,520.3071961752396,9,63,4,348
 176272,641.0344622051401,7,54,48,298
 177782,666.1639103224746,3,37,1,160
 178584,1567.673214451099,1,26,16,230
 179809,1313.9390313933802,4,36,27,250
 180849,840.565003937171,3,58,30,32
 181911,923.0554412617498,8,74,18,28
 182603,1217.4014800264151,8,82,11,342
 183475,1411.2419283753209,6,48,15,180
 184761,856.0905434405565,9,59,38,216
 185760,1175.0774698522478,1,45,18,109
 18638,510.08246903005613,2,40,27,72
 187605,1103.3587258059251,1,30,34,255
 188303,1186.8234012808155,9,84,19,214
 189885,1170.4728724065778,7,76,13,24
 190225,882.0170335526416,1,20,42,236
 191174,1085.287993704161,7,76,21,162
 192466,944.7576001166943,2,57,40,3
 193856,857.313426562631,2,57,22,331
 19491,1024.2693873370101,7,28,10,359
 195563,1217.781175857923,2,28,49,35
 19617,746.7922199163941,4,37,12,354
 19796,634.1212629669703,6,65,42,137
 198766,824.2058937185282,4,89,31,63
 199799,1007.0795940326149,8,34,15,122
 2001038,5825.499617259132,12,54,7,223
 201689,1177.7399920508728,2,45,43,298
 2021034,11432.052513815663,12,30,49,327
 203877,870.5971752409572,5,64,39,67
 204806,922.7069691328402,4,68,40,15
 205170,811.5659589106276,5,58,33,282
 20628,1093.924504586418,3,80,38,183
 207299,1203.21552970974,8,67,11,174
 208173,980.7245726464739,1,68,18,244
 209688,906.2947981126007,3,85,46,25
 210517,1125.2292969060952,6,29,33,282
 211374,1239.8177065213017,7,29,45,174
 212774,1243.1386124066823,2,26,40,336
 213249,1441.3635600702742,7,35,35,97
 214243,1126.2468197451142,4,40,33,285
 21563,723.416256498493,5,64,29,182
 216163,1289.648894751851,8,66,9,261
 217409,1030.0739079279747,2,48,40,220
 218230,1169.899437233669,8,20,25,135
 21953,830.7694999235104,4,65,27,43
 220792,1051.9219217907778,6,43,48,177
 221853,840.6532181733705,9,87,45,349
 222195,1043.2952314627955,1,62,28,62
 223619,1120.2523079341784,7,31,32,211
 224350,946.6382120720382,6,68,3,129
 225998,1160.2107153167524,2,74,37,202
 226332,775.6864071285421,7,30,39,53
 227673,914.3281014799128,3,32,11,170
 228836,1058.55368313413,7,53,13,236
 22936,694.7890875072444,2,26,38,249
 23080,503.1077713497768,8,85,28,69
 231870,1502.5511346915873,1,67,29,170
 23295,901.9729617169606,7,86,46,241
 233483,598.3884199356069,9,56,18,295
 234335,1243.7799333544378,7,68,17,240
 235449,871.5332706658266,4,80,23,287
 236822,1352.336860046395,8,58,18,65
 237623,1470.5061241187584,8,20,18,284
 238938,1177.0891118248383,2,76,9,326
 239746,818.5640467116336,3,60,30,28
 240600,1094.325123261213,5,45,19,260
 241724,1185.8160235056787,5,67,44,87
 242403,1001.3109249295458,8,84,42,29
 243981,1196.4500396627081,9,36,35,279
 244476,937.7409901109054,2,51,16,105
 245969,989.9605123389141,4,44,21,55
 246416,812.8783658608615,5,81,30,69
 247665,821.788554330709,2,46,13,275
 248638,1018.329491797101,4,70,4,343
 249407,733.0948926543514,6,64,3,140
 250906,1011.6091370390373,1,56,49,270
 251692,1289.832450841062,7,64,45,19
 252827,1394.8930364326782,4,32,32,17
 25333,996.6256938155166,5,31,27,24
 254300,1157.4072104809031,3,86,14,68
 255641,916.053825177468,3,64,40,15
 256719,909.096946946536,6,20,19,139
 257949,988.6034959111255,5,79,12,11
 25875,345.0637239775639,2,31,36,142
 259549,1092.7864683428272,3,54,12,339
 260755,762.6502777920142,1,76,37,207
 261479,1769.7202021138094,3,25,2,279
 262705,610.842706619024,4,67,31,229
 263367,1056.0231204526042,2,38,7,324
 264473,621.202234450362,4,30,44,320
 26599,1001.2783641606152,9,61,6,199
 266771,1176.9379838638688,5,30,5,216
 267395,1294.8600301803217,8,52,45,280
 268865,846.8028273789035,8,53,10,179
 269520,1187.8467808429473,2,66,1,161
 270481,968.0206021298084,3,44,26,107
 2711011,8099.548171928165,16,57,39,214
 272323,795.4448291916319,9,46,1,84
 273159,702.1741256993379,7,25,8,144
 274551,1021.647446868225,4,75,31,358
 275572,1419.1093280688208,1,34,38,163
 276854,1297.254132776888,9,74,34,154
 277423,937.7589628802316,7,47,34,49
 2781023,9388.889175189091,13,19,19,165
 279576,447.2161727480287,5,64,49,194
 280686,1178.249607543097,4,70,20,239
 281738,1245.6727459863785,4,36,40,347
 282311,945.5796991931949,1,67,33,313
 283237,493.7143533355982,6,82,46,263
 284221,1578.6646416683773,5,31,1,189
 285463,825.0686230018537,6,78,16,87
 28626,1027.7306474274665,9,55,24,207
 287317,1170.488242823741,1,54,47,115
 28811,884.1455767968845,2,83,26,227
 289788,1114.7950198071092,1,85,9,217
 290754,1263.41044915196,7,56,36,272
 291656,1014.804608503622,7,68,40,160
 292460,700.5305268527878,3,62,42,301
 293465,971.9179875772926,5,83,40,340
 294319,1081.0415881221106,5,52,1,225
 29540,1049.2153089672809,6,63,20,359
 296263,189.68316498273185,8,65,9,95
 297312,1274.6942129967977,3,23,33,93
 298406,1155.7124830868747,5,30,19,33
 299525,809.1852108643708,7,67,32,72
 300178,1363.3835192893291,1,56,40,57
 301181,1156.4168369412516,1,28,37,25
 302495,1380.7810193174143,7,48,32,181
 303511,1067.6142064449598,4,39,6,207
 304519,1024.8330763573065,7,51,8,335
 305706,1151.50248783641,3,55,8,219
 306188,981.7927718357818,5,36,13,145
 307672,481.65244189796266,8,67,26,172
 308151,1062.6232125864692,2,65,13,207
 309772,859.383306026433,9,62,38,6
 310204,1263.4505130087257,4,35,21,144
 3111018,14925.646121585343,10,69,11,330
 312385,810.2168346115756,8,40,8,227
 313127,752.3659187173279,8,45,23,93
 314587,885.159775114939,3,73,10,336
 31577,1021.7617670595429,5,76,30,301
 316636,586.2858320335575,2,75,1,74
 317156,821.412145493408,7,66,1,16
 318777,818.2157060437828,6,51,35,329
 31976,1205.4756260938059,8,70,34,249
 320255,620.1575085114966,5,49,23,107
 321454,1126.011628879461,6,21,36,193
 322394,1457.8646914635885,8,24,49,147
 323104,799.4306826945952,1,52,27,236
 324580,1285.9385108017323,8,30,15,186
 325259,1110.954857036557,4,61,16,287
 326285,1533.2583436640666,6,52,33,315
 327348,648.1340564058612,8,30,43,332
 328880,1297.098318362021,6,39,13,97
 3295,941.461656319166,6,28,6,57
 330747,1046.6916911192695,6,83,10,352
 331565,1300.3034805409861,5,85,11,21
 332370,806.7475540361334,6,73,19,291
 333635,746.9739061849581,9,64,19,95
 334790,584.7597666210023,5,18,13,0
 335280,903.67160078456,7,37,6,149
 336458,741.1894193951565,6,31,42,143
 337925,1298.7616572312106,8,84,21,84
 338208,1128.4464877280523,2,53,49,64
 339985,999.0993652273579,8,56,21,24
 340926,619.2032738040563,8,32,48,44
 341793,1067.8947092988433,4,37,18,188
 342275,754.6228372380123,8,54,17,296
 343647,325.7783392646071,7,50,29,110
 344210,1963.1828726636802,9,45,28,287
 34542,1042.8420702974927,8,31,19,210
 346324,1523.096818921365,9,76,34,213
 34789,867.5599490582402,6,29,19,226
 348867,1071.4663476812264,9,86,12,273
 349676,805.5458281022811,7,39,40,85
 350577,1058.9036395271414,1,35,32,150
 351164,794.8294204120724,2,81,6,162
 352218,940.7953483149978,5,83,35,186
 353186,1178.500123523023,1,18,22,58
 354194,688.565305322003,9,50,4,18
 355453,753.5684884161141,9,63,26,129
 356606,1469.1989531395166,8,74,28,205
 357377,1218.0801591801696,6,36,11,150
 358490,1220.4099392373626,9,36,3,282
 3591045,7254.77176640996,18,57,40,199
 36030,927.0765625516808,4,74,26,286
 36172,1384.5091416164923,3,81,48,213
 36288,1082.1877774149211,9,47,36,148
 363558,891.8604530450948,9,40,35,161
 364389,1237.6059595465126,3,68,47,63
 365769,843.2582355530582,7,44,46,319
 366971,1032.0261037276973,4,34,40,159
 367869,1164.6360681682077,6,75,31,134
 368508,784.002307580046,7,45,4,41
 369655,1643.339950812465,7,24,12,111
 370175,1069.1726998325048,7,56,2,59
 371803,1024.030194235246,9,86,17,333
 372258,823.0826335953049,2,45,23,5
 373213,1238.5004408733005,1,58,3,313
 374399,971.3650386868455,4,89,45,223
 375417,1387.7879938806307,2,38,43,115
 37664,700.9483439798323,2,31,4,128
 377714,1099.7840285880177,4,55,49,358
 378873,655.1701929963682,6,42,41,185
 379232,1054.1146473954936,9,57,46,270
 380388,1469.0427098039715,7,81,12,20
 381815,1257.9611348671588,7,57,12,303
 3821013,10765.3017525299,12,26,42,284
 383750,648.3347257879444,5,30,49,333
 384331,996.9383067882713,6,66,29,297
 38525,863.9043188687043,7,64,2,96
 386564,918.4941169580397,8,34,35,172
 387234,837.0999130985458,5,58,32,158
 3881043,6752.011204219161,11,77,16,156
 389539,1251.57320230361,1,51,38,163
 390807,1055.5334429084282,8,38,20,354
 391669,337.257547901747,6,26,38,242
 392913,1062.345920927689,4,58,30,5
 393850,867.2507612495456,3,74,3,228
 394637,1205.7926459904786,6,44,7,53
 395653,932.7778273612923,8,33,43,7
 396244,1216.4387985425303,7,41,49,229
 397313,1206.3540872470076,2,76,19,126
 398220,1020.4685348465806,7,27,5,219
 399541,1208.9230280162853,4,85,2,56
 400289,1070.247966933758,9,55,32,224
 40139,667.9534877753923,3,76,41,281
 402382,850.1518386389945,9,72,48,292
 40357,790.1956191943403,8,36,32,350
 404644,624.2142617204735,5,23,22,45
 40570,838.7200613487189,7,47,15,339
 406871,955.7631931264876,1,47,5,209
 407717,1028.5569121655099,3,63,30,153
 408589,1207.5839541360615,1,51,25,141
 409657,1003.4823229782365,6,49,20,130
 410996,929.7249267785113,9,41,2,110
 411414,1319.4192054746272,2,27,32,230
 412732,755.406805596242,4,73,37,259
 413821,870.6778874749069,4,25,48,202
 414905,1047.7747670049757,8,32,37,294
 415749,847.1205492520129,6,25,28,269
 416491,998.0068396708457,3,70,30,181
 417953,687.115143952389,6,85,8,333
 418522,1135.8400480949838,6,43,22,88
 419375,1538.295614377889,4,87,15,75
 420468,1189.3769275118264,5,51,2,305
 421899,1301.6272416270892,8,38,8,214
 42286,874.5607391038659,5,79,49,90
 423745,1129.4147551172807,1,34,29,53
 424598,755.3090710544232,3,61,20,43
 425595,1259.3849860644748,4,20,10,43
 426500,654.3000672589159,8,27,27,280
 427989,944.758956542584,5,71,39,337
 428748,811.1542669116693,8,51,39,163
 429957,1085.681336594426,1,39,1,24
 430393,669.9416982448395,4,21,28,284
 431135,770.1439414415491,1,18,48,51
 432343,1061.2416427771807,5,28,49,238
 433918,1046.6522807890894,7,20,46,146
 43420,646.924074666177,6,80,10,183
 435167,1205.5150399986226,7,26,39,71
 436968,1450.235108227704,1,22,29,178
 4371002,7209.505971600776,11,56,25,272
 438570,912.1216289896728,8,54,35,216
 439934,450.2985108449795,8,31,31,333
 440242,971.3158896332752,5,42,16,312
 441758,1046.2090309237185,2,54,4,172
 442240,1213.108333699056,5,79,42,102
 443504,1140.7423091726428,4,37,10,295
 444253,1530.5390492531583,3,47,5,349
 445362,1383.1847282506444,3,28,22,16
 446679,1233.9195982868653,5,88,20,364
 447455,867.4355954068898,1,47,42,315
 448816,628.609906740757,8,22,44,38
 449825,888.624369649807,9,45,4,221
 450685,694.4680477770137,1,28,17,345
 451904,1319.6129656518247,9,83,39,250
 452309,1136.7743452925095,2,81,9,73
 453124,649.5372343019297,1,21,40,89
 454139,1203.3793043424175,5,42,3,39
 455250,1101.245427740239,5,53,39,170
 4568,1191.858682288227,9,50,41,57
 457768,1442.7001589088775,6,39,28,243
 458329,1156.0299542630387,2,86,48,331
 459756,1658.0955162093478,7,61,26,237
 4601040,9732.117797411158,11,88,19,58
 461441,1096.0163622348268,4,30,7,146
 462903,1007.1862057337044,4,53,13,329
 463919,888.391596362368,9,80,30,66
 464307,1319.4162239471061,1,44,8,247
 465991,1052.0957019868881,1,31,17,300
 466987,1375.8495754417877,6,50,40,117
 467262,985.1186609845499,3,40,22,270
 468533,983.4800503381708,5,45,46,275
 469330,1157.08637731607,3,54,49,120
 470764,975.9850250688376,1,83,22,46
 47112,883.5675616074358,8,57,20,246
 472555,1084.4006655188005,9,72,3,356
 473851,844.214868393809,9,77,28,11
 474197,779.0356409497167,9,25,1,336
 475787,1208.4805386372261,4,70,34,131
 476630,1273.5478796177372,2,42,41,71
 4771042,7950.33613741562,16,73,25,108
 478214,1162.8478128264494,8,56,45,127
 47985,797.8765992767031,5,33,7,302
 480510,792.2624708972405,5,41,23,245
 481354,960.0153675091432,1,54,32,71
 482397,571.7163677272805,9,89,2,318
 483883,877.6401393704444,2,89,49,171
 4844,1380.7574641020062,3,86,2,163
 485359,1080.6796400845224,6,53,9,140
 486552,961.0806911519801,6,46,27,279
 487257,1316.7277872966556,3,84,12,92
 488371,1006.1275435647357,1,37,19,283
 489223,1171.5650475936284,9,56,12,283
 4901004,9553.062290542735,15,27,20,172
 491451,984.330225681707,9,26,3,186
 492145,1064.9706985621058,4,25,48,181
 493401,601.3930853014082,6,80,20,145
 494813,1361.7444710884333,7,88,16,16
 495739,1416.3686111156442,8,72,44,214
 496721,1076.9504422230148,6,25,11,116
 49734,735.572267761025,7,34,29,289
 498723,662.9536444735718,7,50,7,308
 499864,1448.9694182738804,1,55,35,257
 500364,1100.4279305247353,3,62,41,252
 501811,953.2820889596602,8,88,18,30
 502566,897.9811567446121,7,64,21,205
 503942,1218.1143320700362,2,57,35,112
 504505,837.3393577195432,4,49,39,224
 505960,1111.9271400043287,5,24,42,140
 506633,960.4980253552526,9,45,10,211
 507119,1285.7057036287551,4,68,43,306
 50835,1205.6362280257972,3,56,47,66
 509381,790.069539454806,7,87,18,123
 510990,1006.7214597486327,8,24,28,65
 511907,660.0359647550201,2,87,28,122
 512328,1197.915673490734,5,85,13,257
 513993,938.2056543698508,3,71,19,318
 514267,1408.1028259829088,1,41,23,5
 515149,1130.4853914042244,2,31,19,165
 516405,887.4836321301891,1,86,3,274
 517615,1611.4379949042066,4,30,38,109
 518977,886.9234201877308,6,76,45,301
 519526,548.7794748338703,8,25,35,75
 520675,648.1220763205447,3,45,44,187
 5219,882.631403516262,7,33,5,287
 522293,852.658810763947,8,51,47,232
 523378,1045.835501434588,4,43,46,269
 5241022,14708.189418527656,10,35,22,74
 525910,1540.813680826365,3,56,2,347
 526143,598.1291913596931,1,23,18,248
 527523,834.3440602635384,6,35,6,321
 528736,1118.1493706032606,7,28,40,121
 529443,483.13947499003086,5,22,9,162
 530982,1106.3643904462413,2,86,11,93
 531624,1336.3550115387445,2,34,23,325
 53284,870.4324454315881,7,72,4,363
 53319,772.9939811196972,6,89,3,359
 534830,929.5538477848731,7,84,45,254
 535703,823.9140773643102,5,71,17,97
 53651,1081.0209923486987,5,43,6,104
 537373,1362.7859019487605,2,63,41,348
 538246,916.3746910397629,2,45,9,196
 539123,1350.6985777340249,5,68,45,331
 540707,679.8926618759292,7,44,15,64
 541524,1142.6496671482898,5,55,21,11
 542890,1277.1758951457268,3,51,15,143
 543805,891.3759431419211,9,73,9,155
 544356,749.3676588405478,5,45,16,190
 545192,1214.099698580868,2,29,43,12
 546642,1417.2553813223483,1,51,12,98
 547238,1046.613578692357,5,72,42,70
 548509,1012.1304069862067,2,70,32,302
 549339,1103.2328635689062,6,68,26,345
 55078,925.248162383533,1,58,25,24
 551671,1311.5212981244072,1,73,36,101
 552322,1148.7892563592284,9,35,13,10
 553268,642.4646555098418,4,56,13,111
 554183,732.2768754847219,9,28,28,4
 555276,1115.5258685658177,4,73,40,213
 556654,723.3685228145824,8,60,15,28
 557380,797.9254286612121,9,69,40,179
 558304,1152.5925663583662,2,62,15,29
 559254,1258.1163151377866,4,77,42,121
 560650,1174.0515912033545,2,24,20,193
 561622,1117.867089283999,4,42,27,200
 562741,539.7814421670887,2,23,40,27
 56387,1228.8505294255185,6,65,9,17
 564457,973.2424100113606,1,20,22,351
 565282,1165.5326686302617,1,46,18,266
 566556,897.0307584693832,1,27,45,145
 567140,692.2839208915112,5,34,33,100
 568596,872.4959002863133,3,45,43,168
 569833,748.964808311983,8,57,37,345
 570810,776.3481744451241,5,77,21,186
 571514,773.1090844896005,6,21,37,184
 572936,874.4864439118472,4,78,30,326
 573954,1360.941151018315,3,61,8,278
 574436,1018.5236951049438,3,42,35,136
 575301,792.7512472694818,4,47,39,46
 576121,1197.7579867607617,5,37,42,266
 577711,1052.7543668006547,5,63,20,51
 578909,1161.3710452852688,8,40,16,265
 579677,722.3560386335428,7,34,43,51
 580581,1084.6241018736034,8,48,43,148
 5811021,5674.915651411771,12,37,19,283
 582729,865.0600799226596,1,33,10,53
 583233,1011.3929599759534,3,19,32,170
 584872,800.4256888653865,2,79,25,235
 585336,963.2356546244654,8,20,7,242
 586148,669.8858467289309,8,57,38,21
 587134,1118.3981076587954,4,72,43,30
 588487,838.3567789393684,9,70,47,194
 589731,1048.9613137744204,7,65,15,117
 590200,714.2574255423442,9,47,38,121
 591779,981.3916427249884,1,49,48,305
 592144,1046.1584646330762,3,44,30,190
 593900,795.766082253191,8,82,8,196
 594118,707.830490595117,6,38,17,187
 595266,688.0542045087876,2,50,37,211
 596668,1375.9982471456722,8,21,49,259
 597561,1072.4437142241031,2,50,16,331
 598814,1049.1386941278936,3,43,9,38
 5991009,8071.325886946268,17,21,25,35
 600408,964.4051287446766,4,78,14,317
 601302,859.9547399507576,7,76,47,255
 60246,820.0389479013228,3,36,2,194
 603308,852.1071527910425,7,63,43,24
 604355,995.2459480243278,2,25,26,262
 605734,574.3540989405399,8,76,3,304
 60649,1085.9045723921154,7,57,22,270
 607177,1003.2504729694767,2,58,38,196
 608588,787.5389076338021,8,62,19,86
 609651,1462.2390237363363,5,74,48,339
 610450,735.1966195277621,2,40,31,321
 611131,612.3341422334669,2,84,33,183
 612480,1279.8937278586443,5,72,12,259
 613629,1013.9312280721737,8,60,23,88
 614632,1382.3875798651534,9,82,41,128
 61592,1242.1612476332223,9,81,36,150
 6161050,11419.392692715172,18,86,19,236
 617728,1086.8954263404178,4,58,24,117
 618795,729.7358648979344,7,76,40,7
 619531,1159.6481146943436,2,81,6,225
 6201025,6604.174789475593,10,21,16,77
 621155,1073.2681183246702,2,78,38,272
 622932,1470.2892673601475,7,75,10,8
 623205,655.5826580107272,6,83,48,326
 624937,744.6917957173217,6,21,33,14
 625620,1055.9710060697828,2,27,11,290
 626107,1471.5464753026326,4,62,25,36
 6271020,8624.66812469927,17,22,5,114
 628376,808.1631092779876,8,34,3,100
 629404,1011.7451484411855,7,76,29,44
 630338,919.6535395867517,4,49,5,186
 631917,1151.9741274291348,4,69,29,348
 6321012,10096.267456239399,14,26,28,133
 633433,932.6482913888606,1,84,39,289
 634988,1219.3405726439178,3,30,19,337
 63573,991.0434902225121,6,50,21,293
 636529,1064.9306254303704,1,86,46,9
 637914,1394.3633199408687,3,30,39,110
 638557,878.0984439818766,8,64,27,215
 639687,939.9186504604663,8,89,16,114
 640496,1134.7275109211646,1,72,28,29
 641820,1266.3700937663377,9,32,35,277
 642274,1002.5582652548968,1,85,45,336
 643786,1270.1951813886556,5,62,42,3
 644152,1086.612052374244,9,73,46,7
 645341,794.4449011083922,4,38,3,261
 646168,1474.198245663487,8,54,49,142
 647978,394.0301683427608,2,50,8,248
 648368,1003.1481001954487,7,28,14,89
 649664,864.1438072165588,4,46,13,108
 650783,1095.0494627514909,3,52,31,0
 651337,793.6257008018721,3,59,13,17
 652649,942.2663674478305,9,75,14,336
 653901,1092.1683272182254,5,80,26,41
 6541014,11960.74942430654,10,43,6,125
 655730,805.4238186494218,7,85,32,115
 656887,1145.982046331491,8,59,36,84
 657722,572.4579018358437,8,61,34,45
 658120,1187.9832581716935,9,55,41,29
 659366,899.694882028541,6,29,41,7
 660424,1242.892737738589,4,74,15,337
 661344,873.2642061572176,1,85,39,303
 662429,1264.606121712397,6,43,9,164
 66341,1184.6166449988525,5,55,44,9
 664166,1103.1952317341245,1,71,25,238
 665117,991.3220575736892,9,39,28,359
 666427,758.7691348549739,6,36,36,125
 667176,1206.795812259006,2,72,43,5
 668101,646.1573144873964,3,78,38,60
 669537,784.8966586790119,1,26,40,320
 670962,1332.288132533108,4,84,39,333
 6711033,7233.451473296811,15,59,14,314
 672512,987.4404726377157,3,47,24,236
 673444,977.7199901218029,3,77,28,340
 674215,921.1826888399136,6,19,47,238
 675980,1190.1036640360744,3,67,49,5
 6761028,12644.671319186846,11,25,4,20
 6771031,6886.198526246661,12,26,44,358
 678199,1014.5521796114999,5,63,14,162
 679801,1234.5709514939995,4,58,39,282
 680292,876.7497663352917,9,25,10,250
 681639,677.5097750647366,4,59,1,53
 682735,1257.2889093314109,5,79,37,6
 683961,1160.680689966886,2,73,11,42
 684498,952.415330479098,4,49,46,165
 685187,1118.3094061433862,3,57,11,241
 686861,1050.730755212825,6,68,6,189
 687908,1186.5633915068051,9,18,25,338
 688667,936.2556956447862,7,61,37,166
 689829,894.9532957260357,1,18,13,180
 690527,593.1143905292093,7,58,15,345
 691715,990.5913243937879,8,79,17,316
 692553,1291.9455154149518,5,50,32,109
 693894,1292.3238976114183,5,34,8,219
 694682,717.7370571956927,1,42,40,210
 695191,888.3712619832447,2,78,7,13
 696627,752.5987949353548,2,41,44,324
 69774,1391.1609139535014,3,69,22,252
 698743,843.7953555760803,3,46,46,312
 699983,758.2559642176967,9,83,24,268
 700824,909.2903598900853,2,63,39,267
 701670,1272.8767129806154,5,22,2,274
 702226,1272.2376492418416,1,87,23,193
 70390,1128.316858278339,8,52,1,213
 7041029,11630.30467863884,12,84,15,53
 705767,991.2528773757596,4,65,11,245
 706103,914.3213708683077,5,85,10,4
 707518,755.6111888003622,5,48,28,40
 708180,1680.0422916474047,8,81,43,216
 709270,1032.6851443215228,7,73,46,105
 710573,1081.7318434410406,7,65,31,147
 7111006,13611.218722366253,15,35,17,154
 712945,1461.6592490119165,1,44,16,207
 71343,971.0879294029398,9,89,20,322
 714594,1083.4155263217372,4,35,2,14
 715287,962.0537262411042,5,28,17,86
 71632,1463.0695461272344,7,63,39,236
 717314,1203.3774090001596,1,32,3,24
 718515,855.8071673579168,7,76,20,241
 719583,1158.1954665265712,7,33,3,242
 7201030,10330.84456838341,16,80,25,183
 721681,1180.4180160108087,8,43,29,42
 722169,938.6529709992824,6,66,28,309
 723733,1102.063188928618,3,81,20,74
 7241005,11691.619848248203,18,47,44,6
 725823,1574.7245309048126,4,36,16,107
 726579,630.3534385550396,5,30,32,122
 727897,958.2204799207864,4,69,23,264
 728547,1144.268031795135,2,73,27,100
 729154,1058.0634242902509,8,30,10,174
 7301001,12985.238124865378,19,65,31,41
 731720,985.7635940697331,5,23,46,50
 732631,576.8838425712952,7,77,25,246
 733898,1036.6784216083306,6,42,46,149
 734924,824.9697962652067,8,82,30,178
 735740,1253.5925162545327,8,43,23,278
 736959,1142.441820058051,5,89,40,189
 737950,1060.8348623306729,5,36,33,344
 738185,944.1343036685373,1,62,34,197
 739796,1263.288213333226,2,58,17,252
 740785,1139.94761198276,5,35,42,187
 741567,490.46886620553653,2,42,11,126
 742621,802.381386138672,5,52,18,132
 743548,949.2386534892519,8,68,20,155
 7441019,10414.333402162294,13,86,20,25
 74527,712.2516056444243,3,32,10,136
 74644,924.7240761026778,3,79,35,151
 747780,1155.1680243876694,3,88,23,229
 748461,1491.1812832290973,3,51,13,244
 749410,1128.6097085146873,4,39,4,355
 7501007,8488.34483126196,15,77,45,9
 751279,1017.4505212475048,6,64,37,192
 752920,1048.5224982245768,2,66,18,7
 75345,630.3695024081431,3,52,47,4
 754211,1142.7226276732918,7,57,21,163
 755855,1355.1260619974637,1,27,16,245
 75658,922.6969060371963,2,45,48,339
 757501,1231.5443868829104,1,89,36,95
 758751,769.1916884722739,4,25,36,34
 759438,654.9746354462771,6,18,19,94
 760129,1024.9128412719103,4,39,32,222
 761976,527.6148172636173,4,86,37,67
 762150,1074.2461683082965,9,52,36,98
 763652,1281.6412573869393,5,29,33,325
 764970,642.306224470488,9,29,21,154
 76581,945.082028040622,4,25,1,112
 766915,976.176116903262,6,87,13,293
 767434,1179.3855639489905,6,82,32,76
 76810,1135.6400108964913,9,51,18,104
 7692,965.4339247072038,1,39,10,176
 770659,1049.5211901919638,9,89,38,162
 771608,688.8363241721457,9,71,5,42
 772778,938.1203411121238,6,18,44,137
 77316,859.4281176897568,7,87,49,251
 774590,785.9790435227832,5,26,4,316
 775206,765.5437400212193,3,85,29,362
 776452,1238.7855801253095,2,51,21,137
 777162,1196.771150935613,7,56,17,77
 778108,1043.6444532079597,7,64,28,55
 779922,743.3711751472349,5,72,43,339
 780693,729.7341681000257,2,69,47,210
 781391,775.3963321629105,6,68,36,26
 782535,837.0409730494603,5,82,29,59
 783699,1231.0067548017253,6,63,35,153
 784812,890.0672354314563,6,64,13,259
 785886,1461.6768314340084,6,48,17,184
 786992,489.56628289392734,5,36,6,174
 787586,1062.055146575084,8,71,21,197
 788956,1279.323957897032,7,19,12,133
 789841,987.6340725868918,5,51,39,85
 790538,903.8611139425436,3,44,13,123
 791680,1317.8887737485397,8,74,8,341
 79254,1152.9190722102169,5,68,10,281
 79361,880.2064405386775,9,80,36,86
 794492,1369.9860347225065,5,36,1,304
 795947,618.6187072688153,7,30,32,199
 796789,982.4585721353383,5,82,22,259
 797219,878.6591130427241,1,68,4,207
 798179,933.835791690511,8,30,36,304
 799321,1024.2489912481794,7,85,34,98
 800710,1424.1140920725095,3,38,46,327
 801994,829.5039380005503,4,37,38,75
 802114,1615.8105281213216,4,36,27,58
 803955,979.4622054018578,9,40,27,170
 804569,532.3020197435361,6,29,48,355
 805979,604.0242941285692,6,79,41,322
 806931,861.2001183267005,8,52,9,194
 807891,1205.120545299341,3,26,13,350
 808110,981.3885210584582,6,71,15,357
 809207,1128.758816802165,6,50,5,49
 810471,931.237075712089,9,83,12,224
 811398,1338.4680935413533,5,62,13,163
 812294,1212.4005242552562,8,65,36,328
 813963,1049.1302924253675,6,33,43,283
 814122,772.6531363013153,5,46,20,107
 815759,785.4105549546966,4,53,31,78
 816402,850.1562442615568,2,55,29,355
 817112,993.3715311376958,1,64,29,196
 818158,1118.4582302279468,4,79,46,140
 819543,1132.4510444788207,5,68,11,193
 820610,1374.0110778722958,2,70,12,244
 821554,1063.6052108253032,1,77,10,333
 822425,1161.3439873962868,2,64,48,4
 823879,995.894275981812,2,33,4,195
 824413,616.4714573160944,2,71,43,328
 825126,1547.6139064524946,8,88,49,219
 826212,1283.8914100451498,3,32,7,140
 827459,861.5876736632044,4,77,12,15
 828534,697.2459500593859,2,28,40,38
 829286,511.97805011937453,6,60,30,75
 830574,945.224867797784,8,45,14,17
 8311035,7341.718802845739,18,53,19,178
 832828,869.284993211683,2,54,40,89
 833964,1177.2509393971281,7,68,31,145
 834831,663.8873722414307,6,41,17,252
 83583,1369.473511185379,2,58,45,111
 836852,861.1307202099364,5,71,3,117
 837384,868.5612445798097,1,79,32,194
 838536,1011.8496678291035,4,36,7,65
 839369,1024.419024637208,2,22,29,207
 840241,801.8698153918249,2,66,39,124
 8411000,1143.1456953390395,7,79,22,34
 84265,1203.1314555985496,4,55,1,245
 843840,946.5027889436227,5,84,4,151
 844411,1177.9037195222224,1,60,11,21
 845532,584.61998443276,5,46,25,175
 846966,1360.0293038623681,9,29,33,318
 847198,1038.4312764863819,9,42,3,99
 848691,909.75845854523,5,66,16,136
 849696,922.6133901715024,4,74,23,267
 850435,1375.589263024007,2,53,17,297
 851298,1076.8248802191524,2,21,28,124
 852844,1095.6024365460125,3,70,13,94
 853431,704.1853718335562,5,47,48,323
 854763,1640.0211345671987,1,59,23,105
 855521,582.648679719657,5,74,37,159
 856846,1123.112816002037,5,86,38,356
 857474,1341.7185668611312,2,73,11,46
 858797,990.1112115358362,3,22,15,291
 859363,972.8099628857856,6,71,16,62
 86052,903.7294298959208,8,39,15,180
 861817,1066.7625664673146,6,38,38,131
 862494,784.678949667934,3,42,45,315
 86368,1250.883224473006,4,53,25,157
 864193,1053.523436032551,6,78,24,43
 865506,878.2186540588259,4,31,15,332
 866470,856.04543983883,4,77,30,208
 867902,901.6652969181598,6,68,47,52
 868296,826.7726011848365,5,82,9,201
 869775,1155.4524905542992,3,71,46,209
 870618,1181.441655974673,9,19,11,250
 871146,1195.4557179443275,5,82,10,334
 872248,836.667691856572,7,71,45,59
 87371,1090.3489013771034,3,26,22,115
 874835,991.3287781533047,8,78,19,89
 875708,1438.6985454960911,6,32,31,354
 876826,1363.3461192794252,5,85,25,291
 8771017,12846.836935684016,11,32,18,151
 878762,1030.5024536613403,6,60,24,357
 879798,1170.375174343156,1,82,42,243
 880499,781.0954366538107,7,79,13,283
 881182,785.7106108959293,8,36,15,302
 882658,993.9687282224992,6,25,30,187
 8831003,15767.552292384027,18,48,31,190
 884940,858.9803423158179,3,23,1,225
 885189,788.3015704828988,5,89,4,272
 886295,1089.2538714912619,1,73,34,278
 887171,777.6213925936191,6,34,37,268
 888229,821.1740726850079,3,55,24,245
 889113,1015.0575524852566,5,32,9,72
 890694,1153.983901736066,9,71,48,239
 89118,1078.5618331488186,4,18,7,237
 892440,986.1130752758453,7,54,29,67
 89313,1060.4905678915086,8,45,41,187
 894965,977.5660764281934,5,89,17,314
 89556,1232.8200297790497,4,59,33,161
 896472,424.5197088161038,4,83,10,347
 897874,817.2674900145203,6,44,31,363
 898882,867.2828067699198,2,38,42,21
 899599,888.9266849809721,3,38,48,97
 900802,870.9888179456565,6,85,13,31
 9011047,5350.162845433485,14,40,18,195
 902318,922.433310851636,6,59,42,47
 903582,896.1780215247996,9,19,35,103
 904700,953.7744658892527,1,43,20,41
 905228,730.5638055176735,6,19,21,258
 906929,1391.3810073085851,5,35,19,15
 907105,959.6785720834977,8,82,35,180
 908106,1101.0127142036347,8,25,21,310
 909284,690.5461252932878,7,35,22,2
 910161,756.3295824431697,2,37,42,336
 911544,1360.392155164475,4,30,33,284
 91259,1082.815857850891,1,62,6,139
 913683,868.8699334300566,5,27,26,199
 9141049,7679.070825444451,15,68,16,245
 915997,1449.4216317123805,3,80,38,248
 916125,1146.7142734500676,1,72,39,204
 917260,1193.6585133573342,5,58,3,105
 918958,1114.188304788446,7,74,43,17
 919216,1189.7423051233168,7,80,20,323
 920513,940.2629882833976,7,80,20,21
 92197,1074.030069266144,1,37,32,344
 922895,1345.5397477593817,4,85,27,178
 923327,1289.527718375017,7,39,47,63
 924530,773.9208437238979,5,61,48,351
 925609,555.3199377739304,9,27,21,352
 926878,1055.9469879097246,5,56,22,209
 927251,684.7790114162387,9,62,22,172
 928422,1438.8352106108011,4,73,31,287
 929157,1466.4436277861892,6,63,27,89
 930439,574.1543901612114,3,32,44,134
 931674,907.1397835010521,6,49,8,140
 932278,849.9457807103013,4,82,2,21
 933726,954.0041659118302,4,45,20,268
 934832,770.3370133789505,2,44,49,256
 935342,1060.921802872978,8,61,7,363
 936612,986.1038322723863,3,64,49,354
 937875,991.7182567815507,2,68,21,94
 938265,936.8579621517099,2,74,47,201
 939834,808.0506087239679,4,80,6,86
 940697,1081.5332555605296,4,64,24,206
 941426,1342.1578893830872,7,52,25,342
 942709,479.5176480290695,8,78,30,231
 943713,863.7702282977626,4,23,12,266
 9441015,14921.190771066364,17,21,3,336
 9451041,12960.522864904227,17,19,49,326
 946617,1027.3486986512232,9,41,14,287
 947819,1020.570997318856,6,40,7,157
 948528,1012.0212366653456,5,23,5,200
 949448,765.0300534181612,2,83,16,180
 950660,963.9098970190144,6,62,3,196
 95169,1090.4090062619086,6,57,10,148
 952325,748.4956546250745,2,64,29,172
 953593,1119.744956436598,8,53,43,287
 954390,855.7740860843992,8,70,40,164
 955862,621.063971250692,7,64,14,116
 956482,761.1148898498935,2,70,23,18
 957935,1110.003612513333,2,51,23,332
 958975,888.4541416963051,9,45,38,219
 959132,1017.1407437015068,9,83,46,161
 960130,874.1310864709502,2,62,47,185
 961503,650.3581065452147,7,69,22,297
 962442,991.8263129764767,9,25,28,158
 963848,1613.8250349777236,1,79,28,248
 964273,1290.7909380387398,8,24,23,95
 965939,1060.9501784427996,7,46,47,101
 966625,1398.2966566598493,6,29,11,94
 967128,858.425567599307,6,21,47,102
 968634,893.279732513145,8,33,22,342
 969306,1029.3318458271956,4,43,24,236
 970784,1152.646436320956,3,34,31,235
 971485,810.9123136789242,2,34,49,170
 972291,947.9694374106812,8,86,14,112
 97322,943.5559248783661,9,21,25,209
 974757,1123.3294752202223,1,26,22,92
 975445,673.8826248737867,2,18,6,188
 976597,932.5312661766571,7,87,25,309
 977340,859.0688617990063,7,63,49,143
 97893,824.4867265306619,4,67,9,191
 97994,918.0844633505579,2,38,45,39
 980568,747.9784222706489,8,38,30,335
 981601,1189.247154161338,5,71,23,108
 982974,836.8440051744022,3,74,22,231
 983357,995.3717160019025,5,22,25,62
 9841039,10116.928577102117,10,69,30,213
 985386,1037.5984466190519,4,32,22,274
 986310,949.4518368915265,5,68,47,205
 987347,637.978914625669,9,41,17,187
 988392,1122.9797928766263,5,64,15,310
 98914,521.6799388355505,2,64,49,82
 990550,849.0037033210449,9,34,43,124
 991921,1268.407937464943,3,64,13,121
 992765,1287.3183315714189,6,72,2,180
 993704,647.8846759091101,9,50,47,274
 994927,860.2695381821029,9,49,17,135
 995477,1144.1392407639416,7,56,17,198
 9961046,10097.886479532812,15,81,8,311
 997502,1477.3541601175327,5,71,7,265
 99882,1089.2781428779367,7,19,49,362
 99998,1065.2638180449724,9,84,32,179
1000349,820.388944686891,1,28,25,245
1001889,1147.6637076730774,6,76,1,250
1002334,830.7095721219721,1,70,26,271
1003236,1158.4797555795028,2,52,36,44
100479,1022.9401941338756,3,85,45,276
1005446,1167.4181372075095,2,53,29,338
1006546,800.7761861323808,4,87,48,11
10071048,8486.636491556797,19,46,28,34
1008781,1044.4252502333134,5,84,17,307
1009753,756.0316867556668,4,60,32,347
1010884,1261.040219267268,3,33,20,133
1011222,533.1837018520629,3,68,4,345
1012256,878.9414817834372,6,84,17,3
1013928,1094.30296876613,4,85,40,342
1014701,869.3192448702401,9,22,37,10
1015352,1368.839054237388,7,41,29,282
1016488,729.6129990964012,7,30,3,11
1017984,988.0721609645051,5,64,49,196
1018866,903.074610016004,2,58,3,171
1019361,1129.836628560293,2,81,29,42
1020973,1210.160887247181,5,22,6,136
1021559,1098.6130355945743,9,38,31,127
1022702,1262.2523064592224,2,69,42,293
1023387,1085.43899394429,3,44,6,105
1024591,1017.8915593048481,4,25,29,198
1025776,607.4438200273859,1,44,24,168
1026247,881.263672209761,5,38,6,220
1027804,884.4311778237393,6,28,32,145
1028562,1518.8501996613595,1,41,13,149
1029271,1360.3183222665289,7,45,47,138
1030718,1037.5754403654694,5,30,29,357
1031663,991.8116824460004,5,84,30,211
1032892,1126.8185077768244,1,28,17,166
1033415,1083.078502994898,9,59,27,37
1034447,1091.649561524212,3,52,17,94
1035116,1075.3868355834031,1,69,19,1
1036611,1163.5914140885145,2,61,4,286
1037372,1124.4995728113624,3,58,2,117
10383,1161.922134525173,8,34,17,298
1039224,596.821032202587,1,45,27,351
1040209,1128.761921576512,2,36,10,354
1041383,469.0260689225483,7,50,2,284
1042165,1240.8440323110804,5,79,43,13
1043575,1207.3513952958722,3,58,24,293
1044690,1111.06582787151,9,82,7,76
1045843,719.3194946094253,5,66,25,100
1046172,796.0474287586404,2,38,9,240
1047967,830.9019244851826,3,70,32,91
1048464,1053.4949776835556,9,33,8,128
10491,1124.1785382528083,7,65,29,217
1050283,1396.504204036338,8,77,30,250
1051616,1032.3052954938069,9,54,25,189

Isolation Forest Model

Isolation Forest Model
 1import pandas as pd
 2from sklearn.ensemble import IsolationForest
 3from sklearn.model_selection import train_test_split
 4import mlflow
 5import mlflow.sklearn
 6
 7# Load the synthetic data
 8df = pd.read_csv('synthetic_health_claims.csv')
 9
10mlflow.set_tracking_uri("http://127.0.0.1:5001")
11
12# Features to use for the model
13features = ['claim_amount', 'num_services', 'patient_age', 'provider_id', 'days_since_last_claim']
14
15# Split the data into training and test sets
16X_train, X_test = train_test_split(df[features], test_size=0.2, random_state=42)
17
18# Set up MLflow
19mlflow.set_experiment("Health Insurance Claim Anomaly Detection")
20
21with mlflow.start_run():
22    # Train the Isolation Forest model
23    model = IsolationForest(n_estimators=100, contamination=0.05, random_state=42)
24    model.fit(X_train)
25
26    # Predict on the test set
27    y_pred_train = model.predict(X_train)
28    y_pred_test = model.predict(X_test)
29    
30    # Convert predictions to anomaly scores (-1 is anomaly, 1 is normal)
31    anomaly_score_train = (y_pred_train == -1).astype(int)
32    anomaly_score_test = (y_pred_test == -1).astype(int)
33
34    # Log parameters
35    mlflow.log_param("n_estimators", 100)
36    mlflow.log_param("contamination", 0.05)
37    
38    # Log metrics
39    train_anomaly_percentage = anomaly_score_train.mean() * 100
40    test_anomaly_percentage = anomaly_score_test.mean() * 100
41    
42    mlflow.log_metric("train_anomaly_percentage", train_anomaly_percentage)
43    mlflow.log_metric("test_anomaly_percentage", test_anomaly_percentage)
44
45    # Log the model
46    mlflow.sklearn.log_model(model, "model")
47
48    print(f"Train Anomaly Percentage: {train_anomaly_percentage:.2f}%")
49    print(f"Test Anomaly Percentage: {test_anomaly_percentage:.2f}%")
50    print("Model and metrics logged to MLflow.")
51

Create MLflow Experiment

_images/Create_experiment_in_mlflow_using_model.png

Download Model PKL File

_images/download_model_pkl_file.png

Trained Model File

Serve MLModel in BentoML

_images/serve-mlmodel-in-bentoML.png

Deploy Flask Web App

_images/deploy_flask_webapp.png

Model Predictions in UI

_images/Ml-model-prediction-results-in-flask-app.png

ML Model Final Output

_images/ML-Model-for-insurance-claims.png

Second Demo Script

Second Demo Script
  1pip3 install -r requirements.txt
  2
  3Synthetic Healh Claims - Generate random claims .. both normal and abnormal claims and generates csv
  4
  5(.venv) bharathkumardasaraju@6.Automating-with-MLflow-and-BentoML$ python3.12 ./synthetic_health_claims.py
  6Synthetic data generated and saved to 'synthetic_health_claims.csv'.
  7(.venv) bharathkumardasaraju@6.Automating-with-MLflow-and-BentoML$
  8
  9
 10Setup MLflow server and run the ML Experiment:(usually we setup mlflow server in k8s as a micro-service)
 11----------------------------------------------------------------------------------------------------------->
 12(.venv) bharathkumardasaraju@6.Automating-with-MLflow-and-BentoML$ mlflow ui --port 5001
 13[2025-03-06 06:34:38 +0800] [8053] [INFO] Starting gunicorn 23.0.0
 14[2025-03-06 06:34:38 +0800] [8053] [INFO] Listening at: http://127.0.0.1:5001 (8053)
 15[2025-03-06 06:34:38 +0800] [8053] [INFO] Using worker: sync
 16[2025-03-06 06:34:38 +0800] [8054] [INFO] Booting worker with pid: 8054
 17[2025-03-06 06:34:38 +0800] [8055] [INFO] Booting worker with pid: 8055
 18[2025-03-06 06:34:38 +0800] [8056] [INFO] Booting worker with pid: 8056
 19[2025-03-06 06:34:38 +0800] [8057] [INFO] Booting worker with pid: 8057
 20
 21
 22So next step is to train and evaluate a ML model - In this we are going to use a model called Isolation Forest Model.
 23isolation_model.py
 24
 25
 26(.venv) bharathkumardasaraju@6.Automating-with-MLflow-and-BentoML$ python3.12 ./isolation_model.py
 272025/03/06 06:37:59 INFO mlflow.tracking.fluent: Experiment with name 'Health Insurance Claim Anomaly Detection' does not exist. Creating a new experiment.
 282025/03/06 06:38:01 WARNING mlflow.models.model: Model logged without a signature and input example. Please set `input_example` parameter when logging the model to auto infer the model signature.
 29Train Anomaly Percentage: 5.00%
 30Test Anomaly Percentage: 4.29%
 31Model and metrics logged to MLflow.
 32🏃 View run bright-deer-511 at: http://127.0.0.1:5001/#/experiments/362845262008705571/runs/accfbfcfd6fb4b21a730589340cc8a0b
 33🧪 View experiment at: http://127.0.0.1:5001/#/experiments/362845262008705571
 34(.venv) bharathkumardasaraju@6.Automating-with-MLflow-and-BentoML$
 35
 36Now experiment  got deployed to mlflow server ..download model.pkl file and service it using BentoML
 37
 38So Register the Model and setup BentoML for serving ML Models:
 39
 40Register ML Model:
 41------------------------->
 42
 43(.venv) bharathkumardasaraju@6.Automating-with-MLflow-and-BentoML$ python3.12 ./register_model.py
 44Model registered with BentoML: Model(tag="health_insurance_anomaly_detector:c4gg5ih2csj46prc")
 45(.venv) bharathkumardasaraju@6.Automating-with-MLflow-and-BentoML$
 46
 47(.venv) bharathkumardasaraju@6.Automating-with-MLflow-and-BentoML$ bentoml models list
 48 Tag                                                 Module           Size      Creation Time
 49 health_insurance_anomaly_detector:c4gg5ih2csj46prc  bentoml.sklearn  1.39 MiB  2025-03-06 06:49:26
 50 house_price_model_v2:v2nt7nxzjcngcprc               bentoml.sklearn  1.56 KiB  2025-03-05 06:33:23
 51 house_price_model:ymkym6xziwjagprc                  bentoml.sklearn  1.23 KiB  2025-03-05 06:12:29
 52(.venv) bharathkumardasaraju@6.Automating-with-MLflow-and-BentoML$
 53
 54So Model has been registered in the BentoML artifact repository.
 55So we have two places where the model artifacts are present.
 56  1. One is our mlflow itself and then
 57  2. In the BentoML
 58So the difference is in the mlflow you might have 50 models, Because we may run 50 experiments, but in the BentoML list you only have the model that you will be using for the serving purpose.
 59
 60Lets create the service file which will be used by BentoML to serve the model.
 61
 62(.venv) bharathkumardasaraju@6.Automating-with-MLflow-and-BentoML$ bentoml serve ./service.py --reload
 63/Users/bharathkumardasaraju/external/learn-ml-ops/.venv/lib/python3.12/site-packages/bentoml/io.py:7: BentoMLDeprecationWarning: `bentoml.io` is deprecated since BentoML v1.4 and will be removed in a future version. Please upgrade to new style IO types instead.
 64  warn_deprecated(
 65/Users/bharathkumardasaraju/external/learn-ml-ops/.venv/lib/python3.12/site-packages/bentoml/_internal/models/model.py:367: BentoMLDeprecationWarning: `get_runnable` is deprecated since BentoML v1.4 and will be removed in a future version. Use `get_service` instead.
 66  self._runnable = self.info.imported_module.get_runnable(self)
 67/Users/bharathkumardasaraju/external/learn-ml-ops/.venv/lib/python3.12/site-packages/bentoml/_internal/models/model.py:354: BentoMLDeprecationWarning: `Runner` is deprecated since BentoML v1.4 and will be removed in a future version. Please upgrade to new style services.
 68  return Runner(
 69/Users/bharathkumardasaraju/external/learn-ml-ops/6.Automating-with-MLflow-and-BentoML/service.py:8: BentoMLDeprecationWarning: `bentoml.Service` is deprecated since BentoML v1.4 and will be removed in a future version. Please upgrade to @bentoml.service().
 70  svc = bentoml.Service("health_insurance_anomaly_detection_service", runners=[model_runner])
 712025-03-06T07:00:22+0800 [INFO] [cli] Environ for worker 0: set CPU thread count to 8
 722025-03-06T07:00:22+0800 [INFO] [cli] Prometheus metrics for HTTP BentoServer from "./service.py" can be accessed at http://localhost:3000/metrics.
 732025-03-06T07:00:22+0800 [INFO] [cli] Starting production HTTP BentoServer from "./service.py" listening on http://0.0.0.0:3000 (Press CTRL+C to quit)
 742025-03-06T07:03:21+0800 [INFO] [api_server:health_insurance_anomaly_detection_service:6] 127.0.0.1:58576 (scheme=http,method=GET,path=/,type=,length=) (status=200,type=text/html; charset=utf-8,length=2945) 1.389ms (trace=4773d94d4e03db1de1df3e9ceb6d55c0,span=a3f21653cb495b4c,sampled=0,service.name=health_insurance_anomaly_detection_service)
 752025-03-06T07:03:22+0800 [INFO] [api_server:health_insurance_anomaly_detection_service:6] 127.0.0.1:58583 (scheme=http,method=GET,path=/docs.json,type=,length=) (status=200,type=application/json,length=4825) 17.838ms (trace=5ea37cd2a918ebf85d74672993177891,span=42c03758840366d0,sampled=0,service.name=health_insurance_anomaly_detection_service)
 76
 77
 78So Now we have /predict endpoint  - /predict endpoint has to be used by any framework(flask, fastapi etc..) which is going to be connect with this /predict endpoint pass the data and it is going to get a prediction.
 79
 80So we have to build a web-app used by our insurance claim agents, where we can upload the csv file and /predict endpoint gonna predict is valid claim process it or not.
 81
 82
 83SO Develop Python Flask Web-app to connect to BentoML for Online Serving:
 84--------------------------------------------------------------------------------->
 85
 86(.venv) bharathkumardasaraju@6.Automating-with-MLflow-and-BentoML$ python3.12 ./flask_app.py
 87 * Serving Flask app 'flask_app'
 88 * Debug mode: on
 89WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 90 * Running on http://127.0.0.1:5005
 91Press CTRL+C to quit
 92 * Restarting with stat
 93 * Debugger is active!
 94 * Debugger PIN: 846-305-491
 95127.0.0.1 - - [06/Mar/2025 07:13:55] "GET / HTTP/1.1" 200 -
 96127.0.0.1 - - [06/Mar/2025 07:13:55] "GET /favicon.ico HTTP/1.1" 404 -
 97
 98
 99
100Now upload csv file to the flask web-app and see the prediction results immediately...
101
102So in the backgroud.. flask be able to actually calls BentoML /predict api endpoint....
103so this BentoML /predict endpoint had the ML-Model present and that ML-Model got triggered.. it gives the prediction with results 1 or -1
104
105
106upgraded flask app
107
108(.venv) bharathkumardasaraju@6.Automating-with-MLflow-and-BentoML$ python3.12 ./v2_app.py
109Matplotlib is building the font cache; this may take a moment.
110 * Serving Flask app 'v2_app'
111 * Debug mode: on
112WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
113 * Running on http://127.0.0.1:5005
114Press CTRL+C to quit
115 * Restarting with stat
116 * Debugger is active!
117 * Debugger PIN: 846-305-491

Session Data

Session Data
   1claim_id,claim_amount,num_services,patient_age,provider_id,days_since_last_claim,Prediction
   21008,12064.315907367947,11,32,2,33,-1
   3346,1058.0124843394092,3,80,49,75,1
   4264,743.9030896664275,4,49,29,228,1
   5695,1148.275314492096,9,77,27,38,1
   615,568.7705418717418,4,56,27,185,1
   731,849.5733469426508,8,70,43,141,1
   8999,857.2052525543008,9,25,4,146,1
   9773,1158.1019347638803,4,27,10,277,1
  10147,690.7623222804796,2,74,18,208,1
  11507,851.9015189402827,6,67,15,360,1
  12847,1072.2921609769546,8,70,38,29,1
  13418,1028.9186585732148,9,83,2,238,1
  14951,939.6909855359175,4,60,45,187,1
  15876,1448.639465879447,1,74,20,10,1
  1629,849.8403275202987,7,38,22,75,1
  17952,1088.0138491285743,6,37,14,153,1
  18160,1164.1384021584574,4,60,46,165,1
  19462,1008.8158879929322,9,62,11,106,1
  20196,1096.329344932209,9,86,15,238,1
  21933,637.996524895939,9,50,44,315,1
  2224,643.8129534466358,6,42,16,295,1
  23592,880.5856383087208,5,24,19,45,1
  241036,8214.38472236602,10,30,38,275,-1
  25818,1222.4076989058592,9,21,19,29,1
  26217,806.793696365607,9,46,19,295,1
  27604,1338.9094647012378,6,38,46,103,1
  28661,856.5844982799409,2,76,28,363,1
  29137,804.1866769159408,3,55,40,75,1
  30972,829.7370856312798,2,23,23,110,1
  31351,1077.7268913995013,9,34,15,314,1
  32245,699.9258982360559,6,55,21,145,1
  3367,981.9974696049164,2,78,26,65,1
  34607,806.5527002241067,8,66,5,334,1
  35400,1309.4540779933654,6,36,15,271,1
  36912,1054.787581915985,1,51,17,34,1
  37684,1122.3436403069795,3,62,30,297,1
  38379,1547.450733304418,5,65,30,70,1
  39943,1162.5502944896652,8,82,11,0,1
  40930,983.562434731753,5,60,15,332,1
  41995,749.5949975262711,2,46,28,113,1
  42184,1120.6181038107964,4,63,18,19,1
  43138,919.4846209485812,6,23,11,277,1
  44469,867.3747130973682,2,33,30,94,1
  45360,793.1922641119193,8,36,1,253,1
  46456,801.781791934414,4,89,37,272,1
  47858,1117.853889096601,4,55,38,28,1
  48839,1246.080599619146,9,21,31,199,1
  49542,717.5732863355955,7,32,8,77,1
  50948,827.0229825296889,8,81,15,305,1
  51540,855.7770326192128,5,61,18,158,1
  5223,1016.882051171981,2,75,35,303,1
  53358,927.8353402699656,8,34,28,11,1
  5466,1339.0600071427057,2,70,19,88,1
  55430,560.3151283942215,6,88,37,277,1
  56838,750.4114898153023,8,41,14,43,1
  57467,1153.5416750108564,8,34,45,326,1
  58770,1453.1121394992322,9,84,32,86,1
  59315,1326.3697017885822,7,47,10,333,1
  60133,734.4240715684738,5,51,5,246,1
  61698,687.2216059036742,6,48,9,266,1
  621010,13492.4039511446,12,80,13,5,-1
  63585,1045.4665637646235,3,55,5,205,1
  64646,931.8191075630824,7,42,17,57,1
  65136,1387.483601254385,7,89,34,344,1
  66666,1026.6075569229745,3,45,2,72,1
  67486,644.4365726005815,8,47,38,330,1
  68946,732.4788084184619,1,23,9,109,1
  691037,9541.281892503732,19,29,36,111,-1
  701044,9064.850876021788,11,40,47,190,-1
  71626,872.1960808922037,5,71,21,277,1
  72643,935.1021621590988,8,54,22,19,1
  73628,968.553269975088,1,46,5,218,1
  7447,884.8403072600531,6,47,30,282,1
  75571,1004.604594797388,1,59,22,95,1
  76281,1028.379336312812,6,36,44,246,1
  77239,834.5533838079031,9,62,49,363,1
  78560,894.7538797949343,1,30,15,313,1
  79227,1016.0700047738655,3,44,25,286,1
  80791,1107.4045547831463,4,75,25,70,1
  81613,1069.992156579955,1,70,42,272,1
  82923,1033.242418536719,3,81,21,174,1
  83305,994.774601508963,3,21,28,280,1
  84428,1171.5128649996095,3,25,8,74,1
  851026,7491.964524024896,11,59,24,89,-1
  86742,680.1057583160746,2,21,11,234,1
  87837,1387.6251232035193,5,41,26,69,1
  88893,1266.6686723972884,7,27,24,223,1
  896,941.4657607627048,9,32,5,268,1
  90986,710.4088277018644,2,85,2,147,1
  91290,844.3251200448515,9,81,42,17,1
  92353,1214.4149058005048,4,36,43,78,1
  93944,975.2060340551544,6,86,34,265,1
  94916,1069.7553814425848,7,23,32,76,1
  95201,1089.4468400870708,4,64,1,43,1
  96326,696.4528468030669,3,34,48,208,1
  97252,1229.465486763694,4,70,41,150,1
  9850,559.2399611593165,1,31,3,162,1
  99141,1056.8649836510324,5,78,11,110,1
 100800,1007.4390348739358,9,39,15,298,1
 101640,676.2303069840959,5,76,15,217,1
 102737,1064.0074335784689,4,35,8,10,1
 103412,718.8394770405328,7,84,31,179,1
 104725,1042.7163595319855,6,28,34,207,1
 105142,1326.7856885706071,1,29,16,320,1
 106516,1188.847806456439,5,25,12,362,1
 107277,1049.7649238933675,4,82,21,290,1
 108419,1294.8242960159566,9,58,49,334,1
 109345,882.2404235954193,4,18,1,297,1
 110545,382.08887496817766,2,66,38,14,1
 111497,740.6884614183859,4,40,21,83,1
 112269,889.9888783257541,9,51,32,322,1
 113842,1168.704873041651,2,74,8,18,1
 114115,951.9097588047192,8,43,26,239,1
 115484,1050.8659089668058,2,82,32,305,1
 116478,1077.812538635884,3,84,26,105,1
 117396,882.7060869738237,1,65,18,325,1
 118261,768.2673821054792,4,80,30,145,1
 1191024,7496.603751923622,18,30,47,188,-1
 120614,718.6277381754059,4,63,20,82,1
 121288,1147.079301621144,6,66,43,269,1
 122489,1421.7854087681412,3,38,38,194,1
 12321,1366.4121922303884,3,84,34,283,1
 124432,490.1919555599749,4,24,45,299,1
 12560,1243.8862817805898,3,88,41,131,1
 126863,1386.8763003325157,1,85,32,270,1
 127102,894.8386693086602,5,26,17,191,1
 128845,1041.613052053264,7,40,32,253,1
 129941,679.9239003322764,3,66,44,277,1
 130493,1019.3420769119044,9,74,30,143,1
 131662,863.285264689902,2,21,26,203,1
 132896,1162.177471897411,4,65,45,118,1
 1331016,8870.077525963776,12,33,35,173,-1
 134316,1005.2509604081896,5,59,40,354,1
 135297,1224.8999688583126,4,48,42,82,1
 136333,1018.9511395484316,9,51,24,330,1
 137857,791.9111067239428,5,24,32,246,1
 138648,986.4262833705468,1,72,46,128,1
 1397,1394.803203876848,6,52,28,307,1
 140153,829.9938196053773,7,66,3,189,1
 141109,1064.387597680691,3,57,47,236,1
 142727,1004.6084832663483,9,87,38,88,1
 143859,861.9442389297571,9,78,8,160,1
 144100,941.3532166562132,2,50,48,202,1
 14562,953.5852558340456,4,36,2,175,1
 146752,662.0788485959166,3,82,13,285,1
 147716,1275.8254705041304,6,79,42,323,1
 14837,1052.215898751189,6,23,20,117,1
 1491032,8175.147635244881,18,28,35,221,-1
 150437,1407.1538863928229,8,54,37,105,1
 151602,769.4586689555937,6,71,24,282,1
 152881,1631.7331064684054,9,71,45,92,1
 1531027,12299.263233067912,18,78,41,175,-1
 154420,1016.8796203525272,1,41,9,147,1
 155231,817.4083420707158,2,33,45,279,1
 156320,967.4642364080788,3,23,29,265,1
 15755,1257.7498806239878,4,20,9,174,1
 158202,1140.1961315920587,2,66,38,359,1
 159794,680.8128560449226,7,27,12,290,1
 160808,880.3128445841307,9,43,26,46,1
 161678,1438.0676108559055,9,76,22,110,1
 162421,1515.1869812204968,3,52,28,8,1
 163888,910.1769773032352,8,49,33,54,1
 164860,1158.232954438878,7,20,8,234,1
 165744,1006.5227625527084,3,76,8,25,1
 166365,1172.5359979277782,6,64,44,291,1
 167190,621.2881938285338,9,89,22,248,1
 168203,1270.7628107938192,6,64,38,316,1
 169868,1083.6141974967563,7,30,49,258,1
 170578,1192.7162984717418,7,88,36,364,1
 171712,975.821722032402,4,86,39,262,1
 172235,1535.9860223313317,8,29,5,200,1
 17348,1264.280556554729,1,42,34,112,1
 174645,938.564233978514,3,24,47,192,1
 175111,520.3071961752396,9,63,4,348,1
 176272,641.0344622051401,7,54,48,298,1
 177782,666.1639103224746,3,37,1,160,1
 178584,1567.673214451099,1,26,16,230,1
 179809,1313.9390313933802,4,36,27,250,1
 180849,840.565003937171,3,58,30,32,1
 181911,923.0554412617498,8,74,18,28,1
 182603,1217.4014800264151,8,82,11,342,1
 183475,1411.2419283753209,6,48,15,180,1
 184761,856.0905434405565,9,59,38,216,1
 185760,1175.0774698522478,1,45,18,109,1
 18638,510.0824690300562,2,40,27,72,1
 187605,1103.3587258059251,1,30,34,255,1
 188303,1186.8234012808157,9,84,19,214,1
 189885,1170.4728724065778,7,76,13,24,1
 190225,882.0170335526416,1,20,42,236,1
 191174,1085.287993704161,7,76,21,162,1
 192466,944.7576001166944,2,57,40,3,1
 193856,857.313426562631,2,57,22,331,1
 19491,1024.26938733701,7,28,10,359,1
 195563,1217.781175857923,2,28,49,35,1
 19617,746.7922199163941,4,37,12,354,1
 19796,634.1212629669703,6,65,42,137,1
 198766,824.2058937185282,4,89,31,63,1
 199799,1007.0795940326148,8,34,15,122,1
 2001038,5825.499617259132,12,54,7,223,-1
 201689,1177.7399920508728,2,45,43,298,1
 2021034,11432.052513815664,12,30,49,327,-1
 203877,870.5971752409572,5,64,39,67,1
 204806,922.7069691328402,4,68,40,15,1
 205170,811.5659589106276,5,58,33,282,1
 20628,1093.924504586418,3,80,38,183,1
 207299,1203.21552970974,8,67,11,174,1
 208173,980.724572646474,1,68,18,244,1
 209688,906.2947981126008,3,85,46,25,1
 210517,1125.2292969060952,6,29,33,282,1
 211374,1239.8177065213015,7,29,45,174,1
 212774,1243.1386124066823,2,26,40,336,1
 213249,1441.3635600702742,7,35,35,97,1
 214243,1126.2468197451142,4,40,33,285,1
 21563,723.416256498493,5,64,29,182,1
 216163,1289.648894751851,8,66,9,261,1
 217409,1030.0739079279747,2,48,40,220,1
 218230,1169.899437233669,8,20,25,135,1
 21953,830.7694999235104,4,65,27,43,1
 220792,1051.9219217907778,6,43,48,177,1
 221853,840.6532181733705,9,87,45,349,1
 222195,1043.2952314627955,1,62,28,62,1
 223619,1120.2523079341784,7,31,32,211,1
 224350,946.6382120720382,6,68,3,129,1
 225998,1160.2107153167524,2,74,37,202,1
 226332,775.6864071285421,7,30,39,53,1
 227673,914.3281014799128,3,32,11,170,1
 228836,1058.55368313413,7,53,13,236,1
 22936,694.7890875072444,2,26,38,249,1
 23080,503.1077713497768,8,85,28,69,1
 231870,1502.551134691587,1,67,29,170,1
 23295,901.9729617169606,7,86,46,241,1
 233483,598.3884199356069,9,56,18,295,1
 234335,1243.7799333544378,7,68,17,240,1
 235449,871.5332706658266,4,80,23,287,1
 236822,1352.336860046395,8,58,18,65,1
 237623,1470.5061241187584,8,20,18,284,1
 238938,1177.0891118248385,2,76,9,326,1
 239746,818.5640467116336,3,60,30,28,1
 240600,1094.325123261213,5,45,19,260,1
 241724,1185.816023505679,5,67,44,87,1
 242403,1001.3109249295458,8,84,42,29,1
 243981,1196.450039662708,9,36,35,279,1
 244476,937.7409901109054,2,51,16,105,1
 245969,989.960512338914,4,44,21,55,1
 246416,812.8783658608615,5,81,30,69,1
 247665,821.788554330709,2,46,13,275,1
 248638,1018.329491797101,4,70,4,343,1
 249407,733.0948926543514,6,64,3,140,1
 250906,1011.6091370390373,1,56,49,270,1
 251692,1289.832450841062,7,64,45,19,1
 252827,1394.8930364326782,4,32,32,17,1
 25333,996.6256938155166,5,31,27,24,1
 254300,1157.4072104809031,3,86,14,68,1
 255641,916.053825177468,3,64,40,15,1
 256719,909.096946946536,6,20,19,139,1
 257949,988.6034959111256,5,79,12,11,1
 25875,345.0637239775639,2,31,36,142,1
 259549,1092.7864683428272,3,54,12,339,1
 260755,762.6502777920142,1,76,37,207,1
 261479,1769.7202021138094,3,25,2,279,1
 262705,610.842706619024,4,67,31,229,1
 263367,1056.0231204526042,2,38,7,324,1
 264473,621.202234450362,4,30,44,320,1
 26599,1001.2783641606152,9,61,6,199,1
 266771,1176.9379838638688,5,30,5,216,1
 267395,1294.8600301803217,8,52,45,280,1
 268865,846.8028273789035,8,53,10,179,1
 269520,1187.8467808429473,2,66,1,161,1
 270481,968.0206021298084,3,44,26,107,1
 2711011,8099.548171928165,16,57,39,214,-1
 272323,795.4448291916319,9,46,1,84,1
 273159,702.1741256993379,7,25,8,144,1
 274551,1021.647446868225,4,75,31,358,1
 275572,1419.1093280688208,1,34,38,163,1
 276854,1297.254132776888,9,74,34,154,1
 277423,937.7589628802316,7,47,34,49,1
 2781023,9388.889175189091,13,19,19,165,-1
 279576,447.2161727480287,5,64,49,194,1
 280686,1178.249607543097,4,70,20,239,1
 281738,1245.6727459863785,4,36,40,347,1
 282311,945.5796991931948,1,67,33,313,1
 283237,493.7143533355982,6,82,46,263,1
 284221,1578.6646416683773,5,31,1,189,1
 285463,825.0686230018537,6,78,16,87,1
 28626,1027.7306474274665,9,55,24,207,1
 287317,1170.488242823741,1,54,47,115,1
 28811,884.1455767968845,2,83,26,227,1
 289788,1114.7950198071092,1,85,9,217,1
 290754,1263.41044915196,7,56,36,272,1
 291656,1014.804608503622,7,68,40,160,1
 292460,700.5305268527878,3,62,42,301,1
 293465,971.9179875772926,5,83,40,340,1
 294319,1081.0415881221106,5,52,1,225,1
 29540,1049.2153089672809,6,63,20,359,1
 296263,189.68316498273185,8,65,9,95,1
 297312,1274.6942129967977,3,23,33,93,1
 298406,1155.7124830868747,5,30,19,33,1
 299525,809.1852108643708,7,67,32,72,1
 300178,1363.3835192893291,1,56,40,57,1
 301181,1156.4168369412516,1,28,37,25,1
 302495,1380.7810193174143,7,48,32,181,1
 303511,1067.6142064449598,4,39,6,207,1
 304519,1024.8330763573065,7,51,8,335,1
 305706,1151.50248783641,3,55,8,219,1
 306188,981.7927718357818,5,36,13,145,1
 307672,481.65244189796266,8,67,26,172,1
 308151,1062.6232125864692,2,65,13,207,1
 309772,859.383306026433,9,62,38,6,1
 310204,1263.4505130087257,4,35,21,144,1
 3111018,14925.646121585343,10,69,11,330,-1
 312385,810.2168346115756,8,40,8,227,1
 313127,752.3659187173279,8,45,23,93,1
 314587,885.159775114939,3,73,10,336,1
 31577,1021.7617670595428,5,76,30,301,1
 316636,586.2858320335575,2,75,1,74,1
 317156,821.412145493408,7,66,1,16,1
 318777,818.2157060437828,6,51,35,329,1
 31976,1205.475626093806,8,70,34,249,1
 320255,620.1575085114966,5,49,23,107,1
 321454,1126.011628879461,6,21,36,193,1
 322394,1457.8646914635883,8,24,49,147,1
 323104,799.4306826945952,1,52,27,236,1
 324580,1285.9385108017325,8,30,15,186,1
 325259,1110.954857036557,4,61,16,287,1
 326285,1533.2583436640666,6,52,33,315,1
 327348,648.1340564058612,8,30,43,332,1
 328880,1297.098318362021,6,39,13,97,1
 3295,941.461656319166,6,28,6,57,1
 330747,1046.6916911192695,6,83,10,352,1
 331565,1300.303480540986,5,85,11,21,1
 332370,806.7475540361334,6,73,19,291,1
 333635,746.9739061849581,9,64,19,95,1
 334790,584.7597666210023,5,18,13,0,1
 335280,903.67160078456,7,37,6,149,1
 336458,741.1894193951565,6,31,42,143,1
 337925,1298.7616572312106,8,84,21,84,1
 338208,1128.4464877280525,2,53,49,64,1
 339985,999.099365227358,8,56,21,24,1
 340926,619.2032738040563,8,32,48,44,1
 341793,1067.8947092988433,4,37,18,188,1
 342275,754.6228372380123,8,54,17,296,1
 343647,325.7783392646071,7,50,29,110,1
 344210,1963.18287266368,9,45,28,287,1
 34542,1042.842070297493,8,31,19,210,1
 346324,1523.096818921365,9,76,34,213,1
 34789,867.5599490582402,6,29,19,226,1
 348867,1071.4663476812264,9,86,12,273,1
 349676,805.5458281022811,7,39,40,85,1
 350577,1058.9036395271414,1,35,32,150,1
 351164,794.8294204120724,2,81,6,162,1
 352218,940.7953483149978,5,83,35,186,1
 353186,1178.500123523023,1,18,22,58,1
 354194,688.565305322003,9,50,4,18,1
 355453,753.5684884161141,9,63,26,129,1
 356606,1469.1989531395166,8,74,28,205,1
 357377,1218.0801591801696,6,36,11,150,1
 358490,1220.4099392373626,9,36,3,282,1
 3591045,7254.77176640996,18,57,40,199,-1
 36030,927.0765625516808,4,74,26,286,1
 36172,1384.5091416164923,3,81,48,213,1
 36288,1082.1877774149211,9,47,36,148,1
 363558,891.8604530450948,9,40,35,161,1
 364389,1237.6059595465126,3,68,47,63,1
 365769,843.2582355530582,7,44,46,319,1
 366971,1032.026103727697,4,34,40,159,1
 367869,1164.6360681682077,6,75,31,134,1
 368508,784.002307580046,7,45,4,41,1
 369655,1643.339950812465,7,24,12,111,1
 370175,1069.1726998325048,7,56,2,59,1
 371803,1024.030194235246,9,86,17,333,1
 372258,823.0826335953049,2,45,23,5,1
 373213,1238.5004408733005,1,58,3,313,1
 374399,971.3650386868457,4,89,45,223,1
 375417,1387.787993880631,2,38,43,115,1
 37664,700.9483439798323,2,31,4,128,1
 377714,1099.7840285880177,4,55,49,358,1
 378873,655.1701929963682,6,42,41,185,1
 379232,1054.1146473954936,9,57,46,270,1
 380388,1469.0427098039715,7,81,12,20,1
 381815,1257.9611348671588,7,57,12,303,1
 3821013,10765.3017525299,12,26,42,284,-1
 383750,648.3347257879444,5,30,49,333,1
 384331,996.9383067882712,6,66,29,297,1
 38525,863.9043188687043,7,64,2,96,1
 386564,918.4941169580396,8,34,35,172,1
 387234,837.0999130985458,5,58,32,158,1
 3881043,6752.011204219161,11,77,16,156,-1
 389539,1251.57320230361,1,51,38,163,1
 390807,1055.5334429084282,8,38,20,354,1
 391669,337.257547901747,6,26,38,242,1
 392913,1062.345920927689,4,58,30,5,1
 393850,867.2507612495456,3,74,3,228,1
 394637,1205.7926459904786,6,44,7,53,1
 395653,932.7778273612925,8,33,43,7,1
 396244,1216.4387985425303,7,41,49,229,1
 397313,1206.3540872470076,2,76,19,126,1
 398220,1020.4685348465806,7,27,5,219,1
 399541,1208.9230280162851,4,85,2,56,1
 400289,1070.247966933758,9,55,32,224,1
 40139,667.9534877753923,3,76,41,281,1
 402382,850.1518386389945,9,72,48,292,1
 40357,790.1956191943403,8,36,32,350,1
 404644,624.2142617204735,5,23,22,45,1
 40570,838.7200613487189,7,47,15,339,1
 406871,955.7631931264876,1,47,5,209,1
 407717,1028.55691216551,3,63,30,153,1
 408589,1207.5839541360615,1,51,25,141,1
 409657,1003.4823229782364,6,49,20,130,1
 410996,929.7249267785112,9,41,2,110,1
 411414,1319.4192054746272,2,27,32,230,1
 412732,755.406805596242,4,73,37,259,1
 413821,870.6778874749069,4,25,48,202,1
 414905,1047.7747670049755,8,32,37,294,1
 415749,847.1205492520129,6,25,28,269,1
 416491,998.0068396708456,3,70,30,181,1
 417953,687.115143952389,6,85,8,333,1
 418522,1135.8400480949838,6,43,22,88,1
 419375,1538.295614377889,4,87,15,75,1
 420468,1189.3769275118264,5,51,2,305,1
 421899,1301.6272416270892,8,38,8,214,1
 42286,874.5607391038659,5,79,49,90,1
 423745,1129.4147551172807,1,34,29,53,1
 424598,755.3090710544232,3,61,20,43,1
 425595,1259.3849860644748,4,20,10,43,1
 426500,654.3000672589159,8,27,27,280,1
 427989,944.758956542584,5,71,39,337,1
 428748,811.1542669116693,8,51,39,163,1
 429957,1085.681336594426,1,39,1,24,1
 430393,669.9416982448395,4,21,28,284,1
 431135,770.1439414415491,1,18,48,51,1
 432343,1061.2416427771807,5,28,49,238,1
 433918,1046.6522807890894,7,20,46,146,1
 43420,646.924074666177,6,80,10,183,1
 435167,1205.5150399986226,7,26,39,71,1
 436968,1450.235108227704,1,22,29,178,1
 4371002,7209.505971600776,11,56,25,272,-1
 438570,912.1216289896728,8,54,35,216,1
 439934,450.2985108449795,8,31,31,333,1
 440242,971.3158896332752,5,42,16,312,1
 441758,1046.2090309237185,2,54,4,172,1
 442240,1213.108333699056,5,79,42,102,1
 443504,1140.7423091726428,4,37,10,295,1
 444253,1530.5390492531585,3,47,5,349,1
 445362,1383.1847282506444,3,28,22,16,1
 446679,1233.9195982868653,5,88,20,364,1
 447455,867.4355954068898,1,47,42,315,1
 448816,628.609906740757,8,22,44,38,1
 449825,888.624369649807,9,45,4,221,1
 450685,694.4680477770137,1,28,17,345,1
 451904,1319.6129656518249,9,83,39,250,1
 452309,1136.7743452925097,2,81,9,73,1
 453124,649.5372343019297,1,21,40,89,1
 454139,1203.3793043424175,5,42,3,39,1
 455250,1101.245427740239,5,53,39,170,1
 4568,1191.858682288227,9,50,41,57,1
 457768,1442.7001589088777,6,39,28,243,1
 458329,1156.0299542630387,2,86,48,331,1
 459756,1658.0955162093478,7,61,26,237,1
 4601040,9732.117797411158,11,88,19,58,-1
 461441,1096.0163622348268,4,30,7,146,1
 462903,1007.1862057337044,4,53,13,329,1
 463919,888.391596362368,9,80,30,66,1
 464307,1319.416223947106,1,44,8,247,1
 465991,1052.095701986888,1,31,17,300,1
 466987,1375.8495754417877,6,50,40,117,1
 467262,985.11866098455,3,40,22,270,1
 468533,983.4800503381708,5,45,46,275,1
 469330,1157.08637731607,3,54,49,120,1
 470764,975.9850250688376,1,83,22,46,1
 47112,883.5675616074358,8,57,20,246,1
 472555,1084.4006655188005,9,72,3,356,1
 473851,844.214868393809,9,77,28,11,1
 474197,779.0356409497167,9,25,1,336,1
 475787,1208.480538637226,4,70,34,131,1
 476630,1273.5478796177372,2,42,41,71,1
 4771042,7950.33613741562,16,73,25,108,-1
 478214,1162.8478128264494,8,56,45,127,1
 47985,797.8765992767031,5,33,7,302,1
 480510,792.2624708972405,5,41,23,245,1
 481354,960.0153675091432,1,54,32,71,1
 482397,571.7163677272805,9,89,2,318,-1
 483883,877.6401393704444,2,89,49,171,1
 4844,1380.7574641020062,3,86,2,163,1
 485359,1080.6796400845224,6,53,9,140,1
 486552,961.08069115198,6,46,27,279,1
 487257,1316.7277872966556,3,84,12,92,1
 488371,1006.1275435647356,1,37,19,283,1
 489223,1171.5650475936284,9,56,12,283,1
 4901004,9553.062290542735,15,27,20,172,-1
 491451,984.330225681707,9,26,3,186,1
 492145,1064.9706985621058,4,25,48,181,1
 493401,601.3930853014082,6,80,20,145,1
 494813,1361.744471088433,7,88,16,16,1
 495739,1416.3686111156442,8,72,44,214,1
 496721,1076.9504422230148,6,25,11,116,1
 49734,735.572267761025,7,34,29,289,1
 498723,662.9536444735718,7,50,7,308,1
 499864,1448.9694182738804,1,55,35,257,1
 500364,1100.4279305247353,3,62,41,252,1
 501811,953.2820889596602,8,88,18,30,1
 502566,897.9811567446121,7,64,21,205,1
 503942,1218.1143320700362,2,57,35,112,1
 504505,837.3393577195432,4,49,39,224,1
 505960,1111.9271400043287,5,24,42,140,1
 506633,960.4980253552526,9,45,10,211,1
 507119,1285.7057036287551,4,68,43,306,1
 50835,1205.6362280257972,3,56,47,66,1
 509381,790.069539454806,7,87,18,123,1
 510990,1006.7214597486328,8,24,28,65,1
 511907,660.0359647550201,2,87,28,122,1
 512328,1197.915673490734,5,85,13,257,1
 513993,938.2056543698508,3,71,19,318,1
 514267,1408.1028259829088,1,41,23,5,1
 515149,1130.4853914042244,2,31,19,165,1
 516405,887.4836321301891,1,86,3,274,1
 517615,1611.4379949042066,4,30,38,109,1
 518977,886.9234201877308,6,76,45,301,1
 519526,548.7794748338703,8,25,35,75,1
 520675,648.1220763205447,3,45,44,187,1
 5219,882.631403516262,7,33,5,287,1
 522293,852.658810763947,8,51,47,232,1
 523378,1045.835501434588,4,43,46,269,1
 5241022,14708.189418527656,10,35,22,74,-1
 525910,1540.813680826365,3,56,2,347,1
 526143,598.1291913596931,1,23,18,248,1
 527523,834.3440602635384,6,35,6,321,1
 528736,1118.1493706032606,7,28,40,121,1
 529443,483.13947499003086,5,22,9,162,1
 530982,1106.3643904462413,2,86,11,93,1
 531624,1336.3550115387443,2,34,23,325,1
 53284,870.4324454315881,7,72,4,363,1
 53319,772.9939811196972,6,89,3,359,1
 534830,929.5538477848733,7,84,45,254,1
 535703,823.9140773643102,5,71,17,97,1
 53651,1081.0209923486989,5,43,6,104,1
 537373,1362.7859019487605,2,63,41,348,1
 538246,916.3746910397628,2,45,9,196,1
 539123,1350.6985777340249,5,68,45,331,1
 540707,679.8926618759292,7,44,15,64,1
 541524,1142.6496671482898,5,55,21,11,1
 542890,1277.1758951457268,3,51,15,143,1
 543805,891.3759431419211,9,73,9,155,1
 544356,749.3676588405478,5,45,16,190,1
 545192,1214.099698580868,2,29,43,12,1
 546642,1417.2553813223485,1,51,12,98,1
 547238,1046.613578692357,5,72,42,70,1
 548509,1012.1304069862068,2,70,32,302,1
 549339,1103.2328635689062,6,68,26,345,1
 55078,925.248162383533,1,58,25,24,1
 551671,1311.5212981244072,1,73,36,101,1
 552322,1148.7892563592284,9,35,13,10,1
 553268,642.4646555098418,4,56,13,111,1
 554183,732.2768754847219,9,28,28,4,1
 555276,1115.5258685658175,4,73,40,213,1
 556654,723.3685228145824,8,60,15,28,1
 557380,797.9254286612121,9,69,40,179,1
 558304,1152.5925663583662,2,62,15,29,1
 559254,1258.1163151377866,4,77,42,121,1
 560650,1174.0515912033543,2,24,20,193,1
 561622,1117.867089283999,4,42,27,200,1
 562741,539.7814421670887,2,23,40,27,1
 56387,1228.8505294255183,6,65,9,17,1
 564457,973.2424100113606,1,20,22,351,1
 565282,1165.5326686302617,1,46,18,266,1
 566556,897.0307584693832,1,27,45,145,1
 567140,692.2839208915112,5,34,33,100,1
 568596,872.4959002863133,3,45,43,168,1
 569833,748.964808311983,8,57,37,345,1
 570810,776.3481744451241,5,77,21,186,1
 571514,773.1090844896005,6,21,37,184,1
 572936,874.4864439118472,4,78,30,326,1
 573954,1360.941151018315,3,61,8,278,1
 574436,1018.5236951049438,3,42,35,136,1
 575301,792.7512472694818,4,47,39,46,1
 576121,1197.7579867607617,5,37,42,266,1
 577711,1052.754366800655,5,63,20,51,1
 578909,1161.3710452852688,8,40,16,265,1
 579677,722.3560386335428,7,34,43,51,1
 580581,1084.6241018736034,8,48,43,148,1
 5811021,5674.915651411771,12,37,19,283,-1
 582729,865.0600799226596,1,33,10,53,1
 583233,1011.3929599759534,3,19,32,170,1
 584872,800.4256888653865,2,79,25,235,1
 585336,963.2356546244654,8,20,7,242,1
 586148,669.8858467289309,8,57,38,21,1
 587134,1118.3981076587954,4,72,43,30,1
 588487,838.3567789393684,9,70,47,194,1
 589731,1048.9613137744204,7,65,15,117,1
 590200,714.2574255423442,9,47,38,121,1
 591779,981.3916427249884,1,49,48,305,1
 592144,1046.1584646330762,3,44,30,190,1
 593900,795.766082253191,8,82,8,196,1
 594118,707.830490595117,6,38,17,187,1
 595266,688.0542045087876,2,50,37,211,1
 596668,1375.9982471456722,8,21,49,259,1
 597561,1072.4437142241031,2,50,16,331,1
 598814,1049.1386941278936,3,43,9,38,1
 5991009,8071.325886946268,17,21,25,35,-1
 600408,964.4051287446766,4,78,14,317,1
 601302,859.9547399507576,7,76,47,255,1
 60246,820.0389479013228,3,36,2,194,1
 603308,852.1071527910425,7,63,43,24,1
 604355,995.2459480243278,2,25,26,262,1
 605734,574.3540989405399,8,76,3,304,1
 60649,1085.9045723921154,7,57,22,270,1
 607177,1003.2504729694768,2,58,38,196,1
 608588,787.5389076338021,8,62,19,86,1
 609651,1462.2390237363363,5,74,48,339,1
 610450,735.1966195277621,2,40,31,321,1
 611131,612.3341422334669,2,84,33,183,1
 612480,1279.8937278586443,5,72,12,259,1
 613629,1013.9312280721736,8,60,23,88,1
 614632,1382.3875798651534,9,82,41,128,1
 61592,1242.1612476332225,9,81,36,150,1
 6161050,11419.392692715172,18,86,19,236,-1
 617728,1086.8954263404178,4,58,24,117,1
 618795,729.7358648979344,7,76,40,7,1
 619531,1159.6481146943436,2,81,6,225,1
 6201025,6604.174789475593,10,21,16,77,-1
 621155,1073.2681183246702,2,78,38,272,1
 622932,1470.2892673601475,7,75,10,8,1
 623205,655.5826580107272,6,83,48,326,1
 624937,744.6917957173217,6,21,33,14,1
 625620,1055.9710060697828,2,27,11,290,1
 626107,1471.5464753026326,4,62,25,36,1
 6271020,8624.66812469927,17,22,5,114,-1
 628376,808.1631092779876,8,34,3,100,1
 629404,1011.7451484411856,7,76,29,44,1
 630338,919.6535395867515,4,49,5,186,1
 631917,1151.9741274291348,4,69,29,348,1
 6321012,10096.2674562394,14,26,28,133,-1
 633433,932.6482913888606,1,84,39,289,1
 634988,1219.3405726439178,3,30,19,337,1
 63573,991.043490222512,6,50,21,293,1
 636529,1064.9306254303704,1,86,46,9,1
 637914,1394.363319940869,3,30,39,110,1
 638557,878.0984439818766,8,64,27,215,1
 639687,939.9186504604664,8,89,16,114,1
 640496,1134.7275109211646,1,72,28,29,1
 641820,1266.3700937663375,9,32,35,277,1
 642274,1002.5582652548968,1,85,45,336,1
 643786,1270.1951813886556,5,62,42,3,1
 644152,1086.612052374244,9,73,46,7,1
 645341,794.4449011083922,4,38,3,261,1
 646168,1474.198245663487,8,54,49,142,1
 647978,394.0301683427608,2,50,8,248,1
 648368,1003.1481001954488,7,28,14,89,1
 649664,864.1438072165588,4,46,13,108,1
 650783,1095.0494627514909,3,52,31,0,1
 651337,793.6257008018721,3,59,13,17,1
 652649,942.2663674478304,9,75,14,336,1
 653901,1092.1683272182254,5,80,26,41,1
 6541014,11960.74942430654,10,43,6,125,-1
 655730,805.4238186494218,7,85,32,115,1
 656887,1145.982046331491,8,59,36,84,1
 657722,572.4579018358437,8,61,34,45,1
 658120,1187.9832581716937,9,55,41,29,1
 659366,899.694882028541,6,29,41,7,1
 660424,1242.892737738589,4,74,15,337,1
 661344,873.2642061572176,1,85,39,303,1
 662429,1264.606121712397,6,43,9,164,1
 66341,1184.6166449988525,5,55,44,9,1
 664166,1103.1952317341245,1,71,25,238,1
 665117,991.3220575736892,9,39,28,359,1
 666427,758.7691348549739,6,36,36,125,1
 667176,1206.795812259006,2,72,43,5,1
 668101,646.1573144873964,3,78,38,60,1
 669537,784.8966586790119,1,26,40,320,1
 670962,1332.288132533108,4,84,39,333,1
 6711033,7233.451473296811,15,59,14,314,-1
 672512,987.4404726377156,3,47,24,236,1
 673444,977.7199901218028,3,77,28,340,1
 674215,921.1826888399136,6,19,47,238,1
 675980,1190.1036640360744,3,67,49,5,1
 6761028,12644.671319186846,11,25,4,20,-1
 6771031,6886.198526246661,12,26,44,358,-1
 678199,1014.5521796115,5,63,14,162,1
 679801,1234.5709514939997,4,58,39,282,1
 680292,876.7497663352917,9,25,10,250,1
 681639,677.5097750647366,4,59,1,53,1
 682735,1257.2889093314109,5,79,37,6,1
 683961,1160.680689966886,2,73,11,42,1
 684498,952.415330479098,4,49,46,165,1
 685187,1118.3094061433862,3,57,11,241,1
 686861,1050.730755212825,6,68,6,189,1
 687908,1186.5633915068051,9,18,25,338,1
 688667,936.2556956447862,7,61,37,166,1
 689829,894.9532957260357,1,18,13,180,1
 690527,593.1143905292093,7,58,15,345,1
 691715,990.591324393788,8,79,17,316,1
 692553,1291.9455154149518,5,50,32,109,1
 693894,1292.3238976114185,5,34,8,219,1
 694682,717.7370571956927,1,42,40,210,1
 695191,888.3712619832447,2,78,7,13,1
 696627,752.5987949353548,2,41,44,324,1
 69774,1391.1609139535014,3,69,22,252,1
 698743,843.7953555760803,3,46,46,312,1
 699983,758.2559642176967,9,83,24,268,1
 700824,909.2903598900853,2,63,39,267,1
 701670,1272.8767129806154,5,22,2,274,1
 702226,1272.2376492418416,1,87,23,193,1
 70390,1128.316858278339,8,52,1,213,1
 7041029,11630.30467863884,12,84,15,53,-1
 705767,991.2528773757596,4,65,11,245,1
 706103,914.3213708683076,5,85,10,4,1
 707518,755.6111888003622,5,48,28,40,1
 708180,1680.042291647405,8,81,43,216,1
 709270,1032.6851443215228,7,73,46,105,1
 710573,1081.7318434410406,7,65,31,147,1
 7111006,13611.218722366251,15,35,17,154,-1
 712945,1461.6592490119165,1,44,16,207,1
 71343,971.0879294029398,9,89,20,322,1
 714594,1083.4155263217372,4,35,2,14,1
 715287,962.0537262411042,5,28,17,86,1
 71632,1463.0695461272344,7,63,39,236,1
 717314,1203.3774090001596,1,32,3,24,1
 718515,855.8071673579168,7,76,20,241,1
 719583,1158.1954665265712,7,33,3,242,1
 7201030,10330.84456838341,16,80,25,183,-1
 721681,1180.4180160108087,8,43,29,42,1
 722169,938.6529709992824,6,66,28,309,1
 723733,1102.063188928618,3,81,20,74,1
 7241005,11691.619848248203,18,47,44,6,-1
 725823,1574.7245309048126,4,36,16,107,1
 726579,630.3534385550396,5,30,32,122,1
 727897,958.2204799207864,4,69,23,264,1
 728547,1144.268031795135,2,73,27,100,1
 729154,1058.0634242902509,8,30,10,174,1
 7301001,12985.238124865378,19,65,31,41,-1
 731720,985.7635940697332,5,23,46,50,1
 732631,576.8838425712952,7,77,25,246,1
 733898,1036.6784216083306,6,42,46,149,1
 734924,824.9697962652067,8,82,30,178,1
 735740,1253.5925162545327,8,43,23,278,1
 736959,1142.441820058051,5,89,40,189,1
 737950,1060.8348623306729,5,36,33,344,1
 738185,944.1343036685372,1,62,34,197,1
 739796,1263.288213333226,2,58,17,252,1
 740785,1139.94761198276,5,35,42,187,1
 741567,490.4688662055366,2,42,11,126,1
 742621,802.381386138672,5,52,18,132,1
 743548,949.238653489252,8,68,20,155,1
 7441019,10414.333402162294,13,86,20,25,-1
 74527,712.2516056444243,3,32,10,136,1
 74644,924.7240761026778,3,79,35,151,1
 747780,1155.1680243876694,3,88,23,229,1
 748461,1491.1812832290973,3,51,13,244,1
 749410,1128.609708514687,4,39,4,355,1
 7501007,8488.34483126196,15,77,45,9,-1
 751279,1017.4505212475048,6,64,37,192,1
 752920,1048.5224982245768,2,66,18,7,1
 75345,630.3695024081431,3,52,47,4,1
 754211,1142.7226276732918,7,57,21,163,1
 755855,1355.1260619974637,1,27,16,245,1
 75658,922.6969060371964,2,45,48,339,1
 757501,1231.5443868829104,1,89,36,95,1
 758751,769.1916884722739,4,25,36,34,1
 759438,654.9746354462771,6,18,19,94,1
 760129,1024.9128412719103,4,39,32,222,1
 761976,527.6148172636173,4,86,37,67,1
 762150,1074.2461683082963,9,52,36,98,1
 763652,1281.6412573869393,5,29,33,325,1
 764970,642.306224470488,9,29,21,154,1
 76581,945.082028040622,4,25,1,112,1
 766915,976.176116903262,6,87,13,293,1
 767434,1179.3855639489905,6,82,32,76,1
 76810,1135.6400108964913,9,51,18,104,1
 7692,965.4339247072038,1,39,10,176,1
 770659,1049.5211901919638,9,89,38,162,1
 771608,688.8363241721457,9,71,5,42,1
 772778,938.1203411121238,6,18,44,137,1
 77316,859.4281176897568,7,87,49,251,1
 774590,785.9790435227832,5,26,4,316,1
 775206,765.5437400212193,3,85,29,362,1
 776452,1238.7855801253097,2,51,21,137,1
 777162,1196.771150935613,7,56,17,77,1
 778108,1043.6444532079595,7,64,28,55,1
 779922,743.3711751472349,5,72,43,339,1
 780693,729.7341681000257,2,69,47,210,1
 781391,775.3963321629105,6,68,36,26,1
 782535,837.0409730494603,5,82,29,59,1
 783699,1231.0067548017253,6,63,35,153,1
 784812,890.0672354314563,6,64,13,259,1
 785886,1461.6768314340084,6,48,17,184,1
 786992,489.56628289392734,5,36,6,174,1
 787586,1062.055146575084,8,71,21,197,1
 788956,1279.323957897032,7,19,12,133,1
 789841,987.6340725868918,5,51,39,85,1
 790538,903.8611139425436,3,44,13,123,1
 791680,1317.8887737485395,8,74,8,341,1
 79254,1152.9190722102169,5,68,10,281,1
 79361,880.2064405386775,9,80,36,86,1
 794492,1369.9860347225065,5,36,1,304,1
 795947,618.6187072688153,7,30,32,199,1
 796789,982.4585721353384,5,82,22,259,1
 797219,878.6591130427241,1,68,4,207,1
 798179,933.835791690511,8,30,36,304,1
 799321,1024.2489912481794,7,85,34,98,1
 800710,1424.1140920725095,3,38,46,327,1
 801994,829.5039380005503,4,37,38,75,1
 802114,1615.8105281213216,4,36,27,58,1
 803955,979.4622054018578,9,40,27,170,1
 804569,532.3020197435361,6,29,48,355,1
 805979,604.0242941285692,6,79,41,322,1
 806931,861.2001183267005,8,52,9,194,1
 807891,1205.120545299341,3,26,13,350,1
 808110,981.3885210584582,6,71,15,357,1
 809207,1128.758816802165,6,50,5,49,1
 810471,931.237075712089,9,83,12,224,1
 811398,1338.4680935413533,5,62,13,163,1
 812294,1212.4005242552562,8,65,36,328,1
 813963,1049.1302924253675,6,33,43,283,1
 814122,772.6531363013153,5,46,20,107,1
 815759,785.4105549546966,4,53,31,78,1
 816402,850.1562442615568,2,55,29,355,1
 817112,993.3715311376958,1,64,29,196,1
 818158,1118.4582302279468,4,79,46,140,1
 819543,1132.451044478821,5,68,11,193,1
 820610,1374.0110778722958,2,70,12,244,1
 821554,1063.6052108253032,1,77,10,333,1
 822425,1161.3439873962868,2,64,48,4,1
 823879,995.894275981812,2,33,4,195,1
 824413,616.4714573160944,2,71,43,328,1
 825126,1547.6139064524946,8,88,49,219,1
 826212,1283.8914100451498,3,32,7,140,1
 827459,861.5876736632044,4,77,12,15,1
 828534,697.2459500593859,2,28,40,38,1
 829286,511.9780501193746,6,60,30,75,1
 830574,945.224867797784,8,45,14,17,1
 8311035,7341.718802845739,18,53,19,178,-1
 832828,869.284993211683,2,54,40,89,1
 833964,1177.250939397128,7,68,31,145,1
 834831,663.8873722414307,6,41,17,252,1
 83583,1369.473511185379,2,58,45,111,1
 836852,861.1307202099364,5,71,3,117,1
 837384,868.5612445798097,1,79,32,194,1
 838536,1011.8496678291036,4,36,7,65,1
 839369,1024.419024637208,2,22,29,207,1
 840241,801.8698153918249,2,66,39,124,1
 8411000,1143.1456953390395,7,79,22,34,1
 84265,1203.1314555985496,4,55,1,245,1
 843840,946.5027889436228,5,84,4,151,1
 844411,1177.9037195222224,1,60,11,21,1
 845532,584.61998443276,5,46,25,175,1
 846966,1360.029303862368,9,29,33,318,1
 847198,1038.431276486382,9,42,3,99,1
 848691,909.75845854523,5,66,16,136,1
 849696,922.6133901715024,4,74,23,267,1
 850435,1375.589263024007,2,53,17,297,1
 851298,1076.8248802191524,2,21,28,124,1
 852844,1095.6024365460123,3,70,13,94,1
 853431,704.1853718335562,5,47,48,323,1
 854763,1640.0211345671987,1,59,23,105,1
 855521,582.648679719657,5,74,37,159,1
 856846,1123.112816002037,5,86,38,356,1
 857474,1341.7185668611312,2,73,11,46,1
 858797,990.1112115358362,3,22,15,291,1
 859363,972.8099628857856,6,71,16,62,1
 86052,903.7294298959208,8,39,15,180,1
 861817,1066.7625664673146,6,38,38,131,1
 862494,784.678949667934,3,42,45,315,1
 86368,1250.883224473006,4,53,25,157,1
 864193,1053.523436032551,6,78,24,43,1
 865506,878.2186540588259,4,31,15,332,1
 866470,856.04543983883,4,77,30,208,1
 867902,901.6652969181598,6,68,47,52,1
 868296,826.7726011848365,5,82,9,201,1
 869775,1155.4524905542992,3,71,46,209,1
 870618,1181.441655974673,9,19,11,250,1
 871146,1195.4557179443275,5,82,10,334,1
 872248,836.667691856572,7,71,45,59,1
 87371,1090.3489013771034,3,26,22,115,1
 874835,991.3287781533048,8,78,19,89,1
 875708,1438.6985454960911,6,32,31,354,1
 876826,1363.3461192794252,5,85,25,291,1
 8771017,12846.836935684016,11,32,18,151,-1
 878762,1030.5024536613405,6,60,24,357,1
 879798,1170.375174343156,1,82,42,243,1
 880499,781.0954366538107,7,79,13,283,1
 881182,785.7106108959293,8,36,15,302,1
 882658,993.9687282224992,6,25,30,187,1
 8831003,15767.552292384027,18,48,31,190,-1
 884940,858.9803423158179,3,23,1,225,1
 885189,788.3015704828988,5,89,4,272,1
 886295,1089.253871491262,1,73,34,278,1
 887171,777.6213925936191,6,34,37,268,1
 888229,821.1740726850079,3,55,24,245,1
 889113,1015.0575524852566,5,32,9,72,1
 890694,1153.983901736066,9,71,48,239,1
 89118,1078.5618331488186,4,18,7,237,1
 892440,986.1130752758452,7,54,29,67,1
 89313,1060.4905678915086,8,45,41,187,1
 894965,977.5660764281934,5,89,17,314,1
 89556,1232.8200297790495,4,59,33,161,1
 896472,424.5197088161038,4,83,10,347,1
 897874,817.2674900145203,6,44,31,363,1
 898882,867.2828067699198,2,38,42,21,1
 899599,888.9266849809721,3,38,48,97,1
 900802,870.9888179456565,6,85,13,31,1
 9011047,5350.162845433485,14,40,18,195,-1
 902318,922.433310851636,6,59,42,47,1
 903582,896.1780215247996,9,19,35,103,1
 904700,953.7744658892528,1,43,20,41,1
 905228,730.5638055176735,6,19,21,258,1
 906929,1391.3810073085851,5,35,19,15,1
 907105,959.6785720834976,8,82,35,180,1
 908106,1101.0127142036347,8,25,21,310,1
 909284,690.5461252932878,7,35,22,2,1
 910161,756.3295824431697,2,37,42,336,1
 911544,1360.392155164475,4,30,33,284,1
 91259,1082.815857850891,1,62,6,139,1
 913683,868.8699334300566,5,27,26,199,1
 9141049,7679.070825444451,15,68,16,245,-1
 915997,1449.4216317123803,3,80,38,248,1
 916125,1146.7142734500676,1,72,39,204,1
 917260,1193.6585133573342,5,58,3,105,1
 918958,1114.188304788446,7,74,43,17,1
 919216,1189.7423051233168,7,80,20,323,1
 920513,940.2629882833976,7,80,20,21,1
 92197,1074.030069266144,1,37,32,344,1
 922895,1345.5397477593815,4,85,27,178,1
 923327,1289.527718375017,7,39,47,63,1
 924530,773.9208437238979,5,61,48,351,1
 925609,555.3199377739304,9,27,21,352,1
 926878,1055.9469879097246,5,56,22,209,1
 927251,684.7790114162387,9,62,22,172,1
 928422,1438.8352106108011,4,73,31,287,1
 929157,1466.4436277861892,6,63,27,89,1
 930439,574.1543901612114,3,32,44,134,1
 931674,907.139783501052,6,49,8,140,1
 932278,849.9457807103013,4,82,2,21,1
 933726,954.0041659118302,4,45,20,268,1
 934832,770.3370133789505,2,44,49,256,1
 935342,1060.921802872978,8,61,7,363,1
 936612,986.1038322723864,3,64,49,354,1
 937875,991.7182567815508,2,68,21,94,1
 938265,936.85796215171,2,74,47,201,1
 939834,808.0506087239679,4,80,6,86,1
 940697,1081.5332555605296,4,64,24,206,1
 941426,1342.1578893830872,7,52,25,342,1
 942709,479.5176480290695,8,78,30,231,1
 943713,863.7702282977626,4,23,12,266,1
 9441015,14921.190771066364,17,21,3,336,-1
 9451041,12960.522864904227,17,19,49,326,-1
 946617,1027.3486986512232,9,41,14,287,1
 947819,1020.570997318856,6,40,7,157,1
 948528,1012.0212366653456,5,23,5,200,1
 949448,765.0300534181612,2,83,16,180,1
 950660,963.9098970190144,6,62,3,196,1
 95169,1090.4090062619086,6,57,10,148,1
 952325,748.4956546250745,2,64,29,172,1
 953593,1119.744956436598,8,53,43,287,1
 954390,855.7740860843992,8,70,40,164,1
 955862,621.063971250692,7,64,14,116,1
 956482,761.1148898498935,2,70,23,18,1
 957935,1110.003612513333,2,51,23,332,1
 958975,888.4541416963051,9,45,38,219,1
 959132,1017.1407437015068,9,83,46,161,1
 960130,874.1310864709502,2,62,47,185,1
 961503,650.3581065452147,7,69,22,297,1
 962442,991.8263129764769,9,25,28,158,1
 963848,1613.8250349777236,1,79,28,248,1
 964273,1290.7909380387398,8,24,23,95,1
 965939,1060.9501784427996,7,46,47,101,1
 966625,1398.2966566598493,6,29,11,94,1
 967128,858.425567599307,6,21,47,102,1
 968634,893.279732513145,8,33,22,342,1
 969306,1029.3318458271956,4,43,24,236,1
 970784,1152.646436320956,3,34,31,235,1
 971485,810.9123136789242,2,34,49,170,1
 972291,947.9694374106812,8,86,14,112,1
 97322,943.555924878366,9,21,25,209,1
 974757,1123.3294752202223,1,26,22,92,1
 975445,673.8826248737867,2,18,6,188,1
 976597,932.5312661766573,7,87,25,309,1
 977340,859.0688617990063,7,63,49,143,1
 97893,824.4867265306619,4,67,9,191,1
 97994,918.084463350558,2,38,45,39,1
 980568,747.9784222706489,8,38,30,335,1
 981601,1189.247154161338,5,71,23,108,1
 982974,836.8440051744022,3,74,22,231,1
 983357,995.3717160019024,5,22,25,62,1
 9841039,10116.928577102117,10,69,30,213,-1
 985386,1037.598446619052,4,32,22,274,1
 986310,949.4518368915265,5,68,47,205,1
 987347,637.978914625669,9,41,17,187,1
 988392,1122.9797928766263,5,64,15,310,1
 98914,521.6799388355505,2,64,49,82,1
 990550,849.0037033210449,9,34,43,124,1
 991921,1268.407937464943,3,64,13,121,1
 992765,1287.3183315714189,6,72,2,180,1
 993704,647.8846759091101,9,50,47,274,1
 994927,860.2695381821029,9,49,17,135,1
 995477,1144.1392407639416,7,56,17,198,1
 9961046,10097.886479532812,15,81,8,311,-1
 997502,1477.3541601175327,5,71,7,265,1
 99882,1089.2781428779367,7,19,49,362,1
 99998,1065.2638180449724,9,84,32,179,1
1000349,820.388944686891,1,28,25,245,1
1001889,1147.6637076730774,6,76,1,250,1
1002334,830.7095721219721,1,70,26,271,1
1003236,1158.4797555795028,2,52,36,44,1
100479,1022.9401941338756,3,85,45,276,1
1005446,1167.4181372075095,2,53,29,338,1
1006546,800.7761861323808,4,87,48,11,1
10071048,8486.636491556797,19,46,28,34,-1
1008781,1044.4252502333134,5,84,17,307,1
1009753,756.0316867556668,4,60,32,347,1
1010884,1261.040219267268,3,33,20,133,1
1011222,533.1837018520629,3,68,4,345,1
1012256,878.9414817834372,6,84,17,3,1
1013928,1094.30296876613,4,85,40,342,1
1014701,869.3192448702401,9,22,37,10,1
1015352,1368.839054237388,7,41,29,282,1
1016488,729.6129990964012,7,30,3,11,1
1017984,988.0721609645052,5,64,49,196,1
1018866,903.074610016004,2,58,3,171,1
1019361,1129.836628560293,2,81,29,42,1
1020973,1210.160887247181,5,22,6,136,1
1021559,1098.6130355945745,9,38,31,127,1
1022702,1262.2523064592224,2,69,42,293,1
1023387,1085.43899394429,3,44,6,105,1
1024591,1017.891559304848,4,25,29,198,1
1025776,607.4438200273859,1,44,24,168,1
1026247,881.263672209761,5,38,6,220,1
1027804,884.4311778237393,6,28,32,145,1
1028562,1518.8501996613595,1,41,13,149,1
1029271,1360.3183222665289,7,45,47,138,1
1030718,1037.5754403654694,5,30,29,357,1
1031663,991.8116824460004,5,84,30,211,1
1032892,1126.8185077768244,1,28,17,166,1
1033415,1083.078502994898,9,59,27,37,1
1034447,1091.649561524212,3,52,17,94,1
1035116,1075.3868355834031,1,69,19,1,1
1036611,1163.5914140885145,2,61,4,286,1
1037372,1124.4995728113624,3,58,2,117,1
10383,1161.922134525173,8,34,17,298,1
1039224,596.821032202587,1,45,27,351,1
1040209,1128.761921576512,2,36,10,354,1
1041383,469.0260689225483,7,50,2,284,1
1042165,1240.8440323110804,5,79,43,13,1
1043575,1207.3513952958722,3,58,24,293,1
1044690,1111.06582787151,9,82,7,76,1
1045843,719.3194946094253,5,66,25,100,1
1046172,796.0474287586404,2,38,9,240,1
1047967,830.9019244851826,3,70,32,91,1
1048464,1053.4949776835556,9,33,8,128,1
10491,1124.1785382528085,7,65,29,217,1
1050283,1396.504204036338,8,77,30,250,1
1051616,1032.3052954938069,9,54,25,189,1

Third Demo Script

Third Demo Script
 1root@controlplane ~/assets/05-project via 🐍 v3.12.3   python3 synthetic_health_claims.py
 2Synthetic data generated and saved to 'synthetic_health_claims.csv'.
 3
 4root@controlplane ~/assets/05-project via 🐍 v3.12.3  5
 6
 7root@controlplane ~   mlflow ui --host 0.0.0.0 --port 3500
 8[2025-03-05 18:44:25 -0500] [35657] [INFO] Starting gunicorn 23.0.0
 9[2025-03-05 18:44:25 -0500] [35657] [INFO] Listening at: http://0.0.0.0:3500 (35657)
10[2025-03-05 18:44:25 -0500] [35657] [INFO] Using worker: sync
11[2025-03-05 18:44:25 -0500] [35664] [INFO] Booting worker with pid: 35664
12[2025-03-05 18:44:25 -0500] [35665] [INFO] Booting worker with pid: 35665
13[2025-03-05 18:44:25 -0500] [35666] [INFO] Booting worker with pid: 35666
14[2025-03-05 18:44:25 -0500] [35667] [INFO] Booting worker with pid: 35667
15
16
17
18Train and evaluate the Isolation Forest model by running
19python3 isolation_model.py
20
21
22You will need to create a Python script to download the model artifact /root/assets/05-project/model.pkl for local use.
23
24MLflow UI host: http://localhost:3500
25This is an example format of artifact URI: mlflow-artifacts:/324575258297482099/f877ad1ef20e4b35a44346cd28cf9e2b/artifacts/model/model.pkl
26Reference this documentation to create the script:
27https://mlflow.org/docs/latest/python_api/mlflow.artifacts.html
28https://mlflow.org/docs/latest/python_api/mlflow.set_tracking_uri.html
29
30
31root@controlplane ~/assets/05-project via 🐍 v3.12.3   python3 isolation_model.py
322025/03/05 18:46:31 INFO mlflow.tracking.fluent: Experiment with name 'Health Insurance Claim Anomaly Detection' does not exist. Creating a new experiment.
332025/03/05 18:46:36 WARNING mlflow.models.model: Model logged without a signature and input example. Please set `input_example` parameter when logging the model to auto infer the model signature.
34Train Anomaly Percentage: 5.00%
35Test Anomaly Percentage: 4.29%
36Model and metrics logged to MLflow.
37🏃 View run dashing-swan-340 at: http://127.0.0.1:3500/#/experiments/981188833218800573/runs/ca50c2fee6194da689f5c05702d2091e
38🧪 View experiment at: http://127.0.0.1:3500/#/experiments/981188833218800573
39
40root@controlplane ~/assets/05-project via 🐍 v3.12.3 41
42
43mlflow-artifacts:/981188833218800573/ca50c2fee6194da689f5c05702d2091e/artifacts/model
44mlflow-artifacts:/981188833218800573/ca50c2fee6194da689f5c05702d2091e/artifacts/model/model.pkl
45
46
47root@controlplane ~/assets/05-project via 🐍 v3.12.3  python3 ./download_model_pkl.py
48Downloading artifacts: 100%|███████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 92.84it/s]
49Artifact downloaded to: /tmp/tmpz1e2smm6/model.pkl
50
51root@controlplane ~/assets/05-project via 🐍 v3.12.3 52
53
54
55root@controlplane ~/assets/05-project via 🐍 v3.12.3   python3 ./register_model.py
56Model registered with BentoML: Model(tag="health_insurance_anomaly_detector:kxs7et72dwhhi4wj")
57
58root@controlplane ~/assets/05-project via 🐍 v3.12.3   bentoml models list
59 Tag                                                 Module           Size      Creation Time
60 health_insurance_anomaly_detector:kxs7et72dwhhi4wj  bentoml.sklearn  1.39 MiB  2025-03-05 18:55:37
61
62root@controlplane ~/assets/05-project via 🐍 v3.12.3 63
64
65Now - Start the BentoML service for model predictions.
66
67
68
69root@controlplane ~/assets/05-project via 🐍 v3.12.3   bentoml serve service.py --reload
70/usr/local/lib/python3.12/dist-packages/bentoml/io.py:7: BentoMLDeprecationWarning: `bentoml.io` is deprecated since BentoML v1.4 and will be removed in a future version. Please upgrade to new style IO types instead.
71  warn_deprecated(
72/usr/local/lib/python3.12/dist-packages/bentoml/_internal/models/model.py:367: BentoMLDeprecationWarning: `get_runnable` is deprecated since BentoML v1.4 and will be removed in a future version. Use `get_service` instead.
73  self._runnable = self.info.imported_module.get_runnable(self)
74/usr/local/lib/python3.12/dist-packages/bentoml/_internal/models/model.py:354: BentoMLDeprecationWarning: `Runner` is deprecated since BentoML v1.4 and will be removed in a future version. Please upgrade to new style services.
75  return Runner(
76/root/assets/05-project/service.py:8: BentoMLDeprecationWarning: `bentoml.Service` is deprecated since BentoML v1.4 and will be removed in a future version. Please upgrade to @bentoml.service().
77  svc = bentoml.Service("health_insurance_anomaly_detection_service", runners=[model_runner])
782025-03-05T18:56:55-0500 [INFO] [cli] Environ for worker 0: set CPU thread count to 16
792025-03-05T18:56:55-0500 [INFO] [cli] Prometheus metrics for HTTP BentoServer from "service.py" can be accessed at http://localhost:3000/metrics.
802025-03-05T18:56:55-0500 [INFO] [cli] Starting production HTTP BentoServer from "service.py" listening on http://0.0.0.0:3000 (Press CTRL+C to quit)
81
82
83Now run the webapp --
84
85root@controlplane ~/assets/05-project via 🐍 v3.12.3   python3 flask_app.py
86 * Serving Flask app 'flask_app'
87 * Debug mode: on
88WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
89 * Running on all addresses (0.0.0.0)
90 * Running on http://127.0.0.1:5005
91 * Running on http://192.168.163.25:5005
92Press CTRL+C to quit
93 * Restarting with stat
94 * Debugger is active!
95 * Debugger PIN: 686-296-505

Supporting Folders

3.demo Outputs

MLflow Experiments

_images/mlflow-experiments.png

Script to Download Model

Script to Download Model
 1import mlflow
 2
 3# Set the MLflow tracking URI
 4mlflow.set_tracking_uri("http://localhost:3500")
 5
 6# Define the artifact URI as a string (ensure it's correctly formatted)
 7artifact_uri = "mlflow-artifacts:/981188833218800573/ca50c2fee6194da689f5c05702d2091e/artifacts/model/model.pkl"
 8
 9# Download the artifact
10local_path = mlflow.artifacts.download_artifacts(artifact_uri=artifact_uri)
11
12print(f"Artifact downloaded to: {local_path}")

BentoML Serving

_images/Bentoml_serving.png

Flask App UI

_images/flask-app-ui.png

File Server UI

_images/file-server-ui.png

Predicted ML Results

_images/predict-ml-results.png

3.demo → labs → assets → 05-project

Flask App v2

Flask App Version 2
 1from flask import Flask, render_template, request, redirect, url_for
 2import pandas as pd
 3import requests
 4import base64
 5import io
 6import matplotlib.pyplot as plt
 7import os
 8
 9app = Flask(__name__)
10
11# Route for the home page
12@app.route('/')
13def index():
14    return render_template('index.html')
15
16# Route to handle the CSV file upload and prediction
17@app.route('/predict', methods=['POST'])
18def predict():
19    file_data = request.form.get('file')
20    
21    # Decode the Base64 encoded file content
22    decoded_file = base64.b64decode(file_data.split(',')[1])
23
24    # Read the decoded content into a DataFrame
25    df = pd.read_csv(io.StringIO(decoded_file.decode('utf-8')))
26
27    # Separate the 'claim_id' column if it exists
28    if 'claim_id' in df.columns:
29        claim_ids = df['claim_id']
30        df = df.drop(columns=['claim_id'])
31    else:
32        claim_ids = None
33
34    # Send the DataFrame to the BentoML service
35    response = requests.post(
36        'http://127.0.0.1:3000/predict',  # BentoML endpoint
37        json=df.to_dict(orient='records')
38    )
39
40    # Get predictions from the response
41    predictions = response.json()['predictions']
42
43    # Add predictions to the DataFrame
44    df['Prediction'] = predictions
45
46    # Reattach the 'claim_id' column to the DataFrame
47    if claim_ids is not None:
48        df['claim_id'] = claim_ids
49
50    # Reorder columns to have 'claim_id' first
51    if 'claim_id' in df.columns:
52        df = df[['claim_id'] + [col for col in df.columns if col != 'claim_id']]
53
54    # Save the DataFrame to a session file for visualization
55    df.to_csv('session_data.csv', index=False)
56
57    # Render the DataFrame as an HTML table with a link to visualize
58    return render_template('result.html', tables=[df.to_html(classes='data', header="true")])
59
60# Route to handle the visualization
61@app.route('/visualize')
62def visualize():
63    # Load the session data
64    df = pd.read_csv('session_data.csv')
65
66    # Create a pie chart based on the 'Prediction' column
67    prediction_counts = df['Prediction'].value_counts()
68    plt.figure(figsize=(8, 8))
69    plt.pie(prediction_counts, labels=prediction_counts.index, autopct='%1.1f%%', startangle=140)
70    plt.title('Prediction Distribution')
71
72    # Save the pie chart as an image
73    if not os.path.exists('static'):
74        os.makedirs('static')
75    chart_path = 'static/prediction_pie_chart.png'
76    plt.savefig(chart_path)
77    plt.close()
78
79    # Render the visualization page with the pie chart
80    return render_template('visualize.html', chart_path=chart_path)
81
82if __name__ == '__main__':
83    app.run(debug=True, port=5005)

Test Claim

Test Script for Health Claim
 1import requests
 2import pandas as pd
 3
 4# Define 10 different test inputs
 5test_data = [
 6    {"claim_amount": 1000, "num_services": 2, "patient_age": 30, "provider_id": 1, "days_since_last_claim": 100},
 7    {"claim_amount": 2000, "num_services": 5, "patient_age": 45, "provider_id": 2, "days_since_last_claim": 200},
 8    {"claim_amount": 15000, "num_services": 10, "patient_age": 50, "provider_id": 3, "days_since_last_claim": 300},
 9    {"claim_amount": 500, "num_services": 1, "patient_age": 25, "provider_id": 4, "days_since_last_claim": 10},
10    {"claim_amount": 7500, "num_services": 8, "patient_age": 60, "provider_id": 5, "days_since_last_claim": 50},
11    {"claim_amount": 2500, "num_services": 3, "patient_age": 35, "provider_id": 6, "days_since_last_claim": 120},
12    {"claim_amount": 9000, "num_services": 15, "patient_age": 70, "provider_id": 7, "days_since_last_claim": 180},
13    {"claim_amount": 400, "num_services": 2, "patient_age": 22, "provider_id": 8, "days_since_last_claim": 365},
14    {"claim_amount": 11000, "num_services": 6, "patient_age": 55, "provider_id": 9, "days_since_last_claim": 250},
15    {"claim_amount": 600, "num_services": 4, "patient_age": 40, "provider_id": 10, "days_since_last_claim": 30},
16]
17
18# Convert to DataFrame
19df_test = pd.DataFrame(test_data)
20
21# Make the prediction request
22response = requests.post("http://127.0.0.1:3000/predict", json=df_test.to_dict(orient="records"))
23
24# Check the response
25if response.status_code == 200:
26    predictions = response.json()["predictions"]
27    for i, prediction in enumerate(predictions):
28        print(f"Test Case {i+1}: Prediction: {prediction}")
29else:
30    print(f"Error: {response.status_code} - {response.text}")

Synthetic Health Claims Generator

Generate Synthetic Claims
 1import pandas as pd
 2import numpy as np
 3
 4# Set random seed for reproducibility
 5np.random.seed(42)
 6
 7# Generate synthetic data
 8num_samples = 1000
 9data = {
10    'claim_id': np.arange(1, num_samples + 1),
11    'claim_amount': np.random.normal(1000, 250, num_samples),
12    'num_services': np.random.randint(1, 10, num_samples),
13    'patient_age': np.random.randint(18, 90, num_samples),
14    'provider_id': np.random.randint(1, 50, num_samples),
15    'days_since_last_claim': np.random.randint(0, 365, num_samples),
16}
17
18# Convert to DataFrame
19df = pd.DataFrame(data)
20
21# Introduce some anomalies (e.g., very high claim amounts)
22num_anomalies = 50
23anomalies = {
24    'claim_id': np.arange(num_samples + 1, num_samples + num_anomalies + 1),
25    'claim_amount': np.random.normal(10000, 2500, num_anomalies),  # Much higher amounts
26    'num_services': np.random.randint(10, 20, num_anomalies),
27    'patient_age': np.random.randint(18, 90, num_anomalies),
28    'provider_id': np.random.randint(1, 50, num_anomalies),
29    'days_since_last_claim': np.random.randint(0, 365, num_anomalies),
30}
31
32df_anomalies = pd.DataFrame(anomalies)
33
34# Combine normal data with anomalies
35df = pd.concat([df, df_anomalies]).reset_index(drop=True)
36
37# Shuffle the dataset
38df = df.sample(frac=1).reset_index(drop=True)
39
40# Save the data to CSV
41df.to_csv('synthetic_health_claims.csv', index=False)
42
43print("Synthetic data generated and saved to 'synthetic_health_claims.csv'.")

ML Service

Service Layer
 1import bentoml
 2from bentoml.io import JSON, PandasDataFrame
 3
 4# Load the registered model
 5model_runner = bentoml.sklearn.get("health_insurance_anomaly_detector:latest").to_runner()
 6
 7# Create a BentoML Service
 8svc = bentoml.Service("health_insurance_anomaly_detection_service", runners=[model_runner])
 9
10# Define an API endpoint for prediction
11@svc.api(input=PandasDataFrame(), output=JSON())
12def predict(data):
13    # Make predictions
14    predictions = model_runner.predict.run(data)
15    # Return predictions as JSON
16    return {"predictions": predictions.tolist()}

Python Requirements

Requirements File
1mlflow
2pandas
3numpy
4bentoml

Register Model Script

Model Registration
 1import bentoml
 2import pickle
 3
 4# Load the model from the downloaded PKL file using pickle
 5model_path = "model.pkl"  # Replace with your actual path
 6
 7with open(model_path, 'rb') as model_file:  # Open in binary mode
 8    model = pickle.load(model_file)
 9
10# Save the model to BentoML
11bento_model = bentoml.sklearn.save_model("health_insurance_anomaly_detector", model)
12
13print(f"Model registered with BentoML: {bento_model}")

README

Project Documentation
 1Here is the converted `README.md` file for your project:
 2
 3```markdown
 4# Health Claims Fraud Detection Project
 5
 6This project involves building a Flask web application that uses an Isolation Forest model to detect potentially fraudulent health claims. It leverages BentoML for model serving and MLflow for experiment tracking.
 7
 8## Setup Instructions
 9
10### 1. Environment Setup
11
12- Load the bash profile and set up the virtual environment:
13
14```bash
15source ~/.bash_profile
16virtualenv venv
17source venv/bin/activate
18```
19
20- Install required dependencies:
21
22```bash
23pip3 install -r requirements.txt
24```
25
26### 2. BentoML and Model Management
27
28- List BentoML models:
29
30```bash
31bentoml models list
32```
33
34- Run the synthetic data generator script:
35
36```bash
37python3 synthetic_health_claims.py
38```
39
40- Train and evaluate the Isolation Forest model:
41
42```bash
43python3 isolation_model.py
44```
45
46### 3. MLflow for Experiment Tracking
47
48- Start the MLflow UI to track experiments:
49
50```bash
51mlflow ui
52```
53
54### 4. Run the Flask Web Application
55
56- Open a new terminal window, source the environment, and run the Flask app:
57
58```bash
59source ~/.bash_profile
60source venv/bin/activate
61python3 flask_app.py
62```
63
64### 5. Register Model and Serve with BentoML
65
66- In another terminal, run the following commands to register and serve the model with BentoML:
67
68```bash
69source ~/.bash_profile
70source venv/bin/activate
71python3 isolation_model.py
72python3 register_model.py
73bentoml serve service.py --reload
74```
75
76## Additional Notes
77
78- Ensure that all commands are executed in the correct order for proper setup and functioning of the application.
79- Use BentoML to serve models and integrate them with the Flask app for real-time fraud detection.
80- The MLflow UI helps to track experiments and evaluate model performance.
81```
82
83This `README.md` file gives a clear step-by-step guide for setting up and running your project. Let me know if you'd like any additional adjustments!

Isolation Model

Isolation Forest Implementation
 1import pandas as pd
 2from sklearn.ensemble import IsolationForest
 3from sklearn.model_selection import train_test_split
 4import mlflow
 5import mlflow.sklearn
 6
 7# Load the synthetic data
 8df = pd.read_csv('synthetic_health_claims.csv')
 9
10mlflow.set_tracking_uri("http://127.0.0.1:3500")
11
12# Features to use for the model
13features = ['claim_amount', 'num_services', 'patient_age', 'provider_id', 'days_since_last_claim']
14
15# Split the data into training and test sets
16X_train, X_test = train_test_split(df[features], test_size=0.2, random_state=42)
17
18# Set up MLflow
19mlflow.set_experiment("Health Insurance Claim Anomaly Detection")
20
21with mlflow.start_run():
22    # Train the Isolation Forest model
23    model = IsolationForest(n_estimators=100, contamination=0.05, random_state=42)
24    model.fit(X_train)
25
26    # Predict on the test set
27    y_pred_train = model.predict(X_train)
28    y_pred_test = model.predict(X_test)
29    
30    # Convert predictions to anomaly scores (-1 is anomaly, 1 is normal)
31    anomaly_score_train = (y_pred_train == -1).astype(int)
32    anomaly_score_test = (y_pred_test == -1).astype(int)
33
34    # Log parameters
35    mlflow.log_param("n_estimators", 100)
36    mlflow.log_param("contamination", 0.05)
37    
38    # Log metrics
39    train_anomaly_percentage = anomaly_score_train.mean() * 100
40    test_anomaly_percentage = anomaly_score_test.mean() * 100
41    
42    mlflow.log_metric("train_anomaly_percentage", train_anomaly_percentage)
43    mlflow.log_metric("test_anomaly_percentage", test_anomaly_percentage)
44
45    # Log the model
46    mlflow.sklearn.log_model(model, "model")
47
48    print(f"Train Anomaly Percentage: {train_anomaly_percentage:.2f}%")
49    print(f"Test Anomaly Percentage: {test_anomaly_percentage:.2f}%")
50    print("Model and metrics logged to MLflow.")
51

Synthetic Claims Dataset

Dataset - Synthetic Claims
   1claim_id,claim_amount,num_services,patient_age,provider_id,days_since_last_claim
   21008,12064.315907367947,11,32,2,33
   3346,1058.0124843394092,3,80,49,75
   4264,743.9030896664276,4,49,29,228
   5695,1148.275314492096,9,77,27,38
   615,568.7705418717418,4,56,27,185
   731,849.5733469426508,8,70,43,141
   8999,857.2052525543008,9,25,4,146
   9773,1158.1019347638803,4,27,10,277
  10147,690.7623222804796,2,74,18,208
  11507,851.9015189402827,6,67,15,360
  12847,1072.2921609769546,8,70,38,29
  13418,1028.9186585732148,9,83,2,238
  14951,939.6909855359175,4,60,45,187
  15876,1448.639465879447,1,74,20,10
  1629,849.8403275202987,7,38,22,75
  17952,1088.0138491285743,6,37,14,153
  18160,1164.1384021584574,4,60,46,165
  19462,1008.8158879929322,9,62,11,106
  20196,1096.329344932209,9,86,15,238
  21933,637.996524895939,9,50,44,315
  2224,643.8129534466358,6,42,16,295
  23592,880.5856383087208,5,24,19,45
  241036,8214.38472236602,10,30,38,275
  25818,1222.4076989058592,9,21,19,29
  26217,806.793696365607,9,46,19,295
  27604,1338.9094647012378,6,38,46,103
  28661,856.5844982799409,2,76,28,363
  29137,804.1866769159408,3,55,40,75
  30972,829.7370856312798,2,23,23,110
  31351,1077.7268913995013,9,34,15,314
  32245,699.9258982360559,6,55,21,145
  3367,981.9974696049165,2,78,26,65
  34607,806.5527002241067,8,66,5,334
  35400,1309.4540779933654,6,36,15,271
  36912,1054.7875819159847,1,51,17,34
  37684,1122.3436403069795,3,62,30,297
  38379,1547.450733304418,5,65,30,70
  39943,1162.5502944896652,8,82,11,0
  40930,983.562434731753,5,60,15,332
  41995,749.5949975262711,2,46,28,113
  42184,1120.6181038107964,4,63,18,19
  43138,919.4846209485811,6,23,11,277
  44469,867.3747130973682,2,33,30,94
  45360,793.1922641119193,8,36,1,253
  46456,801.781791934414,4,89,37,272
  47858,1117.853889096601,4,55,38,28
  48839,1246.080599619146,9,21,31,199
  49542,717.5732863355954,7,32,8,77
  50948,827.0229825296889,8,81,15,305
  51540,855.7770326192128,5,61,18,158
  5223,1016.882051171981,2,75,35,303
  53358,927.8353402699654,8,34,28,11
  5466,1339.0600071427057,2,70,19,88
  55430,560.3151283942213,6,88,37,277
  56838,750.4114898153023,8,41,14,43
  57467,1153.5416750108564,8,34,45,326
  58770,1453.1121394992322,9,84,32,86
  59315,1326.3697017885822,7,47,10,333
  60133,734.4240715684738,5,51,5,246
  61698,687.2216059036743,6,48,9,266
  621010,13492.403951144599,12,80,13,5
  63585,1045.4665637646237,3,55,5,205
  64646,931.8191075630824,7,42,17,57
  65136,1387.483601254385,7,89,34,344
  66666,1026.6075569229743,3,45,2,72
  67486,644.4365726005815,8,47,38,330
  68946,732.4788084184619,1,23,9,109
  691037,9541.281892503732,19,29,36,111
  701044,9064.850876021788,11,40,47,190
  71626,872.1960808922037,5,71,21,277
  72643,935.1021621590988,8,54,22,19
  73628,968.5532699750879,1,46,5,218
  7447,884.8403072600531,6,47,30,282
  75571,1004.6045947973879,1,59,22,95
  76281,1028.379336312812,6,36,44,246
  77239,834.553383807903,9,62,49,363
  78560,894.7538797949343,1,30,15,313
  79227,1016.0700047738657,3,44,25,286
  80791,1107.4045547831465,4,75,25,70
  81613,1069.992156579955,1,70,42,272
  82923,1033.242418536719,3,81,21,174
  83305,994.774601508963,3,21,28,280
  84428,1171.5128649996097,3,25,8,74
  851026,7491.9645240248965,11,59,24,89
  86742,680.1057583160746,2,21,11,234
  87837,1387.6251232035193,5,41,26,69
  88893,1266.6686723972884,7,27,24,223
  896,941.4657607627048,9,32,5,268
  90986,710.4088277018643,2,85,2,147
  91290,844.3251200448516,9,81,42,17
  92353,1214.4149058005048,4,36,43,78
  93944,975.2060340551543,6,86,34,265
  94916,1069.7553814425848,7,23,32,76
  95201,1089.4468400870708,4,64,1,43
  96326,696.4528468030669,3,34,48,208
  97252,1229.4654867636941,4,70,41,150
  9850,559.2399611593165,1,31,3,162
  99141,1056.8649836510324,5,78,11,110
 100800,1007.4390348739363,9,39,15,298
 101640,676.2303069840959,5,76,15,217
 102737,1064.0074335784689,4,35,8,10
 103412,718.8394770405328,7,84,31,179
 104725,1042.7163595319855,6,28,34,207
 105142,1326.785688570607,1,29,16,320
 106516,1188.847806456439,5,25,12,362
 107277,1049.7649238933675,4,82,21,290
 108419,1294.8242960159566,9,58,49,334
 109345,882.2404235954193,4,18,1,297
 110545,382.0888749681777,2,66,38,14
 111497,740.6884614183859,4,40,21,83
 112269,889.9888783257541,9,51,32,322
 113842,1168.704873041651,2,74,8,18
 114115,951.9097588047193,8,43,26,239
 115484,1050.8659089668058,2,82,32,305
 116478,1077.812538635884,3,84,26,105
 117396,882.7060869738239,1,65,18,325
 118261,768.2673821054793,4,80,30,145
 1191024,7496.603751923622,18,30,47,188
 120614,718.6277381754059,4,63,20,82
 121288,1147.0793016211442,6,66,43,269
 122489,1421.7854087681412,3,38,38,194
 12321,1366.4121922303884,3,84,34,283
 124432,490.1919555599749,4,24,45,299
 12560,1243.8862817805898,3,88,41,131
 126863,1386.8763003325155,1,85,32,270
 127102,894.8386693086602,5,26,17,191
 128845,1041.613052053264,7,40,32,253
 129941,679.9239003322764,3,66,44,277
 130493,1019.3420769119045,9,74,30,143
 131662,863.285264689902,2,21,26,203
 132896,1162.1774718974107,4,65,45,118
 1331016,8870.077525963776,12,33,35,173
 134316,1005.2509604081897,5,59,40,354
 135297,1224.8999688583126,4,48,42,82
 136333,1018.9511395484316,9,51,24,330
 137857,791.9111067239428,5,24,32,246
 138648,986.4262833705469,1,72,46,128
 1397,1394.8032038768479,6,52,28,307
 140153,829.9938196053773,7,66,3,189
 141109,1064.387597680691,3,57,47,236
 142727,1004.6084832663483,9,87,38,88
 143859,861.9442389297571,9,78,8,160
 144100,941.3532166562132,2,50,48,202
 14562,953.5852558340457,4,36,2,175
 146752,662.0788485959166,3,82,13,285
 147716,1275.8254705041304,6,79,42,323
 14837,1052.215898751189,6,23,20,117
 1491032,8175.147635244881,18,28,35,221
 150437,1407.153886392823,8,54,37,105
 151602,769.4586689555937,6,71,24,282
 152881,1631.7331064684054,9,71,45,92
 1531027,12299.263233067913,18,78,41,175
 154420,1016.8796203525272,1,41,9,147
 155231,817.4083420707159,2,33,45,279
 156320,967.4642364080788,3,23,29,265
 15755,1257.7498806239878,4,20,9,174
 158202,1140.1961315920587,2,66,38,359
 159794,680.8128560449227,7,27,12,290
 160808,880.3128445841306,9,43,26,46
 161678,1438.0676108559057,9,76,22,110
 162421,1515.1869812204968,3,52,28,8
 163888,910.1769773032352,8,49,33,54
 164860,1158.2329544388776,7,20,8,234
 165744,1006.5227625527084,3,76,8,25
 166365,1172.5359979277782,6,64,44,291
 167190,621.2881938285338,9,89,22,248
 168203,1270.7628107938192,6,64,38,316
 169868,1083.6141974967563,7,30,49,258
 170578,1192.7162984717418,7,88,36,364
 171712,975.8217220324019,4,86,39,262
 172235,1535.9860223313315,8,29,5,200
 17348,1264.280556554729,1,42,34,112
 174645,938.5642339785139,3,24,47,192
 175111,520.3071961752396,9,63,4,348
 176272,641.0344622051401,7,54,48,298
 177782,666.1639103224747,3,37,1,160
 178584,1567.6732144510988,1,26,16,230
 179809,1313.9390313933802,4,36,27,250
 180849,840.565003937171,3,58,30,32
 181911,923.0554412617498,8,74,18,28
 182603,1217.4014800264151,8,82,11,342
 183475,1411.2419283753209,6,48,15,180
 184761,856.0905434405565,9,59,38,216
 185760,1175.0774698522478,1,45,18,109
 18638,510.08246903005613,2,40,27,72
 187605,1103.3587258059251,1,30,34,255
 188303,1186.8234012808155,9,84,19,214
 189885,1170.4728724065778,7,76,13,24
 190225,882.0170335526416,1,20,42,236
 191174,1085.287993704161,7,76,21,162
 192466,944.7576001166942,2,57,40,3
 193856,857.3134265626309,2,57,22,331
 19491,1024.2693873370101,7,28,10,359
 195563,1217.781175857923,2,28,49,35
 19617,746.7922199163941,4,37,12,354
 19796,634.1212629669703,6,65,42,137
 198766,824.2058937185282,4,89,31,63
 199799,1007.0795940326153,8,34,15,122
 2001038,5825.499617259132,12,54,7,223
 201689,1177.7399920508728,2,45,43,298
 2021034,11432.052513815663,12,30,49,327
 203877,870.5971752409571,5,64,39,67
 204806,922.7069691328402,4,68,40,15
 205170,811.5659589106276,5,58,33,282
 20628,1093.924504586418,3,80,38,183
 207299,1203.21552970974,8,67,11,174
 208173,980.7245726464739,1,68,18,244
 209688,906.2947981126006,3,85,46,25
 210517,1125.2292969060952,6,29,33,282
 211374,1239.8177065213017,7,29,45,174
 212774,1243.1386124066826,2,26,40,336
 213249,1441.3635600702742,7,35,35,97
 214243,1126.2468197451142,4,40,33,285
 21563,723.4162564984929,5,64,29,182
 216163,1289.648894751851,8,66,9,261
 217409,1030.0739079279747,2,48,40,220
 218230,1169.899437233669,8,20,25,135
 21953,830.7694999235104,4,65,27,43
 220792,1051.9219217907778,6,43,48,177
 221853,840.6532181733705,9,87,45,349
 222195,1043.2952314627955,1,62,28,62
 223619,1120.2523079341784,7,31,32,211
 224350,946.6382120720382,6,68,3,129
 225998,1160.2107153167524,2,74,37,202
 226332,775.6864071285421,7,30,39,53
 227673,914.3281014799128,3,32,11,170
 228836,1058.55368313413,7,53,13,236
 22936,694.7890875072444,2,26,38,249
 23080,503.1077713497768,8,85,28,69
 231870,1502.5511346915873,1,67,29,170
 23295,901.9729617169606,7,86,46,241
 233483,598.3884199356069,9,56,18,295
 234335,1243.7799333544378,7,68,17,240
 235449,871.5332706658266,4,80,23,287
 236822,1352.336860046395,8,58,18,65
 237623,1470.5061241187584,8,20,18,284
 238938,1177.0891118248383,2,76,9,326
 239746,818.5640467116336,3,60,30,28
 240600,1094.325123261213,5,45,19,260
 241724,1185.8160235056787,5,67,44,87
 242403,1001.3109249295458,8,84,42,29
 243981,1196.4500396627081,9,36,35,279
 244476,937.7409901109054,2,51,16,105
 245969,989.9605123389141,4,44,21,55
 246416,812.8783658608615,5,81,30,69
 247665,821.7885543307088,2,46,13,275
 248638,1018.329491797101,4,70,4,343
 249407,733.0948926543514,6,64,3,140
 250906,1011.6091370390373,1,56,49,270
 251692,1289.832450841062,7,64,45,19
 252827,1394.8930364326782,4,32,32,17
 25333,996.6256938155166,5,31,27,24
 254300,1157.4072104809031,3,86,14,68
 255641,916.053825177468,3,64,40,15
 256719,909.096946946536,6,20,19,139
 257949,988.6034959111255,5,79,12,11
 25875,345.0637239775639,2,31,36,142
 259549,1092.7864683428272,3,54,12,339
 260755,762.6502777920142,1,76,37,207
 261479,1769.7202021138096,3,25,2,279
 262705,610.842706619024,4,67,31,229
 263367,1056.0231204526042,2,38,7,324
 264473,621.2022344503619,4,30,44,320
 26599,1001.2783641606152,9,61,6,199
 266771,1176.9379838638688,5,30,5,216
 267395,1294.8600301803217,8,52,45,280
 268865,846.8028273789034,8,53,10,179
 269520,1187.8467808429473,2,66,1,161
 270481,968.0206021298084,3,44,26,107
 2711011,8099.548171928165,16,57,39,214
 272323,795.4448291916319,9,46,1,84
 273159,702.1741256993378,7,25,8,144
 274551,1021.647446868225,4,75,31,358
 275572,1419.1093280688206,1,34,38,163
 276854,1297.254132776888,9,74,34,154
 277423,937.7589628802316,7,47,34,49
 2781023,9388.889175189091,13,19,19,165
 279576,447.2161727480287,5,64,49,194
 280686,1178.249607543097,4,70,20,239
 281738,1245.6727459863785,4,36,40,347
 282311,945.579699193195,1,67,33,313
 283237,493.7143533355982,6,82,46,263
 284221,1578.664641668377,5,31,1,189
 285463,825.0686230018537,6,78,16,87
 28626,1027.7306474274665,9,55,24,207
 287317,1170.488242823741,1,54,47,115
 28811,884.1455767968845,2,83,26,227
 289788,1114.7950198071092,1,85,9,217
 290754,1263.41044915196,7,56,36,272
 291656,1014.804608503622,7,68,40,160
 292460,700.530526852788,3,62,42,301
 293465,971.9179875772926,5,83,40,340
 294319,1081.0415881221106,5,52,1,225
 29540,1049.2153089672809,6,63,20,359
 296263,189.6831649827319,8,65,9,95
 297312,1274.6942129967974,3,23,33,93
 298406,1155.7124830868747,5,30,19,33
 299525,809.1852108643708,7,67,32,72
 300178,1363.3835192893293,1,56,40,57
 301181,1156.4168369412516,1,28,37,25
 302495,1380.7810193174143,7,48,32,181
 303511,1067.6142064449598,4,39,6,207
 304519,1024.8330763573065,7,51,8,335
 305706,1151.50248783641,3,55,8,219
 306188,981.7927718357818,5,36,13,145
 307672,481.6524418979626,8,67,26,172
 308151,1062.6232125864692,2,65,13,207
 309772,859.383306026433,9,62,38,6
 310204,1263.4505130087257,4,35,21,144
 3111018,14925.646121585341,10,69,11,330
 312385,810.2168346115755,8,40,8,227
 313127,752.3659187173279,8,45,23,93
 314587,885.159775114939,3,73,10,336
 31577,1021.7617670595428,5,76,30,301
 316636,586.2858320335577,2,75,1,74
 317156,821.412145493408,7,66,1,16
 318777,818.2157060437828,6,51,35,329
 31976,1205.4756260938059,8,70,34,249
 320255,620.1575085114966,5,49,23,107
 321454,1126.011628879461,6,21,36,193
 322394,1457.8646914635883,8,24,49,147
 323104,799.4306826945952,1,52,27,236
 324580,1285.9385108017323,8,30,15,186
 325259,1110.954857036557,4,61,16,287
 326285,1533.2583436640666,6,52,33,315
 327348,648.1340564058612,8,30,43,332
 328880,1297.098318362021,6,39,13,97
 3295,941.461656319166,6,28,6,57
 330747,1046.6916911192695,6,83,10,352
 331565,1300.3034805409861,5,85,11,21
 332370,806.7475540361334,6,73,19,291
 333635,746.9739061849582,9,64,19,95
 334790,584.7597666210022,5,18,13,0
 335280,903.6716007845599,7,37,6,149
 336458,741.1894193951565,6,31,42,143
 337925,1298.7616572312106,8,84,21,84
 338208,1128.4464877280523,2,53,49,64
 339985,999.0993652273579,8,56,21,24
 340926,619.2032738040564,8,32,48,44
 341793,1067.8947092988433,4,37,18,188
 342275,754.6228372380123,8,54,17,296
 343647,325.7783392646071,7,50,29,110
 344210,1963.1828726636804,9,45,28,287
 34542,1042.8420702974927,8,31,19,210
 346324,1523.096818921365,9,76,34,213
 34789,867.5599490582404,6,29,19,226
 348867,1071.4663476812261,9,86,12,273
 349676,805.5458281022811,7,39,40,85
 350577,1058.9036395271414,1,35,32,150
 351164,794.8294204120724,2,81,6,162
 352218,940.7953483149978,5,83,35,186
 353186,1178.500123523023,1,18,22,58
 354194,688.565305322003,9,50,4,18
 355453,753.5684884161141,9,63,26,129
 356606,1469.1989531395166,8,74,28,205
 357377,1218.0801591801696,6,36,11,150
 358490,1220.4099392373626,9,36,3,282
 3591045,7254.77176640996,18,57,40,199
 36030,927.0765625516808,4,74,26,286
 36172,1384.5091416164923,3,81,48,213
 36288,1082.1877774149211,9,47,36,148
 363558,891.8604530450948,9,40,35,161
 364389,1237.6059595465126,3,68,47,63
 365769,843.2582355530582,7,44,46,319
 366971,1032.0261037276973,4,34,40,159
 367869,1164.6360681682077,6,75,31,134
 368508,784.002307580046,7,45,4,41
 369655,1643.339950812465,7,24,12,111
 370175,1069.1726998325048,7,56,2,59
 371803,1024.0301942352457,9,86,17,333
 372258,823.0826335953049,2,45,23,5
 373213,1238.5004408733007,1,58,3,313
 374399,971.3650386868455,4,89,45,223
 375417,1387.7879938806307,2,38,43,115
 37664,700.9483439798323,2,31,4,128
 377714,1099.7840285880177,4,55,49,358
 378873,655.1701929963682,6,42,41,185
 379232,1054.1146473954936,9,57,46,270
 380388,1469.0427098039715,7,81,12,20
 381815,1257.9611348671588,7,57,12,303
 3821013,10765.3017525299,12,26,42,284
 383750,648.3347257879444,5,30,49,333
 384331,996.9383067882713,6,66,29,297
 38525,863.9043188687043,7,64,2,96
 386564,918.4941169580397,8,34,35,172
 387234,837.0999130985457,5,58,32,158
 3881043,6752.011204219161,11,77,16,156
 389539,1251.57320230361,1,51,38,163
 390807,1055.5334429084282,8,38,20,354
 391669,337.257547901747,6,26,38,242
 392913,1062.345920927689,4,58,30,5
 393850,867.2507612495456,3,74,3,228
 394637,1205.7926459904786,6,44,7,53
 395653,932.7778273612923,8,33,43,7
 396244,1216.4387985425303,7,41,49,229
 397313,1206.3540872470076,2,76,19,126
 398220,1020.4685348465806,7,27,5,219
 399541,1208.9230280162856,4,85,2,56
 400289,1070.247966933758,9,55,32,224
 40139,667.9534877753924,3,76,41,281
 402382,850.1518386389945,9,72,48,292
 40357,790.1956191943403,8,36,32,350
 404644,624.2142617204735,5,23,22,45
 40570,838.7200613487189,7,47,15,339
 406871,955.7631931264876,1,47,5,209
 407717,1028.5569121655099,3,63,30,153
 408589,1207.5839541360615,1,51,25,141
 409657,1003.4823229782365,6,49,20,130
 410996,929.7249267785113,9,41,2,110
 411414,1319.4192054746272,2,27,32,230
 412732,755.406805596242,4,73,37,259
 413821,870.6778874749069,4,25,48,202
 414905,1047.7747670049757,8,32,37,294
 415749,847.120549252013,6,25,28,269
 416491,998.0068396708457,3,70,30,181
 417953,687.115143952389,6,85,8,333
 418522,1135.8400480949838,6,43,22,88
 419375,1538.2956143778893,4,87,15,75
 420468,1189.3769275118264,5,51,2,305
 421899,1301.6272416270892,8,38,8,214
 42286,874.5607391038659,5,79,49,90
 423745,1129.4147551172807,1,34,29,53
 424598,755.3090710544232,3,61,20,43
 425595,1259.3849860644748,4,20,10,43
 426500,654.300067258916,8,27,27,280
 427989,944.758956542584,5,71,39,337
 428748,811.1542669116693,8,51,39,163
 429957,1085.681336594426,1,39,1,24
 430393,669.9416982448395,4,21,28,284
 431135,770.1439414415493,1,18,48,51
 432343,1061.2416427771807,5,28,49,238
 433918,1046.6522807890894,7,20,46,146
 43420,646.9240746661771,6,80,10,183
 435167,1205.5150399986226,7,26,39,71
 436968,1450.235108227704,1,22,29,178
 4371002,7209.505971600776,11,56,25,272
 438570,912.1216289896728,8,54,35,216
 439934,450.29851084497955,8,31,31,333
 440242,971.3158896332752,5,42,16,312
 441758,1046.2090309237185,2,54,4,172
 442240,1213.108333699056,5,79,42,102
 443504,1140.7423091726428,4,37,10,295
 444253,1530.5390492531583,3,47,5,349
 445362,1383.1847282506444,3,28,22,16
 446679,1233.9195982868653,5,88,20,364
 447455,867.4355954068898,1,47,42,315
 448816,628.609906740757,8,22,44,38
 449825,888.624369649807,9,45,4,221
 450685,694.4680477770137,1,28,17,345
 451904,1319.6129656518247,9,83,39,250
 452309,1136.7743452925095,2,81,9,73
 453124,649.5372343019299,1,21,40,89
 454139,1203.3793043424175,5,42,3,39
 455250,1101.245427740239,5,53,39,170
 4568,1191.858682288227,9,50,41,57
 457768,1442.7001589088775,6,39,28,243
 458329,1156.0299542630387,2,86,48,331
 459756,1658.0955162093478,7,61,26,237
 4601040,9732.117797411158,11,88,19,58
 461441,1096.0163622348268,4,30,7,146
 462903,1007.1862057337044,4,53,13,329
 463919,888.391596362368,9,80,30,66
 464307,1319.4162239471061,1,44,8,247
 465991,1052.0957019868881,1,31,17,300
 466987,1375.8495754417877,6,50,40,117
 467262,985.1186609845499,3,40,22,270
 468533,983.4800503381708,5,45,46,275
 469330,1157.08637731607,3,54,49,120
 470764,975.9850250688376,1,83,22,46
 47112,883.5675616074358,8,57,20,246
 472555,1084.4006655188005,9,72,3,356
 473851,844.214868393809,9,77,28,11
 474197,779.0356409497167,9,25,1,336
 475787,1208.480538637226,4,70,34,131
 476630,1273.5478796177372,2,42,41,71
 4771042,7950.33613741562,16,73,25,108
 478214,1162.8478128264496,8,56,45,127
 47985,797.8765992767031,5,33,7,302
 480510,792.2624708972405,5,41,23,245
 481354,960.0153675091432,1,54,32,71
 482397,571.7163677272806,9,89,2,318
 483883,877.6401393704444,2,89,49,171
 4844,1380.7574641020065,3,86,2,163
 485359,1080.6796400845224,6,53,9,140
 486552,961.0806911519801,6,46,27,279
 487257,1316.7277872966556,3,84,12,92
 488371,1006.1275435647357,1,37,19,283
 489223,1171.5650475936284,9,56,12,283
 4901004,9553.062290542735,15,27,20,172
 491451,984.330225681707,9,26,3,186
 492145,1064.9706985621058,4,25,48,181
 493401,601.3930853014083,6,80,20,145
 494813,1361.7444710884333,7,88,16,16
 495739,1416.3686111156442,8,72,44,214
 496721,1076.9504422230148,6,25,11,116
 49734,735.5722677610249,7,34,29,289
 498723,662.9536444735718,7,50,7,308
 499864,1448.9694182738804,1,55,35,257
 500364,1100.4279305247353,3,62,41,252
 501811,953.2820889596602,8,88,18,30
 502566,897.9811567446121,7,64,21,205
 503942,1218.1143320700362,2,57,35,112
 504505,837.3393577195433,4,49,39,224
 505960,1111.9271400043287,5,24,42,140
 506633,960.4980253552526,9,45,10,211
 507119,1285.7057036287551,4,68,43,306
 50835,1205.6362280257972,3,56,47,66
 509381,790.069539454806,7,87,18,123
 510990,1006.7214597486327,8,24,28,65
 511907,660.0359647550201,2,87,28,122
 512328,1197.915673490734,5,85,13,257
 513993,938.2056543698508,3,71,19,318
 514267,1408.1028259829088,1,41,23,5
 515149,1130.4853914042244,2,31,19,165
 516405,887.4836321301891,1,86,3,274
 517615,1611.4379949042066,4,30,38,109
 518977,886.9234201877308,6,76,45,301
 519526,548.7794748338703,8,25,35,75
 520675,648.1220763205447,3,45,44,187
 5219,882.631403516262,7,33,5,287
 522293,852.6588107639471,8,51,47,232
 523378,1045.835501434588,4,43,46,269
 5241022,14708.189418527656,10,35,22,74
 525910,1540.813680826365,3,56,2,347
 526143,598.1291913596931,1,23,18,248
 527523,834.3440602635383,6,35,6,321
 528736,1118.1493706032606,7,28,40,121
 529443,483.13947499003086,5,22,9,162
 530982,1106.3643904462413,2,86,11,93
 531624,1336.3550115387443,2,34,23,325
 53284,870.4324454315881,7,72,4,363
 53319,772.9939811196973,6,89,3,359
 534830,929.5538477848731,7,84,45,254
 535703,823.9140773643102,5,71,17,97
 53651,1081.0209923486987,5,43,6,104
 537373,1362.7859019487605,2,63,41,348
 538246,916.3746910397629,2,45,9,196
 539123,1350.6985777340249,5,68,45,331
 540707,679.8926618759292,7,44,15,64
 541524,1142.6496671482898,5,55,21,11
 542890,1277.1758951457268,3,51,15,143
 543805,891.3759431419211,9,73,9,155
 544356,749.3676588405478,5,45,16,190
 545192,1214.099698580868,2,29,43,12
 546642,1417.2553813223483,1,51,12,98
 547238,1046.613578692357,5,72,42,70
 548509,1012.1304069862067,2,70,32,302
 549339,1103.2328635689062,6,68,26,345
 55078,925.2481623835331,1,58,25,24
 551671,1311.5212981244072,1,73,36,101
 552322,1148.7892563592284,9,35,13,10
 553268,642.4646555098418,4,56,13,111
 554183,732.2768754847219,9,28,28,4
 555276,1115.5258685658177,4,73,40,213
 556654,723.3685228145824,8,60,15,28
 557380,797.9254286612121,9,69,40,179
 558304,1152.5925663583662,2,62,15,29
 559254,1258.1163151377868,4,77,42,121
 560650,1174.0515912033545,2,24,20,193
 561622,1117.867089283999,4,42,27,200
 562741,539.7814421670887,2,23,40,27
 56387,1228.8505294255185,6,65,9,17
 564457,973.2424100113606,1,20,22,351
 565282,1165.5326686302617,1,46,18,266
 566556,897.0307584693832,1,27,45,145
 567140,692.2839208915111,5,34,33,100
 568596,872.4959002863133,3,45,43,168
 569833,748.964808311983,8,57,37,345
 570810,776.348174445124,5,77,21,186
 571514,773.1090844896005,6,21,37,184
 572936,874.4864439118472,4,78,30,326
 573954,1360.941151018315,3,61,8,278
 574436,1018.5236951049438,3,42,35,136
 575301,792.751247269482,4,47,39,46
 576121,1197.7579867607617,5,37,42,266
 577711,1052.7543668006547,5,63,20,51
 578909,1161.3710452852688,8,40,16,265
 579677,722.3560386335428,7,34,43,51
 580581,1084.6241018736036,8,48,43,148
 5811021,5674.915651411771,12,37,19,283
 582729,865.0600799226596,1,33,10,53
 583233,1011.3929599759534,3,19,32,170
 584872,800.4256888653865,2,79,25,235
 585336,963.2356546244654,8,20,7,242
 586148,669.8858467289309,8,57,38,21
 587134,1118.3981076587954,4,72,43,30
 588487,838.3567789393684,9,70,47,194
 589731,1048.9613137744204,7,65,15,117
 590200,714.2574255423442,9,47,38,121
 591779,981.3916427249884,1,49,48,305
 592144,1046.1584646330762,3,44,30,190
 593900,795.7660822531909,8,82,8,196
 594118,707.830490595117,6,38,17,187
 595266,688.0542045087876,2,50,37,211
 596668,1375.9982471456722,8,21,49,259
 597561,1072.4437142241031,2,50,16,331
 598814,1049.1386941278936,3,43,9,38
 5991009,8071.325886946268,17,21,25,35
 600408,964.4051287446766,4,78,14,317
 601302,859.9547399507576,7,76,47,255
 60246,820.0389479013229,3,36,2,194
 603308,852.1071527910425,7,63,43,24
 604355,995.2459480243278,2,25,26,262
 605734,574.3540989405399,8,76,3,304
 60649,1085.9045723921154,7,57,22,270
 607177,1003.2504729694767,2,58,38,196
 608588,787.5389076338021,8,62,19,86
 609651,1462.2390237363363,5,74,48,339
 610450,735.1966195277621,2,40,31,321
 611131,612.3341422334668,2,84,33,183
 612480,1279.893727858644,5,72,12,259
 613629,1013.9312280721737,8,60,23,88
 614632,1382.3875798651534,9,82,41,128
 61592,1242.1612476332223,9,81,36,150
 6161050,11419.392692715172,18,86,19,236
 617728,1086.8954263404178,4,58,24,117
 618795,729.7358648979343,7,76,40,7
 619531,1159.6481146943436,2,81,6,225
 6201025,6604.174789475594,10,21,16,77
 621155,1073.2681183246702,2,78,38,272
 622932,1470.2892673601475,7,75,10,8
 623205,655.5826580107273,6,83,48,326
 624937,744.6917957173217,6,21,33,14
 625620,1055.9710060697828,2,27,11,290
 626107,1471.5464753026326,4,62,25,36
 6271020,8624.668124699272,17,22,5,114
 628376,808.1631092779876,8,34,3,100
 629404,1011.7451484411855,7,76,29,44
 630338,919.6535395867517,4,49,5,186
 631917,1151.9741274291348,4,69,29,348
 6321012,10096.267456239399,14,26,28,133
 633433,932.6482913888606,1,84,39,289
 634988,1219.3405726439178,3,30,19,337
 63573,991.0434902225121,6,50,21,293
 636529,1064.9306254303706,1,86,46,9
 637914,1394.3633199408687,3,30,39,110
 638557,878.0984439818766,8,64,27,215
 639687,939.9186504604662,8,89,16,114
 640496,1134.7275109211646,1,72,28,29
 641820,1266.3700937663377,9,32,35,277
 642274,1002.5582652548968,1,85,45,336
 643786,1270.1951813886553,5,62,42,3
 644152,1086.6120523742438,9,73,46,7
 645341,794.4449011083922,4,38,3,261
 646168,1474.198245663487,8,54,49,142
 647978,394.0301683427608,2,50,8,248
 648368,1003.1481001954487,7,28,14,89
 649664,864.1438072165588,4,46,13,108
 650783,1095.0494627514909,3,52,31,0
 651337,793.6257008018721,3,59,13,17
 652649,942.2663674478305,9,75,14,336
 653901,1092.1683272182254,5,80,26,41
 6541014,11960.74942430654,10,43,6,125
 655730,805.4238186494218,7,85,32,115
 656887,1145.982046331491,8,59,36,84
 657722,572.4579018358436,8,61,34,45
 658120,1187.9832581716935,9,55,41,29
 659366,899.694882028541,6,29,41,7
 660424,1242.892737738589,4,74,15,337
 661344,873.2642061572176,1,85,39,303
 662429,1264.606121712397,6,43,9,164
 66341,1184.6166449988527,5,55,44,9
 664166,1103.1952317341245,1,71,25,238
 665117,991.3220575736892,9,39,28,359
 666427,758.7691348549739,6,36,36,125
 667176,1206.795812259006,2,72,43,5
 668101,646.1573144873964,3,78,38,60
 669537,784.8966586790119,1,26,40,320
 670962,1332.2881325331077,4,84,39,333
 6711033,7233.451473296811,15,59,14,314
 672512,987.4404726377157,3,47,24,236
 673444,977.7199901218029,3,77,28,340
 674215,921.1826888399136,6,19,47,238
 675980,1190.1036640360744,3,67,49,5
 6761028,12644.671319186846,11,25,4,20
 6771031,6886.198526246661,12,26,44,358
 678199,1014.5521796114999,5,63,14,162
 679801,1234.5709514939995,4,58,39,282
 680292,876.7497663352918,9,25,10,250
 681639,677.5097750647365,4,59,1,53
 682735,1257.2889093314109,5,79,37,6
 683961,1160.680689966886,2,73,11,42
 684498,952.415330479098,4,49,46,165
 685187,1118.3094061433862,3,57,11,241
 686861,1050.730755212825,6,68,6,189
 687908,1186.5633915068051,9,18,25,338
 688667,936.2556956447862,7,61,37,166
 689829,894.9532957260357,1,18,13,180
 690527,593.1143905292093,7,58,15,345
 691715,990.5913243937879,8,79,17,316
 692553,1291.9455154149518,5,50,32,109
 693894,1292.3238976114183,5,34,8,219
 694682,717.7370571956926,1,42,40,210
 695191,888.3712619832447,2,78,7,13
 696627,752.5987949353548,2,41,44,324
 69774,1391.1609139535017,3,69,22,252
 698743,843.7953555760803,3,46,46,312
 699983,758.2559642176967,9,83,24,268
 700824,909.2903598900853,2,63,39,267
 701670,1272.8767129806154,5,22,2,274
 702226,1272.2376492418416,1,87,23,193
 70390,1128.316858278339,8,52,1,213
 7041029,11630.30467863884,12,84,15,53
 705767,991.2528773757596,4,65,11,245
 706103,914.3213708683077,5,85,10,4
 707518,755.6111888003622,5,48,28,40
 708180,1680.0422916474047,8,81,43,216
 709270,1032.6851443215228,7,73,46,105
 710573,1081.7318434410406,7,65,31,147
 7111006,13611.218722366251,15,35,17,154
 712945,1461.6592490119165,1,44,16,207
 71343,971.0879294029398,9,89,20,322
 714594,1083.4155263217372,4,35,2,14
 715287,962.0537262411042,5,28,17,86
 71632,1463.0695461272344,7,63,39,236
 717314,1203.3774090001596,1,32,3,24
 718515,855.8071673579168,7,76,20,241
 719583,1158.1954665265712,7,33,3,242
 7201030,10330.84456838341,16,80,25,183
 721681,1180.4180160108087,8,43,29,42
 722169,938.6529709992824,6,66,28,309
 723733,1102.063188928618,3,81,20,74
 7241005,11691.619848248203,18,47,44,6
 725823,1574.7245309048126,4,36,16,107
 726579,630.3534385550396,5,30,32,122
 727897,958.2204799207864,4,69,23,264
 728547,1144.268031795135,2,73,27,100
 729154,1058.0634242902509,8,30,10,174
 7301001,12985.238124865378,19,65,31,41
 731720,985.7635940697331,5,23,46,50
 732631,576.8838425712952,7,77,25,246
 733898,1036.6784216083306,6,42,46,149
 734924,824.9697962652067,8,82,30,178
 735740,1253.5925162545327,8,43,23,278
 736959,1142.441820058051,5,89,40,189
 737950,1060.8348623306729,5,36,33,344
 738185,944.1343036685373,1,62,34,197
 739796,1263.288213333226,2,58,17,252
 740785,1139.94761198276,5,35,42,187
 741567,490.46886620553653,2,42,11,126
 742621,802.381386138672,5,52,18,132
 743548,949.2386534892519,8,68,20,155
 7441019,10414.333402162294,13,86,20,25
 74527,712.2516056444242,3,32,10,136
 74644,924.7240761026778,3,79,35,151
 747780,1155.1680243876694,3,88,23,229
 748461,1491.1812832290973,3,51,13,244
 749410,1128.6097085146873,4,39,4,355
 7501007,8488.34483126196,15,77,45,9
 751279,1017.4505212475048,6,64,37,192
 752920,1048.5224982245768,2,66,18,7
 75345,630.3695024081431,3,52,47,4
 754211,1142.7226276732918,7,57,21,163
 755855,1355.1260619974637,1,27,16,245
 75658,922.6969060371964,2,45,48,339
 757501,1231.5443868829104,1,89,36,95
 758751,769.1916884722739,4,25,36,34
 759438,654.9746354462771,6,18,19,94
 760129,1024.9128412719103,4,39,32,222
 761976,527.6148172636172,4,86,37,67
 762150,1074.2461683082965,9,52,36,98
 763652,1281.6412573869393,5,29,33,325
 764970,642.3062244704879,9,29,21,154
 76581,945.082028040622,4,25,1,112
 766915,976.176116903262,6,87,13,293
 767434,1179.3855639489907,6,82,32,76
 76810,1135.6400108964913,9,51,18,104
 7692,965.4339247072038,1,39,10,176
 770659,1049.5211901919638,9,89,38,162
 771608,688.8363241721457,9,71,5,42
 772778,938.1203411121238,6,18,44,137
 77316,859.4281176897568,7,87,49,251
 774590,785.9790435227832,5,26,4,316
 775206,765.5437400212193,3,85,29,362
 776452,1238.7855801253095,2,51,21,137
 777162,1196.771150935613,7,56,17,77
 778108,1043.6444532079597,7,64,28,55
 779922,743.3711751472349,5,72,43,339
 780693,729.7341681000257,2,69,47,210
 781391,775.3963321629105,6,68,36,26
 782535,837.0409730494603,5,82,29,59
 783699,1231.0067548017253,6,63,35,153
 784812,890.0672354314563,6,64,13,259
 785886,1461.6768314340084,6,48,17,184
 786992,489.56628289392734,5,36,6,174
 787586,1062.055146575084,8,71,21,197
 788956,1279.323957897032,7,19,12,133
 789841,987.6340725868918,5,51,39,85
 790538,903.8611139425436,3,44,13,123
 791680,1317.8887737485397,8,74,8,341
 79254,1152.9190722102169,5,68,10,281
 79361,880.2064405386775,9,80,36,86
 794492,1369.9860347225065,5,36,1,304
 795947,618.6187072688153,7,30,32,199
 796789,982.4585721353383,5,82,22,259
 797219,878.6591130427241,1,68,4,207
 798179,933.835791690511,8,30,36,304
 799321,1024.2489912481794,7,85,34,98
 800710,1424.1140920725095,3,38,46,327
 801994,829.5039380005503,4,37,38,75
 802114,1615.8105281213216,4,36,27,58
 803955,979.4622054018578,9,40,27,170
 804569,532.3020197435361,6,29,48,355
 805979,604.0242941285692,6,79,41,322
 806931,861.2001183267004,8,52,9,194
 807891,1205.120545299341,3,26,13,350
 808110,981.3885210584582,6,71,15,357
 809207,1128.758816802165,6,50,5,49
 810471,931.237075712089,9,83,12,224
 811398,1338.4680935413533,5,62,13,163
 812294,1212.4005242552562,8,65,36,328
 813963,1049.1302924253675,6,33,43,283
 814122,772.6531363013153,5,46,20,107
 815759,785.4105549546966,4,53,31,78
 816402,850.1562442615568,2,55,29,355
 817112,993.3715311376958,1,64,29,196
 818158,1118.4582302279468,4,79,46,140
 819543,1132.4510444788207,5,68,11,193
 820610,1374.0110778722958,2,70,12,244
 821554,1063.6052108253032,1,77,10,333
 822425,1161.3439873962868,2,64,48,4
 823879,995.894275981812,2,33,4,195
 824413,616.4714573160944,2,71,43,328
 825126,1547.6139064524946,8,88,49,219
 826212,1283.8914100451498,3,32,7,140
 827459,861.5876736632044,4,77,12,15
 828534,697.2459500593859,2,28,40,38
 829286,511.97805011937453,6,60,30,75
 830574,945.224867797784,8,45,14,17
 8311035,7341.7188028457385,18,53,19,178
 832828,869.284993211683,2,54,40,89
 833964,1177.2509393971281,7,68,31,145
 834831,663.8873722414307,6,41,17,252
 83583,1369.473511185379,2,58,45,111
 836852,861.1307202099363,5,71,3,117
 837384,868.5612445798097,1,79,32,194
 838536,1011.8496678291035,4,36,7,65
 839369,1024.419024637208,2,22,29,207
 840241,801.8698153918249,2,66,39,124
 8411000,1143.1456953390395,7,79,22,34
 84265,1203.1314555985496,4,55,1,245
 843840,946.5027889436228,5,84,4,151
 844411,1177.9037195222224,1,60,11,21
 845532,584.61998443276,5,46,25,175
 846966,1360.0293038623681,9,29,33,318
 847198,1038.4312764863819,9,42,3,99
 848691,909.75845854523,5,66,16,136
 849696,922.6133901715025,4,74,23,267
 850435,1375.589263024007,2,53,17,297
 851298,1076.8248802191524,2,21,28,124
 852844,1095.6024365460125,3,70,13,94
 853431,704.1853718335562,5,47,48,323
 854763,1640.0211345671987,1,59,23,105
 855521,582.6486797196571,5,74,37,159
 856846,1123.1128160020373,5,86,38,356
 857474,1341.7185668611312,2,73,11,46
 858797,990.1112115358362,3,22,15,291
 859363,972.8099628857856,6,71,16,62
 86052,903.7294298959209,8,39,15,180
 861817,1066.7625664673146,6,38,38,131
 862494,784.6789496679341,3,42,45,315
 86368,1250.883224473006,4,53,25,157
 864193,1053.523436032551,6,78,24,43
 865506,878.218654058826,4,31,15,332
 866470,856.04543983883,4,77,30,208
 867902,901.6652969181598,6,68,47,52
 868296,826.7726011848365,5,82,9,201
 869775,1155.4524905542992,3,71,46,209
 870618,1181.441655974673,9,19,11,250
 871146,1195.4557179443277,5,82,10,334
 872248,836.667691856572,7,71,45,59
 87371,1090.3489013771034,3,26,22,115
 874835,991.3287781533047,8,78,19,89
 875708,1438.6985454960911,6,32,31,354
 876826,1363.3461192794252,5,85,25,291
 8771017,12846.836935684016,11,32,18,151
 878762,1030.5024536613403,6,60,24,357
 879798,1170.3751743431562,1,82,42,243
 880499,781.0954366538107,7,79,13,283
 881182,785.7106108959293,8,36,15,302
 882658,993.9687282224992,6,25,30,187
 8831003,15767.552292384027,18,48,31,190
 884940,858.9803423158179,3,23,1,225
 885189,788.3015704828988,5,89,4,272
 886295,1089.2538714912619,1,73,34,278
 887171,777.6213925936191,6,34,37,268
 888229,821.174072685008,3,55,24,245
 889113,1015.0575524852566,5,32,9,72
 890694,1153.983901736066,9,71,48,239
 89118,1078.5618331488186,4,18,7,237
 892440,986.1130752758453,7,54,29,67
 89313,1060.4905678915086,8,45,41,187
 894965,977.5660764281934,5,89,17,314
 89556,1232.8200297790497,4,59,33,161
 896472,424.51970881610384,4,83,10,347
 897874,817.2674900145203,6,44,31,363
 898882,867.2828067699198,2,38,42,21
 899599,888.9266849809721,3,38,48,97
 900802,870.9888179456566,6,85,13,31
 9011047,5350.162845433485,14,40,18,195
 902318,922.433310851636,6,59,42,47
 903582,896.1780215247996,9,19,35,103
 904700,953.7744658892527,1,43,20,41
 905228,730.5638055176735,6,19,21,258
 906929,1391.3810073085851,5,35,19,15
 907105,959.6785720834977,8,82,35,180
 908106,1101.0127142036347,8,25,21,310
 909284,690.5461252932878,7,35,22,2
 910161,756.3295824431697,2,37,42,336
 911544,1360.392155164475,4,30,33,284
 91259,1082.815857850891,1,62,6,139
 913683,868.8699334300566,5,27,26,199
 9141049,7679.070825444451,15,68,16,245
 915997,1449.4216317123805,3,80,38,248
 916125,1146.7142734500676,1,72,39,204
 917260,1193.6585133573342,5,58,3,105
 918958,1114.188304788446,7,74,43,17
 919216,1189.7423051233168,7,80,20,323
 920513,940.2629882833976,7,80,20,21
 92197,1074.030069266144,1,37,32,344
 922895,1345.5397477593817,4,85,27,178
 923327,1289.527718375017,7,39,47,63
 924530,773.9208437238979,5,61,48,351
 925609,555.3199377739304,9,27,21,352
 926878,1055.9469879097246,5,56,22,209
 927251,684.7790114162387,9,62,22,172
 928422,1438.8352106108011,4,73,31,287
 929157,1466.4436277861892,6,63,27,89
 930439,574.1543901612113,3,32,44,134
 931674,907.1397835010521,6,49,8,140
 932278,849.9457807103013,4,82,2,21
 933726,954.0041659118302,4,45,20,268
 934832,770.3370133789505,2,44,49,256
 935342,1060.921802872978,8,61,7,363
 936612,986.1038322723863,3,64,49,354
 937875,991.7182567815507,2,68,21,94
 938265,936.8579621517099,2,74,47,201
 939834,808.0506087239679,4,80,6,86
 940697,1081.5332555605296,4,64,24,206
 941426,1342.1578893830872,7,52,25,342
 942709,479.5176480290695,8,78,30,231
 943713,863.7702282977625,4,23,12,266
 9441015,14921.190771066362,17,21,3,336
 9451041,12960.522864904227,17,19,49,326
 946617,1027.3486986512232,9,41,14,287
 947819,1020.570997318856,6,40,7,157
 948528,1012.0212366653454,5,23,5,200
 949448,765.0300534181612,2,83,16,180
 950660,963.9098970190144,6,62,3,196
 95169,1090.4090062619084,6,57,10,148
 952325,748.4956546250745,2,64,29,172
 953593,1119.744956436598,8,53,43,287
 954390,855.7740860843992,8,70,40,164
 955862,621.063971250692,7,64,14,116
 956482,761.1148898498935,2,70,23,18
 957935,1110.003612513333,2,51,23,332
 958975,888.4541416963051,9,45,38,219
 959132,1017.1407437015068,9,83,46,161
 960130,874.1310864709502,2,62,47,185
 961503,650.3581065452147,7,69,22,297
 962442,991.8263129764767,9,25,28,158
 963848,1613.8250349777236,1,79,28,248
 964273,1290.79093803874,8,24,23,95
 965939,1060.9501784427998,7,46,47,101
 966625,1398.2966566598493,6,29,11,94
 967128,858.425567599307,6,21,47,102
 968634,893.279732513145,8,33,22,342
 969306,1029.3318458271956,4,43,24,236
 970784,1152.6464363209557,3,34,31,235
 971485,810.9123136789242,2,34,49,170
 972291,947.9694374106812,8,86,14,112
 97322,943.5559248783661,9,21,25,209
 974757,1123.3294752202223,1,26,22,92
 975445,673.8826248737867,2,18,6,188
 976597,932.5312661766571,7,87,25,309
 977340,859.0688617990063,7,63,49,143
 97893,824.4867265306619,4,67,9,191
 97994,918.0844633505579,2,38,45,39
 980568,747.9784222706489,8,38,30,335
 981601,1189.247154161338,5,71,23,108
 982974,836.8440051744022,3,74,22,231
 983357,995.3717160019025,5,22,25,62
 9841039,10116.928577102117,10,69,30,213
 985386,1037.5984466190519,4,32,22,274
 986310,949.4518368915265,5,68,47,205
 987347,637.978914625669,9,41,17,187
 988392,1122.9797928766263,5,64,15,310
 98914,521.6799388355505,2,64,49,82
 990550,849.0037033210449,9,34,43,124
 991921,1268.407937464943,3,64,13,121
 992765,1287.3183315714189,6,72,2,180
 993704,647.88467590911,9,50,47,274
 994927,860.2695381821029,9,49,17,135
 995477,1144.1392407639416,7,56,17,198
 9961046,10097.886479532812,15,81,8,311
 997502,1477.3541601175325,5,71,7,265
 99882,1089.2781428779367,7,19,49,362
 99998,1065.2638180449724,9,84,32,179
1000349,820.388944686891,1,28,25,245
1001889,1147.6637076730774,6,76,1,250
1002334,830.7095721219721,1,70,26,271
1003236,1158.4797555795028,2,52,36,44
100479,1022.9401941338756,3,85,45,276
1005446,1167.4181372075095,2,53,29,338
1006546,800.7761861323809,4,87,48,11
10071048,8486.636491556797,19,46,28,34
1008781,1044.4252502333134,5,84,17,307
1009753,756.0316867556668,4,60,32,347
1010884,1261.040219267268,3,33,20,133
1011222,533.183701852063,3,68,4,345
1012256,878.9414817834372,6,84,17,3
1013928,1094.30296876613,4,85,40,342
1014701,869.3192448702401,9,22,37,10
1015352,1368.839054237388,7,41,29,282
1016488,729.6129990964013,7,30,3,11
1017984,988.0721609645051,5,64,49,196
1018866,903.0746100160039,2,58,3,171
1019361,1129.836628560293,2,81,29,42
1020973,1210.160887247181,5,22,6,136
1021559,1098.6130355945743,9,38,31,127
1022702,1262.2523064592224,2,69,42,293
1023387,1085.43899394429,3,44,6,105
1024591,1017.8915593048481,4,25,29,198
1025776,607.4438200273859,1,44,24,168
1026247,881.2636722097609,5,38,6,220
1027804,884.4311778237394,6,28,32,145
1028562,1518.8501996613597,1,41,13,149
1029271,1360.3183222665289,7,45,47,138
1030718,1037.5754403654694,5,30,29,357
1031663,991.8116824460004,5,84,30,211
1032892,1126.8185077768244,1,28,17,166
1033415,1083.078502994898,9,59,27,37
1034447,1091.649561524212,3,52,17,94
1035116,1075.3868355834031,1,69,19,1
1036611,1163.5914140885145,2,61,4,286
1037372,1124.4995728113624,3,58,2,117
10383,1161.922134525173,8,34,17,298
1039224,596.821032202587,1,45,27,351
1040209,1128.761921576512,2,36,10,354
1041383,469.02606892254823,7,50,2,284
1042165,1240.8440323110804,5,79,43,13
1043575,1207.3513952958724,3,58,24,293
1044690,1111.06582787151,9,82,7,76
1045843,719.3194946094254,5,66,25,100
1046172,796.0474287586404,2,38,9,240
1047967,830.9019244851826,3,70,32,91
1048464,1053.4949776835556,9,33,8,128
10491,1124.1785382528083,7,65,29,217
1050283,1396.504204036338,8,77,30,250
1051616,1032.3052954938069,9,54,25,189

Download Model Script

Script to Load Trained Model
 1import mlflow
 2
 3# Set the MLflow tracking URI
 4mlflow.set_tracking_uri("http://localhost:3500")
 5
 6# Define the artifact URI as a string (ensure it's correctly formatted)
 7artifact_uri = "mlflow-artifacts:/981188833218800573/ca50c2fee6194da689f5c05702d2091e/artifacts/model/model.pkl"
 8
 9# Download the artifact
10local_path = mlflow.artifacts.download_artifacts(artifact_uri=artifact_uri)
11
12print(f"Artifact downloaded to: {local_path}")

Trained Model File

Flask App Script

Web App to Serve Model
 1from flask import Flask, render_template, request
 2import pandas as pd
 3import requests
 4import base64
 5import io
 6
 7app = Flask(__name__)
 8
 9# Route for the home page
10@app.route('/')
11def index():
12    return render_template('index.html')
13
14# Route to handle the CSV file upload and prediction
15@app.route('/predict', methods=['POST'])
16def predict():
17    file_data = request.form.get('file')
18    
19    # Decode the Base64 encoded file content
20    decoded_file = base64.b64decode(file_data.split(',')[1])
21
22    # Read the decoded content into a DataFrame
23    df = pd.read_csv(io.StringIO(decoded_file.decode('utf-8')))
24
25    # Separate the 'claim_id' column if it exists
26    if 'claim_id' in df.columns:
27        claim_ids = df['claim_id']
28        df = df.drop(columns=['claim_id'])
29    else:
30        claim_ids = None
31
32    # Send the DataFrame to the BentoML service
33    response = requests.post(
34        'http://127.0.0.1:3000/predict',  # BentoML endpoint
35        json=df.to_dict(orient='records')
36    )
37
38    # Get predictions from the response
39    predictions = response.json()['predictions']
40
41    # Add predictions to the DataFrame
42    df['Prediction'] = predictions
43
44    # Reattach the 'claim_id' column to the DataFrame
45    if claim_ids is not None:
46        df['claim_id'] = claim_ids
47
48    # Reorder columns to have 'claim_id' first
49    if 'claim_id' in df.columns:
50        df = df[['claim_id'] + [col for col in df.columns if col != 'claim_id']]
51
52    # Render the DataFrame as an HTML table
53    return render_template('result.html', tables=[df.to_html(classes='data', header="true")])
54
55if __name__ == '__main__':
56    app.run(debug=True, host="0.0.0.0", port=5005)

Templates

Visualize Template
 1<!DOCTYPE html>
 2<html lang="en">
 3<head>
 4    <meta charset="UTF-8">
 5    <meta name="viewport" content="width=device-width, initial-scale=1.0">
 6    <title>Visualization</title>
 7</head>
 8<body>
 9    <h1>Prediction Distribution</h1>
10    <img src="{{ url_for('static', filename='prediction_pie_chart.png') }}" alt="Prediction Pie Chart">
11    <br><br>
12    <a href="/">Go Back</a>
13</body>
14</html>
Result Template
 1<!DOCTYPE html>
 2<html lang="en">
 3<head>
 4    <meta charset="UTF-8">
 5    <meta name="viewport" content="width=device-width, initial-scale=1.0">
 6    <title>Prediction Results</title>
 7    <style>
 8        table {
 9            width: 100%;
10            border-collapse: collapse;
11        }
12        table, th, td {
13            border: 1px solid black;
14        }
15        th, td {
16            padding: 10px;
17            text-align: left;
18        }
19    </style>
20</head>
21<body>
22    <h1>Prediction Results</h1>
23    {% for table in tables %}
24        {{ table|safe }}
25    {% endfor %}
26    <a href="/">Go Back</a>
27</body>
28</html>
Index Template
 1<!DOCTYPE html>
 2<html lang="en">
 3<head>
 4    <meta charset="UTF-8">
 5    <meta name="viewport" content="width=device-width, initial-scale=1.0">
 6    <title>Health Insurance Anomaly Detection</title>
 7    <style>
 8        .drag-area {
 9            border: 2px dashed #ccc;
10            border-radius: 10px;
11            width: 100%;
12            height: 200px;
13            text-align: center;
14            padding: 20px;
15            font-size: 20px;
16            color: #333;
17        }
18        .drag-area.hover {
19            border-color: #333;
20            background-color: #f0f0f0;
21        }
22        .drag-area p {
23            margin: 30px 0;
24        }
25        .drag-area button {
26            margin-top: 10px;
27        }
28    </style>
29</head>
30<body>
31    <h1>Upload CSV File</h1>
32    <div class="drag-area" id="drag-area">
33        <p>Drag & Drop your CSV file here or click to upload</p>
34        <input type="file" id="fileInput" name="file" style="display: none;" accept=".csv">
35        <button onclick="document.getElementById('fileInput').click();">Browse Files</button>
36    </div>
37    <form id="uploadForm" action="/predict" method="post" enctype="multipart/form-data">
38        <input type="hidden" name="file" id="hiddenFileInput">
39    </form>
40
41    <script>
42        const dragArea = document.getElementById('drag-area');
43        const fileInput = document.getElementById('fileInput');
44        const hiddenFileInput = document.getElementById('hiddenFileInput');
45        const uploadForm = document.getElementById('uploadForm');
46
47        dragArea.addEventListener('dragover', (e) => {
48            e.preventDefault();
49            dragArea.classList.add('hover');
50        });
51
52        dragArea.addEventListener('dragleave', () => {
53            dragArea.classList.remove('hover');
54        });
55
56        dragArea.addEventListener('drop', (e) => {
57            e.preventDefault();
58            dragArea.classList.remove('hover');
59            const file = e.dataTransfer.files[0];
60            handleFile(file);
61        });
62
63        fileInput.addEventListener('change', (e) => {
64            const file = e.target.files[0];
65            handleFile(file);
66        });
67
68        function handleFile(file) {
69            if (file && file.type === 'text/csv') {
70                const reader = new FileReader();
71                reader.readAsDataURL(file);
72                reader.onload = () => {
73                    hiddenFileInput.value = reader.result;
74                    uploadForm.submit();
75                };
76            } else {
77                alert('Please upload a valid CSV file.');
78            }
79        }
80    </script>
81</body>
82</html>

Supporting Folders