diff --git a/ActualProjectCode/DjangoProject/records/Synthetic_Data_For_Students_model.json b/ActualProjectCode/DjangoProject/records/Synthetic_Data_For_Students_model.json deleted file mode 100644 index 8ba87ac711b161dfb793a2a02f60028d69f24eaf..0000000000000000000000000000000000000000 --- a/ActualProjectCode/DjangoProject/records/Synthetic_Data_For_Students_model.json +++ /dev/null @@ -1,1037 +0,0 @@ -{ - "scaler": { - "mean": [ - 12.946871008939974, - 181.92337164750958, - 3.7425287356321837, - 0.0, - 12.17097318007663, - 461.1959335887612, - 0.32692209450830145, - 51.7488275862069, - 9.026819923371647, - 0.11011238825031928, - 30.70928991060026, - 0.02457215836526181, - 3.6919642401021715, - 677.3231162196679, - 10.331162196679438, - 6.7753742017879945, - 1.9279144316730523, - 11.20017369093231, - 182.60685057471267, - 1.0449553001277139, - 1.7136653895274585, - 1.8130268199233717, - 1.4630906768837804, - 1.6245210727969348, - 1.952234993614304, - 1608.990293742018, - 2494.1826309067687, - 9.539463601532567, - 48.85031928480204, - 2.455427841634738, - 2.505236270753512, - 2.509067688378033, - 0.5014048531289911, - 0.47867177522349935, - 1.0150702426564495 - ], - "scale": [ - 5.349328246337572, - 81.1425704144229, - 91.95625100749062, - 1.0, - 80.58249736627673, - 765.4703274562678, - 14.433979504805459, - 403.32023905292795, - 67.63736259174597, - 1.3973063075525798, - 261.8970756676678, - 0.7012770978075572, - 112.36702668067794, - 391.43556278200884, - 47.00624642117716, - 129.98477636898568, - 12.898004647168264, - 46.697049274587236, - 222.7357515292838, - 0.2859359247219931, - 0.4993019141219001, - 1.4647092155530934, - 0.5484022078370846, - 1.2416820027350361, - 0.8594851207248151, - 927.6270636707662, - 1431.6434843433647, - 5.663818370790911, - 17.56715476286791, - 1.097422052712229, - 1.8384736475839618, - 1.8352604359339202, - 0.4999980263837908, - 0.49954489971161053, - 0.815574898611261 - ], - "var": [ - 28.61531268706501, - 6584.116733459579, - 8455.95209935262, - 0.0, - 6493.538881785997, - 585944.8222160058, - 208.33976434514403, - 162667.21522971094, - 4574.812818367317, - 1.9524649171262245, - 68590.07824327613, - 0.49178956790939016, - 12626.348685056188, - 153221.799810468, - 2209.5872026084303, - 16896.042087695216, - 166.35852387837411, - 2180.6144109532283, - 49611.215009314845, - 0.08175935304662131, - 0.2493024014457933, - 2.145373086126158, - 0.300744981560589, - 1.5417741959160904, - 0.7387146727473499, - 860491.9692544477, - 2049603.06626281, - 32.078838537308606, - 308.6049264625527, - 1.204335161779122, - 3.3799853528606776, - 3.3681808677043628, - 0.24999802638768595, - 0.24954510682788303, - 0.6651624152447686 - ], - "feature_names": [ - "AccidentType", - "Injury_Prognosis", - "SpecialHealthExpenses", - "SpecialReduction", - "SpecialOverage", - "GeneralRest", - "SpecialAdditionalInjury", - "SpecialEarningsLoss", - "SpecialUsageLoss", - "SpecialMedications", - "SpecialAssetDamage", - "SpecialRehabilitation", - "SpecialFixes", - "GeneralFixed", - "GeneralUplift", - "SpecialLoanerVehicle", - "SpecialTripCosts", - "SpecialJourneyExpenses", - "SpecialTherapy", - "Exceptional_Circumstances", - "Minor_Psychological_Injury", - "Dominant injury", - "Whiplash", - "Vehicle Type", - "Weather Conditions", - "Accident Date", - "Claim Date", - "Vehicle Age", - "Driver Age", - "Number of Passengers", - "Accident Description", - "Injury Description", - "Police Report Filed", - "Witness Present", - "Gender" - ] - }, - "model": { - "feature_count": 35, - "segments": { - "5": { - "intercept": 878.0623529563934, - "coefficients": [ - 6.116104349578777, - 40.432281066726794, - 8.100187187665142e-13, - 2.8421709430404007e-13, - 81.3541246257251, - 380.6229557901644, - 1.421085471520206e-13, - 367.68915649350765, - 57.526449705172816, - -8.5265128291201e-14, - -0.15739099754736327, - -1.9895196601281891e-13, - 1.4210854715198929e-14, - 35.411241371413674, - 258.84545063395535, - 118.95656567131932, - 36.5243457171928, - 117.40976205557776, - 161.24278845742887, - -41.41466194996155, - 14.840486527985293, - 2.711650003156543, - 0.9345066943579755, - -6.310642068099133, - 4.228814934025035, - 11.974891003578538, - -12.602698425221895, - -6.395547009543318, - -1.4979989315091582, - 2.0999357438999557, - -1.0352021881091613, - 0.05074786148326251, - 4.914082301207712, - 7.505412775226669, - 0.4070734419830784 - ] - }, - "6": { - "intercept": 1409.794010696346, - "coefficients": [ - 2.186749830022645, - 208.47827489340682, - 2.192024339819909e-12, - -1.0480505352461478e-13, - 56.279593955968295, - 600.4007003677222, - 6.998845947237029e-13, - 141.99323400846953, - 1.7768314871564959, - 13.028959397196266, - 146.21785848559267, - -4.97379915032067e-13, - -1.9895196601281785e-13, - 559.3520544525416, - 28.21906755714904, - 64.37047882675715, - 75.54421230718371, - 40.065653983114004, - 134.19839356312244, - 19.117210359816024, - 3.1954914934723595, - 11.469688028049353, - 1.287141414321294, - -7.3571709306220665, - 1.0435840426853797, - 27.61599124890956, - -25.97837969126033, - -6.409971279423396, - 1.1908022223096406, - -7.137966084055578, - -8.901033389862475, - 3.510556415933983, - -7.120055091301897, - 6.23575040483813, - -3.8488284489793045 - ] - }, - "8": { - "intercept": -184.19020638362122, - "coefficients": [ - -15.595705057604885, - 283.23194606969406, - -3.1015190415928373e-12, - 8.100187187665142e-13, - 65.91569862706298, - 927.7356281052149, - -1.6484591469634324e-12, - 1024.7921504130911, - 141.24301615505846, - 8.242295734817162e-13, - -1309.4222441308616, - 1.410427330483799e-12, - -8.242295734817165e-13, - -492.633187046111, - -5.400124791776781e-13, - -1116.4509006644644, - -8.24229573481725e-13, - 44.617287204591264, - -769.6967516865262, - 2.842170943040505e-13, - 88.69036476355767, - 48.398025477314555, - 27.17227450672486, - -17.269348423531085, - 76.77969674863014, - 117.85066213653926, - -135.25441846393477, - 65.8177258648505, - -13.247970420755712, - -135.64325820012613, - -196.91763101152108, - -124.76757389976179, - 70.24524737967373, - -18.38561088572981, - 45.980028375785125 - ] - }, - "9": { - "intercept": 738.0663212391023, - "coefficients": [ - -52.11107535289124, - -25.26165783896053, - -9.734435479913373e-12, - 5.417888360170764e-13, - 110.68721454176723, - 496.95569840115866, - -7.560174708487466e-12, - 413.3170408430411, - 79.97591680533334, - 4.173656490506696, - 243.38525485173093, - -4.547473508864642e-13, - 128.426816580465, - 482.97217117664104, - 236.68396687796445, - 1.1368683772161724e-13, - -3673.220157470919, - -94.8797509302296, - 103.49435115054186, - -28.985194908940212, - -122.03000119335684, - -30.767778094021903, - -16.114436027572825, - 25.734653867714208, - -17.801184558760387, - -83.20413474940737, - 65.20141551039326, - -54.588044485404, - -15.404219614396638, - -11.637841805331725, - 6.869594851364319, - 45.82418851311788, - -35.664346618567116, - -13.755742892538132, - 47.3345331302047 - ] - }, - "12": { - "intercept": 1103.1462053204798, - "coefficients": [ - -9.13177921771231, - 241.66041092208158, - -3.1263880373444403e-13, - -1.9895196601282805e-13, - 18.743534826253168, - 423.6429437797858, - -2.557953848736357e-13, - 7.105427357600994e-14, - 72.53818155769153, - -0.6480610887332982, - 56.21896567954456, - -2.934034150205843, - 112.35945582585113, - 39.596207207837715, - -46.07712511185513, - 112.69153767227829, - 26.65155178231381, - 41.00248552860201, - 151.20045426680736, - 32.95374622057231, - 2.2994150305440613, - -8.466720484906176, - 0.722656392863475, - -0.7607262242484654, - -5.648911597800758, - 12.525906368049515, - -4.629366056905252, - 2.6530879180730373, - -2.5933691179592633, - 9.437254055383358, - 11.380973630866446, - -1.0273536358123436, - -10.406361517661104, - 8.948933797993348, - -15.159007659358018 - ] - }, - "13": { - "intercept": -3292.2470689662878, - "coefficients": [ - 451.4470281727279, - 208.43620540245996, - 5.404103831097018e-10, - 8.185452315956354e-11, - 130.51123034967708, - -3.756752094149311e-10, - -1.892178920843591e-11, - 446.0894624518124, - -1.2670398064074107e-10, - -1.0535042168230155e-10, - -11136.94787089046, - -3.2900295542880775e-11, - -9.08647038306091e-11, - -1719.156350094867, - 112.04406810761934, - -8.349554899683348e-11, - -1.0592707011881687e-10, - 254.0354589346097, - 1362.084252605439, - 177.10971302919262, - 28.62134087361508, - 44.45633834063758, - 3.680533093150048, - -92.02669586346912, - -12.670243440333598, - 14.720926308387261, - -35.666612557783616, - -41.8578232907986, - -14.0768834167719, - -86.29944168953044, - -56.029421343852974, - -10.926847255710584, - 22.824983890284955, - 8.770869200622158, - -5.51042548488061 - ] - }, - "14": { - "intercept": 2229.651992821832, - "coefficients": [ - -401.607807128085, - -16.193415822631728, - -1.023338878051419e-12, - -1.0231815394945443e-12, - -3.981018946865181e-13, - 781.4232346186717, - -4.49126739549914e-14, - 101.30921498048022, - -9.592326932761353e-13, - 1.0273400609662017e-13, - 236.25838092042753, - 1.636342101888316e-13, - -1.8474111129762605e-13, - 338.80198148459255, - -7.556609886213375e-13, - 2.3869561188075074e-14, - 165.16950022839262, - -201.99980951215957, - -349.8320357998684, - 2.7713151241103116e-26, - 24.165579307582785, - 3.3694912514976973, - -2.0053306272446716, - -7.154352153195744, - -17.067542324405505, - 9.22681212405753, - 22.06838445657036, - -38.12541492595991, - -12.776590449156688, - -6.229879945428845, - -0.056258006785844604, - 17.959519789819108, - -0.9721703814263805, - 22.325605261869228, - -30.945515931163236 - ] - }, - "18": { - "intercept": 1417.428860176343, - "coefficients": [ - 6.550654445239183, - -21.653568132444832, - -23.887649222487862, - -4.547473508864641e-13, - 54.35947007453834, - 356.16537992886657, - -13.262357453887955, - 265.26026723882444, - 162.38787345035814, - -8.260493250250283, - 160.64876304099434, - -4.263256414560682e-13, - -2.273736754432554e-13, - -50.00323211498825, - 3.064500197203988, - 231.88047403276164, - 45.63918170683272, - 24.234140480355304, - 185.2093269960067, - 10.2375675955381, - 25.112723361221118, - -2.8008059996583285, - 4.8113885272570736, - 2.3635819791047745, - -10.775438659373224, - 7.605435203115451, - -9.204302470053996, - -13.599734503608873, - 15.418413336645672, - 8.418935936929694, - 1.2901741822339374, - 10.21445712301227, - 1.66900053629371, - -2.510615674098921, - -1.5068505521107438 - ] - }, - "19": { - "intercept": 1175.0075177720714, - "coefficients": [ - -19.0595713500723, - -143.71851229989443, - 98.72896209452517, - 3.836930773104541e-13, - 31.13515524556229, - 291.12878904345433, - 3.1263880373444413e-13, - 337.99485980547763, - 48.00898249244193, - 1.6342482922482332e-13, - -114.69448182479105, - -3.6948222259525215e-13, - 4.263256414560546e-14, - 479.62172820623505, - 2.3879979950000387, - -144.49863110253332, - 20.540179079434456, - 83.94255818859703, - 175.8468981792175, - 34.61522997223629, - -3.3155371715731565, - -22.005686379448434, - -0.2958057363015504, - -4.0986847439574, - -6.690775575984232, - 7.584746892703809, - 16.162130260325185, - -26.87608944372631, - 26.954775997346808, - 9.968125607465545, - 22.02881629838883, - -14.529675228143358, - 1.8678604647189083, - -0.35528466842582596, - 18.578970331733604 - ] - }, - "20": { - "intercept": 1144.1845100350126, - "coefficients": [ - 1084.4371428314696, - -1336.8279879748418, - 3.435457158508874e-12, - 6.3717919829286984e-12, - 3.1927349604805866e-13, - 1570.1993830517165, - 2.2741403540032303e-12, - 349.57966511180445, - -286.8987478035645, - -1.870126486868253e-12, - -2824.991504767223, - -8.555988935276584e-13, - -8.130819496392511e-13, - -205.02136183025345, - 1485.2782685065156, - -11.89951958299772, - -352.87426687278185, - 259.3731984685604, - -1021.7331099446263, - -1119.3854378399092, - -2493.0162081744284, - 532.3336710904613, - -1379.0125270045623, - -900.4796377462781, - 112.0934218105572, - 123.24263282086065, - -658.2094822438773, - 1663.358507619312, - -1165.014704810613, - -1603.071170095533, - -264.36559708489426, - 536.1966238340584, - -1283.1845586089298, - -1242.4884546253236, - -846.6099155248468 - ] - }, - "21": { - "intercept": 955.8669101747641, - "coefficients": [ - -104.42509202665664, - -0.5560829613003804, - 8.035814570397125e-13, - 1.5347723092418164e-12, - 107.01158619516909, - 84.88684809144347, - 1.70092812141776e-13, - 1.1161439263521393e-14, - 70.1857685297316, - -1.663395122584959e-13, - 6.492104379518528, - -8.121142470759869e-13, - 5.579031176588729e-14, - 365.1284393943449, - 1.6657938430862035e-13, - -1.540931350835729, - -2.842170943040401e-14, - 18.58102755532939, - 267.62240946933713, - 7.07215247685007e-14, - -17.08601947449402, - 85.48105060010495, - 8.648856639147484, - 23.256472773930675, - 36.3390772041839, - 75.18955787507427, - -2.578085564732146, - -1.0607921706946277, - 32.37156701675927, - -66.2617475640706, - 54.401500861370735, - 52.762433503130616, - 63.707737000463354, - -28.36827506582663, - -43.96518312224735 - ] - }, - "26": { - "intercept": 1348.6743308297773, - "coefficients": [ - -13.265446114609805, - -17.639349100217586, - 2.2026824808563106e-13, - 3.836930773104541e-13, - 85.51865529806595, - 248.8695039972437, - 11.56069296342581, - -99.0502575698584, - 9.02260032242437, - 21.550226994160017, - 182.53335024077035, - 4.902744876744648e-13, - -201.54128735124596, - 320.4042469060683, - 14.799703939272593, - 7.287231842574361, - -54.0741334711294, - 44.003456098036246, - 168.25454554588495, - -8.340254228634905, - 6.561393150906607, - 15.7812834478734, - 28.769247043932207, - 18.764721084508707, - 7.296644252077782, - -5.454699447666504, - 31.85772135659351, - 23.23691816268482, - -1.7010255387895155, - -11.875139538612524, - 44.0569388713497, - 10.77329217185782, - -1.554036496327822, - 10.316541809939686, - -22.235846679400794 - ] - }, - "27": { - "intercept": 1811.4908101374285, - "coefficients": [ - -349.04500441438455, - -504.2154013425553, - 2.1991372705402027e-12, - -1.7337242752546445e-12, - 1.6221245233357715e-13, - 421.7003698672506, - -3.4122077856003877e-13, - 354.649869949199, - 8.526512829121202e-14, - 6.334142595034023e-13, - 4.742031998626474e-13, - 7.348400138424669e-13, - -3.027034028878623e-12, - 214.7954428473687, - 733.4620884828447, - 2.494688096057986e-13, - 0.0, - -454.39326791826346, - 1874.3883068999066, - -540.41749019016, - 162.3476060783369, - -67.25068948943888, - -131.84121991109757, - 33.722360839110735, - -122.8021762309508, - 98.93010389642207, - -57.262171383197284, - 32.386320614518304, - 61.34348694989375, - -66.53685320680125, - -181.86478503400312, - -69.69426669807068, - 41.51513938569053, - 74.12085508576627, - 20.84706712168088 - ] - }, - "29": { - "intercept": 4414.913420648055, - "coefficients": [ - -457.42206971850965, - 82.46521759109979, - 3.199710677642414e-10, - -1.4134116099739913e-10, - -2.3925394998514093e-10, - 491.7133630161794, - 5.371589097440355e-10, - 18157.53353070874, - -25.822275380862806, - -4.785789542438579e-10, - 19968.88268869283, - 1.4393357916931738e-10, - 1.6180582786849953e-10, - -987.4097504920417, - 4.0776412141122746e-10, - 4653.158218854402, - -1.2592432439997112e-10, - -6483.486845972438, - 801.3740645521959, - 157.51413276972306, - 298.66637175336655, - 172.6900490037118, - -137.46227191944774, - 87.8875155173808, - -144.7307176884984, - 377.73474041755935, - -387.55054352411014, - -54.35587365418473, - 6.479607592784998, - 20.53876304100901, - 70.21155560366266, - 158.93800365315863, - -55.50063001680013, - -278.0638214027028, - -22.70869265796574 - ] - }, - "30": { - "intercept": 2014.4684961606047, - "coefficients": [ - 30.189806672589974, - -26.243386108673434, - 86.07980347500383, - 8.895995051716454e-12, - -858.8275606304842, - 116.57413940616841, - -64.00223385147372, - -85.65855458463541, - 66.59738248217553, - 23.061813626267952, - 396.56591439242146, - 5.684341886080814e-13, - -1.1368683772161335e-13, - 192.48002063408097, - -105.62485823837933, - 4.547473508864598e-13, - -617.2920301115487, - 9.013848092435158, - 470.1958297580541, - 121.66104385138011, - -3.979039320257981e-13, - 0.7159144238481375, - -11.835853788140428, - -52.819748599477094, - -37.51527883728675, - -103.43771935049232, - 111.68753739571696, - -18.909184310316, - 38.74944734059547, - 18.901220275459906, - -41.30723092579305, - 5.235026992941915, - 34.66860942406377, - 3.7888363074608042, - -30.539628879089122 - ] - }, - "32": { - "intercept": 3718.163760532948, - "coefficients": [ - -166.0318927474426, - 13.12331207576061, - -6.789556544768405e-13, - 8.100187187665142e-13, - 2.956921295318536e-12, - -287.7121445759436, - -1.506232466072976e-12, - 2.84817175083035e-13, - 535.3649739469349, - -1.4916643187232707e-12, - 693.3139704060502, - 1.391144438029561e-13, - 9.520098540462075e-13, - -120.74710672586613, - -6.904787860425204e-14, - 0.18996085039290458, - 9.094947017729282e-13, - 1824.6514134860286, - 185.89288146091178, - 577.9967688823532, - 253.44674894822293, - 130.43449990490595, - -457.7620183864552, - 709.7749746826838, - -274.8772674190041, - -902.5761102907943, - 821.4924565772624, - -308.7652832501821, - -14.568896699963478, - -286.77006764328604, - -47.804302241971094, - 57.57717844774736, - -400.22838048641484, - 37.21488221155518, - 102.49373470998967 - ] - }, - "33": { - "intercept": 7762.616463981691, - "coefficients": [ - -1828.1361024201403, - 692.9035391474858, - -3.126388037344441e-12, - -7.105427357601002e-13, - -131.82395983897194, - -853.2373427446935, - 1.6484591469634324e-12, - -26.795693540169744, - -78.89245341789419, - -2.2737367544323183e-13, - -7.711441611894248, - -2.2737367544323153e-13, - 1.1368683772161765e-13, - -1413.0123554118766, - -238.64009932281377, - -3.2721728539557837, - -9.237055564881464e-13, - -2.729775194335354, - 2087.5801465218105, - -148.60257810366548, - -314.70590877437627, - -27.010062873677448, - -221.81938268328653, - 57.22609904922225, - 68.5196013090537, - -23.004572615860898, - 111.95477658666377, - -184.95098784697976, - 152.9691862425638, - -78.64062824723018, - 124.09258441197969, - 82.73427910261579, - -146.06449140113, - 27.396778423099448, - -10.92877915176625 - ] - }, - "36": { - "intercept": -1364.075579924233, - "coefficients": [ - 407.3868225396571, - -338.9159833249844, - 2.6964734193532497e-13, - 2.3874235921539366e-12, - 153.26781731813435, - 688.0588643963165, - 1.786644310128696e-12, - 18.711925347707965, - 1.2585488207150775e-12, - 5.3982843362749755e-14, - 576.5711914725579, - -9.496408524487318e-13, - -4.2380895512194586e-13, - 136.9835563748052, - 426.67601555066364, - 849.100395557852, - -232.46757204100595, - -67.25291710441313, - 1293.7982283677718, - -138.98501519107427, - 1039.5481957123964, - 756.3147753934047, - 178.82140787854652, - 23.723173635628115, - 6.101805095248935, - 880.4826442519088, - -570.6583429944569, - -306.4902182293142, - 79.75178965841798, - -892.1800876577261, - 26.999394394609265, - -3.5713821547239077, - 220.0912506761294, - -292.20892795293, - -121.58833435371679 - ] - }, - "38": { - "intercept": 1521.4143162605328, - "coefficients": [ - 20.35530746292858, - 75.01067021749088, - 1.9915523351662026e-13, - -7.105427357601002e-14, - 5.78312057014537e-14, - 233.9691933159785, - 1.4277003660661356e-14, - 283.43005839173526, - 62.46520316994506, - 1.6928947818280142e-13, - 3.7153894407460086, - -2.8852037061715615e-14, - -1.4654943925052066e-13, - 50.835288905663965, - 5.743844004015907e-14, - -6.080840112781333e-14, - -134.74132158274915, - 78.6889693652253, - 319.59974071627033, - 1.0259496308398942e-27, - 557.9632459905288, - 0.6254541376877154, - -30.959858985060045, - 8.522290965081536, - 47.089100372664376, - 175.69093377321025, - -190.55814279458198, - -34.72127432335955, - 13.4579668880881, - 22.76416593125809, - 32.15691950642376, - 0.21356917267143694, - 40.077279824319994, - -24.938667662967916, - -30.13373790573012 - ] - }, - "39": { - "intercept": 2454.8854652400296, - "coefficients": [ - 97.1664443801963, - 822.7346376242434, - -2.3874235921539366e-12, - 8.135714324453147e-13, - -15.950124317162828, - 306.1214509613869, - -5.684341886080801e-13, - -462.4954528084028, - -163.67366742466965, - 7.958078640513122e-13, - 4.135855483019344, - 8.952838470577262e-13, - 5.115907697472721e-13, - -110.22735784593579, - -768.7718008821065, - 1.023181539494544e-12, - 69.72721228641976, - -9.814985243457395, - -72.15977973103377, - 731.5164672712614, - -798.5889753194723, - -45.27614605563829, - 34.95044344230978, - -30.859056968314675, - -54.55567808764315, - 25.709958169486246, - 44.30059951724976, - 87.96439912980404, - -0.8373120964109309, - 23.934513325808677, - 8.05611468541077, - -43.69117345929655, - 13.289962965471833, - -30.46700235364152, - -57.93685207657888 - ] - }, - "41": { - "intercept": 10162.400106891233, - "coefficients": [ - 596.7296170878489, - -2303.1768011850536, - -1.2764090260557861e-11, - 1.127808957335219e-11, - -195.75990343771548, - -780.3711618616518, - 3.510081114654895e-12, - 306.5016828707446, - -465.70688926881024, - 1.5336072112227413e-11, - -2380.269345462511, - 6.943487699322929e-13, - -7.260232050990469e-12, - 1582.3698546705937, - 947.4701676759352, - -1.5652715157246704e-11, - 680.5819570027587, - -958.8434827077389, - -2073.787724226939, - 114.13059745701753, - -973.1791159347641, - 225.8788536939875, - -188.85720819608346, - -312.7637111719046, - 33.79737710378861, - 901.7471885139033, - -602.7362526160006, - 204.72475626575098, - 355.6168616005138, - -56.531928343277094, - 0.6192969740159044, - 41.05826465258411, - 23.653201119036623, - 392.61224397469687, - -11.546605170248085 - ] - }, - "42": { - "intercept": -4065.9654359882898, - "coefficients": [ - 2540.1375683786646, - -1348.1668881295097, - -1.7223555914824829e-10, - 4.276898835087195e-10, - 4.227844356191513e-10, - 1903.9604516981963, - 4.4467337098040274e-10, - 887.1170482556014, - -15488.612016352508, - -141.54190426151843, - -782.6756792413494, - 1.5756248224448095e-10, - 217.48933550402327, - 2006.842437830525, - 91.18146381783464, - 1.2517487315814321e-10, - 222.8733535886281, - 1002.6459327773083, - 147.08964408478604, - -133.86412412191677, - -698.7873177967201, - 8.60378576907292e-13, - -1.6131838614688422e-12, - -1.280835045141161e-12, - 3.674133964658619e-12, - 2.0162835693455383e-12, - 9.101492148755432e-13, - -9.243742893470586e-13, - 5.320141986861596e-12, - -3.315685545332706e-13, - 5.036410986907051e-12, - 5.3636008246840735e-12, - 3.751665644813329e-12, - 1.1368683772161603e-13, - 5.684341886080801e-13 - ] - } - } - } -} \ No newline at end of file diff --git a/Working Models/Linear_trained.py b/Working Models/Linear_trained.py index 27f87c9bb8a8a956c7728e5427a860209ff0828c..2e6f67ed5adf57637cdf775bd8fe4339c769bf11 100644 --- a/Working Models/Linear_trained.py +++ b/Working Models/Linear_trained.py @@ -8,7 +8,7 @@ from sklearn.preprocessing import LabelEncoder from sklearn.impute import SimpleImputer -# Function to convert time periods to number of days (same as in training file) +# Function to convert time periods to number of days def convert_time_period(value): if pd.isna(value): return np.nan @@ -97,7 +97,7 @@ def preprocess_data(data, target_col, feature_names): numeric_cols = X.select_dtypes(include=[np.number]).columns.tolist() categorical_cols = X.select_dtypes(include=['object']).columns.tolist() - # Process each categorical column appropriately + # Process each categorical column for col in categorical_cols: # Check if column contains time periods if col == 'Injury_Prognosis' or any( @@ -137,8 +137,6 @@ def apply_scaler(X, scaler_params): def find_segment(X_scaled, all_segments): - # For simplicity, we'll use the first segment - # In a real implementation, you would use the tree model to determine the correct segment segment_id = list(all_segments.keys())[0] return segment_id