index
int64
0
731k
package
stringlengths
2
98
name
stringlengths
1
76
docstring
stringlengths
0
281k
code
stringlengths
4
8.19k
signature
stringlengths
2
42.8k
embed_func_code
sequencelengths
768
768
4,537
optbinning.binning.binning_process
fit_transform_disk
Fit the binning process according to the given training data on disk, then transform it and save to comma-separated values (csv) file. Parameters ---------- input_path : str Any valid string path to a file with extension .csv. output_path : str Any valid string path to a file with extension .csv. target : str Target column. chunksize : Rows to read, transform and write at a time. metric : str or None, (default=None) The metric used to transform the input vector. If None, the default transformation metric for each target type is applied. For binary target options are: "woe" (default), "event_rate", "indices" and "bins". For continuous target options are: "mean" (default), "indices" and "bins". For multiclass target options are: "mean_woe" (default), "weighted_mean_woe", "indices" and "bins". metric_special : float or str (default=0) The metric value to transform special codes in the input vector. Supported metrics are "empirical" to use the empirical WoE or event rate for a binary target, and any numerical value for other targets. metric_missing : float or str (default=0) The metric value to transform missing values in the input vector. Supported metrics are "empirical" to use the empirical WoE or event rate for a binary target, and any numerical value for other targets. show_digits : int, optional (default=2) The number of significant digits of the bin column. Applies when ``metric="bins"``. **kwargs : keyword arguments Keyword arguments for ``pandas.read_csv``. Returns ------- self : BinningProcess Fitted binning process.
def fit_transform_disk(self, input_path, output_path, target, chunksize, metric=None, metric_special=0, metric_missing=0, show_digits=2, **kwargs): """Fit the binning process according to the given training data on disk, then transform it and save to comma-separated values (csv) file. Parameters ---------- input_path : str Any valid string path to a file with extension .csv. output_path : str Any valid string path to a file with extension .csv. target : str Target column. chunksize : Rows to read, transform and write at a time. metric : str or None, (default=None) The metric used to transform the input vector. If None, the default transformation metric for each target type is applied. For binary target options are: "woe" (default), "event_rate", "indices" and "bins". For continuous target options are: "mean" (default), "indices" and "bins". For multiclass target options are: "mean_woe" (default), "weighted_mean_woe", "indices" and "bins". metric_special : float or str (default=0) The metric value to transform special codes in the input vector. Supported metrics are "empirical" to use the empirical WoE or event rate for a binary target, and any numerical value for other targets. metric_missing : float or str (default=0) The metric value to transform missing values in the input vector. Supported metrics are "empirical" to use the empirical WoE or event rate for a binary target, and any numerical value for other targets. show_digits : int, optional (default=2) The number of significant digits of the bin column. Applies when ``metric="bins"``. **kwargs : keyword arguments Keyword arguments for ``pandas.read_csv``. Returns ------- self : BinningProcess Fitted binning process. """ return self.fit_disk(input_path, target, **kwargs).transform_disk( input_path, output_path, chunksize, metric, metric_special, metric_missing, show_digits, **kwargs)
(self, input_path, output_path, target, chunksize, metric=None, metric_special=0, metric_missing=0, show_digits=2, **kwargs)
[ 0.018672185018658638, 0.004170496482402086, -0.015142399817705154, 0.002473665401339531, -0.026360729709267616, -0.01103996392339468, -0.028125623241066933, 0.019207283854484558, -0.0015137705486267805, -0.04952963441610336, 0.012973835691809654, -0.009566091001033783, 0.045361485332250595, -0.013555874116718769, -0.0006671151495538652, 0.06143327057361603, 0.029346026480197906, -0.021629316732287407, 0.007233241572976112, 0.06635243445634842, 0.023957472294569016, -0.0404798686504364, 0.01722647435963154, 0.013424445874989033, -0.007219159975647926, 0.03390846028923988, -0.035917434841394424, 0.0034218255896121264, -0.03527906909584999, -0.020221158862113953, -0.011565676890313625, -0.04096803069114685, 0.056251246482133865, -0.0039052932988852262, 0.047201480716466904, -0.03867742419242859, 0.05020555108785629, 0.03402111306786537, -0.00280692963860929, -0.01219465397298336, -0.001980809960514307, -0.024839919060468674, -0.018099533393979073, 0.052195750176906586, 0.023638291284441948, 0.052984315901994705, -0.012279143556952477, 0.06297285854816437, -0.00251825712621212, 0.012560775503516197, -0.05001779645681381, -0.04847820848226547, 0.04273292049765587, 0.04521128162741661, -0.017198311164975166, -0.00969751924276352, 0.023544413968920708, 0.006543244235217571, 0.009054460562765598, 0.016710149124264717, 0.010176293551921844, 0.02333788387477398, 0.07885688543319702, -0.01601545885205269, 0.0284260306507349, 0.001533719478175044, -0.04870351403951645, -0.01667259819805622, -0.04284557327628136, 0.07480138540267944, 0.03308233991265297, -0.044985976070165634, 0.06316061317920685, 0.06349857151508331, -0.05613859370350838, 0.04134353995323181, -0.0530218668282032, 0.03835824131965637, 0.02544073387980461, 0.008247115649282932, 0.05178268998861313, 0.03435907140374184, 0.024464409798383713, -0.08651726692914963, -0.05088146775960922, -0.050092898309230804, 0.04648801311850548, 0.055875737220048904, -0.002438461408019066, -0.01948891580104828, -0.01606239750981331, 0.021347684785723686, 0.04618760570883751, 0.017968105152249336, 0.032725606113672256, -0.049304328858852386, -0.025572162121534348, 0.0713091567158699, -0.07063324004411697, -0.03291336074471474, -0.030979491770267487, 0.022924823686480522, 0.08809440582990646, 0.06706590205430984, -0.006346101872622967, -0.030998267233371735, -0.011068127118051052, -0.0007809413364157081, -0.03790763020515442, -0.00547304330393672, -0.04502352699637413, 0.033514175564050674, -0.03298846259713173, -0.029852963984012604, -0.008782216347754002, -0.010570578277111053, -0.016982393339276314, -0.002028921851888299, -0.057227570563554764, 0.022042376920580864, 0.032932136207818985, -0.0433712862432003, 0.008186095394194126, -0.04104313254356384, -0.022136254236102104, -0.03760722279548645, 0.037945181131362915, 0.05459900572896004, 0.0318431630730629, 0.030735410749912262, -0.013377507217228413, -0.06041939556598663, -0.00227652327157557, 0.050956569612026215, 0.01844687946140766, -0.04693862423300743, -0.0023903492838144302, 0.006360183469951153, -0.03464070335030556, 0.03535417094826698, 0.07697933912277222, -0.050468407571315765, 0.018127696588635445, -0.054824311286211014, 0.10461680591106415, -0.016794638708233833, 0.03625539317727089, -0.004862841218709946, 0.0042854961939156055, -0.027111748233437538, -0.04310842975974083, 0.008833848871290684, -0.004604679066687822, -0.036386821419000626, 0.035635802894830704, 0.05726512148976326, -0.004571822006255388, -0.015010971575975418, -0.005646716337651014, -0.003888865001499653, -0.008866705931723118, 0.027074197307229042, -0.023957472294569016, 0.05726512148976326, -0.014325668103992939, 0.05869205296039581, -0.0404798686504364, -0.008026504889130592, 0.010692617855966091, -0.004759576171636581, 0.017902391031384468, -0.0294211283326149, 0.011950572952628136, 0.025140326470136642, 0.04029211401939392, 0.029346026480197906, 0.044197406619787216, -0.044798221439123154, -0.003961619921028614, 0.07566505670547485, 0.009659968316555023, -0.0007885688683018088, 0.033495400100946426, -0.01238240860402584, -0.07863157987594604, 0.01421301532536745, 0.022305233404040337, -0.035128865391016006, 0.0008601502631790936, 0.0011153790401294827, 0.04032966494560242, 0.009537927806377411, 0.04089292883872986, -0.027750113978981972, -0.025196652859449387, -0.02091585099697113, -0.04126843810081482, 0.011162004433572292, 0.019010141491889954, 0.015743214637041092, 0.004426312167197466, -0.03441539779305458, 0.06999487429857254, -0.009589560329914093, -0.07408792525529861, 0.0023105537984520197, -0.04096803069114685, 0.06237204000353813, -0.024051349610090256, 0.008003035560250282, -0.005421410780400038, -0.023882370442152023, -0.027055421844124794, 0.04370924457907677, 0.03741946816444397, -0.007378751412034035, -0.03905293345451355, 0.03298846259713173, -0.029740311205387115, 0.02671746350824833, 0.06124551594257355, 0.006130184046924114, -0.0015043828170746565, 0.03178683668375015, 0.027261951938271523, 0.018728509545326233, 0.02823827601969242, -0.06991977244615555, 0.07818096876144409, -0.032631728798151016, 0.01576199010014534, 0.003093255218118429, -0.0173672903329134, 0.02583501860499382, -0.017780350521206856, -0.000005624383902613772, 0.020596668124198914, -0.008641400374472141, -0.043446388095617294, 0.023563189432024956, -0.016991781070828438, -0.02921459823846817, -0.026285627856850624, -0.03653702512383461, 0.009242215193808079, -0.006834263447672129, 0.009552009403705597, 0.03719416633248329, 0.0029172354843467474, -0.0008437217329628766, -0.03381458297371864, 0.01730157621204853, -0.030998267233371735, -0.036593351513147354, 0.026360729709267616, -0.052496153861284256, -0.07453853636980057, -0.044197406619787216, -0.014964032918214798, 0.0250840000808239, -0.0042526391334831715, -0.019113406538963318, 0.029871739447116852, -0.039015382528305054, -0.027599910274147987, 0.005369778256863356, -0.05640145018696785, 0.009969763457775116, 0.02883908897638321, 0.011819145642220974, -0.10424129664897919, 0.024107675999403, -0.06988222151994705, 0.03439662232995033, -0.012945672497153282, 0.015452194958925247, 0.010579966008663177, 0.015311378985643387, 0.011565676890313625, 0.0046680462546646595, 0.010439150035381317, -0.00205473811365664, -0.02187339775264263, -0.0404798686504364, -0.04070517420768738, 0.020127281546592712, -0.0732618048787117, 0.02100972831249237, 0.0042620268650352955, -0.014344442635774612, -0.07536464929580688, 0.002544073387980461, -0.017620759084820747, 0.03980395197868347, -0.00039985839975997806, -0.022436661645770073, -0.01402526069432497, -0.09920947253704071, 0.006294469349086285, -0.03462192788720131, -0.008880787529051304, 0.02553461119532585, -0.018155859783291817, 0.022004825994372368, 0.009063848294317722, 0.03751334547996521, 0.056063491851091385, -0.04442271217703819, -0.03636804595589638, -0.01210077665746212, 0.036105189472436905, -0.0036588655784726143, 0.027524808421730995, -0.05197044461965561, 0.013762404210865498, -0.04273292049765587, 0.029064394533634186, 0.07450098544359207, 0.010889760218560696, 0.01681341417133808, -0.06481285393238068, 0.052308402955532074, 0.003614273853600025, -0.021741969510912895, -0.06120796501636505, 0.0036494778469204903, 0.07953280210494995, 0.0491541251540184, -0.013424445874989033, -0.015705663710832596, 0.020221158862113953, 0.021066054701805115, 0.06620223075151443, 0.02063421905040741, -0.06293530762195587, -0.038902729749679565, -0.006336714141070843, 0.026942769065499306, 0.0004972560564056039, -0.02932725101709366, 0.03435907140374184, 0.08358830213546753, 0.02544073387980461, -0.0011599707650020719, -0.0443476103246212, -0.0020934625063091516, -0.035823557525873184, 0.010063640773296356, 0.014964032918214798, 0.06627733260393143, 0.05339737609028816, -0.008157932199537754, -0.013875056989490986, -0.01767708547413349, 0.009753845632076263, -0.05238350108265877, 0.035523150116205215, -0.05043085664510727, 0.013903220184147358, -0.024746041744947433, 0.041794151067733765, -0.002473665401339531, -0.037175390869379044, 0.0031988671980798244, 0.05456145480275154, -0.00278346030972898, -0.014044036157429218, 0.025196652859449387, 0.06038184463977814, 0.032162345945835114, 0.052608806639909744, -0.0404798686504364, -0.03633049502968788, 0.05136962980031967, 0.02468971535563469, -0.011640778742730618, -0.055087167769670486, 0.005289983004331589, -0.014522809535264969, 0.08058422803878784, 0.03368315473198891, 0.0636112242937088, -0.015771377831697464, -0.0012626489624381065, 0.03912803530693054, -0.02893296629190445, 0.0491916760802269, -0.017770962789654732, 0.00595651101320982, -0.06886834651231766, -0.02102850377559662, 0.010157518088817596, -0.0110869025811553, -0.011518738232553005, 0.02921459823846817, -0.019132182002067566, 0.07063324004411697, 0.012157103046774864, -0.011406085453927517, -0.023600740358233452, -0.0433712862432003, 0.005219575017690659, -0.04427250847220421, 0.041305989027023315, -0.05121942609548569, -0.03969129920005798, -0.01893503963947296, -0.035804782062768936, 0.012401184067130089, -0.03497866168618202, 0.012551387771964073, 0.04829045385122299, 0.005285289138555527, 0.039954155683517456, -0.04645046219229698, 0.0616961270570755, -0.07048303633928299, -0.04926677793264389, -0.013612200506031513, -0.011058739386498928, -0.0006383652798831463, 0.06338591873645782, 0.004454475361853838, -0.033889684826135635, 0.042470064014196396, -0.040630072355270386, -0.024220328778028488, -0.05369778349995613, 0.014738727360963821, 0.0020324422512203455, 0.003989783115684986, -0.07217282801866531, -0.09793274104595184, 0.01904769241809845, 0.006472836248576641, -0.0008425482665188611, -0.009922824800014496, 0.0072989556938409805, 0.011988123878836632, 0.007533648982644081, -0.05580063536763191, -0.045061077922582626, 0.06376142799854279, -0.013659139163792133, 0.007336506620049477, -0.02622930146753788, -0.08591645210981369, 0.042582716792821884, -0.03315744176506996, -0.01918850839138031, 0.09973518550395966, -0.023187680169939995, 0.020296260714530945, -0.024802368134260178, 0.030791737139225006, -0.02440808340907097, 0.008514665998518467, -0.019920751452445984, 0.029852963984012604, -0.011697105132043362, 0.022906048223376274, 0.0433712862432003, -0.02284972183406353, -0.027900317683815956, -0.004463863093405962, 0.013584037311375141, -0.0274872574955225, 0.041794151067733765, 0.0539981909096241, 0.007960790768265724, -0.000043674921471392736, -0.04078027606010437, -0.003288050414994359, -0.025872569531202316, 0.024746041744947433, 0.031861938536167145, -0.03894028067588806, 0.021723194047808647, 0.006571406964212656, 0.020690545439720154, 0.03704396262764931, -0.03189948946237564, 0.04675086960196495, 0.020390138030052185, -0.01099302526563406, 0.04134353995323181, 0.017095046117901802, 0.009171807207167149, 0.045849647372961044, 0.05069371312856674, 0.0029266232158988714, 0.08110994100570679, 0.02534685656428337, -0.03392723575234413, 0.007613444700837135, 0.04348393902182579, 0.018249737098813057, 0.029627658426761627, 0.031279899179935455, -0.015884030610322952, 0.017433004453778267, 0.04615005478262901, 0.014701176434755325, -0.04712637886404991, -0.00333733600564301, 0.01767708547413349, -0.008937113918364048, 0.006425897590816021, -0.08478992432355881, -0.006867120508104563, -0.03507253900170326, -0.004764270037412643, 0.009904049336910248, 0.03882762789726257, -0.040254563093185425, 0.0303599014878273, -0.021347684785723686, -0.01799626834690571, -0.012410571798682213, 0.016165662556886673, 0.03608641400933266, 0.017686473205685616, 0.026961544528603554, -0.06349857151508331, -0.028031745925545692, 0.023093802854418755, 0.0016921373317018151, -0.010129354894161224, 0.015780765563249588, -0.004602332133799791, 0.013987709768116474, 0.017545657232403755, 0.035898659378290176, 0.051144324243068695, 0.023018701002001762, 0.04934187978506088, -0.021572990342974663, -0.05369778349995613, 0.022436661645770073, -0.030885614454746246, -0.08223646879196167, 0.0176019836217165, -0.010673842392861843, 0.0095144584774971, 0.011753431521356106, 0.09004705399274826, 0.04427250847220421, -0.00510692223906517, 0.03556070104241371, 0.013246078975498676, -0.04776474088430405, -0.020202383399009705, 0.002082901308313012, 0.02476481720805168, 0.06687814742326736, -0.04596230015158653, 0.02005217969417572, 0.028613785281777382, -0.0265109334141016, 0.0022049418184906244, -0.009800784289836884, 0.05516226962208748, 0.01046731323003769, -0.024332981556653976, 0.032049693167209625, -0.019169732928276062, -0.053472477942705154, 0.025797467678785324, 0.025403182953596115, -0.042958226054906845, 0.030979491770267487, 0.044685568660497665, -0.04303332790732384, -0.009138950146734715, -0.01984564960002899, 0.022981150075793266, 0.0019280039705336094, -0.045924749225378036, -0.04115578532218933, -0.03529784455895424, -0.04956718534231186, 0.012879958376288414, -0.006102020852267742, 0.0011300473706796765, 0.0004931489238515496, -0.04772718995809555, -0.02525297924876213, 0.010401599109172821, -0.04877861589193344, 0.013537098653614521, 0.01364975143224001, 0.046300258487463, -0.006848345045000315, -0.04273292049765587, 0.030322350561618805, -0.08358830213546753, -0.043934550136327744, -0.034283969551324844, 0.015536684542894363, -0.05764062702655792, 0.016475455835461617, -0.010129354894161224, 0.027712563052773476, 0.06571406871080399, -0.017451779916882515, -0.015001583844423294, -0.054223496466875076, -0.04783984273672104, -0.03353295102715492, -0.00861323717981577, -0.07727974653244019, 0.021666867658495903, 0.028857864439487457, 0.022586865350604057, -0.0190289169549942, 0.010457925498485565, -0.003283356549218297, -0.07461363822221756, 0.0029594802763313055, -0.012795468792319298, -0.009988538920879364, -0.04558679088950157, 0.0057265120558440685, 0.012908121570944786, -0.01956401765346527, -0.028688885271549225, -0.03698763623833656, 0.030998267233371735, 0.01508607342839241, 0.029909290373325348, -0.06789202243089676, -0.010232619941234589, 0.05103167146444321, 0.0443476103246212, 0.021197481080889702, -0.03218112140893936, -0.026191750541329384, 0.034283969551324844, 0.0077167097479105, -0.02814439870417118, 0.02042768895626068, 0.033401522785425186, 0.04494842514395714, -0.02228645794093609, -0.02198605053126812, -0.11145106703042984, 0.01874728500843048, 0.06789202243089676, 0.026661137118935585, 0.020746871829032898, 0.009669356048107147, 0.046713318675756454, -0.02131013385951519, -0.032237447798252106, 0.05872960388660431, 0.014682400971651077, 0.03150520473718643, 0.003327948274090886, 0.02033381164073944, -0.008979358710348606, -0.020277485251426697, 0.04066762328147888, -0.006102020852267742, -0.023863594979047775, -0.030416227877140045, -0.029946841299533844, -0.018550144508481026, -0.020840749144554138, -0.06871814280748367, -0.03695008531212807, 0.005266513675451279, -0.040066808462142944, -0.08659236878156662, -0.04648801311850548, -0.079082190990448, -0.0626724511384964, 0.005257125943899155, -0.020127281546592712, -0.017386065796017647, 0.04367169365286827, -0.006069163791835308, -0.006031612865626812, -0.02729950286448002, 0.0713467076420784, 0.020559117197990417, 0.05726512148976326, -0.027168074622750282, -0.056063491851091385, -0.045849647372961044, 0.003029888030141592, 0.0868176743388176, 0.01016690582036972, 0.025759916752576828, -0.024633388966321945, -0.014616686850786209, 0.038039058446884155, 0.004158761817961931, -0.027919093146920204, 0.009462825953960419, -0.007125283125787973, 0.01618443801999092, -0.01956401765346527, -0.013518323190510273, -0.010936698876321316, -0.013039549812674522, -0.07532709836959839, -0.08013361692428589, -0.0032504997216165066, 0.03946599364280701, 0.021666867658495903, 0.07652872800827026, -0.01813708432018757, 0.010870984755456448, -0.014316280372440815, 0.009857110679149628, 0.026191750541329384, -0.0626724511384964, 0.03385213389992714, -0.013339956291019917, -0.0008707114611752331, 0.014588523656129837, -0.059630826115608215, 0.04840310662984848, -0.011330983601510525, -0.07307405024766922, -0.006472836248576641, 0.004635189194232225, -0.00600344967097044, 0.04994269460439682, -0.0132554667070508, 0.043258633464574814, 0.014147301204502583, -0.020577892661094666, 0.040066808462142944, 0.026097875088453293, 0.0530218668282032, -0.034377846866846085, -0.02604154869914055, -0.01186608336865902, 0.033889684826135635, 0.00870711449533701, 0.02478359267115593, 0.027937868610024452, -0.004409883636981249, 0.001401117886416614, 0.03304478898644447, 0.034772131592035294, 0.019826874136924744, 0.0083128297701478, -0.011246494017541409, -0.003931109793484211, -0.0019561671651899815, 0.005829777102917433, 0.04866596311330795, 0.06353612244129181, 0.008434870280325413, 0.010204456746578217, 0.009819559752941132, 0.012692203745245934, -0.018531369045376778, -0.0380953848361969, -0.024145226925611496, -0.059743478894233704, -0.023882370442152023, 0.03507253900170326, 0.03144887834787369, 0.06102021038532257, 0.035804782062768936 ]
4,538
optbinning.binning.binning_process
get_binned_variable
Return optimal binning object for a given variable name. Parameters ---------- name : string The variable name.
def get_binned_variable(self, name): """Return optimal binning object for a given variable name. Parameters ---------- name : string The variable name. """ self._check_is_fitted() if not isinstance(name, str): raise TypeError("name must be a string.") if name in self.variable_names: return self._binned_variables[name] else: raise ValueError("name {} does not match a binned variable." .format(name))
(self, name)
[ 0.06134362518787384, -0.029937466606497765, -0.05468326434493065, -0.03036441281437874, -0.020117703825235367, -0.01630934327840805, -0.056049492210149765, 0.0008106640307232738, 0.017675571143627167, -0.051984965801239014, -0.021313153207302094, 0.024592099711298943, -0.04682745784521103, -0.02920311875641346, -0.03495835140347481, 0.005255707539618015, 0.02641942910850048, 0.019844457507133484, -0.052599769085645676, 0.036922305822372437, 0.00034342482103966177, 0.025360602885484695, 0.04337773099541664, 0.03389952704310417, 0.05321457237005234, 0.00367387174628675, 0.04375344514846802, 0.001619193353690207, -0.05089198425412178, 0.005072120577096939, -0.07896796613931656, -0.05775727704167366, 0.021449776366353035, 0.002984353806823492, 0.041499167680740356, -0.025206902995705605, 0.0473397932946682, 0.0619584284722805, -0.03934735804796219, -0.023584507405757904, 0.04781797155737877, -0.07780667394399643, -0.002457075286656618, 0.026163261383771896, -0.0020173205994069576, -0.05744987726211548, -0.0008837785571813583, -0.020988674834370613, -0.005230090580880642, 0.04156747832894325, 0.0010038572363555431, -0.07391291856765747, 0.020288482308387756, 0.02269645780324936, -0.012603451497852802, 0.015199284069240093, -0.004555515479296446, 0.02542891353368759, -0.007326396182179451, 0.04812537133693695, -0.04170410335063934, -0.009017103351652622, 0.03200388699769974, -0.06906281411647797, 0.012919391505420208, 0.00963190570473671, -0.05232652276754379, 0.027136698365211487, -0.043958377093076706, 0.012492445297539234, 0.03569269925355911, 0.017257165163755417, 0.003699488705024123, 0.020834973081946373, -0.03202096372842789, 0.011408002115786076, -0.004401815123856068, -0.06025064364075661, 0.005968707613646984, 0.016428889706730843, 0.035351142287254333, 0.003110302845016122, -0.009324504062533379, -0.05171171948313713, -0.030125321820378304, -0.052189901471138, -0.012834002263844013, 0.00794546864926815, 0.07794329524040222, -0.07036072760820389, -0.002073890995234251, 0.0179658941924572, 0.023550350219011307, 0.10492628812789917, 0.03444601595401764, -0.0734347403049469, 0.0538635291159153, -0.00003158734762109816, -0.014055067673325539, -0.02151808701455593, -0.060455579310655594, -0.013892828486859798, -0.037093084305524826, 0.05943090841174126, -0.002860539359971881, 0.03067181259393692, 0.06721840798854828, -0.009495282545685768, -0.012953546829521656, -0.04126007854938507, -0.015873858705163002, 0.025019045919179916, -0.0334555022418499, 0.03307978808879852, -0.045256294310092926, 0.01734255440533161, -0.048227839171886444, 0.015549379400908947, -0.025685081258416176, 0.0439925342798233, -0.005934551823884249, 0.03198680654168129, -0.03459971770644188, 0.028622470796108246, 0.02723916620016098, 0.07589395344257355, 0.03699061647057533, -0.01577139087021351, 0.006750018801540136, 0.005977246444672346, 0.07329811900854111, -0.03217466548085213, -0.06411023437976837, 0.05078951641917229, -0.012893774546682835, 0.005289863329380751, 0.024575021117925644, 0.03982554003596306, 0.039723072201013565, -0.015028505586087704, 0.054273396730422974, 0.031132914125919342, 0.0038403808139264584, -0.042353060096502304, 0.04648590087890625, -0.019776146858930588, 0.01811959594488144, -0.027802735567092896, -0.0014793685404583812, -0.0538293719291687, -0.03767373040318489, -0.008739587850868702, -0.06233414262533188, 0.004670791327953339, 0.00848769024014473, -0.0023353956639766693, 0.0005961235729046166, -0.05519559979438782, -0.04371928796172142, -0.05724494159221649, -0.010818815790116787, 0.056220270693302155, -0.05253145843744278, -0.08887311816215515, -0.03161109611392021, -0.02416515350341797, 0.0009526236681267619, 0.012381439097225666, 0.033199332654476166, 0.012048421427607536, -0.05270223692059517, -0.0310133695602417, -0.08634559065103531, 0.06902866065502167, -0.032550375908613205, -0.0048928032629191875, -0.015037043951451778, -0.02300385944545269, 0.011578780598938465, 0.056869231164455414, 0.017675571143627167, -0.03224297612905502, -0.03787866607308388, -0.07042904198169708, -0.02431885339319706, 0.005563108716160059, 0.03863009065389633, 0.010417486540973186, 0.025394758209586143, 0.034514330327510834, 0.0016085196984931827, 0.007885695435106754, 0.03198680654168129, -0.024694567546248436, -0.005080659408122301, -0.03260160982608795, -0.0022991050500422716, 0.041977349668741226, -0.040713585913181305, -0.011092061176896095, 0.0570400096476078, 0.01760726049542427, 0.01320971455425024, 0.05256561189889908, -0.009315965697169304, 0.01459302008152008, 0.02088620699942112, -0.010818815790116787, 0.04614434391260147, 0.0002657739969436079, -0.027512410655617714, 0.00530267134308815, 0.0012488175416365266, 0.07623551040887833, 0.04177241399884224, 0.006088252644985914, -0.004380467813462019, -0.03193557262420654, 0.035795167088508606, 0.024455476552248, 0.02723916620016098, 0.0071470788680016994, 0.10041774064302444, 0.0798560157418251, -0.030381489545106888, -0.04016709700226784, -0.01720593124628067, 0.022081656381487846, 0.03290900960564613, -0.030125321820378304, 0.05676676332950592, -0.010263785719871521, -0.007710647769272327, -0.06991670280694962, -0.014943116344511509, 0.06544230878353119, -0.018461152911186218, -0.03572685644030571, 0.008624312467873096, -0.016796061769127846, 0.00946966651827097, 0.014738181605935097, -0.014994349330663681, 0.008504767902195454, -0.0039513870142400265, -0.028195524588227272, 0.019212577491998672, 0.023242950439453125, -0.04874017462134361, -0.03804944455623627, 0.034019071608781815, 0.012688840739428997, 0.009384277276694775, 0.01842699758708477, 0.028964027762413025, 0.003633311949670315, -0.07404954731464386, -0.03740048408508301, -0.0005683720810338855, 0.025019045919179916, -0.041020989418029785, 0.027341632172465324, -0.01858069747686386, 0.024848267436027527, -0.04170410335063934, -0.015130972489714622, -0.06933605670928955, 0.02935681864619255, 0.0023674166295677423, -0.03478757292032242, -0.02102283015847206, 0.024216387420892715, 0.040713585913181305, -0.041020989418029785, -0.017163235694169998, -0.06605710834264755, 0.07090722024440765, 0.08279339969158173, -0.0023524733260273933, -0.007983893156051636, -0.01827329583466053, 0.02542891353368759, 0.019280890002846718, -0.0016202607657760382, -0.03572685644030571, -0.022542757913470268, 0.001691774232313037, -0.07521083950996399, -0.006096791476011276, -0.016847295686602592, -0.009017103351652622, -0.024745799601078033, 0.041225921362638474, 0.00717696500942111, -0.03430939465761185, 0.02759779989719391, 0.01476379856467247, -0.004175533540546894, 0.05659598484635353, 0.0375029519200325, 0.05663014203310013, 0.0004800476017408073, -0.033182255923748016, 0.0006863159942440689, -0.04385590925812721, -0.04747641459107399, 0.048842642456293106, -0.048910953104496, -0.01737670972943306, 0.023362495005130768, 0.014550325460731983, -0.01926381140947342, 0.06458842009305954, 0.011442157439887524, 0.03193557262420654, -0.059294283390045166, 0.035658545792102814, -0.016095871105790138, -0.010818815790116787, 0.07439110428094864, 0.00562288099899888, 0.0029267161153256893, 0.007983893156051636, -0.03600010275840759, -0.0456661619246006, 0.03444601595401764, -0.012731535360217094, -0.004286539740860462, 0.011066445149481297, -0.006634743418544531, -0.029903309419751167, -0.019041799008846283, 0.044778116047382355, 0.017077846452593803, -0.006980570033192635, 0.034497249871492386, 0.03705892711877823, 0.056356895714998245, -0.013167019933462143, -0.04747641459107399, 0.05157509818673134, 0.008150402456521988, -0.003737913677468896, 0.03410445898771286, 0.018307451158761978, 0.01361958310008049, -0.0028584045358002186, -0.014516170136630535, 0.07705524563789368, 0.015745775774121284, -0.014371008612215519, 0.009691677987575531, -0.0342581607401371, -0.0005408874130807817, 0.038937490433454514, -0.012014265172183514, 0.05721078813076019, 0.03504374250769615, -0.008713971823453903, -0.014686948619782925, -0.0832032710313797, -0.02739286608994007, -0.013363415375351906, 0.0048842644318938255, -0.00021987728541716933, -0.012031342834234238, 0.004081605467945337, 0.05400015041232109, 0.013696433044970036, -0.01829037442803383, -0.039381515234708786, -0.033865369856357574, -0.044641491025686264, 0.0031914226710796356, -0.03210635110735893, 0.015037043951451778, 0.008547462522983551, -0.0522582121193409, 0.05697169899940491, -0.033660437911748886, 0.026880530640482903, 0.002683356637135148, 0.008372414857149124, 0.032687000930309296, 0.005627150647342205, -0.002111248904839158, -0.05721078813076019, -0.04955991357564926, 0.05806468054652214, -0.04529045149683952, 0.026368195191025734, 0.005951629485934973, 0.028622470796108246, 0.026692675426602364, -0.003676006570458412, -0.03126953914761543, 0.05953337624669075, -0.05724494159221649, -0.015899475663900375, 0.050345491617918015, -0.00502088712528348, 0.02348203957080841, -0.06120700389146805, 0.034838806837797165, -0.0571083202958107, -0.044265780597925186, 0.027973514050245285, 0.03325056657195091, -0.015498146414756775, -0.052941326051950455, -0.04098683223128319, 0.043343573808670044, -0.02510443516075611, -0.025053201243281364, -0.021074064075946808, 0.048535242676734924, 0.04204566031694412, -0.041362546384334564, 0.04371928796172142, -0.04484642669558525, -0.0010743032908067107, 0.008504767902195454, 0.007676491979509592, -0.030227789655327797, -0.022576913237571716, 0.03719555214047432, -0.007821653969585896, -0.01216796599328518, -0.018683165311813354, 0.05123354122042656, -0.07247838377952576, -0.09160557389259338, -0.03845931217074394, -0.07746511697769165, 0.05581040307879448, -0.025394758209586143, -0.028127213940024376, -0.0051703182980418205, -0.002587293740361929, -0.0044957431964576244, 0.02775150164961815, 0.0021133834961801767, 0.03133784979581833, 0.019349200651049614, -0.0735030546784401, -0.05796221271157265, -0.03545361012220383, 0.01361104380339384, -0.034975431859493256, -0.07411785423755646, 0.057176630944013596, -0.05321457237005234, 0.05444417521357536, -0.024404242634773254, 0.03982554003596306, -0.03149155154824257, -0.06424686312675476, -0.018990565091371536, 0.05348781496286392, -0.028776172548532486, -0.05109691992402077, 0.03277238830924034, 0.03082551434636116, 0.03407030552625656, -0.04033787548542023, -0.037127237766981125, 0.00271110818721354, -0.010075929574668407, 0.06397361308336258, 0.01303893607109785, 0.004704946652054787, 0.004841569811105728, -0.005580186378210783, -0.05987493321299553, 0.03314810246229172, 0.015540841035544872, -0.0375371091067791, 0.0652373731136322, 0.029100650921463966, -0.026948843151330948, -0.011954492889344692, -0.026521896943449974, -0.02869078330695629, 0.03798113018274307, 0.008701163344085217, -0.008436456322669983, -0.049525756388902664, 0.05403430759906769, -0.025053201243281364, 0.011945953592658043, -0.005797929130494595, 0.0718635767698288, 0.009375737980008125, 0.0456661619246006, -0.01970783621072769, 0.03781035169959068, 0.000023582104404340498, 0.050311338156461716, 0.037605419754981995, 0.018512386828660965, -0.033199332654476166, 0.025155669078230858, -0.048057060688734055, -0.018068362027406693, -0.01541275717318058, -0.011365307494997978, -0.01686437427997589, 0.01419169083237648, 0.004356985911726952, 0.008282755501568317, -0.008150402456521988, -0.039552293717861176, -0.04781797155737877, 0.04552954062819481, 0.017427943646907806, 0.041362546384334564, 0.01540421787649393, 0.0011975839734077454, -0.04809121787548065, -0.017231548205018044, 0.025531381368637085, 0.033182255923748016, 0.008940252475440502, -0.060455579310655594, 0.0016576185589656234, 0.009802684187889099, -0.027017153799533844, -0.03395076096057892, -0.013235331512987614, 0.11455819755792618, 0.05581040307879448, -0.0059729767963290215, -0.005353904794901609, 0.03610256686806679, 0.05591287091374397, -0.02056172862648964, -0.03934735804796219, 0.008615774102509022, -0.05885026231408119, 0.006848216522485018, -0.017325475811958313, 0.007450210861861706, 0.09741204231977463, 0.037127237766981125, 0.02071542851626873, 0.05154094099998474, -0.008991486392915249, 0.06482750922441483, 0.01477233786135912, -0.013559810817241669, 0.0110237505286932, -0.007736264728009701, -0.02382359653711319, -0.0236528180539608, 0.026641441509127617, -0.08019757270812988, -0.05249730125069618, 0.015882397070527077, -0.018563618883490562, 0.02187672257423401, -0.008803630247712135, 0.005336827132850885, 0.07773835957050323, 0.04047449678182602, -0.06663776189088821, 0.012125271372497082, -0.05738156661391258, -0.025736315175890923, 0.04416331276297569, -0.00888901948928833, 0.030057011172175407, 0.004675060510635376, 0.01125430129468441, -0.022064577788114548, 0.028263837099075317, 0.05345366150140762, 0.0045042820274829865, -0.012014265172183514, -0.0800609439611435, 0.04908173158764839, -0.01198864821344614, -0.013440265320241451, -0.05123354122042656, -0.00608398299664259, -0.006980570033192635, 0.05253145843744278, -0.015045583248138428, -0.01280838530510664, -0.0038040904328227043, 0.04973069205880165, 0.020459260791540146, 0.023857751861214638, 0.02134730853140354, 0.019622446969151497, 0.0077832285314798355, 0.023447884246706963, -0.052804701030254364, 0.014661331661045551, 0.049184199422597885, -0.04450486972928047, 0.024011453613638878, -0.0236357394605875, -0.021415619179606438, 0.07138539850711823, -0.00993930734694004, 0.04160163551568985, -0.021637631580233574, -0.024848267436027527, 0.02269645780324936, -0.01811959594488144, -0.00493122823536396, -0.042523838579654694, -0.00701472582295537, 0.050482116639614105, -0.03132077306509018, 0.03835684433579445, -0.0020205227192491293, -0.006750018801540136, -0.04013293981552124, -0.008854863233864307, 0.007646605838090181, 0.016241032630205154, 0.027683189138770103, 0.01540421787649393, 0.028605394065380096, -0.038561780005693436, 0.06551062315702438, -0.033848293125629425, 0.011134755797684193, -0.02869078330695629, -0.04662252217531204, 0.013909906148910522, 0.02348203957080841, -0.05447833240032196, -0.0220304224640131, 0.0456320084631443, 0.049696534872055054, -0.015651846304535866, -0.0423872172832489, 0.0012071903329342604, 0.003737913677468896, 0.05895272642374039, 0.03863009065389633, 0.02315756119787693, 0.02334541641175747, -0.029578831046819687, 0.02889571711421013, -0.0032960243988782167, 0.019964003935456276, -0.027973514050245285, -0.023430805653333664, -0.012851079925894737, -0.027290400117635727, 0.025343524292111397, 0.07773835957050323, 0.0013384761987254024, 0.05044795945286751, -0.02004939317703247, -0.0007658347021788359, -0.04768135026097298, -0.06588633358478546, 0.002051476389169693, -0.019861536100506783, -0.02348203957080841, -0.0252752136439085, 0.023686973378062248, -0.03722970560193062, -0.05140431970357895, -0.00226494949311018, -0.02722208760678768, 0.008739587850868702, -0.010178396478295326, -0.035351142287254333, -0.0865505263209343, -0.012586372904479504, -0.007031803485006094, -0.035965945571660995, -0.00632307305932045, 0.0002166751801269129, -0.01810251735150814, 0.017812194302678108, -0.03372874855995178, 0.028759093955159187, 0.02790520153939724, 0.06455425918102264, 0.02088620699942112, -0.048022907227277756, -0.010374791920185089, -0.02286723628640175, 0.03996216133236885, -0.030723046511411667, 0.03781035169959068, 0.018700242042541504, -0.0072196596302092075, 0.013286564499139786, -0.008948791772127151, 0.02481411211192608, 0.02185964398086071, -0.0025766200851649046, -0.0009296752978116274, 0.007612450513988733, -0.05676676332950592, -0.005306940991431475, -0.012953546829521656, -0.016130026429891586, -0.0040239677764475346, 0.0005614341935142875, -0.0009793078061193228, 0.01149339135736227, 0.007885695435106754, -0.024592099711298943, -0.021415619179606438, 0.029442207887768745, -0.016983918845653534, 0.027785656973719597, 0.08108561486005783, -0.11018627136945724, 0.04829614982008934, -0.07582563906908035, 0.036785680800676346, 0.019144266843795776, 0.026180339977145195, 0.05102860555052757, 0.011928875930607319, 0.01665090024471283, -0.008351067081093788, 0.06120700389146805, -0.07077059894800186, -0.04262630641460419, 0.05608364939689636, 0.0260778721421957, 0.0072580850683152676, -0.02710254304111004, 0.019144266843795776, 0.0302107110619545, 0.05454664304852486, 0.053931839764118195, 0.02334541641175747, 0.012509522959589958, 0.028127213940024376, 0.02481411211192608, 0.021074064075946808, -0.0007007254171185195, -0.029800843447446823, 0.016223954036831856, -0.00013809039955958724, 0.0571083202958107, 0.00111006002407521, -0.01263760682195425, -0.021261919289827347, 0.05321457237005234, 0.05481988936662674, 0.02399437502026558, 0.043514352291822433, 0.015139511786401272, -0.041225921362638474, 0.027461178600788116, -0.02153516560792923, -0.017214469611644745, -0.028793249279260635, -0.026470663025975227, 0.007736264728009701, -0.010169858112931252, 0.0014067876618355513, -0.08456949889659882, -0.00701472582295537, 0.02334541641175747, -0.019485823810100555 ]
4,539
sklearn.utils._metadata_requests
get_metadata_routing
Get metadata routing of this object. Please check :ref:`User Guide <metadata_routing>` on how the routing mechanism works. Returns ------- routing : MetadataRequest A :class:`~sklearn.utils.metadata_routing.MetadataRequest` encapsulating routing information.
def get_metadata_routing(self): """Get metadata routing of this object. Please check :ref:`User Guide <metadata_routing>` on how the routing mechanism works. Returns ------- routing : MetadataRequest A :class:`~sklearn.utils.metadata_routing.MetadataRequest` encapsulating routing information. """ return self._get_metadata_request()
(self)
[ 0.013692973181605339, 0.012813852168619633, -0.031612828373909, -0.06013541668653488, 0.03864579647779465, -0.005616605281829834, 0.0020412919111549854, 0.08063047379255295, 0.038077473640441895, 0.000966255902312696, -0.03363747149705887, 0.02164945937693119, 0.027794426307082176, -0.007095126435160637, 0.031044509261846542, 0.038858916610479355, -0.02164945937693119, 0.03235875070095062, 0.019127538427710533, -0.03209235146641731, 0.0034054832067340612, -0.04887556657195091, -0.024064822122454643, -0.05718725174665451, -0.01651681587100029, 0.021560659632086754, 0.017688976600766182, -0.06386502087116241, 0.06173381581902504, 0.048662446439266205, -0.07764679193496704, -0.07977799326181412, 0.0039005435537546873, 0.03868131712079048, -0.025947384536266327, 0.02179154008626938, 0.005026084836572409, -0.0017937616212293506, -0.055517811328172684, 0.01556665450334549, -0.005860805511474609, 0.0040381839498877525, -0.02960594743490219, -0.04930180683732033, 0.06500165909528732, 0.004335664212703705, -0.035644352436065674, 0.024757463485002518, 0.007508046925067902, -0.016703296452760696, 0.009643688797950745, -0.019376177340745926, 0.010753690265119076, -0.003623043419793248, -0.01829281635582447, -0.0004906204412691295, -0.0019136418122798204, 0.021347539499402046, 0.01843489706516266, 0.023354422301054, 0.04450660198926926, 0.004539904184639454, 0.017813296988606453, 0.008031967096030712, -0.010753690265119076, -0.04184259846806526, 0.013053611852228642, -0.01749361678957939, 0.00047230542986653745, -0.001266511157155037, -0.017653455957770348, -0.047028522938489914, 0.0364435538649559, 0.0004748029459733516, -0.013906093314290047, -0.0298190675675869, -0.0015884115127846599, -0.05569541081786156, 0.06944166123867035, -0.006042845547199249, -0.03786435350775719, 0.02230658009648323, -0.009625929407775402, -0.08467976003885269, -0.0015861914725974202, -0.013142412528395653, 0.02211122028529644, -0.038397155702114105, 0.01036296971142292, -0.03239427134394646, -0.04908868670463562, 0.007920967414975166, -0.00855144765228033, -0.00046564542572014034, 0.019251858815550804, -0.044186919927597046, -0.02118770033121109, 0.02342546172440052, 0.019855698570609093, -0.051113326102495193, -0.02317682094871998, 0.028984347358345985, 0.020051058381795883, 0.12282827496528625, -0.004513264168053865, -0.04837828502058983, -0.04336996003985405, -0.019518258050084114, -0.005825285334140062, 0.003549783257767558, -0.02454434335231781, 0.02198689989745617, -0.0016794315306469798, 0.01625041477382183, 0.035360194742679596, -0.01536241453140974, 0.0633322224020958, -0.011490730568766594, -0.022217780351638794, -0.015460094437003136, -0.0017504716524854302, 0.0504029281437397, 0.0015695414040237665, -0.06471750140190125, -0.051361966878175735, 0.029978908598423004, 0.014430013485252857, -0.04212675988674164, -0.012458651326596737, -0.04713508486747742, -0.02532578445971012, -0.02758130617439747, -0.015460094437003136, 0.08652680367231369, -0.013932732865214348, 0.0204772986471653, 0.10016649216413498, 0.02289266139268875, -0.00006545537326019257, 0.029978908598423004, -0.025379063561558723, 0.001041180919855833, 0.012725051492452621, -0.06049061566591263, 0.00023989897454157472, -0.04994116723537445, 0.01490065362304449, 0.004075923934578896, 0.022324340417981148, -0.0809856727719307, 0.034720830619335175, -0.04141635820269585, 0.03310466930270195, 0.02901986613869667, -0.009554889053106308, 0.01055832952260971, 0.011979131028056145, 0.028664667159318924, -0.007299366872757673, 0.008111887611448765, 0.02349650114774704, -0.031612828373909, -0.035306911915540695, -0.05612165108323097, 0.002082361839711666, 0.0028971026185899973, 0.051752686500549316, -0.045643243938684464, -0.02065489999949932, -0.010505049489438534, -0.08105671405792236, -0.003281163051724434, -0.0447552427649498, -0.05164612829685211, 0.007135086692869663, 0.02909090742468834, 0.02914418652653694, 0.04067043960094452, 0.02113441936671734, 0.03310466930270195, 0.01739593595266342, -0.06315461546182632, -0.07871239632368088, -0.05157508701086044, -0.006673326250165701, 0.08439559489488602, 0.013151292689144611, 0.017688976600766182, -0.01055832952260971, 0.03308691084384918, 0.04436452314257622, -0.019322898238897324, 0.009608169086277485, 0.04940836504101753, -0.0028482626657932997, -0.04205571860074997, 0.004468864295631647, 0.03321123123168945, 0.0147052938118577, 0.07061382383108139, 0.06375846266746521, -0.010789209976792336, 0.00921744853258133, 0.0754445493221283, -0.014980574138462543, 0.021471859887242317, 0.007032966706901789, -0.003787323599681258, -0.07999111711978912, 0.008009767159819603, -0.02559218369424343, -0.001850371714681387, 0.07139526307582855, -0.005279164761304855, 0.020317459478974342, -0.0020712618716061115, -0.08475080132484436, -0.01902097836136818, 0.03907203674316406, -0.02731490507721901, 0.06269285827875137, -0.010380730032920837, 0.06134309619665146, 0.04898212477564812, -0.022874901071190834, -0.02308802120387554, 0.01151737105101347, -0.04869796708226204, -0.04713508486747742, -0.0710400640964508, 0.03147074952721596, -0.011952491477131844, 0.00040626036934554577, 0.017022976651787758, 0.06684870272874832, 0.020104339346289635, 0.003236762946471572, 0.051433008164167404, -0.018204016610980034, 0.03294483199715614, -0.023141302168369293, 0.032287709414958954, -0.01342657208442688, 0.017893217504024506, -0.018275057896971703, -0.008271727710962296, 0.011952491477131844, -0.023389941081404686, 0.0708269476890564, -0.08254855871200562, 0.013169052079319954, -0.001093351049348712, 0.012440891936421394, -0.009812409058213234, 0.007099566515535116, -0.08922632038593292, -0.05573093146085739, -0.013124652206897736, 0.03223443031311035, -0.009155288338661194, -0.035431232303380966, 0.034720830619335175, 0.0147052938118577, 0.05850149318575859, -0.00499944481998682, 0.017955375835299492, -0.01105561014264822, 0.03482739254832268, -0.0728871077299118, -0.04170051962137222, 0.13277387619018555, 0.03573315218091011, -0.06933510303497314, -0.020051058381795883, 0.009066488593816757, -0.089723601937294, 0.007761127315461636, -0.017555776983499527, -0.06013541668653488, 0.016969695687294006, -0.004657564219087362, -0.017520256340503693, -0.0006931956741027534, -0.027137305587530136, 0.01266289222985506, 0.015309134498238564, -0.011162170208990574, 0.05953157693147659, -0.00974136870354414, -0.01536241453140974, 0.0070684864185750484, -0.040634918957948685, -0.07114662975072861, -0.044719722121953964, 0.05558885261416435, 0.010673769749701023, -0.09071816504001617, 0.006908646319061518, 0.03631923347711563, 0.02026417851448059, 0.008653568103909492, 0.03395714983344078, 0.03040514886379242, -0.00032994779758155346, -0.014065933413803577, 0.05178820714354515, 0.0765811875462532, 0.019464978948235512, 0.013302252627909184, -0.00990120880305767, -0.0012254411121830344, -0.02216450124979019, -0.001025640987791121, -0.007916527800261974, -0.06294149905443192, -0.035306911915540695, -0.019305137917399406, 0.03393939137458801, 0.009732489474117756, 0.07302919030189514, -0.05910533666610718, 0.06141413748264313, -0.005603285040706396, -0.04390276223421097, 0.02401154302060604, -0.012689531780779362, 0.0025041622575372458, -0.024757463485002518, -0.043192360550165176, 0.00720612658187747, 0.03482739254832268, -0.03303363174200058, 0.031293150037527084, 0.025574423372745514, -0.05569541081786156, 0.04884004592895508, 0.0015917414566501975, -0.004857364576309919, 0.013639693148434162, -0.007032966706901789, 0.004888444673269987, -0.0012909312499687076, 0.015255854465067387, 0.02605394460260868, -0.01039848942309618, 0.02276834100484848, -0.0006709956214763224, -0.04791652411222458, -0.010434010066092014, -0.06564102321863174, 0.012192251160740852, -0.0177067369222641, 0.007636806927621365, 0.02724386565387249, 0.04042179882526398, 0.00983904954046011, 0.0019591518212109804, -0.0038517036009579897, -0.003878343617543578, 0.029854588210582733, 0.012138971127569675, -0.027794426307082176, -0.01617937535047531, -0.02553890459239483, -0.022750580683350563, -0.011757130734622478, -0.039320677518844604, 0.12744587659835815, 0.048662446439266205, -0.030245307832956314, -0.03605283424258232, -0.05679653212428093, -0.02461538277566433, 0.0661027804017067, 0.023016981780529022, -0.03697635605931282, -0.015060493722558022, 0.001804861705750227, -0.003811743576079607, 0.018541457131505013, -0.042801640927791595, 0.06546342372894287, -0.007508046925067902, -0.0008036407525651157, -0.013115772046148777, -0.040776997804641724, 0.03278499096632004, -0.010247529484331608, -0.009661449119448662, -0.0068464865908026695, -0.023016981780529022, -0.06901542097330093, -0.022057941183447838, -0.01749361678957939, 0.0023332221899181604, -0.043405480682849884, 0.03450771048665047, 0.032145630568265915, -0.0009201908833347261, -0.046815402805805206, 0.02909090742468834, -0.06986790150403976, -0.04443556070327759, 0.026071704924106598, 0.023656342178583145, -0.02553890459239483, 0.06194693595170975, 0.02184482105076313, 0.014563213102519512, -0.06564102321863174, -0.04226883873343468, -0.07135974615812302, 0.021400820463895798, -0.0007831057300791144, 0.024047061800956726, 0.022057941183447838, 0.08254855871200562, 0.03415251150727272, 0.02427794225513935, 0.03836163505911827, 0.04717060551047325, -0.0033522031735628843, 0.019642578437924385, -0.020566098392009735, 0.056761011481285095, -0.018257297575473785, -0.05615717172622681, 0.018275057896971703, -0.029126426205039024, 0.047525804489851, -0.019855698570609093, -0.048662446439266205, -0.008364968001842499, 0.004866244737058878, -0.03152402862906456, 0.02065489999949932, -0.011135530658066273, 0.005230324808508158, -0.01266289222985506, 0.01506937388330698, 0.04099011793732643, -0.06002885475754738, -0.001475191325880587, -0.03198578953742981, -0.041558437049388885, -0.02585858479142189, 0.008418248035013676, -0.02177377976477146, 0.06304805725812912, -0.04677988216280937, -0.012654012069106102, -0.02559218369424343, 0.03425907343626022, 0.021933620795607567, -0.0190920177847147, -0.03797091543674469, 0.04667332395911217, -0.014323453418910503, -0.07459206879138947, -0.012494171969592571, -0.026036184281110764, 0.011135530658066273, -0.04898212477564812, -0.0661027804017067, -0.015655454248189926, -0.02111665904521942, 0.0018370517063885927, -0.021294260397553444, -0.08240647614002228, -0.0438317209482193, 0.04269507899880409, -0.015966255217790604, -0.023727381601929665, -0.04422244057059288, -0.00855144765228033, 0.03147074952721596, -0.028646906837821007, -0.003720723558217287, -0.02665778435766697, 0.011162170208990574, 0.02225330099463463, -0.05573093146085739, 0.011863690800964832, 0.03456099331378937, 0.004910644609481096, -0.013160171918570995, -0.005177044775336981, -0.01466977410018444, -0.029179707169532776, -0.06770118325948715, 0.03651459515094757, 0.06272837519645691, 0.02600066363811493, 0.047028522938489914, 0.018701298162341118, 0.12268619239330292, 0.058146294206380844, 0.01875457726418972, -0.013790653087198734, 0.05850149318575859, -0.014652013778686523, -0.028273945674300194, 0.024384502321481705, 0.01822177693247795, -0.005532245151698589, -0.04145187884569168, -0.05256965011358261, -0.040102116763591766, 0.022786101326346397, 0.05068708583712578, -0.011490730568766594, 0.005656565073877573, 0.028344986960291862, 0.047881003469228745, -0.035377953201532364, 0.041167717427015305, -0.08730824291706085, -0.004049283917993307, -0.017449216917157173, 0.04180707782506943, 0.05253412947058678, 0.020566098392009735, 0.01907425746321678, -0.07494726777076721, 0.0069397264160215855, 0.0029259626753628254, -0.0066866460256278515, -0.005949605721980333, 0.0036341433878988028, 0.04994116723537445, 0.030831389129161835, 0.029765788465738297, -0.018470417708158493, 0.04461316019296646, 0.013666332699358463, 0.0016539015341550112, 0.02131202071905136, -0.021081140264868736, 0.0410611592233181, -0.008262847550213337, 0.00468864431604743, -0.0569741316139698, -0.06081029772758484, -0.009474968537688255, 0.04432900249958038, -0.016916416585445404, 0.0251481831073761, -0.042481958866119385, 0.038929957896471024, -0.02021089941263199, -0.015619934536516666, 0.005288044922053814, -0.020352978259325027, -0.015389054082334042, 0.00899988878518343, 0.0625152587890625, 0.0147052938118577, -0.010629369877278805, 0.005501165054738522, -0.005665445234626532, 0.03374402970075607, -0.011810410767793655, 0.01843489706516266, 0.0354134738445282, -0.03967587649822235, 0.050438448786735535, -0.007312686648219824, -0.007148406468331814, -0.05033188685774803, -0.019127538427710533, 0.003536463249474764, -0.016010655090212822, 0.0072327665984630585, 0.023247862234711647, 0.00015831389464437962, 0.010629369877278805, 0.024704182520508766, 0.023976022377610207, 0.03223443031311035, -0.035573314875364304, 0.09313352406024933, -0.0004248528857715428, 0.06755910068750381, 0.015246974304318428, -0.05569541081786156, 0.004773004446178675, -0.004946164786815643, 0.05700965225696564, -0.014989454299211502, -0.05395492911338806, -0.010336329229176044, -0.035164833068847656, 0.02617826499044895, -0.033992670476436615, 0.025894103571772575, -0.006855366285890341, -0.035626593977212906, -0.030760347843170166, 0.00953712873160839, -0.012973692268133163, -0.008302807807922363, 0.015460094437003136, 0.003951603546738625, -0.01105561014264822, 0.000267649011220783, -0.02342546172440052, -0.014962813816964626, 0.006375845987349749, -0.03072482906281948, -0.05285380780696869, -0.014172493480145931, -0.028380505740642548, 0.0021312020253390074, -0.03548451140522957, 0.007246086839586496, -0.010922410525381565, -0.019695857539772987, 0.037153955549001694, -0.006065045483410358, -0.06439781934022903, 0.026941945776343346, -0.035377953201532364, 0.010647130198776722, 0.031879231333732605, -0.018159616738557816, 0.07693639397621155, 0.0001719114079605788, -0.07736263424158096, -0.012458651326596737, -0.0033588630612939596, 0.020317459478974342, -0.03992451727390289, 0.0009412808576598763, 0.002417582320049405, 0.02644466422498226, -0.025840824469923973, 0.04354755952954292, -0.013435452245175838, -0.016063934192061424, -0.0023620822466909885, -0.08922632038593292, 0.041558437049388885, -0.04699300229549408, -0.013568652793765068, -0.04756132513284683, 0.001370851299725473, 0.006704406347125769, -0.024260181933641434, 0.062160056084394455, -0.03505827113986015, -0.02578754350543022, 0.07409478724002838, -0.009936729446053505, 0.005487845279276371, 0.06272837519645691, -0.02619602344930172, -0.024704182520508766, 0.017387056723237038, -0.04823620617389679, -0.041949160397052765, -0.011179930530488491, -0.042091239243745804, 0.045962922275066376, -0.0735975056886673, 0.014279053546488285, 0.017022976651787758, -0.03298034891486168, -0.014119213446974754, 0.04173604026436806, 0.026728825643658638, 0.00023712396796327084, 0.0336729921400547, 0.060703735798597336, 0.031080028042197227, 0.011650570668280125, 0.010052169673144817, 0.021400820463895798, -0.07231878489255905, 0.02067265845835209, 0.03369075059890747, 0.010949050076305866, 0.04830724373459816, 0.004522144328802824, 0.07651015371084213, 0.0177600160241127, 0.023727381601929665, 0.04717060551047325, 0.0010606059804558754, -0.0008230657549574971, 0.010984569787979126, 0.022732820361852646, -0.052676208317279816, 0.0830458402633667, 0.02578754350543022, 0.040315236896276474, 0.06837606430053711, -0.03321123123168945, -0.024366741999983788, 0.04567876085639, -0.05448773130774498, 0.007019646465778351, 0.026160504668951035, -0.012378731742501259, -0.03145299106836319, 0.012494171969592571, -0.01948273740708828, 0.028344986960291862, -0.004313463810831308, -0.04546564072370529, -0.0214540995657444, -0.00954600889235735, -0.008422687649726868, 0.07828615605831146, 0.0017815516330301762, 0.04408036172389984, -0.007983127608895302, 0.01805305667221546, 0.04045731946825981, 0.00820956751704216, 0.014172493480145931, 0.02790098637342453, -0.03456099331378937, 0.046708844602108, 0.032731711864471436, -0.010185369290411472, 0.023354422301054, -0.032731711864471436, -0.03857475519180298, -0.053599730134010315, -0.01581529527902603, 0.029978908598423004, -0.016916416585445404, -0.004986124578863382, 0.019198577851057053, 0.01792873628437519, 0.02053057961165905, 0.05612165108323097, -0.008316127583384514, 0.017227215692400932, 0.05644133314490318, -0.01039848942309618, 0.05633477121591568, -0.027545785531401634, 0.01953601837158203, 0.010647130198776722, 0.001939171808771789, -0.020583858713507652, -0.02527250349521637, 0.02685314416885376, -0.024295702576637268, 0.06574758142232895, -0.008351648226380348, 0.032074589282274246, -0.04972804710268974, -0.05079364776611328, -0.00552780507132411, 0.0372605137526989, -0.014589853584766388, 0.03461427241563797, -0.005092684645205736, -0.05146852880716324, -0.03797091543674469, -0.032021310180425644, -0.0015440114075317979, 0.019784659147262573, 0.034898433834314346, -0.0008857808425091207, 0.03131090849637985 ]
4,540
sklearn.base
get_params
Get parameters for this estimator. Parameters ---------- deep : bool, default=True If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns ------- params : dict Parameter names mapped to their values.
def get_params(self, deep=True): """ Get parameters for this estimator. Parameters ---------- deep : bool, default=True If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns ------- params : dict Parameter names mapped to their values. """ out = dict() for key in self._get_param_names(): value = getattr(self, key) if deep and hasattr(value, "get_params") and not isinstance(value, type): deep_items = value.get_params().items() out.update((key + "__" + k, val) for k, val in deep_items) out[key] = value return out
(self, deep=True)
[ 0.04388424754142761, -0.020006055012345314, -0.010159756988286972, -0.0001766087516443804, -0.03842637687921524, 0.006808511912822723, 0.01699131727218628, -0.04484306275844574, -0.015534655191004276, 0.07486136257648468, 0.012455382384359837, 0.007370894309133291, -0.03108774870634079, 0.021388961002230644, -0.04384737089276314, -0.028875097632408142, 0.0443267785012722, 0.014391452074050903, -0.022181827574968338, 0.002811910817399621, 0.006453565787523985, -0.03398263454437256, -0.012178801000118256, -0.012888693250715733, -0.01667785830795765, -0.01676083356142044, 0.0034918400924652815, -0.018724560737609863, 0.034203898161649704, 0.04170847684144974, -0.08076176792383194, -0.04207725077867508, -0.013995018787682056, 0.03165934979915619, -0.0067854635417461395, 0.005812819115817547, 0.00869387574493885, 0.08290066570043564, -0.10635476559400558, 0.012547575868666172, -0.011515005491673946, -0.053398650139570236, -0.007034386973828077, -0.023951949551701546, 0.044732432812452316, -0.0075552817434072495, 0.024025704711675644, 0.012298652902245522, 0.030553026124835014, -0.05417307838797569, 0.021462716162204742, -0.039532702416181564, 0.021776175126433372, 0.016069378703832626, -0.0248001329600811, -0.002247223863378167, 0.06376123428344727, -0.01921318843960762, 0.03527334704995155, 0.01456662081182003, -0.0150368083268404, -0.019932299852371216, 0.04145033285021782, -0.003330501029267907, -0.05531628057360649, -0.059004031121730804, -0.062138620764017105, 0.007887179963290691, -0.05505813658237457, 0.008025470189750195, -0.026644008234143257, -0.06416688114404678, 0.005319582298398018, 0.02072516642510891, -0.057676441967487335, 0.024597305804491043, -0.019821666181087494, -0.037910088896751404, 0.040344007313251495, 0.020301073789596558, -0.04937899857759476, -0.008633949793875217, -0.08503956347703934, -0.02819286473095417, -0.031179942190647125, -0.01723102107644081, -0.042040374130010605, -0.040344007313251495, 0.08312193304300308, 0.01649347133934498, -0.03722785785794258, 0.06748586148023605, 0.02279030717909336, 0.05092785507440567, 0.00835275836288929, -0.010095220990478992, -0.02623835578560829, 0.03901641443371773, -0.034001074731349945, -0.018226714804768562, -0.02500295825302601, 0.0035679000429809093, 0.0039297607727348804, 0.03422233834862709, 0.002957116113975644, -0.08607213199138641, -0.02247684821486473, -0.031548719853162766, 0.07434508204460144, -0.02078048326075077, -0.04451116546988487, 0.051333509385585785, -0.0580083392560482, 0.03267348185181618, 0.03912704810500145, -0.017083510756492615, 0.04277792200446129, 0.0075552817434072495, -0.004771029110997915, -0.013045422732830048, -0.021573349833488464, 0.10443713515996933, 0.005204339977353811, -0.02028263546526432, -0.043294209986925125, 0.008177589625120163, 0.02555612102150917, 0.03416702151298523, -0.0068453894928097725, -0.06512570381164551, 0.026773080229759216, -0.05295611917972565, -0.04181910678744316, -0.006259959191083908, 0.03831574320793152, -0.01481554377824068, 0.0843757688999176, 0.020485462620854378, -0.011671734973788261, -0.009108747355639935, 0.017083510756492615, 0.02902260795235634, -0.021702419966459274, 0.014262381009757519, 0.026773080229759216, -0.03298694267868996, 0.04074965789914131, 0.03623216226696968, 0.004969245754182339, -0.03276567533612251, -0.023693807423114777, 0.02623835578560829, 0.012012852355837822, -0.012750402092933655, -0.019010361284017563, -0.03309757262468338, 0.002853398211300373, -0.04299918934702873, -0.011662515811622143, -0.01387516688555479, -0.025832703337073326, 0.015488558448851109, -0.04923148825764656, -0.04580187797546387, 0.028303496539592743, 0.05719703435897827, -0.01456662081182003, -0.032931625843048096, -0.018318908289074898, -0.019010361284017563, -0.04111843556165695, 0.0024615745060145855, -0.05066971108317375, -0.031991247087717056, -0.016816148534417152, 0.028838220983743668, 0.012814938090741634, 0.02605396695435047, -0.01670551672577858, 0.028875097632408142, 0.025832703337073326, -0.007389333099126816, -0.027602823451161385, -0.04738761484622955, 0.021075502038002014, -0.027234047651290894, 0.026902150362730026, 0.01991386152803898, -0.06505194306373596, 0.005195120815187693, 0.012206459417939186, 0.033632297068834305, 0.0184571985155344, 0.04196661710739136, -0.011284520849585533, 0.02751062996685505, 0.03894266113638878, 0.036951273679733276, -0.0015016065444797277, 0.14470738172531128, 0.01299932599067688, -0.026514936238527298, 0.002194212516769767, -0.00379147008061409, -0.026422742754220963, -0.00649966299533844, 0.01971103437244892, -0.028561638668179512, 0.028616955503821373, -0.01535026729106903, -0.007624427322298288, -0.014133309945464134, 0.08046674728393555, 0.0031829909421503544, 0.026828395202755928, 0.0025906458031386137, -0.01240006648004055, -0.023030010983347893, 0.029428260400891304, -0.03372449055314064, 0.054025568068027496, -0.005310362670570612, 0.054541852325201035, 0.006393639836460352, -0.001744767650961876, -0.02260592021048069, -0.008578632958233356, -0.04967401921749115, -0.06601075828075409, -0.053398650139570236, 0.01921318843960762, -0.012483040802180767, -0.009698787704110146, 0.0036531793884932995, 0.011893000453710556, 0.0066886600106954575, -0.03824198991060257, -0.05564817786216736, 0.005531628150492907, -0.0007623274577781558, 0.02009824849665165, 0.021149257197976112, -0.049452755600214005, 0.015958746895194054, -0.0487520806491375, -0.05756580829620361, 0.038647640496492386, 0.01605094037950039, 0.03140120953321457, -0.02474481612443924, 0.09381640702486038, -0.0008418446523137391, -0.026975905522704124, 0.03617684543132782, -0.022366216406226158, -0.014382232911884785, 0.027602823451161385, 0.06099541857838631, 0.021499594673514366, -0.007730450015515089, 0.018383443355560303, -0.014059554785490036, -0.04749824479222298, 0.04469555243849754, 0.002155030146241188, 0.00192339310888201, 0.03986459970474243, -0.008154541254043579, -0.06649016588926315, -0.008131492882966995, 0.0885060504078865, -0.006932973861694336, -0.008514096960425377, 0.015811236575245857, 0.003597863018512726, -0.022089634090662003, 0.03346635028719902, -0.02738155797123909, -0.05085410177707672, -0.0024730986915528774, 0.02148115448653698, -0.04598626866936684, -0.011450469493865967, -0.010251950472593307, 0.01793169416487217, 0.006342933513224125, 0.018724560737609863, 0.03298694267868996, -0.01516588032245636, -0.005208949558436871, 0.015672946348786354, -0.009625032544136047, 0.015755919739603996, -0.021130818873643875, 0.01879831589758396, -0.025519244372844696, -0.034701745957136154, -0.03717254102230072, 0.015239635482430458, 0.04572812467813492, 0.03637967258691788, 0.040344007313251495, -0.05000591650605202, 0.015267292968928814, 0.03868451714515686, 0.0380575992166996, 0.05789770558476448, 0.0075414530001580715, -0.024154774844646454, -0.017664331942796707, -0.004176379181444645, 0.06630577892065048, 0.013174493797123432, 0.030718974769115448, -0.01952664740383625, -0.08356446027755737, 0.012676647864282131, -0.02362005226314068, 0.04244602471590042, 0.0570126473903656, -0.00405191769823432, 0.06737522780895233, 0.0026413523592054844, -0.0382051095366478, 0.02065141126513481, 0.0019798618741333485, -0.009325402788817883, 0.03612153232097626, -0.027897844091057777, -0.020614532753825188, -0.03125369921326637, -0.020116686820983887, 0.05756580829620361, 0.04554373770952225, -0.011063256300985813, 0.06224925443530083, 0.01756291836500168, 0.05081722140312195, -0.01720336265861988, -0.0017966267187148333, 0.04414239153265953, -0.009634251706302166, -0.015783578157424927, -0.03252597153186798, -0.06737522780895233, -0.009754103608429432, 0.017765745520591736, 0.06361372023820877, 0.04753512144088745, -0.027621261775493622, -0.030239567160606384, 0.014880078844726086, 0.050706591457128525, 0.03761507198214531, 0.004012735094875097, 0.026109283789992332, -0.0015638372860848904, -0.015221196226775646, 0.007873350754380226, -0.04189286381006241, 0.07604144513607025, -0.029280750080943108, -0.011358276009559631, -0.00003237586861359887, 0.07150550931692123, -0.022126512601971626, -0.015488558448851109, 0.020301073789596558, 0.1036258339881897, -0.0592990517616272, 0.0011927572777494788, -0.028285058215260506, 0.030165812000632286, -0.0011184259783476591, 0.021868368610739708, 0.044732432812452316, -0.05970470607280731, 0.00814532209187746, 0.012132704257965088, 0.007398552261292934, 0.03202812746167183, -0.03761507198214531, 0.049821529537439346, -0.024210091680288315, 0.03975396603345871, -0.04288855567574501, 0.0688503310084343, 0.00709431292489171, 0.06991977989673615, -0.05210793390870094, -0.04580187797546387, -0.016281425952911377, -0.09897926449775696, 0.055242523550987244, 0.010703700594604015, -0.06011035665869713, 0.015755919739603996, -0.01149656716734171, -0.09425894170999527, -0.0685553103685379, 0.0067347572185099125, -0.06733835488557816, -0.005287314299494028, -0.017341652885079384, 0.0215917881578207, -0.056496359407901764, -0.002844178816303611, 0.04893646761775017, 0.035199593752622604, -0.045359350740909576, -0.03276567533612251, -0.023140644654631615, 0.0008833318715915084, -0.018328126519918442, 0.018853632733225822, -0.01688990369439125, 0.05417307838797569, 0.0444742888212204, 0.05181291699409485, -0.011846903711557388, 0.051333509385585785, -0.032950062304735184, -0.030718974769115448, 0.014271600171923637, 0.043994881212711334, 0.03213875740766525, -0.06652704626321793, 0.0016433544224128127, 0.03975396603345871, 0.01793169416487217, -0.030221126973628998, 0.01541480328887701, -0.05037469044327736, -0.03202812746167183, -0.004494447726756334, 0.00960659421980381, 0.015774359926581383, 0.013967360369861126, 0.005886574275791645, 0.05210793390870094, -0.030442392453551292, 0.0019199359230697155, -0.02085423842072487, -0.04089716821908951, -0.017101949080824852, 0.002756594680249691, 0.035955581814050674, 0.05361991375684738, -0.0072279940359294415, -0.03615840896964073, 0.06033162400126457, -0.03868451714515686, 0.0726855918765068, -0.05513189360499382, 0.011201546527445316, -0.0012722744140774012, 0.05708640068769455, -0.013229810632765293, 0.0076520852744579315, 0.03960645571351051, 0.05443121865391731, -0.023896632716059685, 0.0009542058105580509, 0.02065141126513481, -0.055242523550987244, -0.010703700594604015, 0.05439434200525284, -0.013146835379302502, -0.0020974089857190847, 0.00439072959125042, 0.07401318103075027, 0.013782973401248455, -0.013764534145593643, -0.04517496004700661, -0.03794696927070618, 0.024339163675904274, 0.007145019248127937, 0.0008821794181130826, -0.06346621364355087, -0.048198919743299484, -0.015562313608825207, -0.0645725354552269, 0.03272879868745804, -0.011920657940208912, -0.004480618517845869, -0.04251978173851967, -0.06353996694087982, 0.0026298281736671925, -0.0392008051276207, -0.03464642912149429, -0.05483687296509743, 0.01858627051115036, 0.04388424754142761, 0.05162852630019188, -0.012215678580105305, 0.022458409890532494, 0.03872139751911163, 0.018355784937739372, 0.014299258589744568, 0.010242731310427189, -0.019268503412604332, -0.016871465370059013, 0.06748586148023605, 0.027897844091057777, -0.02881978265941143, -0.025132030248641968, 0.028100669384002686, 0.004909319803118706, -0.01268586702644825, 0.023564735427498817, -0.0017378531629219651, -0.03660093992948532, -0.050153426826000214, 0.04181910678744316, -0.026459621265530586, -0.07180052995681763, 0.0028188254218548536, 0.006315275095403194, 0.00643512699753046, 0.0011714374413713813, 0.0805405005812645, -0.011533444747328758, 0.010869649238884449, -0.042741045355796814, 0.028782904148101807, 0.03379824757575989, -0.05834023654460907, 0.003657788969576359, -0.011293740011751652, 0.01516588032245636, 0.07353377342224121, -0.03868451714515686, -0.02448667399585247, 0.04170847684144974, -0.0063613723032176495, -0.008924359455704689, 0.028875097632408142, -0.029926108196377754, -0.06022099032998085, 0.06276553869247437, 0.04074965789914131, -0.008855214342474937, 0.0007277547847479582, 0.026348987594246864, 0.08201560378074646, 0.007905618287622929, 0.020927991718053818, -0.0002937236858997494, 0.007463088259100914, -0.048825837671756744, 0.031677789986133575, -0.0173877514898777, -0.08164682984352112, -0.017286337912082672, -0.010694480501115322, -0.0005592129891738296, -0.009873955510556698, -0.0363427959382534, -0.006840779911726713, 0.008394245058298111, 0.054615605622529984, 0.003945894539356232, 0.014870859682559967, 0.01996917650103569, -0.02028263546526432, 0.0010124031687155366, -0.0259433351457119, 0.0759676918387413, -0.101486936211586, -0.009929272346198559, 0.016355179250240326, 0.03191749379038811, -0.01934225857257843, 0.004240914713591337, 0.03960645571351051, 0.0296495258808136, 0.011266082525253296, 0.032249391078948975, -0.033503226935863495, -0.00185309536755085, 0.08400698751211166, -0.01877065747976303, -0.0005678561865352094, 0.022974694147706032, -0.04834643006324768, 0.02373068407177925, -0.010122879408299923, 0.01652112975716591, 0.0052181691862642765, -0.030718974769115448, -0.013478733599185944, -0.012483040802180767, -0.011090913787484169, 0.023085327818989754, -0.0045820316299796104, 0.013082300312817097, -0.06940349191427231, 0.009025773033499718, -0.0013045422965660691, -0.08533458411693573, -0.024505112320184708, 0.02148115448653698, 0.04572812467813492, 0.00632910430431366, -0.021647104993462563, -0.041782230138778687, 0.0024707939010113478, 0.05384117737412453, 0.039163924753665924, 0.04049151763319969, 0.024154774844646454, -0.027049660682678223, 0.03875827416777611, -0.05103848874568939, -0.01915787160396576, 0.023527856916189194, -0.019047239795327187, -0.033503226935863495, 0.03414858505129814, -0.04240914806723595, -0.004512886516749859, -0.00849565863609314, -0.039163924753665924, 0.006767024751752615, -0.0889485776424408, -0.02889353595674038, -0.011321398429572582, -0.09897926449775696, 0.020245758816599846, -0.03901641443371773, 0.021241450682282448, -0.010427119210362434, 0.036010898649692535, -0.05450497567653656, 0.015866553410887718, 0.00013548166316468269, 0.04749824479222298, -0.04635504260659218, -0.04768263176083565, 0.012252556160092354, -0.00020109771867282689, 0.04996903985738754, -0.05361991375684738, 0.0042547439225018024, -0.02461574412882328, 0.0030861874110996723, -0.03685908019542694, 0.0022172608878463507, 0.0696985125541687, -0.0075184041634202, 0.0016548787243664265, 0.023454101756215096, -0.01984010636806488, 0.015866553410887718, -0.0008274393621832132, -0.05657011643052101, 0.012879474088549614, 0.03416702151298523, 0.02719717100262642, -0.008633949793875217, -0.036453429609537125, -0.023656928911805153, 0.009901613928377628, -0.05564817786216736, 0.011210765689611435, 0.02555612102150917, -0.07205867022275925, 0.009883175604045391, 0.04038088396191597, -0.019581962376832962, -0.005305753089487553, 0.02976015768945217, 0.04303606599569321, -0.01027038972824812, -0.020374828949570656, 0.054541852325201035, -0.004729541949927807, -0.026736201718449593, -0.008237515576183796, 0.015294951386749744, 0.014243941754102707, 0.04779326543211937, -0.004533630330115557, 0.0592990517616272, -0.0005998358828946948, -0.036711569875478745, 0.020116686820983887, 0.019692596048116684, 0.0005203187465667725, -0.011634857393801212, -0.050743468105793, -0.05199730396270752, 0.03964333236217499, 0.013718437403440475, 0.04049151763319969, -0.004118757788091898, -0.014529743231832981, -0.06748586148023605, 0.02806379273533821, 0.011911438778042793, -0.055869441479444504, -0.010731358081102371, -0.015488558448851109, -0.0009582393104210496, 0.017028193920850754, 0.05129662901163101, 0.057750195264816284, 0.003738458501175046, 0.04192974045872688, -0.04842018336057663, -0.019858544692397118, -0.022882500663399696, -0.03696971386671066, -0.07574642449617386, 0.04089716821908951, 0.05321425944566727, 0.019545085728168488, 0.03986459970474243, -0.014077993109822273, 0.03448048233985901, 0.02618303894996643, 0.014741788618266582, 0.04978465288877487, 0.013663121499121189, -0.017212582752108574, 0.05439434200525284, -0.02437604032456875, -0.0040887948125600815, 0.0476088784635067, -0.025076713413000107, 0.022679675370454788, -0.020301073789596558, -0.04063902795314789, -0.038537006825208664, -0.02505827508866787, -0.02920699492096901, 0.09625032544136047, -0.020006055012345314, -0.012363188900053501, 0.021647104993462563, 0.02286406233906746, 0.06630577892065048, -0.013635463081300259, 0.04753512144088745, 0.017765745520591736, -0.004761809948831797, 0.010003027506172657, -0.03213875740766525, 0.07095234841108322, -0.07759030163288116, 0.0030677486211061478, 0.008776850067079067, 0.005019952543079853, -0.04985840618610382, 0.0031000166200101376, 0.010196634568274021, -0.026644008234143257, -0.02161022648215294, -0.010777454823255539, -0.031032433733344078, -0.028211303055286407, -0.05959407240152359, 0.0052181691862642765, -0.018696902319788933, 0.020430145785212517, 0.025261100381612778, 0.02894885279238224, -0.009348451159894466 ]
4,541
optbinning.binning.binning_process
get_support
Get a mask, or integer index, or names of the variables selected. Parameters ---------- indices : boolean (default=False) If True, the return value will be an array of integers, rather than a boolean mask. names : boolean (default=False) If True, the return value will be an array of strings, rather than a boolean mask. Returns ------- support : array An index that selects the retained features from a feature vector. If `indices` is False, this is a boolean array of shape [# input features], in which an element is True iff its corresponding feature is selected for retention. If `indices` is True, this is an integer array of shape [# output features] whose values are indices into the input feature vector. If `names` is True, this is an string array of sahpe [# output features], whose values are names of the selected features.
def get_support(self, indices=False, names=False): """Get a mask, or integer index, or names of the variables selected. Parameters ---------- indices : boolean (default=False) If True, the return value will be an array of integers, rather than a boolean mask. names : boolean (default=False) If True, the return value will be an array of strings, rather than a boolean mask. Returns ------- support : array An index that selects the retained features from a feature vector. If `indices` is False, this is a boolean array of shape [# input features], in which an element is True iff its corresponding feature is selected for retention. If `indices` is True, this is an integer array of shape [# output features] whose values are indices into the input feature vector. If `names` is True, this is an string array of sahpe [# output features], whose values are names of the selected features. """ self._check_is_fitted() if indices and names: raise ValueError("Only indices or names can be True.") mask = self._support if indices: return np.where(mask)[0] elif names: return np.asarray(self.variable_names)[mask] else: return mask
(self, indices=False, names=False)
[ 0.03212897852063179, -0.05944475904107094, -0.014992938376963139, -0.025067279115319252, 0.009029138833284378, 0.02571723610162735, -0.01780356466770172, 0.02515511028468609, 0.04215940460562706, 0.03435991331934929, 0.0035440248902887106, -0.0016732013318687677, -0.021044569090008736, -0.053437042981386185, -0.0001630383194424212, -0.03678407892584801, 0.0031948923133313656, 0.02107970230281353, -0.011444521136581898, 0.026771221309900284, -0.03091689571738243, -0.031338490545749664, 0.014061917550861835, -0.00797954574227333, 0.016626615077257156, 0.030143974348902702, 0.039137981832027435, -0.03664354979991913, -0.005919883027672768, -0.021448597311973572, -0.09865300357341766, -0.006763071287423372, -0.02989804372191429, 0.04711313545703888, -0.0016578307840973139, -0.0176279004663229, 0.003985381219536066, 0.05561527982354164, 0.09619370847940445, 0.006894819438457489, -0.010768214240670204, -0.08305402845144272, 0.04458357021212578, -0.019129829481244087, -0.09148591011762619, 0.0012856422690674663, 0.006407351233065128, 0.025611838325858116, 0.016205020248889923, 0.034886907786130905, 0.05083721503615379, -0.004892247729003429, 0.012524856254458427, -0.025067279115319252, -0.03973523899912834, 0.0029775078874081373, 0.05136420577764511, 0.03511527180671692, 0.004294989164918661, -0.023328203707933426, 0.007197840139269829, 0.024540286511182785, 0.060042016208171844, 0.009380467236042023, -0.008344048634171486, -0.013596408069133759, 0.003219046164304018, -0.017355620861053467, -0.004141283221542835, 0.05835564061999321, -0.020781073719263077, -0.04939676821231842, 0.004593618214130402, 0.016169888898730278, 0.0469726026058197, -0.03822452574968338, -0.014843623153865337, -0.02991561032831669, 0.005037170369178057, -0.009002789855003357, 0.008699769154191017, 0.003833870869129896, -0.0072285812348127365, -0.00305655668489635, 0.04475923255085945, -0.013956519775092602, -0.03455314412713051, 0.002479060785844922, 0.07314656674861908, -0.10279867798089981, -0.011514787562191486, 0.038505587726831436, 0.04215940460562706, 0.03980550542473793, -0.04033249616622925, -0.019779786467552185, 0.010662815533578396, -0.0123843252658844, -0.024557853117585182, -0.003390318714082241, -0.052488457411527634, 0.03023180551826954, -0.03695974498987198, 0.018637970089912415, -0.04019196704030037, 0.0004048510454595089, -0.024838915094733238, -0.027790073305368423, -0.008357223123311996, -0.05424509942531586, 0.03832992538809776, -0.020306779071688652, 0.028369765728712082, -0.0010435550939291716, -0.05944475904107094, -0.03262083977460861, -0.008273783139884472, -0.025875333696603775, -0.07258444279432297, -0.006741113029420376, -0.00977571215480566, 0.01784748025238514, -0.0008656950667500496, 0.028211668133735657, -0.008550453931093216, -0.001130838179960847, 0.04286206141114235, 0.03536120057106018, 0.09492892771959305, -0.015730727463960648, 0.021993156522512436, -0.018427172675728798, -0.04971296340227127, 0.07504373788833618, 0.03448287770152092, 0.0000928412628127262, 0.008387965150177479, 0.0017280963947996497, 0.0038316750433295965, -0.0011330340057611465, 0.00022767725749872625, -0.012937666848301888, -0.00730323838070035, 0.042510733008384705, -0.040613558143377304, -0.006925560534000397, 0.07539507001638412, -0.039137981832027435, -0.03513283655047417, -0.0260334312915802, 0.006157029420137405, 0.014536211267113686, -0.07131966203451157, -0.03885691612958908, -0.03378022089600563, 0.009433167055249214, 0.0020629563368856907, -0.06812257319688797, 0.02088647149503231, -0.02280121110379696, -0.0025976342149078846, -0.01847987249493599, -0.058250244706869125, 0.05709085986018181, 0.03174251690506935, 0.058004312217235565, -0.0024900399148464203, -0.0130167156457901, 0.02164182811975479, 0.04328365623950958, -0.00560368737205863, 0.06520654261112213, -0.029423750936985016, 0.016038140282034874, -0.006846511736512184, 0.03181278333067894, -0.03467610850930214, -0.02533077448606491, 0.05445589870214462, 0.042194537818431854, 0.05276951938867569, 0.00002485716868250165, -0.08839421719312668, -0.04725366458296776, 0.02057027630507946, -0.0013800617307424545, -0.018690669909119606, 0.03140875697135925, 0.0031597595661878586, 0.03370995819568634, 0.011927598156034946, 0.009696663357317448, 0.06229051947593689, 0.037943463772535324, -0.01488753966987133, -0.0032146545127034187, -0.047218531370162964, 0.009433167055249214, -0.010531067848205566, -0.041105419397354126, 0.028158968314528465, -0.01768060028553009, -0.02819410152733326, 0.06759557873010635, -0.0053753238171339035, 0.034184250980615616, 0.07483293861150742, -0.012112045660614967, -0.0876212939620018, 0.0014097050298005342, 0.019340626895427704, -0.01097901165485382, -0.004944946616888046, 0.05561527982354164, 0.04704286903142929, 0.02324037067592144, 0.060604143887758255, 0.024733517318964005, 0.03221680968999863, 0.019955450668931007, 0.030688533559441566, -0.01111075934022665, 0.03832992538809776, 0.0793299451470375, 0.02253771387040615, -0.04100001975893974, -0.003923898562788963, 0.014518644660711288, -0.003060948336496949, -0.046340212225914, 0.016038140282034874, -0.026244228705763817, -0.026525292545557022, -0.017504936084151268, 0.034184250980615616, 0.029950743541121483, 0.05719625949859619, -0.017425887286663055, 0.07651931792497635, 0.028404898941516876, 0.025892900303006172, 0.0326911062002182, 0.029599415138363838, 0.01729413866996765, 0.006758679635822773, -0.007970762439072132, 0.026771221309900284, 0.003381535643711686, 0.004461870063096285, -0.016960376873612404, -0.030056141316890717, -0.00019103479280602187, -0.006438092328608036, 0.02462811768054962, -0.011277640238404274, 0.05055615305900574, -0.02057027630507946, 0.004024905618280172, -0.013324128463864326, -0.03924337774515152, -0.006960693281143904, 0.0022572847083210945, -0.02578750252723694, 0.022836344316601753, -0.03281407058238983, -0.046129412949085236, 0.04897517338395119, 0.01437811367213726, -0.0349220409989357, -0.026490159332752228, -0.05090748146176338, 0.03207628056406975, -0.051329076290130615, -0.05125880986452103, -0.018075844272971153, -0.0314263217151165, 0.0358881913125515, 0.027965737506747246, -0.039208244532346725, 0.056739531457424164, -0.021062135696411133, 0.009239936247467995, -0.042440466582775116, 0.08438907563686371, -0.0076896995306015015, -0.015344266779720783, 0.014966588467359543, 0.024803781881928444, -0.0007767650531604886, -0.04767525941133499, -0.0038668077904731035, 0.0425458662211895, 0.05389377102255821, -0.09183723479509354, -0.026876620948314667, 0.009538564831018448, -0.014518644660711288, -0.03557199612259865, 0.044091708958148956, 0.02710498310625553, 0.00760625908151269, 0.002937983488664031, -0.04107028618454933, -0.007874147035181522, 0.004431128967553377, -0.08677810430526733, 0.05898803472518921, -0.022520149126648903, 0.03752186894416809, 0.032410040497779846, 0.019217662513256073, -0.06678752601146698, 0.04482949897646904, -0.0399811677634716, -0.019920319318771362, -0.057547587901353836, -0.0058320509269833565, 0.0130167156457901, 0.03499230369925499, 0.04609428346157074, 0.012428240850567818, 0.02513754554092884, 0.003959031775593758, -0.027790073305368423, -0.012261359952390194, -0.002582263434305787, -0.06197432428598404, -0.045356493443250656, -0.016872545704245567, 0.0419134758412838, -0.11165215820074081, -0.0056959111243486404, 0.039594706147909164, 0.020921604707837105, -0.0063590435311198235, 0.004330121912062168, 0.032287076115608215, 0.053753241896629333, 0.007768748328089714, 0.02234448492527008, -0.02482134848833084, -0.018497439101338387, -0.08115684986114502, 0.06320397555828094, 0.008093726821243763, 0.012682953849434853, 0.014501078054308891, 0.054139699786901474, 0.05175066739320755, 0.02501457929611206, -0.015353050082921982, -0.03358699381351471, 0.01447472907602787, 0.024399755522608757, 0.003473759163171053, 0.023152539506554604, 0.011145892553031445, 0.02297687530517578, 0.024874048307538033, -0.011277640238404274, 0.0003436430706642568, -0.013543708249926567, 0.030003443360328674, -0.009898676536977291, -0.041491881012916565, -0.06320397555828094, 0.0014700896572321653, 0.03804886341094971, -0.012164744548499584, -0.07406002283096313, 0.01288496796041727, 0.010680382139980793, -0.03759213536977768, 0.019656822085380554, -0.0022485016379505396, 0.009064272046089172, -0.021308066323399544, -0.005151352379471064, -0.001897173235192895, -0.06699831783771515, -0.037943463772535324, 0.019375760108232498, -0.02952914871275425, 0.049361634999513626, -0.003383731236681342, -0.030196672305464745, -0.05059128627181053, -0.06467955559492111, 0.02083377167582512, 0.04767525941133499, 0.03339376300573349, -0.02185262367129326, -0.06085007265210152, 0.011260074563324451, -0.02413625828921795, -0.04184320941567421, 0.008761251345276833, 0.025049712508916855, 0.0016248937463387847, 0.0030016617383807898, -0.0014667959185317159, 0.03674894571304321, -0.06952788680791855, 0.0053709326311945915, -0.04033249616622925, 0.038751520216464996, 0.042510733008384705, -0.038751520216464996, -0.012138395570218563, 0.012841051444411278, -0.03832992538809776, 0.03727594017982483, -0.012261359952390194, -0.012129612267017365, 0.0008920446853153408, 0.07609772682189941, -0.022713378071784973, 0.002643745858222246, 0.027315780520439148, 0.023380903527140617, 0.016652964055538177, -0.018444739282131195, -0.006934343837201595, 0.007175881881266832, 0.015502364374697208, 0.01010069064795971, -0.05238305777311325, 0.002472473308444023, 0.006727938074618578, 0.051399338990449905, -0.0799623355269432, -0.074903205037117, -0.013411960564553738, -0.04525109380483627, 0.02457541972398758, -0.04795632138848305, -0.03262083977460861, -0.019024431705474854, -0.06250131875276566, -0.01609962247312069, -0.0018861942226067185, -0.016284069046378136, 0.019902752712368965, 0.05224252864718437, -0.01865553669631481, -0.09099404513835907, -0.0412810817360878, 0.04100001975893974, -0.08164871484041214, -0.07314656674861908, 0.013824771158397198, -0.0016666139708831906, 0.030881764367222786, -0.019217662513256073, 0.09317228198051453, 0.03181278333067894, -0.043213389813899994, 0.008181558921933174, 0.06594433635473251, -0.00003010650834767148, 0.027579277753829956, -0.03573009371757507, -0.042194537818431854, 0.008862257935106754, -0.005423631519079208, -0.0023604873567819595, 0.03156685456633568, -0.07223311066627502, -0.024347055703401566, -0.01120737474411726, 0.05073181539773941, -0.031022295355796814, -0.032410040497779846, -0.07968127727508545, -0.04012170061469078, 0.03327079489827156, -0.031022295355796814, 0.08438907563686371, 0.03290190175175667, -0.047710392624139786, -0.03706514462828636, -0.04641047865152359, -0.0014898518566042185, 0.017908964306116104, -0.029950743541121483, -0.04033249616622925, 0.014957805164158344, -0.007803881540894508, -0.046375345438718796, -0.00868220254778862, 0.06812257319688797, -0.034886907786130905, 0.029810212552547455, -0.015440882183611393, 0.026525292545557022, -0.021887756884098053, 0.05224252864718437, -0.0027579276356846094, 0.030196672305464745, 0.06650646030902863, 0.037943463772535324, -0.01521251816302538, -0.04915083944797516, 0.017320487648248672, 0.020113548263907433, -0.06847389787435532, 0.013245079666376114, -0.03339376300573349, 0.016828628256917, -0.024364622309803963, -0.031338490545749664, -0.030758798122406006, 0.019955450668931007, 0.04465383663773537, 0.06320397555828094, 0.03325323015451431, -0.014299064874649048, 0.016064489260315895, 0.004909813869744539, 0.020868904888629913, -0.029177820309996605, 0.024540286511182785, -0.009705445729196072, -0.0026547249872237444, 0.024470020085573196, 0.02120266668498516, -0.017522502690553665, 0.005818875972181559, 0.019656822085380554, 0.06594433635473251, -0.0025449348613619804, -0.019902752712368965, 0.0055114636197686195, 0.041632410138845444, -0.025471307337284088, -0.016424601897597313, 0.058320507407188416, -0.0444430373609066, -0.027192816138267517, 0.010337837040424347, 0.02889675833284855, 0.02622666209936142, 0.005103044677525759, -0.038259658962488174, 0.047534726560115814, -0.013517359271645546, -0.043143123388290405, -0.04177294299006462, 0.09218856692314148, -0.033182963728904724, -0.008730510249733925, -0.01422879844903946, 0.023205239325761795, -0.002595438389107585, 0.05621253699064255, -0.01886633411049843, 0.022432316094636917, 0.00881395023316145, -0.08958873152732849, 0.009731795638799667, -0.01904199831187725, -0.08684837073087692, 0.08874554932117462, 0.03569496050477028, -0.11066843569278717, -0.0006719154771417379, 0.0023714664857834578, -0.026015866547822952, -0.0029094379860907793, -0.05231279507279396, -0.01568681187927723, -0.0206405408680439, -0.012235010042786598, 0.053050585091114044, -0.028018437325954437, 0.057301655411720276, 0.045813217759132385, -0.029862910509109497, 0.007632608991116285, 0.0628175139427185, 0.000815191597212106, 0.009556131437420845, -0.0054763308726251125, -0.04679694026708603, 0.05041562020778656, 0.02952914871275425, -0.01441324595361948, -0.001541453180834651, 0.013122114352881908, 0.04742933064699173, 0.030389903113245964, -0.03111012652516365, 0.038119126111269, -0.010557417757809162, -0.006596189923584461, 0.03074123151600361, -0.08417827636003494, 0.01969195529818535, 0.0755355954170227, -0.04201887175440788, -0.004580443724989891, -0.036292221397161484, 0.011883681640028954, -0.045672688633203506, 0.0036077031400054693, 0.014035568572580814, -0.017540069296956062, 0.019568990916013718, 0.023029575124382973, -0.046902336180210114, -0.035782795399427414, -0.07321683317422867, -0.0330248661339283, -0.01590639166533947, -0.00008296015585074201, 0.04057842493057251, 0.012832269072532654, 0.05357757583260536, -0.015537496656179428, 0.00445089116692543, -0.04068382456898689, -0.012867401354014874, -0.010943878442049026, -0.010557417757809162, 0.04563755542039871, -0.0711439922451973, -0.0010924116941168904, -0.016688097268342972, -0.01441324595361948, 0.06077980622649193, 0.010355403646826744, 0.014747008681297302, 0.05923396348953247, 0.007531601935625076, -0.011883681640028954, 0.030583133921027184, 0.01060133334249258, 0.015370615758001804, -0.017179956659674644, 0.04497003182768822, -0.013104547746479511, 0.055720679461956024, 0.03407885134220123, 0.004330121912062168, 0.005555379670113325, -0.050380486994981766, 0.0029818995390087366, -0.018690669909119606, 0.07546533644199371, 0.007237364538013935, -0.05951502546668053, -0.029002156108617783, -0.017540069296956062, -0.004966904874891043, -0.015458447858691216, 0.034447748214006424, -0.004839548375457525, 0.04816712066531181, 0.0034627802670001984, -0.012419457547366619, -0.07244390994310379, 0.02775494195520878, 0.006960693281143904, -0.0184096060693264, -0.010329053737223148, 0.04995889216661453, -0.055018022656440735, -0.0029775078874081373, 0.026507725939154625, 0.05283978581428528, 0.027263080701231956, 0.00499764597043395, -0.014650393277406693, -0.0020969912875443697, 0.026050997897982597, 0.01595909148454666, 0.044161975383758545, -0.011383038945496082, 0.013833554461598396, -0.011664101853966713, 0.08431880921125412, -0.034324780106544495, 0.038189392536878586, 0.07904887944459915, 0.020482443273067474, -0.014992938376963139, -0.02020138129591942, 0.0028391722589731216, 0.017689382657408714, 0.020218947902321815, 0.008418706245720387, -0.026630690321326256, 0.0685441642999649, 0.02311740629374981, -0.01390381995588541, 0.05009942501783371, -0.015414532274007797, 0.0072637139819562435, -0.004406975116580725, 0.006266819778829813, 0.015985440462827682, 0.006574232131242752, -0.019217662513256073, -0.00760186742991209, -0.05245332419872284, 0.005616862326860428, -0.04258099943399429, 0.021624261513352394, 0.010214872658252716, -0.050626419484615326, -0.00043641572119668126, 0.05002915859222412, 0.05688006430864334, 0.00959126465022564, -0.004786849021911621, -0.00003568178726709448, -0.024470020085573196, -0.015274000354111195, 0.021993156522512436, 0.059339363127946854, 0.03720567375421524, 0.022713378071784973, -0.011628968641161919, 0.009564914740622044, -0.07096832990646362, 0.01101414393633604, -0.01886633411049843, -0.017926529049873352, 0.0056607783772051334, -0.006020890083163977, 0.026771221309900284, 0.0031553679145872593, 0.008721726946532726, -0.010961445048451424, -0.035536862909793854, -0.05593147501349449, 0.07694090902805328, -0.01782113127410412, -0.019094696268439293, 0.006130679976195097, -0.016934027895331383, 0.044548436999320984, -0.01511590275913477, 0.058250244706869125, -0.011760717257857323, 0.0048439400270581245, -0.001793970470316708, -0.00967909675091505, -0.018304208293557167, -0.039208244532346725, 0.0238200630992651, 0.02907242253422737, 0.021237799897789955, -0.04532136023044586, 0.0571259930729866, -0.014536211267113686, 0.019533857703208923, -0.05744218826293945, -0.02972237952053547, -0.013657890260219574, -0.01378085557371378, 0.03695974498987198, -0.04114055261015892, 0.04711313545703888, -0.12170014530420303, 0.008326482027769089, -0.0034012978430837393, 0.02870352752506733 ]
4,542
optbinning.binning.binning_process
information
Print overview information about the options settings and statistics. Parameters ---------- print_level : int (default=1) Level of details.
def information(self, print_level=1): """Print overview information about the options settings and statistics. Parameters ---------- print_level : int (default=1) Level of details. """ self._check_is_fitted() if not isinstance(print_level, numbers.Integral) or print_level < 0: raise ValueError("print_level must be an integer >= 0; got {}." .format(print_level)) n_numerical = list(self._variable_dtypes.values()).count("numerical") n_categorical = self._n_variables - n_numerical self._n_selected = np.count_nonzero(self._support) dict_user_options = self.get_params() print_binning_process_information( print_level, self._n_samples, self._n_variables, self._target_dtype, n_numerical, n_categorical, self._n_selected, self._time_total, dict_user_options)
(self, print_level=1)
[ 0.025440223515033722, 0.011962542310357094, 0.02799481712281704, -0.01787334308028221, 0.08188792318105698, -0.015345176681876183, -0.027149157598614693, -0.094784215092659, -0.038547929376363754, -0.003019264666363597, -0.06307201832532883, -0.015477310866117477, -0.005369049962610006, -0.023502256721258163, -0.024118881672620773, 0.014799022115767002, -0.006126618944108486, -0.056800056248903275, 0.011204973794519901, 0.03734991326928139, 0.025951141491532326, 0.02737819030880928, 0.004087348934262991, -0.00044430099660530686, -0.008505033329129219, 0.002796838991343975, -0.0000752201012801379, -0.05207846313714981, -0.0076285433024168015, 0.008747278712689877, -0.09464327245950699, -0.009645790793001652, -0.04333999380469322, 0.049435779452323914, -0.03606380522251129, -0.010121474042534828, 0.020718630403280258, 0.024559328332543373, -0.01772359013557434, 0.07681397348642349, -0.047850169241428375, -0.02399555779993534, 0.008452179841697216, -0.0074303424917161465, -0.05246605724096298, -0.026955360546708107, 0.020366273820400238, 0.0335620678961277, -0.0312541238963604, -0.05796283483505249, 0.03405536711215973, -0.006813716143369675, -0.016701754182577133, -0.024999776855111122, -0.00543952127918601, -0.02908712439239025, 0.04207150638103485, -0.06652512401342392, 0.03956976532936096, -0.027431044727563858, 0.010086238384246826, 0.03453104943037033, -0.03682137653231621, -0.03440772742033005, -0.009337478317320347, -0.03727944195270538, 0.00035290821688249707, 0.02514071948826313, 0.00036364412517286837, 0.006439336109906435, 0.02545784041285515, -0.04083825275301933, 0.0056421272456645966, 0.03296305984258652, -0.04274098575115204, -0.05310029909014702, -0.06208541989326477, -0.03646901994943619, 0.014208822511136532, -0.012350136414170265, -0.017450513318181038, 0.03322732821106911, 0.03421393036842346, -0.06138070672750473, -0.0196967925876379, -0.046440739184617996, 0.023678435012698174, -0.020295800641179085, 0.07906906306743622, 0.0393935851752758, -0.05387548729777336, 0.03816033527255058, 0.034072987735271454, 0.07272662222385406, -0.05049285292625427, -0.011478050611913204, -0.02861144207417965, -0.013433636166155338, -0.03805462643504143, -0.03079606033861637, -0.0822402760386467, -0.05014049634337425, 0.05095091834664345, 0.023378930985927582, -0.06620800495147705, -0.025246426463127136, -0.020524833351373672, 0.011328298598527908, 0.012887481600046158, 0.04207150638103485, -0.0011539713013917208, 0.0263739712536335, -0.024365533143281937, -0.06458716094493866, 0.019643940031528473, 0.002301336033269763, -0.030778441578149796, -0.04217721149325371, -0.05119756981730461, -0.013636241666972637, -0.041437260806560516, -0.011522095650434494, 0.012614404782652855, -0.033808719366788864, -0.03447819873690605, 0.023801760748028755, -0.04700451344251633, 0.021529052406549454, 0.014913538470864296, -0.03685661032795906, 0.08195839077234268, -0.04770922660827637, -0.023977939039468765, 0.06279013305902481, 0.06493952125310898, -0.08083084970712662, -0.0022771114017814398, -0.027959581464529037, 0.02475312538444996, 0.029369011521339417, 0.0023167517501860857, -0.018481159582734108, -0.05711717903614044, -0.02905188873410225, 0.011944924481213093, -0.036927081644535065, 0.05028143897652626, -0.08273357897996902, -0.030514173209667206, -0.07022488117218018, 0.005280960351228714, 0.008879412896931171, -0.010588347911834717, -0.07667303085327148, -0.022092824801802635, -0.015503737144172192, 0.032452140003442764, -0.0572933554649353, -0.005232511553913355, -0.047850169241428375, -0.05725812166929245, 0.016384631395339966, 0.002528166165575385, 0.024277443066239357, -0.010561920702457428, 0.049823373556137085, -0.025105483829975128, -0.03971070796251297, 0.04436182975769043, 0.012667258270084858, 0.032663553953170776, -0.046229325234889984, -0.013601006008684635, 0.025281662121415138, 0.019203493371605873, 0.03742038458585739, 0.012121103703975677, 0.0114075792953372, 0.009592937305569649, -0.014296912588179111, 0.028505735099315643, -0.03770226985216141, -0.08435442298650742, -0.005954844411462545, -0.007650565821677446, -0.041965797543525696, 0.047885406762361526, -0.01401502639055252, -0.039428822696208954, 0.005104781594127417, 0.01640225015580654, -0.0019456750014796853, 0.04873106628656387, -0.0020029330626130104, 0.029457101598381996, 0.013521725311875343, -0.00040631243609823287, -0.05637722462415695, 0.056976232677698135, -0.01943252608180046, 0.028329556807875633, -0.007157265208661556, -0.022868013009428978, 0.018058329820632935, -0.027431044727563858, 0.03752608969807625, 0.02808290533721447, 0.03387919068336487, -0.01781168021261692, 0.015133761800825596, -0.008350877091288567, -0.04221244901418686, 0.04080301895737648, 0.01663128100335598, 0.04228292033076286, -0.0052721514366567135, 0.015274704433977604, -0.016111554577946663, -0.03650425374507904, 0.0011726903030648828, 0.06504522264003754, -0.0052545336075127125, 0.04228292033076286, 0.05528491735458374, -0.02202235348522663, 0.0009040176519192755, 0.03581715747714043, 0.011663038283586502, 0.015477310866117477, -0.017758825793862343, 0.0057874745689332485, -0.021740468218922615, -0.08477725088596344, 0.05475638061761856, -0.044256120920181274, 0.023361314088106155, -0.020560069009661674, 0.044432301074266434, 0.0429171621799469, -0.025686873123049736, -0.008813345804810524, 0.03241690620779991, 0.003746002446860075, -0.025440223515033722, -0.043762821704149246, -0.07737774401903152, 0.010623583570122719, 0.012649640440940857, 0.002647086977958679, -0.0446789525449276, 0.008998333476483822, -0.06959063559770584, -0.025105483829975128, 0.02381937764585018, -0.0192211102694273, 0.0029135574586689472, -0.020172476768493652, -0.010852616280317307, -0.014693314209580421, -0.025105483829975128, -0.036222368478775024, 0.05246605724096298, -0.04112013801932335, 0.057504769414663315, 0.0017970240442082286, 0.0022661001421511173, 0.012041823007166386, -0.05690576136112213, -0.025545930489897728, -0.04023924469947815, 0.0750521793961525, 0.0678640827536583, -0.06335391104221344, 0.041613440960645676, -0.052148934453725815, 0.013354355469346046, 0.035394325852394104, -0.029034271836280823, -0.06451668590307236, 0.0393231138586998, 0.022586125880479813, -0.018269745633006096, -0.026250645518302917, 0.000675535702612251, -0.03618713095784187, -0.0028805239126086235, -0.012191575020551682, 0.023625580593943596, 0.021617142483592033, 0.01324864849448204, -0.0196967925876379, 0.030954621732234955, 0.04242386296391487, 0.012993188574910164, 0.02413650043308735, -0.003783440450206399, 0.02163476124405861, -0.004642312414944172, -0.0010603762930259109, 0.010077429004013538, 0.008619549684226513, -0.09196534752845764, 0.019185874611139297, -0.00007735352119198069, 0.039640236645936966, -0.003860518569126725, 0.12114056199789047, -0.04830823466181755, 0.04055636748671532, 0.00342227378860116, -0.00532940961420536, 0.04559508338570595, 0.08667998760938644, 0.07857576012611389, -0.050210967659950256, -0.04383329302072525, -0.03535909205675125, 0.00991886854171753, -0.027307718992233276, 0.07716632634401321, -0.03720897063612938, 0.026691094040870667, 0.0859752669930458, -0.04358664155006409, -0.005038714502006769, -0.05310029909014702, 0.00989244133234024, -0.010447404347360134, 0.045348431915044785, -0.0012057238491252065, -0.09562987089157104, -0.014340956695377827, 0.06930875033140182, -0.012033014558255672, 0.020947663113474846, 0.0518670491874218, -0.03826604411005974, 0.07956235855817795, -0.021529052406549454, 0.02255089022219181, -0.0032020502258092165, 0.027889108285307884, -0.0313245952129364, 0.019097784534096718, 0.00984839629381895, -0.01314294058829546, 0.019379671663045883, 0.0017783050425350666, 0.02255089022219181, 0.026074467226862907, -0.02531689777970314, 0.017318379133939743, -0.010280034504830837, 0.01345125399529934, 0.004659930244088173, -0.017062919214367867, 0.03449581563472748, -0.00292897317558527, 0.003653508611023426, 0.03523576632142067, 0.04238862544298172, 0.01939728856086731, -0.020066769793629646, 0.015944184735417366, 0.005294173955917358, -0.0581742487847805, 0.0218990296125412, 0.007069175597280264, 0.0617682971060276, -0.01323103066533804, 0.0009216355392709374, -0.055179208517074585, 0.021916646510362625, -0.026215409860014915, -0.010368124581873417, 0.056271519511938095, -0.02484121546149254, 0.0268496535718441, 0.023361314088106155, -0.04559508338570595, 0.05292412266135216, 0.022216150537133217, -0.014860684983432293, -0.02207520790398121, -0.03921740874648094, -0.03720897063612938, -0.053769778460264206, 0.031870752573013306, 0.00042668310925364494, 0.029192833229899406, -0.010438595898449421, 0.008954289369285107, -0.05461543798446655, 0.02820623107254505, 0.019996296614408493, 0.015459692105650902, 0.039464060217142105, 0.035253383219242096, -0.05725812166929245, -0.007487600203603506, -0.04260004311800003, -0.06148641183972359, -0.09224724024534225, -0.003913372289389372, -0.019185874611139297, -0.02781863696873188, 0.004831704311072826, 0.012887481600046158, 0.017256716266274452, -0.020507216453552246, 0.025175955146551132, -0.004770041909068823, -0.04006306827068329, 0.06585564464330673, -0.014569989405572414, 0.0030104557517915964, -0.012587977573275566, 0.013601006008684635, 0.020736249163746834, -0.015327558852732182, 0.05560204014182091, -0.006329224444925785, -0.011328298598527908, 0.07857576012611389, 0.04330475628376007, 0.02658538520336151, -0.07646161317825317, 0.043551407754421234, 0.061803534626960754, 0.010738099925220013, -0.07054200768470764, -0.0057170032523572445, -0.03812509775161743, 0.0014699921011924744, 0.01215633936226368, -0.0255283135920763, -0.02478836104273796, 0.03058464452624321, -0.00868561677634716, 0.013275074772536755, 0.018216891214251518, -0.031729806214571, 0.028893329203128815, 0.012887481600046158, -0.006338033359497786, 0.014420237392187119, -0.0021636963356286287, -0.018586866557598114, -0.09288147836923599, -0.017943814396858215, -0.0036931487265974283, -0.004523391369730234, 0.0029598043765872717, -0.03523576632142067, -0.002796838991343975, -0.0014600821305066347, -0.04594743996858597, 0.009496038779616356, 0.0044330996461212635, -0.010526685044169426, -0.006637537386268377, -0.04358664155006409, -0.041261084377765656, 0.042670514434576035, 0.012350136414170265, -0.023748906329274178, 0.05542585998773575, 0.04541890323162079, -0.037314675748348236, -0.0018719000509008765, 0.0047392104752361774, 0.030197052285075188, -0.052853651344776154, -0.0014193407259881496, -0.01916825771331787, 0.038371749222278595, -0.009099637158215046, 0.06138070672750473, -0.02522880956530571, -0.033015914261341095, 0.003349600126966834, 0.008311236277222633, 0.008333258330821991, -0.006694795563817024, 0.0196967925876379, -0.028100524097681046, 0.0020634946413338184, 0.02057768777012825, -0.0075008138082921505, -0.040521129965782166, 0.012262046337127686, -0.0007349960505962372, -0.0028012434486299753, -0.05690576136112213, 0.019802501425147057, -0.001597721828147769, 0.0012420607963576913, 0.002721962984651327, 0.017935005947947502, 0.033544450998306274, 0.006095787510275841, 0.008800133131444454, 0.032099783420562744, 0.0058799684047698975, 0.008632762357592583, 0.038371749222278595, 0.04665215313434601, 0.03914693742990494, -0.004906580317765474, 0.038371749222278595, -0.010015767067670822, -0.03548241779208183, 0.003783440450206399, 0.019555849954485893, 0.036609962582588196, 0.05380501598119736, -0.03805462643504143, 0.01368909515440464, 0.04848441481590271, 0.002704345155507326, -0.017265524715185165, -0.0011159827699884772, 0.032099783420562744, -0.04545413702726364, 0.019097784534096718, 0.03562336042523384, -0.00888822227716446, 0.046264562755823135, -0.013785993680357933, 0.06627847999334335, 0.03527100384235382, -0.02623302862048149, 0.012297282926738262, 0.007685801479965448, 0.011830409057438374, 0.01678103394806385, 0.03914693742990494, -0.008971907198429108, -0.0019434727728366852, 0.016499146819114685, 0.02922806888818741, -0.005369049962610006, 0.026127321645617485, -0.045172251760959625, 0.05119756981730461, -0.05968938767910004, 0.054826851934194565, -0.030302759259939194, 0.03592286258935928, -0.02588067017495632, 0.025211190804839134, 0.0022385723423212767, 0.010271226055920124, 0.041049666702747345, 0.031729806214571, 0.033333033323287964, 0.03583477437496185, 0.006879783235490322, -0.0003358408866915852, -0.03830127790570259, -0.014446664601564407, -0.0536993071436882, 0.013741948641836643, 0.012103485874831676, -0.0183402169495821, -0.015882521867752075, -0.03805462643504143, 0.08111273497343063, -0.0510566271841526, -0.028505735099315643, 0.030302759259939194, 0.035781919956207275, -0.053417421877384186, -0.010852616280317307, -0.03049655631184578, 0.019538233056664467, 0.061239760369062424, 0.0912606343626976, 0.036433782428503036, 0.08372018486261368, -0.03567621484398842, 0.014587607234716415, -0.011557331308722496, 0.014931156300008297, -0.003250499488785863, 0.01648152992129326, 0.024118881672620773, -0.06539758294820786, 0.03738514706492424, 0.008910244330763817, -0.022392328828573227, -0.07237426191568375, -0.002299133688211441, -0.0625787228345871, -0.006545043550431728, -0.0038296873681247234, -0.0366804338991642, -0.05845613777637482, 0.05133851245045662, -0.002257291227579117, -0.050210967659950256, -0.005294173955917358, -0.01686912402510643, -0.014147160574793816, -0.028717149049043655, 0.01689554937183857, 0.050704266875982285, 0.044256120920181274, 0.00021870950877200812, 0.003803260624408722, -0.03155362978577614, -0.04228292033076286, -0.027096305042505264, -0.04193056374788284, -0.041578203439712524, -0.006069360766559839, 0.05066903308033943, -0.00886179506778717, 0.030954621732234955, -0.013433636166155338, -0.024418385699391365, 0.07491123676300049, -0.017996666952967644, 0.034425344318151474, -0.019890589639544487, 0.011751128360629082, -0.026567768305540085, -0.04450277239084244, 0.020648159086704254, -0.008073395118117332, 0.020648159086704254, 0.01601465605199337, -0.02808290533721447, 0.014288103207945824, -0.029421865940093994, -0.0339672788977623, -0.0010306461481377482, 0.012596786953508854, -0.019643940031528473, 0.027237247675657272, 0.04901295155286789, 0.03805462643504143, 0.02295610122382641, 0.01934443600475788, 0.05264223366975784, 0.047321636229753494, -0.02834717370569706, 0.010517876595258713, 0.0804080218076706, 0.0008858491783030331, -0.05778665840625763, 0.019203493371605873, -0.04548937454819679, 0.0411553755402565, -0.011654229834675789, -0.0029223663732409477, 0.0010141293751075864, 0.022233769297599792, 0.005170848686248064, 0.0022881226614117622, -0.09640505909919739, 0.010993558913469315, 0.00943437684327364, -0.026127321645617485, 0.06726507842540741, 0.027307718992233276, -0.049471016973257065, 0.016851505264639854, 0.0046995701268315315, -0.028488116338849068, 0.05190228298306465, -0.014622842893004417, 0.013750758022069931, 0.01795262284576893, -0.038195569068193436, 0.05979509651660919, -0.026743946596980095, 0.003435487160459161, 0.018763044849038124, -0.024118881672620773, 0.10161995142698288, -0.0065054032020270824, -0.01974964700639248, -0.006091383285820484, 0.02913997881114483, -0.016763415187597275, -0.03882981464266777, -0.013222221285104752, -0.024418385699391365, 0.03127174451947212, -0.07829387485980988, -0.024629801511764526, 0.027959581464529037, -0.00014507226296700537, 0.04186009243130684, -0.028100524097681046, 0.010368124581873417, -0.043022871017456055, 0.09788496047258377, -0.048766300082206726, 0.023977939039468765, -0.021775703877210617, -0.01287867221981287, 0.02882285788655281, -0.021916646510362625, 0.02478836104273796, -0.0492243655025959, 0.007439151406288147, 0.05496779456734657, -0.0019665961153805256, 0.038935523480176926, 0.0823812186717987, 0.0043097748421132565, -0.06042933836579323, -0.044819895178079605, 0.04615885391831398, -0.029492337256669998, 0.04062683880329132, -0.034020133316516876, 0.011196164414286613, -0.003270319662988186, 0.07174002379179001, 0.00658027920871973, -0.025986377149820328, 0.04154296964406967, 0.12452320009469986, -0.00001399623852194054, -0.022656597197055817, 0.02373128943145275, -0.0043802461586892605, 0.00635124696418643, -0.07758915424346924, -0.05736382678151131, -0.02908712439239025, -0.03594048321247101, 0.020701013505458832, 0.005399881396442652, 0.012667258270084858, 0.05264223366975784, -0.023537492379546165, 0.03229358047246933, 0.04351617023348808, 0.007452364545315504, 0.03974594548344612, -0.015450883656740189, 0.01760026626288891, 0.0028078502509742975, -0.011944924481213093, 0.04002783074975014, -0.007421533111482859, 0.02746628038585186, -0.018410688266158104, 0.005029905587434769, 0.003118365304544568, 0.030003255233168602, 0.027307718992233276, 0.014834257774055004, -0.04598267376422882, 0.052853651344776154, -0.017829297110438347, 0.0034376895055174828, -0.032980676740407944, 0.039111699908971786, 0.07371322065591812, -0.02970375120639801, 0.0076285433024168015, -0.0340377502143383, -0.033015914261341095 ]
4,543
optbinning.binning.binning_process
save
Save binning process to pickle file. Parameters ---------- path : str Pickle file path.
def save(self, path): """Save binning process to pickle file. Parameters ---------- path : str Pickle file path. """ if not isinstance(path, str): raise TypeError("path must be a string.") with open(path, "wb") as f: pickle.dump(self, f)
(self, path)
[ 0.061145175248384476, 0.00933731347322464, -0.0733880028128624, 0.0595242939889431, -0.011622066609561443, -0.06031749024987221, -0.07821616530418396, 0.06586987525224686, 0.028503376990556717, -0.04179805517196655, 0.025468533858656883, 0.017027879133820534, -0.000662794045638293, -0.001952817547135055, -0.0327797457575798, -0.018898790702223778, 0.022847535088658333, -0.025296099483966827, -0.06038646399974823, 0.02686525136232376, -0.006944788154214621, 0.008983822539448738, 0.0496610552072525, 0.03522831201553345, 0.021381843835115433, 0.0379355289041996, 0.021243896335363388, 0.03538350388407707, -0.03762514516711235, 0.016226060688495636, 0.020778324455022812, -0.08083716034889221, -0.004095312673598528, 0.0034702387638390064, 0.004366896580904722, 0.04869542270898819, -0.01690717600286007, 0.10256387293338776, -0.07428466528654099, -0.02041621133685112, 0.03152097389101982, 0.0018870769999921322, -0.01239802036434412, 0.03184860199689865, 0.018191810697317123, -0.01167379692196846, -0.055006515234708786, 0.02215779758989811, 0.039211541414260864, 0.0068671926856040955, -0.026072055101394653, -0.0221233107149601, -0.0017900827806442976, 0.001556218834593892, -0.018553921952843666, 0.057075727730989456, 0.05307525396347046, 0.0718705803155899, 0.00400694040581584, 0.00785868987441063, -0.004858334083110094, -0.0034141975920647383, 0.08780350536108017, -0.00350257009267807, 0.043867263942956924, 0.008526871912181377, -0.08601018786430359, -0.0157260000705719, -0.0023882139939814806, -0.003394798608496785, 0.0746295303106308, -0.07945768535137177, 0.001980838133022189, 0.057317133992910385, -0.0005412817699834704, 0.019140198826789856, -0.03931500390172005, 0.0037159575149416924, 0.011880718171596527, 0.06611128151416779, 0.016424359753727913, -0.07283621281385422, -0.02533058635890484, -0.024433929473161697, -0.055006515234708786, -0.050074897706508636, 0.09704598039388657, 0.004500532988458872, -0.042453303933143616, 0.0024313225876539946, 0.001455991412512958, 0.020623132586479187, -0.019191928207874298, 0.04435008019208908, 0.010156375356018543, -0.07821616530418396, 0.017950402572751045, 0.008966579101979733, -0.04821260645985603, -0.0169675275683403, -0.09821853041648865, -0.027072172611951828, -0.043280988931655884, -0.030813995748758316, -0.0001574809430167079, -0.012337668798863888, 0.03327980637550354, -0.029986310750246048, -0.04731595143675804, -0.04607442393898964, -0.023692462593317032, 0.03762514516711235, -0.04528122767806053, -0.004983348771929741, 0.014217201620340347, -0.005539449397474527, 0.001520654303021729, 0.009595964103937149, 0.0017685284838080406, 0.009251096285879612, -0.007259480655193329, 0.05717918649315834, -0.0536615289747715, 0.08207868784666061, 0.009001065976917744, 0.0578344389796257, 0.041832540184259415, 0.04228087142109871, -0.008203557692468166, -0.018829816952347755, 0.016131222248077393, -0.012518724426627159, -0.010070158168673515, 0.038625266402959824, 0.010173618793487549, -0.01748483069241047, -0.03305564075708389, 0.004060825798660517, 0.0032051210291683674, 0.004823847208172083, 0.05931737273931503, -0.04286714643239975, 0.059386346489191055, -0.021140435710549355, 0.086355060338974, 0.025244370102882385, -0.02652038261294365, -0.023744191974401474, -0.006341268308460712, -0.0011229778174310923, 0.04810914769768715, 0.005354082677513361, -0.025847889482975006, 0.010690921917557716, -0.0026835075113922358, -0.03765963390469551, 0.024554632604122162, 0.0314520001411438, -0.008630332536995411, -0.04852299019694328, -0.0100615369156003, 0.053799476474523544, 0.04641929268836975, -0.05386845022439957, -0.02652038261294365, 0.0250546932220459, 0.0024895190726965666, 0.06721486151218414, 0.032262444496154785, 0.013294678181409836, -0.004517776425927877, -0.02826196886599064, -0.12139368802309036, 0.027227362617850304, -0.03181411325931549, 0.015950165688991547, 0.03783206641674042, 0.006474905181676149, 0.02803780511021614, 0.06569743901491165, 0.015450106002390385, -0.00859153550118208, -0.034021273255348206, 0.025882376357913017, 0.04293612018227577, -0.013786115683615208, -0.008664819411933422, 0.010958194732666016, 0.01282048411667347, 0.06048992648720741, 0.019122954457998276, 0.05104053020477295, 0.019088467583060265, -0.010121888481080532, 0.002278287196531892, -0.03583183139562607, 0.025865133851766586, -0.04993695020675659, -0.0652146190404892, 0.06611128151416779, 0.07393979281187057, -0.015243184752762318, 0.02362348884344101, -0.008100097067654133, -0.0006816540262661874, -0.0437982939183712, -0.012579075992107391, 0.01079438254237175, -0.0017900827806442976, 0.0065093920566141605, 0.03095194324851036, -0.03031393513083458, 0.011078898794949055, 0.024037329480051994, 0.0888381078839302, -0.03034842200577259, -0.020812811329960823, 0.03148648887872696, 0.03841834515333176, 0.01194106973707676, 0.0026037567295134068, 0.09614931792020798, -0.04435008019208908, 0.057868923991918564, -0.032072763890028, -0.010984059423208237, 0.009009688161313534, -0.03945295140147209, 0.038935646414756775, -0.016829580068588257, 0.04083242267370224, -0.02426149509847164, -0.032814230769872665, -0.036659516394138336, 0.0042569697834551334, 0.015096615999937057, -0.05835174024105072, -0.02453739009797573, -0.04083242267370224, -0.027606718242168427, 0.05566176772117615, -0.016157086938619614, -0.010311566293239594, -0.047074541449546814, 0.032572824507951736, -0.02712390385568142, 0.02891721948981285, -0.04524673894047737, -0.012061773799359798, 0.011915205046534538, 0.10173618793487549, -0.00612572580575943, -0.01955404132604599, 0.01752793788909912, 0.040728963911533356, -0.02533058635890484, -0.03531453013420105, -0.06304194778203964, 0.012484237551689148, 0.050074897706508636, -0.045039817690849304, -0.03227968513965607, 0.01137203723192215, -0.024002844467759132, 0.001218894380144775, -0.02076108008623123, -0.05600663647055626, -0.01136341504752636, 0.0030240651685744524, -0.05286833271384239, 0.0513509102165699, 0.016450224444270134, -0.056454963982105255, 0.006479215808212757, -0.05542035773396492, -0.057351622730493546, 0.0021424952428787947, 0.03190033137798309, -0.03472825139760971, 0.01412236224859953, 0.04345342516899109, 0.041591133922338486, 0.05107501521706581, -0.06673204153776169, 0.012147990986704826, 0.017303774133324623, -0.0029507805593311787, 0.003077950794249773, 0.00562135549262166, -0.03465927764773369, 0.02305445447564125, 0.025451291352510452, 0.004772116895765066, 0.03293493762612343, 0.03583183139562607, 0.012501480989158154, -0.048247095197439194, -0.043867263942956924, 0.054144345223903656, -0.04103934392333031, 0.0166571456938982, -0.008725171908736229, -0.0041750636883080006, -0.0019344964530318975, -0.002427011728286743, -0.010147754102945328, 0.03319358825683594, 0.010199484415352345, -0.05200616270303726, 0.07904385030269623, 0.012915323488414288, -0.008798455819487572, 0.013484355993568897, 0.058213792741298676, 0.027192875742912292, 0.005302352365106344, 0.009095905348658562, -0.020519671961665154, -0.027348067611455917, 0.006440418306738138, -0.043625857681035995, 0.022399205714464188, -0.016217438504099846, -0.009802885353565216, -0.0015249651623889804, 0.013173974119126797, -0.01663128100335598, 0.02039896883070469, -0.00226319907233119, -0.009225230664014816, -0.012234208174049854, 0.03124508075416088, 0.08263047784566879, 0.008388924412429333, 0.03272801637649536, 0.013182596303522587, 0.0333142913877964, -0.003940121736377478, 0.027848126366734505, -0.024882258847355843, 0.08152689784765244, -0.005789478775113821, -0.011337550356984138, 0.02652038261294365, -0.005707572679966688, 0.0530407652258873, -0.062317728996276855, 0.03405575826764107, -0.005832587368786335, 0.027779152616858482, -0.00008513939974363893, 0.036038752645254135, -0.08649300783872604, -0.019071225076913834, -0.026037568226456642, -0.018812572583556175, 0.03528004139661789, -0.016277790069580078, -0.01986442133784294, -0.05038527771830559, 0.0019571285229176283, -0.036314647644758224, -0.01286359317600727, -0.019019493833184242, 0.014751747250556946, 0.01749345101416111, -0.010199484415352345, 0.034021273255348206, 0.037521686404943466, 0.01458793506026268, 0.023157915100455284, -0.0009128236561082304, -0.054661646485328674, 0.014467230997979641, -0.005272176116704941, 0.07228442281484604, 0.02155427820980549, -0.000084667895862367, -0.0008950413903221488, -0.00423757079988718, 0.019036738201975822, -0.05245449021458626, 0.03772860765457153, -0.014725882560014725, 0.08566532284021378, 0.01576048694550991, 0.04583301767706871, -0.013096379116177559, 0.04776427894830704, -0.037452712655067444, -0.011966935358941555, 0.017277909442782402, -0.0327797457575798, -0.028399916365742683, 0.004862645175307989, -0.008923470973968506, 0.06852535903453827, 0.07297416031360626, 0.008871740661561489, 0.05390293896198273, -0.0016995547339320183, -0.03186584264039993, -0.049178238958120346, 0.04869542270898819, -0.011053033173084259, 0.00416428642347455, -0.033434994518756866, 0.01547597162425518, 0.03928051516413689, -0.04269471392035484, -0.010561595670878887, 0.010768516920506954, 0.00011726874072337523, -0.022933751344680786, -0.011458254419267178, 0.008807078003883362, -0.010466757230460644, -0.06790459901094437, -0.012717023491859436, -0.03522831201553345, 0.01717444881796837, 0.10704716295003891, 0.010958194732666016, 0.0034055758733302355, -0.009423529729247093, 0.000900429964531213, 0.012872214429080486, 0.006207631900906563, 0.02743428386747837, 0.08345816284418106, -0.009673560038208961, -0.058248281478881836, -0.07635387033224106, 0.0037849312648177147, 0.047143515199422836, -0.029951823875308037, -0.00043351040221750736, -0.04141870141029358, -0.019364362582564354, 0.04093588516116142, 0.008087164722383022, 0.00848376378417015, 0.01988166570663452, -0.03596977889537811, 0.08476866036653519, -0.08187177032232285, -0.0169244185090065, -0.015993274748325348, 0.08863119035959244, -0.01659679412841797, -0.023192401975393295, -0.04345342516899109, 0.04986797645688057, -0.003437907202169299, 0.018605653196573257, -0.007561240810900927, 0.00376122142188251, -0.06804254651069641, 0.0027567921206355095, -0.0181228369474411, -0.0189677644520998, -0.0008169070933945477, 0.033659160137176514, 0.0036297403275966644, 0.015493215061724186, -0.05348909646272659, -0.02774466574192047, 0.02972766011953354, 0.03814245015382767, 0.024623606353998184, 0.0022761316504329443, -0.02276131696999073, -0.020536916330456734, -0.029055166989564896, 0.015406997874379158, 0.018881546333432198, -0.012923944741487503, -0.0086174001917243, -0.001708176452666521, -0.019036738201975822, 0.006634406745433807, -0.04724697768688202, -0.03741822764277458, 0.07759539783000946, 0.00819493643939495, -0.04462597519159317, 0.006091238930821419, -0.015674270689487457, 0.03443511575460434, 0.01601051725447178, 0.0209680013358593, 0.03264179825782776, -0.04872991144657135, -0.00338833243586123, 0.023209646344184875, 0.03031393513083458, -0.08373405784368515, 0.037763092666864395, -0.015527701936662197, -0.043901752680540085, -0.027554988861083984, 0.021502546966075897, 0.016036381945014, -0.015570810064673424, 0.0056127337738871574, 0.04021165892481804, -0.021226651966571808, -0.001967905554920435, -0.03448684513568878, 0.035159338265657425, -0.07704360783100128, -0.04955759644508362, -0.033641915768384933, 0.057937897741794586, -0.032486606389284134, 0.02512366510927677, 0.0010771750239655375, 0.011492740362882614, -0.05373050272464752, 0.020536916330456734, 0.018260784447193146, -0.007375873625278473, 0.044763922691345215, -0.0626281127333641, -0.03010701574385166, -0.03526279702782631, -0.006880125496536493, -0.03498690202832222, 0.04141870141029358, 0.060558900237083435, 0.05538587272167206, 0.013303300365805626, 0.02717563323676586, 0.02041621133685112, 0.03783206641674042, 0.057351622730493546, 0.0004593755293171853, -0.024330468848347664, 0.0014042612165212631, -0.02774466574192047, -0.015329401940107346, -0.03124508075416088, -0.013475734740495682, -0.014208579435944557, 0.004918686114251614, 0.031107133254408836, -0.002797745168209076, -0.007953528314828873, -0.011570336297154427, -0.0022039248142391443, 0.011070276610553265, -0.0326935276389122, -0.01869186945259571, -0.03928051516413689, 0.061145175248384476, -0.06993932276964188, 0.012372155673801899, 0.0012156612938269973, 0.02445117197930813, 0.009070039726793766, -0.044453542679548264, -0.032521095126867294, -0.00568170752376318, 0.011320306919515133, -0.04324650391936302, 0.0074362256564199924, -0.024054573848843575, -0.01339813880622387, 0.01401890255510807, -0.021157678216695786, 0.08718274533748627, 0.02067486383020878, 0.020329995080828667, -0.07166366279125214, 0.021830173209309578, 0.03762514516711235, 0.01984717883169651, 0.008630332536995411, -0.03610772639513016, 0.025554751977324486, -0.028141265735030174, 0.03641810640692711, -0.03526279702782631, 0.01607086881995201, -0.01267391536384821, 0.0001805170759325847, -0.023433810099959373, 0.006444728933274746, -0.05921391025185585, 0.07242237031459808, 0.006599919870495796, 0.03302115201950073, 0.03064156137406826, -0.05348909646272659, 0.025537507608532906, -0.03814245015382767, 0.016683010384440422, -0.038625266402959824, 0.0003270861634518951, -0.018502192571759224, 0.01298429723829031, -0.019605770707130432, -0.00785868987441063, 0.046177882701158524, -0.019795449450612068, 0.010406405664980412, -0.022312987595796585, 0.06273157149553299, -0.010734030045568943, 0.01297567505389452, -0.05928288400173187, 0.009104526601731777, 0.0467296727001667, 0.01501902099698782, -0.023520028218626976, 0.034279923886060715, 0.0183470007032156, -0.0097511550411582, -0.05231654271483421, 0.029244843870401382, 0.0027783464174717665, -0.03965987265110016, 0.017708994448184967, -0.00773798581212759, -0.030486369505524635, -0.031107133254408836, -0.04145318642258644, 0.0027718800120055676, 0.04893683269619942, -0.07490542531013489, -0.03410748764872551, -0.03765963390469551, 0.04321201518177986, -0.010139131918549538, 0.034607548266649246, -0.0559721477329731, -0.006742177996784449, 0.006358511745929718, -0.009656316600739956, -0.0009262950625270605, -0.031641680747270584, 0.009544233791530132, -0.04686762019991875, -0.06686998903751373, -0.027330823242664337, 0.000908512796740979, -0.005298041272908449, -0.0034292854834347963, 0.05041976645588875, -0.029055166989564896, -0.007250858936458826, -0.04545366019010544, -0.04286714643239975, 0.049454133957624435, 0.03381435200572014, 0.01898500695824623, 0.12442853301763535, -0.001795471296645701, -0.027261849492788315, -0.01458793506026268, -0.06686998903751373, 0.012725645676255226, -0.04648826643824577, -0.002429167041555047, -0.01749345101416111, 0.011173737235367298, -0.05714470148086548, 0.025434046983718872, 0.0024097682908177376, -0.03264179825782776, -0.007371562998741865, -0.007168952841311693, -0.034555818885564804, -0.04462597519159317, -0.04579852893948555, -0.03872872516512871, -0.04790222644805908, -0.03448684513568878, 0.022364718839526176, -0.0055696251802146435, -0.05055771395564079, -0.021157678216695786, 0.005720505490899086, -0.04845401644706726, 0.02686525136232376, 0.06945650279521942, 0.002069210633635521, 0.05310973897576332, -0.02507193572819233, 0.004060825798660517, -0.0555238202214241, 0.026606600731611252, 0.02393387071788311, -0.04166010767221451, 0.015967408195137978, 0.016277790069580078, 0.045936476439237595, -0.013415382243692875, 0.015329401940107346, -0.05548933148384094, -0.009044175036251545, -0.0006714157643727958, 0.03357294201850891, 0.018881546333432198, -0.014751747250556946, -0.0624556764960289, -0.0752502903342247, -0.007733674719929695, 0.007828514091670513, 0.005267865490168333, -0.004647102206945419, -0.02277856133878231, 0.0496610552072525, 0.0014279709430411458, 0.0049316189251840115, 0.0017340416088700294, -0.019174685701727867, 0.01577773131430149, -0.04814363270998001, -0.02864132449030876, -0.05924839898943901, 0.00481522548943758, 0.034021273255348206, -0.028348185122013092, -0.019053980708122253, -0.04724697768688202, 0.009828750975430012, -0.03903910890221596, 0.054075371474027634, 0.03496966138482094, -0.023157915100455284, -0.025520265102386475, -0.03593529015779495, 0.005927426274865866, 0.003179255872964859, -0.03231417387723923, 0.00693185580894351, -0.007091357372701168, 0.03469376638531685, 0.028796514496207237, 0.07028418779373169, 0.0026360880583524704, 0.021933631971478462, -0.013380895368754864, 0.019933395087718964, -0.030158745124936104, 0.029555225744843483, 0.04590199142694473, -0.04983349144458771, -0.023830410093069077, 0.045315712690353394, 0.05545484647154808, 0.03036566637456417, 0.042729198932647705, 0.014975911937654018, -0.007983704097568989, 0.07180161029100418, -0.012432507239282131, -0.0008266065269708633, -0.030572587624192238, -0.02743428386747837, -0.051143988966941833, -0.007578483782708645, -0.05569625273346901, 0.05393742397427559, 0.02452014572918415, -0.02329586260020733, -0.02184741571545601 ]
4,544
sklearn.utils._metadata_requests
set_fit_request
Request metadata passed to the ``fit`` method. Note that this method is only relevant if ``enable_metadata_routing=True`` (see :func:`sklearn.set_config`). Please see :ref:`User Guide <metadata_routing>` on how the routing mechanism works. The options for each parameter are: - ``True``: metadata is requested, and passed to ``fit`` if provided. The request is ignored if metadata is not provided. - ``False``: metadata is not requested and the meta-estimator will not pass it to ``fit``. - ``None``: metadata is not requested, and the meta-estimator will raise an error if the user provides it. - ``str``: metadata should be passed to the meta-estimator with this given alias instead of the original name. The default (``sklearn.utils.metadata_routing.UNCHANGED``) retains the existing request. This allows you to change the request for some parameters and not others. .. versionadded:: 1.3 .. note:: This method is only relevant if this estimator is used as a sub-estimator of a meta-estimator, e.g. used inside a :class:`~sklearn.pipeline.Pipeline`. Otherwise it has no effect. Parameters ---------- check_input : str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED Metadata routing for ``check_input`` parameter in ``fit``. sample_weight : str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED Metadata routing for ``sample_weight`` parameter in ``fit``. Returns ------- self : object The updated object.
def __get__(self, instance, owner): # we would want to have a method which accepts only the expected args def func(**kw): """Updates the request for provided parameters This docstring is overwritten below. See REQUESTER_DOC for expected functionality """ if not _routing_enabled(): raise RuntimeError( "This method is only available when metadata routing is enabled." " You can enable it using" " sklearn.set_config(enable_metadata_routing=True)." ) if self.validate_keys and (set(kw) - set(self.keys)): raise TypeError( f"Unexpected args: {set(kw) - set(self.keys)}. Accepted arguments" f" are: {set(self.keys)}" ) requests = instance._get_metadata_request() method_metadata_request = getattr(requests, self.name) for prop, alias in kw.items(): if alias is not UNCHANGED: method_metadata_request.add_request(param=prop, alias=alias) instance._metadata_request = requests return instance # Now we set the relevant attributes of the function so that it seems # like a normal method to the end user, with known expected arguments. func.__name__ = f"set_{self.name}_request" params = [ inspect.Parameter( name="self", kind=inspect.Parameter.POSITIONAL_OR_KEYWORD, annotation=owner, ) ] params.extend( [ inspect.Parameter( k, inspect.Parameter.KEYWORD_ONLY, default=UNCHANGED, annotation=Optional[Union[bool, None, str]], ) for k in self.keys ] ) func.__signature__ = inspect.Signature( params, return_annotation=owner, ) doc = REQUESTER_DOC.format(method=self.name) for metadata in self.keys: doc += REQUESTER_DOC_PARAM.format(metadata=metadata, method=self.name) doc += REQUESTER_DOC_RETURN func.__doc__ = doc return func
(self: optbinning.binning.binning_process.BinningProcess, *, check_input: Union[bool, NoneType, str] = '$UNCHANGED$', sample_weight: Union[bool, NoneType, str] = '$UNCHANGED$') -> optbinning.binning.binning_process.BinningProcess
[ 0.04383838549256325, -0.05829896405339241, -0.019093671813607216, 0.004680661018937826, -0.0029634672682732344, -0.017267072573304176, -0.011530408635735512, 0.009989215061068535, 0.05700512230396271, 0.01090251561254263, -0.021424489095807076, 0.006531044375151396, 0.05129700154066086, -0.00529428431764245, -0.0198832955211401, 0.037521395832300186, 0.029929593205451965, 0.02382190153002739, 0.030119862407445908, -0.03369695320725441, 0.01919832080602646, -0.04281092435121536, -0.028749912977218628, 0.014955282211303711, 0.008476562798023224, 0.06552925705909729, 0.037978045642375946, -0.04536055028438568, 0.0899600237607956, -0.0064882333390414715, -0.025172822177410126, -0.0141751728951931, 0.014707930386066437, 0.06286546587944031, 0.028959210962057114, -0.031527865678071976, -0.01081689354032278, 0.02268027514219284, -0.06259908527135849, -0.015297770500183105, -0.037197936326265335, -0.026675961911678314, 0.048633210361003876, -0.09665755182504654, 0.059516698122024536, 0.0319274365901947, -0.005365635734051466, 0.10510557144880295, -0.019226862117648125, -0.017619073390960693, 0.013195278123021126, -0.011235489509999752, 0.015136039815843105, -0.005104013253003359, -0.00592217780649662, 0.0573476105928421, 0.05555906519293785, 0.04406671226024628, 0.05947864428162575, 0.028007857501506805, 0.027227748185396194, 0.034724414348602295, 0.03240311145782471, -0.008371913805603981, -0.04357200488448143, -0.03873912990093231, -0.04642606899142265, -0.01389927975833416, 0.008624022826552391, 0.031756192445755005, 0.02867380529642105, -0.01792350597679615, 0.005456014536321163, 0.026637908071279526, 0.021614760160446167, -0.026352502405643463, -0.040451567620038986, -0.0524766780436039, 0.05293332785367966, -0.041669297963380814, 0.017086315900087357, -0.0171909648925066, -0.027056504040956497, -0.0811314582824707, -0.009075915440917015, -0.032117705792188644, -0.0084337517619133, -0.04928012937307358, 0.0394241027534008, 0.0030062783043831587, -0.08554574102163315, 0.0514872707426548, -0.016173016279935837, -0.0030110350344330072, 0.009556349366903305, -0.030652621760964394, 0.001823031809180975, -0.058413125574588776, 0.0024318983778357506, -0.026580827310681343, 0.0007319478900171816, 0.03590409457683563, 0.06640449911355972, 0.07568971067667007, 0.037064746022224426, -0.05053591728210449, -0.01668674685060978, -0.008657320402562618, -0.011206948198378086, -0.0038077938370406628, 0.011406732723116875, -0.010893001221120358, -0.05947864428162575, 0.019103186205029488, 0.001309300772845745, 0.0011220029555261135, -0.01975010521709919, -0.04326757416129112, -0.0508403517305851, -0.014993336983025074, -0.026809152215719223, 0.011083272285759449, -0.025344066321849823, -0.06370265781879425, 0.0007224343135021627, 0.00418357877060771, 0.0095753762871027, 0.013404576107859612, 0.04486584663391113, -0.07241705805063248, -0.03160397335886955, -0.006811693776398897, -0.03904356062412262, 0.0928521379828453, 0.0439906008541584, 0.016201555728912354, 0.04745353013277054, 0.020473135635256767, -0.011949004605412483, 0.059098102152347565, -0.002987251151353121, 0.020130647346377373, 0.03681739419698715, -0.0213483814150095, -0.0014650849625468254, -0.050688132643699646, 0.02698039449751377, -0.00014924364222679287, 0.025629473850131035, -0.034134577959775925, 0.025952933356165886, -0.018332589417696, 0.0027993586845695972, -0.012729114852845669, -0.0025734121445566416, 0.0018694102764129639, 0.022984709590673447, -0.004792444873601198, 0.011254516430199146, -0.018132803961634636, -0.004725850187242031, -0.005589203909039497, -0.012148789130151272, -0.09132996946573257, 0.03523814678192139, 0.021462542936205864, -0.0061219618655741215, -0.04851904511451721, -0.03826345130801201, 0.035504527390003204, -0.060924701392650604, -0.027722451835870743, -0.03371598199009895, 0.006768882740288973, 0.03535230830311775, 0.03923383355140686, 0.017114855349063873, 0.005527365952730179, 0.008562184870243073, 0.028141047805547714, 0.01383268553763628, -0.05266695097088814, -0.08546963334083557, -0.035827986896038055, 0.00637882761657238, 0.07127542793750763, 0.006336016580462456, 0.0019395726267248392, -0.043686170130968094, 0.0456269308924675, 0.029415860772132874, -0.008419482037425041, 0.053656358271837234, 0.034362901002168655, -0.031299542635679245, -0.048024341464042664, -0.059098102152347565, 0.04882347956299782, 0.013804144226014614, 0.07683134078979492, 0.0583370178937912, 0.008966510184109211, 0.018893888220191002, 0.04901375249028206, 0.0060791512951254845, 0.04992705211043358, 0.03643685206770897, -0.00017035180644597858, -0.05236251652240753, -0.013043061830103397, 0.013185764662921429, -0.026580827310681343, 0.018132803961634636, -0.008486076258122921, 0.0038815238513052464, -0.010893001221120358, 0.017723722383379936, -0.015554635785520077, -0.01207268051803112, -0.022946655750274658, 0.09277603030204773, 0.04810045287013054, 0.033677928149700165, 0.019731078296899796, 0.025952933356165886, -0.031128298491239548, 0.05555906519293785, -0.05190586671233177, -0.03668420389294624, -0.07907653599977493, 0.004661634098738432, 0.0007081640069372952, 0.018779724836349487, 0.043876439332962036, -0.034724414348602295, -0.01997843012213707, 0.03617047518491745, 0.03858691081404686, -0.013414089567959309, -0.0067260717041790485, -0.005936447996646166, 0.04943234473466873, 0.050041213631629944, 0.033126141875982285, -0.054988253861665726, -0.017000693827867508, -0.004568876698613167, 0.06781250238418579, 0.04284897819161415, -0.0018075723201036453, 0.042734816670417786, -0.0257436353713274, -0.05186781287193298, -0.002844548085704446, -0.031128298491239548, -0.03398235887289047, -0.04220205545425415, 0.00020528431923594326, 0.04292508587241173, -0.015307283960282803, -0.03072872944176197, 0.012234410271048546, 0.0018587076338008046, 0.04147902876138687, 0.018142318353056908, 0.011787273921072483, 0.043191466480493546, 0.013823171146214008, -0.055711280554533005, 0.0048352559097111225, -0.009580133482813835, 0.045018065720796585, -0.0014948147581890225, 0.01764761470258236, -0.018208913505077362, -0.05236251652240753, -0.0001332638639723882, -0.02437368594110012, -0.04326757416129112, -0.012348572723567486, 0.05015537515282631, -0.02368871122598648, 0.04330562800168991, 0.006083908025175333, -0.014384469948709011, -0.030690675601363182, -0.004549849778413773, 0.05369441211223602, 0.012224896810948849, -0.020872702822089195, 0.01113084051758051, 0.007705966476351023, -0.005817528814077377, -0.04258259758353233, 0.032174788415431976, -0.0034795766696333885, -0.07310202717781067, 0.001252219546586275, 0.001746923546306789, -0.011435273103415966, 0.02098686620593071, -0.0011440030066296458, -0.033031005412340164, -0.017818856984376907, 0.0527811124920845, -0.02153865061700344, 0.08097924292087555, -0.008005642332136631, -0.011739706620573997, 0.0057366639375686646, 0.0038410911802202463, 0.04532249644398689, -0.03360181674361229, -0.044561415910720825, -0.0012052464298903942, -0.0026780611369758844, -0.013908793218433857, 0.018265994265675545, 0.04018518701195717, 0.10411616414785385, -0.014374956488609314, 0.04741547629237175, -0.034305818378925323, -0.007330181542783976, -0.013975388370454311, -0.012196356430649757, -0.0035271444357931614, -0.004147902596741915, -0.03828248009085655, 0.0008936780504882336, -0.03118537925183773, -0.003819685662165284, 0.022642221301794052, 0.02469714544713497, -0.08615460246801376, 0.031299542635679245, -0.004078929778188467, -0.023441359400749207, 0.0145842544734478, -0.012386627495288849, 0.035009823739528656, -0.017457343637943268, -0.006183800287544727, -0.012776682153344154, -0.03645588085055351, -0.01124500297009945, 0.052058082073926926, -0.002310600597411394, 0.07915264368057251, -0.023422332480549812, 0.021424489095807076, -0.03818734362721443, 0.05217224732041359, 0.04905180633068085, 0.08432800322771072, -0.006616665981709957, -0.013804144226014614, -0.045931365340948105, -0.007458614185452461, -0.07093294709920883, 0.028426453471183777, -0.04840488359332085, -0.0036508203484117985, 0.006131475791335106, 0.010864460840821266, -0.0009370835614390671, -0.02542017586529255, 0.0037079015746712685, 0.025819743052124977, -0.05651041865348816, 0.0034986038226634264, -0.09825582802295685, -0.054341331124305725, 0.023993143811821938, 0.0191507525742054, 0.00206324877217412, -0.03995686024427414, -0.017933020368218422, -0.050726186484098434, 0.028787968680262566, 0.03206062316894531, 0.022147517651319504, -0.005056445952504873, 0.01134013757109642, 0.01036024373024702, -0.045741092413663864, 0.025762662291526794, 0.016163501888513565, 0.038472749292850494, -0.017752263695001602, 0.021881138905882835, -0.05281916633248329, -0.01424176711589098, 0.01067419070750475, -0.01896999590098858, -0.06986742466688156, 0.02623833902180195, -0.010350730270147324, 0.007225532550364733, -0.04265870526432991, 0.05449355021119118, -0.05647236481308937, 0.012966953217983246, 0.024544930085539818, 0.034496091306209564, 0.009751376695930958, 0.03828248009085655, 0.02701845020055771, 0.01561171654611826, 0.019283942878246307, -0.048899587243795395, -0.04897569492459297, 0.020092593505978584, -0.02414536103606224, -0.0017255180282518268, 0.016525017097592354, 0.02861672453582287, -0.0046544987708330154, 0.029377806931734085, 0.006512016989290714, 0.056129876524209976, 0.008633536286652088, 0.01948372647166252, 0.03464830666780472, 0.05171559751033783, 0.006854504346847534, -0.045056119561195374, -0.04262065142393112, -0.0025353580713272095, 0.041402921080589294, 0.008847590535879135, 0.02939683385193348, -0.04147902876138687, -0.008557427674531937, -0.036284636706113815, -0.01549755409359932, -0.05651041865348816, -0.025115741416811943, 0.013252358883619308, 0.051144782453775406, -0.056396257132291794, -0.04467557743191719, -0.017619073390960693, -0.022185571491718292, -0.04265870526432991, -0.05396078899502754, 0.010550513863563538, 0.03881523758172989, 0.056852906942367554, -0.06640449911355972, 0.05323776230216026, 0.03082386590540409, 0.005403690040111542, 0.041669297963380814, -0.023441359400749207, -0.052248355001211166, 0.035314254462718964, -0.050497863441705704, -0.0061505027115345, 0.038796208798885345, 0.03428679332137108, 0.002775574801489711, -0.06263713538646698, -0.020929785445332527, -0.02793174982070923, 0.03476246818900108, 0.016791395843029022, 0.010645649395883083, -0.06655671447515488, -0.032536301761865616, 0.030234025791287422, -0.06971520930528641, -0.028559641912579536, -0.01031267549842596, -0.023289142176508904, 0.02176697552204132, -0.013299927115440369, 0.02066340669989586, -0.07119932025671005, -0.0219953004270792, 0.016972152516245842, -0.02464006468653679, 0.040946271270513535, 0.05125894770026207, -0.01709582842886448, -0.06625228375196457, -0.01332846749573946, -0.002014491707086563, -0.022851519286632538, -0.0074919117614626884, -0.009504024870693684, 0.06507260352373123, 0.05415106192231178, 0.028102992102503777, -0.017447829246520996, 0.053199708461761475, 0.04532249644398689, 0.015469013713300228, -0.018865346908569336, -0.01435592956840992, -0.018722644075751305, -0.032992951571941376, 0.020225783810019493, 0.04189762473106384, 0.015488040633499622, -0.050041213631629944, -0.0469207726418972, -0.0157258789986372, 0.0017516802763566375, -0.007130397018045187, -0.024773254990577698, -0.004245416726917028, -0.00486855348572135, 0.06081053987145424, -0.004454714246094227, -0.017409775406122208, -0.07744020223617554, 0.008096021600067616, -0.055711280554533005, -0.014003928750753403, 0.06849747896194458, 0.012862304225564003, 0.053618304431438446, -0.05175365135073662, 0.011635057628154755, -0.0009210294811055064, 0.012919384986162186, -0.0187416709959507, -0.012928899377584457, 0.028959210962057114, -0.011149867437779903, -0.006188557017594576, -0.010208026506006718, 0.017314640805125237, 0.015763932839035988, 0.06149551272392273, -0.02427855134010315, -0.011473327875137329, 0.04650217667222023, 0.005265743471682072, 0.024792281910777092, 0.040261294692754745, -0.06507260352373123, 0.03164203092455864, -0.006017313338816166, -0.043914493173360825, 0.02349844016134739, -0.013452143408358097, 0.022756384685635567, -0.09140607714653015, -0.06275130063295364, 0.03845372423529625, 0.041631244122982025, 0.015554635785520077, -0.012339059263467789, 0.01031267549842596, 0.053656358271837234, -0.018132803961634636, 0.030253052711486816, 0.01641085371375084, -0.020054539665579796, -0.02684720605611801, 0.02551531046628952, 0.02903532050549984, -0.03786388412117958, 0.07736409455537796, 0.05338997766375542, 0.015649771317839622, -0.04669244587421417, -0.09422208368778229, -0.008604995906352997, 0.007606074213981628, -0.0032417383044958115, 0.027551207691431046, -0.035732850432395935, 0.05829896405339241, 0.017029233276844025, -0.018170857802033424, -0.03272657096385956, -0.06008750945329666, 0.026771098375320435, -0.04657828435301781, 0.021709894761443138, -0.022109463810920715, -0.0674319639801979, 0.0030062783043831587, -0.014622309245169163, 0.042963139712810516, -0.017000693827867508, 0.0072921272367239, -0.03150884062051773, -0.07013380527496338, -0.03516203910112381, -0.03639879822731018, 0.024563957005739212, 0.044827792793512344, -0.05586349964141846, -0.03215575963258743, 0.03417263180017471, -0.027456073090434074, -0.040261294692754745, 0.0200355127453804, 0.011920464225113392, 0.00997018814086914, -0.007701209280639887, 0.0027541695162653923, -0.04596941918134689, 0.02268027514219284, 0.01659161038696766, -0.0223187617957592, -0.004109848756343126, -0.0208536759018898, 0.011882409453392029, -0.02446882054209709, 0.02698039449751377, 0.021158110350370407, -0.030938027426600456, 0.05426522344350815, 0.049812886863946915, -0.09825582802295685, -0.02020675502717495, -0.03240311145782471, 0.008614509366452694, 0.005926934536546469, -0.05689096078276634, 0.014603281393647194, 0.009037861600518227, -0.07017186284065247, -0.01051246002316475, -0.05243862420320511, 0.012196356430649757, -0.025210877880454063, 0.04284897819161415, 0.0020025998819619417, 0.09231937676668167, -0.016896044835448265, 0.0707046166062355, 0.024678118526935577, -0.06575758010149002, 0.016762854531407356, 0.0020085459109395742, 0.0095753762871027, -0.021101027727127075, 0.02821715548634529, -0.0661381185054779, 0.03776874765753746, -0.003986172843724489, -0.04284897819161415, 0.0879812017083168, -0.012358086183667183, -0.037749722599983215, 0.0772499367594719, -0.03715988248586655, 0.0050088781863451, 0.058907829225063324, -0.015935176983475685, -0.015126526355743408, -0.0033844413701444864, 0.030690675601363182, -0.04555082321166992, -0.024887416511774063, -0.0048471479676663876, 0.05856534466147423, -0.03200354427099228, -0.0020596811082214117, 0.02163378708064556, -0.03818734362721443, -0.05449355021119118, 0.07405338436365128, 0.05601571500301361, 0.0157258789986372, 0.008704887703061104, -0.0028683319687843323, 0.01563074439764023, 0.0211771372705698, -0.01842772401869297, 0.030481377616524696, -0.04741547629237175, -0.027265802025794983, 0.03443900868296623, -0.006883045192807913, 0.04220205545425415, -0.048671264201402664, 0.051601432263851166, 0.0001337098074145615, -0.00765839871019125, 0.02715163864195347, 0.00024883850710466504, -0.011520895175635815, -0.05369441211223602, 0.0003674604231491685, -0.08204475790262222, 0.0576900988817215, 0.024525903165340424, -0.00902834814041853, 0.00036240636836737394, -0.08387135714292526, -0.07667911797761917, 0.030443323776125908, -0.0070923431776463985, -0.002682817867025733, 0.018028154969215393, 0.005803258623927832, -0.014336902648210526, 0.00774877704679966, 0.00765839871019125, 0.007049532141536474, -0.020054539665579796, 0.004625957924872637, -0.029758349061012268, 0.040946271270513535, 0.007496668491512537, 0.04132681339979172, -0.04311535507440567, 0.08021815866231918, 0.009570620022714138, -0.006516773719340563, -0.00717796478420496, 0.010208026506006718, 0.028730886057019234, 0.014489118941128254, -0.008186399936676025, 0.0404135100543499, -0.03891037404537201, -0.0069543966092169285, -0.0005003526457585394, -0.022413896396756172, -0.03287879005074501, -0.001327138626947999, -0.019417131319642067, 0.08387135714292526, 0.006673747207969427, -0.012424681335687637, -0.005142067559063435, 0.03691253066062927, -0.08143588900566101, 0.006074394565075636, -0.006045853719115257, 0.024887416511774063, 0.05007926747202873, -0.04262065142393112, 0.05902199447154999, -0.0374833419919014, 0.04383838549256325, 0.020834648981690407, 0.022242654114961624, 0.008186399936676025, 0.00572715001180768, 0.07416754961013794, -0.013575819320976734, 0.0280268844217062, 0.01590663567185402, 0.005988772492855787, 0.0036817393265664577, 0.02163378708064556, -0.05430327728390694, 0.0036127662751823664, 0.014936255291104317, 0.03377306088805199, -0.025990987196564674, -0.05122089013457298, -0.020473135635256767, 0.002321303356438875, -0.01504090428352356, 0.021253244951367378, 0.02711358480155468, 0.020149674266576767, 0.056396257132291794 ]
4,545
sklearn.base
set_params
Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as :class:`~sklearn.pipeline.Pipeline`). The latter have parameters of the form ``<component>__<parameter>`` so that it's possible to update each component of a nested object. Parameters ---------- **params : dict Estimator parameters. Returns ------- self : estimator instance Estimator instance.
def set_params(self, **params): """Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as :class:`~sklearn.pipeline.Pipeline`). The latter have parameters of the form ``<component>__<parameter>`` so that it's possible to update each component of a nested object. Parameters ---------- **params : dict Estimator parameters. Returns ------- self : estimator instance Estimator instance. """ if not params: # Simple optimization to gain speed (inspect is slow) return self valid_params = self.get_params(deep=True) nested_params = defaultdict(dict) # grouped by prefix for key, value in params.items(): key, delim, sub_key = key.partition("__") if key not in valid_params: local_valid_params = self._get_param_names() raise ValueError( f"Invalid parameter {key!r} for estimator {self}. " f"Valid parameters are: {local_valid_params!r}." ) if delim: nested_params[key][sub_key] = value else: setattr(self, key, value) valid_params[key] = value for key, sub_params in nested_params.items(): valid_params[key].set_params(**sub_params) return self
(self, **params)
[ 0.04272640869021416, -0.0027561059687286615, -0.0002779787755571306, 0.02785877324640751, -0.056114498525857925, -0.014290250837802887, -0.02688443660736084, -0.014885677956044674, -0.016302073374390602, 0.08408153057098389, -0.027732469141483307, 0.02190450206398964, 0.0149758942425251, 0.04933023452758789, -0.047056786715984344, 0.0022091700229793787, 0.03433629870414734, -0.00571068748831749, 0.0071451254189014435, 0.02340209111571312, 0.0026839328929781914, -0.03671800717711449, 0.0034755803644657135, 0.051567599177360535, -0.00798413623124361, -0.013577543199062347, 0.017646295949816704, -0.01885519176721573, 0.04781460389494896, -0.013568521477282047, -0.031016340479254723, -0.04236554354429245, -0.04694852605462074, 0.03749386593699455, 0.05441843345761299, -0.044638991355895996, -0.010889098979532719, 0.052108895033597946, -0.062032680958509445, 0.06625480204820633, 0.0037890817038714886, -0.027263345196843147, -0.003622181713581085, -0.06279049813747406, 0.047165047377347946, 0.01767336018383503, 0.018259765580296516, 0.08545281738042831, 0.025332719087600708, -0.049582842737436295, 0.019847571849822998, -0.04395334795117378, 0.01687043532729149, -0.0008164569153450429, -0.035094115883111954, 0.06748174130916595, 0.07931811362504959, 0.04084990918636322, 0.061563558876514435, 0.001921605784446001, 0.0111868130043149, -0.032153066247701645, 0.016275009140372276, -0.024195993319153786, -0.03377695754170418, -0.07412165403366089, -0.05178411677479744, 0.016320116817951202, -0.03177415579557419, 0.006414374336600304, -0.0023726869840174913, -0.026126621291041374, -0.013433197513222694, 0.0031102045904845, -0.051675859838724136, 0.06654348969459534, -0.09072144329547882, 0.013261786662042141, 0.024033604189753532, 0.03045699931681156, -0.0010098579805344343, 0.0034733249340206385, -0.033127401024103165, -0.049618929624557495, -0.03675409406423569, -0.01220625638961792, -0.04748982563614845, -0.04048904404044151, 0.039550796151161194, 0.009084774181246758, -0.0052280304953455925, 0.07621467113494873, 0.005025044083595276, -0.00006420858699129894, 0.03918993100523949, 0.044097695499658585, -0.0021471462678164244, -0.02549510821700096, -0.0273896474391222, -0.02980744279921055, -0.028724849224090576, 0.016293050721287727, 0.03255001828074455, 0.03781864419579506, 0.007794682402163744, -0.06062530726194382, -0.0111777912825346, -0.026126621291041374, 0.05589797720313072, -0.029717227444052696, -0.029031584039330482, 0.030511129647493362, -0.09743352979421616, 0.03825168311595917, -0.007817236706614494, 0.010600407607853413, 0.022102976217865944, -0.04947458207607269, -0.025098156183958054, -0.01142137497663498, -0.022066891193389893, 0.09310315549373627, -0.02094820886850357, 0.015354802832007408, -0.016085553914308548, -0.023762956261634827, 0.026758134365081787, 0.062032680958509445, 0.00045953894732519984, -0.11706458032131195, -0.013433197513222694, -0.03572562709450722, -0.02435838244855404, 0.005327268503606319, 0.03642931580543518, -0.018566500395536423, 0.009229120798408985, -0.0023117910604923964, -0.059109676629304886, -0.007289471570402384, 0.027624210342764854, 0.009012601338326931, 0.011809305287897587, 0.012143105268478394, 0.04427812620997429, -0.02141733281314373, 0.026541614904999733, 0.011619850993156433, -0.049943707883358, -0.00608959561213851, -0.030132221058011055, 0.009328358806669712, 0.04528854787349701, -0.0036672898568212986, -0.010816926136612892, -0.059109676629304886, 0.006292582023888826, -0.02987961657345295, 0.02441251277923584, -0.004021388478577137, 0.003901852061972022, -0.017736511304974556, 0.009193033911287785, -0.0023478774819523096, 0.026198793202638626, 0.04027252644300461, -0.05766621604561806, -0.04030861333012581, -0.05380496010184288, -0.013839170336723328, 0.005530254915356636, -0.020659517496824265, -0.06802304089069366, 0.028309853747487068, -0.0038499776273965836, 0.045072030276060104, 0.02388925850391388, 0.006635403726249933, 0.00610312819480896, -0.006585785187780857, 0.0013949684798717499, 0.02690248005092144, -0.013333959504961967, -0.03785473108291626, -0.013532434590160847, -0.026685962453484535, -0.0012190468842163682, 0.007731531281024218, -0.062068767845630646, 0.005945249926298857, 0.06791477650403976, 0.017736511304974556, 0.00029996896046213806, 0.03586997464299202, 0.0011852157767862082, 0.03419195115566254, 0.00673013087362051, -0.040092092007398605, 0.02639726921916008, 0.12565316259860992, 0.010131282731890678, -0.0274798646569252, 0.05376887321472168, 0.03199067711830139, 0.02143537625670433, 0.0012551333056762815, 0.02585597150027752, 0.007334579713642597, 0.0011045850114896894, -0.020244522020220757, 0.011331158690154552, -0.0081239715218544, 0.05391322076320648, 0.023799041286110878, 0.03731343522667885, -0.016338160261511803, 0.003588350722566247, -0.014353402890264988, 0.04575767368078232, -0.03731343522667885, 0.0842980444431305, 0.021760154515504837, 0.05535668134689331, 0.02939244918525219, 0.010311715304851532, -0.02692052349448204, 0.022554058581590652, -0.06596610695123672, -0.03296501189470291, -0.01722227968275547, -0.002456136979162693, -0.033127401024103165, -0.002169700339436531, -0.024683160707354546, 0.006703066173940897, -0.005895630922168493, -0.03298305347561836, -0.015959251672029495, -0.046118538826704025, -0.022536015138030052, 0.005913673900067806, 0.010131282731890678, 0.009544877335429192, 0.003865765640512109, -0.05283062532544136, -0.01191756408661604, 0.013090375810861588, 0.04182424396276474, 0.02150755003094673, 0.009635093621909618, 0.07307514548301697, 0.018512370064854622, -0.05643927678465843, 0.06127486377954483, -0.035112157464027405, -0.006942139007151127, 0.051567599177360535, 0.05394930765032768, 0.0020321207121014595, -0.011872456409037113, -0.03251393139362335, -0.05073760822415352, -0.009472704492509365, 0.07173994928598404, 0.007772128563374281, -0.009671180509030819, 0.06748174130916595, 0.014551877975463867, -0.04640723019838333, 0.009752375073730946, 0.07094604521989822, 0.0045671965926885605, 0.021543636918067932, 0.0596148855984211, -0.006716598756611347, -0.0077225095592439175, -0.0061572580598294735, -0.06037270277738571, -0.030475042760372162, 0.023654695600271225, 0.04521637409925461, -0.029049627482891083, -0.015544257126748562, 0.0021877435501664877, 0.021742112934589386, -0.006788771599531174, 0.024123821407556534, 0.026162708178162575, 0.0007324430625885725, 0.006445949897170067, -0.011105618439614773, 0.00361992628313601, -0.0024719247594475746, -0.02798507548868656, 0.0020794840529561043, -0.03846820071339607, -0.06574959307909012, 0.026740090921521187, -0.0017389178974553943, -0.008290871977806091, 0.03749386593699455, 0.0020851227454841137, -0.031701985746622086, 0.015796862542629242, 0.041138600558042526, -0.010302693583071232, 0.04395334795117378, 0.00848934706300497, 0.01821465790271759, 0.013342981226742268, 0.05672796815633774, 0.09411357343196869, -0.05088195577263832, -0.033163487911224365, 0.047598082572221756, -0.044025521725416183, 0.013153526932001114, -0.018115419894456863, 0.02639726921916008, 0.04763416945934296, -0.00761424982920289, 0.0124227749183774, -0.04370074346661568, -0.028616588562726974, -0.01896345242857933, 0.01145746186375618, 0.04218510910868645, 0.023528393357992172, -0.03630301356315613, -0.01937844604253769, -0.05582580342888832, -0.019071711227297783, 0.03473325073719025, 0.03150350973010063, -0.04341205209493637, 0.01222429983317852, -0.01849432848393917, 0.019649095833301544, 0.02047908492386341, 0.0162298996001482, 0.07141517102718353, 0.019811484962701797, -0.026577701792120934, -0.02686639502644539, -0.048139382153749466, -0.007569142151623964, 0.054057568311691284, 0.031178729608654976, 0.03799907863140106, -0.019757354632019997, -0.050088051706552505, -0.004862654954195023, 0.05535668134689331, 0.008525433950126171, 0.022066891193389893, 0.030132221058011055, -0.009179501794278622, -0.011637894436717033, 0.016130661591887474, -0.06899737566709518, 0.04388117417693138, -0.0744103491306305, -0.028129421174526215, -0.014596986584365368, 0.025747712701559067, -0.021561680361628532, -0.015273608267307281, -0.028634632006287575, 0.051098473370075226, -0.05073760822415352, 0.03092612512409687, -0.06585785001516342, 0.01067258045077324, 0.008317936211824417, 0.04326770454645157, 0.05777447670698166, -0.0801120176911354, 0.010167369619011879, 0.011574742384254932, -0.002072717994451523, 0.05597015097737312, -0.037169087678194046, 0.0843702182173729, -0.008728420361876488, 0.03273044899106026, -0.01997387409210205, 0.06091399863362312, 0.0016396800056099892, 0.059145763516426086, -0.029121799394488335, 0.0007053781882859766, 0.0018144740024581552, -0.03532867506146431, -0.008926896378397942, -0.014145905151963234, -0.0349678136408329, 0.01662685163319111, -0.008647225797176361, -0.054057568311691284, -0.07765813171863556, -0.002986157312989235, -0.07744161784648895, 0.03825168311595917, 0.008809614926576614, 0.04074165225028992, -0.028562460094690323, 0.01394742913544178, 0.045577239245176315, 0.018043246120214462, -0.02699269726872444, -0.007911963388323784, -0.03079982101917267, 0.009418575093150139, -0.0072488742880523205, 0.005534765776246786, -0.00887276604771614, 0.06906954944133759, -0.00635122274979949, 0.047128960490226746, 0.0050881956703960896, 0.047092873603105545, 0.017925964668393135, -0.05532059445977211, 0.04637114331126213, 0.058568377047777176, -0.011403331533074379, -0.06329570710659027, -0.07307514548301697, 0.04929415136575699, 0.005543787498027086, -0.03538280725479126, 0.0038725316990166903, -0.043520309031009674, -0.021597765386104584, -0.009134393185377121, -0.0035071561578661203, -0.01194462925195694, 0.012134083546698093, 0.007203766144812107, 0.022824706509709358, -0.015390889719128609, -0.04121077433228493, -0.0013036245945841074, -0.05582580342888832, -0.01577881909906864, -0.029500707983970642, 0.03343413770198822, 0.032116979360580444, -0.03724126145243645, -0.05297497287392616, 0.07123474031686783, 0.010392909869551659, -0.0021291030570864677, 0.0027561059687286615, 0.017808685079216957, -0.01471426710486412, 0.05337192490696907, -0.03292892500758171, 0.039153844118118286, 0.049041543155908585, 0.02692052349448204, -0.040092092007398605, -0.009098307229578495, 0.043556395918130875, -0.05882098525762558, 0.009707266464829445, 0.07859638333320618, -0.007411263417452574, -0.015048068016767502, 0.013938408344984055, 0.046623747795820236, -0.059073589742183685, -0.003432727651670575, -0.02102038264274597, -0.0447472520172596, 0.015237521380186081, -0.008101417683064938, -0.040705565363168716, -0.06445048004388809, -0.022157106548547745, -0.03327174484729767, -0.034588903188705444, 0.07787465304136276, 0.032116979360580444, -0.008642715401947498, -0.021272987127304077, -0.051098473370075226, -0.01720423623919487, 0.0004248620825819671, 0.018602587282657623, -0.05192846432328224, 0.003247784450650215, 0.019324317574501038, 0.052578020840883255, -0.008466793224215508, 0.05398539453744888, 0.04384508728981018, 0.016112620010972023, 0.011313115246593952, -0.0398034006357193, 0.010086175054311752, -0.004003345500677824, 0.025711625814437866, -0.007275938987731934, 0.046587660908699036, -0.051567599177360535, -0.010853013023734093, 0.014813505113124847, -0.0323515422642231, 0.015544257126748562, -0.017267387360334396, -0.043628569692373276, -0.02591010183095932, 0.02843615598976612, -0.032604146748781204, -0.0449998565018177, -0.028526373207569122, 0.019631052389740944, 0.00684741185978055, -0.003784571075811982, 0.0799676701426506, -0.04730939120054245, 0.0647391676902771, -0.04777851700782776, 0.013884278014302254, 0.009707266464829445, -0.010780840180814266, -0.031593725085258484, 0.012116040103137493, 0.01191756408661604, 0.01812444068491459, -0.043159447610378265, -0.029663097113370895, 0.08523629605770111, 0.014948830008506775, 0.02733551897108555, 0.0798233225941658, -0.03639322891831398, 0.011890499852597713, 0.0124859269708395, 0.01997387409210205, 0.010356823913753033, 0.009373466484248638, -0.005611449480056763, 0.04691244289278984, -0.018304873257875443, 0.00650007976219058, 0.009544877335429192, 0.015011981129646301, -0.041102517396211624, -0.01223332155495882, -0.009968893602490425, -0.05532059445977211, 0.05218106880784035, -0.024881636723876, -0.012558099813759327, -0.0027899369597434998, -0.04936632141470909, 0.019216056913137436, 0.018241722136735916, -0.006842901464551687, 0.006220409180969, 0.03036678396165371, 0.017646295949816704, 0.032225240021944046, 0.02699269726872444, -0.014921764843165874, 0.01849432848393917, -0.06878085434436798, -0.005043087527155876, 0.025783799588680267, 0.02890528179705143, -0.04398943483829498, -0.0136948237195611, -0.053480181843042374, 0.02841811254620552, 0.002458392409607768, 0.016374247148633003, -0.05412973836064339, 0.0036763115786015987, 0.030258525162935257, -0.0012472394155338407, -0.040561217814683914, 0.0024155396968126297, 0.0027470842469483614, 0.013839170336723328, -0.04178816080093384, 0.03383108600974083, -0.014822526834905148, -0.01720423623919487, -0.04398943483829498, -0.03918993100523949, -0.011493547819554806, -0.025044025853276253, -0.004499534610658884, 0.04193250462412834, -0.04828372597694397, -0.05766621604561806, 0.031070470809936523, -0.038540374487638474, -0.03083590790629387, 0.0062384526245296, 0.007979625836014748, 0.034119781106710434, -0.0038499776273965836, -0.05171194300055504, -0.006558720022439957, 0.09050492197275162, 0.03191850334405899, 0.017556078732013702, 0.05228932946920395, 0.014380467124283314, 0.031683940440416336, -0.034065648913383484, -0.026252923533320427, -0.005909163039177656, -0.02381708472967148, 0.00546259293332696, 0.055464938282966614, -0.07592598348855972, -0.02037082612514496, -0.031683940440416336, -0.0499076209962368, -0.0064233955927193165, -0.09570138156414032, -0.06766217201948166, 0.00698724715039134, -0.13077744841575623, 0.01774553209543228, -0.053660616278648376, 0.028652675449848175, -0.04431421309709549, 0.031178729608654976, -0.06528046727180481, 0.059109676629304886, -0.026234880089759827, 0.03799907863140106, -0.002014077501371503, -0.02249992825090885, 0.0034440045710653067, 0.011556699872016907, 0.02897745370864868, -0.011881478130817413, -0.019793441519141197, -0.03150350973010063, -0.013866234570741653, -0.024665117263793945, 0.004377742763608694, 0.06322353333234787, 0.036663878709077835, 0.013559499755501747, 0.04175207391381264, -0.05640318989753723, 0.001095563406124711, 0.047020699828863144, -0.01297309435904026, 0.04204076528549194, 0.023744912818074226, 0.04081382229924202, 0.014786440879106522, -0.045180290937423706, 0.0008034883067011833, 0.04871676489710808, 0.0026952100452035666, 0.015273608267307281, 0.007420285139232874, -0.04095816984772682, 0.016726089641451836, 0.01849432848393917, 0.04038078710436821, -0.03727734833955765, 0.009941828437149525, -0.04536072164773941, -0.02535076066851616, 0.033632609993219376, -0.010465082712471485, -0.00736615527421236, -0.05138716474175453, -0.006842901464551687, 0.016148705035448074, 0.008313425816595554, 0.07260602712631226, -0.032225240021944046, 0.009202055633068085, -0.004709287546575069, -0.008728420361876488, 0.018431175500154495, 0.010095196776092052, 0.003272593952715397, -0.03742169216275215, -0.04384508728981018, -0.06755391508340836, 0.02547706477344036, -0.007546587847173214, -0.026794221252202988, -0.02796703204512596, -0.04131903499364853, -0.07801900058984756, 0.011565720662474632, 0.009328358806669712, -0.02138124778866768, 0.03419195115566254, -0.07087387144565582, -0.014100797474384308, 0.002891430165618658, 0.05315540358424187, 0.0012889644131064415, 0.01650957018136978, 0.053588442504405975, -0.07708074897527695, 0.013595586642622948, 0.008981025777757168, -0.019270187243819237, -0.06852824985980988, 0.0746990442276001, 0.07758595794439316, 0.011529634706676006, -0.007875877432525158, 0.005638514645397663, 0.015823926776647568, 0.011340180411934853, -0.0035635412205010653, 0.03947862237691879, -0.0015167604433372617, -0.016013382002711296, 0.009626071900129318, -0.00020298652816563845, 0.020190393552184105, 0.056511446833610535, -0.04741765186190605, 0.025206414982676506, -0.0002203249605372548, -0.03846820071339607, -0.06412570178508759, -0.0198656152933836, -0.08350414782762527, 0.050088051706552505, -0.01042899675667286, -0.0026591233909130096, 0.03918993100523949, 0.01901758275926113, 0.030096136033535004, -0.02342013455927372, -0.0036086493637412786, -0.02646944299340248, 0.016987716779112816, 0.006459482479840517, -0.011349202133715153, 0.07578163594007492, -0.045144204050302505, 0.000013329800822248217, -0.015589364804327488, -0.006021933630108833, 0.024629032239317894, 0.055067989975214005, -0.04748982563614845, 0.0016261475393548608, 0.025260545313358307, 0.00597231462597847, -0.07217298448085785, -0.04142729565501213, -0.046118538826704025, 0.05091804265975952, -0.01217919122427702, 0.016581743955612183, 0.03781864419579506, 0.04546898230910301, 0.014272208325564861 ]
4,546
sklearn.utils._metadata_requests
set_transform_request
Request metadata passed to the ``transform`` method. Note that this method is only relevant if ``enable_metadata_routing=True`` (see :func:`sklearn.set_config`). Please see :ref:`User Guide <metadata_routing>` on how the routing mechanism works. The options for each parameter are: - ``True``: metadata is requested, and passed to ``transform`` if provided. The request is ignored if metadata is not provided. - ``False``: metadata is not requested and the meta-estimator will not pass it to ``transform``. - ``None``: metadata is not requested, and the meta-estimator will raise an error if the user provides it. - ``str``: metadata should be passed to the meta-estimator with this given alias instead of the original name. The default (``sklearn.utils.metadata_routing.UNCHANGED``) retains the existing request. This allows you to change the request for some parameters and not others. .. versionadded:: 1.3 .. note:: This method is only relevant if this estimator is used as a sub-estimator of a meta-estimator, e.g. used inside a :class:`~sklearn.pipeline.Pipeline`. Otherwise it has no effect. Parameters ---------- check_input : str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED Metadata routing for ``check_input`` parameter in ``transform``. metric : str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED Metadata routing for ``metric`` parameter in ``transform``. metric_missing : str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED Metadata routing for ``metric_missing`` parameter in ``transform``. metric_special : str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED Metadata routing for ``metric_special`` parameter in ``transform``. show_digits : str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED Metadata routing for ``show_digits`` parameter in ``transform``. Returns ------- self : object The updated object.
def __get__(self, instance, owner): # we would want to have a method which accepts only the expected args def func(**kw): """Updates the request for provided parameters This docstring is overwritten below. See REQUESTER_DOC for expected functionality """ if not _routing_enabled(): raise RuntimeError( "This method is only available when metadata routing is enabled." " You can enable it using" " sklearn.set_config(enable_metadata_routing=True)." ) if self.validate_keys and (set(kw) - set(self.keys)): raise TypeError( f"Unexpected args: {set(kw) - set(self.keys)}. Accepted arguments" f" are: {set(self.keys)}" ) requests = instance._get_metadata_request() method_metadata_request = getattr(requests, self.name) for prop, alias in kw.items(): if alias is not UNCHANGED: method_metadata_request.add_request(param=prop, alias=alias) instance._metadata_request = requests return instance # Now we set the relevant attributes of the function so that it seems # like a normal method to the end user, with known expected arguments. func.__name__ = f"set_{self.name}_request" params = [ inspect.Parameter( name="self", kind=inspect.Parameter.POSITIONAL_OR_KEYWORD, annotation=owner, ) ] params.extend( [ inspect.Parameter( k, inspect.Parameter.KEYWORD_ONLY, default=UNCHANGED, annotation=Optional[Union[bool, None, str]], ) for k in self.keys ] ) func.__signature__ = inspect.Signature( params, return_annotation=owner, ) doc = REQUESTER_DOC.format(method=self.name) for metadata in self.keys: doc += REQUESTER_DOC_PARAM.format(metadata=metadata, method=self.name) doc += REQUESTER_DOC_RETURN func.__doc__ = doc return func
(self: optbinning.binning.binning_process.BinningProcess, *, check_input: Union[bool, NoneType, str] = '$UNCHANGED$', metric: Union[bool, NoneType, str] = '$UNCHANGED$', metric_missing: Union[bool, NoneType, str] = '$UNCHANGED$', metric_special: Union[bool, NoneType, str] = '$UNCHANGED$', show_digits: Union[bool, NoneType, str] = '$UNCHANGED$') -> optbinning.binning.binning_process.BinningProcess
[ 0.04383838549256325, -0.05829896405339241, -0.019093671813607216, 0.004680661018937826, -0.0029634672682732344, -0.017267072573304176, -0.011530408635735512, 0.009989215061068535, 0.05700512230396271, 0.01090251561254263, -0.021424489095807076, 0.006531044375151396, 0.05129700154066086, -0.00529428431764245, -0.0198832955211401, 0.037521395832300186, 0.029929593205451965, 0.02382190153002739, 0.030119862407445908, -0.03369695320725441, 0.01919832080602646, -0.04281092435121536, -0.028749912977218628, 0.014955282211303711, 0.008476562798023224, 0.06552925705909729, 0.037978045642375946, -0.04536055028438568, 0.0899600237607956, -0.0064882333390414715, -0.025172822177410126, -0.0141751728951931, 0.014707930386066437, 0.06286546587944031, 0.028959210962057114, -0.031527865678071976, -0.01081689354032278, 0.02268027514219284, -0.06259908527135849, -0.015297770500183105, -0.037197936326265335, -0.026675961911678314, 0.048633210361003876, -0.09665755182504654, 0.059516698122024536, 0.0319274365901947, -0.005365635734051466, 0.10510557144880295, -0.019226862117648125, -0.017619073390960693, 0.013195278123021126, -0.011235489509999752, 0.015136039815843105, -0.005104013253003359, -0.00592217780649662, 0.0573476105928421, 0.05555906519293785, 0.04406671226024628, 0.05947864428162575, 0.028007857501506805, 0.027227748185396194, 0.034724414348602295, 0.03240311145782471, -0.008371913805603981, -0.04357200488448143, -0.03873912990093231, -0.04642606899142265, -0.01389927975833416, 0.008624022826552391, 0.031756192445755005, 0.02867380529642105, -0.01792350597679615, 0.005456014536321163, 0.026637908071279526, 0.021614760160446167, -0.026352502405643463, -0.040451567620038986, -0.0524766780436039, 0.05293332785367966, -0.041669297963380814, 0.017086315900087357, -0.0171909648925066, -0.027056504040956497, -0.0811314582824707, -0.009075915440917015, -0.032117705792188644, -0.0084337517619133, -0.04928012937307358, 0.0394241027534008, 0.0030062783043831587, -0.08554574102163315, 0.0514872707426548, -0.016173016279935837, -0.0030110350344330072, 0.009556349366903305, -0.030652621760964394, 0.001823031809180975, -0.058413125574588776, 0.0024318983778357506, -0.026580827310681343, 0.0007319478900171816, 0.03590409457683563, 0.06640449911355972, 0.07568971067667007, 0.037064746022224426, -0.05053591728210449, -0.01668674685060978, -0.008657320402562618, -0.011206948198378086, -0.0038077938370406628, 0.011406732723116875, -0.010893001221120358, -0.05947864428162575, 0.019103186205029488, 0.001309300772845745, 0.0011220029555261135, -0.01975010521709919, -0.04326757416129112, -0.0508403517305851, -0.014993336983025074, -0.026809152215719223, 0.011083272285759449, -0.025344066321849823, -0.06370265781879425, 0.0007224343135021627, 0.00418357877060771, 0.0095753762871027, 0.013404576107859612, 0.04486584663391113, -0.07241705805063248, -0.03160397335886955, -0.006811693776398897, -0.03904356062412262, 0.0928521379828453, 0.0439906008541584, 0.016201555728912354, 0.04745353013277054, 0.020473135635256767, -0.011949004605412483, 0.059098102152347565, -0.002987251151353121, 0.020130647346377373, 0.03681739419698715, -0.0213483814150095, -0.0014650849625468254, -0.050688132643699646, 0.02698039449751377, -0.00014924364222679287, 0.025629473850131035, -0.034134577959775925, 0.025952933356165886, -0.018332589417696, 0.0027993586845695972, -0.012729114852845669, -0.0025734121445566416, 0.0018694102764129639, 0.022984709590673447, -0.004792444873601198, 0.011254516430199146, -0.018132803961634636, -0.004725850187242031, -0.005589203909039497, -0.012148789130151272, -0.09132996946573257, 0.03523814678192139, 0.021462542936205864, -0.0061219618655741215, -0.04851904511451721, -0.03826345130801201, 0.035504527390003204, -0.060924701392650604, -0.027722451835870743, -0.03371598199009895, 0.006768882740288973, 0.03535230830311775, 0.03923383355140686, 0.017114855349063873, 0.005527365952730179, 0.008562184870243073, 0.028141047805547714, 0.01383268553763628, -0.05266695097088814, -0.08546963334083557, -0.035827986896038055, 0.00637882761657238, 0.07127542793750763, 0.006336016580462456, 0.0019395726267248392, -0.043686170130968094, 0.0456269308924675, 0.029415860772132874, -0.008419482037425041, 0.053656358271837234, 0.034362901002168655, -0.031299542635679245, -0.048024341464042664, -0.059098102152347565, 0.04882347956299782, 0.013804144226014614, 0.07683134078979492, 0.0583370178937912, 0.008966510184109211, 0.018893888220191002, 0.04901375249028206, 0.0060791512951254845, 0.04992705211043358, 0.03643685206770897, -0.00017035180644597858, -0.05236251652240753, -0.013043061830103397, 0.013185764662921429, -0.026580827310681343, 0.018132803961634636, -0.008486076258122921, 0.0038815238513052464, -0.010893001221120358, 0.017723722383379936, -0.015554635785520077, -0.01207268051803112, -0.022946655750274658, 0.09277603030204773, 0.04810045287013054, 0.033677928149700165, 0.019731078296899796, 0.025952933356165886, -0.031128298491239548, 0.05555906519293785, -0.05190586671233177, -0.03668420389294624, -0.07907653599977493, 0.004661634098738432, 0.0007081640069372952, 0.018779724836349487, 0.043876439332962036, -0.034724414348602295, -0.01997843012213707, 0.03617047518491745, 0.03858691081404686, -0.013414089567959309, -0.0067260717041790485, -0.005936447996646166, 0.04943234473466873, 0.050041213631629944, 0.033126141875982285, -0.054988253861665726, -0.017000693827867508, -0.004568876698613167, 0.06781250238418579, 0.04284897819161415, -0.0018075723201036453, 0.042734816670417786, -0.0257436353713274, -0.05186781287193298, -0.002844548085704446, -0.031128298491239548, -0.03398235887289047, -0.04220205545425415, 0.00020528431923594326, 0.04292508587241173, -0.015307283960282803, -0.03072872944176197, 0.012234410271048546, 0.0018587076338008046, 0.04147902876138687, 0.018142318353056908, 0.011787273921072483, 0.043191466480493546, 0.013823171146214008, -0.055711280554533005, 0.0048352559097111225, -0.009580133482813835, 0.045018065720796585, -0.0014948147581890225, 0.01764761470258236, -0.018208913505077362, -0.05236251652240753, -0.0001332638639723882, -0.02437368594110012, -0.04326757416129112, -0.012348572723567486, 0.05015537515282631, -0.02368871122598648, 0.04330562800168991, 0.006083908025175333, -0.014384469948709011, -0.030690675601363182, -0.004549849778413773, 0.05369441211223602, 0.012224896810948849, -0.020872702822089195, 0.01113084051758051, 0.007705966476351023, -0.005817528814077377, -0.04258259758353233, 0.032174788415431976, -0.0034795766696333885, -0.07310202717781067, 0.001252219546586275, 0.001746923546306789, -0.011435273103415966, 0.02098686620593071, -0.0011440030066296458, -0.033031005412340164, -0.017818856984376907, 0.0527811124920845, -0.02153865061700344, 0.08097924292087555, -0.008005642332136631, -0.011739706620573997, 0.0057366639375686646, 0.0038410911802202463, 0.04532249644398689, -0.03360181674361229, -0.044561415910720825, -0.0012052464298903942, -0.0026780611369758844, -0.013908793218433857, 0.018265994265675545, 0.04018518701195717, 0.10411616414785385, -0.014374956488609314, 0.04741547629237175, -0.034305818378925323, -0.007330181542783976, -0.013975388370454311, -0.012196356430649757, -0.0035271444357931614, -0.004147902596741915, -0.03828248009085655, 0.0008936780504882336, -0.03118537925183773, -0.003819685662165284, 0.022642221301794052, 0.02469714544713497, -0.08615460246801376, 0.031299542635679245, -0.004078929778188467, -0.023441359400749207, 0.0145842544734478, -0.012386627495288849, 0.035009823739528656, -0.017457343637943268, -0.006183800287544727, -0.012776682153344154, -0.03645588085055351, -0.01124500297009945, 0.052058082073926926, -0.002310600597411394, 0.07915264368057251, -0.023422332480549812, 0.021424489095807076, -0.03818734362721443, 0.05217224732041359, 0.04905180633068085, 0.08432800322771072, -0.006616665981709957, -0.013804144226014614, -0.045931365340948105, -0.007458614185452461, -0.07093294709920883, 0.028426453471183777, -0.04840488359332085, -0.0036508203484117985, 0.006131475791335106, 0.010864460840821266, -0.0009370835614390671, -0.02542017586529255, 0.0037079015746712685, 0.025819743052124977, -0.05651041865348816, 0.0034986038226634264, -0.09825582802295685, -0.054341331124305725, 0.023993143811821938, 0.0191507525742054, 0.00206324877217412, -0.03995686024427414, -0.017933020368218422, -0.050726186484098434, 0.028787968680262566, 0.03206062316894531, 0.022147517651319504, -0.005056445952504873, 0.01134013757109642, 0.01036024373024702, -0.045741092413663864, 0.025762662291526794, 0.016163501888513565, 0.038472749292850494, -0.017752263695001602, 0.021881138905882835, -0.05281916633248329, -0.01424176711589098, 0.01067419070750475, -0.01896999590098858, -0.06986742466688156, 0.02623833902180195, -0.010350730270147324, 0.007225532550364733, -0.04265870526432991, 0.05449355021119118, -0.05647236481308937, 0.012966953217983246, 0.024544930085539818, 0.034496091306209564, 0.009751376695930958, 0.03828248009085655, 0.02701845020055771, 0.01561171654611826, 0.019283942878246307, -0.048899587243795395, -0.04897569492459297, 0.020092593505978584, -0.02414536103606224, -0.0017255180282518268, 0.016525017097592354, 0.02861672453582287, -0.0046544987708330154, 0.029377806931734085, 0.006512016989290714, 0.056129876524209976, 0.008633536286652088, 0.01948372647166252, 0.03464830666780472, 0.05171559751033783, 0.006854504346847534, -0.045056119561195374, -0.04262065142393112, -0.0025353580713272095, 0.041402921080589294, 0.008847590535879135, 0.02939683385193348, -0.04147902876138687, -0.008557427674531937, -0.036284636706113815, -0.01549755409359932, -0.05651041865348816, -0.025115741416811943, 0.013252358883619308, 0.051144782453775406, -0.056396257132291794, -0.04467557743191719, -0.017619073390960693, -0.022185571491718292, -0.04265870526432991, -0.05396078899502754, 0.010550513863563538, 0.03881523758172989, 0.056852906942367554, -0.06640449911355972, 0.05323776230216026, 0.03082386590540409, 0.005403690040111542, 0.041669297963380814, -0.023441359400749207, -0.052248355001211166, 0.035314254462718964, -0.050497863441705704, -0.0061505027115345, 0.038796208798885345, 0.03428679332137108, 0.002775574801489711, -0.06263713538646698, -0.020929785445332527, -0.02793174982070923, 0.03476246818900108, 0.016791395843029022, 0.010645649395883083, -0.06655671447515488, -0.032536301761865616, 0.030234025791287422, -0.06971520930528641, -0.028559641912579536, -0.01031267549842596, -0.023289142176508904, 0.02176697552204132, -0.013299927115440369, 0.02066340669989586, -0.07119932025671005, -0.0219953004270792, 0.016972152516245842, -0.02464006468653679, 0.040946271270513535, 0.05125894770026207, -0.01709582842886448, -0.06625228375196457, -0.01332846749573946, -0.002014491707086563, -0.022851519286632538, -0.0074919117614626884, -0.009504024870693684, 0.06507260352373123, 0.05415106192231178, 0.028102992102503777, -0.017447829246520996, 0.053199708461761475, 0.04532249644398689, 0.015469013713300228, -0.018865346908569336, -0.01435592956840992, -0.018722644075751305, -0.032992951571941376, 0.020225783810019493, 0.04189762473106384, 0.015488040633499622, -0.050041213631629944, -0.0469207726418972, -0.0157258789986372, 0.0017516802763566375, -0.007130397018045187, -0.024773254990577698, -0.004245416726917028, -0.00486855348572135, 0.06081053987145424, -0.004454714246094227, -0.017409775406122208, -0.07744020223617554, 0.008096021600067616, -0.055711280554533005, -0.014003928750753403, 0.06849747896194458, 0.012862304225564003, 0.053618304431438446, -0.05175365135073662, 0.011635057628154755, -0.0009210294811055064, 0.012919384986162186, -0.0187416709959507, -0.012928899377584457, 0.028959210962057114, -0.011149867437779903, -0.006188557017594576, -0.010208026506006718, 0.017314640805125237, 0.015763932839035988, 0.06149551272392273, -0.02427855134010315, -0.011473327875137329, 0.04650217667222023, 0.005265743471682072, 0.024792281910777092, 0.040261294692754745, -0.06507260352373123, 0.03164203092455864, -0.006017313338816166, -0.043914493173360825, 0.02349844016134739, -0.013452143408358097, 0.022756384685635567, -0.09140607714653015, -0.06275130063295364, 0.03845372423529625, 0.041631244122982025, 0.015554635785520077, -0.012339059263467789, 0.01031267549842596, 0.053656358271837234, -0.018132803961634636, 0.030253052711486816, 0.01641085371375084, -0.020054539665579796, -0.02684720605611801, 0.02551531046628952, 0.02903532050549984, -0.03786388412117958, 0.07736409455537796, 0.05338997766375542, 0.015649771317839622, -0.04669244587421417, -0.09422208368778229, -0.008604995906352997, 0.007606074213981628, -0.0032417383044958115, 0.027551207691431046, -0.035732850432395935, 0.05829896405339241, 0.017029233276844025, -0.018170857802033424, -0.03272657096385956, -0.06008750945329666, 0.026771098375320435, -0.04657828435301781, 0.021709894761443138, -0.022109463810920715, -0.0674319639801979, 0.0030062783043831587, -0.014622309245169163, 0.042963139712810516, -0.017000693827867508, 0.0072921272367239, -0.03150884062051773, -0.07013380527496338, -0.03516203910112381, -0.03639879822731018, 0.024563957005739212, 0.044827792793512344, -0.05586349964141846, -0.03215575963258743, 0.03417263180017471, -0.027456073090434074, -0.040261294692754745, 0.0200355127453804, 0.011920464225113392, 0.00997018814086914, -0.007701209280639887, 0.0027541695162653923, -0.04596941918134689, 0.02268027514219284, 0.01659161038696766, -0.0223187617957592, -0.004109848756343126, -0.0208536759018898, 0.011882409453392029, -0.02446882054209709, 0.02698039449751377, 0.021158110350370407, -0.030938027426600456, 0.05426522344350815, 0.049812886863946915, -0.09825582802295685, -0.02020675502717495, -0.03240311145782471, 0.008614509366452694, 0.005926934536546469, -0.05689096078276634, 0.014603281393647194, 0.009037861600518227, -0.07017186284065247, -0.01051246002316475, -0.05243862420320511, 0.012196356430649757, -0.025210877880454063, 0.04284897819161415, 0.0020025998819619417, 0.09231937676668167, -0.016896044835448265, 0.0707046166062355, 0.024678118526935577, -0.06575758010149002, 0.016762854531407356, 0.0020085459109395742, 0.0095753762871027, -0.021101027727127075, 0.02821715548634529, -0.0661381185054779, 0.03776874765753746, -0.003986172843724489, -0.04284897819161415, 0.0879812017083168, -0.012358086183667183, -0.037749722599983215, 0.0772499367594719, -0.03715988248586655, 0.0050088781863451, 0.058907829225063324, -0.015935176983475685, -0.015126526355743408, -0.0033844413701444864, 0.030690675601363182, -0.04555082321166992, -0.024887416511774063, -0.0048471479676663876, 0.05856534466147423, -0.03200354427099228, -0.0020596811082214117, 0.02163378708064556, -0.03818734362721443, -0.05449355021119118, 0.07405338436365128, 0.05601571500301361, 0.0157258789986372, 0.008704887703061104, -0.0028683319687843323, 0.01563074439764023, 0.0211771372705698, -0.01842772401869297, 0.030481377616524696, -0.04741547629237175, -0.027265802025794983, 0.03443900868296623, -0.006883045192807913, 0.04220205545425415, -0.048671264201402664, 0.051601432263851166, 0.0001337098074145615, -0.00765839871019125, 0.02715163864195347, 0.00024883850710466504, -0.011520895175635815, -0.05369441211223602, 0.0003674604231491685, -0.08204475790262222, 0.0576900988817215, 0.024525903165340424, -0.00902834814041853, 0.00036240636836737394, -0.08387135714292526, -0.07667911797761917, 0.030443323776125908, -0.0070923431776463985, -0.002682817867025733, 0.018028154969215393, 0.005803258623927832, -0.014336902648210526, 0.00774877704679966, 0.00765839871019125, 0.007049532141536474, -0.020054539665579796, 0.004625957924872637, -0.029758349061012268, 0.040946271270513535, 0.007496668491512537, 0.04132681339979172, -0.04311535507440567, 0.08021815866231918, 0.009570620022714138, -0.006516773719340563, -0.00717796478420496, 0.010208026506006718, 0.028730886057019234, 0.014489118941128254, -0.008186399936676025, 0.0404135100543499, -0.03891037404537201, -0.0069543966092169285, -0.0005003526457585394, -0.022413896396756172, -0.03287879005074501, -0.001327138626947999, -0.019417131319642067, 0.08387135714292526, 0.006673747207969427, -0.012424681335687637, -0.005142067559063435, 0.03691253066062927, -0.08143588900566101, 0.006074394565075636, -0.006045853719115257, 0.024887416511774063, 0.05007926747202873, -0.04262065142393112, 0.05902199447154999, -0.0374833419919014, 0.04383838549256325, 0.020834648981690407, 0.022242654114961624, 0.008186399936676025, 0.00572715001180768, 0.07416754961013794, -0.013575819320976734, 0.0280268844217062, 0.01590663567185402, 0.005988772492855787, 0.0036817393265664577, 0.02163378708064556, -0.05430327728390694, 0.0036127662751823664, 0.014936255291104317, 0.03377306088805199, -0.025990987196564674, -0.05122089013457298, -0.020473135635256767, 0.002321303356438875, -0.01504090428352356, 0.021253244951367378, 0.02711358480155468, 0.020149674266576767, 0.056396257132291794 ]
4,547
optbinning.binning.binning_process
summary
Binning process summary with main statistics for all binned variables. Parameters ---------- df_summary : pandas.DataFrame Binning process summary.
def summary(self): """Binning process summary with main statistics for all binned variables. Parameters ---------- df_summary : pandas.DataFrame Binning process summary. """ self._check_is_fitted() if self._is_updated: self._binning_selection_criteria() self._is_updated = False df_summary = pd.DataFrame.from_dict(self._variable_stats).T df_summary.reset_index(inplace=True) df_summary.rename(columns={"index": "name"}, inplace=True) df_summary["selected"] = self._support columns = ["name", "dtype", "status", "selected", "n_bins"] columns += _METRICS[self._target_dtype]["metrics"] return df_summary[columns]
(self)
[ 0.01717003621160984, -0.020053893327713013, 0.0005387819837778807, -0.03918495401740074, 0.022769154980778694, 0.0014031070750206709, 0.002424657577648759, -0.03079071268439293, -0.017959769815206528, -0.014188573695719242, -0.07922175526618958, 0.01549296360462904, -0.02912251278758049, -0.024206645786762238, -0.032689619809389114, 0.02158011868596077, 0.03666490688920021, -0.016051989048719406, -0.004106167703866959, 0.003323089797049761, -0.040427230298519135, 0.035156428813934326, 0.005142137873917818, 0.02906927280128002, -0.009796238504350185, -0.023425787687301636, 0.01601649448275566, -0.07560140639543533, 0.0031678052619099617, 0.03570657968521118, -0.051004327833652496, -0.05689626932144165, 0.019219793379306793, -0.02415340580046177, -0.028980538249015808, 0.013381093740463257, 0.02047981694340706, 0.00884234718978405, 0.009219466708600521, 0.03512093424797058, 0.02591034024953842, -0.05813854560256004, -0.039078470319509506, 0.010790059342980385, 0.016761859878897667, -0.01072794571518898, 0.04465096816420555, 0.02951294183731079, 0.03203298896551132, -0.028235172852873802, -0.03130536898970604, -0.009618770331144333, -0.02292887680232525, 0.041137102991342545, -0.003005865728482604, 0.007089850027114153, 0.00563461147248745, -0.03504994511604309, 0.004055145662277937, 0.023159584030508995, 0.0020697214640676975, 0.06619559228420258, -0.012857562862336636, -0.05586695298552513, 0.017862163484096527, -0.045325350016355515, -0.05600892752408981, 0.012751081958413124, 0.007112033665180206, -0.02339029312133789, 0.017116796225309372, -0.021118702366948128, 0.040356241166591644, 0.10073088109493256, -0.04163401201367378, -0.06679898500442505, -0.04812934249639511, -0.031660307198762894, -0.001657108194194734, -0.034428808838129044, 0.06818323582410812, 0.029619423672556877, 0.02069277875125408, -0.038688041269779205, -0.0353693887591362, -0.0403207503259182, 0.009955959394574165, 0.07687917351722717, 0.05785459652543068, -0.02422439306974411, 0.04408307373523712, 0.04099512845277786, 0.028856310993433, 0.07084526121616364, 0.013638421893119812, -0.03228144347667694, -0.07049032300710678, 0.01597212813794613, -0.0798606351017952, -0.03929143399000168, -0.05405677855014801, 0.04734848439693451, 0.011207109317183495, 0.08717232197523117, -0.052672527730464935, 0.015643810853362083, 0.01822597160935402, -0.032174963504076004, -0.021810827776789665, 0.04947810247540474, -0.013762650080025196, 0.004028525669127703, -0.009672010317444801, -0.05231758952140808, -0.014774218201637268, -0.03428683429956436, -0.02544892393052578, 0.014126459136605263, -0.056860774755477905, 0.025466669350862503, 0.031731292605400085, 0.006907945033162832, 0.020728271454572678, -0.0201603751629591, -0.035671085119247437, 0.04710002988576889, 0.014224067330360413, -0.019379515200853348, 0.0041749365627765656, -0.03412711247801781, 0.037907183170318604, -0.04241487383842468, 0.010168921202421188, 0.07325882464647293, 0.03730379045009613, -0.0743236318230629, 0.002386945765465498, -0.010231034830212593, 0.0077154249884188175, 0.005674541927874088, 0.054979611188173294, 0.030613243579864502, -0.03111015446484089, -0.03467726334929466, 0.046993549913167953, 0.030826205387711525, 0.006801464129239321, -0.0018512139795348048, -0.022698167711496353, -0.09292228519916534, -0.00875805038958788, -0.04575127363204956, -0.04131456837058067, -0.035404883325099945, 0.030826205387711525, 0.03260088711977005, 0.08248716592788696, -0.04788088798522949, -0.05032994970679283, -0.05650583654642105, 0.010293148458003998, -0.004443357232958078, -0.013327852822840214, -0.04560929909348488, -0.07325882464647293, 0.017116796225309372, -0.038936495780944824, -0.024969758465886116, -0.039788343012332916, -0.0034761561546474695, -0.005488200578838587, 0.00544383330270648, -0.00019881971820723265, 0.0995241031050682, 0.026389503851532936, 0.06985143572092056, -0.003354146843776107, -0.004836005158722401, -0.005488200578838587, 0.028572361916303635, 0.025661885738372803, -0.0013587400317192078, -0.0766662135720253, -0.0450768917798996, -0.049123164266347885, -0.004496597684919834, -0.0007137544453144073, -0.043337706476449966, 0.017862163484096527, 0.030258309096097946, -0.016469039022922516, -0.003367456840351224, 0.01991191878914833, -0.031536079943180084, 0.025235962122678757, -0.038297612220048904, -0.03368344157934189, 0.008292196318507195, 0.0199651587754488, -0.05050741508603096, 0.050542909651994705, -0.012192057445645332, 0.0001612463966012001, 0.0687156394124031, 0.0004966333508491516, -0.024508342146873474, -0.027614034712314606, 0.015803532674908638, -0.020391082391142845, -0.026566972956061363, 0.004086202476173639, -0.06165241077542305, -0.010825552977621555, 0.07311685383319855, 0.04670960083603859, -0.01661101169884205, 0.011286970227956772, -0.06232679262757301, -0.01272446196526289, -0.004702904261648655, 0.019344020634889603, -0.057961076498031616, 0.046816080808639526, 0.057251203805208206, -0.07265543192625046, 0.026531478390097618, 0.0434441864490509, -0.027401072904467583, 0.07936372607946396, -0.03098592720925808, 0.02209477685391903, -0.05501510575413704, -0.03737477958202362, 0.029228992760181427, 0.005275238770991564, 0.05895489826798439, -0.006486458238214254, 0.0049513597041368484, 0.025040745735168457, -0.04085315391421318, -0.041846975684165955, -0.04993951693177223, 0.022769154980778694, 0.0013576308265328407, -0.04135006293654442, -0.06555671244859695, 0.0011186035117134452, 0.045715779066085815, -0.028519121930003166, 0.0068458314053714275, 0.036877866834402084, -0.0338076688349247, 0.001882270909845829, -0.018900351598858833, 0.013443207368254662, -0.05387930944561958, -0.05089784786105156, 0.016158469021320343, -0.00823008269071579, -0.00982285849750042, 0.0011302498169243336, -0.01680622808635235, 0.02248520590364933, 0.0694965049624443, -0.019539235159754753, 0.034624021500349045, -0.02662021294236183, -0.00650420505553484, -0.015910014510154724, -0.03343498706817627, 0.0489811897277832, -0.013620675541460514, -0.013540814630687237, -0.009902719408273697, -0.05128827691078186, -0.02848362736403942, 0.025626391172409058, -0.020515309646725655, -0.037729714065790176, -0.022023789584636688, 0.0426633283495903, -0.011863741092383862, 0.008199025876820087, -0.0047383978962898254, 0.0015395355876535177, 0.024064671248197556, -0.022520700469613075, 0.0020142628345638514, -0.004208211787045002, -0.01349644735455513, -0.04195345565676689, -0.013744902797043324, 0.04685157537460327, 0.006646179594099522, -0.0552990548312664, 0.04837780073285103, -0.023603254929184914, -0.023993683978915215, -0.02775600738823414, 0.025271454825997353, -0.007706551346927881, -0.030364789068698883, -0.0007991609745658934, 0.05032994970679283, -0.02603456750512123, -0.009751871228218079, 0.049513597041368484, -0.029104765504598618, 0.0021273987367749214, -0.04621268808841705, 0.006814774591475725, 0.02731233835220337, 0.13217823207378387, 0.047845397144556046, -0.019698956981301308, -0.05764163285493851, -0.03118114173412323, -0.0010387428337708116, 0.006788154132664204, 0.07180358469486237, -0.04198895022273064, -0.012511500157415867, 0.09441301971673965, -0.030879447236657143, 0.023745229467749596, 0.024969758465886116, -0.027010641992092133, -0.04135006293654442, 0.019485995173454285, -0.019556982442736626, -0.043976590037345886, -0.04969106242060661, 0.13693436980247498, 0.03203298896551132, -0.018403440713882446, -0.006663926411420107, -0.008181278593838215, 0.029016030952334404, -0.02434862032532692, -0.02559089846909046, -0.00047444982919842005, 0.062007348984479904, 0.002271591452881694, 0.06140395626425743, 0.0005812079762108624, -0.013638421893119812, -0.0027396634686738253, -0.014596750028431416, 0.04202444106340408, -0.045254360884428024, -0.03292033076286316, 0.033860910683870316, -0.04135006293654442, 0.020337842404842377, 0.08234518766403198, 0.013061651028692722, 0.040036801248788834, 0.027205856516957283, 0.003227700712159276, -0.02731233835220337, 0.023337053135037422, 0.006304553709924221, -0.024721303954720497, 0.0006444309838116169, 0.042095430195331573, 0.014508015476167202, -0.03293807804584503, 0.04763243347406387, 0.023408040404319763, -0.016078608110547066, -0.005754402838647366, -0.0338076688349247, -0.03323977068066597, -0.010719072073698044, -0.05998421087861061, 0.020124880596995354, -0.02919350005686283, -0.03709083050489426, 0.03240567073225975, -0.04646114259958267, 0.018190478906035423, 0.008141348138451576, -0.029495196416974068, 0.031607065349817276, 0.021952802315354347, -0.02422439306974411, -0.06875113397836685, -0.04095963388681412, -0.03277835622429848, -0.023230571299791336, -0.007378235459327698, 0.011136122047901154, -0.08419086039066315, 0.017276518046855927, -0.007187457289546728, -0.031003674492239952, 0.07836990803480148, -0.003780070226639509, -0.036629412323236465, 0.009796238504350185, -0.004055145662277937, -0.04962007701396942, -0.04639015719294548, -0.028448134660720825, -0.014685483649373055, -0.06360456347465515, -0.02003614604473114, -0.08724331110715866, 0.004707341082394123, -0.05224660411477089, 0.045644789934158325, 0.0061182123608887196, -0.0375167541205883, 0.0466386117041111, -0.03054225631058216, 0.05214012414216995, 0.017152290791273117, -0.02738332562148571, 0.06413696706295013, -0.02518272027373314, 0.0537373349070549, 0.02745431289076805, -0.024845531210303307, 0.0363454632461071, -0.03118114173412323, 0.01005356665700674, -0.013354473747313023, -0.00744034955278039, 0.03723280504345894, 0.02892729826271534, -0.008340999484062195, -0.03299131616950035, -0.1074746698141098, 0.038049157708883286, 0.01614072173833847, -0.04117259383201599, -0.03666490688920021, -0.005297422409057617, -0.013851383700966835, 0.04340869188308716, -0.021313916891813278, -0.001545081497170031, 0.0806415006518364, 0.041137102991342545, -0.004773891530930996, -0.019432755187153816, -0.010177794843912125, -0.026637960225343704, -0.0940580815076828, -0.005532567389309406, 0.04355066642165184, -0.042237404733896255, 0.016930455341935158, -0.01362954918295145, -0.018021883442997932, -0.011091754771769047, -0.011322463862597942, -0.02067503146827221, -0.000757566886022687, 0.015288875438272953, 0.0059141237288713455, -0.013265739195048809, -0.07680818438529968, 0.05476665124297142, -0.0260878074914217, -0.04639015719294548, 0.013159258291125298, -0.018163857981562614, -0.010861046612262726, 0.05515708029270172, 0.029619423672556877, -0.012032335624098778, 0.003575981827452779, -0.06108451262116432, 0.006739350501447916, 0.03783619403839111, -0.02042657695710659, 0.035333894193172455, -0.020053893327713013, 0.018146110698580742, -0.04198895022273064, -0.01907781884074211, 0.0034761561546474695, 0.0399303175508976, -0.01446364913135767, 0.045396335422992706, 0.035404883325099945, 0.011153869330883026, 0.036700401455163956, -0.012493752874433994, 0.04962007701396942, -0.016034241765737534, 0.002903821412473917, -0.002837270963937044, -0.009006504900753498, 0.03730379045009613, 0.026283023878932, 0.05604442209005356, 0.02241421863436699, -0.0006072735995985568, 0.020178120583295822, 0.012263044714927673, -0.03155382350087166, 0.0038577124942094088, 0.011766133829951286, -0.012582487426698208, 0.021864067763090134, 0.018634147942066193, -0.04124358296394348, -0.0009921574965119362, 0.00634448416531086, -0.042876288294792175, -0.0659826323390007, 0.03911396488547325, 0.022857889533042908, 0.022715914994478226, -0.032299190759658813, -0.01049723755568266, 0.009192846715450287, 0.012786575593054295, -0.0225384458899498, 0.00676597049459815, -0.02326606586575508, -0.014437028206884861, -0.011082882061600685, -0.0013798143481835723, -0.0016216145595535636, 0.06434992700815201, -0.005097770597785711, 0.04181148111820221, 0.008789107203483582, 0.03318653255701065, 0.042237404733896255, -0.006131522357463837, 0.04227289929986, -0.0011125029996037483, 0.0345885306596756, -0.0750335082411766, -0.04837780073285103, -0.01458787638694048, 0.00963651668280363, -0.01147331204265356, 0.03936241939663887, -0.04067568480968475, 0.03403837978839874, 0.047774408012628555, 0.04773891344666481, -0.031536079943180084, 0.05604442209005356, -0.01906007155776024, -0.005466016940772533, 0.01504041999578476, -0.019113313406705856, 0.02532469481229782, 0.026584718376398087, 0.04514788091182709, -0.0035626718308776617, 0.03677138686180115, -0.0035293966066092253, -0.019663464277982712, -0.0007065447862260044, -0.034304581582546234, 0.0790797770023346, 0.01230741199105978, -0.03769421949982643, 0.007089850027114153, -0.013381093740463257, 0.0359550341963768, -0.038617055863142014, -0.037019841372966766, -0.021083207800984383, 0.01072794571518898, -0.019556982442736626, -0.07024186849594116, 0.03242341801524162, -0.03249440714716911, 0.039149459451436996, 0.06985143572092056, -0.018598655238747597, 0.02101222053170204, -0.07957668602466583, -0.021739840507507324, 0.03128762170672417, -0.013389966450631618, -0.025626391172409058, 0.0774470716714859, -0.057748112827539444, -0.02512948028743267, 0.035458121448755264, 0.005053403787314892, -0.02047981694340706, -0.05032994970679283, 0.02062179148197174, -0.051891665905714035, 0.005319605581462383, -0.002262718044221401, -0.07560140639543533, -0.03936241939663887, 0.04497041180729866, 0.032370179891586304, 0.002159564755856991, 0.015910014510154724, 0.024561582133173943, -0.0004988517030142248, 0.008948828093707561, 0.015865646302700043, 0.028501374647021294, 0.053630854934453964, -0.03182002902030945, 0.02860785461962223, 0.004381243139505386, 0.04230839014053345, 0.03118114173412323, 0.04117259383201599, -0.0036336591001600027, 0.00032609759364277124, 0.0011319136247038841, -0.06410147249698639, 0.01856316067278385, -0.002903821412473917, 0.013318980112671852, 0.026531478390097618, -0.03961087763309479, -0.0017358596669510007, -0.0010836644796654582, -0.013381093740463257, 0.004618606995791197, -0.012751081958413124, 0.00026939099188894033, -0.01701918989419937, -0.047774408012628555, -0.003913171123713255, 0.03503220155835152, -0.02378072403371334, -0.0020730490796267986, -0.003678026143461466, 0.0029703720938414335, 0.011970221996307373, -0.03872353583574295, 0.0067038568668067455, 0.0846167802810669, -0.00551038421690464, 0.019503742456436157, -0.03622123599052429, 0.018900351598858833, -0.017010316252708435, -0.019308527931571007, -0.011881488375365734, 0.04901668429374695, 0.0013409932143986225, -0.0349789597094059, -0.003717956366017461, -0.0691060721874237, 0.04891020432114601, 0.09057971090078354, 0.04489942640066147, -0.014552382752299309, 0.008025994524359703, 0.013283486478030682, -0.010417376644909382, -0.08362296223640442, -0.034233592450618744, 0.015058167278766632, -0.03577756509184837, 0.03490797057747841, 0.045254360884428024, -0.03609700873494148, 0.05455368757247925, -0.028057703748345375, -0.014055471867322922, 0.0703483447432518, 0.020887993276119232, -0.05288548767566681, -0.022911129519343376, -0.0549086257815361, 0.05224660411477089, -0.04028525575995445, 0.03897199034690857, -0.0040817661210894585, -0.02049756422638893, 0.04195345565676689, -0.017081303521990776, -0.030169574543833733, -0.018110617995262146, 0.04497041180729866, 0.00838980358093977, -0.03570657968521118, -0.027560792863368988, -0.02835940010845661, -0.0038821143098175526, -0.04518337547779083, -0.04795187711715698, 0.05018797516822815, 0.022343231365084648, 0.012484879232943058, 0.026442743837833405, 0.03744576498866081, -0.0069123818539083, 0.053382400423288345, -0.03812014311552048, 0.013416587375104427, -0.01565268449485302, 0.00573665602132678, 0.048874709755182266, 0.05011698603630066, 0.05253055319190025, -0.012289664708077908, 0.03607926145195961, -0.005000163335353136, 0.030045347288250923, 0.03130536898970604, 0.05586695298552513, -0.009299327619373798, 0.05089784786105156, -0.017551593482494354, 0.06250426173210144, -0.04007229208946228, 0.016983695328235626, -0.028572361916303635, -0.03762323409318924, 0.01394899096339941, 0.04142105206847191, 0.03393189609050751, 0.02047981694340706, 0.04291178286075592, 0.04628367722034454, 0.03680688142776489, 0.033346254378557205, 0.01552845723927021, 0.02493426576256752, 0.06182987987995148, -0.017995264381170273, -0.02970815636217594, -0.004689594265073538, 0.00985835213214159, 0.04308925196528435, 0.06619559228420258, 0.024472849443554878, 0.004257015883922577, 0.029992105439305305, 0.028749829158186913, 0.01375377643853426, 0.010772312991321087, -0.0006172561552375555, 0.031039167195558548, -0.0241001658141613, 0.039078470319509506, -0.024756798520684242, 0.02415340580046177, -0.06548572331666946, 0.04401208460330963, 0.04337320104241371, -0.02133166417479515, 0.035280656069517136, 0.034233592450618744, -0.0011202673194929957, 0.04670960083603859, -0.034375566989183426, 0.03705533593893051, -0.03542263060808182, 0.031802281737327576, -0.04553830996155739, 0.02505849301815033, 0.045644789934158325, -0.024597076699137688, 0.04773891344666481, -0.03448204696178436, -0.02912251278758049 ]
4,548
optbinning.binning.binning_process
transform
Transform given data to metric using bins from each fitted optimal binning. Parameters ---------- X : {array-like, sparse matrix} of shape (n_samples, n_features) Training vector, where n_samples is the number of samples. metric : str or None, (default=None) The metric used to transform the input vector. If None, the default transformation metric for each target type is applied. For binary target options are: "woe" (default), "event_rate", "indices" and "bins". For continuous target options are: "mean" (default), "indices" and "bins". For multiclass target options are: "mean_woe" (default), "weighted_mean_woe", "indices" and "bins". metric_special : float or str (default=0) The metric value to transform special codes in the input vector. Supported metrics are "empirical" to use the empirical WoE or event rate for a binary target, and any numerical value for other targets. metric_missing : float or str (default=0) The metric value to transform missing values in the input vector. Supported metrics are "empirical" to use the empirical WoE or event rate for a binary target, and any numerical value for other targets. show_digits : int, optional (default=2) The number of significant digits of the bin column. Applies when ``metric="bins"``. check_input : bool (default=False) Whether to check input arrays. Returns ------- X_new : numpy array or pandas.DataFrame, shape = (n_samples, n_features_new) Transformed array.
def transform(self, X, metric=None, metric_special=0, metric_missing=0, show_digits=2, check_input=False): """Transform given data to metric using bins from each fitted optimal binning. Parameters ---------- X : {array-like, sparse matrix} of shape (n_samples, n_features) Training vector, where n_samples is the number of samples. metric : str or None, (default=None) The metric used to transform the input vector. If None, the default transformation metric for each target type is applied. For binary target options are: "woe" (default), "event_rate", "indices" and "bins". For continuous target options are: "mean" (default), "indices" and "bins". For multiclass target options are: "mean_woe" (default), "weighted_mean_woe", "indices" and "bins". metric_special : float or str (default=0) The metric value to transform special codes in the input vector. Supported metrics are "empirical" to use the empirical WoE or event rate for a binary target, and any numerical value for other targets. metric_missing : float or str (default=0) The metric value to transform missing values in the input vector. Supported metrics are "empirical" to use the empirical WoE or event rate for a binary target, and any numerical value for other targets. show_digits : int, optional (default=2) The number of significant digits of the bin column. Applies when ``metric="bins"``. check_input : bool (default=False) Whether to check input arrays. Returns ------- X_new : numpy array or pandas.DataFrame, shape = (n_samples, n_features_new) Transformed array. """ self._check_is_fitted() return self._transform(X, metric, metric_special, metric_missing, show_digits, check_input)
(self, X, metric=None, metric_special=0, metric_missing=0, show_digits=2, check_input=False)
[ 0.008533974178135395, -0.015349009074270725, 0.02647540532052517, -0.004787806887179613, -0.005362343974411488, -0.04166559875011444, -0.012275470420718193, 0.009883902035653591, 0.01872149296104908, -0.00592286791652441, -0.035966940224170685, 0.0024756465572863817, 0.05493132770061493, -0.042039282619953156, -0.025260936468839645, 0.02995065227150917, -0.00876285508275032, -0.00600227527320385, 0.0539223849773407, 0.06165761500597, 0.007894042879343033, -0.03445352613925934, 0.025578567758202553, 0.040282972157001495, -0.00781930610537529, 0.04039507731795311, -0.037854038178920746, -0.013209676370024681, -0.00944015383720398, -0.030978279188275337, -0.0359482578933239, -0.04517821595072746, 0.06700127571821213, -0.03131459280848503, 0.03258511424064636, -0.05474448576569557, -0.019039124250411987, -0.001227313419803977, 0.027764610946178436, 0.04017087072134018, 0.026325931772589684, -0.0798933207988739, -0.022140689194202423, 0.03987192362546921, 0.049886614084243774, 0.05687447637319565, 0.015386377461254597, 0.10358478873968124, -0.03114643692970276, -0.02955828607082367, -0.03484589233994484, -0.05055924132466316, 0.041740335524082184, 0.03280932456254959, 0.00859936885535717, 0.04648610204458237, 0.03052986040711403, 0.007361545227468014, 0.048429254442453384, -0.014723090454936028, 0.03493931517004967, 0.05224081501364708, 0.008351803757250309, -0.048915039747953415, 0.026232512667775154, -0.04046981409192085, -0.03166959062218666, 0.012172707356512547, 0.004659353755414486, 0.04566400125622749, 0.0154797974973917, -0.01937543787062168, 0.04357137903571129, 0.05866815149784088, -0.0426371730864048, -0.003755509154871106, -0.02017885446548462, -0.016236504539847374, 0.0010182848200201988, 0.010519162751734257, 0.08848802000284195, 0.03325774148106575, -0.006268524099141359, -0.025204885751008987, -0.05466974899172783, -0.03961034491658211, 0.01208862941712141, 0.03105301596224308, -0.011509421281516552, -0.001998033607378602, -0.005240897182375193, -0.03052986040711403, 0.037330880761146545, 0.0278767142444849, 0.013144281692802906, -0.001210964866913855, -0.06502075493335724, 0.04357137903571129, -0.008309764787554741, -0.03663957118988037, -0.013592701405286789, 0.06083551049232483, -0.017254790291190147, 0.09394378215074539, 0.01570400781929493, 0.019123202189803123, 0.0017306171357631683, 0.005292278248816729, -0.04585084319114685, 0.01431204006075859, -0.04155349358916283, 0.055828165262937546, -0.06905652582645416, -0.026101723313331604, -0.027073297649621964, -0.015386377461254597, 0.009669034741818905, 0.013863621279597282, -0.08714275807142258, 0.01735755242407322, 0.0032837348990142345, -0.044991374015808105, 0.02608303911983967, -0.06502075493335724, -0.034864578396081924, 0.007464307826012373, 0.05197923630475998, 0.007417597807943821, 0.01826373301446438, 0.00802950281649828, -0.04476716369390488, -0.024457519873976707, -0.015096773393452168, 0.06315234303474426, -0.00830509327352047, -0.08602171391248703, 0.016068346798419952, 0.019580963999032974, -0.01138797402381897, -0.015563876368105412, 0.06879495084285736, 0.005390370264649391, 0.02968907542526722, 0.010528504848480225, 0.04678504914045334, -0.014013093896210194, 0.04656083881855011, 0.058294471353292465, -0.014498881064355373, -0.06453496962785721, -0.047906097024679184, 0.010874160565435886, 0.041478756815195084, -0.06068603694438934, 0.04532768949866295, 0.07667964696884155, 0.02264516055583954, -0.0088889729231596, -0.0015741375973448157, -0.005058726761490107, 0.0032603798899799585, 0.011154422536492348, -0.04925135523080826, 0.037069305777549744, -0.029745128005743027, 0.05362343788146973, -0.011948497965931892, 0.018777545541524887, 0.006805692799389362, -0.013228360563516617, -0.01661018654704094, -0.019973330199718475, 0.023896995931863785, 0.05978919938206673, 0.034023791551589966, 0.08505013585090637, 0.002912387950345874, -0.025354357436299324, 0.0277459267526865, 0.0970827117562294, 0.013826252892613411, 0.005544513929635286, 0.018581362441182137, -0.08258383721113205, -0.07645544409751892, -0.04095560312271118, 0.0026508101727813482, 0.009865217842161655, -0.06610443443059921, 0.0026040999218821526, 0.06909389793872833, -0.0026648233179003, 0.016301900148391724, -0.01632058247923851, -0.019412806257605553, 0.0019408134976401925, -0.08647013455629349, 0.03374353051185608, 0.007403584662824869, 0.009346733801066875, 0.0047784652560949326, -0.020197538658976555, 0.04839188605546951, 0.02875486947596073, -0.0270919818431139, -0.028213029727339745, -0.014330724254250526, 0.024644361808896065, -0.021524112671613693, -0.055491853505373, 0.07892174273729324, -0.01596558466553688, -0.039797186851501465, 0.0106592932716012, 0.021785689517855644, 0.03443484380841255, 0.00732417730614543, -0.015180851332843304, -0.03656483441591263, -0.01563861221075058, 0.03396774083375931, -0.03783535212278366, -0.0109862657263875, 0.058518681675195694, 0.004386098589748144, 0.03753640875220299, 0.06801021844148636, -0.061508141458034515, 0.05919130891561508, -0.00088632816914469, 0.005357672926038504, -0.044991374015808105, -0.009257984347641468, 0.03439747542142868, 0.0022584437392652035, 0.003947021439671516, 0.02744697965681553, -0.00419458607211709, -0.015059405006468296, 0.04039507731795311, -0.008351803757250309, -0.03863877058029175, -0.014162566512823105, -0.030940910801291466, 0.007511018309742212, -0.010407057590782642, 0.022402266040444374, 0.025485146790742874, 0.004407118074595928, 0.01215402316302061, -0.039572976529598236, -0.0028213029727339745, -0.00581543380394578, -0.04058191925287247, -0.013153623789548874, -0.049625035375356674, -0.09035643190145493, -0.026269879192113876, -0.03004407323896885, 0.009061800315976143, 0.030156178399920464, 0.014881906099617481, 0.02981986477971077, 0.029614338651299477, -0.04798083379864693, 0.004965306259691715, -0.029371444135904312, 0.03021223098039627, 0.08363014459609985, 0.01946885883808136, -0.10851740092039108, -0.025522515177726746, -0.013349807821214199, 0.007772596087306738, 0.001452690688893199, 0.037854038178920746, 0.011640209704637527, -0.010939555242657661, 0.005259581375867128, -0.02862408012151718, -0.01836649514734745, 0.007852003909647465, 0.028306448832154274, -0.06591759622097015, -0.04529032111167908, -0.027521716430783272, -0.021598849445581436, 0.04973714053630829, -0.01046311017125845, -0.03264116495847702, -0.05362343788146973, -0.0040848166681826115, -0.009001077152788639, 0.017450973391532898, -0.0309595949947834, -0.02712935023009777, -0.06793548166751862, -0.04439347982406616, 0.055491853505373, -0.0428987517952919, -0.011742972768843174, -0.0010165332350879908, -0.05691184476017952, -0.013826252892613411, 0.007006546948105097, 0.01563861221075058, 0.007744569797068834, -0.051904499530792236, 0.002783934585750103, -0.00022698292741551995, 0.049139250069856644, 0.03223011642694473, 0.04648610204458237, -0.039311397820711136, -0.0035172866191715, -0.06894442439079285, 0.050409771502017975, 0.050110824406147, 0.0490645132958889, 0.047644518315792084, -0.010052059777081013, 0.021019641309976578, -0.0073755583725869656, -0.028437238186597824, -0.04532768949866295, 0.04805557057261467, 0.029857231304049492, 0.011752314865589142, -0.028568027541041374, -0.07305493205785751, 0.027035929262638092, 0.012630468234419823, 0.06315234303474426, -0.00920193176716566, -0.09476588666439056, -0.022738579660654068, -0.018020838499069214, 0.017787287011742592, -0.024382783100008965, -0.02193516306579113, -0.04656083881855011, 0.06460970640182495, 0.005876157432794571, -0.0015029043424874544, -0.01281731016933918, -0.04218875616788864, -0.03949823975563049, -0.00592286791652441, -0.011378631927073002, 0.0028329805936664343, 0.017282815650105476, -0.043272435665130615, 0.03540641814470291, -0.019898593425750732, 0.05070871487259865, -0.07331650704145432, 0.015498481690883636, -0.04330980405211449, 0.002681171987205744, -0.05097029358148575, 0.02664356306195259, -0.01354599092155695, -0.03419194743037224, 0.0009727422730065882, 0.018702808767557144, -0.019842540845274925, 0.0007374390843324363, 0.015171509236097336, 0.016731634736061096, 0.008094897493720055, 0.07697859406471252, -0.037293512374162674, -0.058294471353292465, 0.05343659967184067, 0.03527562692761421, 0.013405859470367432, -0.03176301345229149, -0.004157217685133219, -0.0418524406850338, 0.01286402065306902, 0.04360874742269516, 0.07996805757284164, -0.04682241752743721, 0.018095575273036957, 0.06042446196079254, -0.023056210950016975, 0.006857073865830898, 0.01709597371518612, 0.004306690767407417, -0.03381826728582382, -0.05493132770061493, 0.04073139280080795, -0.01330309733748436, -0.022084636613726616, -0.03923666477203369, -0.018123600631952286, 0.052390288561582565, 0.01455493364483118, 0.013265728950500488, -0.047644518315792084, -0.035219576209783554, -0.022888053208589554, -0.002781599061563611, -0.028399869799613953, -0.05220344662666321, -0.024943307042121887, -0.02845592238008976, -0.05750973895192146, -0.006805692799389362, -0.004290342330932617, 0.003428536932915449, 0.08079015463590622, 0.02598961815237999, 0.014190592803061008, -0.011827051639556885, 0.019898593425750732, 0.0175163671374321, 0.01138797402381897, -0.00040112482383847237, 0.03615378215909004, -0.004715406335890293, -0.005857473239302635, 0.014480196870863438, -0.02141200751066208, 0.0030478478875011206, -0.06588022410869598, -0.01752571016550064, -0.08519960939884186, -0.021243849769234657, 0.02258910797536373, -0.025877512991428375, -0.08796486258506775, -0.05351133644580841, -0.006544115021824837, -0.03118380531668663, -0.023018842563033104, -0.025821460410952568, -0.0018917677225545049, -0.0005984758608974516, 0.04734557494521141, -0.03815298527479172, -0.06311497837305069, 0.05717342346906662, 0.025522515177726746, -0.027783295139670372, -0.04039507731795311, -0.045477159321308136, 0.010762056335806847, -0.0852743461728096, -0.017731234431266785, 0.07518491894006729, -0.011621525511145592, 0.000780062226112932, -0.020384380593895912, 0.012546390295028687, -0.03277195617556572, 0.02449488826096058, -0.02770855836570263, 0.04091823473572731, 0.04910188168287277, -0.02780197747051716, -0.004764452110975981, -0.008291080594062805, -0.010210874490439892, -0.02793276682496071, -0.02079543098807335, -0.006455365102738142, -0.008529303595423698, 0.009753113612532616, 0.042525067925453186, 0.009939954616129398, -0.01635795086622238, 0.02722277119755745, -0.01661018654704094, 0.016535451635718346, 0.035705361515283585, -0.04286138340830803, -0.029838547110557556, 0.01563861221075058, -0.014414802193641663, 0.017086632549762726, -0.019973330199718475, 0.06543180346488953, -0.013032177463173866, -0.02955828607082367, 0.042749278247356415, 0.006109708920121193, -0.04394506290555, 0.011724288575351238, 0.05414659529924393, -0.005212870892137289, 0.07750175148248672, 0.03867613896727562, 0.00009889448847388849, -0.02229016087949276, 0.026045670732855797, 0.03641536086797714, 0.016638213768601418, 0.019786488264799118, 0.017376236617565155, 0.03381826728582382, -0.008571342565119267, -0.03841456025838852, -0.020048066973686218, -0.003113242331892252, -0.021299902349710464, -0.045925579965114594, 0.014003751799464226, -0.033407215029001236, 0.0013090565335005522, -0.05153081566095352, -0.02404646947979927, 0.04813030734658241, 0.0025340344291180372, 0.011369289830327034, -0.032566431909799576, -0.037854038178920746, 0.012873361818492413, -0.0007088290294632316, -0.004696722142398357, 0.0077352277003228664, -0.029390128329396248, 0.011350605636835098, -0.017852680757641792, 0.01729215867817402, 0.01781531423330307, -0.03961034491658211, 0.016152426600456238, -0.024700414389371872, -0.02498067542910576, -0.022308845072984695, 0.010500478558242321, 0.03183775022625923, 0.04925135523080826, 0.007534373551607132, 0.04136665165424347, 0.02537304162979126, -0.02780197747051716, 0.026905139908194542, -0.017665840685367584, -0.05216607823967934, 0.0350327342748642, -0.005348330829292536, 0.019655698910355568, 0.031594857573509216, 0.04413190484046936, -0.002203559037297964, 0.034117214381694794, 0.017796630039811134, -0.009519562125205994, -0.0750354453921318, 0.008132265880703926, 0.017703209072351456, 0.08363014459609985, 0.06711337715387344, -0.008351803757250309, 0.03344458341598511, 0.07623123377561569, -0.01746031455695629, 0.028269082307815552, -0.0621807686984539, 0.00960364006459713, 0.01306020375341177, -0.007473649922758341, 0.01257441658526659, 0.014723090454936028, -0.046448733657598495, 0.040806129574775696, -0.02527962066233158, -0.021262533962726593, 0.06333918124437332, -0.008594697341322899, -0.03137064725160599, -0.043160330504179, -0.02933407574892044, 0.024382783100008965, 0.004710735287517309, 0.003566332394257188, -0.03734956681728363, -0.02537304162979126, -0.056575533002614975, 0.0185626782476902, -0.0480182021856308, 0.004839188419282436, 0.04084349796175957, -0.04487926885485649, -0.044692426919937134, 0.00376018020324409, -0.020589906722307205, -0.019282016903162003, 0.01881491392850876, -0.00811358168721199, 0.011238501407206059, 0.0060209594666957855, 0.04588821157813072, -0.04831714928150177, -0.057547107338905334, -0.03897508606314659, 0.05478185415267944, -0.055828165262937546, 0.07051388919353485, -0.003475247183814645, 0.01933806948363781, 0.009019761346280575, 0.02862408012151718, 0.01138797402381897, -0.0641612857580185, -0.01710531674325466, -0.009001077152788639, -0.02030964381992817, -0.028885656967759132, 0.018702808767557144, 0.03602299466729164, 0.03219274803996086, -0.002956762909889221, 0.023971732705831528, -0.018740177154541016, -0.053810279816389084, 0.023187000304460526, -0.040021397173404694, 0.038302455097436905, -0.04678504914045334, -0.013667437247931957, 0.014900590293109417, -0.02806355617940426, -0.019104517996311188, 0.00559589546173811, 0.01924464851617813, -0.015134141780436039, 0.008692788891494274, -0.0536608062684536, -0.05429606884717941, 0.05351133644580841, 0.02079543098807335, 0.01586282253265381, -0.006857073865830898, -0.04020823910832405, 0.053399231284856796, 0.029857231304049492, -0.011416000314056873, 0.03819035366177559, 0.025316989049315453, 0.06277865916490555, -0.017507025972008705, -0.0014001416275277734, -0.09827850013971329, 0.025522515177726746, 0.02910986728966236, 0.015264930203557014, 0.001885928912088275, 0.003440214553847909, 0.04170296713709831, -0.07552123069763184, 0.0350327342748642, 0.0745122879743576, 0.018534652888774872, 0.02238358184695244, 0.03462168574333191, 0.002118312753736973, -0.013863621279597282, -0.039797186851501465, 0.0649460181593895, 0.04884030297398567, -0.008720815181732178, -0.03912455961108208, 0.020141486078500748, -0.007842661812901497, -0.020776746794581413, -0.0309595949947834, -0.006343260407447815, 0.008071541786193848, -0.015395719558000565, -0.05713605508208275, -0.027334874495863914, 0.013190992176532745, -0.024251993745565414, 0.013882305473089218, -0.0019221294205635786, -0.06318971514701843, 0.0012845336459577084, 0.023448577150702477, -0.007482992019504309, -0.006235826760530472, 0.04215138778090477, 0.05126924067735672, 0.003956363536417484, -0.002089118817821145, -0.030361702665686607, -0.06423602253198624, 0.004344059154391289, 0.06408654898405075, -0.002334347926080227, 0.03043643943965435, -0.023672787472605705, 0.002224578754976392, 0.08325646072626114, -0.034696418792009354, -0.002216404303908348, 0.02946486510336399, -0.039274029433727264, 0.04659820720553398, -0.012826652266085148, -0.023411208763718605, 0.008351803757250309, 0.04951293021440506, -0.02907249890267849, -0.04461769014596939, -0.03181906417012215, 0.0678233727812767, 0.020645959302783012, 0.042525067925453186, 0.04902714490890503, -0.015507823787629604, -0.006179774645715952, 0.017348209396004677, 0.020944904536008835, -0.08564803004264832, 0.031165121123194695, 0.007132664788514376, 0.006044314708560705, 0.03400510922074318, -0.07951963692903519, 0.03480852395296097, -0.008968380279839039, -0.03815298527479172, 0.03875087574124336, 0.06961704790592194, -0.02326173521578312, 0.0154144037514925, -0.021038325503468513, 0.036452729254961014, 0.007534373551607132, -0.010528504848480225, 0.08953432738780975, 0.033724844455718994, 0.029259340837597847, -0.034341420978307724, -0.024345414713025093, 0.058518681675195694, 0.025092780590057373, -0.011799025349318981, 0.03342590108513832, 0.05388501659035683, 0.014340066350996494, -0.025746723636984825, 0.02118779718875885, 0.011014292016625404, 0.016171110793948174, -0.0006019791471771896, -0.03387431800365448, -0.04704662784934044, 0.010322979651391506, -0.00600227527320385, 0.009967980906367302, 0.07615649700164795, 0.06801021844148636, -0.013779542408883572, 0.02797013521194458, 0.03052986040711403, -0.026979876682162285, -0.011154422536492348, 0.012191391550004482, -0.01447085477411747, 0.010696661658585072, -0.024065153673291206, 0.031165121123194695, 0.08549855649471283, 0.04648610204458237 ]
4,549
optbinning.binning.binning_process
transform_disk
Transform given data on disk to metric using bins from each fitted optimal binning. Save to comma-separated values (csv) file. Parameters ---------- input_path : str Any valid string path to a file with extension .csv. output_path : str Any valid string path to a file with extension .csv. chunksize : Rows to read, transform and write at a time. metric : str or None, (default=None) The metric used to transform the input vector. If None, the default transformation metric for each target type is applied. For binary target options are: "woe" (default), "event_rate", "indices" and "bins". For continuous target options are: "mean" (default), "indices" and "bins". For multiclass target options are: "mean_woe" (default), "weighted_mean_woe", "indices" and "bins". metric_special : float or str (default=0) The metric value to transform special codes in the input vector. Supported metrics are "empirical" to use the empirical WoE or event rate for a binary target, and any numerical value for other targets. metric_missing : float or str (default=0) The metric value to transform missing values in the input vector. Supported metrics are "empirical" to use the empirical WoE or event rate for a binary target, and any numerical value for other targets. show_digits : int, optional (default=2) The number of significant digits of the bin column. Applies when ``metric="bins"``. **kwargs : keyword arguments Keyword arguments for ``pandas.read_csv``. Returns ------- self : BinningProcess Fitted binning process.
def transform_disk(self, input_path, output_path, chunksize, metric=None, metric_special=0, metric_missing=0, show_digits=2, **kwargs): """Transform given data on disk to metric using bins from each fitted optimal binning. Save to comma-separated values (csv) file. Parameters ---------- input_path : str Any valid string path to a file with extension .csv. output_path : str Any valid string path to a file with extension .csv. chunksize : Rows to read, transform and write at a time. metric : str or None, (default=None) The metric used to transform the input vector. If None, the default transformation metric for each target type is applied. For binary target options are: "woe" (default), "event_rate", "indices" and "bins". For continuous target options are: "mean" (default), "indices" and "bins". For multiclass target options are: "mean_woe" (default), "weighted_mean_woe", "indices" and "bins". metric_special : float or str (default=0) The metric value to transform special codes in the input vector. Supported metrics are "empirical" to use the empirical WoE or event rate for a binary target, and any numerical value for other targets. metric_missing : float or str (default=0) The metric value to transform missing values in the input vector. Supported metrics are "empirical" to use the empirical WoE or event rate for a binary target, and any numerical value for other targets. show_digits : int, optional (default=2) The number of significant digits of the bin column. Applies when ``metric="bins"``. **kwargs : keyword arguments Keyword arguments for ``pandas.read_csv``. Returns ------- self : BinningProcess Fitted binning process. """ self._check_is_fitted() return self._transform_disk(input_path, output_path, chunksize, metric, metric_special, metric_missing, show_digits, **kwargs)
(self, input_path, output_path, chunksize, metric=None, metric_special=0, metric_missing=0, show_digits=2, **kwargs)
[ 0.03079112619161606, -0.0006487029604613781, -0.03109923005104065, -0.005184809677302837, -0.022318270057439804, -0.012988502159714699, -0.031002948060631752, 0.02110511250793934, -0.02035410888493061, -0.057538390159606934, 0.017648572102189064, 0.0327938012778759, 0.02108585461974144, -0.002917358186095953, 0.0030617816373705864, 0.06150522455573082, 0.023223325610160828, -0.00918534491211176, 0.03198502957820892, 0.06685853004455566, 0.004869484808295965, -0.03724205121397972, 0.02106659859418869, 0.008155123330652714, -0.003184541827067733, 0.05349452793598175, -0.02665098011493683, -0.006258358713239431, -0.026034772396087646, -0.028788451105356216, -0.00887242704629898, -0.04806419461965561, 0.04767906665802002, 0.006113935261964798, 0.059232961386442184, -0.04452100396156311, 0.04463654011487961, 0.046485163271427155, -0.04902702197432518, 0.02792190946638584, 0.02349291555583477, -0.034680936485528946, -0.003410805482417345, 0.029173580929636955, 0.01935277134180069, 0.040284574031829834, -0.021182138472795486, 0.05141482502222061, -0.0013166624121367931, -0.008593208156526089, -0.055728279054164886, -0.06308425962924957, 0.045445315539836884, 0.04536828771233559, 0.00041822687489911914, 0.00006544197094626725, 0.03930249437689781, -0.010157797485589981, 0.00012922909809276462, 0.029847558587789536, -0.009652314707636833, 0.004782830365002155, 0.07644826173782349, -0.03701097145676613, 0.008877241052687168, -0.01502968929708004, -0.04767906665802002, -0.02832629531621933, -0.05430329963564873, 0.06312277168035507, 0.03962985426187515, -0.04359669238328934, 0.06828351318836212, 0.06708960980176926, -0.05484247952699661, 0.0311184860765934, -0.04178658127784729, 0.012507089413702488, 0.05811608210206032, 0.007144157309085131, 0.07105644047260284, 0.03186948969960213, 0.009199787862598896, -0.09920942783355713, -0.05584381893277168, -0.05468842759728432, 0.050991181284189224, 0.041594017297029495, 0.003742980072274804, -0.014037980698049068, -0.019256489351391792, 0.0002267150703119114, 0.04032308608293533, 0.02416689321398735, 0.022992247715592384, -0.05291683226823807, -0.036818407475948334, 0.041902121156454086, -0.056883666664361954, -0.0258614644408226, -0.030964434146881104, -0.0016440227627754211, 0.0934324860572815, 0.047486502677202225, -0.017590802162885666, -0.037819743156433105, -0.0033313725143671036, 0.002967906417325139, -0.04590747132897377, -0.006826425436884165, -0.042672380805015564, 0.037184279412031174, -0.050606053322553635, -0.040246061980724335, -0.01520299818366766, 0.011650175787508488, -0.023069273680448532, -0.014057236723601818, -0.04586895555257797, 0.017889278009533882, 0.004060712177306414, -0.0380123108625412, 0.01534742210060358, -0.01520299818366766, -0.010080771520733833, -0.01599251478910446, 0.040246061980724335, 0.03830115497112274, 0.004366409033536911, 0.04898850619792938, -0.010003745555877686, -0.04995133355259895, 0.0044723195023834705, 0.04236427694559097, 0.011756086722016335, -0.03512383624911308, 0.006176518741995096, 0.0009092673426494002, -0.010061515495181084, 0.04221022501587868, 0.07336722314357758, -0.055381663143634796, 0.007904788479208946, -0.06497139483690262, 0.09890132397413254, -0.018871359527111053, 0.0483337864279747, -0.014798611402511597, 0.0040510836988687515, -0.042672380805015564, -0.04798717051744461, 0.028942503035068512, -0.0050066872499883175, -0.022279758006334305, 0.05607489496469498, 0.06712812185287476, -0.00792404543608427, -0.01417277567088604, -0.03179246187210083, -0.013614337891340256, -0.025091204792261124, 0.030155662447214127, -0.008082911372184753, 0.032967109233140945, -0.02310778759419918, 0.06008024513721466, -0.042325761169195175, -0.009777482599020004, 0.013075156137347221, -0.01465418841689825, 0.013864671811461449, -0.007216369267553091, 0.0047058044001460075, 0.03962985426187515, 0.023685481399297714, 0.04274940490722656, 0.026458416134119034, -0.03344852104783058, -0.005974325817078352, 0.05557422712445259, 0.027036109939217567, -0.006831239443272352, 0.018120355904102325, -0.000197830333490856, -0.07483071833848953, 0.005993582308292389, 0.04633111134171486, -0.050991181284189224, 0.014423110522329807, 0.011679060757160187, 0.049566201865673065, 0.015799948945641518, 0.03755015507340431, -0.022645631805062294, -0.006065793801099062, -0.04013052210211754, -0.030463766306638718, 0.019237233325839043, 0.0310799740254879, 0.043673716485500336, 0.005704734940081835, -0.017533032223582268, 0.04898850619792938, 0.005232950672507286, -0.05977214127779007, -0.003509495174512267, -0.0415555015206337, 0.048526350408792496, -0.02593849040567875, 0.022299014031887054, -0.025418564677238464, -0.024763844907283783, -0.004067933186888695, 0.04032308608293533, 0.04875743016600609, 0.0008912143530324101, -0.03211982175707817, 0.04359669238328934, -0.041594017297029495, 0.006513507571071386, 0.06990105658769608, 0.007481146138161421, 0.003962022718042135, 0.055497199296951294, 0.010437017306685448, 0.013017386198043823, 0.03213908150792122, -0.050644565373659134, 0.07340573519468307, -0.006503879092633724, 0.003947580233216286, 0.004643220920115709, -0.008516182191669941, 0.03350628912448883, -0.03038674034178257, 0.019853439182043076, 0.0072211832739412785, -0.010822147130966187, -0.040939293801784515, 0.035451196134090424, -0.022953735664486885, -0.02871142514050007, -0.029231350868940353, -0.03448837250471115, 0.0086172791197896, -0.029212092980742455, -0.0072211832739412785, 0.046061523258686066, -0.011679060757160187, 0.006075422279536724, -0.029558710753917694, -0.008853171020746231, -0.015376306138932705, -0.036048147827386856, 0.020527416840195656, -0.04798717051744461, -0.09212304651737213, -0.04948917776346207, -0.017735226079821587, 0.021259164437651634, 0.0054255155846476555, -0.006710886489599943, 0.05249318853020668, -0.04070821776986122, -0.01869805157184601, 0.00801551342010498, -0.03936026245355606, 0.007413748186081648, 0.040554165840148926, 0.01668574847280979, -0.1277090311050415, 0.03791602700948715, -0.03928323835134506, 0.02043113484978676, -0.01367210689932108, 0.02147098444402218, 0.03171543776988983, 0.009897835552692413, -0.02449425309896469, -0.01654132455587387, -0.016319874674081802, 0.013344747014343739, -0.012179729528725147, -0.04775609076023102, -0.05430329963564873, -0.013046271167695522, -0.05807757005095482, 0.0056806644424796104, 0.00665793102234602, -0.002748863771557808, -0.07144157588481903, -0.009671571664512157, -0.04421290010213852, 0.04170955345034599, 0.013758760876953602, -0.010282965376973152, -0.022972991690039635, -0.09967158734798431, 0.004713025875389576, -0.03589409589767456, -0.013604709878563881, 0.0013840601313859224, 0.0031869488302618265, 0.03706873953342438, 0.005411073565483093, 0.04629259929060936, 0.05307088419795036, -0.055497199296951294, -0.02622733823955059, -0.012170100584626198, 0.03654881566762924, 0.0018799147801473737, 0.030521534383296967, -0.03444986045360565, 0.006797540467232466, -0.0328323133289814, 0.024706074967980385, 0.09582028537988663, 0.0018823217833414674, 0.03342926502227783, -0.06466329097747803, 0.05495801940560341, 0.00418587913736701, -0.015568871051073074, -0.058616753667593, 0.0031749135814607143, 0.06466329097747803, 0.058847829699516296, 0.0008141884463839233, -0.014269058592617512, 0.02135544642806053, 0.0180914718657732, 0.05696069449186325, 0.006864938419312239, -0.05156887695193291, -0.04767906665802002, -0.007052688859403133, 0.026824289932847023, -0.022010166198015213, -0.0363369956612587, 0.05491950735449791, 0.08041509985923767, 0.0587322898209095, -0.004012570716440678, -0.05384114384651184, -0.0276715736836195, -0.004693769384175539, -0.009815995581448078, -0.008713561110198498, 0.08411234617233276, 0.08056914806365967, -0.0005503143183887005, -0.02241455391049385, -0.010851031169295311, 0.024994922801852226, -0.05022092163562775, 0.03071410022675991, -0.07286655157804489, -0.0004504212993197143, -0.03144584596157074, 0.03344852104783058, 0.005849158391356468, -0.03142658993601799, 0.009926719591021538, 0.04656219109892845, -0.022684143856167793, -0.011457610875368118, 0.030983690172433853, 0.056768130511045456, 0.039206210523843765, 0.03937951847910881, -0.015809576958417892, -0.026419902220368385, 0.036760635673999786, 0.0362214557826519, 0.0031869488302618265, -0.04567639157176018, -0.0023625304456800222, -0.02900027297437191, 0.0791826844215393, 0.02351217344403267, 0.05260872840881348, -0.013970582745969296, 0.023358121514320374, 0.0448676198720932, -0.014307571575045586, 0.037415359169244766, -0.006667559500783682, 0.00039505891618318856, -0.06832202523946762, -0.04698583111166954, 0.0362984798848629, -0.01245894841849804, -0.005295534618198872, 0.022953735664486885, -0.02214496210217476, 0.07475368678569794, 0.01073549222201109, -0.021259164437651634, -0.015963628888130188, -0.04521423578262329, -0.015145228244364262, -0.03235090151429176, 0.05603638291358948, -0.05561273917555809, -0.06312277168035507, -0.02382027730345726, -0.028095217421650887, 0.024301689118146896, -0.044713567942380905, 0.008593208156526089, 0.0414014495909214, 0.00224338099360466, 0.04794865846633911, -0.032273873686790466, 0.04529126361012459, -0.03109923005104065, -0.06716663390398026, -0.013412144966423512, 0.0036900246050208807, -0.006484622601419687, 0.0517614409327507, 0.02730570174753666, -0.03321744501590729, 0.04740947484970093, -0.05634448677301407, -0.008487297222018242, -0.03978390619158745, -0.006003210321068764, 0.01071623619645834, 0.0036707681138068438, -0.04594598338007927, -0.1069890558719635, 0.008001071400940418, 0.009599359706044197, 0.004029420204460621, -0.0004690760397352278, -0.016627978533506393, 0.0345846526324749, 0.013585452921688557, -0.0448676198720932, -0.040207549929618835, 0.04594598338007927, -0.02108585461974144, -0.00863653514534235, -0.025457078590989113, -0.06851458549499512, 0.037087999284267426, -0.025803694501519203, -0.03756941109895706, 0.08557583391666412, -0.03479647636413574, 0.001657261629588902, -0.03932175040245056, 0.022626373916864395, -0.03523937612771988, 0.017147904261946678, -0.01782188005745411, 0.026747263967990875, 0.0008358519989997149, 0.02903878502547741, 0.04521423578262329, -0.01998823508620262, -0.0276715736836195, 0.0026116613298654556, 0.00101457629352808, -0.022972991690039635, 0.05310939624905586, 0.055766791105270386, 0.013277349062263966, -0.018919499590992928, -0.017340468242764473, -0.019564593210816383, -0.029192836955189705, 0.030309714376926422, 0.01619470678269863, -0.040554165840148926, -0.002818668494001031, -0.009247928857803345, 0.018717307597398758, 0.029173580929636955, -0.03566301614046097, 0.03396844491362572, 0.022221988067030907, 0.00443621352314949, 0.03042525239288807, 0.020970316603779793, 0.01574217900633812, 0.05222359672188759, 0.027151649817824364, -0.015617012046277523, 0.08149345964193344, 0.016714632511138916, -0.0414784774184227, 0.02726718783378601, 0.06142820045351982, 0.01312329713255167, 0.023685481399297714, 0.04359669238328934, -0.014432738535106182, 0.013566196896135807, 0.03799305111169815, 0.006787912454456091, -0.04563787952065468, -0.01906392350792885, 0.03392993286252022, -0.011919766664505005, -0.0016091204015538096, -0.0691693052649498, -0.021663550287485123, -0.027690831571817398, -0.004544531460851431, -0.006263173185288906, 0.035740043967962265, -0.038840338587760925, 0.030155662447214127, -0.01610805280506611, -0.018649909645318985, -0.019304629415273666, 0.014028351753950119, 0.036144427955150604, -0.000336988567141816, 0.004710618406534195, -0.05734582245349884, -0.03930249437689781, 0.03498904034495354, 0.0030593746341764927, -0.007928859442472458, 0.009652314707636833, -0.019400913268327713, -0.011188019998371601, 0.017725598067045212, 0.026362134143710136, 0.06662745028734207, 0.038821082562208176, 0.044405464082956314, -0.007582242600619793, -0.024937152862548828, 0.02801819145679474, -0.02486012689769268, -0.07633272558450699, 0.016916826367378235, 0.01400909572839737, 0.003208612557500601, 0.011813855729997158, 0.08103130757808685, 0.049181073904037476, -0.0044265855103731155, 0.055343147367239, -0.00510778371244669, -0.034700192511081696, -0.01906392350792885, 0.005974325817078352, 0.0036081846337765455, 0.06824499368667603, -0.013922441750764847, 0.011255417950451374, 0.00015081741730682552, -0.016310246661305428, 0.00297512742690742, 0.0016500403871759772, 0.054726939648389816, 0.006571277044713497, -0.019757157191634178, 0.024243919178843498, -0.0028884734492748976, -0.041285913437604904, 0.028191499412059784, 0.00806365441530943, -0.03593260794878006, 0.026323620229959488, 0.033698856830596924, -0.0378582589328289, -0.0294046588242054, -0.017860393971204758, 0.019564593210816383, 0.006417225115001202, -0.04170955345034599, -0.04016903415322304, -0.053648579865694046, -0.0623139962553978, 0.01800481788814068, -0.024802356958389282, 0.0012173712020739913, 0.004171437118202448, -0.0413629375398159, -0.04032308608293533, 0.008256219327449799, -0.022010166198015213, 0.022299014031887054, 0.03104146011173725, 0.03566301614046097, -0.014423110522329807, -0.05110672116279602, 0.015164485201239586, -0.06874566525220871, -0.051838468760252, -0.04120888561010361, -0.004515646491199732, -0.06112009659409523, 0.0012998130405321717, -0.01966087520122528, 0.012718911282718182, 0.07506179064512253, -0.0013166624121367931, 0.015260767191648483, -0.031561385840177536, -0.045021671801805496, -0.04294196888804436, -0.016878312453627586, -0.06697406619787216, 0.047794606536626816, 0.03660658374428749, 0.047525014728307724, -0.016425784677267075, 0.006508693099021912, 0.0032254618126899004, -0.08549880981445312, 0.011197648011147976, -0.02728644385933876, -0.00900240894407034, -0.03903290256857872, 0.018909871578216553, -0.0012029288336634636, -0.01396095473319292, -0.02561113052070141, -0.016878312453627586, 0.020642956718802452, 0.02759454771876335, 0.022895965725183487, -0.07221183180809021, -0.01383578684180975, 0.05206954479217529, 0.036105915904045105, 0.022260501980781555, -0.031234024092555046, -0.043404124677181244, 0.02969350665807724, 0.003126772353425622, -0.015318537130951881, 0.04078524187207222, 0.028422577306628227, 0.0483337864279747, -0.014230545610189438, -0.024282433092594147, -0.10668095201253891, 0.02901952899992466, 0.06115860864520073, 0.027479009702801704, 0.02210645005106926, -0.0036394763737916946, 0.054380323737859726, -0.034680936485528946, -0.02622733823955059, 0.04860337823629379, 0.015732550993561745, 0.0311569981276989, -0.009777482599020004, 0.010706608183681965, -0.009411608800292015, -0.016079168766736984, 0.03317892923951149, -0.02139395847916603, -0.02281893976032734, -0.039514314383268356, -0.027421239763498306, -0.0010994251351803541, -0.016300618648529053, -0.047794606536626816, -0.038166362792253494, 0.030560048297047615, -0.031561385840177536, -0.08026104420423508, -0.0448291078209877, -0.07167264819145203, -0.05326344817876816, 0.00882910005748272, -0.007096016313880682, -0.03198502957820892, 0.04421290010213852, -0.0022277350071817636, -0.016464298591017723, -0.021567268297076225, 0.0862690731883049, 0.018543999642133713, 0.0553046353161335, -0.020912546664476395, -0.056498538702726364, -0.06782135367393494, -0.0024227069225162268, 0.07640974968671799, 0.016627978533506393, 0.029963096603751183, -0.0311569981276989, -0.008910940028727055, 0.03728056326508522, 0.01606954075396061, -0.01674351654946804, 0.02455202303826809, -0.00441455002874136, 0.03075261227786541, -0.03664509952068329, -0.008535439148545265, -0.004431399516761303, -0.01276705227792263, -0.07178819179534912, -0.06358492374420166, -0.00341802672483027, 0.048487838357686996, 0.034411344677209854, 0.06959295272827148, 0.007683339063078165, 0.018630653619766235, -0.006672373507171869, 0.024956408888101578, 0.038185618817806244, -0.06886120140552521, 0.040592677891254425, -0.015453332103788853, -0.0058010173961520195, 0.008342874236404896, -0.060657940804958344, 0.04694731906056404, -0.0016091204015538096, -0.08850282430648804, -0.015241511166095734, -0.002030356088653207, -0.006590533535927534, 0.04687029495835304, 0.0008298343163914979, 0.024629049003124237, -0.00510778371244669, -0.0051270402036607265, 0.04259535297751427, 0.0379737950861454, 0.038898106664419174, -0.02761380560696125, -0.036818407475948334, 0.017013108357787132, 0.03810859099030495, 0.007124900817871094, 0.026092542335391045, 0.02801819145679474, -0.008405457250773907, -0.01707087829709053, 0.030463766306638718, 0.04448248818516731, 0.04656219109892845, 0.003360257251188159, -0.009844879619777203, 0.012208613567054272, -0.009791924618184566, -0.005834716372191906, 0.06951592862606049, 0.056845154613256454, 0.005810645408928394, 0.02108585461974144, -0.01279593724757433, 0.028749937191605568, -0.01825515180826187, -0.030309714376926422, -0.018207009881734848, -0.06527949869632721, -0.005675849970430136, 0.01176571473479271, 0.03599037602543831, 0.04421290010213852, 0.021644294261932373 ]
4,550
optbinning.binning.binning_process
update_binned_variable
Update optimal binning object for a given variable. Parameters ---------- name : string The variable name. optb : object The optimal binning object already fitted.
def update_binned_variable(self, name, optb): """Update optimal binning object for a given variable. Parameters ---------- name : string The variable name. optb : object The optimal binning object already fitted. """ self._check_is_fitted() if not isinstance(name, str): raise TypeError("name must be a string.") if name not in self.variable_names: raise ValueError("name {} does not match a binned variable." .format(name)) optb_types = _OPTB_TYPES + _OPTBPW_TYPES if not isinstance(optb, optb_types): raise TypeError("Object {} must be of type ({}); got {}" .format(name, optb_types, type(optb))) # Check current class if self._target_dtype == "binary": optb_binary = (OptimalBinning, OptimalPWBinning) if not isinstance(optb, optb_binary): raise TypeError("target is binary and Object {} must be of " "type {}.".format(optb, optb_binary)) elif self._target_dtype == "continuous": optb_continuous = (ContinuousOptimalBinning, ContinuousOptimalPWBinning) if not isinstance(optb, optb_continuous): raise TypeError("target is continuous and Object {} must be " "of type {}.".format(optb, optb_continuous)) elif self._target_dtype == "multiclass": if not isinstance(optb, MulticlassOptimalBinning): raise TypeError("target is multiclass and Object {} must be " "of type {}.".format( optb, MulticlassOptimalBinning)) optb_old = self._binned_variables[name] if optb_old.name and optb_old.name != optb.name: raise ValueError("Update object name must match old object name; " "{} != {}.".format(optb_old.name, optb.name)) if optb.name and name != optb.name: raise ValueError("name and object name must coincide.") self._binned_variables[name] = optb self._is_updated = True
(self, name, optb)
[ 0.02978464961051941, -0.039074622094631195, -0.060384832322597504, 0.01849130354821682, -0.07758191972970963, -0.06907202303409576, -0.08297152072191238, 0.015078478492796421, -0.019306834787130356, -0.07453253865242004, -0.02818904258310795, -0.023721344769001007, 0.0030205713119357824, -0.013048512861132622, -0.08701372891664505, 0.032018497586250305, 0.009467263706028461, 0.02682391367852688, -0.043258655816316605, 0.033436816185712814, -0.008501035161316395, -0.007623451761901379, 0.022125739604234695, 0.09055951982736588, 0.030777471140027046, -0.02843724936246872, 0.05283229425549507, 0.002380112651735544, -0.0343409925699234, 0.01424521766602993, -0.030192416161298752, -0.07325605303049088, 0.039074622094631195, 0.008993013761937618, 0.06900110095739365, -0.049109213054180145, 0.0710931196808815, 0.06967480480670929, -0.05020840838551521, -0.02122156322002411, 0.01694002002477646, -0.07325605303049088, 0.0074816201813519, 0.03253263607621193, 0.04957016557455063, -0.02547651156783104, -0.03223124518990517, 0.048967380076646805, -0.009617960080504417, 0.017666906118392944, -0.01569012738764286, -0.0999913215637207, 0.03964195027947426, 0.061909519135951996, -0.012454592622816563, 0.027479885146021843, 0.0053275516256690025, 0.048896465450525284, 0.007743122521787882, 0.010903309099376202, -0.03145117312669754, -0.022196656093001366, 0.01211774256080389, -0.0916941687464714, 0.0032532638870179653, -0.0036344362888485193, -0.08949577808380127, 0.046095289289951324, -0.02544105425477028, 0.03508560732007027, 0.023224934935569763, 0.016301777213811874, 0.021859804168343544, 0.022232113406062126, -0.06541985273361206, 0.01861540600657463, -0.05737090855836868, -0.007353085093200207, -0.03833000734448433, -0.011222430504858494, 0.08460258692502975, 0.023419953882694244, -0.013216937892138958, -0.07240506261587143, -0.02700120210647583, -0.04145030304789543, 0.0199805349111557, -0.003368502017110586, 0.056165337562561035, -0.09105592966079712, -0.008669460192322731, -0.011807486414909363, 0.040528398007154465, 0.06676725298166275, 0.042053088545799255, -0.05240679904818535, 0.011674518696963787, -0.0484355129301548, -0.023898635059595108, -0.029554173350334167, -0.054605189710855484, -0.06683816760778427, -0.004556342028081417, 0.06559714674949646, 0.0460243746638298, 0.01693115569651127, 0.03437644988298416, -0.03544018790125847, -0.02584882080554962, -0.05304504185914993, -0.03005058318376541, 0.0030560290906578302, -0.07623451948165894, 0.00031136482721194625, -0.034713298082351685, 0.020725151523947716, -0.021753432229161263, -0.0012587560340762138, 0.011674518696963787, 0.04379052668809891, 0.012401405721902847, 0.028756368905305862, -0.024465961381793022, 0.01506074983626604, 0.048967380076646805, 0.027674904093146324, 0.04442876949906349, 0.04407418891787529, 0.027462156489491463, -0.034819673746824265, 0.02139885164797306, -0.043577779084444046, -0.09119775891304016, 0.05290320888161659, 0.021895263344049454, 0.0029873293824493885, -0.040351107716560364, 0.0032732088584452868, 0.0230121873319149, -0.037691764533519745, 0.05829281359910965, 0.008279423229396343, 0.028774099424481392, -0.04159213602542877, 0.03893279284238815, 0.030192416161298752, 0.020406030118465424, -0.016284048557281494, -0.037762679159641266, -0.034996964037418365, -0.07318513840436935, -0.023685887455940247, -0.042088545858860016, -0.003368502017110586, -0.03989015519618988, 0.002130799228325486, -0.017941705882549286, -0.06382425129413605, -0.029589630663394928, -0.02427094243466854, -0.007033964153379202, -0.006085464730858803, -0.020991086959838867, -0.05286775156855583, -0.039287369698286057, 0.0024465962778776884, -0.0004257720138411969, 0.03001512587070465, -0.00008213493856601417, 0.04244312644004822, -0.009094955399632454, -0.0596756711602211, -0.07963848114013672, 0.09502721577882767, 0.018074672669172287, 0.08758105337619781, 0.0051192366518080235, -0.07744009047746658, 0.024873727932572365, 0.025937465950846672, 0.022444861009716988, -0.001494772732257843, -0.016496796160936356, -0.04705265536904335, -0.034642383456230164, 0.02290581353008747, 0.008939826861023903, 0.005017295014113188, 0.012676204554736614, 0.0366634838283062, 0.030671097338199615, -0.019360022619366646, 0.013039648532867432, -0.0014515584334731102, -0.003381798742339015, -0.008957555517554283, -0.00923678744584322, 0.0034305532462894917, 0.010344847105443478, 0.03003285452723503, 0.02838406153023243, -0.022054823115468025, 0.03558201715350151, 0.04939287528395653, 0.021062001585960388, -0.00997253879904747, 0.043294116854667664, 0.015300090424716473, 0.06155494228005409, -0.02260442078113556, 0.019235920161008835, 0.0010870067635551095, 0.009289974346756935, 0.058966513723134995, 0.05800915136933327, -0.005513705778867006, 0.022125739604234695, 0.006377992685884237, -0.005589053966104984, 0.0112844817340374, 0.017587125301361084, 0.019572770223021507, 0.05403786525130272, 0.03393322601914406, -0.03152208775281906, -0.0037629713770002127, -0.003186780260875821, 0.01838492974638939, 0.07041942328214645, -0.032195787876844406, 0.02701893262565136, -0.0055535961873829365, -0.05425061285495758, -0.027338052168488503, -0.004088740795850754, 0.05871830880641937, -0.011745434254407883, -0.023278120905160904, -0.019129546359181404, -0.03141571208834648, -0.0014393697492778301, -0.011036275885999203, -0.020920170471072197, 0.0034770919010043144, -0.03575930744409561, -0.028135856613516808, 0.032053954899311066, 0.011736569926142693, -0.047939103096723557, -0.03286948800086975, 0.026806185021996498, 0.009609094820916653, -0.02115064673125744, 0.029660547152161598, 0.022125739604234695, 0.008771401830017567, -0.04262041300535202, -0.029642818495631218, -0.016470201313495636, 0.014564339071512222, -0.04180488362908363, -0.006963048130273819, -0.021842075511813164, 0.05098848417401314, -0.015078478492796421, -0.002196174580603838, 0.0025596183259040117, 0.017542803660035133, -0.019484125077724457, 0.008173049427568913, 0.012755985371768475, -0.01996280625462532, 0.002612805226817727, 0.029554173350334167, -0.03276311233639717, 0.011169243603944778, 0.04116664081811905, 0.04123755544424057, 0.010867850854992867, -0.04166305065155029, 0.03971286490559578, 0.008665028028190136, 0.022427132353186607, 0.011461771093308926, -0.032036226242780685, -0.0012000288115814328, -0.021771160885691643, 0.0011091679334640503, -0.005145830102264881, -0.017321191728115082, 0.006213999819010496, 0.011754299513995647, 0.08254602551460266, 0.053612370043992996, -0.031823478639125824, 0.04559887945652008, -0.04517338424921036, 0.010743748396635056, 0.034713298082351685, -0.02570698969066143, 0.018987713381648064, -0.010646238923072815, -0.060491204261779785, -0.003736377926543355, -0.000554306956473738, -0.058789223432540894, 0.09516904503107071, -0.04832914099097252, -0.0030493808444589376, 0.038861874490976334, 0.04120209813117981, -0.03164618834853172, 0.044570598751306534, 0.012516643851995468, 0.06407245248556137, -0.07283055782318115, 0.015592618845403194, -0.008084405213594437, -0.0539669468998909, 0.07318513840436935, -0.040563855320215225, -0.020352844148874283, 0.008199643343687057, -0.023561784997582436, -0.04233675077557564, -0.018934527412056923, 0.041946712881326675, 0.04269133135676384, -0.015601483173668385, -0.03659256920218468, -0.04535067453980446, -0.02825995907187462, 0.0729723870754242, 0.008110998198390007, 0.0066705201752483845, 0.004755793139338493, 0.02294127084314823, -0.00032604660373181105, 0.020778339356184006, -0.014599796384572983, 0.0015291225863620639, 0.06878835707902908, -0.01557488925755024, 0.05368328467011452, 0.0002433576446492225, 0.0023247096687555313, -0.012685069814324379, 0.0039313966408371925, 0.06073940917849541, 0.0337204784154892, -0.028933659195899963, 0.007548104040324688, -0.012498915195465088, 0.004235005006194115, 0.052016761153936386, -0.015167123638093472, 0.03542245924472809, -0.0149632403627038, 0.019324563443660736, -0.05669720843434334, -0.09609095007181168, -0.0044100782833993435, -0.024501420557498932, 0.0240404661744833, 0.05655537545681, -0.001490340568125248, -0.037656307220458984, 0.02134566567838192, 0.008895504288375378, -0.05797369405627251, 0.00017909017333295196, -0.08843204379081726, -0.013278989121317863, -0.011896130628883839, 0.009440669789910316, 0.04145030304789543, -0.053115956485271454, -0.015007562935352325, 0.03801088407635689, -0.011036275885999203, 0.08729738742113113, -0.005371874198317528, -0.04786818474531174, 0.05591713264584541, 0.023756803944706917, 0.003661029739305377, -0.005305390805006027, -0.02579563297331333, 0.06854014843702316, -0.017684634774923325, 0.02856135182082653, 0.030263330787420273, 0.020547863095998764, 0.023809989914298058, -0.03290494531393051, -0.01434272713959217, 0.031025676056742668, -0.02115064673125744, -0.02996193803846836, -0.014706170186400414, -0.004742496181279421, -0.008035650476813316, -0.040741145610809326, 0.06634175777435303, -0.034855131059885025, -0.04949925094842911, 0.026079297065734863, 0.06307963281869888, -0.03691168874502182, 0.013146022334694862, -0.04974745586514473, 0.030564723536372185, -0.018207639455795288, 0.0012088933726772666, -0.04666261747479439, 0.07222777605056763, -0.009724332951009274, -0.05297412723302841, 0.04570525512099266, -0.00987502932548523, 0.025157392024993896, 0.04311682656407356, 0.024838270619511604, 0.015610347501933575, -0.026806185021996498, -0.020778339356184006, 0.01270279847085476, -0.0317525640130043, -0.006475501693785191, 0.05269046127796173, -0.005979090929031372, -0.025937465950846672, -0.04676898941397667, -0.01692228950560093, 0.021771160885691643, -0.04127301275730133, -0.0036167073994874954, -0.0063957213424146175, 0.016496796160936356, 0.014360455796122551, 0.015238039195537567, -0.012631882913410664, 0.02435958757996559, 0.012419135309755802, -0.07502894848585129, -0.049109213054180145, -0.027710361406207085, -0.018172182142734528, -0.06701546162366867, -0.0033175311982631683, 0.07814924418926239, -0.04673353210091591, 0.012853494845330715, -0.0009424049057997763, -0.000045361201046034694, -0.054711565375328064, -0.03552883118391037, -0.02857908047735691, 0.04978291317820549, -0.04435785114765167, -0.05169764161109924, 0.025139661505818367, 0.002934142481535673, 0.041982173919677734, -0.043329574167728424, -0.013934960588812828, 0.03574157878756523, -0.02276398241519928, 0.05446336045861244, 0.03118523769080639, -0.005358577705919743, -0.04722994565963745, 0.020601049065589905, -0.013048512861132622, 0.04581162706017494, 0.016035841777920723, -0.04988928884267807, 0.0596756711602211, -0.005017295014113188, -0.04414510354399681, 0.01568126305937767, -0.0016875751316547394, 0.010398034006357193, 0.01836720108985901, 0.030901573598384857, -0.015220310539007187, 0.00503059197217226, 0.03253263607621193, 0.004166305065155029, 0.0013928312109783292, -0.007144770119339228, 0.04141484573483467, -0.008190778084099293, 0.00004293732126825489, -0.05031478404998779, 0.02723168022930622, -0.02549424208700657, 0.04393235594034195, 0.03552883118391037, -0.005637808702886105, -0.016292912885546684, 0.017675770446658134, -0.06563260406255722, -0.037833597511053085, 0.018757237121462822, -0.024483690038323402, -0.05403786525130272, 0.027302594855427742, -0.03513879328966141, 0.03801088407635689, -0.0370180644094944, -0.04152121767401695, -0.0026371825952082872, 0.03120296634733677, 0.04857734590768814, 0.010522136464715004, -0.014901189133524895, 0.029642818495631218, -0.032089412212371826, -0.03836546465754509, 0.017471887171268463, 0.02833087556064129, 0.0136247044429183, -0.07208593934774399, 0.018881339579820633, -0.022143468260765076, -0.01836720108985901, -0.03558201715350151, 0.035050150007009506, 0.023419953882694244, 0.030777471140027046, -0.0011568145127967, 0.03324179723858833, 0.04715902730822563, 0.07566719502210617, 0.00045541260624304414, 0.019696872681379318, 0.003605626756325364, -0.04141484573483467, -0.01838492974638939, -0.014422507025301456, 0.0510239414870739, 0.04244312644004822, 0.004826708696782589, 0.0010122127132490277, 0.07130587100982666, -0.019484125077724457, 0.03843637928366661, 0.00677246181294322, -0.015149394981563091, -0.029164135456085205, 0.016425879672169685, 0.01852676086127758, 0.09254515916109085, 0.006182974204421043, -0.05964021384716034, -0.023242663592100143, -0.006785758771002293, 0.005637808702886105, 0.025033287703990936, -0.04691082239151001, 0.0019778867717832327, 0.06698000431060791, -0.001861540600657463, -0.007286601699888706, 0.0401383601129055, -0.016620898619294167, -0.005535867065191269, 0.0403156504034996, 0.008873343467712402, 0.042124003171920776, 0.04293953627347946, -0.05800915136933327, -0.03793996945023537, -0.002825552597641945, 0.0254233255982399, -0.009484992362558842, -0.0054826801642775536, -0.0403156504034996, -0.015371006913483143, -0.016461336985230446, 0.02405819669365883, -0.008687189780175686, -0.03559974581003189, -0.0028166882693767548, 0.012897816486656666, -0.022090282291173935, 0.007131473161280155, 0.017569396644830704, 0.017844196408987045, -0.03520971164107323, 0.03861366957426071, -0.012490050867199898, -0.05286775156855583, -0.008142024278640747, 0.029004575684666634, -0.06488798558712006, -0.006422314792871475, 0.05517251789569855, -0.02857908047735691, -0.007215685676783323, -0.046237122267484665, -0.0006742544355802238, 0.0456697940826416, -0.023614972829818726, 0.02584882080554962, -0.027284866198897362, -0.004680444952100515, 0.0010648454772308469, -0.006883267778903246, 0.02152295410633087, 0.003656597575172782, 0.029093220829963684, 0.05602350831031799, -0.05222950875759125, 0.004995133727788925, -0.005314255133271217, 0.008212939836084843, 0.006874403450638056, 0.016275184229016304, -0.04081206023693085, -0.0001479259954066947, 0.014661848545074463, 0.021097460761666298, -0.050598446279764175, -0.058895599097013474, 0.07531261444091797, -0.02976692095398903, 0.013598110526800156, -0.01859767735004425, -0.03290494531393051, -0.006776893977075815, 0.04545704647898674, -0.041733965277671814, -0.01078807096928358, -0.010938767343759537, 0.025086475536227226, 0.010052318684756756, -0.01978551782667637, 0.015096208080649376, 0.061661314219236374, 0.022072551771998405, 0.04262041300535202, 0.029554173350334167, -0.0013706700410693884, -0.023969551548361778, 0.008261694572865963, -0.01982097513973713, 0.02391636371612549, -0.015911739319562912, -0.04747815057635307, 0.005535867065191269, -0.06240593269467354, 0.002068747766315937, 0.047761812806129456, 0.00936975423246622, 0.060313913971185684, -0.014785951003432274, 0.04123755544424057, -0.02985556423664093, -0.07240506261587143, -0.008274991065263748, 0.013562653213739395, -0.05584621801972389, -0.003166835056617856, 0.03854275494813919, -0.02416457049548626, -0.015973791480064392, 0.01725027523934841, -0.008518763817846775, -0.007743122521787882, -0.03588341176509857, -0.05538526549935341, -0.05581076070666313, -0.052087679505348206, -0.037585388869047165, -0.013801993802189827, -0.010956496000289917, -0.016310641542077065, -0.016284048557281494, 0.03001512587070465, -0.020547863095998764, -0.013837452046573162, 0.02414683997631073, 0.08084404468536377, 0.05318687483668327, -0.05439244210720062, 0.02145203948020935, 0.010965360328555107, 0.011585873551666737, -0.046201664954423904, -0.001765139400959015, -0.010043454356491566, -0.004403430037200451, 0.00022729078773409128, -0.0631505474448204, 0.012791442684829235, -0.004574071150273085, 0.0032953701447695494, -0.007228982634842396, 0.03421688824892044, -0.03309996426105499, -0.03423461690545082, -0.03313542157411575, 0.013988147489726543, 0.03375593572854996, -0.05088210850954056, -0.027657173573970795, 0.017507346346974373, 0.005668834317475557, 0.008204075507819653, 0.024625523015856743, -0.019076358526945114, -0.040422022342681885, 0.03747901692986488, 0.07935481518507004, -0.09126867353916168, -0.01873950846493244, -0.048896465450525284, 0.0199805349111557, 0.019484125077724457, 0.05588167533278465, 0.03155754506587982, 0.002630534116178751, 0.02719622105360031, -0.039074622094631195, 0.05527888983488083, -0.04364869371056557, -0.02978464961051941, 0.030281059443950653, 0.04786818474531174, 0.02561834454536438, -0.03747901692986488, -0.019501853734254837, 0.02123929187655449, 0.026504792273044586, 0.046237122267484665, -0.006502095144242048, 0.015220310539007187, 0.08325518667697906, 0.0034216889180243015, -0.0013185912976041436, 0.019413208588957787, -0.030742013826966286, 0.0035901139490306377, 0.005584621801972389, 0.03999653086066246, -0.011887266300618649, 0.019306834787130356, -0.016762729734182358, 0.07424887269735336, 0.03989015519618988, 0.030742013826966286, 0.04985382780432701, 0.1106996163725853, -0.04581162706017494, 0.030156956985592842, 0.016541117802262306, 0.016718408092856407, -0.053612370043992996, -0.01078807096928358, -0.0019734546076506376, 0.04410964623093605, 0.0017884086119011045, -0.02552969940006733, 0.029323697090148926, 0.0006421207217499614, -0.024572335183620453 ]
4,551
optbinning.binning.distributed.binning_process_sketch
BinningProcessSketch
Binning process over data streams to compute optimal binning of variables with respect to a binary target. Parameters ---------- variable_names : array-like List of variable names. max_n_prebins : int (default=20) The maximum number of bins after pre-binning (prebins). min_n_bins : int or None, optional (default=None) The minimum number of bins. If None, then ``min_n_bins`` is a value in ``[0, max_n_prebins]``. max_n_bins : int or None, optional (default=None) The maximum number of bins. If None, then ``max_n_bins`` is a value in ``[0, max_n_prebins]``. min_bin_size : float or None, optional (default=None) The fraction of minimum number of records for each bin. If None, ``min_bin_size = min_prebin_size``. max_bin_size : float or None, optional (default=None) The fraction of maximum number of records for each bin. If None, ``max_bin_size = 1.0``. max_pvalue : float or None, optional (default=None) The maximum p-value among bins. max_pvalue_policy : str, optional (default="consecutive") The method to determine bins not satisfying the p-value constraint. Supported methods are "consecutive" to compare consecutive bins and "all" to compare all bins. selection_criteria : dict or None (default=None) Variable selection criteria. See notes. special_codes : array-like or None, optional (default=None) List of special codes. Use special codes to specify the data values that must be treated separately. split_digits : int or None, optional (default=None) The significant digits of the split points. If ``split_digits`` is set to 0, the split points are integers. If None, then all significant digits in the split points are considered. categorical_variables : array-like or None, optional (default=None) List of variables numerical variables to be considered categorical. These are nominal variables. Not applicable when target type is multiclass. binning_fit_params : dict or None, optional (default=None) Dictionary with optimal binning fitting options for specific variables. Example: ``{"variable_1": {"max_n_bins": 4}}``. binning_transform_params : dict or None, optional (default=None) Dictionary with optimal binning transform options for specific variables. Example ``{"variable_1": {"metric": "event_rate"}}``. verbose : bool (default=False) Enable verbose output. Notes ----- Parameter ``selection_criteria`` allows to specify criteria for variable selection. The input is a dictionary as follows .. code:: selection_criteria = { "metric_1": { "min": 0, "max": 1, "strategy": "highest", "top": 0.25 }, "metric_2": { "min": 0.02 } } where several metrics can be combined. For example, above dictionary indicates that top 25% variables with "metric_1" in [0, 1] and "metric_2" greater or equal than 0.02 are selected. Supported key values are: * keys ``min`` and ``max`` support numerical values. * key ``strategy`` supports options "highest" and "lowest". * key ``top`` supports an integer or decimal (percentage). .. warning:: If the binning process instance is going to be saved, do not pass the option ``"solver": "mip"`` via the binning_fit_params parameter.
class BinningProcessSketch(BaseSketch, BaseEstimator, BaseBinningProcess): """Binning process over data streams to compute optimal binning of variables with respect to a binary target. Parameters ---------- variable_names : array-like List of variable names. max_n_prebins : int (default=20) The maximum number of bins after pre-binning (prebins). min_n_bins : int or None, optional (default=None) The minimum number of bins. If None, then ``min_n_bins`` is a value in ``[0, max_n_prebins]``. max_n_bins : int or None, optional (default=None) The maximum number of bins. If None, then ``max_n_bins`` is a value in ``[0, max_n_prebins]``. min_bin_size : float or None, optional (default=None) The fraction of minimum number of records for each bin. If None, ``min_bin_size = min_prebin_size``. max_bin_size : float or None, optional (default=None) The fraction of maximum number of records for each bin. If None, ``max_bin_size = 1.0``. max_pvalue : float or None, optional (default=None) The maximum p-value among bins. max_pvalue_policy : str, optional (default="consecutive") The method to determine bins not satisfying the p-value constraint. Supported methods are "consecutive" to compare consecutive bins and "all" to compare all bins. selection_criteria : dict or None (default=None) Variable selection criteria. See notes. special_codes : array-like or None, optional (default=None) List of special codes. Use special codes to specify the data values that must be treated separately. split_digits : int or None, optional (default=None) The significant digits of the split points. If ``split_digits`` is set to 0, the split points are integers. If None, then all significant digits in the split points are considered. categorical_variables : array-like or None, optional (default=None) List of variables numerical variables to be considered categorical. These are nominal variables. Not applicable when target type is multiclass. binning_fit_params : dict or None, optional (default=None) Dictionary with optimal binning fitting options for specific variables. Example: ``{"variable_1": {"max_n_bins": 4}}``. binning_transform_params : dict or None, optional (default=None) Dictionary with optimal binning transform options for specific variables. Example ``{"variable_1": {"metric": "event_rate"}}``. verbose : bool (default=False) Enable verbose output. Notes ----- Parameter ``selection_criteria`` allows to specify criteria for variable selection. The input is a dictionary as follows .. code:: selection_criteria = { "metric_1": { "min": 0, "max": 1, "strategy": "highest", "top": 0.25 }, "metric_2": { "min": 0.02 } } where several metrics can be combined. For example, above dictionary indicates that top 25% variables with "metric_1" in [0, 1] and "metric_2" greater or equal than 0.02 are selected. Supported key values are: * keys ``min`` and ``max`` support numerical values. * key ``strategy`` supports options "highest" and "lowest". * key ``top`` supports an integer or decimal (percentage). .. warning:: If the binning process instance is going to be saved, do not pass the option ``"solver": "mip"`` via the binning_fit_params parameter. """ def __init__(self, variable_names, max_n_prebins=20, min_n_bins=None, max_n_bins=None, min_bin_size=None, max_bin_size=None, max_pvalue=None, max_pvalue_policy="consecutive", selection_criteria=None, categorical_variables=None, special_codes=None, split_digits=None, binning_fit_params=None, binning_transform_params=None, verbose=False): self.variable_names = variable_names self.max_n_prebins = max_n_prebins self.min_n_bins = min_n_bins self.max_n_bins = max_n_bins self.min_bin_size = min_bin_size self.max_bin_size = max_bin_size self.max_pvalue = max_pvalue self.max_pvalue_policy = max_pvalue_policy self.selection_criteria = selection_criteria self.binning_fit_params = binning_fit_params self.binning_transform_params = binning_transform_params self.special_codes = special_codes self.split_digits = split_digits self.categorical_variables = categorical_variables self.verbose = verbose # target information to reuse BaseBinningProcess self._target_dtype = "binary" # auxiliary self._n_samples = None self._n_variables = None self._n_numerical = None self._n_categorical = None self._n_selected = None self._binned_variables = {} self._variable_dtypes = {} self._variable_stats = {} self._support = None # streaming stats self._n_add = 0 self._n_solve = 0 # timing self._time_streaming_add = 0 self._time_streaming_solve = 0 # flags self._is_started = False self._is_solved = False # Check parameters _check_parameters(**self.get_params()) def add(self, X, y, check_input=False): """Add new data X, y to the binning sketch of each variable. Parameters ---------- X : pandas.DataFrame, shape (n_samples, n_features) y : array-like of shape (n_samples,) Target vector relative to x. check_input : bool (default=False) Whether to check input arrays. Returns ------- self : BinningProcessSketch Binning process with new data. """ if not self._is_started: self._n_samples = 0 self._n_variables = len(self.variable_names) if self.categorical_variables is not None: self._n_categorical = len(self.categorical_variables) else: self._n_categorical = 0 self._n_numerical = self._n_variables - self._n_categorical # Check selection criteria if self.selection_criteria is not None: _check_selection_criteria(self.selection_criteria, self._target_dtype) # Initialize bsketch for each variable. To avoid mixed dtypes # the user must provide a dtype for all variables. This differs # from the BinningProcess, where dtypes are inferred. for name in self.variable_names: if (self.categorical_variables is not None and name in self.categorical_variables): dtype = "categorical" else: dtype = "numerical" optb = OptimalBinningSketch( name=name, dtype=dtype, max_n_prebins=self.max_n_prebins, min_n_bins=self.min_n_bins, max_n_bins=self.max_n_bins, min_bin_size=self.min_bin_size, max_pvalue=self.max_pvalue, max_pvalue_policy=self.max_pvalue_policy, special_codes=self.special_codes, split_digits=self.split_digits) if self.binning_fit_params is not None: params = self.binning_fit_params.get(name, {}) else: params = {} optb.set_params(**params) self._variable_dtypes[name] = dtype self._binned_variables[name] = optb self._is_started = True # Add new data stream time_add = time.perf_counter() # Add data to variables that appea
(variable_names, max_n_prebins=20, min_n_bins=None, max_n_bins=None, min_bin_size=None, max_bin_size=None, max_pvalue=None, max_pvalue_policy='consecutive', selection_criteria=None, categorical_variables=None, special_codes=None, split_digits=None, binning_fit_params=None, binning_transform_params=None, verbose=False)
[ 0.039793528616428375, -0.04738062247633934, -0.07339351624250412, 0.026458051055669785, -0.016016121953725815, -0.0027556437999010086, -0.08268383145332336, 0.00407177209854126, -0.053651586174964905, -0.057987067848443985, -0.049819331616163254, 0.045638687908649445, -0.005612900480628014, 0.0059564486145973206, -0.04939352348446846, 0.018667733296751976, 0.032303210347890854, 0.0076935444958508015, -0.013451606035232544, 0.04265804588794708, -0.03925159573554993, -0.01602579839527607, -0.013451606035232544, 0.08864511549472809, 0.017303217202425003, -0.0013318541459739208, -0.005961287301033735, -0.03017417900264263, -0.05821932852268219, 0.03414192050695419, -0.059496745467185974, -0.05876126140356064, 0.012561284005641937, -0.022470956668257713, 0.043277397751808167, -0.01727418601512909, 0.07397415488958359, 0.09236124902963638, -0.04885159060359001, 0.00708386767655611, 0.04587094485759735, -0.08585802465677261, 0.016064507886767387, 0.032941918820142746, 0.013151606544852257, 0.021135473623871803, -0.02320644073188305, 0.05500642582774162, -0.0030798371881246567, -0.005467739421874285, 0.0010040317429229617, -0.08113544434309006, 0.02583869732916355, 0.06541932374238968, -0.0420386902987957, 0.054812878370285034, 0.04594836384057999, 0.009817737154662609, 0.014883863739669323, 0.009749995544552803, 0.00387822394259274, 0.03888385370373726, 0.04354836791753769, -0.05028384551405907, 0.010045156814157963, -0.0065564485266804695, -0.06286448240280151, 0.009682253003120422, -0.00785806030035019, 0.009735479019582272, 0.04985804110765457, -0.012029026634991169, 0.05759997293353081, 0.05334191024303436, -0.03948385268449783, -0.024967730045318604, -0.01637418568134308, -0.027406439185142517, -0.013161283917725086, -0.022954827174544334, 0.07424512505531311, 0.03934836760163307, -0.014032251201570034, -0.06762577593326569, 0.015416122041642666, -0.022064505144953728, 0.04389675334095955, 0.09971608221530914, 0.05020642653107643, -0.0580257773399353, 0.0012653219746425748, 0.047806426882743835, 0.05787093937397003, 0.10861930251121521, 0.04861932992935181, -0.0647999718785286, -0.032980628311634064, -0.01799999177455902, -0.026961278170347214, -0.038961272686719894, -0.06154835596680641, -0.013538703322410583, 0.004628223367035389, 0.06367738544940948, -0.006416126154363155, 0.01058709155768156, -0.0019814507104456425, 0.009575801901519299, -0.036638692021369934, -0.04258062317967415, -0.03323224186897278, 0.03522578999400139, -0.04087739810347557, -0.0052887070924043655, -0.04788384959101677, 0.004173384979367256, -0.02034192532300949, 0.03133546933531761, -0.03723869100213051, 0.041806433349847794, -0.01033547893166542, 0.024464504793286324, -0.03317417949438095, 0.008012899197638035, -0.015561282634735107, 0.0010627011070027947, 0.06143222749233246, 0.06069674342870712, -0.00464273989200592, -0.046103205531835556, 0.020051604136824608, -0.056477393954992294, -0.03269030526280403, 0.06739351898431778, -0.01578386314213276, -0.04672255739569664, 0.0012810478219762444, 0.023903213441371918, -0.027890309691429138, -0.026148375123739243, 0.09468382596969604, -0.009024188853800297, 0.004449191503226757, -0.011709671467542648, 0.0069725774228572845, 0.011332252994179726, 0.037954822182655334, -0.0643741637468338, -0.01985805481672287, -0.03847740218043327, -0.03956127166748047, -0.03534191846847534, -0.04420642927289009, -0.027735469862818718, 0.025819342583417892, 0.020941926166415215, 0.007790318690240383, -0.03150966390967369, -0.02570321410894394, -0.03354191780090332, -0.028896760195493698, -0.0054725781083106995, 0.005109674762934446, -0.03603869304060936, -0.05423223227262497, 0.056825779378414154, -0.028587082400918007, 0.011390317231416702, -0.001128023606725037, 0.012087090872228146, 0.026612890884280205, -0.027580631896853447, -0.055161263793706894, 0.05821932852268219, -0.03247740492224693, 0.07718706130981445, 0.029787082225084305, -0.040103208273649216, -0.0034330629277974367, 0.04699352756142616, 0.0005939513212069869, -0.026922568678855896, -0.025258053094148636, -0.05225804075598717, -0.03019353374838829, -0.005854835733771324, 0.06135480850934982, -0.04149675369262695, 0.05941932648420334, 0.020729022100567818, -0.014070960693061352, -0.032593533396720886, 0.0330580472946167, 0.013499993830919266, -0.004761287942528725, -0.013829025439918041, 0.013712896965444088, 0.015725798904895782, -0.000026858606361201964, -0.020748376846313477, 0.05051610618829727, -0.015667734667658806, 0.05260642617940903, -0.0057241907343268394, -0.025780633091926575, -0.03222579136490822, -0.034122563898563385, 0.04381933435797691, 0.033309660851955414, -0.0178451519459486, -0.014022573828697205, -0.05837416648864746, 0.0446709468960762, 0.07393544912338257, 0.06541932374238968, -0.03807095065712929, 0.03803224116563797, -0.026129020377993584, -0.005225804168730974, -0.02852901816368103, 0.050438687205314636, 0.018096765503287315, 0.007829028181731701, 0.04366449639201164, -0.005409674718976021, 0.010693543590605259, 0.03638707846403122, 0.007320964243263006, 0.0825289934873581, -0.04238707572221756, 0.041458044201135635, -0.028954824432730675, -0.053458038717508316, 0.0018604829674586654, 0.008477414958178997, 0.018387088552117348, -0.025645149871706963, 0.0009072576067410409, -0.021599989384412766, -0.021077409386634827, -0.005249997600913048, -0.009541930630803108, 0.019083861261606216, -0.06298061460256577, -0.034103211015462875, 0.00369435315951705, 0.057793520390987396, 0.038651593029499054, -0.016083862632513046, 0.007664512377232313, 0.04018062725663185, -0.039599981158971786, -0.017787087708711624, 0.0008413302712142467, 0.029787082225084305, -0.04238707572221756, -0.016316121444106102, -0.006991932168602943, 0.03421933948993683, 0.0079354802146554, -0.006517739035189152, 0.018667733296751976, -0.007877415977418423, 0.06398706883192062, -0.0008014109334908426, 0.01116773672401905, -0.02504514902830124, 0.0017576604150235653, -0.010412897914648056, -0.01876450702548027, -0.01499999314546585, 0.02754192240536213, -0.02084515057504177, 0.007374189794063568, -0.053419329226017, -0.003348385449498892, 0.007538706064224243, -0.007383867632597685, 0.019470958039164543, 0.002410885877907276, 0.039464496076107025, 0.024387085810303688, 0.010267737321555614, -0.026129020377993584, -0.0003662296512629837, 0.00476854620501399, -0.033948369324207306, -0.03781933709979057, 0.005593545734882355, -0.04122578725218773, -0.055161263793706894, 0.0035758046433329582, 0.07056770473718643, 0.030793532729148865, -0.0017165314638987184, 0.019103216007351875, 0.005753222852945328, -0.03085159882903099, -0.027599986642599106, -0.0440128818154335, 0.034625791013240814, -0.02018708735704422, 0.03648385405540466, 0.0069725774228572845, -0.04633546248078346, -0.029729017987847328, 0.07807738333940506, -0.05028384551405907, 0.001496370299719274, -0.01834837906062603, 0.03625159710645676, 0.01335483230650425, 0.1134193018078804, 0.015193541534245014, -0.010441930033266544, -0.07517416030168533, 0.016083862632513046, 0.006537093780934811, -0.013403219170868397, 0.06658061593770981, -0.037780627608299255, -0.01476773526519537, 0.019674183800816536, -0.00789193157106638, -0.051987070590257645, 0.021445151418447495, 0.051483847200870514, -0.008811285719275475, -0.036116112023591995, -0.04587094485759735, -0.027987083420157433, -0.002617740770801902, 0.04738062247633934, 0.06878706067800522, -0.0017927411245182157, -0.006783867720514536, -0.0018556442810222507, 0.004446771927177906, 0.016345152631402016, -0.037780627608299255, 0.06464513391256332, 0.033619340509176254, -0.011409671977162361, 0.05659352242946625, 0.003687094897031784, -0.03586449846625328, 0.013412896543741226, -0.007867738604545593, 0.021387087181210518, 0.02583869732916355, 0.04668384790420532, 0.05357416719198227, -0.050167717039585114, 0.05086449161171913, 0.08206447958946228, -0.05667094141244888, 0.012338703498244286, -0.025238698348402977, 0.013461284339427948, -0.021890312433242798, -0.018135474994778633, -0.0004140119126532227, -0.019151603803038597, 0.04954836517572403, 0.015532250516116619, -0.014361283741891384, -0.04316126927733421, 0.0299999862909317, 0.006769351661205292, -0.02938063070178032, 0.02717418037354946, -0.07536770403385162, -0.036135464906692505, 0.007383867632597685, -0.006290319375693798, 0.038767725229263306, -0.03619353100657463, -0.008912898600101471, 0.03516772389411926, 0.020806441083550453, 0.061122551560401917, 0.008158060722053051, -0.05775481089949608, 0.022064505144953728, -0.01035483367741108, 0.0025306439492851496, -0.011061284691095352, -0.04799997806549072, 0.055122554302215576, -0.03356127440929413, 0.04199998080730438, 0.03642578795552254, 0.006179029121994972, 0.010799994692206383, -0.005283868405967951, -0.0299999862909317, 0.06820642203092575, 0.02369031123816967, 0.019035475328564644, -0.018203217536211014, -0.02338063344359398, -0.054464489221572876, -0.03356127440929413, 0.057832229882478714, -0.006609674077481031, -0.07192254811525345, 0.036270949989557266, -0.01670321822166443, -0.008303222246468067, -0.00921773724257946, -0.014341928996145725, -0.0041709658689796925, -0.00733548030257225, 0.017022572457790375, -0.05500642582774162, 0.02003224939107895, -0.04416771978139877, -0.04993546009063721, 0.042464494705200195, -0.042464494705200195, 0.03274837136268616, 0.07331609725952148, 0.031238695606589317, 0.008661285974085331, -0.009856446646153927, 0.011516123078763485, -0.019238701090216637, -0.006072577554732561, -0.0016354831168428063, 0.031316112726926804, -0.03847740218043327, -0.051832232624292374, -0.09646447002887726, -0.023729020729660988, -0.017312895506620407, 0.0003616933827288449, -0.022974181920289993, 0.0018229830311611295, 0.030754823237657547, -0.007829028181731701, -0.00638709357008338, -0.014854831621050835, 0.06929028779268265, -0.018725797533988953, -0.035264499485492706, -0.02338063344359398, -0.05922577902674675, -0.004824191331863403, -0.0761806070804596, -0.0061403196305036545, 0.031606435775756836, -0.03154837340116501, 0.022490311414003372, -0.0021689506247639656, -0.0061064488254487514, -0.010819349437952042, -0.030251597985625267, -0.01919999159872532, 0.011312898248434067, -0.04594836384057999, 0.011012897826731205, 0.012561284005641937, -0.04943223297595978, 0.03538062795996666, -0.02034192532300949, -0.03799353167414665, 0.03272901475429535, 0.009198382496833801, -0.0054725781083106995, 0.06456770747900009, 0.018145153298974037, 0.004935481585562229, 0.01068386621773243, -0.03652256354689598, 0.03553546592593193, 0.009561285376548767, -0.01876450702548027, 0.021754829213023186, -0.004741933196783066, -0.037277400493621826, 0.017893539741635323, -0.028122566640377045, -0.01499999314546585, 0.03172256425023079, -0.015532250516116619, 0.0008122979779727757, 0.02436773106455803, 0.007620964199304581, 0.008254834450781345, -0.011806446127593517, -0.007741931825876236, 0.02483224682509899, 0.04273546487092972, 0.03137417882680893, -0.003863707883283496, 0.029612889513373375, 0.02500643953680992, 0.024890311062335968, 0.09073544293642044, -0.05260642617940903, -0.010432252660393715, 0.055625781416893005, -0.03667740151286125, -0.029593534767627716, 0.01690644398331642, -0.017090314999222755, -0.03356127440929413, 0.03687094897031784, -0.08260641247034073, 0.020787086337804794, -0.023322569206357002, -0.09058060497045517, 0.002489514881744981, 0.006614512763917446, 0.010432252660393715, 0.012290316633880138, 0.02320644073188305, 0.011061284691095352, -0.06340642273426056, -0.0158709604293108, 0.009895156137645245, 0.046954818069934845, 0.004913707263767719, -0.0573677159845829, 0.011699994094669819, 0.01821289397776127, -0.05171610414981842, -0.04292901232838631, 0.006188706494867802, 0.04490320384502411, 0.014632251113653183, -0.00814354419708252, 0.038651593029499054, 0.0580257773399353, 0.05303223431110382, 0.0022814504336565733, 0.0276967603713274, -0.027890309691429138, -0.006817738525569439, -0.024619342759251595, -0.019345151260495186, 0.04966449365019798, 0.03069675900042057, 0.004437094554305077, 0.019974183291196823, 0.08632253855466843, 0.048774171620607376, 0.04091610759496689, 0.02870321273803711, 0.004420159384608269, 0.027232244610786438, 0.02953547053039074, 0.013741929084062576, 0.021309666335582733, 0.05067094415426254, -0.09298060089349747, 0.020458053797483444, 0.004974191077053547, 0.007296770811080933, 0.01900644227862358, -0.04490320384502411, -0.006687093526124954, -0.005656449124217033, -0.0273677296936512, -0.03836127370595932, 0.01416773535311222, -0.040296755731105804, -0.016064507886767387, -0.0009411285864189267, -0.01383870281279087, 0.05636126175522804, 0.027619341388344765, -0.03758708015084267, -0.037625789642333984, -0.02603224478662014, 0.0013245961163192987, -0.008995156735181808, -0.0060145133174955845, -0.06321287155151367, -0.0046572559513151646, -0.02783224545419216, 0.01983870007097721, -0.013441928662359715, -0.04726449400186539, 0.010393543168902397, 0.06750964373350143, -0.06154835596680641, -0.01066451147198677, 0.01679031364619732, 0.011709671467542648, -0.012667736038565636, 0.024812892079353333, -0.015735477209091187, -0.057793520390987396, -0.01883224956691265, 0.048658039420843124, -0.02920643799006939, -0.004250804428011179, 0.04366449639201164, -0.03582578897476196, -0.02450321428477764, 0.010974188335239887, -0.018222572281956673, 0.03621288761496544, -0.0024374988861382008, -0.02020644210278988, -0.023303214460611343, 0.02850966341793537, 0.0003734877100214362, -0.004591933451592922, -0.025083858519792557, 0.007137093227356672, 0.024290310218930244, 0.005308061838150024, -0.04002578556537628, -0.00813386682420969, -0.014603218995034695, -0.015377411618828773, 0.04776771739125252, -0.008811285719275475, 0.011506445705890656, 0.004052417352795601, -0.003096772823482752, 0.013829025439918041, -0.03588385507464409, -0.04501933231949806, 0.01826128177344799, -0.06092900410294533, 0.01891934499144554, -0.013809670694172382, -0.02388385869562626, -0.022780634462833405, 0.06499351561069489, -0.012464510276913643, 0.04350965842604637, 0.02349676378071308, 0.04525159299373627, 0.002340724691748619, -0.011622575111687183, -0.03507095202803612, 0.05326449126005173, 0.004180643241852522, 0.014738702215254307, 0.0007518141646869481, 0.02804514765739441, -0.05492900684475899, 0.0056322552263736725, 0.025780633091926575, 0.06998706609010696, 0.01443870272487402, -0.031238695606589317, -0.012425800785422325, -0.09104511886835098, -0.0004741933080367744, 0.04993546009063721, 0.02634192258119583, 0.025122568011283875, 0.03654191642999649, 0.01607418619096279, -0.021948376670479774, -0.05953545495867729, 0.042774174362421036, 0.002399998949840665, -0.01441934797912836, -0.030987082049250603, -0.011206446215510368, -0.0009411285864189267, 0.003616933710873127, 0.02086450532078743, 0.040296755731105804, 0.016693539917469025, -0.056477393954992294, -0.06708383560180664, -0.04308385029435158, -0.011003220453858376, -0.028625791892409325, -0.043316107243299484, -0.02183224819600582, -0.027890309691429138, -0.029922565445303917, 0.04405159130692482, -0.00812418945133686, -0.0213483776897192, 0.008003221824765205, 0.06541932374238968, 0.014380638487637043, -0.03681288659572601, -0.03652256354689598, -0.017816120758652687, 0.021735472604632378, -0.0006045359768904746, 0.03447095304727554, 0.04676126688718796, -0.001640321803279221, -0.00839515682309866, -0.028645148500800133, -0.008980641141533852, -0.04141933470964432, 0.02684514783322811, -0.056632231920957565, 0.024812892079353333, -0.04172901064157486, -0.046296752989292145, 0.017322571948170662, -0.01550321839749813, 0.054154813289642334, -0.08771608769893646, -0.0031499986071139574, 0.053148362785577774, 0.0235354732722044, 0.029922565445303917, 0.05152255669236183, -0.031954824924468994, -0.03714191913604736, -0.0011237898143008351, 0.06956125795841217, -0.08020641654729843, 0.04238707572221756, -0.054967716336250305, 0.013461284339427948, 0.002108466811478138, 0.052645135670900345, 0.0527612641453743, 0.005245158914476633, -0.012861284427344799, 0.011370962485671043, 0.06638706475496292, -0.06344512850046158, 0.03582578897476196, 0.005220965016633272, 0.05860642343759537, 0.011158059351146221, -0.05159997567534447, 0.009977414272725582, 0.028896760195493698, -0.009691931307315826, 0.06836125999689102, -0.023922570049762726, -0.013732251711189747, 0.006454835645854473, -0.011719348840415478, -0.06135480850934982, -0.026825793087482452, 0.0020661279559135437, -0.008390318602323532, 0.026283858343958855, 0.05852900445461273, -0.03567095100879669, 0.01911289431154728, -0.05655481293797493, 0.0260515995323658, 0.04087739810347557, -0.012425800785422325, 0.04416771978139877, 0.0009943543700501323, -0.015929024666547775, 0.057483844459056854, 0.0063048359006643295, -0.01701289415359497, -0.10892897844314575, -0.029438694939017296, -0.014854831621050835, 0.037974175065755844, -0.00375241762958467, 0.01084838155657053, 0.03859353065490723, 0.025916116312146187, 0.015096766874194145 ]
4,553
optbinning.binning.distributed.binning_process_sketch
__init__
null
def __init__(self, variable_names, max_n_prebins=20, min_n_bins=None, max_n_bins=None, min_bin_size=None, max_bin_size=None, max_pvalue=None, max_pvalue_policy="consecutive", selection_criteria=None, categorical_variables=None, special_codes=None, split_digits=None, binning_fit_params=None, binning_transform_params=None, verbose=False): self.variable_names = variable_names self.max_n_prebins = max_n_prebins self.min_n_bins = min_n_bins self.max_n_bins = max_n_bins self.min_bin_size = min_bin_size self.max_bin_size = max_bin_size self.max_pvalue = max_pvalue self.max_pvalue_policy = max_pvalue_policy self.selection_criteria = selection_criteria self.binning_fit_params = binning_fit_params self.binning_transform_params = binning_transform_params self.special_codes = special_codes self.split_digits = split_digits self.categorical_variables = categorical_variables self.verbose = verbose # target information to reuse BaseBinningProcess self._target_dtype = "binary" # auxiliary self._n_samples = None self._n_variables = None self._n_numerical = None self._n_categorical = None self._n_selected = None self._binned_variables = {} self._variable_dtypes = {} self._variable_stats = {} self._support = None # streaming stats self._n_add = 0 self._n_solve = 0 # timing self._time_streaming_add = 0 self._time_streaming_solve = 0 # flags self._is_started = False self._is_solved = False # Check parameters _check_parameters(**self.get_params())
(self, variable_names, max_n_prebins=20, min_n_bins=None, max_n_bins=None, min_bin_size=None, max_bin_size=None, max_pvalue=None, max_pvalue_policy='consecutive', selection_criteria=None, categorical_variables=None, special_codes=None, split_digits=None, binning_fit_params=None, binning_transform_params=None, verbose=False)
[ 0.02422390691936016, -0.02328246831893921, -0.06318492442369461, -0.008563458919525146, -0.01614927127957344, -0.00017765103257261217, -0.09023314714431763, -0.014311658218502998, -0.05163421481847763, -0.05257565528154373, -0.03465213626623154, 0.09211602061986923, -0.007345926947891712, 0.005232219118624926, -0.05525512993335724, 0.02697579935193062, 0.0200236476957798, 0.02243155427277088, -0.02009606547653675, 0.029727693647146225, -0.04294402524828911, 0.013515057042241096, -0.027156846597790718, 0.07502531260251999, 0.008939128369092941, 0.0013487900141626596, -0.014881951734423637, -0.017244597896933556, -0.053191207349300385, 0.02130907215178013, -0.06191760674118996, -0.03454350680112839, 0.005196009762585163, 0.00005190918091102503, 0.04667356610298157, -0.0409163162112236, 0.03314945474267006, 0.04681840166449547, -0.09117458015680313, 0.033167559653520584, 0.06474191695451736, -0.10964123904705048, -0.012464992702007294, 0.034253835678100586, 0.01189469825476408, -0.005639571696519852, 0.0199150200933218, 0.020874561741948128, -0.006947626359760761, 0.008015795610845089, -0.030596712604165077, -0.07361315935850143, 0.04272677004337311, 0.03412710130214691, -0.053263626992702484, 0.08972621709108353, 0.04464585334062576, 0.028641419485211372, -0.011315352283418179, 0.00542684318497777, -0.031628672033548355, 0.037621282041072845, 0.034253835678100586, -0.061157215386629105, 0.01747090369462967, -0.004026002250611782, -0.07343211024999619, -0.006866155657917261, -0.02353593334555626, 0.023300573229789734, 0.061881400644779205, -0.018348975107073784, 0.030687235295772552, 0.06267800182104111, -0.033674489706754684, 0.008653981611132622, -0.0401197150349617, -0.018720118328928947, -0.00409163162112236, -0.012392573989927769, 0.07068021595478058, 0.041893959045410156, -0.011740809306502342, -0.06314872205257416, 0.015216886065900326, -0.050113432109355927, 0.02623351290822029, 0.0779220461845398, 0.05597931146621704, -0.04258193448185921, -0.028623316437005997, 0.02529207617044449, 0.06792832165956497, 0.09204360097646713, 0.05503787472844124, -0.031628672033548355, -0.010410124436020851, -0.0014958896208554506, -0.014184925705194473, -0.06376427412033081, -0.058405324816703796, -0.03287788853049278, 0.015488454140722752, 0.05264807119965553, -0.01087179034948349, 0.025744689628481865, 0.008133475668728352, -0.019534824416041374, -0.054096437990665436, -0.049497876316308975, -0.029293185099959373, 0.03445298597216606, -0.007377609610557556, 0.01354221347719431, -0.06981119513511658, 0.010862737894058228, -0.037476446479558945, 0.0028311011847108603, -0.01762479357421398, 0.04439239203929901, 0.006884260568767786, 0.016167376190423965, -0.02569037675857544, 0.0398300401866436, -0.019788287580013275, 0.024585997685790062, 0.05514650046825409, 0.019715869799256325, -0.016493257135152817, -0.023879919201135635, 0.05181526020169258, -0.037404030561447144, -0.01715407520532608, 0.0781392976641655, 0.012655090540647507, -0.041205987334251404, -0.018828745931386948, 0.03153815120458603, -0.017036395147442818, -0.04848402366042137, 0.10305117815732956, -0.0024735359475016594, 0.019824497401714325, -0.03135710582137108, 0.006164603866636753, 0.01995122991502285, 0.053806763142347336, -0.053698137402534485, -0.02536449395120144, -0.04620284587144852, -0.04837539419531822, -0.06539368629455566, -0.05420506373047829, -0.025527434423565865, 0.02426011487841606, 0.03200886771082878, 0.01496342197060585, -0.04030076041817665, -0.030651027336716652, -0.02152632735669613, -0.032026972621679306, -0.005811565089970827, -0.02780861034989357, -0.05282911658287048, -0.05489303916692734, 0.030614817515015602, 0.00008373360469704494, -0.034217625856399536, 0.010029928758740425, 0.02503861114382744, 0.02105560712516308, -0.0301803071051836, -0.04819434881210327, 0.06651616841554642, -0.01421208307147026, 0.04638389125466347, 0.045406244695186615, -0.03722298517823219, -0.019824497401714325, 0.08907445520162582, 0.00455782376229763, -0.033421024680137634, -0.03257010877132416, -0.07104230672121048, -0.025817107409238815, 0.016529466956853867, 0.04685461148619652, -0.008228524588048458, 0.028985407203435898, 0.022196196019649506, 0.011994273401796818, -0.029582858085632324, 0.026776650920510292, 0.014058194123208523, -0.001887400751002133, -0.023336783051490784, 0.0067892116494476795, 0.02444116212427616, -0.015198781155049801, -0.0074636065401136875, 0.03635396435856819, 0.033964160829782486, 0.025599854066967964, -0.009260484017431736, -0.014031036756932735, 0.005979032255709171, -0.03497801721096039, 0.03660742938518524, 0.03628154471516609, -0.0299268439412117, -0.011704600416123867, -0.06905080378055573, 0.05134454369544983, 0.07252687960863113, 0.021019399166107178, -0.01733512058854103, 0.019027896225452423, -0.028478479012846947, -0.0005708595272153616, -0.012600776739418507, 0.08349824696779251, 0.021290967240929604, 0.03456161171197891, 0.008319047279655933, 0.006694162730127573, 0.010989470407366753, 0.04236467927694321, 0.012410678900778294, 0.06358322501182556, 0.001198295853100717, 0.01814982481300831, -0.01848476007580757, -0.05094624310731888, 0.005128117743879557, 0.024911880493164062, 0.04518899321556091, -0.01700923778116703, -0.018104564398527145, -0.033638279885053635, -0.012501201592385769, -0.009532053023576736, -0.0025482173077762127, -0.00725540379062295, -0.045514874160289764, -0.026179200038313866, -0.009124699980020523, 0.03639017418026924, 0.06054166331887245, -0.009749307297170162, 0.0040192133747041225, 0.005616941023617983, -0.03534010797739029, -0.05148937925696373, 0.0073006656020879745, 0.03530389815568924, -0.015886755660176277, -0.057101793587207794, -0.022196196019649506, 0.015397931449115276, 0.000050353319238638505, -0.01160502526909113, 0.003725013928487897, -0.007133197970688343, 0.05449473857879639, 0.01092610415071249, 0.018683910369873047, -0.015506559051573277, -0.007975060492753983, 0.005091908387839794, -0.017461851239204407, 0.045985590666532516, 0.01837613247334957, -0.022159986197948456, 0.020548680797219276, -0.050222061574459076, -0.012799927033483982, 0.02536449395120144, -0.04330611601471901, 0.013324959203600883, 0.0010302627924829721, 0.053444672375917435, 0.0194443017244339, 0.013804730027914047, -0.016819139942526817, 0.028623316437005997, 0.020584888756275177, -0.05518271028995514, -0.04786846786737442, 0.007807593327015638, -0.022051358595490456, -0.05485682934522629, -0.002132943831384182, 0.07422871142625809, 0.03689710050821304, 0.00046251501771621406, -0.013343063183128834, 0.02181600034236908, -0.04656493663787842, -0.013958618976175785, -0.035575468093156815, 0.013252540491521358, -0.05822427570819855, 0.029112137854099274, 0.008405043743550777, -0.05894846096634865, -0.02996305376291275, 0.06448845565319061, -0.015769075602293015, 0.015524663962423801, 0.011125254444777966, 0.04388546198606491, 0.04844781383872032, 0.09334713220596313, 0.017932571470737457, 0.01417587324976921, -0.06673341989517212, 0.011098098009824753, -0.011451136320829391, -0.014203030616044998, 0.0776323676109314, -0.028876779600977898, 0.0015173887368291616, 0.035792723298072815, -0.046130429953336716, -0.061193425208330154, 0.05134454369544983, 0.03617291897535324, 0.0007473790319636464, -0.020838353782892227, -0.0785738080739975, -0.037983376532793045, -0.004833918530493975, 0.05235840007662773, 0.050439316779375076, -0.017380381003022194, 0.0014506281586363912, -0.008436726406216621, 0.019100314006209373, 0.024060964584350586, -0.07096988707780838, 0.05844153091311455, 0.024567892774939537, -0.011541659943759441, 0.05145316943526268, -0.0021770738530904055, -0.03387364000082016, 0.008848605677485466, -0.03354775533080101, 0.03135710582137108, 0.011541659943759441, 0.030488085001707077, 0.04374062642455101, -0.05196009948849678, 0.04305265471339226, 0.05601552128791809, -0.06032440811395645, 0.0193356741219759, -0.016529466956853867, 0.024567892774939537, -0.02235913649201393, -0.02755514532327652, 0.005693885497748852, -0.04258193448185921, 0.03439867123961449, 0.03398226574063301, -0.03524958714842796, -0.03237095847725868, 0.03193645179271698, 0.003863061312586069, -0.00921974889934063, 0.02612488530576229, -0.07129577547311783, -0.03863513842225075, 0.006639848928898573, -0.028804361820220947, 0.031230373308062553, -0.0388161838054657, -0.0195891372859478, 0.010654536075890064, 0.0022619389928877354, 0.02134528011083603, 0.013795677572488785, -0.04479069262742996, 0.03226233273744583, -0.03095880337059498, -0.007137724198400974, 0.0069249956868588924, -0.033203769475221634, 0.0820498839020729, -0.008830500766634941, 0.024875670671463013, 0.026830963790416718, 0.010364863090217113, -0.005268428009003401, 0.0033335029147565365, -0.014492703601717949, 0.09515758603811264, 0.007318770047277212, 0.008427674882113934, 0.0013499215710908175, -0.011460188776254654, -0.04848402366042137, -0.05275670066475868, 0.06314872205257416, -0.005227692890912294, -0.06937669217586517, 0.06691446900367737, -0.004238731227815151, -0.003134352620691061, -0.005630519241094589, -0.0011473767226561904, 0.010654536075890064, -0.0025844264309853315, -0.017199335619807243, -0.07397525012493134, 0.025219658389687538, -0.057500094175338745, -0.06394532322883606, 0.05637761205434799, -0.05974506214261055, 0.024839460849761963, 0.06401773542165756, 0.012926658615469933, 0.004603085573762655, -0.00222912454046309, 0.03343912959098816, -0.018629595637321472, -0.029184557497501373, -0.006128394976258278, 0.01679198257625103, -0.048954740166664124, -0.03193645179271698, -0.10551340132951736, -0.013976722955703735, 0.0302889347076416, -0.002566321985796094, -0.05456715449690819, 0.0303613543510437, 0.0034330778289586306, -0.00823305081576109, -0.018756328150629997, -0.031520046293735504, 0.09117458015680313, 0.010699797421693802, -0.009894143790006638, -0.0313752107322216, -0.020186588168144226, -0.005770829971879721, -0.0802394300699234, -0.024676520377397537, 0.04685461148619652, -0.04287160560488701, 0.016230741515755653, -0.030850177630782127, 0.0018455339595675468, -0.013967671431601048, -0.04475448280572891, 0.030089784413576126, 0.037874747067689896, -0.04066285118460655, 0.00009391742787556723, 0.01812266930937767, -0.015578976832330227, 0.030307039618492126, -0.07031812518835068, -0.0198063924908638, 0.026468873023986816, 0.01092610415071249, 0.005435895174741745, 0.05699316784739494, -0.004057685378938913, 0.03390984982252121, 0.031049327924847603, -0.036082394421100616, -0.0011094702640548348, 0.001465338165871799, -0.016230741515755653, 0.004874653648585081, 0.00040706980507820845, -0.026704231277108192, 0.024133384227752686, -0.002797155175358057, 0.025111030787229538, 0.053879182785749435, -0.027573250234127045, -0.004340569023042917, 0.012980972416698933, 0.016457049176096916, -0.011052836664021015, 0.01087179034948349, 0.01843949779868126, 0.03693331032991409, 0.025219658389687538, 0.0605778694152832, 0.016855349764227867, 0.0302889347076416, 0.027355996891856194, 0.05119970813393593, 0.07209237664937973, -0.02389802411198616, -0.024133384227752686, 0.03387364000082016, -0.028605211526155472, -0.06068649888038635, 0.008821448311209679, -0.0030393037013709545, -0.0399748757481575, 0.00529105868190527, -0.0780668780207634, 0.020440053194761276, 0.002312858123332262, -0.0807463526725769, -0.03376501053571701, 0.008681138046085835, 0.0010048033436760306, 0.01668335497379303, -0.003702383255586028, -0.0017052235780283809, -0.08617772161960602, 0.020331425592303276, 0.03222612291574478, 0.030053576454520226, -0.00392869021743536, -0.07531498372554779, 0.0018059302819892764, -0.019317569211125374, -0.017018290236592293, -0.003093617269769311, 0.031954556703567505, 0.046166639775037766, 0.004455985967069864, -0.03249769285321236, 0.004842970985919237, 0.049715131521224976, 0.04294402524828911, -0.0008916497463360429, 0.0199150200933218, 0.004983281251043081, -0.00152757263276726, 0.002512008184567094, -0.029727693647146225, 0.06441603600978851, 0.045695919543504715, 0.01019286923110485, 0.027392204850912094, 0.049497876316308975, 0.007979586720466614, 0.05119970813393593, 0.026794753968715668, 0.013143913820385933, 0.020675411447882652, -0.0010330916848033667, -0.018466655164957047, 0.022630704566836357, 0.02780861034989357, -0.0775599554181099, 0.033674489706754684, 0.0011094702640548348, 0.0008446910651400685, 0.03168298676609993, -0.03304082900285721, 0.0019337937701493502, 0.029619066044688225, -0.004148208070546389, -0.07611158490180969, 0.008223998360335827, -0.028569001704454422, -0.020820248872041702, -0.022992795333266258, 0.0391058586537838, 0.03171919658780098, 0.0304699819535017, -0.06238832697272301, -0.016230741515755653, -0.020259007811546326, -0.018167929723858833, -0.002355856355279684, 0.005834195762872696, -0.053299836814403534, 0.00027482162113301456, -0.018575282767415047, 0.004738869611173868, -0.041495662182569504, -0.053263626992702484, -0.0012593987630680203, 0.07661851495504379, -0.05822427570819855, -0.004689082037657499, 0.013397376984357834, -0.007997690699994564, -0.011387770995497704, 0.019860707223415375, -0.013515057042241096, -0.05058415234088898, -0.030777757987380028, 0.0146194351837039, -0.04370441660284996, -0.019245151430368423, 0.01719028316438198, -0.024676520377397537, -0.02598004974424839, 0.008427674882113934, -0.016954924911260605, 0.07111472636461258, 0.016882505267858505, -0.04681840166449547, 0.006141973193734884, 0.030705340206623077, -0.01610400900244713, 0.0036231759004294872, -0.02813449315726757, -0.015569925308227539, 0.023952338844537735, 0.01826750487089157, -0.02974579855799675, 0.003953584004193544, -0.014130611903965473, -0.0401921309530735, 0.07480806112289429, -0.03820062801241875, -0.0017991410568356514, -0.007205616217106581, -0.015244042500853539, 0.0407714769244194, -0.033276189118623734, -0.05123591423034668, 0.033964160829782486, -0.05829669535160065, 0.02149011753499508, -0.022992795333266258, -0.013216331601142883, -0.00891649816185236, 0.05098245292901993, -0.02138148993253708, -0.00654932577162981, 0.049389250576496124, 0.04692703112959862, 0.008395991288125515, 0.012374469079077244, -0.022232403978705406, 0.04642010107636452, -0.007087936624884605, 0.01747995615005493, 0.00605597672984004, 0.014719010330736637, -0.05590689182281494, 0.01614927127957344, 0.01826750487089157, 0.0817602127790451, 0.009532053023576736, -0.015669500455260277, 0.03262442350387573, -0.061229635030031204, 0.001360105350613594, 0.030795862898230553, -0.010147607885301113, 0.012646038085222244, 0.031592462211847305, 0.019498614594340324, -0.03459782153367996, -0.05648623779416084, 0.01675577461719513, 0.013904305174946785, -0.024748938158154488, 0.004195732530206442, 0.0015524663031101227, -0.01412155944854021, 0.003084565047174692, 0.014166820794343948, 0.025998154655098915, 0.013270645402371883, -0.04642010107636452, -0.04044559597969055, -0.02554553933441639, -0.031230373308062553, -0.0048293923027813435, -0.033493444323539734, -0.00029476493364199996, 0.00817873701453209, 0.0036933310329914093, 0.009332902729511261, -0.0028356274124234915, -0.02637835033237934, -0.020965084433555603, 0.06597302854061127, 0.013931461609899998, -0.06546610593795776, -0.006562904454767704, -0.009622575715184212, 0.03512285277247429, 0.0016429892275482416, 0.025961944833397865, 0.04721670225262642, -0.023952338844537735, -0.021327177062630653, 0.0058251433074474335, 0.0017074866918846965, -0.05822427570819855, 0.03631775453686714, -0.045297618955373764, 0.01951671950519085, -0.03128468617796898, -0.057210423052310944, 0.002315121004357934, -0.020711621269583702, 0.008504618890583515, -0.05141695961356163, 0.01629410684108734, 0.053299836814403534, 0.027211159467697144, 0.02605246752500534, 0.07042675465345383, 0.010419176891446114, -0.03260631859302521, -0.009016072377562523, 0.07368557155132294, -0.03595566377043724, 0.06332976371049881, -0.06231590732932091, -0.010346758179366589, 0.02514723874628544, 0.03521337732672691, 0.05626898631453514, 0.03820062801241875, 0.005865878891199827, -0.01496342197060585, 0.05221356078982353, -0.04645631089806557, 0.028406061232089996, -0.006838999222964048, 0.05518271028995514, 0.019607242196798325, -0.07509773224592209, -0.014700906351208687, 0.008635876700282097, -0.02116423472762108, 0.042437098920345306, -0.02053057588636875, 0.011994273401796818, 0.0406990610063076, -0.017145022749900818, -0.015669500455260277, -0.021128026768565178, -0.015026788227260113, -0.014347867108881474, 0.0298182163387537, 0.0382368378341198, -0.03537631779909134, 0.04316128045320511, -0.05702937766909599, 0.013315906748175621, 0.0395403690636158, -0.0010149871231988072, 0.022992795333266258, 0.008613246493041515, -0.04768742248415947, 0.06666100770235062, 0.006906891241669655, -0.022938482463359833, -0.07502531260251999, -0.05087382346391678, -0.022884169593453407, 0.02737409994006157, -0.00699741393327713, -0.004317938350141048, 0.041966378688812256, 0.057862184941768646, -0.024622207507491112 ]
4,559
optbinning.binning.distributed.base
_check_is_solved
null
def _check_is_solved(self): if not self._is_solved: raise NotSolvedError("This {} instance is not solved yet. Call " "'solve' with appropriate arguments." .format(self.__class__.__name__))
(self)
[ 0.041639961302280426, -0.032036252319812775, -0.013572405092418194, 0.04074409231543541, -0.04690766707062721, -0.026983553543686867, 0.03137330710887909, 0.012640701606869698, 0.05518548935651779, 0.038701511919498444, 0.01077729556709528, -0.025585999712347984, 0.01679753139615059, -0.07883641123771667, -0.08564501255750656, 0.010723544284701347, 0.00813448429107666, 0.004114275332540274, -0.02047955058515072, -0.0429658442735672, -0.046298474073410034, 0.0322154238820076, 0.0036013906355947256, -0.0038029609713703394, 0.02209211327135563, 0.025442659854888916, 0.06564923375844955, 0.0017894969787448645, 0.03984822332859039, 0.0072251781821250916, -0.06489670276641846, 0.07041525095701218, 0.014871413819491863, 0.02332841046154499, 0.018150292336940765, 0.04536677151918411, 0.033881738781929016, -0.03719645366072655, 0.014898289926350117, 0.0022900633048266172, -0.0007228537579067051, 0.00033651053672656417, -0.010866883210837841, -0.010329362004995346, -0.03108663111925125, -0.06944771111011505, -0.022755054756999016, 0.07152612507343292, -0.002245269948616624, -0.01602708362042904, 0.03923903405666351, -0.04859189689159393, 0.03332630172371864, 0.00261817523278296, 0.00658015301451087, 0.05862562358379364, 0.028022760525345802, 0.07639965415000916, 0.022378791123628616, -0.06966271996498108, -0.006136698182672262, 0.030567027628421783, 0.028434861451387405, -0.024976808577775955, 0.01832946576178074, 0.04482924938201904, 0.019744938239455223, -0.02232503890991211, -0.020622888579964638, 0.06131322681903839, -0.0006248681456781924, 0.005643970333039761, -0.06052486225962639, 0.019673269242048264, 0.01626896858215332, 0.0030414729844778776, 0.0018197324825450778, -0.019386591389775276, 0.02185918763279915, 0.008963163010776043, -0.02255796454846859, -0.023274658247828484, -0.04422006011009216, -0.03386382386088371, -0.018006952479481697, -0.050992824137210846, 0.03443717956542969, -0.02863195165991783, 0.015973331406712532, -0.04805437847971916, -0.0310687143355608, 0.011341692879796028, -0.005643970333039761, -0.017388803884387016, 0.02431386709213257, 0.04120994359254837, 0.05572301149368286, -0.09446035325527191, -0.09080521017313004, -0.03174957260489464, -0.015937497839331627, 0.06762014329433441, -0.02692980132997036, -0.0028376628179103136, 0.033415887504816055, -0.024510957300662994, -0.004060523118823767, -0.08327992260456085, -0.006288995500653982, -0.02786150574684143, -0.02786150574684143, 0.0529637336730957, -0.05618886277079582, 0.05056280642747879, -0.009343906305730343, -0.0667242705821991, 0.003984374459832907, 0.023955518379807472, -0.07331786304712296, 0.0049138376489281654, 0.013885959051549435, 0.031659986823797226, -0.04443506896495819, -0.02662520669400692, 0.029169471934437752, 0.003216167213395238, -0.028829041868448257, 0.013366355560719967, 0.05930648371577263, -0.08256322145462036, 0.019081994891166687, -0.032340846955776215, -0.029097802937030792, 0.02823776938021183, -0.04995361715555191, 0.05737140774726868, -0.008568980731070042, -0.018992409110069275, -0.04332419112324715, -0.013733661733567715, 0.023686759173870087, 0.011592536233365536, -0.04551010951399803, -0.02676854468882084, 0.03069244883954525, 0.05826727673411369, -0.033810071647167206, 0.04149661958217621, 0.011234188452363014, -0.002860059728845954, 0.03260960802435875, -0.07034358382225037, 0.000037444497138494626, 0.02601601555943489, -0.08098649978637695, -0.035118039697408676, 0.024887222796678543, -0.02101707085967064, -0.017863614484667778, -0.012999049387872219, -0.02891862951219082, -0.004748102277517319, 0.004994465969502926, 0.005769392009824514, -0.022593799978494644, -0.010150188580155373, -0.055436331778764725, -0.049846112728118896, -0.015202885493636131, 0.08485664427280426, -0.04006323218345642, -0.001458025653846562, -0.09603708237409592, 0.02019287273287773, 0.019135747104883194, 0.017164837568998337, 0.03312921151518822, -0.02402718923985958, 0.007641756907105446, -0.04970277473330498, 0.008855658583343029, -0.04640597850084305, -0.048161882907152176, 0.0023695717100054026, -0.000941781559959054, 0.07575462758541107, -0.01354552898555994, -0.018974490463733673, -0.025603916496038437, -0.007798533886671066, -0.039489876478910446, 0.01062499824911356, 0.039704885333776474, 0.00264729093760252, 0.0010907197138294578, 0.021536674350500107, 0.011628370732069016, 0.030943291261792183, -0.002145604696124792, 0.026517702266573906, 0.01788153126835823, -0.04095910117030144, -0.005872416775673628, -0.005366251338273287, -0.035942237824201584, 0.042392488569021225, -0.056511372327804565, -0.02585476078093052, 0.048842739313840866, -0.009290154092013836, -0.06428751349449158, -0.024672213941812515, -0.035709310322999954, 0.03207208588719368, 0.04769602790474892, 0.015552273951470852, 0.08112983405590057, -0.04787520319223404, 0.002414365066215396, 0.04841272532939911, 0.042858339846134186, -0.006642863620072603, -0.016233133152127266, -0.031104547902941704, -0.03054910898208618, 0.004694350063800812, -0.021160410717129707, 0.0844266340136528, 0.002324778353795409, -0.048233550041913986, 0.013733661733567715, 0.0010246493620797992, -0.05231871083378792, -0.035028450191020966, 0.03167790547013283, 0.03099704347550869, 0.0004336562706157565, 0.005007904022932053, -0.004188184626400471, -0.00939765851944685, -0.025693504139780998, -0.04271500185132027, -0.04203414171934128, -0.0038768702652305365, -0.01580311730504036, -0.02270130254328251, -0.003699936205521226, 0.007350599393248558, -0.02370467595756054, 0.00412547355517745, 0.03615724667906761, -0.007202781271189451, -0.020819980651140213, -0.05572301149368286, -0.003148977179080248, -0.10915260016918182, 0.016833364963531494, 0.009854551404714584, 0.03995572775602341, 0.013975545763969421, -0.021912939846515656, 0.06392916291952133, 0.018069664016366005, 0.050992824137210846, -0.06736929714679718, 0.02225336991250515, -0.02839902602136135, 0.0017816581530496478, 0.019834524020552635, -0.005818664561957121, 0.12907670438289642, -0.024421369656920433, -0.016215216368436813, 0.03895235434174538, 0.03192874789237976, -0.010418948717415333, -0.0002686205261852592, 0.05070614814758301, -0.03255585581064224, 0.02393760159611702, 0.04855606332421303, 0.03927486762404442, 0.04887857660651207, -0.01594645529985428, -0.02624894119799137, -0.015202885493636131, -0.027969008311629295, 0.04809021204710007, 0.0031960103660821915, -0.006047111004590988, -0.014584735967218876, -0.002082893857732415, 0.08715006709098816, -0.010069560259580612, 0.009908303618431091, 0.04210581257939339, -0.02323882468044758, 0.03461635112762451, -0.023615088313817978, 0.008380847983062267, -0.01469224039465189, 0.014450356364250183, -0.09266862273216248, -0.01727234199643135, 0.004477101843804121, -0.031337473541498184, 0.027664413675665855, 0.03252001851797104, 0.04214164614677429, -0.006987772881984711, 0.011019180528819561, 0.008345013484358788, 0.022127946838736534, 0.020300377160310745, 0.08120150864124298, 0.017048373818397522, 0.007874682545661926, -0.03330838307738304, -0.018669895827770233, 0.036551427096128464, -0.04819771647453308, 0.049846112728118896, 0.00009637583571020514, -0.015686653554439545, 0.001483781961724162, 0.019135747104883194, 0.027986926957964897, -0.013877000659704208, -0.012067345902323723, 0.008452517911791801, 0.010866883210837841, -0.05439712479710579, 0.0049138376489281654, -0.023202989250421524, 0.01587478630244732, -0.02064080536365509, 0.03053119219839573, -0.011404403485357761, 0.05002528801560402, 0.0008589137578383088, 0.05798059701919556, -0.0107414610683918, -0.0080538559705019, -0.029366564005613327, 0.04336002841591835, 0.013832206837832928, -0.037948980927467346, -0.026840215548872948, 0.00263833231292665, -0.035942237824201584, -0.11868463456630707, -0.00045969244092702866, 0.010105394758284092, 0.010051642544567585, -0.04511592909693718, 0.044685911387205124, 0.052139535546302795, 0.015140174888074398, 0.0070370458997786045, -0.009899345226585865, -0.019601598381996155, -0.02332841046154499, -0.015471645630896091, 0.004553250968456268, -0.08241988718509674, -0.008537624962627888, -0.0012542156036943197, -0.08349493145942688, 0.007838848046958447, 0.02662520669400692, -0.0360676571726799, -0.027503157034516335, -0.014199513010680676, -0.03508220240473747, 0.008345013484358788, 0.05425378680229187, 0.015462687239050865, 0.042392488569021225, 0.005034780129790306, -0.054898809641599655, 0.047015171498060226, -0.0345267653465271, -0.05665471404790878, -0.014745992608368397, 0.009487245231866837, -0.0352792963385582, -0.0005767152179032564, 0.01350969448685646, 0.06758430600166321, -0.009334947913885117, -0.017514225095510483, -0.06131322681903839, 0.041639961302280426, 0.008913889527320862, -0.0037716056685894728, -0.01833842508494854, 0.042786672711372375, 0.011520866304636002, -0.01672586239874363, -0.00020954919455107301, 0.0031310596968978643, 0.044076722115278244, 0.013859082944691181, 0.01856239140033722, 0.0032228862401098013, 0.03662309795618057, -0.011502949520945549, 0.04027824103832245, 0.011359610594809055, -0.007216219324618578, -0.05145867541432381, -0.018275713548064232, 0.023883849382400513, -0.05468380078673363, -0.07833472639322281, 0.051673684269189835, -0.009720170870423317, 0.0074088312685489655, 0.02676854468882084, -0.007296847645193338, 0.02632061205804348, 0.024905139580368996, 0.04006323218345642, 0.006087425164878368, -0.04196247085928917, 0.012515280395746231, -0.0383789986371994, 0.010150188580155373, 0.03547638654708862, 0.0063337888568639755, -0.02847069501876831, 0.05500631406903267, 0.08177486062049866, -0.010607080534100533, -0.033648815006017685, -0.027055222541093826, -0.026732711121439934, -0.01849072240293026, -0.05823143944144249, 0.03053119219839573, 0.0468001626431942, 0.018974490463733673, -0.013796372339129448, 0.04941609501838684, 0.06787098199129105, 0.019386591389775276, 0.05518548935651779, 0.003366225166246295, -0.023382162675261497, 0.016134588047862053, -0.0314808115363121, -0.02624894119799137, -0.02447512187063694, -0.0032228862401098013, -0.016931911930441856, 0.008949724957346916, -0.02064080536365509, -0.016331680119037628, -0.025836842134594917, 0.009675377979874611, -0.029402397572994232, 0.024063022807240486, -0.008031459525227547, 0.014978918246924877, -0.006884748116135597, -0.02730606682598591, -0.04181913286447525, -0.022002525627613068, 0.007032566238194704, -0.005590218119323254, 0.04045741260051727, -0.013948669657111168, 0.032502103596925735, -0.06400083005428314, -0.022970063611865044, -0.02386593259871006, 0.013151346705853939, 0.06185074895620346, 0.002120968187227845, 0.0065532769076526165, -0.004416631069034338, 0.025818925350904465, 0.020658724009990692, -0.022522129118442535, 0.022342955693602562, -0.05729973688721657, -0.044614244252443314, -0.05769392102956772, -0.004492779728025198, -0.03244835138320923, 0.0022788650821894407, -0.03422217071056366, -0.001555451424792409, 0.047839369624853134, 0.004539812915027142, -0.027951091527938843, -0.05801643431186676, 0.012739247642457485, 0.015579150058329105, -0.014754951000213623, 0.00013487017713487148, 0.014360769651830196, -0.003599151037633419, 0.04321668669581413, 0.0645025223493576, -0.09388700127601624, -0.01453994307667017, 0.031642068177461624, 0.02248629555106163, 0.025836842134594917, 0.013438024558126926, -0.0188132356852293, 0.009540997445583344, -0.000028013382689096034, 0.10026558488607407, 0.012667577713727951, -0.03329046815633774, -0.060739871114492416, 0.02124999649822712, 0.01066979207098484, 0.019888276234269142, -0.0030907457694411278, 0.06120572239160538, 0.006194929592311382, -0.030029505491256714, 0.007753740530461073, -0.009084104560315609, -0.02517390064895153, -0.01789049059152603, -0.010015808045864105, 0.05647553876042366, -0.05249788239598274, 0.0038858288899064064, 0.020837897434830666, -0.01603604294359684, 0.057443078607320786, 0.0330037884414196, -0.04826938360929489, -0.0736045390367508, -0.0019160383380949497, -0.029133638367056847, 0.024887222796678543, -0.0022385509219020605, -0.014513066969811916, 0.042535826563835144, 0.0012497362913563848, -0.024797635152935982, 0.02180543541908264, -0.025120148435235023, -0.017066292464733124, 0.0138142891228199, 0.06199408695101738, 0.056511372327804565, -0.04576095566153526, 0.07639965415000916, 0.019619517028331757, 0.02255796454846859, 0.038486503064632416, 0.028882794082164764, 0.026374364271759987, 0.035798899829387665, -0.040779925882816315, 0.08299323916435242, -0.031337473541498184, -0.05339375138282776, -0.038092322647571564, 0.033415887504816055, 0.01635855622589588, 0.069017693400383, 0.018849069252610207, 0.040170736610889435, -0.018669895827770233, -0.009084104560315609, 0.0039597381837666035, 0.04586846008896828, -0.039776552468538284, -0.01824883744120598, 0.04895024374127388, -0.0421774797141552, -0.012112139724195004, 0.04006323218345642, -0.07919476181268692, -0.02709105797111988, -0.0074088312685489655, -0.014396604150533676, 0.017523184418678284, -0.03178540989756584, 0.024349700659513474, -0.015668736770749092, 0.06023818626999855, -0.013850124552845955, 0.05694139003753662, 0.013052801601588726, 0.005420003551989794, 0.04712267220020294, 0.03852233663201332, 0.032806698232889175, -0.0023202989250421524, 0.0376264713704586, -0.03578098118305206, -0.0210887398570776, 0.008573459461331367, -0.014020339585840702, -0.006974334828555584, 0.013088636100292206, 0.0038634322118014097, -0.03558389097452164, 0.022504212334752083, 0.0032833574805408716, -0.023686759173870087, 0.023453833535313606, -0.015507481060922146, 0.03214375674724579, -0.05798059701919556, -0.06744096428155899, -0.0237763449549675, -0.006804119795560837, 0.02447512187063694, -0.015749365091323853, 0.0613848976790905, 0.019314920529723167, 0.003679779125377536, 0.02402718923985958, -0.026750627905130386, -0.029975753277540207, 0.0043158456683158875, 0.03284253180027008, -0.007014648988842964, -0.06572090089321136, -0.015570191666483879, 0.04214164614677429, 0.03628266602754593, -0.0360855758190155, -0.007493938319385052, -0.021393336355686188, 0.021751683205366135, 0.018992409110069275, 0.032806698232889175, 0.009424534626305103, 0.04199830815196037, -0.0210887398570776, -0.00813448429107666, -0.057443078607320786, 0.06468169391155243, -0.004306886810809374, -0.00897660106420517, -0.02047955058515072, -0.04862773418426514, -0.008676485158503056, 0.022826725617051125, -0.007090797647833824, 0.016600439324975014, -0.025120148435235023, -0.07041525095701218, 0.023131320253014565, -0.054432958364486694, 0.027521075680851936, -0.060274019837379456, 0.007516335230320692, 0.0038947875145822763, 0.030029505491256714, -0.0003698256332427263, -0.02209211327135563, -0.054432958364486694, 0.06056069955229759, 0.07424956560134888, -0.02839902602136135, 0.04576095566153526, 0.01170004066079855, 0.03647975996136665, -0.02017495408654213, -0.047624360769987106, -0.00963058415800333, 0.030334101989865303, -0.012828834354877472, 0.009764964692294598, -0.012819875963032246, 0.005142284091562033, -0.022898394614458084, 0.0026450513396412134, 0.00936182402074337, 0.01564186066389084, -0.02924114279448986, 0.013008007779717445, -0.025281403213739395, -0.0012564553180709481, -0.022970063611865044, -0.01587478630244732, 0.07152612507343292, -0.031176216900348663, -0.05540049821138382, 0.01833842508494854, 0.0180248711258173, 0.06844434142112732, 0.04862773418426514, -0.08277823030948639, -0.07955310493707657, -0.009845593012869358, -0.012327148579061031, -0.0010532052256166935, 0.0698060616850853, 0.0010520853102207184, 0.048233550041913986, 0.021465005353093147, -0.0011915048817172647, 0.0022094352170825005, -0.06321246922016144, 0.014629529789090157, -0.0176396481692791, -0.03207208588719368, -0.006239722948521376, -0.0360497422516346, 0.015113298781216145, -0.041926637291908264, 0.047015171498060226, 0.005738036707043648, 0.04626264050602913, -0.018383217975497246, 0.030799953266978264, -0.0035319607704877853, -0.005693243350833654, -0.0322333425283432, -0.03493886440992355, -0.04199830815196037, -0.01909991353750229, 0.019314920529723167, -0.038486503064632416, -0.10377738624811172, 0.02854236401617527, 0.045008424669504166, 0.010320402681827545, 0.004878003150224686, -0.06837267428636551, -0.001628240686841309, -0.009540997445583344, -0.040099065750837326, 0.00020842936646658927, 0.11553117632865906, -0.00828678160905838, 0.040242403745651245, 0.033792153000831604, -0.05271289125084877, 0.079839788377285, -0.036730602383613586, 0.013536570593714714, 0.02078414522111416, -0.019601598381996155, -0.0003488287329673767, -0.029581572860479355, 0.020085368305444717, 0.05615302547812462, 0.030441606417298317, 0.07697300612926483, 0.004806333687156439, 0.039489876478910446, -0.005187077447772026, -0.05737140774726868, 0.03237668052315712, -0.0008908290765248239, -0.006082945968955755, -0.004734664224088192, 0.0009149055113084614, 0.043933384120464325, 0.05203203111886978, -0.03558389097452164, -0.009155774489045143, -0.06084737554192543, 0.048771072179079056 ]
4,570
optbinning.binning.distributed.binning_process_sketch
add
Add new data X, y to the binning sketch of each variable. Parameters ---------- X : pandas.DataFrame, shape (n_samples, n_features) y : array-like of shape (n_samples,) Target vector relative to x. check_input : bool (default=False) Whether to check input arrays. Returns ------- self : BinningProcessSketch Binning process with new data.
def add(self, X, y, check_input=False): """Add new data X, y to the binning sketch of each variable. Parameters ---------- X : pandas.DataFrame, shape (n_samples, n_features) y : array-like of shape (n_samples,) Target vector relative to x. check_input : bool (default=False) Whether to check input arrays. Returns ------- self : BinningProcessSketch Binning process with new data. """ if not self._is_started: self._n_samples = 0 self._n_variables = len(self.variable_names) if self.categorical_variables is not None: self._n_categorical = len(self.categorical_variables) else: self._n_categorical = 0 self._n_numerical = self._n_variables - self._n_categorical # Check selection criteria if self.selection_criteria is not None: _check_selection_criteria(self.selection_criteria, self._target_dtype) # Initialize bsketch for each variable. To avoid mixed dtypes # the user must provide a dtype for all variables. This differs # from the BinningProcess, where dtypes are inferred. for name in self.variable_names: if (self.categorical_variables is not None and name in self.categorical_variables): dtype = "categorical" else: dtype = "numerical" optb = OptimalBinningSketch( name=name, dtype=dtype, max_n_prebins=self.max_n_prebins, min_n_bins=self.min_n_bins, max_n_bins=self.max_n_bins, min_bin_size=self.min_bin_size, max_pvalue=self.max_pvalue, max_pvalue_policy=self.max_pvalue_policy, special_codes=self.special_codes, split_digits=self.split_digits) if self.binning_fit_params is not None: params = self.binning_fit_params.get(name, {}) else: params = {} optb.set_params(**params) self._variable_dtypes[name] = dtype self._binned_variables[name] = optb self._is_started = True # Add new data stream time_add = time.perf_counter() # Add data to variables that appear in X. During training the # data columns might change, for example, not all data sources # contain the same variables. for name in X.columns: if name in self.variable_names: if self.verbose: logger.info("Add variable: {}.".format(name)) self._binned_variables[name].add(X[name], y, check_input) # Update count samples and addition operations self._n_samples += X.shape[0] self._n_add += 1 self._time_streaming_add += time.perf_counter() - time_add if self.verbose: logger.info("Sketch: added new data.") return self
(self, X, y, check_input=False)
[ 0.00850378256291151, -0.03112923353910446, -0.05229249224066734, 0.0397869311273098, -0.0234335009008646, 0.005752559285610914, -0.07164725661277771, 0.0318218469619751, -0.010533532127737999, -0.043019138276576996, -0.03967149555683136, 0.010745164938271046, -0.0010563593823462725, 0.009076152928173542, -0.012284310534596443, -0.0006282842950895429, 0.02133641391992569, -0.0063104997389018536, -0.0378822386264801, 0.006416316144168377, -0.015872444957494736, 0.026781145483255386, -0.016776693984866142, 0.08827003836631775, 0.01346752978861332, 0.031552497297525406, 0.00869617611169815, -0.004718445241451263, -0.054216425865888596, 0.03990236669778824, -0.02649255469441414, -0.03944062069058418, -0.0038815343286842108, -0.03357262909412384, 0.04194173589348793, -0.003792552510276437, 0.0442119762301445, 0.06841505318880081, -0.008787563070654869, 0.020355209708213806, 0.042364999651908875, -0.08796221017837524, 0.03509253263473511, 0.07584143429994583, -0.006074817851185799, 0.009547516703605652, -0.048290714621543884, 0.05029160529375076, -0.051715314388275146, -0.010966417379677296, -0.011437780223786831, -0.0716087818145752, 0.037651363760232925, 0.046405259519815445, -0.02985943667590618, 0.02333730459213257, 0.04555872827768326, -0.0038117917720228434, 0.0061469655483961105, 0.0465591736137867, 0.03187956660985947, 0.043750230222940445, 0.04321153089404106, -0.05071486905217171, 0.0031720842234790325, 0.0011369240237399936, -0.09927493333816528, 0.005834326148033142, 0.02841648831963539, 0.03926746919751167, 0.03663168102502823, 0.017305776476860046, 0.045135464519262314, 0.05487056449055672, -0.046905480325222015, -0.013794598169624805, 0.0005976216052658856, -0.0033740971703082323, -0.001483833184465766, -0.012149635702371597, 0.08565349131822586, 0.04975290223956108, -0.024145357310771942, -0.04251891374588013, 0.010244942270219326, 0.025799939408898354, 0.009605234488844872, 0.09881319105625153, 0.022202184423804283, -0.05513991415500641, 0.005007035098969936, 0.03264914080500603, 0.04709787666797638, 0.11004895716905594, 0.06287412345409393, -0.08788525313138962, -0.04140303283929825, -0.007007925305515528, -0.028378009796142578, 0.002193283289670944, -0.07730361819267273, -0.014237103052437305, 0.032225873321294785, 0.04340392351150513, -0.009581184946000576, -0.008282531052827835, 0.016651637852191925, -0.019258568063378334, -0.04232652112841606, -0.03484242409467697, 0.006127725820988417, 0.014977816492319107, -0.028166376054286957, 0.006055578589439392, -0.06760700047016144, -0.005478398874402046, -0.02289479970932007, 0.028012461960315704, -0.06433631479740143, 0.04748266190290451, -0.020682277157902718, 0.043019138276576996, -0.014823902398347855, -0.0014970601769164205, -0.02366437390446663, -0.011976481415331364, 0.05556317791342735, 0.02299099788069725, 0.009143490344285965, -0.0645671859383583, 0.03490014001727104, -0.03784376010298729, -0.03932518512010574, 0.07357119023799896, -0.017815617844462395, -0.03955605998635292, 0.024953408166766167, 0.015266407281160355, -0.018537092953920364, -0.02514580264687538, 0.07330183684825897, -0.016257232055068016, 0.03020574524998665, 0.0010774023830890656, 0.012544041499495506, 0.044404368847608566, -0.003924822900444269, -0.027800828218460083, -0.01238050777465105, -0.015814727172255516, -0.051946185529232025, -0.018161926418542862, 0.0017892575124278665, -0.015468419529497623, -0.0015030725626274943, 0.027512239292263985, -0.012861491180956364, -0.02006661891937256, 0.011235767975449562, -0.048406150192022324, -0.025780700147151947, 0.0025251617189496756, -0.0045188372023403645, -0.004639083053916693, -0.052715759724378586, 0.05802581459283829, -0.05163835734128952, 0.030167266726493835, 0.0037949574179947376, 0.023125672712922096, 0.05625579506158829, -0.0353618860244751, 0.011052994057536125, 0.05725624039769173, -0.0474441833794117, 0.027223648503422737, 0.017382733523845673, -0.03888268023729324, 0.030013352632522583, 0.032341308891773224, 0.010485433973371983, 0.009177159518003464, -0.010850980877876282, -0.07549512386322021, -0.03357262909412384, -0.013082742691040039, 0.020412927493453026, -0.022567732259631157, 0.04875245690345764, 0.052061621099710464, 0.01972031034529209, -0.01977802999317646, 0.01656506210565567, 0.01243822555989027, 0.0013515627942979336, 0.02222142368555069, -0.005680411588400602, 0.044519804418087006, -0.019095033407211304, -0.012197733856737614, 0.06095018982887268, -0.024722537025809288, 0.01872948557138443, -0.017161481082439423, -0.00845087505877018, -0.03722810000181198, -0.05329293757677078, 0.06110410764813423, 0.000254770799074322, -0.029128342866897583, 0.04482763260602951, -0.04055650532245636, 0.018700627610087395, 0.06391304731369019, 0.05263880267739296, -0.0299171544611454, 0.02183663658797741, -0.051176611334085464, -0.005641933064907789, -0.02327958680689335, 0.04459676146507263, 0.012669097632169724, -0.03461155295372009, 0.04217260703444481, -0.012447845190763474, -0.02183663658797741, 0.026473315432667732, 0.013852315954864025, 0.0483291931450367, -0.044250454753637314, 0.023856766521930695, -0.0022990996949374676, -0.05390859767794609, 0.0003643447707872838, -0.008248861879110336, 0.03701646625995636, -0.0008296960149891675, 0.011264626868069172, -0.021855875849723816, -0.03085988201200962, -0.009908254258334637, -0.0069983056746423244, 0.017805997282266617, -0.07472555339336395, -0.04605895280838013, 0.004357707686722279, 0.02908986434340477, 0.05548622086644173, -0.021913595497608185, 0.025184281170368195, 0.02366437390446663, -0.017594365403056145, 0.007652442902326584, -0.006863630376756191, 0.007080072537064552, -0.0029893105383962393, -0.023760570213198662, -0.015304885804653168, 0.001245746505446732, -0.004162909463047981, 0.0033380233217030764, 0.05348533019423485, 0.02006661891937256, 0.0707237720489502, -0.05575557425618172, 0.010312279686331749, -0.0068876794539391994, 0.007349423132836819, -0.002592499367892742, -0.011274246498942375, -0.044404368847608566, -0.001132715493440628, 0.028512684628367424, -0.012072678655385971, -0.02095162868499756, -0.01912389136850834, 0.0037083805073052645, 0.016257232055068016, 0.01238050777465105, -0.003530416637659073, 0.05529382824897766, 0.021182499825954437, 0.027223648503422737, -0.031552497297525406, -0.05013768747448921, -0.002121135825291276, -0.018421657383441925, 0.004788187798112631, -0.022375337779521942, -0.06287412345409393, -0.05625579506158829, 0.02193283475935459, 0.07033898681402206, 0.07738057523965836, -0.014833522029221058, 0.03214891627430916, -0.02554982714354992, 0.005449539516121149, -0.021759679540991783, -0.02543439157307148, 0.018710246309638023, 0.004244676791131496, -0.014150525443255901, 0.011639793403446674, -0.047905925661325455, -0.08234432339668274, 0.07241683453321457, -0.04013323783874512, -0.02099010720849037, -0.03563123568892479, 0.03643928840756416, 0.031206190586090088, 0.11066461354494095, 0.017353873699903488, -0.022125227376818657, -0.06006518378853798, -0.0013599799713119864, 0.011235767975449562, -0.036920271813869476, 0.056332752108573914, -0.021259456872940063, -0.03445763513445854, 0.007825596258044243, -0.011543597094714642, -0.06533675640821457, 0.053446851670742035, 0.06044996902346611, -0.012861491180956364, -0.03722810000181198, -0.018354319036006927, -0.013573345728218555, -0.009581184946000576, 0.047675054520368576, 0.07841949909925461, 0.006219112779945135, -0.020566841587424278, -0.01578586921095848, -0.016555441543459892, 0.022529253736138344, -0.019931944087147713, 0.002628573216497898, 0.0636436939239502, -0.0322643518447876, 0.02470329776406288, 0.017940673977136612, -0.0636436939239502, 0.0015187044627964497, -0.015333744697272778, 0.03118695132434368, 0.038767244666814804, 0.01556461676955223, 0.033668823540210724, -0.08673088997602463, 0.005151330027729273, 0.08319085091352463, -0.03555427864193916, 0.002062215469777584, -0.006632758304476738, 0.0234335009008646, -0.03030194155871868, -0.03518873080611229, 0.02022053301334381, 0.0016521773068234324, 0.054716650396585464, -0.0003111360128968954, -0.008176714181900024, -0.04809832200407982, 0.027127452194690704, -0.03445763513445854, -0.015247167088091373, 0.010148745961487293, -0.05109965428709984, -0.0067626237869262695, 0.03370730206370354, 0.007176269311457872, 0.045289378613233566, -0.016757454723119736, -0.005997860338538885, 0.039036598056554794, 0.0002299700863659382, 0.0299171544611454, 0.017911814153194427, -0.057371675968170166, 0.007955461740493774, 0.020201293751597404, 0.007118551526218653, -0.03236055001616478, -0.04309609532356262, 0.06495197117328644, -0.011139570735394955, 0.05348533019423485, 0.0393444262444973, 0.010658587329089642, 0.008388346992433071, -0.04959898814558983, -0.04713635519146919, 0.05741015449166298, 0.012515182606875896, 0.006902108900249004, 0.004398591350764036, 0.008840471506118774, -0.04090281203389168, -0.02360665611922741, 0.036766357719898224, -0.04094129055738449, -0.05059943348169327, -0.004930077586323023, -0.03228359296917915, -0.039152033627033234, -0.019383622333407402, -0.003900773823261261, -0.00501665472984314, 0.012063059024512768, 0.026300162076950073, -0.03786299750208855, 0.0321296788752079, -0.017575126141309738, -0.05175379291176796, 0.05664058029651642, -0.009994830936193466, 0.030494334176182747, 0.07753448933362961, -0.0019143131794407964, 0.04101824760437012, -0.017546266317367554, 0.03136010468006134, -0.030725207179784775, 0.0015126921935006976, -0.0007767878705635667, 0.014044709503650665, -0.038767244666814804, -0.02841648831963539, -0.0616043284535408, 0.0019960803911089897, -0.04259587079286575, -0.02104782499372959, -0.01324627734720707, -0.024472424760460854, 0.03849789500236511, 0.009422460570931435, -0.02060532011091709, -0.025299716740846634, 0.05390859767794609, 0.012072678655385971, -0.07768840342760086, -0.04205717146396637, -0.05852603539824486, -0.007695731241255999, -0.05240792781114578, -0.0020489883609116077, 0.06941549479961395, -0.030494334176182747, 0.042018692940473557, 0.018354319036006927, -0.01069706678390503, -0.03484242409467697, -0.041864778846502304, -0.054601214826107025, 0.031552497297525406, -0.014083188027143478, -0.01700756512582302, 0.0018000795971602201, -0.028570402413606644, 0.044135019183158875, -0.04028715193271637, -0.055986445397138596, 0.02726212702691555, -0.006690476555377245, -0.0016617969376966357, 0.05525534972548485, 0.014044709503650665, -0.000676382624078542, 0.018969977274537086, -0.037208858877420425, 0.04178782179951668, 0.007873695343732834, -0.00839315727353096, 0.009210828691720963, -0.009177159518003464, -0.05279271677136421, 0.005233097355812788, 0.0028834943659603596, -0.03653548285365105, 0.027281366288661957, -0.02227914147078991, 0.025588305667042732, 0.03838245943188667, 0.016555441543459892, 0.014179384335875511, 0.003960896749049425, 0.017719421535730362, 0.025915374979376793, 0.004877169616520405, -0.0007353030960075557, -0.012140016071498394, 0.008652888238430023, 0.03309164568781853, -0.0013635873328894377, 0.07049290090799332, -0.014862380921840668, -0.018354319036006927, 0.052600324153900146, -0.02133641391992569, -0.01922008953988552, 0.007638013456016779, 0.004925267770886421, -0.04340392351150513, 0.0338996946811676, -0.09827448427677155, 0.04078737646341324, -0.05225401371717453, -0.08249823749065399, -0.0036482575815171003, 0.02581917867064476, 0.04448132589459419, 0.010273801162838936, 0.010331518948078156, 0.014044709503650665, -0.05583253130316734, -0.01545879989862442, -0.006060388404875994, 0.07183965295553207, 0.022067509591579437, -0.05802581459283829, 0.007618773728609085, 0.03630461171269417, -0.05279271677136421, -0.04521242156624794, -0.01912389136850834, 0.048790935426950455, 0.016930608078837395, -0.0069261579774320126, 0.04348088055849075, 0.029840197414159775, 0.043788712471723557, 0.002657432109117508, 0.04536633566021919, -0.018104208633303642, -0.016882510855793953, -0.051561400294303894, 0.0043937815353274345, 0.0250496044754982, 0.05102269724011421, 0.015718530863523483, -0.023298826068639755, 0.07826558500528336, 0.033880457282066345, 0.03922899067401886, 0.01274605467915535, -0.006714525632560253, -0.028185615316033363, 0.02626168355345726, -0.0018602025229483843, 0.07672644406557083, 0.06695286184549332, -0.09219486266374588, 0.016834411770105362, 0.02747376076877117, 0.0013407407095655799, 0.00994673278182745, -0.06018061935901642, -0.031109994277358055, -0.01799839176237583, -0.02887823060154915, -0.04713635519146919, -0.01271719578653574, -0.034707747399806976, -0.04852158576250076, 0.008417205885052681, -0.02631940133869648, 0.03884420171380043, 0.043365444988012314, -0.07033898681402206, -0.05075334757566452, -0.033668823540210724, 0.0070945024490356445, -0.03805539011955261, 0.010187224484980106, -0.06464414298534393, -0.010283420793712139, -0.05348533019423485, 0.01861405000090599, -0.017046045511960983, -0.0362468957901001, 0.00870098639279604, 0.017142241820693016, -0.0739559754729271, -0.03241826966404915, 0.019633734598755836, 0.020797712728381157, -0.0007371067767962813, -0.001028101542033255, -0.007089692167937756, -0.0389019213616848, -0.027608435600996017, 0.038036152720451355, -0.0321296788752079, -0.016112936660647392, 0.04209564998745918, -0.02443394623696804, 0.007017544936388731, 0.03328403830528259, -0.018133066594600677, 0.02122097834944725, -0.00994673278182745, -0.016661258414387703, -0.057217761874198914, 0.026011571288108826, -0.03963301703333855, -0.02932073548436165, -0.00102509546559304, 0.007267656270414591, 0.03030194155871868, 0.026781145483255386, -0.04932963848114014, -0.006296070292592049, -0.011004895903170109, -0.02260621078312397, 0.04732874780893326, 0.023760570213198662, 0.004759328905493021, -0.010985656641423702, 0.01950867846608162, 0.008272911421954632, -0.027300607413053513, -0.05302358791232109, 0.005843945778906345, -0.04571264237165451, 0.02054760232567787, 0.0010743961902335286, -0.02399144135415554, -0.01800801046192646, 0.052061621099710464, -0.01894111931324005, 0.06649111956357956, 0.012842251919209957, 0.017642464488744736, 0.022067509591579437, -0.003602564102038741, -0.026454076170921326, 0.04675156623125076, -0.0024866831954568624, 0.009287785738706589, -0.004477953538298607, 0.04494307190179825, -0.058756906539201736, 0.006074817851185799, 0.00573331955820322, 0.05529382824897766, 0.017873335629701614, -0.03357262909412384, -0.047675054520368576, -0.07137791067361832, 0.01640152744948864, 0.06776091456413269, 0.028166376054286957, 0.014092807658016682, 0.0509842187166214, -0.0021776515059173107, -0.03851713612675667, -0.054447297006845474, 0.040633462369441986, 0.0018938713474199176, -0.03207195922732353, -0.04882941395044327, 0.03068672865629196, -0.002297897357493639, -0.004930077586323023, 0.018315840512514114, 0.04109520465135574, -0.028127897530794144, -0.05367772653698921, -0.08911656588315964, -0.017363494262099266, -0.012014959938824177, -0.04625134542584419, -0.05564013496041298, -0.03020574524998665, -0.016718976199626923, -0.009422460570931435, 0.0014369373675435781, -0.041749343276023865, 0.008340248838067055, -0.015410701744258404, 0.04986833781003952, 0.026531033217906952, -0.0029893105383962393, -0.016305331140756607, 0.001391243888065219, 0.015295266173779964, -0.014593030326068401, 0.04648221656680107, 0.055717095732688904, 0.010976037010550499, -0.00164496258366853, -0.0347847044467926, 0.0028209665324538946, -0.04355783760547638, 0.010273801162838936, -0.039748452603816986, 0.010774023830890656, -0.013756119646131992, -0.030436616390943527, 0.024780254811048508, -0.0005504251457750797, 0.054447297006845474, -0.0736866295337677, 0.018325459212064743, 0.055216871201992035, 0.04121064022183418, 0.025338195264339447, 0.047174833714962006, -0.04521242156624794, -0.013842696323990822, -0.013544486835598946, 0.06495197117328644, -0.05348533019423485, 0.023087194189429283, -0.07099311798810959, 0.027666153386235237, 0.024741776287555695, 0.055986445397138596, 0.07203204184770584, -0.029955632984638214, -0.02758919633924961, 0.011168429628014565, 0.08219040930271149, -0.07391750067472458, 0.04559720680117607, -0.021586526185274124, 0.05413946881890297, 0.03711266443133354, -0.022625450044870377, 0.03380350023508072, 0.030109548941254616, 0.003977730870246887, 0.02841648831963539, -0.008984765969216824, 0.0250496044754982, -0.014112046919763088, -0.03009030967950821, -0.04167238622903824, 0.013784978538751602, -0.0011693903943523765, 0.006565420888364315, 0.012649858370423317, 0.06464414298534393, -0.04001780226826668, -0.0010623716516420245, -0.032225873321294785, 0.028185615316033363, 0.030398137867450714, -0.01517982967197895, 0.057217761874198914, 0.021528808400034904, 0.01321741845458746, 0.04871397837996483, -0.026742665097117424, 0.010899079032242298, -0.10897155106067657, -0.013005785644054413, -0.021028585731983185, 0.06753004342317581, 0.0012054641265422106, 0.0036121837329119444, 0.03374578058719635, 0.03395741432905197, 0.05252336710691452 ]
4,571
optbinning.binning.distributed.binning_process_sketch
get_binned_variable
Return optimal binning sketch object for a given variable name. Parameters ---------- name : string The variable name.
def get_binned_variable(self, name): """Return optimal binning sketch object for a given variable name. Parameters ---------- name : string The variable name. """ self._check_is_solved() if not isinstance(name, str): raise TypeError("name must be a string.") if name in self.variable_names: return self._binned_variables[name] else: raise ValueError("name {} does not match a binned variable." .format(name))
(self, name)
[ 0.06387434154748917, -0.03130660578608513, -0.06448785960674286, -0.013719008304178715, -0.034050408750772476, -0.018746471032500267, -0.05197885259985924, 0.017894359305500984, 0.017706893384456635, -0.05375124514102936, -0.0190361887216568, 0.031562238931655884, -0.05375124514102936, -0.02362055331468582, -0.03858364373445511, -0.003540526609867811, 0.03188604116439819, 0.02413182146847248, -0.06298813968896866, 0.03478322550654411, -0.0007429354009218514, 0.025256609544157982, 0.04877490922808647, 0.04471885412931442, 0.05869349464774132, -0.003606565296649933, 0.05675068125128746, 0.005312920082360506, -0.058079976588487625, -0.004045403096824884, -0.06724870204925537, -0.029244493693113327, 0.012398234568536282, 0.010958163999021053, 0.04625265672802925, 0.0028780093416571617, 0.05081997811794281, 0.07716728746891022, -0.03991293907165527, -0.024336326867341995, 0.04669575393199921, -0.07246363162994385, -0.003566090017557144, 0.010608797892928123, 0.0013335557887330651, -0.05460335686802864, 0.0002461805706843734, -0.0268415380269289, 0.0018490836955606937, 0.04352589696645737, 0.012321543879806995, -0.0680326446890831, 0.009824855253100395, 0.020075766369700432, -0.018030695617198944, 0.00763066578656435, -0.004209434613585472, 0.030829424038529396, -0.011895488016307354, 0.051399413496255875, -0.04311688244342804, 0.0028929212130606174, 0.05211519077420235, -0.051638007164001465, 0.015184641815721989, 0.012687952257692814, -0.02673928439617157, 0.01514203567057848, -0.04209434986114502, 0.007481546141207218, 0.05020645633339882, 0.025750834494829178, -0.013446331955492496, 0.010830347426235676, -0.014690415933728218, 0.008184539154171944, 0.006058518774807453, -0.060874905437231064, -0.008086545392870903, 0.009236897341907024, 0.024063652381300926, -0.006373799871653318, -0.019206611439585686, -0.05337631702423096, -0.026722243055701256, -0.03704984486103058, 0.0052362303249537945, 0.014622246846556664, 0.06251095980405807, -0.06626025587320328, 0.005849751178175211, 0.023041116073727608, 0.0052617937326431274, 0.11111544817686081, 0.027966326102614403, -0.08050756901502609, 0.06806673109531403, -0.02394435554742813, -0.006420666351914406, -0.02268322929739952, -0.057466454803943634, -0.02276844158768654, -0.05637574940919876, 0.02394435554742813, 0.007818130776286125, 0.0337095633149147, 0.07130476087331772, -0.0021803423296660185, -0.0031272522173821926, -0.0461844876408577, -0.01115415059030056, 0.018541963770985603, -0.054058004170656204, 0.03565238043665886, -0.040662799030542374, 0.01758759841322899, -0.04420758783817291, 0.02534181997179985, -0.014306965284049511, 0.03239731118083, -0.012781684286892414, 0.03423787280917168, -0.054023921489715576, 0.03517519682645798, 0.020518863573670387, 0.07355433702468872, 0.03541378676891327, -0.00411996291950345, 0.000971940578892827, 0.0033722345251590014, 0.07362250238656998, -0.020740414038300514, -0.061488423496484756, 0.03803829476237297, -0.028358297422528267, 0.013309994712471962, 0.017655767500400543, 0.025648580864071846, 0.04754786565899849, -0.02464308775961399, 0.04826364293694496, 0.01828633062541485, -0.0030079565476626158, -0.039640266448259354, 0.03108505718410015, -0.01157168485224247, 0.01339520514011383, -0.029005903750658035, -0.0013932036235928535, -0.03779970109462738, -0.03360730782151222, -0.00035549059975892305, -0.06322673708200455, 0.006152250804007053, 0.0071193985641002655, -0.016718443483114243, 0.014835275709629059, -0.05054730176925659, -0.041139982640743256, -0.05937518551945686, -0.005044505000114441, 0.05463744327425957, -0.028204917907714844, -0.09795883297920227, -0.042401108890771866, -0.024574918672442436, 0.004597146064043045, 0.014485909603536129, 0.03592505678534508, 0.015883373096585274, -0.05269462615251541, -0.025137312710285187, -0.0998675599694252, 0.0747813731431961, -0.03889040648937225, -0.002025896916165948, -0.019803090021014214, -0.024097736924886703, 0.014852317981421947, 0.03643632307648659, 0.006548482924699783, -0.02276844158768654, -0.03382885828614235, -0.05610307306051254, 0.0017074201023206115, 0.009654432535171509, 0.04206026345491409, -0.0009650171850807965, 0.046218570321798325, 0.03565238043665886, 0.0011183974565938115, 0.008252707310020924, 0.03060787357389927, -0.007643447257578373, 0.009236897341907024, -0.03422082960605621, 0.022972948849201202, 0.031187310814857483, -0.041889842599630356, -0.015269852243363857, 0.06864617019891739, 0.007042708341032267, -0.0015210204292088747, 0.05211519077420235, -0.0024817772209644318, 0.001906601246446371, 0.024898720905184746, -0.012653867714107037, 0.05419434234499931, 0.012781684286892414, -0.022717313840985298, 0.0049635544419288635, 0.008751193061470985, 0.06796447932720184, 0.04826364293694496, -0.010651404038071632, 0.019615625962615013, -0.025597453117370605, 0.03967434912919998, 0.03284040838479996, 0.00046919434680603445, 0.02077449858188629, 0.09816333651542664, 0.07900785654783249, -0.05204702168703079, -0.03500477224588394, -0.03391407057642937, 0.03084646537899971, 0.029295621439814568, -0.05565997585654259, 0.05739828571677208, -0.023313792422413826, -0.02067224495112896, -0.07007771730422974, -0.0063141523860394955, 0.06544222682714462, -0.024949848651885986, -0.0429464615881443, 0.015031261369585991, -0.02706308662891388, 0.01703372597694397, 0.0019673143979161978, 0.0057304552756249905, -0.0017585468012839556, 0.013284430839121342, -0.02786407247185707, 0.026296185329556465, 0.011631333269178867, -0.04246927797794342, -0.027557311579585075, 0.045059699565172195, 0.00487834308296442, 0.009535136632621288, 0.015712950378656387, 0.032363224774599075, 0.011929572559893131, -0.055694062262773514, -0.02878435328602791, 0.0027949283830821514, 0.027778862044215202, -0.049490682780742645, 0.017792105674743652, 0.0008638288709335029, 0.022853652015328407, -0.02539294771850109, -0.014724500477313995, -0.06762363016605377, 0.02622801624238491, -0.001443265238776803, -0.04727518931031227, -0.0376974493265152, 0.015977105125784874, 0.03275519609451294, -0.03953801095485687, -0.023228581994771957, -0.0702822208404541, 0.053035471588373184, 0.09639094769954681, -0.0016126225236803293, -0.004053924232721329, -0.020467737689614296, 0.025836044922471046, 0.03149406984448433, 0.0033914069645106792, -0.034050408750772476, -0.026619989424943924, 0.016062317416071892, -0.07409968972206116, -0.0022687490563839674, -0.02950012870132923, 0.000011841365449072327, -0.01651393622159958, 0.04287829250097275, -0.004707920365035534, -0.03664083033800125, 0.03384590148925781, 0.013932036235928535, 0.005133976694196463, 0.036981675773859024, 0.03382885828614235, 0.057330116629600525, -0.0012973409611731768, -0.03014773316681385, 0.0023262666072696447, -0.045945897698402405, -0.03865181282162666, 0.05191068351268768, -0.0476842038333416, -0.004895385354757309, 0.0003717340005096048, 0.004550279583781958, -0.032823365181684494, 0.07362250238656998, 0.030948719009757042, 0.01983717456459999, -0.06135208532214165, 0.028068579733371735, -0.0307101272046566, -0.018882809206843376, 0.0710320845246315, 0.0013846824876964092, -0.01101781241595745, -0.003713079495355487, -0.024983933195471764, -0.03790195658802986, 0.029551254585385323, -0.034561675041913986, -0.010412812232971191, 0.02010985091328621, 0.0018959499429911375, -0.040151532739400864, -0.01581520400941372, 0.0337095633149147, 0.01609640195965767, 0.013054360635578632, 0.011486474424600601, 0.03435716778039932, 0.04724110662937164, -0.019990554079413414, -0.0418216735124588, 0.060227297246456146, -0.00011070803157053888, -0.011759149841964245, 0.04359406605362892, 0.03391407057642937, 0.024148862808942795, 0.0011492865160107613, -0.0236546378582716, 0.06850983202457428, 0.0038046815898269415, -0.011648375540971756, 0.010634361766278744, -0.04932026192545891, 0.01642872579395771, 0.04206026345491409, -0.00907499622553587, 0.04867265373468399, 0.029653508216142654, -0.006936194375157356, -0.003834505332633853, -0.07866700738668442, -0.02950012870132923, -0.008904573507606983, 0.01685478165745735, -0.007149222306907177, -0.016684358939528465, -0.007634926121681929, 0.05211519077420235, -0.003463836619630456, -0.019291821867227554, -0.05743236839771271, -0.029329705983400345, -0.05085406452417374, -0.0022495766170322895, -0.03439125418663025, 0.017860274761915207, 0.00903239008039236, -0.043185051530599594, 0.07437236607074738, -0.042026180773973465, 0.02716534025967121, -0.012474924325942993, 0.0001005226222332567, 0.03476618230342865, -0.0035575688816607, 0.003585262456908822, -0.05525096133351326, -0.04642307758331299, 0.062374621629714966, -0.03701575845479965, 0.01652245782315731, 0.018235202878713608, 0.035584211349487305, 0.027829987928271294, 0.013753092847764492, -0.024387454614043236, 0.05773913115262985, -0.0617951862514019, -0.012986191548407078, 0.048468150198459625, -0.012466402724385262, 0.018968019634485245, -0.05825039744377136, 0.03485139459371567, -0.053921665996313095, -0.06445377320051193, 0.029091114178299904, 0.03667491301894188, -0.009143165312707424, -0.05225152522325516, -0.032550688832998276, 0.036981675773859024, -0.020467737689614296, -0.03089759312570095, -0.02472830004990101, 0.04373040422797203, 0.040390122681856155, -0.04577547311782837, 0.04223068803548813, -0.050376880913972855, -0.011452389881014824, 0.017067810520529747, 0.016974076628684998, -0.02767660841345787, -0.032823365181684494, 0.03514111042022705, 0.00671890564262867, 0.0040581850335001945, -0.008802319876849651, 0.06356757879257202, -0.06711236387491226, -0.07648560404777527, -0.016778090968728065, -0.07035039365291595, 0.056716594845056534, -0.014809711836278439, -0.00884492602199316, -0.01941111870110035, 0.011605769395828247, -0.006850983016192913, 0.03215871751308441, 0.022291257977485657, 0.012696473859250546, 0.00916872825473547, -0.05811405926942825, -0.059477441012859344, -0.0388222374022007, -0.01273907907307148, -0.023126328364014626, -0.06182926893234253, 0.03360730782151222, -0.06005687639117241, 0.04478702321648598, -0.03341984376311302, 0.04928617551922798, -0.029789846390485764, -0.06612391769886017, -0.024148862808942795, 0.04550279676914215, -0.04042420908808708, -0.034323085099458694, 0.026943791657686234, 0.026347313076257706, 0.030556747689843178, -0.03188604116439819, -0.03725435212254524, 0.0013165135169401765, -0.017144499346613884, 0.052149273455142975, 0.003655561711639166, 0.017340485006570816, 0.005244751460850239, -0.01171654462814331, -0.04529828950762749, 0.04028787091374397, -0.004980596248060465, -0.04171941801905632, 0.0725317969918251, 0.026296185329556465, -0.029602382332086563, -0.03667491301894188, -0.028852522373199463, -0.04093547537922859, 0.03224392980337143, 0.013710486702620983, -0.021967455744743347, -0.03756111115217209, 0.04996786639094353, -0.014647810719907284, -0.009509573690593243, 0.000846254057250917, 0.060227297246456146, -0.0019215132342651486, 0.03759519383311272, -0.023126328364014626, 0.03215871751308441, -0.005244751460850239, 0.03783378750085831, 0.0480591356754303, 0.008465736173093319, -0.03108505718410015, 0.016207175329327583, -0.044446177780628204, -0.021967455744743347, -0.014059852808713913, -0.017485344782471657, -0.019751964136958122, 0.02501801773905754, 0.012440839782357216, 0.026909707114100456, -0.008227144367992878, -0.042435191571712494, -0.03820871561765671, 0.03561829403042793, 0.0220356248319149, 0.05323997884988785, 0.011145628988742828, 0.008887531235814095, -0.05211519077420235, -0.025767875835299492, 0.014460345730185509, 0.03575463220477104, 0.00916872825473547, -0.03742477297782898, -0.008947179652750492, 0.008648940362036228, -0.035959139466285706, -0.04096956178545952, -0.016871822997927666, 0.11009290814399719, 0.05160392075777054, -0.007741440553218126, -0.002093000803142786, 0.032874494791030884, 0.059204764664173126, -0.013020276091992855, -0.034459423273801804, 0.0059264409355819225, -0.06588532775640488, 0.001783045008778572, 0.0024029568303376436, -0.0022985730320215225, 0.08705179393291473, 0.022206047549843788, 0.010395769961178303, 0.051638007164001465, -0.007924644276499748, 0.06346532702445984, 0.006054257974028587, -0.015107951126992702, 0.0325847752392292, -0.006957496982067823, -0.014903444796800613, -0.030965762212872505, 0.04829772561788559, -0.07266813516616821, -0.04676392301917076, 0.003583132289350033, -0.017144499346613884, 0.017706893384456635, -0.011503515765070915, -0.0076391869224607944, 0.06772588938474655, 0.03265294432640076, -0.08091658353805542, 0.016735486686229706, -0.05450110509991646, -0.04386674240231514, 0.05262645706534386, -0.013505980372428894, 0.04171941801905632, 0.0039005440194159746, 0.026585904881358147, -0.02104717493057251, 0.023262666538357735, 0.03756111115217209, 0.01847379468381405, -0.017255274578928947, -0.06905518472194672, 0.04979744181036949, -0.0082399258390069, -0.004648272879421711, -0.04233293980360031, -0.004737744573503733, 0.0028141008224338293, 0.06639659404754639, -0.010872953571379185, -0.016999641433358192, 0.018405625596642494, 0.0399470254778862, 0.026534777134656906, 0.010140136815607548, 0.01112858671694994, 0.02029731497168541, -0.005845490377396345, 0.03173266351222992, -0.03793603926897049, 0.013761613517999649, 0.059341102838516235, -0.03916308283805847, 0.013991683721542358, -0.027011960744857788, -0.01763872429728508, 0.06459011137485504, -0.008129151538014412, 0.0388222374022007, -0.027011960744857788, -0.02818787470459938, 0.02397844009101391, -0.01238971296697855, 0.012168163433670998, -0.03851547837257385, -0.011563164182007313, 0.05099039897322655, -0.036708999425172806, 0.04499153047800064, 0.007225912529975176, 0.004273343365639448, -0.05245603248476982, 0.010387249290943146, 0.0007333491812460124, 0.023876186460256577, 0.03401632234454155, 0.0041327448561787605, 0.03793603926897049, -0.0320223793387413, 0.0629199743270874, -0.0373225174844265, 0.007864996790885925, -0.023075200617313385, -0.04042420908808708, 0.01479266956448555, 0.012900980189442635, -0.049354344606399536, -0.03759519383311272, 0.040662799030542374, 0.06182926893234253, -0.03423787280917168, -0.0506836399435997, 0.011333093978464603, -0.004967814777046442, 0.06731687486171722, 0.0292104110121727, 0.027710692957043648, 0.033488012850284576, -0.014630768448114395, 0.023313792422413826, -0.014502951875329018, 0.0034531850833445787, -0.01444330345839262, -0.03009660728275776, -0.023927314206957817, -0.0399470254778862, 0.03316421061754227, 0.06588532775640488, 0.021456187590956688, 0.057705044746398926, -0.007473025005310774, -0.006761511322110891, -0.03742477297782898, -0.06885067373514175, 0.008222883567214012, -0.04206026345491409, -0.025733791291713715, -0.02217196300625801, 0.02679041028022766, -0.032874494791030884, -0.03953801095485687, -0.0016328601632267237, -0.03028407134115696, 0.018371541053056717, -0.011776192113757133, -0.026210974901914597, -0.09155094623565674, 0.002503079827874899, -0.017187105491757393, -0.04110589623451233, -0.0010049599222838879, -0.008661721833050251, -0.029943225905299187, 0.040390122681856155, -0.03038632497191429, 0.0314599871635437, 0.019769005477428436, 0.06407884508371353, 0.032312098890542984, -0.04410533234477043, -0.004665314685553312, -0.009611827321350574, 0.04921800643205643, -0.051774345338344574, 0.04185575619339943, 0.022189004346728325, 0.017792105674743652, 0.013940557837486267, -0.02338196150958538, 0.02225717343389988, 0.011742107570171356, 0.0042818645015358925, -0.007413377054035664, 0.0161049235612154, -0.051535751670598984, -0.0017617421690374613, -0.005619680508971214, -0.015465838834643364, 0.0002756050671450794, 0.0032167239114642143, -0.006352497264742851, 0.010020840913057327, 0.019956469535827637, -0.029789846390485764, -0.024387454614043236, 0.022001540288329124, -0.0293978750705719, 0.024370411410927773, 0.08432503789663315, -0.10627544671297073, 0.03192012757062912, -0.07294081151485443, 0.04124223440885544, 0.0008616985869593918, 0.034834351390600204, 0.0476842038333416, 0.012875417247414589, 0.014008725993335247, -0.0019289692863821983, 0.062272366136312485, -0.08698362857103348, -0.04812730476260185, 0.06639659404754639, 0.005858272314071655, 0.016539499163627625, -0.02883548103272915, 0.007605102378875017, 0.02757435478270054, 0.04250336065888405, 0.07089574635028839, 0.030249986797571182, 0.002122824778780341, 0.024864638224244118, 0.015124993398785591, 0.005998870823532343, -0.0020908706355839968, -0.018780555576086044, 0.02276844158768654, -0.003278502030298114, 0.055421385914087296, 0.010745136067271233, -0.02043365314602852, -0.016548020765185356, 0.0617951862514019, 0.05968194827437401, 0.02593829855322838, 0.046593502163887024, -0.0010411747498437762, -0.04168533533811569, 0.03589097037911415, -0.018985062837600708, -0.013284430839121342, -0.033010829240083694, -0.03790195658802986, 0.024864638224244118, -0.011299009434878826, 0.0151675995439291, -0.08125743269920349, -0.004217955749481916, 0.002155844122171402, -0.022649144753813744 ]
4,574
optbinning.binning.distributed.binning_process_sketch
get_support
Get a mask, or integer index, or names of the variables selected. Parameters ---------- indices : boolean (default=False) If True, the return value will be an array of integers, rather than a boolean mask. names : boolean (default=False) If True, the return value will be an array of strings, rather than a boolean mask. Returns ------- support : array An index that selects the retained features from a feature vector. If `indices` is False, this is a boolean array of shape [# input features], in which an element is True iff its corresponding feature is selected for retention. If `indices` is True, this is an integer array of shape [# output features] whose values are indices into the input feature vector. If `names` is True, this is an string array of sahpe [# output features], whose values are names of the selected features.
def get_support(self, indices=False, names=False): """Get a mask, or integer index, or names of the variables selected. Parameters ---------- indices : boolean (default=False) If True, the return value will be an array of integers, rather than a boolean mask. names : boolean (default=False) If True, the return value will be an array of strings, rather than a boolean mask. Returns ------- support : array An index that selects the retained features from a feature vector. If `indices` is False, this is a boolean array of shape [# input features], in which an element is True iff its corresponding feature is selected for retention. If `indices` is True, this is an integer array of shape [# output features] whose values are indices into the input feature vector. If `names` is True, this is an string array of sahpe [# output features], whose values are names of the selected features. """ self._check_is_solved() if indices and names: raise ValueError("Only indices or names can be True.") mask = self._support if indices: return np.where(mask)[0] elif names: return np.asarray(self.variable_names)[mask] else: return mask
(self, indices=False, names=False)
[ 0.03140532597899437, -0.06246053799986839, -0.017181899398565292, -0.020779332146048546, 0.008319610729813576, 0.023545242846012115, -0.01784711889922619, 0.032980844378471375, 0.04106850549578667, 0.026521220803260803, 0.0027440274134278297, 0.003470516297966242, -0.025593416765332222, -0.05335754528641701, -0.005129186902195215, -0.035519178956747055, -0.0020394206512719393, 0.02351023070514202, -0.013234351761639118, 0.02627614140510559, -0.033681076020002365, -0.03641197457909584, 0.023090092465281487, -0.009794470854103565, 0.019553929567337036, 0.03242066130042076, 0.039142873138189316, -0.03816254809498787, -0.007339288480579853, -0.025313323363661766, -0.0971219390630722, -0.0015919297002255917, -0.038582686334848404, 0.04838591068983078, 0.0015295654302462935, -0.009724447503685951, 0.0036236916203051805, 0.05738386884331703, 0.094601109623909, 0.010529712773859501, -0.01508996170014143, -0.08220703154802322, 0.04425455257296562, -0.022459885105490685, -0.08976951986551285, -0.00401319470256567, 0.005181703716516495, 0.01786462403833866, 0.021146953105926514, 0.03569423779845238, 0.05559828132390976, -0.0063283308409154415, 0.010783545672893524, -0.02610108256340027, -0.03595682233572006, 0.0036171269603073597, 0.05283237248659134, 0.03781243413686752, 0.0000692366375005804, -0.022214805707335472, 0.004389568231999874, 0.022372357547283173, 0.0604998953640461, 0.015746427699923515, -0.005881934426724911, -0.012175253592431545, 0.008809772320091724, -0.020604275166988373, -0.0017133759101852775, 0.05797906592488289, -0.017339451238512993, -0.04968133568763733, 0.0027615330182015896, 0.00925179198384285, 0.0546879842877388, -0.0363769605755806, -0.017015594989061356, -0.028586899861693382, 0.0021455492824316025, -0.010871075093746185, 0.002654310315847397, -0.0034792691003531218, -0.008437775075435638, -0.002031761920079589, 0.04992641881108284, -0.017803354188799858, -0.032228097319602966, 0.001231967587955296, 0.06904270499944687, -0.10888580232858658, -0.0076806508004665375, 0.034521352499723434, 0.03809252753853798, 0.04106850549578667, -0.04260900989174843, -0.018713653087615967, 0.014792364090681076, -0.02035919576883316, -0.02650371566414833, -0.004989140667021275, -0.04684540629386902, 0.03110772930085659, -0.03931792825460434, 0.007575616240501404, -0.03578176721930504, 0.0004595261125359684, -0.022302333265542984, -0.031212763860821724, -0.007951989769935608, -0.05416281148791313, 0.04019321873784065, -0.023790322244167328, 0.020831849426031113, -0.002923461375758052, -0.059799663722515106, -0.03285830467939377, -0.006805362645536661, -0.027011381462216377, -0.07002302259206772, -0.005619348026812077, -0.01048594806343317, 0.013146823272109032, 0.0012538498267531395, 0.03350601717829704, -0.008490292355418205, -0.00037555317976512015, 0.040368273854255676, 0.032613225281238556, 0.09046974778175354, -0.010118327103555202, 0.02366778254508972, -0.01655169203877449, -0.04915616288781166, 0.07345415651798248, 0.03278828039765358, 0.006892891600728035, 0.0005935545777902007, 0.0016138119390234351, 0.013295622542500496, -0.002459558891132474, 0.0002822803216986358, -0.016717998310923576, -0.010459689423441887, 0.039738066494464874, -0.042048826813697815, -0.004118229262530804, 0.0759049579501152, -0.03802250325679779, -0.03984310105443001, -0.02251240238547325, 0.00747058168053627, 0.013479432091116905, -0.07065322995185852, -0.0379524789750576, -0.03511654585599899, 0.00926054548472166, 0.004980387631803751, -0.06267061084508896, 0.017567027360200882, -0.021549586206674576, 0.0012822967255488038, -0.018381044268608093, -0.05769897252321243, 0.05559828132390976, 0.03210555762052536, 0.05244724825024605, 0.003286705818027258, -0.012822967022657394, 0.01770707219839096, 0.04985639452934265, -0.010468441992998123, 0.06841249763965607, -0.035204075276851654, 0.019641458988189697, -0.00745307607576251, 0.03418874368071556, -0.03415372967720032, -0.02312510460615158, 0.05360262840986252, 0.035204075276851654, 0.05199209600687027, 0.0022308898624032736, -0.0920102596282959, -0.04306416213512421, 0.026311151683330536, -0.0007910413551144302, -0.01470483560115099, 0.026941359043121338, 0.006210166960954666, 0.036762088537216187, 0.011159920133650303, 0.00894544180482626, 0.06347586959600449, 0.03809252753853798, -0.010380913503468037, -0.002868755953386426, -0.04554997757077217, 0.007509969640523195, -0.009881999343633652, -0.036131881177425385, 0.028586899861693382, -0.017418228089809418, -0.034521352499723434, 0.07114339619874954, 0.0011356859467923641, 0.02972477488219738, 0.07443447411060333, -0.018643630668520927, -0.08353746682405472, 0.004533990751951933, 0.017199406400322914, -0.008884171023964882, -0.004481473471969366, 0.0520971305668354, 0.04477972537279129, 0.02088436670601368, 0.06557656079530716, 0.029742280021309853, 0.031142741441726685, 0.022757483646273613, 0.028464360162615776, -0.006538399960845709, 0.03739229589700699, 0.0746445432305336, 0.018783677369356155, -0.03980809077620506, -0.00783382635563612, 0.022985057905316353, -0.0015875532990321517, -0.05090674012899399, 0.01625409536063671, -0.02695886418223381, -0.031983017921447754, -0.019921550527215004, 0.043589334934949875, 0.024175450205802917, 0.05447791516780853, -0.015991508960723877, 0.08255714923143387, 0.02888449840247631, 0.02449055388569832, 0.029829809442162514, 0.0317029245197773, 0.01852109096944332, 0.0060132271610200405, -0.011387494392693043, 0.02657373808324337, 0.0019912798888981342, 0.008652220480144024, -0.0073305354453623295, -0.028236785903573036, -0.004345803987234831, -0.00858219712972641, 0.023527737706899643, -0.00909424014389515, 0.05269232764840126, -0.01675300858914852, 0.006135767791420221, -0.01271793246269226, -0.042118851095438004, -0.0054880548268556595, 0.00229325401596725, -0.02035919576883316, 0.018153470009565353, -0.03263073042035103, -0.04530489817261696, 0.04968133568763733, 0.009724447503685951, -0.03079262562096119, -0.02725646272301674, -0.049191176891326904, 0.025715956464409828, -0.06014977768063545, -0.050101473927497864, -0.020621780306100845, -0.03371608629822731, 0.03186047822237015, 0.029847314581274986, -0.0440794937312603, 0.054337866604328156, -0.028079234063625336, 0.011781373992562294, -0.04540993273258209, 0.08409765362739563, -0.01183389127254486, -0.014407237991690636, 0.011991443112492561, 0.026713784784078598, 0.0003230358997825533, -0.04456965625286102, -0.002247301395982504, 0.04246896505355835, 0.053882718086242676, -0.09355076402425766, -0.023930368945002556, 0.012148994952440262, -0.0185035839676857, -0.03072260320186615, 0.04225889593362808, 0.027974199503660202, 0.002958472818136215, 0.0032560706604272127, -0.04099848121404648, -0.009540637023746967, 0.0012429087655618787, -0.08675853163003922, 0.05906442180275917, -0.021234482526779175, 0.041593678295612335, 0.02902454510331154, 0.01732194609940052, -0.07366422563791275, 0.041278574615716934, -0.03781243413686752, -0.01689305528998375, -0.05881934240460396, -0.012700426392257214, 0.010608488693833351, 0.028061727061867714, 0.042118851095438004, 0.011177425272762775, 0.0254183579236269, -0.0010235396912321448, -0.021689632907509804, -0.012770449742674828, -0.004595261067152023, -0.069847971200943, -0.046040140092372894, -0.008879794739186764, 0.042889103293418884, -0.11273707449436188, -0.004498979542404413, 0.03630694001913071, 0.019623953849077225, 0.0019070333801209927, -0.004177310969680548, 0.03420624881982803, 0.052657317370176315, 0.006744092795997858, 0.024368012323975563, -0.0204292181879282, -0.016858043149113655, -0.08353746682405472, 0.06501638144254684, 0.012665415182709694, 0.01596524938941002, 0.01390832383185625, 0.05206212028861046, 0.04817584156990051, 0.015912732109427452, -0.015903979539871216, -0.0332784429192543, 0.00834586936980486, 0.028096739202737808, -0.0020766204688698053, 0.024385519325733185, 0.01255162712186575, 0.02034168876707554, 0.026556232944130898, -0.008288975805044174, -0.00013074612070340663, -0.013794535771012306, 0.032140567898750305, -0.008284599520266056, -0.04509482905268669, -0.06578662991523743, 0.0030394368804991245, 0.03525659441947937, -0.01997406780719757, -0.0752747505903244, 0.010538465343415737, 0.012122736312448978, -0.0317029245197773, 0.01524751354008913, -0.007002302445471287, 0.00933932140469551, -0.0191337913274765, -0.005094175226986408, -0.0021619610488414764, -0.07103835791349411, -0.031300291419029236, 0.015912732109427452, -0.030232440680265427, 0.05101177468895912, -0.005234220996499062, -0.031300291419029236, -0.045655012130737305, -0.05913444608449936, 0.022617436945438385, 0.05174701660871506, 0.025838496163487434, -0.01950141228735447, -0.0572788342833519, 0.011501282453536987, -0.01911628618836403, -0.04222388565540314, 0.007094207685440779, 0.025698451325297356, 0.008122671395540237, 0.004056958947330713, -0.000036413341149454936, 0.04103349521756172, -0.06865757703781128, 0.005684994626790285, -0.045129839330911636, 0.03707719221711159, 0.04383441433310509, -0.03501151129603386, -0.006245178636163473, 0.011299965903162956, -0.03819756209850311, 0.03499400615692139, -0.014249686151742935, -0.01482737623155117, -0.006350213196128607, 0.07744546979665756, -0.023685289546847343, 0.003463951637968421, 0.025943530723452568, 0.022179793566465378, 0.010337148793041706, -0.01988654024899006, -0.0049497527070343494, 0.0038140667602419853, 0.014564789831638336, 0.004884106107056141, -0.04625020921230316, 0.004177310969680548, 0.003013178240507841, 0.05206212028861046, -0.07212371379137039, -0.06904270499944687, -0.004945376422256231, -0.045339908450841904, 0.03133530542254448, -0.04733556509017944, -0.030915165320038795, -0.019781505689024925, -0.05419782176613808, -0.013601972721517086, 0.0004245145828463137, -0.011571304872632027, 0.010774793103337288, 0.050661660730838776, -0.01075728703290224, -0.0958615243434906, -0.04183875769376755, 0.030705096200108528, -0.0740143358707428, -0.06974293291568756, 0.003656514920294285, -0.006021980196237564, 0.02863941714167595, -0.019763998687267303, 0.09306060522794724, 0.033541031181812286, -0.045339908450841904, 0.015518853440880775, 0.06263560056686401, -0.002923461375758052, 0.02911207266151905, -0.03735728561878204, -0.04008818417787552, 0.013339386321604252, -0.008205823600292206, -0.0010749629000201821, 0.03131780028343201, -0.07478459179401398, -0.02641618624329567, -0.013286869041621685, 0.047195520251989365, -0.030319970101118088, -0.03662204369902611, -0.07716537266969681, -0.038582686334848404, 0.022669954225420952, -0.039212893694639206, 0.0836775153875351, 0.03501151129603386, -0.04891108348965645, -0.04621519893407822, -0.04330924153327942, -0.0006624834495596588, 0.017260676249861717, -0.028516877442598343, -0.04271404445171356, 0.026783807203173637, -0.005903816316276789, -0.04113852605223656, -0.01967647112905979, 0.06865757703781128, -0.03431128337979317, 0.02680131420493126, -0.015588875859975815, 0.027203945443034172, -0.02219729870557785, 0.04400947317481041, -0.007667521480470896, 0.032228097319602966, 0.06645185500383377, 0.044429611414670944, -0.013251857832074165, -0.051641982048749924, 0.02126949466764927, 0.023230139166116714, -0.06991799175739288, 0.015440077520906925, -0.033838625997304916, 0.01972898840904236, -0.020394206047058105, -0.031597889959812164, -0.027711613103747368, 0.020831849426031113, 0.042118851095438004, 0.05983467772603035, 0.03679709881544113, -0.01934386044740677, 0.01505495049059391, 0.002875320613384247, 0.02049924060702324, -0.03408370912075043, 0.020079102367162704, -0.017059359699487686, 0.003411434357985854, 0.023317668586969376, 0.01782085932791233, -0.018573608249425888, 0.006997926160693169, 0.019028756767511368, 0.06323079019784927, -0.008227705955505371, -0.021794667467474937, 0.0010952039156109095, 0.04267903417348862, -0.02802671678364277, -0.010223361663520336, 0.05769897252321243, -0.0431341826915741, -0.03257821127772331, 0.006564658600836992, 0.03210555762052536, 0.02748403698205948, 0.0018818688113242388, -0.03970305621623993, 0.04225889593362808, -0.015816450119018555, -0.04386942461133003, -0.04110351577401161, 0.09116998314857483, -0.03161539509892464, -0.0002653216361068189, -0.010197103023529053, 0.026223624125123024, -0.0005432254984043539, 0.056333523243665695, -0.016455411911010742, 0.02181217260658741, 0.004494602791965008, -0.08703862130641937, 0.01075728703290224, -0.014127145521342754, -0.090049609541893, 0.0829772874712944, 0.04064836725592613, -0.11700847744941711, 0.005571207031607628, 0.012078971602022648, -0.02727396786212921, 0.006249554920941591, -0.047580644488334656, -0.013348139822483063, -0.029287131503224373, -0.00913800485432148, 0.0514669232070446, -0.03147535026073456, 0.05409278720617294, 0.05097676441073418, -0.030389992520213127, 0.017216911539435387, 0.06365092843770981, -0.000891699455678463, 0.008529679849743843, -0.0045777554623782635, -0.04516485333442688, 0.050346557050943375, 0.029672257602214813, -0.013689501211047173, -0.0010574570624157786, 0.02281000092625618, 0.04670535773038864, 0.032980844378471375, -0.036762088537216187, 0.03872273489832878, -0.010993614792823792, -0.011763868853449821, 0.03144033998250961, -0.08402763307094574, 0.025400852784514427, 0.0797562301158905, -0.03868772089481354, -0.007881967350840569, -0.04201381653547287, 0.014153404161334038, -0.04663533717393875, 0.0020842792000621557, 0.017033101990818977, -0.014853634871542454, 0.014048369601368904, 0.02172464318573475, -0.04299413785338402, -0.032053038477897644, -0.07884592562913895, -0.03110772930085659, -0.01466982439160347, -0.0011619445867836475, 0.03949298709630966, 0.01770707219839096, 0.059554584324359894, -0.02158459834754467, 0.005151068791747093, -0.04831588640809059, -0.01121243741363287, -0.009540637023746967, -0.013969593681395054, 0.04877103865146637, -0.0672571137547493, 0.0020470793824642897, -0.016429152339696884, -0.012350311502814293, 0.06564658880233765, 0.006232049316167831, 0.014844881370663643, 0.058189135044813156, 0.012026454322040081, -0.019991574808955193, 0.02727396786212921, 0.016026519238948822, 0.014564789831638336, -0.01663922145962715, 0.04460466653108597, -0.013925828970968723, 0.058644283562898636, 0.030705096200108528, 0.007759426720440388, 0.0036258797626942396, -0.047055475413799286, 0.0073655471205711365, -0.016998089849948883, 0.0678873211145401, 0.013094305992126465, -0.05927449092268944, -0.02534833550453186, -0.01918630860745907, -0.005470548756420612, -0.02242487482726574, 0.035606708377599716, -0.005947580561041832, 0.05251726880669594, 0.003991312347352505, -0.009549390524625778, -0.06974293291568756, 0.029934844002127647, 0.0001149499075836502, -0.01746199280023575, -0.010048304684460163, 0.04646027833223343, -0.0514669232070446, 0.004639025311917067, 0.0278166476637125, 0.0546879842877388, 0.039212893694639206, -0.0016356941778212786, -0.01302428264170885, 0.0015273772878572345, 0.031212763860821724, 0.014494766481220722, 0.04915616288781166, -0.00997828133404255, 0.009750706143677235, -0.012814213521778584, 0.08409765362739563, -0.030372487381100655, 0.03334846720099449, 0.07744546979665756, 0.01859111338853836, -0.01164132822304964, -0.02034168876707554, 0.006704704836010933, 0.024017898365855217, 0.02056926302611828, 0.002010973868891597, -0.02205725386738777, 0.0697779431939125, 0.03165040910243988, -0.01473984681069851, 0.053112465888261795, -0.015676405280828476, 0.004407074302434921, -0.004980387631803751, 0.006118261720985174, 0.02135702222585678, 0.005291115026921034, -0.01918630860745907, -0.00918176956474781, -0.04579506069421768, 0.003376422682777047, -0.03569423779845238, 0.017680814489722252, 0.015991508960723877, -0.04786073789000511, 0.0004587055300362408, 0.04821085184812546, 0.05976465344429016, 0.009278050623834133, 0.00020405148097779602, 0.005050410982221365, -0.021251987665891647, -0.0185035839676857, 0.02251240238547325, 0.05965961888432503, 0.031212763860821724, 0.021602103486657143, -0.012919248081743717, 0.011571304872632027, -0.06904270499944687, 0.012350311502814293, -0.019869033247232437, -0.02128699980676174, 0.0016947760013863444, 0.0059563335962593555, 0.01723441667854786, 0.00740931136533618, 0.011545046232640743, -0.01509871520102024, -0.03777742385864258, -0.05920447036623955, 0.07772555947303772, -0.013523196801543236, -0.0207443218678236, 0.010871075093746185, -0.017243171110749245, 0.038512665778398514, -0.012963012792170048, 0.05699874460697174, -0.011903914622962475, 0.002332641975954175, -0.0022276074159890413, -0.004870976787060499, -0.02174215018749237, -0.0347314216196537, 0.02534833550453186, 0.026853831484913826, 0.02351023070514202, -0.043659355491399765, 0.05283237248659134, -0.01904626376926899, 0.017628297209739685, -0.05731384828686714, -0.03282329440116882, -0.012656661681830883, -0.017943400889635086, 0.04124356061220169, -0.041733723133802414, 0.05017149820923805, -0.1268116980791092, 0.00677472772076726, -0.008354621939361095, 0.03042500466108322 ]
4,575
optbinning.binning.distributed.binning_process_sketch
information
Print overview information about the options settings and statistics. Parameters ---------- print_level : int (default=1) Level of details.
def information(self, print_level=1): """Print overview information about the options settings and statistics. Parameters ---------- print_level : int (default=1) Level of details. """ self._check_is_solved() if not isinstance(print_level, numbers.Integral) or print_level < 0: raise ValueError("print_level must be an integer >= 0; got {}." .format(print_level)) self._n_selected = np.count_nonzero(self._support) dict_user_options = self.get_params() print_binning_process_sketch_information( print_level, self._n_samples, self._n_variables, self._target_dtype, self._n_numerical, self._n_categorical, self._n_selected, self._n_add, self._time_streaming_add, self._n_solve, self._time_streaming_solve, dict_user_options)
(self, print_level=1)
[ 0.02121615782380104, 0.0006363760330714285, 0.009347282350063324, 0.0035432721488177776, 0.0631963238120079, -0.02132049947977066, -0.03297199681401253, -0.06455276906490326, -0.04611905664205551, 0.002299866173416376, -0.06350935250520706, -0.00876470748335123, -0.004760592710226774, -0.016068629920482635, -0.03312850743532181, 0.008438639342784882, 0.008260388858616352, -0.05377078801393509, -0.0066213542595505714, 0.04051938280463219, 0.03290243446826935, 0.015103469602763653, 0.020659668371081352, 0.026537587866187096, -0.012860122136771679, 0.014599150978028774, -0.005451856646686792, -0.0439278818666935, -0.014946957118809223, -0.008086486719548702, -0.07916061580181122, -0.005877919029444456, -0.04535388574004173, 0.051718730479478836, -0.031041672453284264, 0.013607904314994812, 0.02149440161883831, 0.031215576454997063, -0.0214422307908535, 0.07470870018005371, -0.03871079161763191, -0.019529299810528755, 0.020259691402316093, -0.009729868732392788, -0.05025794729590416, -0.019181493669748306, 0.016912059858441353, 0.036936983466148376, -0.02500724233686924, -0.055892400443553925, 0.03700654208660126, 0.004151932429522276, -0.02079879119992256, -0.022833455353975296, -0.004101935308426619, -0.030798209831118584, 0.03940640389919281, -0.06156163662672043, 0.044797394424676895, -0.03211987018585205, 0.013886149041354656, 0.03243289515376091, -0.01813807524740696, -0.012938378378748894, -0.005704015959054232, -0.03340675309300423, 0.011521069332957268, 0.013607904314994812, 0.015094774775207043, 0.01086023822426796, 0.0490754060447216, -0.026589758694171906, -0.011034141294658184, 0.026902783662080765, -0.031024282798171043, -0.048240672796964645, -0.04973623901605606, -0.019616249948740005, 0.013616599142551422, -0.00915598962455988, -0.011086312122642994, 0.026033269241452217, 0.03182423487305641, -0.0630224198102951, -0.016529474407434464, -0.04643208160996437, 0.04754506051540375, -0.02112920582294464, 0.06194422394037247, 0.02895483747124672, -0.05272736772894859, 0.0434061698615551, 0.0214422307908535, 0.06611789762973785, -0.05105790123343468, -0.015607788227498531, -0.029893914237618446, -0.02521592564880848, -0.037528254091739655, -0.026607148349285126, -0.08618628978729248, -0.055092450231313705, 0.03996289521455765, -0.0008064748253673315, -0.06288330256938934, -0.03999767452478409, -0.0146861020475626, 0.005451856646686792, 0.009703783318400383, 0.047823306173086166, 0.014912175945937634, 0.027424491941928864, -0.05373600497841835, -0.06583964824676514, 0.013833978213369846, 0.007660423871129751, -0.018885858356952667, -0.044519148766994476, -0.04267577826976776, -0.009660308249294758, -0.03891947492957115, -0.016503388062119484, 0.010095065459609032, -0.027737516909837723, -0.04591037333011627, 0.016094716265797615, -0.05429249629378319, 0.030780818313360214, 0.023616017773747444, -0.041875824332237244, 0.08083008229732513, -0.04705813154578209, -0.027146248146891594, 0.05777055397629738, 0.059196557849645615, -0.08382121473550797, -0.015181725844740868, -0.0287635438144207, 0.03251984715461731, 0.026624538004398346, -0.0021520487498492002, -0.03624137118458748, -0.05714450404047966, -0.023424724116921425, -0.006721348501741886, -0.037910837680101395, 0.04354529455304146, -0.08583848923444748, -0.026902783662080765, -0.05721406266093254, 0.01760767214000225, 0.01838153973221779, -0.0032172042410820723, -0.0661526769399643, -0.024329019710421562, -0.023337773978710175, 0.044797394424676895, -0.05484898388385773, -0.002645498374477029, -0.044275686144828796, -0.040693286806344986, 0.011347166262567043, 0.029493937268853188, 0.014842615462839603, -0.02220740355551243, 0.04535388574004173, -0.019059760496020317, -0.03276331350207329, 0.03958030790090561, 0.014755663461983204, 0.033806730061769485, -0.041110653430223465, -0.020781399682164192, 0.023337773978710175, 0.020520545542240143, 0.03558053821325302, 0.011825399473309517, 0.009086428210139275, 0.010799371637403965, -0.03187640756368637, 0.02857225202023983, -0.03592834621667862, -0.07345660030841827, -0.001954234205186367, 0.0018727171700447798, -0.037876058369874954, 0.05269258841872215, -0.019511908292770386, -0.02474638633430004, 0.004517128691077232, 0.016207752749323845, 0.0005727927782572806, 0.04309314489364624, 0.00007574287883471698, 0.03286765515804291, 0.019685812294483185, -0.008273432031273842, -0.06730043143033981, 0.052170880138874054, -0.015155640430748463, 0.03627615049481392, -0.014251344837248325, -0.030502574518322945, 0.01785983145236969, -0.012686219066381454, 0.019772762432694435, 0.029424376785755157, 0.030276499688625336, -0.000809192075394094, 0.026815831661224365, -0.0034432781394571066, -0.0425366573035717, 0.047579843550920486, 0.008864701725542545, 0.03989333286881447, -0.010729811154305935, 0.029824351891875267, -0.0064344084821641445, -0.03535446524620056, 0.004873629659414291, 0.04660598561167717, 0.01045156642794609, 0.029633060097694397, 0.045075640082359314, -0.03638049215078354, 0.008542981930077076, 0.0354761965572834, 0.020155349746346474, 0.022885626181960106, -0.029841743409633636, 0.012642743065953255, -0.03234594687819481, -0.09425538778305054, 0.05797923728823662, -0.0418410450220108, 0.01260796282440424, -0.03878035396337509, 0.04629296064376831, 0.04785808548331261, -0.02808532305061817, 0.001948799705132842, 0.03159816190600395, 0.013129671104252338, -0.033858899027109146, -0.041180215775966644, -0.0799257904291153, 0.015381714329123497, -0.005191002506762743, 0.005938785150647163, -0.03151120990514755, 0.016451217234134674, -0.07067415118217468, -0.031076453626155853, 0.014494809322059155, -0.02112920582294464, 0.005156221799552441, -0.012912292964756489, -0.019494518637657166, -0.01767723262310028, -0.024311630055308342, -0.03260679915547371, 0.05109268054366112, -0.027076685801148415, 0.038189083337783813, 0.014242650009691715, -0.0010292879305779934, 0.0005388273857533932, -0.052136097103357315, -0.03145904093980789, -0.04636252298951149, 0.059022653847932816, 0.05637932941317558, -0.06660482287406921, 0.04764940217137337, -0.05446639657020569, 0.015503446571528912, 0.030850380659103394, -0.01272969413548708, -0.07123064249753952, 0.03850210830569267, 0.026972344145178795, -0.006521360017359257, -0.01798156276345253, -0.0009015779942274094, -0.03165033459663391, -0.00361935468390584, -0.007090892177075148, 0.04938843101263046, 0.024381190538406372, -0.003384585725143552, -0.009321196936070919, 0.04723203554749489, 0.04389309883117676, 0.0006727869622409344, 0.02869398333132267, 0.0037736936938017607, 0.019651031121611595, 0.006534402724355459, -0.016520777717232704, 0.009382063522934914, 0.0104602612555027, -0.09342065453529358, 0.016451217234134674, -0.00870384182780981, 0.03450234234333038, -0.006451798602938652, 0.12465362250804901, -0.045006077736616135, 0.051579609513282776, -0.013225317932665348, -0.0001631698542041704, 0.03864123299717903, 0.09550748765468597, 0.08702102303504944, -0.0573531873524189, -0.03982377052307129, -0.03509361296892166, 0.018572833389043808, -0.03641527518630028, 0.07039590924978256, -0.04406700283288956, 0.026624538004398346, 0.07394352555274963, -0.03274592012166977, 0.002991130342707038, -0.06935248523950577, 0.005556198768317699, -0.009599441662430763, 0.037980400025844574, 0.00886904913932085, -0.10246360301971436, -0.001928148791193962, 0.0570053793489933, -0.012999244034290314, 0.014138308353722095, 0.045319102704524994, -0.037806496024131775, 0.07693465799093246, -0.02890266664326191, 0.01796417310833931, 0.008899482898414135, 0.02104225382208824, -0.037354350090026855, 0.027633175253868103, 0.027354931458830833, -0.003519360674545169, 0.019877104088664055, 0.0036758731584995985, 0.011981911957263947, 0.0027020168490707874, -0.022816063836216927, 0.012790560722351074, -0.023146480321884155, 0.023702969774603844, 0.00113906420301646, -0.005847486201673746, 0.03236333653330803, -0.025685463100671768, 0.0071691484190523624, 0.03645005449652672, 0.03505882993340492, 0.022781284525990486, -0.014338296838104725, 0.016364265233278275, -0.012155815027654171, -0.04945799335837364, 0.01860761269927025, 0.0075256493873894215, 0.04257143661379814, -0.00869079865515232, -0.002534635132178664, -0.04785808548331261, 0.011825399473309517, -0.020294472575187683, -0.0023607322946190834, 0.06135295331478119, -0.02869398333132267, 0.03916294127702713, 0.01282534096390009, -0.059092216193675995, 0.05690103769302368, 0.026050658896565437, -0.01754680648446083, -0.015555617399513721, -0.03881513327360153, -0.03624137118458748, -0.051475267857313156, 0.03438061103224754, 0.013625294901430607, 0.0288504958152771, -0.013816587626934052, 0.01237319316715002, -0.0495971143245697, 0.024294238537549973, 0.020885741338133812, 0.011851484887301922, 0.04771896451711655, 0.05314473435282707, -0.05335341766476631, -0.015494750812649727, -0.044032223522663116, -0.055753279477357864, -0.0919598713517189, -0.012938378378748894, -0.02878093533217907, -0.027946200221776962, 0.002011839533224702, 0.012234071269631386, 0.02479855716228485, -0.026294123381376266, 0.0214422307908535, -0.01452089473605156, -0.041006311774253845, 0.07171756774187088, -0.022607380524277687, 0.006912641692906618, -0.01836415007710457, 0.005908351857215166, 0.00006134153954917565, -0.008399511687457561, 0.05672713741660118, 0.006343109533190727, -0.008095181547105312, 0.07276098430156708, 0.04198016598820686, 0.026624538004398346, -0.06716131418943405, 0.05102311819791794, 0.06507447361946106, 0.013894843868911266, -0.06472667306661606, -0.0014194826362654567, -0.016129497438669205, 0.005551850888878107, 0.0060779075138270855, -0.023563846945762634, -0.013625294901430607, 0.024189896881580353, 0.0009695088374428451, 0.0026585410814732313, 0.027841858565807343, -0.023720359429717064, 0.020816180855035782, 0.010790676809847355, 0.014338296838104725, -0.003991072066128254, -0.015086079016327858, -0.038084741681814194, -0.06726565212011337, -0.01262535247951746, -0.030711257830262184, -0.005938785150647163, 0.0001309027138631791, -0.03937162458896637, -0.005660540424287319, -0.0064344084821641445, -0.04396266117691994, 0.01735551282763481, -0.000681482080835849, -0.01247753482311964, -0.0021596569567918777, -0.048762381076812744, -0.04260621964931488, 0.044275686144828796, 0.020103178918361664, -0.02460726536810398, 0.06309198588132858, 0.04267577826976776, -0.055127229541540146, -0.006890903692692518, 0.0184337105602026, 0.02158135361969471, -0.05728362500667572, 0.008603847585618496, -0.005895309150218964, 0.009973333217203617, -0.01810329593718052, 0.06312676519155502, -0.023250821977853775, -0.029720010235905647, -0.005856181029230356, 0.006647439673542976, 0.00009150282858172432, -0.008395164273679256, 0.00912120845168829, -0.04031069949269295, 0.008203870616853237, 0.006956117227673531, -0.0008510374464094639, -0.05283170938491821, 0.019303224980831146, -0.012790560722351074, -0.0013564428081735969, -0.06062256172299385, 0.020242301747202873, -0.001645556534640491, -0.0091733792796731, -0.005634455010294914, 0.026937564834952354, 0.0253202673047781, 0.008425597101449966, -0.0008276692824438214, 0.03483275696635246, 0.007947363890707493, 0.013468782417476177, 0.048588477075099945, 0.03314589709043503, 0.0418410450220108, 0.002178134163841605, 0.0561358667910099, -0.0173468180000782, -0.033754557371139526, 0.012599267065525055, 0.009182075038552284, 0.0432322695851326, 0.04987535998225212, -0.03331980109214783, 0.015607788227498531, 0.048136331140995026, -0.01097327470779419, -0.010190711356699467, 0.007516954094171524, 0.033476315438747406, -0.0359979048371315, 0.009747259318828583, 0.026068048551678658, -0.00638658506795764, 0.041041091084480286, -0.008947305381298065, 0.06051822006702423, 0.03676307946443558, -0.01845110021531582, 0.014390467666089535, 0.0068474276922643185, 0.012338412925601006, 0.03999767452478409, 0.04316270723938942, -0.015225201845169067, 0.003673699451610446, 0.01051243208348751, 0.044762615114450455, -0.007195233833044767, 0.01415569894015789, -0.05345775932073593, 0.04591037333011627, -0.044240906834602356, 0.04514520242810249, -0.02551155909895897, 0.03613702952861786, -0.03340675309300423, 0.04044982045888901, 0.010121150873601437, 0.019598860293626785, 0.03620659187436104, 0.04671032726764679, 0.03211987018585205, 0.038119520992040634, -0.012294936925172806, 0.009877686388790607, -0.034432779997587204, -0.026537587866187096, -0.06430930644273758, -0.004669293761253357, 0.01447741873562336, -0.026085440069437027, -0.017320731654763222, -0.0356501005589962, 0.08076052367687225, -0.03227638453245163, -0.026954954490065575, 0.041875824332237244, 0.029563497751951218, -0.05105790123343468, -0.006486579310148954, -0.04208450764417648, 0.01257318165153265, 0.07324791699647903, 0.08180394023656845, 0.04935365170240402, 0.08034315705299377, -0.03585878387093544, 0.020816180855035782, -0.0034780586138367653, 0.008373426273465157, -0.00010665140871424228, 0.010329834185540676, 0.010442870669066906, -0.08138657361268997, 0.04900584742426872, 0.0030324324034154415, -0.01457306556403637, -0.08959478884935379, 0.0007097413181327283, -0.06709174811840057, -0.019529299810528755, 0.0029520022217184305, -0.020468374714255333, -0.059022653847932816, 0.059161778539419174, 0.009495100006461143, -0.059022653847932816, -0.004251926671713591, -0.025998488068580627, -0.016599034890532494, -0.02850268967449665, 0.020607497543096542, 0.03624137118458748, 0.029389595612883568, -0.0008640802116133273, 0.014433943666517735, -0.019616249948740005, -0.03658917546272278, -0.030676476657390594, -0.041528020054101944, -0.05272736772894859, -0.008599500171840191, 0.062396369874477386, 0.013877454213798046, 0.027163637802004814, 0.018764127045869827, -0.023894263431429863, 0.08006490767002106, -0.017042487859725952, 0.02881571650505066, -0.02090313285589218, 0.006782214157283306, -0.024381190538406372, -0.03707610443234444, 0.024120336398482323, 0.013799197971820831, 0.023076917976140976, 0.005908351857215166, -0.025876756757497787, 0.015173031017184258, -0.02829400636255741, -0.047788526862859726, -0.0015401277923956513, 0.020294472575187683, -0.023876871913671494, 0.03610225021839142, 0.047997210174798965, 0.03297199681401253, 0.01719030551612377, 0.013981795869767666, 0.048275452107191086, 0.055892400443553925, -0.022416086867451668, 0.0032150305341929197, 0.07387396693229675, 0.02166830562055111, -0.05467507988214493, 0.0062692007049918175, -0.05265780910849571, 0.044797394424676895, -0.02551155909895897, 0.006903946399688721, -0.008229956030845642, 0.027250589802861214, -0.008390816859900951, 0.008360383100807667, -0.09432494640350342, 0.023842092603445053, 0.002027055947110057, -0.029493937268853188, 0.056066304445266724, 0.026589758694171906, -0.04684944823384285, 0.02892005816102028, 0.00533447228372097, -0.025998488068580627, 0.0561358667910099, -0.014781748875975609, 0.010981970466673374, 0.01853805221617222, -0.027407102286815643, 0.0563097707927227, -0.026694100350141525, -0.004734507296234369, 0.012190595269203186, -0.024189896881580353, 0.09669002890586853, -0.010416785255074501, -0.026589758694171906, -0.010886323638260365, 0.02145962230861187, -0.0004567669238895178, -0.0361718088388443, -0.01451219990849495, -0.022381307557225227, 0.0365196168422699, -0.08458638191223145, -0.015259982086718082, 0.02846791036427021, 0.010642859153449535, 0.03276331350207329, -0.026294123381376266, 0.004704074468463659, -0.05766621232032776, 0.09947247803211212, -0.06507447361946106, 0.03968464955687523, -0.019511908292770386, -0.009434234350919724, 0.02507680281996727, -0.03462407365441322, 0.022520430386066437, -0.05992694944143295, 0.00016751742805354297, 0.05784011632204056, 0.007021330762654543, 0.037597812712192535, 0.08152569085359573, 0.0009499447769485414, -0.058883532881736755, -0.03707610443234444, 0.05053619295358658, -0.023598628118634224, 0.03958030790090561, -0.04389309883117676, 0.013764416798949242, -0.022642161697149277, 0.07651729136705399, 0.0016466433880850673, -0.03895425796508789, 0.02208567224442959, 0.12875773012638092, 0.0009727695141918957, -0.04281490296125412, 0.023859482258558273, 0.0060822549276053905, -0.011816703714430332, -0.08549068123102188, -0.059370461851358414, -0.0252333153039217, -0.03542402759194374, 0.012590572237968445, 0.023042138665914536, 0.017155524343252182, 0.06726565212011337, -0.033911071717739105, 0.026328904554247856, 0.027754908427596092, 0.00009999418398365378, 0.05474464222788811, -0.02469421550631523, 0.016903365030884743, -0.0003290569584351033, -0.006903946399688721, 0.02872876450419426, 0.0038345595821738243, 0.034641463309526443, -0.01095588505268097, 0.012094948440790176, 0.012399278581142426, 0.01805112510919571, 0.024242067709565163, 0.02194654941558838, -0.04730159789323807, 0.05641411244869232, -0.018851077184081078, 0.006403975188732147, -0.015859946608543396, 0.03316329047083855, 0.07032634317874908, -0.029633060097694397, 0.00720827654004097, -0.051336146891117096, -0.024189896881580353 ]
4,576
optbinning.binning.distributed.binning_process_sketch
merge
Merge current instance with another BinningProcessSketch instance. Parameters ---------- bpsketch : object BinningProcessSketch instance.
def merge(self, bpsketch): """Merge current instance with another BinningProcessSketch instance. Parameters ---------- bpsketch : object BinningProcessSketch instance. """ if not self.mergeable(bpsketch): raise Exception("bpsketch does not share signature.") for name in self.variable_names: self._binned_variables[name].merge( bpsketch._binned_variables[name]) if self.verbose: logger.info("Sketch: current sketch was merged.")
(self, bpsketch)
[ 0.002705823164433241, -0.07508880645036697, -0.06220731511712074, 0.09496108442544937, -0.07991493493318558, -0.02045779675245285, -0.03871544823050499, 0.012739547528326511, 0.022870859131217003, -0.00017632207891438156, -0.03736697509884834, -0.0769340917468071, -0.015463113784790039, 0.04013489931821823, -0.050958190113306046, -0.02542586624622345, 0.03825412690639496, 0.01896737702190876, -0.02679208479821682, 0.016430113464593887, -0.011808034963905811, 0.034261930733919144, -0.0321505032479763, 0.04066719114780426, 0.014256582595407963, 0.007993267849087715, 0.02986164204776287, 0.035965267568826675, -0.04240601509809494, 0.05060332641005516, -0.0015647198306396604, -0.07214345037937164, 0.020670713856816292, -0.000936503114644438, 0.05929744616150856, 0.015667159110307693, 0.043257683515548706, 0.10475527495145798, -0.024006417021155357, 0.04343511536717415, 0.041305940598249435, -0.041589830070734024, 0.03640884533524513, 0.013094409368932247, 0.014292068779468536, 0.0019295624224469066, -0.0025283920112997293, 0.03131657466292381, 0.02017390727996826, 0.01089426502585411, 0.01428319700062275, -0.04982263222336769, -0.01691804826259613, 0.036000754684209824, -0.07558561861515045, 0.01813345029950142, 0.03555717691779137, 0.03465227782726288, -0.06799156963825226, 0.049219366163015366, 0.0024064083117991686, -0.01737936958670616, 0.04911290854215622, -0.050425898283720016, 0.010778934694826603, 0.017122093588113785, -0.07764381915330887, 0.009767577983438969, 0.0031604901887476444, 0.017024505883455276, 0.019357724115252495, 0.008352565579116344, -0.02530166320502758, 0.027679240331053734, -0.005708843003958464, -0.0033201780170202255, 0.02806958742439747, 0.022374052554368973, -0.007704942021518946, -0.026934029534459114, 0.05383257195353508, 0.013608959503471851, -0.05755862221121788, -0.023882215842604637, -0.003198194084689021, 0.01226048357784748, 0.02778569795191288, 0.042299557477235794, 0.014229968190193176, -0.05408097431063652, 0.02492905966937542, 0.07856645435094833, 0.019428696483373642, 0.06355579197406769, 0.06508170068264008, -0.070653036236763, -0.014673545956611633, 0.007580740377306938, -0.04811929538846016, -0.02141592465341091, -0.07075949013233185, -0.03206178545951843, -0.02840670756995678, -0.0372605137526989, -0.0022300861310213804, 0.00023079894890543073, 0.05131305009126663, 0.0055092331022024155, -0.023083776235580444, -0.004799508955329657, -0.021185263991355896, -0.015312297269701958, -0.025248434394598007, -0.010761191137135029, -0.01513486634939909, -0.03030521795153618, -0.009891779161989689, 0.06586239486932755, -0.0027235662564635277, 0.024361278861761093, -0.04613206535577774, 0.07991493493318558, -0.02091911807656288, 0.01863025687634945, -0.004462390206754208, -0.0057354578748345375, 0.06728184223175049, 0.07015622407197952, -0.0029320477042347193, -0.03488294035196304, 0.011577374301850796, -0.02890351414680481, -0.07601144909858704, -0.035965267568826675, 0.0013950513675808907, -0.05379708483815193, -0.005974989850074053, -0.041270457208156586, 0.02033359557390213, -0.019801301881670952, 0.00656494777649641, -0.04119948297739029, 0.00937722995877266, 0.015055022202432156, -0.04630949720740318, 0.04496102035045624, -0.01470016036182642, -0.009474816732108593, -0.031032685190439224, 0.009102211333811283, -0.015161480754613876, 0.03800572454929352, -0.008561046794056892, -0.0010496154427528381, -0.03768634796142578, 0.015267939306795597, 0.029098687693476677, 0.013883977197110653, -0.007185956463217735, -0.044002894312143326, 0.01670513115823269, 0.003630682360380888, 0.05535848066210747, -0.027235662564635277, -0.021806273609399796, -0.002765706041827798, 0.013697675429284573, -0.015498599968850613, 0.007531946990638971, -0.0021336080972105265, -0.014229968190193176, -0.043789975345134735, 0.028016358613967896, 0.030784282833337784, 0.00004162004915997386, 0.02272891439497471, -0.025479095056653023, -0.04740956798195839, 0.06657212227582932, 0.0073855663649737835, 0.018026992678642273, 0.006338723469525576, -0.013493629172444344, -0.034226443618535995, -0.02111429162323475, 0.004670871887356043, -0.018914146348834038, -0.02281763032078743, 0.06295252591371536, 0.00817957054823637, 0.06533010303974152, -0.01084990706294775, -0.005988297052681446, 0.0009625633247196674, 0.027519552037119865, 0.011302356608211994, 0.0030872998759150505, -0.0005198174621909857, -0.02533715032041073, 0.030216503888368607, 0.03899933770298958, -0.03875093534588814, -0.04858061298727989, 0.03145851939916611, 0.025124233216047287, -0.005429389420896769, -0.007678327616304159, 0.02281763032078743, 0.04066719114780426, -0.022835372015833855, 0.04315122589468956, -0.04109302535653114, 0.02886802703142166, 0.04336414113640785, 0.08317966014146805, -0.05848126485943794, -0.005225343629717827, -0.02633076347410679, 0.003848035354167223, 0.02558555267751217, -0.0028588573914021254, -0.026987258344888687, 0.0004238937981426716, 0.0620298869907856, -0.0682399719953537, 0.02865510992705822, -0.039567116647958755, -0.0057354578748345375, 0.04932582378387451, -0.06713990122079849, 0.03358769416809082, -0.011320099234580994, -0.054187435656785965, 0.008095290511846542, 0.018665743991732597, 0.030464906245470047, -0.02310151979327202, -0.029595494270324707, -0.02136269584298134, -0.016305910423398018, 0.017716487869620323, 0.014363041147589684, 0.028832541778683662, -0.023704783990979195, -0.028353476896882057, -0.014540472067892551, 0.02704048715531826, -0.013804133981466293, -0.004413596820086241, 0.020511025562882423, 0.03628464415669441, -0.009953880682587624, 0.005451568402349949, 0.014380784705281258, -0.002936483360826969, 0.018364110961556435, -0.01949966885149479, -0.032700538635253906, -0.013404914177954197, 0.009661119431257248, 0.03332154452800751, 0.03553943336009979, 0.04272539168596268, 0.05227117985486984, -0.0016900304472073913, 0.030056815594434738, 0.00014776676835026592, 0.01482436154037714, -0.01297907903790474, -0.05798446014523506, -0.02372252754867077, -0.0329134538769722, 0.013227482326328754, 0.022835372015833855, -0.03553943336009979, -0.021894987672567368, -0.018142322078347206, 0.06501072645187378, 0.009989366866648197, 0.008290464989840984, 0.10532305389642715, 0.008969138376414776, 0.005540283862501383, -0.02542586624622345, 0.011595116928219795, -0.0012664139503613114, 0.027466323226690292, -0.0745210275053978, 0.013236354105174541, -0.056387580931186676, 0.008144084364175797, 0.03970906138420105, 0.05088721588253975, 0.070653036236763, -0.049503255635499954, 0.04038330167531967, 0.02141592465341091, 0.01884317398071289, -0.00395005801692605, -0.007691634818911552, 0.02778569795191288, 0.0033800608944147825, -0.003932314924895763, 0.0353265181183815, -0.03541523218154907, -0.06909164041280746, 0.11831100285053253, -0.022249849513173103, -0.01698014885187149, -0.010495045222342014, -0.018186679109930992, 0.012810519896447659, 0.06987233459949493, 0.06664308905601501, -0.048261240124702454, -0.09070274233818054, 0.01215402502566576, 0.008357001468539238, -0.05440035089850426, 0.01629703864455223, -0.053442224860191345, -0.06515267491340637, 0.025603296235203743, 0.016758359968662262, 0.00692424550652504, 0.010574889369308949, -0.02439676597714424, 0.008791707456111908, -0.007531946990638971, 0.04659338667988777, -0.07707604020833969, 0.0075940475799143314, 0.07998590171337128, 0.08523786067962646, 0.021398181095719337, -0.009669991210103035, -0.02691628597676754, -0.031369805335998535, 0.042264070361852646, -0.024787113070487976, 0.01428319700062275, 0.019357724115252495, -0.05440035089850426, 0.012881492264568806, 0.04315122589468956, 0.018435083329677582, -0.007549690082669258, 0.02824701927602291, 0.018648000434041023, -0.038608990609645844, -0.04311573877930641, 0.0396735779941082, -0.055713340640068054, -0.012003208510577679, 0.05063881352543831, 0.00019919405167456716, -0.02178853005170822, -0.02017390727996826, 0.05035492405295372, -0.002488470170646906, 0.0023176928516477346, 0.018949633464217186, -0.02691628597676754, 0.039531633257865906, -0.005544719286262989, 0.022675685584545135, -0.09091565757989883, 0.019109321758151054, -0.04854512959718704, -0.060681410133838654, -0.010317614302039146, -0.02248051017522812, 0.01296133641153574, -0.0095901470631361, -0.02405964769423008, 0.06533010303974152, -0.03417321667075157, -0.006476232316344976, 0.04183823615312576, -0.008880422450602055, 0.003734922967851162, -0.005234215408563614, -0.008059804327785969, 0.021557869389653206, -0.009306257590651512, 0.03591204062104225, -0.04442872852087021, -0.0843861922621727, 0.055677853524684906, 0.04613206535577774, 0.04311573877930641, 0.0496097132563591, -0.012375813908874989, 0.027838926762342453, -0.03662176430225372, -0.018825432285666466, 0.04240601509809494, -0.0267033688724041, 0.03383609652519226, -0.02334992215037346, 0.020227136090397835, -0.05106464773416519, -0.03309088572859764, 0.01515260897576809, -0.020298108458518982, -0.04957422614097595, -0.03135206177830696, 0.005682228598743677, -0.004151885863393545, -0.008086418733000755, -0.009838550351560116, -0.029506778344511986, -0.05440035089850426, -0.004340406507253647, -0.0012320366222411394, 0.003009673673659563, 0.05773605406284332, -0.02033359557390213, 0.04794186353683472, 0.008232799358665943, 0.02682757005095482, 0.0819021612405777, -0.02091911807656288, 0.009820806793868542, -0.06891421228647232, -0.0006831094506196678, -0.018931889906525612, 0.03679919242858887, 0.0038258563727140427, 0.0002988603664562106, -0.010965237393975258, 0.014354169368743896, -0.0006847728509455919, 0.05904904380440712, 0.027484064921736717, -0.01751244254410267, 0.019730329513549805, -0.022374052554368973, 0.07501783967018127, -0.007390002254396677, 0.030464906245470047, 0.04393192008137703, 0.01700676418840885, -0.032576337456703186, -0.04144788533449173, -0.04716116562485695, -0.05748765170574188, -0.041270457208156586, -0.04570623114705086, 0.015809103846549988, 0.012411300092935562, -0.024982288479804993, 0.012508886866271496, 0.006423003040254116, 0.0019439785974100232, -0.04247698560357094, -0.004901532083749771, -0.08303771913051605, 0.05017749220132828, 0.011089438572525978, -0.016438985243439674, -0.023616069927811623, -0.0155074717476964, 0.07814062386751175, -0.018435083329677582, -0.03383609652519226, 0.0310149434953928, -0.04662887379527092, 0.010104697197675705, 0.038076698780059814, 0.02136269584298134, -0.032647307962179184, 0.00915544107556343, -0.05063881352543831, 0.015658287331461906, -0.015356655232608318, 0.024698399007320404, 0.028690597042441368, -0.010184540413320065, -0.005602384451776743, -0.08353452384471893, -0.02741309255361557, -0.0792761817574501, 0.026277534663677216, 0.006396388169378042, -0.009448202326893806, 0.027058230713009834, 0.015063893981277943, 0.010858778841793537, -0.016447855159640312, 0.02278214320540428, -0.04765797406435013, -0.05113562196493149, -0.007057318929582834, -0.01706886477768421, 0.0035685815382748842, 0.0007745972834527493, -0.0241838488727808, 0.03319734334945679, -0.06266863644123077, -0.04198018088936806, 0.02129172347486019, -0.026224305853247643, -0.013706546276807785, 0.018648000434041023, 0.030943971127271652, -0.0020892503671348095, 0.03754440322518349, -0.056458551436662674, 0.053193822503089905, -0.06650114804506302, -0.08779287338256836, -0.024325793609023094, 0.04336414113640785, 0.051951803267002106, -0.03690565377473831, -0.019907761365175247, 0.0008333713631145656, -0.02899223007261753, -0.00564230652526021, 0.01745034195482731, 0.011045081540942192, 0.010645861737430096, -0.03440387547016144, 0.0043381885625422, -0.006538333371281624, -0.021061062812805176, -0.002994148526340723, -0.026721112430095673, 0.012473400682210922, -0.0012032041558995843, -0.01838185451924801, 0.0198367889970541, 0.0002165212936233729, 0.03754440322518349, 0.01041520107537508, 0.011453172191977501, -0.01875445991754532, -0.06398162990808487, -0.01319199614226818, 0.0004213986685499549, -0.010548274032771587, 0.021398181095719337, -0.009474816732108593, 0.02940032072365284, 0.07374033331871033, -0.018435083329677582, -0.03465227782726288, -0.042547959834337234, 0.0032802559435367584, 0.00648953951895237, 0.007212570868432522, -0.01198546588420868, 0.06689149886369705, 0.03655079007148743, -0.07036914676427841, -0.03651530295610428, 0.011062824167311192, 0.04758699983358383, -0.004074259661138058, 0.009071161039173603, -0.009093339554965496, -0.009093339554965496, -0.007567433174699545, -0.044996507465839386, -0.01871897280216217, -0.06884323805570602, -0.022374052554368973, 0.004622078035026789, -0.021557869389653206, 0.03179563954472542, 0.0359475240111351, -0.021522382274270058, -0.06412357091903687, 0.043754491955041885, 0.003096171421930194, 0.011408815160393715, 0.058658696711063385, -0.04790637642145157, 0.003506480483338237, -0.08225702494382858, 0.05958133935928345, 0.024166105315089226, -0.012393556535243988, 0.02253374084830284, 0.03651530295610428, -0.07019171118736267, -0.03603624179959297, 0.08062465488910675, -0.0069774747826159, -0.04911290854215622, 0.020511025562882423, 0.01900286227464676, -0.0621008574962616, -0.044038381427526474, 0.044535186141729355, -0.0016512174624949694, -0.010157926008105278, 0.01695353351533413, -0.057665083557367325, 0.017991505563259125, -0.004493440501391888, 0.004273869562894106, -0.007225878536701202, 0.0031028250232338905, -0.011515273712575436, -0.03207952901721001, 0.007908987812697887, 0.022764399647712708, 0.04858061298727989, 0.06366225332021713, 0.016252681612968445, -0.00523865083232522, 0.009448202326893806, -0.010078081861138344, -0.005305187776684761, 0.01745034195482731, -0.04102205112576485, 0.031529493629932404, 0.06745927780866623, 0.03442161902785301, 0.010690218769013882, -0.0071682133711874485, 0.0020304762292653322, -0.031245602294802666, 0.030287476256489754, -0.021061062812805176, -0.023828987032175064, 0.03871544823050499, 0.011373328976333141, -0.012792776338756084, -0.020599741488695145, 0.08871550858020782, -0.04073816165328026, 0.016838204115629196, 0.009856292977929115, 0.04694825038313866, -0.02837122045457363, -0.05525201931595802, 0.02551458030939102, 0.011462043970823288, -0.0458836629986763, 0.010965237393975258, -0.0303939338773489, -0.015312297269701958, -0.04992908984422684, -0.010876521468162537, -0.01345814298838377, -0.0043182275258004665, 0.005970553960651159, -0.017113221809267998, -0.0557488277554512, -0.06423003226518631, -0.00471966527402401, -0.0026570295449346304, 0.041554346680641174, 0.04567074403166771, 0.014442885294556618, 0.045777205377817154, 0.018931889906525612, -0.07395324856042862, -0.004449083004146814, -0.0056378706358373165, 0.00029996930970810354, -0.001977246953174472, 0.03113914467394352, -0.012118538841605186, 0.03701211139559746, 0.025993645191192627, 0.021540125831961632, -0.02704048715531826, 0.031955327838659286, -0.055677853524684906, -0.029347091913223267, -0.05283895879983902, -0.05361965671181679, -0.02803410217165947, 0.007638405542820692, 0.004693050403147936, -0.04858061298727989, 0.05773605406284332, -0.004429121967405081, -0.004200679250061512, -0.03743794560432434, 0.013644445687532425, 0.07040462642908096, -0.017468083649873734, 0.009696605615317822, 0.016900304704904556, 0.039602603763341904, -0.026472708210349083, -0.00515437126159668, 0.08105049282312393, 0.026188818737864494, -0.03362317755818367, 0.015915563330054283, 0.03970906138420105, -0.0718240812420845, -0.048758044838905334, -0.030074559152126312, -0.035255543887615204, 0.008951394818723202, -0.015498599968850613, 0.011515273712575436, -0.01868348754942417, 0.04435775429010391, -0.041518859565258026, 0.023420894518494606, 0.044748105108737946, 0.027430836111307144, 0.0060415263287723064, -0.01809796504676342, -0.006578254979103804, 0.012730675749480724, 0.05773605406284332, 0.02272891439497471, -0.057168275117874146, -0.009093339554965496, -0.04740956798195839, 0.010335356928408146, -0.040596216917037964, 0.07899229228496552, 0.09758706390857697, -0.034723252058029175, 0.042264070361852646, 0.0016822678735479712, 0.07579853385686874, -0.03672822192311287, 0.026774341240525246, 0.04283184930682182, -0.0023797936737537384, 0.0161462239921093, -0.06547204405069351, 0.02496454492211342, 0.007341208402067423, -0.0011433211620897055, 0.04613206535577774, 0.011195897124707699, -0.017370497807860374, 0.00866306945681572, -0.007203699555248022, -0.057168275117874146, -0.00344659760594368, 0.024006417021155357, 0.055926259607076645, 0.013254097662866116, 0.04616755247116089, -0.03051813691854477, -0.06497523933649063, 0.0029253941029310226, 0.06898517906665802, 0.059120018035173416, 0.0029741874895989895, -0.017024505883455276, 0.05067430064082146, 0.031777895987033844, 0.06036203354597092, -0.018080221489071846, 0.013573473319411278, -0.10461333394050598, 0.008818321861326694, -0.0025949287228286266, -0.00856991857290268, 0.017051121219992638, 0.06231377646327019, 0.021256236359477043, -0.031494006514549255, -0.009945008903741837 ]
4,577
optbinning.binning.distributed.binning_process_sketch
mergeable
Check whether two BinningProcessSketch instances can be merged. Parameters ---------- bpsketch : object BinningProcessSketch instance. Returns ------- mergeable : bool
def mergeable(self, bpsketch): """Check whether two BinningProcessSketch instances can be merged. Parameters ---------- bpsketch : object BinningProcessSketch instance. Returns ------- mergeable : bool """ return self.get_params() == bpsketch.get_params()
(self, bpsketch)
[ 0.040890902280807495, -0.050824057310819626, -0.06496915221214294, 0.09420701861381531, -0.04829689487814903, -0.026991505175828934, -0.021164990961551666, 0.009406662546098232, -0.012293594889342785, 0.01099491398781538, 0.003656927729025483, -0.04875318706035614, 0.019269617274403572, 0.01921696960926056, -0.03927632421255112, -0.0660572350025177, 0.022533871233463287, -0.00866957288235426, 0.021252738311886787, 0.020568298175930977, -0.017014475539326668, 0.05300022289156914, -0.0008012554608285427, 0.03329186141490936, 0.011723228730261326, 0.056404873728752136, 0.04155779257416725, 0.02386764995753765, -0.031378939747810364, 0.09982293844223022, -0.029097475111484528, -0.06310887634754181, 0.061634697020053864, 0.019234519451856613, 0.06247708573937416, 0.06556583940982819, 0.04829689487814903, 0.11954884976148605, -0.06303867697715759, -0.018637826666235924, -0.034748490899801254, -0.051245249807834625, 0.052614130079746246, -0.0027333726175129414, -0.002026995411142707, -0.015443773940205574, -0.03702995926141739, 0.06746121495962143, -0.012407668866217136, 0.0012021574657410383, 0.04341806471347809, -0.062161192297935486, -0.007142745424062014, 0.04878828674554825, -0.0958917960524559, 0.008077269420027733, 0.035046838223934174, 0.05991482362151146, -0.03938162326812744, 0.013004359789192677, -0.014504862949252129, 0.007296305615454912, 0.08234339207410812, -0.037310753017663956, 0.02118254080414772, -0.00796758383512497, -0.09153945744037628, -0.021428236737847328, 0.007327017839998007, 0.07988642901182175, -0.0008763903169892728, 0.013311480171978474, -0.038118042051792145, 0.044295553117990494, -0.02804449014365673, -0.02535937912762165, 0.042294882237911224, 0.047454506158828735, 0.02437659353017807, -0.043698862195014954, 0.03234417736530304, -0.006353007163852453, -0.017523419111967087, -0.033098816871643066, 0.000687730556819588, -0.008573049679398537, 0.032660070806741714, 0.037100158631801605, 0.023253409191966057, -0.04770020395517349, 0.002900094958022237, 0.07237514108419418, 0.052649229764938354, 0.00877048447728157, 0.042891573160886765, -0.008880170062184334, -0.010266600176692009, 0.013557177037000656, -0.04892868548631668, -0.04594522714614868, -0.07300693541765213, 0.003577953903004527, -0.012153197079896927, -0.025499776005744934, 0.00597568741068244, -0.0018898879643529654, 0.0031106919050216675, 0.01138100866228342, -0.057001564651727676, -0.019410016015172005, -0.019199419766664505, -0.022604068741202354, -0.025534875690937042, 0.002487676218152046, -0.005032388959079981, -0.03246702626347542, -0.011117761954665184, 0.03064185194671154, -0.042294882237911224, -0.00993315503001213, -0.020340152084827423, 0.06984797865152359, -0.004799854941666126, -0.03353755921125412, 0.04798099771142006, -0.007195394951850176, 0.06184529513120651, 0.09210105240345001, 0.004181226249784231, -0.030115358531475067, 0.027553096413612366, -0.011591605842113495, -0.054825399070978165, -0.015057679265737534, -0.019287167116999626, -0.0724453404545784, 0.00376661354675889, -0.001995186321437359, 0.022042477503418922, 0.018427230417728424, 0.01679510436952114, -0.0242888443171978, 0.03759155049920082, 0.01178465224802494, -0.05289492756128311, 0.04352336376905441, -0.005909875966608524, -0.02300771325826645, 0.029395820572972298, 0.052649229764938354, 0.010687793605029583, -0.00598884979262948, -0.02479778788983822, -0.01724262349307537, -0.055211491882801056, -0.0016639350214973092, 0.013390454463660717, 0.006747876293957233, 0.029817013069987297, -0.06275787949562073, 0.01683020405471325, 0.005501844454556704, 0.028149787336587906, -0.0016200606478378177, -0.004301880951970816, -0.007155907806009054, -0.005686116870492697, -0.0029044824186712503, 0.03299351781606674, 0.013390454463660717, 0.005716828629374504, 0.018655376508831978, 0.01998915709555149, -0.0009816887322813272, -0.00722171925008297, 0.05275452882051468, -0.015645595267415047, -0.014706685207784176, 0.025025933980941772, -0.01178465224802494, 0.012969260104000568, -0.006111698225140572, -0.009678683243691921, -0.013697574846446514, -0.006567991338670254, 0.034748490899801254, -0.01059127040207386, -0.03762665018439293, 0.037942543625831604, 0.004310655873268843, 0.01039822306483984, -0.03903063014149666, 0.0038631372153759003, -0.008340515196323395, -0.01436446513980627, -0.0051245251670479774, 0.006475855130702257, 0.024832887575030327, -0.01739179529249668, 0.04015381261706352, 0.03959222137928009, -0.05686116963624954, -0.05675587058067322, 0.05447440221905708, 0.019708361476659775, -0.006357394624501467, -0.02356930449604988, 0.0313262902200222, 0.04078560322523117, -0.02321830950677395, 0.004078121390193701, -0.07518310099840164, 0.02220042608678341, 0.058826740831136703, 0.08367717266082764, -0.02518388070166111, 0.024148447439074516, 0.004598032683134079, -0.050473060458898544, 0.035906773060560226, 0.039065729826688766, -0.03685446083545685, 0.05573798343539238, 0.06251218169927597, -0.02944846823811531, 0.041066400706768036, -0.02041035145521164, 0.011530181393027306, 0.03385345637798309, -0.04991146922111511, 0.015628045424818993, -0.03213357925415039, -0.034923989325761795, 0.026482563465833664, -0.0022419795859605074, 0.0052210488356649876, -0.018357031047344208, -0.015794768929481506, -0.02390274964272976, 0.008853845298290253, 0.04801609739661217, 0.032572321593761444, 0.022955063730478287, -0.032624971121549606, 0.0009520735475234687, -0.06714531779289246, 0.024920634925365448, -0.01551397331058979, -0.0062433211132884026, 0.005800189916044474, 0.024306394159793854, -0.0031896657310426235, -0.02177923172712326, -0.008037782274186611, 0.0047515928745269775, -0.002136681228876114, -0.060581713914871216, -0.0417683906853199, 0.019655711948871613, 0.014346915297210217, 0.028658730909228325, 0.03783724457025528, 0.037521351128816605, 0.061599597334861755, -0.02032260224223137, -0.004659456666558981, 0.010161301121115685, 0.023832552134990692, -0.035345181822776794, -0.044295553117990494, 0.03766174986958504, -0.039486922323703766, -0.0045409961603581905, 0.012319919653236866, -0.025376928970217705, -0.022568969056010246, 0.03699485957622528, 0.018339481204748154, 0.010485971346497536, 0.028816677629947662, 0.07574468851089478, 0.021621283143758774, -0.017058350145816803, -0.02723720110952854, -0.015110328793525696, -0.016637155786156654, 0.02497328445315361, -0.02688620612025261, 0.004769142717123032, -0.038714732974767685, -0.023042812943458557, 0.04359356313943863, 0.06110820546746254, 0.04934987798333168, -0.026868656277656555, 0.022270623594522476, 0.0835367813706398, -0.025324279442429543, -0.0008292253478430212, -0.04292667284607887, 0.009748882614076138, 0.004755980335175991, -0.025376928970217705, -0.009187290444970131, -0.0061029233038425446, -0.033432260155677795, 0.08473016321659088, -0.031220993027091026, -0.007028672378510237, 0.027202101424336433, -0.012784987688064575, 0.030747151002287865, 0.05489559844136238, 0.033520009368658066, -0.024323944002389908, -0.051631346344947815, 0.01088961586356163, 0.0259911697357893, -0.045488934963941574, 0.04232998192310333, -0.054825399070978165, -0.006800525356084108, -0.013855522498488426, 0.018936172127723694, -0.017049575224518776, -0.05777375400066376, 0.009327688254415989, 0.007748211733996868, -0.02386764995753765, 0.07009367644786835, -0.09217125177383423, -0.0033454198855906725, 0.10010373592376709, 0.07223474234342575, -0.005172786768525839, -0.02279711700975895, -0.007002347614616156, -0.03436239808797836, 0.05229823663830757, -0.007182232569903135, 0.010354348458349705, -0.011942599900066853, -0.024359043687582016, 0.002362634288147092, 0.041487593203783035, 0.02058584801852703, -0.02604381926357746, 0.09561099857091904, 0.016093114390969276, -0.05314062163233757, -0.03787234425544739, 0.05475519970059395, -0.028693830594420433, -0.024938184767961502, 0.03924122452735901, -0.0034923988860100508, -0.026868656277656555, 0.018760675564408302, 0.06170489639043808, 0.03280046954751015, 0.06026581674814224, -0.006892661564052105, -0.01712854951620102, 0.043909456580877304, -0.018163984641432762, 0.05275452882051468, -0.06686452031135559, -0.006945311091840267, -0.030396156013011932, -0.08044802397489548, -0.03383590653538704, -0.001251516048796475, -0.011802202090620995, -0.0434531643986702, 0.00164090096950531, 0.07427051663398743, -0.03209847956895828, -0.018971271812915802, 0.02676335908472538, -0.0001812559348763898, -0.013969595544040203, 0.020954392850399017, 0.009327688254415989, 0.010406997986137867, -0.032449476420879364, 0.024780238047242165, -0.06654862314462662, -0.04232998192310333, 0.0447518453001976, 0.024025598540902138, 0.04443594813346863, 0.021042142063379288, -0.06756651401519775, 0.024990834295749664, -0.07434071600437164, -0.03548558056354523, 0.037345852702856064, 0.0019041470950469375, 0.02262161858379841, -0.04064520448446274, 0.034151799976825714, -0.020305052399635315, 0.004216325934976339, 0.0015498617431148887, -0.03583657741546631, -0.010433322750031948, -0.02455209009349346, 0.03332696110010147, -0.005164011847227812, -0.02625441551208496, -0.018655376508831978, -0.03825844079256058, -0.044295553117990494, 0.0030010060872882605, -0.06037111580371857, 0.02076134644448757, 0.03043125569820404, 0.007932484149932861, 0.01463648583739996, -0.007173457648605108, 0.054193608462810516, 0.07469170540571213, -0.01840968057513237, 0.0008045460563153028, -0.05791415274143219, -0.01647043414413929, 0.00589232612401247, 0.06152939796447754, 0.024008048698306084, -0.030694501474499702, -0.015645595267415047, -0.01512787863612175, 0.039908114820718765, 0.02369215339422226, 0.006436368450522423, -0.026271965354681015, 0.0076560755260288715, -0.03204583004117012, 0.05257903039455414, 0.01014375127851963, 0.03357265889644623, 0.03273027017712593, 0.0024898697156459093, -0.02867628075182438, -0.008007070049643517, -0.052017439156770706, -0.047033313661813736, -0.019708361476659775, -0.006927761249244213, 0.002996618626639247, 0.01584741845726967, 0.028237536549568176, -0.02169148251414299, -0.01031047385185957, -0.012969260104000568, -0.03780214861035347, 0.008893332444131374, -0.06770691275596619, 0.009661133401095867, 0.022639168426394463, 0.00001943497045431286, -0.021656382828950882, -0.06089760735630989, 0.06844399869441986, -0.012425217777490616, -0.0011429269798099995, 0.01742689497768879, -0.021129891276359558, 0.018672926351428032, 0.06770691275596619, 0.017707690596580505, -0.05475519970059395, -0.00048015001812018454, -0.035222332924604416, 0.029939861968159676, 0.012030349113047123, 0.039486922323703766, 0.06675922125577927, -0.021129891276359558, 0.002294628880918026, -0.121865414083004, -0.01069656852632761, -0.07946524024009705, 0.015180528163909912, 0.00424484396353364, -0.05935323238372803, -0.034660741686820984, -0.0006537279114127159, -0.007520065177232027, -0.034327298402786255, 0.010196400806307793, -0.05226313695311546, -0.022832216694951057, 0.004192194901406765, 0.01227604504674673, -0.008603761903941631, 0.012179521843791008, -0.01482953317463398, 0.023885199800133705, -0.0404697060585022, 0.0005388319841586053, 0.052473731338977814, -0.005624692887067795, -0.019796110689640045, 0.012609490193426609, -0.021235188469290733, -0.006822462659329176, -0.009222390130162239, -0.08444936573505402, 0.05826514586806297, -0.05177174136042595, -0.07469170540571213, -0.005651017185300589, 0.06640823185443878, 0.05749296024441719, -0.0030712049920111895, 0.019146770238876343, -0.03320411592721939, -0.0121444221585989, -0.016189638525247574, 0.05847574397921562, -0.004878828767687082, 0.04383925721049309, -0.04878828674554825, -0.021551083773374557, -0.004690168891102076, 0.00008966821769718081, -0.012056673876941204, -0.036117371171712875, -0.04254057630896568, -0.0046813939698040485, -0.007033059373497963, -0.009266264736652374, 0.03371305763721466, -0.00877048447728157, 0.04124189540743828, -0.013250055722892284, 0.04018891230225563, -0.05672077089548111, -0.0080992067232728, 0.02228817343711853, -0.02530672959983349, 0.03234417736530304, -0.0033059329725801945, 0.03383590653538704, 0.1031222939491272, 0.022726917639374733, -0.025815673172473907, 0.01105633843690157, -0.00845897663384676, -0.0016683224821463227, 0.0455942340195179, -0.0011160540161654353, 0.00039870821638032794, 0.06682942062616348, -0.049665775150060654, -0.014803208410739899, -0.024429243057966232, 0.03934652358293533, 0.016926728188991547, 0.006585541181266308, -0.010459646582603455, -0.009476860985159874, -0.018514979630708694, -0.05331612005829811, -0.027588196098804474, -0.021796781569719315, -0.010003353469073772, 0.02786899171769619, 0.0014643067261204123, 0.02369215339422226, 0.005966912489384413, -0.07149765640497208, -0.053842611610889435, 0.03745115175843239, -0.006528504658490419, 0.015092778950929642, 0.045102838426828384, -0.09933155030012131, -0.00625209603458643, -0.04682271555066109, 0.03787234425544739, 0.03448524698615074, -0.015241951681673527, 0.020357701927423477, -0.004576095379889011, -0.09954214096069336, -0.03448524698615074, 0.06602213531732559, -0.013750223442912102, -0.04419025406241417, 0.03678426146507263, 0.013688799925148487, -0.07174334675073624, -0.016400234773755074, 0.058440644294023514, 0.04001341387629509, -0.017146099358797073, 0.01849742978811264, -0.052228037267923355, 0.037310753017663956, -0.028658730909228325, -0.017611166462302208, -0.047875698655843735, 0.006603091023862362, -0.025289179757237434, -0.05380751192569733, 0.023130562156438828, -0.005958138033747673, 0.02276201732456684, 0.042891573160886765, 0.011433657258749008, -0.0034221999812871218, -0.04064520448446274, 0.01263581495732069, -0.010810641571879387, -0.009099542163312435, -0.006410043686628342, 0.059212833642959595, 0.032151129096746445, 0.05457970127463341, 0.039522022008895874, 0.02667560987174511, 0.014899731613695621, -0.04833199456334114, -0.005791415460407734, -0.024218644946813583, -0.04352336376905441, 0.05756315961480141, -0.01883087493479252, 0.015628045424818993, -0.018006036058068275, 0.09876995533704758, -0.03211602941155434, 0.016575733199715614, -0.019761011004447937, 0.04404985532164574, -0.007195394951850176, 0.002935194643214345, 0.0349590890109539, -0.022253073751926422, -0.05398301035165787, -0.01942756585776806, -0.030097810551524162, -0.014794433489441872, -0.034116700291633606, 0.009450537152588367, 0.016909178346395493, 0.043874356895685196, -0.012407668866217136, -0.03601207211613655, -0.028184887021780014, -0.007401604205369949, -0.04696311429142952, 0.00733140530064702, -0.0017045187996700406, 0.04720880836248398, 0.02646501362323761, 0.020445451140403748, -0.0028518333565443754, -0.0460154265165329, -0.012706014327704906, -0.011600379832088947, 0.007936871610581875, -0.005668567027896643, 0.0029286134522408247, -0.03587167337536812, -0.012653364799916744, 0.000820450484752655, 0.03485378995537758, -0.03857433423399925, 0.02962396666407585, -0.02306036278605461, -0.04201408475637436, -0.019743461161851883, -0.04292667284607887, -0.03934652358293533, -0.005479907151311636, -0.009301363490521908, -0.04254057630896568, 0.03787234425544739, 0.000399530865252018, -0.03467829152941704, 0.002492063445970416, 0.03571372851729393, 0.04015381261706352, -0.0016222543781623244, -0.00722171925008297, 0.012539291754364967, 0.01933981664478779, -0.012416443787515163, -0.03167728707194328, 0.07149765640497208, 0.04015381261706352, -0.009898055344820023, 0.010731668211519718, -0.023639503866434097, 0.013057009316980839, -0.04636642336845398, -0.014188967645168304, -0.016242288053035736, -0.0022704980801790953, -0.04373396188020706, 0.036327969282865524, -0.04352336376905441, 0.04875318706035614, -0.06145920231938362, 0.0026938854716718197, 0.07054996490478516, -0.011003688909113407, -0.04759490489959717, 0.009406662546098232, 0.029799463227391243, -0.03130874037742615, 0.026868656277656555, -0.02249877154827118, -0.041663091629743576, 0.01178465224802494, -0.005278085358440876, -0.016961826011538506, -0.07135725766420364, 0.042084284126758575, 0.04264587536454201, -0.027377599850296974, 0.008423876948654652, -0.00042612969991751015, 0.0575280599296093, -0.06970757991075516, 0.03395875170826912, 0.004218519665300846, 0.015206852927803993, 0.012425217777490616, -0.07679767906665802, 0.05096445605158806, 0.012706014327704906, -0.002263916889205575, 0.018725575879216194, -0.012328694574534893, -0.015206852927803993, -0.003560404060408473, 0.04436575248837471, -0.05665057152509689, 0.04615582525730133, -0.013013134710490704, 0.018339481204748154, 0.028184887021780014, 0.02360440418124199, -0.013048234395682812, -0.061985693871974945, -0.03702995926141739, 0.05847574397921562, 0.025464678183197975, 0.031519338488578796, -0.04204918444156647, 0.05714196339249611, 0.03983791545033455, -0.013250055722892284, 0.0029198385309427977, -0.010775541886687279, -0.0882401093840599, -0.008116756565868855, 0.008722222410142422, -0.011047563515603542, -0.001068340614438057, 0.04141739383339882, 0.023025263100862503, -0.019287167116999626, 0.01969081163406372 ]
4,581
optbinning.binning.distributed.binning_process_sketch
solve
Solve optimal binning for all variables using added data. Returns ------- self : BinningProcessSketch Current fitted binning process.
def solve(self): """Solve optimal binning for all variables using added data. Returns ------- self : BinningProcessSketch Current fitted binning process. """ time_init = time.perf_counter() # Check if data was added if not self._n_add: raise NotDataAddedError( "No data was added. Add data before solving.") for i, name in enumerate(self.variable_names): if self.verbose: logger.info("Binning variable ({} / {}): {}." .format(i, self._n_variables, name)) self._binned_variables[name].solve() if self.verbose: logger.info("Binning process variable selection...") # Compute binning statistics and decide whether a variable is selected self._binning_selection_criteria() self._time_streaming_solve += time.perf_counter() - time_init self._n_solve += 1 # Completed successfully self._is_solved = True return self
(self)
[ 0.03692469000816345, -0.059036776423454285, -0.08282239735126495, 0.05483512207865715, -0.057256415486335754, -0.00458888104185462, -0.0662294328212738, -0.049885720014572144, 0.0007238280959427357, -0.042230166494846344, -0.03439657762646675, 0.0005135229439474642, -0.02962520904839039, -0.017928237095475197, -0.08253754675388336, 0.031263142824172974, 0.01031719334423542, 0.012756288051605225, -0.07541609555482864, 0.027364151552319527, -0.04048541188240051, 0.017678985372185707, 0.015702785924077034, 0.09115449339151382, 0.015898624435067177, -0.011679168790578842, 0.03792169317603111, -0.021257512271404266, -0.03756561875343323, 0.015462436713278294, -0.052164580672979355, -0.009124350734055042, -0.008683711290359497, -0.024106090888381004, 0.03749440610408783, 0.008470067754387856, 0.0408770926296711, 0.057256415486335754, -0.009845397435128689, -0.004508764483034611, 0.027239525690674782, -0.0790480375289917, 0.023340534418821335, 0.032776448875665665, -0.010878006927669048, -0.039381589740514755, -0.014554452151060104, 0.058502666652202606, 0.013308200053870678, -0.011785990558564663, -0.015008444897830486, -0.07342209666967392, 0.018765006214380264, 0.018782809376716614, -0.0054434542544186115, 0.03802851587533951, 0.019779812544584274, -0.0029709776863455772, 0.03033735416829586, -0.028450170531868935, 0.004154917784035206, -0.014741390012204647, 0.018658185377717018, -0.0017770229605957866, 0.0011316420277580619, 0.020848028361797333, -0.06758251041173935, 0.0031534647569060326, 0.012239983305335045, 0.03845579922199249, 0.05116758123040199, 0.0007076935726217926, 0.025085289031267166, 0.027132704854011536, -0.01890743523836136, -0.005545825231820345, 0.013886816799640656, -0.043939314782619476, -0.02043854631483555, -0.0010209258180111647, 0.06925605237483978, 0.01967298984527588, -0.05536923184990883, -0.08880441635847092, -0.026883453130722046, -0.02880624309182167, 0.05273429676890373, 0.05925041809678078, 0.029447173699736595, -0.08111325651407242, 0.02068779617547989, 0.05996256321668625, 0.026171309873461723, 0.11315975338220596, 0.06936287134885788, -0.06676354259252548, -0.007931509055197239, -0.01375329028815031, -0.042443808168172836, -0.03005249612033367, -0.05504876747727394, 0.04561285302042961, -0.017465343698859215, 0.04005812481045723, 0.018978649750351906, -0.022112086415290833, 0.011741481721401215, -0.03418293595314026, -0.01604105345904827, -0.025565985590219498, -0.03334616497159004, 0.05839584767818451, -0.06843708455562592, 0.017011350020766258, -0.0663362592458725, 0.02090143971145153, -0.054194193333387375, 0.035357970744371414, 0.00471350597217679, 0.07449030876159668, -0.023358337581157684, 0.055689696222543716, -0.024088285863399506, 0.017785808071494102, -0.01649504527449608, 0.027097096666693687, 0.030266139656305313, 0.034022700041532516, 0.005706057418137789, -0.08474519103765488, 0.04796293005347252, -0.03386246785521507, 0.0024702511727809906, 0.07619945704936981, -0.01837332732975483, -0.010290487669408321, -0.0042862193658947945, -0.02220110408961773, -0.035856474190950394, -0.002764010801911354, 0.07733888924121857, -0.023109087720513344, 0.005848486442118883, -0.021257512271404266, 0.01933472231030464, 0.037351977080106735, 0.027720224112272263, -0.03920355439186096, -0.002407938474789262, -0.03363102301955223, -0.007214913610368967, -0.03167262673377991, -0.02447996661067009, 0.015854116529226303, 0.010548640042543411, 0.003745434805750847, 0.046503033488988876, -0.01364646852016449, -0.03510872274637222, -0.06327403336763382, -0.050882723182439804, 0.002345625776797533, 0.008292032405734062, -0.03113851696252823, -0.05682912841439247, 0.03336396813392639, -0.03158360719680786, 0.0017469794256612659, -0.018043959513306618, 0.016833314672112465, 0.007246070075780153, -0.01890743523836136, -0.08032989501953125, 0.05999816954135895, -0.05269869044423103, 0.0383133739233017, 0.022094281390309334, -0.03363102301955223, 0.02221890725195408, 0.025904254987835884, -0.01175038330256939, -0.018462345004081726, -0.021488958969712257, -0.04037858918309212, -0.019263507798314095, 0.0241951085627079, 0.03393368422985077, -0.03653300926089287, 0.023126890882849693, 0.026919061318039894, -0.0484970360994339, -0.03088926523923874, 0.05294794216752052, -0.022913247346878052, -0.012987734749913216, 0.011803794652223587, 0.009702968411147594, 0.032010894268751144, -0.04315595328807831, -0.03671104833483696, 0.05326840654015541, -0.04636060446500778, 0.05401615798473358, 0.012898716144263744, -0.030693426728248596, -0.018943043425679207, -0.0434408113360405, 0.028610404580831528, 0.04486510157585144, 0.03945280238986015, -0.016503948718309402, -0.04746442660689354, 0.020723404362797737, 0.058609489351511, 0.0483546108007431, -0.0133883161470294, 0.058253418654203415, -0.05066907778382301, 0.028147509321570396, -0.0027016981039196253, 0.0014788125408813357, -0.03167262673377991, 0.018132979050278664, 0.03728076443076134, -0.054479051381349564, -0.005648195743560791, 0.0035451441071927547, 0.037886086851358414, 0.05131001025438309, -0.06971894204616547, 0.019726401194930077, -0.03087146207690239, -0.05540483817458153, -0.050348613411188126, 0.01686001941561699, 0.024301929399371147, -0.03395148739218712, 0.02520991489291191, 0.011964026838541031, -0.034058310091495514, 0.009240074083209038, -0.027150508016347885, 0.005875191651284695, -0.026384951546788216, -0.0509539358317852, -0.03361321985721588, 0.03866944462060928, 0.0011772637953981757, 0.023287123069167137, -0.003723180154338479, 0.03576745465397835, -0.029375959187746048, -0.010281586088240147, -0.0037765910383313894, 0.03724515438079834, -0.054229799658060074, -0.009978923946619034, 0.014705782756209373, 0.01800835318863392, 0.021239709109067917, -0.005207556299865246, 0.044758278876543045, 0.012916520237922668, 0.01988663338124752, -0.039915695786476135, 0.0293047446757555, -0.055476054549217224, -0.012542644515633583, -0.004041419830173254, 0.010708872228860855, -0.00966736115515232, 0.019299114122986794, 0.026580791920423508, 0.025619396939873695, -0.03877626731991768, 0.021827228367328644, 0.012569350190460682, 0.0561525896191597, -0.0074597131460905075, 0.004904895089566708, 0.03898990899324417, 0.06533925235271454, -0.0025147602427750826, -0.03156580403447151, -0.025904254987835884, 0.0034494497813284397, -0.03493068739771843, 0.01629030518233776, 0.02189844287931919, -0.056508664041757584, -0.02830774150788784, 0.026954667642712593, 0.09564100205898285, 0.0382777638733387, 0.02501407451927662, 0.008443363010883331, -0.0013931326102465391, 0.0015344488201662898, 0.02273521199822426, -0.004824778530746698, 0.026954667642712593, -0.04212334379553795, -0.011136159300804138, -0.002321145962923765, -0.018132979050278664, -0.02318030223250389, 0.056971557438373566, -0.017678985372185707, 0.03316812962293625, -0.0038945400156080723, 0.000923562329262495, 0.003638613037765026, 0.11173546314239502, 0.03400489687919617, 0.0024813783820718527, -0.08723769336938858, -0.020331723615527153, 0.0006626281538046896, -0.045292388647794724, 0.037387583404779434, -0.028254332020878792, -0.0025503672659397125, 0.055974554270505905, -0.027666812762618065, -0.03525115177035332, 0.029197923839092255, 0.03386246785521507, -0.027666812762618065, 0.008345442824065685, -0.040414199233055115, 0.01323698554188013, -0.006422652862966061, 0.049636468291282654, 0.03368443250656128, 0.005915250163525343, -0.019210096448659897, 0.05668669939041138, 0.001629030448384583, 0.028984280303120613, -0.034022700041532516, 0.06405739486217499, 0.050882723182439804, -0.02118629775941372, 0.03663983196020126, 0.01033499650657177, -0.006298027466982603, 0.008590242825448513, -0.007704512681812048, 0.00400581257417798, 0.009649557061493397, 0.0058529372327029705, -0.009471521712839603, -0.05786173790693283, 0.0007950425497256219, 0.035820867866277695, -0.018925238400697708, 0.02323371358215809, -0.025049680843949318, 0.015026248060166836, -0.01584521494805813, -0.06836587190628052, 0.0058929952792823315, -0.04514995962381363, 0.04796293005347252, 0.014376415871083736, -0.03372003883123398, -0.045826494693756104, 0.027168311178684235, 0.004457579459995031, -0.014937230385839939, 0.004584429785609245, -0.04774928465485573, -0.030141513794660568, -0.024675805121660233, -0.008496773429214954, 0.04408174380660057, -0.028895260766148567, 0.004980560392141342, 0.04201652482151985, -0.038883086293935776, 0.03877626731991768, -0.030212728306651115, -0.06092396005988121, -0.009507128968834877, 0.005470159463584423, -0.0006398172699846327, 0.0022699604742228985, -0.040948305279016495, 0.09621071815490723, 0.009021979756653309, 0.02120410092175007, -0.0038322273176163435, 0.025174306705594063, 0.026082290336489677, -0.00529657443985343, -0.01835552416741848, 0.09970022737979889, 0.0019005355425179005, -0.01287201140075922, 0.004319601226598024, -0.0319218747317791, -0.036390580236911774, -0.02399926818907261, 0.04547042399644852, -0.00798937026411295, -0.08723769336938858, 0.017082564532756805, 0.01046852394938469, 0.0017603321466594934, -0.016735395416617393, -0.03699590638279915, 0.0019839899614453316, 0.019067667424678802, 0.0005204774788580835, -0.08332090079784393, 0.022806426510214806, -0.015738392248749733, -0.03596329689025879, 0.060033779591321945, -0.007958214730024338, 0.03626595810055733, 0.046004533767700195, 0.02245035395026207, -0.0006209009443409741, -0.038135334849357605, 0.012649466283619404, 0.0012184346560388803, -0.015133069828152657, -0.018302112817764282, 0.0344499871134758, -0.04187409579753876, -0.03952401876449585, -0.03496629372239113, 0.005505766719579697, -0.006266871467232704, -0.026847846806049347, -0.009329092688858509, -0.024106090888381004, -0.0004832011472899467, -0.008964118547737598, 0.03959523141384125, 0.011670267209410667, 0.04383249208331108, -0.03603450953960419, -0.018996452912688255, -0.03699590638279915, -0.007312833331525326, -0.013824504800140858, -0.09806229174137115, -0.001551139634102583, 0.04685910418629646, -0.00835434440523386, 0.023304928094148636, -0.003059995826333761, -0.01697574369609356, -0.0036185840144753456, -0.047820501029491425, -0.039167944341897964, 0.013272592797875404, -0.001001453143544495, -0.0031979738269001245, 0.00674756895750761, -0.023910250514745712, 0.03268742933869362, -0.05757687985897064, -0.0789056047797203, 0.013219181448221207, -0.014180576428771019, 0.008456715382635593, 0.011554543860256672, 0.033809058368206024, -0.013156868517398834, -0.01110945362597704, -0.08431790769100189, 0.05971331149339676, -0.009774182923138142, -0.03542918711900711, 0.023322731256484985, 0.02960740588605404, -0.04429538547992706, -0.023055676370859146, -0.017500950023531914, -0.0204029381275177, 0.041945308446884155, 0.004495412111282349, -0.027880456298589706, 0.04974329099059105, 0.012952127493917942, -0.005314378067851067, -0.019067667424678802, 0.04141119867563248, 0.023055676370859146, 0.03206430375576019, 0.02346516028046608, -0.015453535132110119, 0.022076478227972984, 0.00023673239047639072, 0.0026260328013449907, 0.06654989719390869, -0.07032426446676254, -0.011785990558564663, 0.015818508341908455, -0.03501970320940018, 0.005545825231820345, 0.017500950023531914, -0.0058929952792823315, -0.04696592688560486, 0.04977889731526375, -0.05155925825238228, 0.05027740076184273, -0.031031694263219833, -0.10083965957164764, -0.030177121981978416, -0.011260784231126308, 0.04792732372879982, 0.034521203488111496, -0.011385409161448479, 0.009266779758036137, -0.053410835564136505, -0.0017258375883102417, -0.011073846369981766, 0.059535276144742966, 0.02579743228852749, -0.029180118814110756, 0.002474701963365078, 0.01121627539396286, -0.039167944341897964, -0.033809058368206024, -0.019726401194930077, 0.05148804560303688, 0.03411171957850456, -0.030746838077902794, 0.032028697431087494, 0.06558850407600403, 0.07669796049594879, 0.002204309683293104, 0.03984448313713074, -0.03642619028687477, -0.08132689446210861, -0.011946223676204681, -0.029696423560380936, 0.04486510157585144, 0.035536009818315506, -0.021595781669020653, 0.02702588215470314, 0.06922043859958649, 0.018765006214380264, 0.03713833540678024, 0.02957179956138134, -0.008843944407999516, 0.02218330092728138, 0.05761248618364334, 0.03699590638279915, 0.05309037119150162, 0.06768932938575745, -0.09236513823270798, -0.023020070046186447, 0.0036697695031762123, -0.006979015655815601, 0.008955216966569424, -0.032794252038002014, -0.02214769273996353, 0.017251700162887573, -0.01337941363453865, -0.0713924840092659, -0.026189113035798073, -0.01632591150701046, 0.020972654223442078, 0.034539006650447845, 0.0032536101061850786, 0.04938722029328346, 0.035518206655979156, -0.027987277135252953, -0.061101995408535004, 0.028984280303120613, 0.00044759392039850354, -0.016450537368655205, -0.04005812481045723, -0.06484075635671616, 0.013308200053870678, -0.035357970744371414, -0.028218723833560944, -0.022361336275935173, -0.02342955209314823, -0.022254513576626778, 0.053161583840847015, -0.07427667081356049, -0.009889906272292137, 0.028717225417494774, 0.023002266883850098, -0.018765006214380264, 0.029785441234707832, -0.002608229173347354, -0.023554177954792976, -0.02216549590229988, 0.028895260766148567, -0.05248504504561424, 0.0007427444215863943, 0.04671667516231537, -0.04899553954601288, -0.05558287352323532, -0.0050250692293047905, -0.019975652918219566, 0.06174292415380478, -0.01937032863497734, -0.0031245339196175337, -0.028414564207196236, 0.038242157548666, -0.015204284340143204, -0.010664363391697407, 0.015569258481264114, -0.016984645277261734, 0.04945843294262886, 0.04742882028222084, -0.05227140337228775, -0.004891542252153158, -0.008915158919990063, -0.0022833130788058043, 0.02424851804971695, 0.022272318601608276, 0.014794801361858845, 0.008634751662611961, 0.011162864044308662, -0.009480423294007778, -0.014278496615588665, -0.019014257937669754, 0.08054354041814804, -0.034806061536073685, 0.011510035023093224, -0.0005663774209097028, -0.028681619092822075, 0.020242705941200256, 0.012231080792844296, 0.00173473940230906, 0.002367880428209901, 0.028432367369532585, 0.046574246138334274, 0.01071777381002903, -0.03186846524477005, -0.03309691324830055, 0.04717957228422165, 0.044758278876543045, -0.00919556524604559, -0.02399926818907261, 0.041945308446884155, -0.014892720617353916, -0.01965518668293953, 0.0005316046881489456, 0.03493068739771843, 0.016797708347439766, -0.058538272976875305, -0.024907251819968224, -0.0816117525100708, 0.014047049917280674, 0.05159486457705498, 0.005207556299865246, 0.036568619310855865, -0.0008662570035085082, 0.019975652918219566, -0.030907070264220238, -0.056116983294487, 0.045292388647794724, -0.010922515764832497, -0.09158177673816681, -0.012916520237922668, 0.012649466283619404, -0.019566169008612633, 0.035304561257362366, 0.017260601744055748, 0.023091284558176994, 0.02065218985080719, -0.05811098963022232, -0.07181976735591888, 0.0022154368925839663, -0.046787891536951065, 0.01768788881599903, -0.06419982016086578, -0.020313920453190804, -0.022895444184541702, -0.015595964156091213, 0.053624477237463, -0.05084711313247681, -0.019779812544584274, 0.013708780519664288, 0.04155362769961357, 0.04383249208331108, -0.022254513576626778, -0.01439421996474266, 0.01910327561199665, 0.026705417782068253, -0.05017057806253433, -0.0022143241949379444, 0.05326840654015541, 0.005452355835586786, 0.03980887681245804, -0.04717957228422165, 0.0032714137341827154, -0.051879722625017166, 0.0459333173930645, -0.041945308446884155, 0.054443445056676865, -0.017670083791017532, -0.01261385902762413, 0.004651193507015705, 0.0009046460036188364, 0.031209731474518776, -0.05633062869310379, 0.03160141035914421, 0.00878608226776123, 0.05002814903855324, 0.03539358079433441, 0.0010387294460088015, -0.020456349477171898, 0.0014231761451810598, 0.023928053677082062, 0.09086963534355164, -0.05123879387974739, -0.0019216773798689246, -0.037387583404779434, 0.014750292524695396, 0.009774182923138142, 0.05999816954135895, 0.033577609807252884, -0.00954273622483015, 0.02444435842335224, 0.01743863709270954, 0.04465145617723465, -0.07292359322309494, 0.01661076955497265, 0.04863946512341499, 0.01183940190821886, -0.011447722092270851, -0.03610572591423988, -0.02780924178659916, 0.02243255078792572, 0.01730510964989662, 0.06519682705402374, 0.034574612975120544, -0.023287123069167137, 0.00726387370377779, -0.00328031531535089, -0.032509393990039825, -0.0036853475030511618, 0.00681878300383687, 0.011269685812294483, 0.008073938079178333, 0.047856107354164124, -0.01451884489506483, 0.014581157825887203, -0.04639621078968048, 0.05921481177210808, 0.07420545071363449, 0.058751918375492096, 0.06541047245264053, -0.0006309154559858143, 0.002726177917793393, 0.05326840654015541, 0.0011099439579993486, 0.024889448657631874, -0.04643181711435318, 0.00509183295071125, -0.02396366186439991, 0.027987277135252953, 0.04810535907745361, -0.04660985618829727, 0.006894448772072792, 0.023785624653100967, 0.021880637854337692 ]
4,582
optbinning.binning.distributed.binning_process_sketch
summary
Binning process summary with main statistics for all binned variables. Parameters ---------- df_summary : pandas.DataFrame Binning process summary.
def summary(self): """Binning process summary with main statistics for all binned variables. Parameters ---------- df_summary : pandas.DataFrame Binning process summary. """ self._check_is_solved() df_summary = pd.DataFrame.from_dict(self._variable_stats).T df_summary.reset_index(inplace=True) df_summary.rename(columns={"index": "name"}, inplace=True) df_summary["selected"] = self._support columns = ["name", "dtype", "status", "selected", "n_bins"] columns += _METRICS[self._target_dtype]["metrics"] return df_summary[columns]
(self)
[ 0.020191555842757225, -0.019767215475440025, 0.0013194350758567452, -0.03857966139912605, 0.019006937742233276, 0.001194563927128911, 0.004051129799336195, -0.021941961720585823, -0.012889355421066284, -0.018617957830429077, -0.06792990863323212, 0.028236351907253265, -0.036917660385370255, -0.036953020840883255, -0.036917660385370255, 0.02376309223473072, 0.03783706575632095, -0.010175341740250587, 0.00012569995305966586, 0.008106679655611515, -0.04784443974494934, 0.030039802193641663, 0.013720356859266758, 0.020173875615000725, -0.00884927622973919, -0.013676154427230358, 0.01641668938100338, -0.0799882635474205, 0.010652725584805012, 0.017901882529258728, -0.05629589781165123, -0.04600562900304794, 0.00825254712253809, -0.01586858183145523, -0.027918096631765366, 0.021252408623695374, 0.013596590608358383, 0.0052379583939909935, 0.002607928588986397, 0.04650069400668144, 0.02501843310892582, -0.06354505568742752, -0.03978196159005165, -0.0015537065919488668, 0.01197879109531641, -0.019413597881793976, 0.04894065484404564, 0.02477090060710907, 0.04077209159731865, -0.03292178362607956, -0.03240903839468956, -0.020067788660526276, -0.01734493486583233, 0.045545924454927444, -0.0016233250498771667, 0.018211297690868378, 0.0018553865374997258, -0.02369236759841442, 0.005640198010951281, 0.019944023340940475, -0.0040533398278057575, 0.06892003864049911, -0.010440554469823837, -0.05081482604146004, 0.018140574917197227, -0.04784443974494934, -0.045192308723926544, 0.009521149098873138, 0.007403864990919828, -0.022171813994646072, 0.022260216996073723, -0.022507749497890472, 0.03301018849015236, 0.09901288151741028, -0.027210861444473267, -0.06573747843503952, -0.05003686621785164, -0.03474291414022446, 0.001962576759979129, -0.028289394453167915, 0.05954917520284653, 0.021429216489195824, 0.020828066393733025, -0.03447769954800606, -0.03196701779961586, -0.045227669179439545, 0.018812447786331177, 0.0799882635474205, 0.05555329844355583, -0.029756907373666763, 0.046040989458560944, 0.037554170936346054, 0.022366302087903023, 0.07079420983791351, 0.00818624347448349, -0.027812011539936066, -0.05891266465187073, 0.01189038623124361, -0.0834537148475647, -0.04296451807022095, -0.043530307710170746, 0.05410346761345863, 0.005569474771618843, 0.0815441831946373, -0.04699575901031494, 0.01670842431485653, 0.020951833575963974, -0.03748345002532005, -0.02360396459698677, 0.051840316504240036, -0.014816571027040482, 0.0030587909277528524, -0.01755710504949093, -0.053997382521629333, -0.01286283414810896, -0.030623270198702812, -0.02508915774524212, 0.013985569588840008, -0.04957716539502144, 0.036068979650735855, 0.031100653111934662, 0.00840283464640379, 0.018653320148587227, -0.015426560305058956, -0.04105498269200325, 0.052017126232385635, 0.005874469876289368, -0.02540741302073002, 0.003823488485068083, -0.026344498619437218, 0.044060733169317245, -0.04215119779109955, 0.00803595595061779, 0.0823221430182457, 0.03350525349378586, -0.06510096788406372, -0.0009774207137525082, -0.015081783756613731, 0.025548860430717468, -0.008044796995818615, 0.05417419224977493, 0.028360119089484215, -0.037200555205345154, -0.035662319511175156, 0.04901137575507164, 0.037978511303663254, 0.007912189699709415, 0.006338592618703842, -0.027210861444473267, -0.09066750854253769, -0.0013404310448095202, -0.04996614530682564, -0.045333754271268845, -0.03562695533037186, 0.03552087023854256, 0.027122456580400467, 0.0878385677933693, -0.04727865010499954, -0.04752618446946144, -0.05077946558594704, 0.015205550007522106, -0.014294984750449657, -0.011386481113731861, -0.04158541187644005, -0.07461328059434891, 0.007969653233885765, -0.027405351400375366, -0.029297204688191414, -0.035856809467077255, 0.009423905052244663, -0.01609843410551548, 0.007624876219779253, -0.00809341948479414, 0.10283195227384567, 0.02531900815665722, 0.060008879750967026, -0.005388245917856693, -0.007443646900355816, -0.005675559863448143, 0.020032428205013275, 0.02523060329258442, 0.006126421969383955, -0.0862826555967331, -0.04098426178097725, -0.04070136696100235, -0.0020034636836498976, 0.0016365856863558292, -0.04780907928943634, 0.015179028734564781, 0.03329308331012726, -0.021305451169610023, 0.002131650224328041, 0.021729791536927223, -0.036740850657224655, 0.035485509783029556, -0.045828819274902344, -0.03442465886473656, 0.005755123682320118, 0.010864895768463612, -0.05435100197792053, 0.04706647992134094, -0.013711515814065933, -0.007461328059434891, 0.07404749095439911, 0.004371595568954945, -0.026804201304912567, -0.027670564129948616, 0.01568293385207653, -0.021729791536927223, -0.02535437047481537, 0.006369533948600292, -0.060963645577430725, -0.01648741215467453, 0.06892003864049911, 0.043318137526512146, -0.01586858183145523, 0.021464578807353973, -0.05880657956004143, -0.00621924689039588, -0.0003461583110038191, 0.019395915791392326, -0.051981762051582336, 0.04688967391848564, 0.05063801631331444, -0.07075884938240051, 0.02416975237429142, 0.03921617195010185, -0.020881108939647675, 0.0787859633564949, -0.03361133858561516, 0.020881108939647675, -0.05456317216157913, -0.04720792919397354, 0.030216610059142113, 0.01668190211057663, 0.06273173540830612, -0.005189335905015469, 0.003399147652089596, 0.03163107857108116, -0.03861502557992935, -0.04254017770290375, -0.052547551691532135, 0.027882734313607216, 0.0030433200299739838, -0.04151468724012375, -0.07086493074893951, 0.0009862611768767238, 0.03865038603544235, -0.021570663899183273, 0.013375579379498959, 0.043530307710170746, -0.04151468724012375, 0.001678577740676701, -0.02538973279297352, 0.013525866903364658, -0.05488142743706703, -0.04254017770290375, 0.007143072318285704, -0.005410346668213606, -0.013950208202004433, -0.0069839442148804665, -0.013402100652456284, 0.028360119089484215, 0.060892920941114426, -0.022543111816048622, 0.03260352835059166, -0.029774587601423264, -0.0048445588909089565, -0.015081783756613731, -0.03488435968756676, 0.026733478531241417, -0.018087532371282578, -0.020315321162343025, -0.007784003857523203, -0.052653636783361435, -0.028890544548630714, 0.026821883395314217, -0.010626204311847687, -0.04844558984041214, -0.013225291855633259, 0.03468986973166466, -0.006674529053270817, 0.010352150537073612, -0.00017888069851323962, -0.00019932420400436968, 0.026026243343949318, -0.019696490839123726, 0.00019518025510478765, -0.0011161050060763955, -0.018405787646770477, -0.04282307252287865, -0.015064102597534657, 0.045652009546756744, 0.002937234938144684, -0.05470461770892143, 0.05081482604146004, -0.029014309868216515, -0.015117145143449306, -0.029986757785081863, 0.026344498619437218, -0.014966857619583607, -0.03240903839468956, 0.002378077246248722, 0.04766763001680374, -0.026733478531241417, -0.009096808731555939, 0.051592785865068436, -0.03306322917342186, 0.0073817637749016285, -0.052512191236019135, 0.01174009870737791, 0.028324756771326065, 0.12871675193309784, 0.04798588529229164, -0.011616332456469536, -0.05364376679062843, -0.036457959562540054, 0.0027560058515518904, 0.005436867941170931, 0.07217331975698471, -0.04193902760744095, -0.014675123617053032, 0.09222342818975449, -0.035025808960199356, 0.03232063353061676, 0.03801387548446655, -0.035379424691200256, -0.061635520309209824, 0.030039802193641663, -0.026751158758997917, -0.04713720455765724, -0.04597026854753494, 0.13154569268226624, 0.019749533385038376, -0.013207611627876759, -0.013817600905895233, -0.00211949460208416, 0.03332844376564026, -0.029138077050447464, -0.021535301581025124, -0.004941803868860006, 0.05569474771618843, 0.00418373616412282, 0.06382794678211212, 0.011218513362109661, -0.01656697690486908, -0.01162517350167036, -0.01695595681667328, 0.03428320959210396, -0.053891297429800034, -0.03232063353061676, 0.03214382380247116, -0.043742477893829346, 0.02447032742202282, 0.0834537148475647, 0.01630176417529583, 0.036917660385370255, 0.02475322037935257, -0.0018973785918205976, -0.01646089181303978, 0.025796392932534218, 0.007682338822633028, -0.02337411232292652, -0.006802715361118317, 0.029438652098178864, 0.007315460592508316, -0.027776649221777916, 0.03988804668188095, 0.02448800764977932, -0.010405193082988262, -0.009158691391348839, -0.029845312237739563, -0.030163567513227463, -0.006723151542246342, -0.05961989983916283, 0.026344498619437218, -0.022613834589719772, -0.028855182230472565, 0.02452336996793747, -0.05696776881814003, 0.01632828451693058, 0.0016498463228344917, -0.030623270198702812, 0.03292178362607956, 0.01755710504949093, -0.026892606168985367, -0.061352625489234924, -0.04087817668914795, -0.03301018849015236, -0.018105212599039078, -0.020898791030049324, 0.0004456132301129401, -0.0785030722618103, 0.019448958337306976, 0.0069574229419231415, -0.03329308331012726, 0.07425966113805771, 0.0019548414275050163, -0.027140138670802116, 0.012164440006017685, -0.005277740303426981, -0.04982469603419304, -0.04717256501317024, -0.026185370981693268, -0.01648741215467453, -0.05933700501918793, -0.009812884032726288, -0.0841609537601471, 0.01178430113941431, -0.04957716539502144, 0.04239873215556145, 0.012226322665810585, -0.03150731325149536, 0.036917660385370255, -0.04285843297839165, 0.053502317517995834, 0.014577878639101982, -0.029120396822690964, 0.06630326807498932, -0.03235599398612976, 0.05767500400543213, 0.022101089358329773, -0.021234726533293724, 0.026998691260814667, -0.03246207907795906, 0.009043766185641289, -0.011280396021902561, -0.00808899849653244, 0.037554170936346054, 0.03283337876200676, -0.0068203965201973915, -0.02556654065847397, -0.09484019875526428, 0.03209078311920166, 0.023073537275195122, -0.045192308723926544, -0.04038311168551445, -0.006254608277231455, -0.007660237606614828, 0.04908210039138794, -0.018653320148587227, 0.0040688104927539825, 0.0770886018872261, 0.045121584087610245, 0.01189038623124361, -0.028130266815423965, -0.008323270827531815, -0.035237979143857956, -0.09208197891712189, -0.012951239012181759, 0.03292178362607956, -0.052865806967020035, 0.020244598388671875, -0.021270088851451874, -0.015550326555967331, -0.0014023141702637076, -0.010131139308214188, -0.014745847322046757, -0.003657730296254158, 0.01572713628411293, 0.010864895768463612, -0.015276273712515831, -0.0777958333492279, 0.04678358510136604, -0.027847373858094215, -0.043671753257513046, 0.007580673787742853, -0.029862992465496063, -0.009397383779287338, 0.05505823343992233, 0.030269652605056763, -0.008986303582787514, 0.001888538128696382, -0.06655079871416092, 0.0008768607513047755, 0.03306322917342186, -0.02378077246248722, 0.04133787751197815, -0.019183745607733727, 0.018034489825367928, -0.04632388427853584, -0.020333003252744675, 0.01203183364123106, 0.037059105932712555, -0.012977760285139084, 0.036846935749053955, 0.04264626279473305, 0.003841169411316514, 0.044378988444805145, -0.018564915284514427, 0.05742747336626053, -0.01607191190123558, -0.001656476641073823, 0.002296303166076541, 0.00021065100736450404, 0.036634765565395355, 0.02531900815665722, 0.04254017770290375, 0.026468265801668167, 0.00048014617641456425, 0.027635201811790466, 0.006922061555087566, -0.03992340713739395, 0.0033217938616871834, 0.019342873245477676, -0.01676146686077118, 0.028413161635398865, 0.02325034700334072, -0.037235915660858154, 0.0006961843464523554, -0.0010299107525497675, -0.036599405109882355, -0.06556067615747452, 0.03451306372880936, 0.02517756074666977, 0.03460146486759186, -0.044096093624830246, -0.013543548062443733, 0.007346402388066053, 0.017893042415380478, -0.029774587601423264, 0.004747313912957907, -0.019166065379977226, -0.0006326436996459961, -0.010635044425725937, -0.00860616471618414, -0.003503022715449333, 0.06375722587108612, -0.0022034787107259035, 0.04986006021499634, 0.005507591646164656, 0.026538988575339317, 0.04155004769563675, -0.002099603647366166, 0.04105498269200325, 0.004835718311369419, 0.04119643196463585, -0.0782201737165451, -0.04756154492497444, -0.019360555335879326, 0.01636364683508873, -0.015240911394357681, 0.029986757785081863, -0.053254786878824234, 0.03355829417705536, 0.03879183158278465, 0.044591158628463745, -0.03168412297964096, 0.052193932235240936, -0.02321498468518257, 0.00013605983986053616, 0.018370425328612328, -0.013393260538578033, 0.03194933384656906, 0.03327539935708046, 0.052158571779727936, 0.006564023904502392, 0.030729355290532112, 0.0012564469361677766, -0.01575365662574768, 0.0024355400819331408, -0.04671286419034004, 0.0787859633564949, 0.011315758340060711, -0.05569474771618843, 0.010078096762299538, -0.01177546102553606, 0.03826140612363815, -0.03826140612363815, -0.03182556852698326, -0.019219107925891876, -0.015179028734564781, -0.013181090354919434, -0.06683369725942612, 0.03258584812283516, -0.036599405109882355, 0.04123179242014885, 0.07012233883142471, -0.006723151542246342, 0.026715798303484917, -0.0857168659567833, -0.01680566929280758, 0.027034053578972816, -0.00836747232824564, -0.027635201811790466, 0.0782201737165451, -0.04706647992134094, -0.03361133858561516, 0.05070874094963074, 0.004336233716458082, -0.022366302087903023, -0.06457054615020752, 0.02524828538298607, -0.045475203543901443, 0.00597171438857913, -0.0036709909327328205, -0.0798468142747879, -0.03451306372880936, 0.05138061195611954, 0.03981732204556465, 0.0029615459498018026, 0.007576253730803728, 0.029138077050447464, -0.004946223925799131, 0.015249752439558506, 0.01648741215467453, 0.035237979143857956, 0.051875676959753036, -0.035538554191589355, 0.02528364583849907, 0.003180346917361021, 0.04066600650548935, 0.035167254507541656, 0.04642996937036514, -0.007072348613291979, -0.004411377478390932, 0.002464271616190672, -0.053042616695165634, 0.00417268555611372, -0.002006778959184885, 0.0069574229419231415, 0.025937838479876518, -0.029845312237739563, -0.009317819029092789, 0.007487849332392216, -0.003770445939153433, 0.009733320213854313, -0.011094747111201286, -0.008756452240049839, -0.007602775003761053, -0.04968325048685074, 0.0013912635622546077, 0.03410640358924866, -0.020138513296842575, -0.022383984178304672, -0.007841466926038265, 0.014206580817699432, 0.007275678683072329, -0.03543246537446976, 0.014047452248632908, 0.0804126039147377, -0.005591575521975756, 0.01605423167347908, -0.03226759284734726, 0.014091654680669308, -0.00842493586242199, -0.01744217984378338, -0.01670842431485653, 0.036846935749053955, 0.009706798940896988, -0.030092844739556313, -0.004349494352936745, -0.07206723093986511, 0.04727865010499954, 0.09130401909351349, 0.052547551691532135, -0.010573161765933037, 0.010449395515024662, 0.006674529053270817, -0.0036820415407419205, -0.0756741315126419, -0.027210861444473267, 0.01172241847962141, -0.03960515186190605, 0.03875647112727165, 0.04328277334570885, -0.025849435478448868, 0.059796709567308426, -0.027900416404008865, -0.00643141707405448, 0.09116257727146149, 0.012783270329236984, -0.05452780798077583, -0.022242536768317223, -0.04844558984041214, 0.05986743047833443, -0.03460146486759186, 0.03804923593997955, -0.004725213162600994, -0.03240903839468956, 0.04070136696100235, -0.01270370651036501, -0.03286873921751976, -0.01663769967854023, 0.03992340713739395, 0.01184618379920721, -0.03960515186190605, -0.022118771448731422, -0.028130266815423965, -0.014772368595004082, -0.045192308723926544, -0.04876384511590004, 0.05534112825989723, 0.03447769954800606, 0.006493300199508667, 0.030481822788715363, 0.03769562020897865, -0.0064535182900726795, 0.05176959186792374, -0.03127746284008026, 0.014029772020876408, -0.022596154361963272, 0.014560198411345482, 0.04653605446219444, 0.052370741963386536, 0.04809197038412094, -0.005392665974795818, 0.03942834585905075, -0.005352884065359831, 0.022171813994646072, 0.03346988931298256, 0.05088555067777634, -0.00007597249350510538, 0.052052486687898636, -0.018299702554941177, 0.06803599745035172, -0.043777838349342346, 0.01204067375510931, -0.02524828538298607, -0.04236336797475815, 0.015161347575485706, 0.04642996937036514, 0.027440713718533516, 0.026662753894925117, 0.03783706575632095, 0.04328277334570885, 0.027352308854460716, 0.028307076543569565, 0.015382358804345131, 0.03122442029416561, 0.04940035566687584, -0.020209236070513725, -0.028890544548630714, -0.009353181347250938, -0.001812289352528751, 0.04144396260380745, 0.06573747843503952, 0.03857966139912605, 0.010776491835713387, 0.03783706575632095, 0.026008563116192818, 0.012933557853102684, 0.015205550007522106, -0.003184766974300146, 0.026680435985326767, -0.02556654065847397, 0.037306640297174454, -0.01188154611736536, 0.01600118912756443, -0.060433220118284225, 0.044874053448438644, 0.04225728288292885, -0.02473554015159607, 0.03889791667461395, 0.029474012553691864, -0.007386184297502041, 0.044025372713804245, -0.036493320018053055, 0.036210425198078156, -0.035344064235687256, 0.030587907880544662, -0.04307060316205025, 0.01572713628411293, 0.051804956048727036, -0.028501564636826515, 0.04190366715192795, -0.03911008685827255, -0.026238413527607918 ]
4,583
optbinning.binning.distributed.binning_process_sketch
transform
Transform given data to metric using bins from each fitted optimal binning. Parameters ---------- X : {array-like, sparse matrix} of shape (n_samples, n_features) Training vector, where n_samples is the number of samples. metric : str (default="woe") The metric used to transform the input vector. Supported metrics are "woe" to choose the Weight of Evidence, "event_rate" to choose the event rate, "indices" to assign the corresponding indices of the bins and "bins" to assign the corresponding bin interval. metric_special : float or str (default=0) The metric value to transform special codes in the input vector. Supported metrics are "empirical" to use the empirical WoE or event rate and any numerical value. metric_missing : float or str (default=0) The metric value to transform missing values in the input vector. Supported metrics are "empirical" to use the empirical WoE or event rate and any numerical value. show_digits : int, optional (default=2) The number of significant digits of the bin column. Applies when ``metric="bins"``. check_input : bool (default=False) Whether to check input arrays. Returns ------- X_new : pandas.DataFrame, shape = (n_samples, n_features_new) Transformed array.
def transform(self, X, metric="woe", metric_special=0, metric_missing=0, show_digits=2, check_input=False): """Transform given data to metric using bins from each fitted optimal binning. Parameters ---------- X : {array-like, sparse matrix} of shape (n_samples, n_features) Training vector, where n_samples is the number of samples. metric : str (default="woe") The metric used to transform the input vector. Supported metrics are "woe" to choose the Weight of Evidence, "event_rate" to choose the event rate, "indices" to assign the corresponding indices of the bins and "bins" to assign the corresponding bin interval. metric_special : float or str (default=0) The metric value to transform special codes in the input vector. Supported metrics are "empirical" to use the empirical WoE or event rate and any numerical value. metric_missing : float or str (default=0) The metric value to transform missing values in the input vector. Supported metrics are "empirical" to use the empirical WoE or event rate and any numerical value. show_digits : int, optional (default=2) The number of significant digits of the bin column. Applies when ``metric="bins"``. check_input : bool (default=False) Whether to check input arrays. Returns ------- X_new : pandas.DataFrame, shape = (n_samples, n_features_new) Transformed array. """ self._check_is_solved() # Check X dtype if not isinstance(X, pd.DataFrame): raise TypeError("X must be a pandas.DataFrame.") n_samples, n_variables = X.shape # Check metric if metric not in ("event_rate", "woe"): raise ValueError('Invalid value for metric. Allowed string ' 'values are "event_rate" and "woe".') mask = self.get_support() if not mask.any(): warn("No variables were selected: either the data is" " too noisy or the selection_criteria too strict.", UserWarning) return np.empty(0).reshape((n_samples, 0)) selected_variables = self.get_support(names=True) for name in selected_variables: if name not in X.columns: raise ValueError("Selected variable {} must be a column " "in the input dataframe.".format(name)) n_selected_variables = len(selected_variables) if metric == "indices": X_transform = np.full( (n_samples, n_selected_variables), -1, dtype=int) elif metric == "bins": X_transform = np.full( (n_samples, n_selected_variables), "", dtype=object) else: X_transform = np.zeros((n_samples, n_selected_variables)) for i, name in enumerate(selected_variables): optb = self._binned_variables[name] x = X[name] params = {} if self.binning_transform_params is not None: params = self.binning_transform_params.get(name, {}) metric_missing = params.get("metric_missing", metric_missing) metric_special = params.get("metric_special", metric_special) tparams = { "x": x, "metric": metric, "metric_special": metric_special, "metric_missing": metric_missing, "check_input": check_input, "show_digits": show_digits } if metric is not None: tparams["metric"] = params.get("metric", metric) else: tparams.pop("metric") X_transform[:, i] = optb.transform(**tparams) return pd.DataFrame(X_transform, columns=selected_variables)
(self, X, metric='woe', metric_special=0, metric_missing=0, show_digits=2, check_input=False)
[ 0.013758806511759758, -0.030277490615844727, 0.02250518649816513, -0.02958752028644085, -0.02816699631512165, -0.047242626547813416, -0.026502951979637146, 0.012662972323596478, 0.01393129862844944, -0.01641721837222576, -0.039409440010786057, 0.015727248042821884, 0.029262829571962357, -0.018405955284833908, -0.044482748955488205, 0.037948329001665115, -0.014824200421571732, -0.004662368446588516, 0.05475112050771713, 0.02408805675804615, -0.014793760143220425, -0.07151332497596741, 0.009725527837872505, 0.04870373755693436, 0.004317383281886578, 0.043183982372283936, -0.04367101937532425, -0.021815216168761253, -0.013221035711467266, -0.018832111731171608, -0.05174772068858147, -0.059702664613723755, 0.05048954114317894, -0.042291078716516495, 0.024737440049648285, -0.06079849973320961, -0.016569416970014572, -0.009000045247375965, 0.0403023436665535, 0.038820937275886536, 0.01393129862844944, -0.09513463824987411, -0.019055338576436043, 0.0478920079767704, 0.008863065391778946, 0.031555965542793274, -0.0042894803918898106, 0.09172537177801132, -0.00624016672372818, -0.02104407362639904, -0.02656383067369461, -0.05211300030350685, 0.05471053346991539, 0.042575184255838394, -0.01728982664644718, 0.04411746934056282, 0.00812743604183197, 0.030581889674067497, 0.06372072547674179, -0.03640604391694069, 0.03995735943317413, 0.0600273571908474, 0.001670386060141027, -0.033463526517152786, 0.0011586162727326155, -0.023540141060948372, -0.026178259402513504, 0.010390130802989006, 0.0033103323075920343, 0.041844628751277924, 0.003414334962144494, -0.0013748659985139966, 0.04298105090856552, 0.054507602006196976, -0.0495966412127018, -0.008563741110265255, -0.04509154334664345, -0.005910401698201895, -0.027253801003098488, 0.01858859322965145, 0.08945253491401672, 0.03965296223759651, -0.009598694741725922, -0.01841610111296177, -0.022748704999685287, -0.03468111902475357, -0.0012974980054423213, 0.06583122164011002, 0.017655104398727417, -0.0498807467520237, 0.007939724251627922, -0.019522082060575485, 0.037481583654880524, 0.04862256720662117, 0.041844628751277924, -0.02439245581626892, -0.05872859060764313, 0.0412561260163784, 0.0020496156066656113, -0.040728501975536346, -0.023844538256525993, 0.049271948635578156, -0.01626501977443695, 0.0929429680109024, 0.017046308144927025, 0.014154523611068726, -0.0021409352775663137, -0.002209424739703536, -0.0312921516597271, -0.021145539358258247, -0.04237225279211998, 0.049150191247463226, -0.05686161294579506, -0.02536652982234955, -0.04756731912493706, -0.010927901603281498, 0.0008110948256216943, 0.021531110629439354, -0.10333310067653656, 0.025752101093530655, 0.031555965542793274, -0.02232254669070244, 0.007503419648855925, -0.04850080609321594, -0.03798891603946686, -0.006047381088137627, 0.0563339926302433, 0.002461821772158146, 0.03772510588169098, -0.015321384184062481, -0.04176345467567444, -0.04525389149785042, -0.01081628818064928, 0.07086393982172012, -0.028654033318161964, -0.06595297902822495, 0.02019175887107849, 0.02437216229736805, -0.0012905222829431295, -0.01913651078939438, 0.07695190608501434, 0.01769569143652916, 0.03393027186393738, -0.0008846577256917953, 0.04890666902065277, 0.0016006280202418566, 0.07650545239448547, 0.04630913957953453, -0.027375560253858566, -0.05166655033826828, -0.040139999240636826, 0.010430716909468174, -0.02072952874004841, -0.07557196915149689, 0.03841507434844971, 0.03861800581216812, 0.02420981600880623, -0.02435186877846718, -0.019816333428025246, -0.012297693639993668, -0.0025455313734710217, -0.004905886948108673, -0.054061148315668106, 0.036466922610998154, -0.021936975419521332, 0.05487287789583206, -0.019765600562095642, 0.02918165735900402, 0.022444305941462517, -0.0277408380061388, -0.017086895182728767, 0.0036096572875976562, -0.021734043955802917, 0.052884142845869064, 0.01888284459710121, 0.10430717468261719, 0.02510271780192852, -0.03222563862800598, 0.00004732443267130293, 0.08425746858119965, 0.02540711686015129, -0.008974678814411163, -0.011029367335140705, -0.07248739898204803, -0.05791686102747917, -0.04565975442528725, 0.019542375579476357, 0.0190147515386343, -0.044320400804281235, 0.008543447591364384, 0.03671044111251831, -0.028836671262979507, 0.019359735772013664, -0.007508493028581142, -0.022545771673321724, 0.0036680002231150866, -0.07618076354265213, 0.031698018312454224, -0.006422805599868298, -0.012602092698216438, 0.01118156686425209, -0.031008046120405197, 0.0467555895447731, 0.017797157168388367, -0.041844628751277924, -0.04060674086213112, -0.01902489736676216, 0.004857690539211035, -0.02175433747470379, -0.053208835422992706, 0.0693216547369957, -0.044036295264959335, -0.027639372274279594, 0.010045145638287067, 0.03890211135149002, 0.042291078716516495, 0.03522903844714165, -0.025021545588970184, -0.03159654885530472, -0.017198508605360985, 0.022606652230024338, -0.024778027087450027, -0.016001207754015923, 0.03628428652882576, 0.0380295030772686, 0.010273444466292858, 0.06769819557666779, -0.03332147374749184, 0.06124494969844818, -0.030663061887025833, 0.02816699631512165, -0.04525389149785042, -0.015351824462413788, -0.008386175148189068, -0.00641773222014308, -0.0044543626718223095, 0.023621313273906708, -0.006093040574342012, -0.020262785255908966, 0.016752056777477264, 0.011800509877502918, -0.03595959395170212, -0.018507421016693115, -0.017655104398727417, 0.0030160804744809866, -0.04192580282688141, 0.05036778375506401, 0.029486054554581642, -0.012957223691046238, -0.0021168370731174946, -0.004662368446588516, -0.012865904718637466, -0.020861433818936348, -0.01815228909254074, -0.021997855976223946, -0.03583783283829689, -0.04180404171347618, -0.008482567965984344, -0.005778495687991381, -0.00870579294860363, 0.04137788340449333, -0.00131525460164994, 0.012997809797525406, 0.015240211971104145, -0.050002504140138626, -0.006985942367464304, -0.03317942097783089, 0.014174817129969597, 0.06749526411294937, 0.015727248042821884, -0.10300840437412262, -0.009177610278129578, -0.02887725830078125, 0.018334928900003433, -0.014824200421571732, 0.028248168528079987, 0.016467951238155365, -0.02437216229736805, 0.004182940814644098, -0.010197345167398453, -0.00609811395406723, 0.01828419603407383, 0.01828419603407383, -0.018821965903043747, -0.06428893655538559, -0.030805114656686783, -0.02859315276145935, 0.032428573817014694, 0.017046308144927025, -0.04501037299633026, -0.059580907225608826, 0.004949009977281094, 0.021551404148340225, 0.011567138135433197, -0.04748614504933357, -0.019704720005393028, -0.04046468809247017, -0.06652119010686874, 0.05268121138215065, -0.03435643017292023, 0.008629693649709225, 0.028106115758419037, -0.02467656135559082, -0.012723851948976517, -0.01066408958286047, 0.014793760143220425, 0.018476981669664383, -0.06575004756450653, 0.008015823550522327, -0.02015117183327675, 0.027233507484197617, 0.03886152431368828, 0.05584695190191269, -0.060311462730169296, 0.011303326115012169, -0.06899696588516235, 0.05466994643211365, 0.036933667957782745, 0.053777046501636505, 0.07386733591556549, -0.016640443354845047, 0.0016818009316921234, 0.01110039371997118, -0.046227965503931046, -0.01828419603407383, 0.06006794422864914, 0.024920079857110977, -0.014621268026530743, -0.022464599460363388, -0.08312104642391205, 0.003888689214363694, 0.028207581490278244, 0.08023940771818161, 0.003678146982565522, -0.07869712263345718, -0.039409440010786057, -0.01233828067779541, 0.012460039928555489, -0.014682147651910782, -0.01494595967233181, -0.03393027186393738, 0.06639943271875381, 0.013373235240578651, 0.006341632455587387, 0.002922224346548319, -0.05430466681718826, -0.04683676362037659, -0.0041372813284397125, 0.013748659752309322, -0.005991574376821518, 0.0001525955303804949, -0.00598142808303237, 0.0333823524415493, 0.02871491201221943, 0.05174772068858147, -0.045335061848163605, 0.00913702417165041, -0.01037491112947464, 0.010349544696509838, -0.04180404171347618, 0.015240211971104145, 0.002167569939047098, -0.03407232463359833, 0.0030718869529664516, 0.03425496444106102, -0.021104954183101654, 0.010131392627954483, 0.031982120126485825, 0.01502713281661272, -0.0002167252969229594, 0.07480082660913467, -0.04935312271118164, -0.056658681482076645, 0.046065621078014374, 0.02567092888057232, -0.004819640889763832, -0.024554802104830742, -0.007249754387885332, -0.012622385285794735, -0.00033705777605064213, 0.05093599483370781, 0.06656177341938019, -0.06538476794958115, 0.02189638838171959, 0.05503522604703903, -0.03640604391694069, 0.028958430513739586, 0.0043884096667170525, 0.027355266734957695, -0.04801376909017563, -0.046958521008491516, 0.015098159201443195, -0.011130833998322487, -0.025772394612431526, -0.027679957449436188, -0.03088628686964512, 0.021652869880199432, 0.016894109547138214, -0.007346147205680609, -0.022708117961883545, -0.05264062434434891, 0.0015828715404495597, -0.03376792371273041, -0.021591991186141968, -0.07792598009109497, -0.03756275773048401, -0.0056516630575060844, -0.059296801686286926, 0.0022842560429126024, -0.026157965883612633, -0.009116730652749538, 0.09245593100786209, -0.004015521612018347, 0.008025970309972763, -0.028227875009179115, 0.042859289795160294, 0.01544314343482256, 0.0010457352036610246, 0.014438629150390625, 0.012277401052415371, 0.00980162713676691, 0.004390946589410305, 0.003130229888483882, -0.01988735981285572, 0.015240211971104145, -0.03539138287305832, -0.03827302157878876, -0.07086393982172012, -0.01285575795918703, 0.04078938066959381, -0.042169321328401566, -0.09854389727115631, -0.09091364592313766, -0.015290944837033749, -0.02552887611091137, -0.016062086448073387, -0.037664223462343216, 0.013048543594777584, 0.00971538107842207, 0.051585376262664795, -0.040850259363651276, -0.05264062434434891, 0.07191918790340424, 0.00898989848792553, -0.042006973177194595, -0.05527874454855919, -0.0557657815515995, 0.016640443354845047, -0.13036367297172546, -0.0350869856774807, 0.11145038902759552, 0.00036813176120631397, 0.03364616632461548, -0.035919006913900375, 0.005727762822061777, -0.004068791400641203, 0.018111702054739, -0.007807818241417408, 0.025163598358631134, 0.028329340741038322, -0.023540141060948372, -0.006737350486218929, -0.017391294240951538, 0.0037973695434629917, -0.015717102214694023, -0.016072234138846397, -0.015849009156227112, -0.040424104779958725, 0.007954943925142288, 0.047364383935928345, 0.016934696584939957, -0.031393617391586304, 0.013951592147350311, -0.0247983206063509, 0.03088628686964512, 0.05876917764544487, -0.057835690677165985, -0.016741910949349403, 0.03175889700651169, -0.005494390614330769, 0.0037999062333256006, -0.020962901413440704, 0.05300590395927429, 0.009740747511386871, -0.014103790745139122, 0.03449848294258118, 0.01931914873421192, -0.04149964451789856, 0.001648824429139495, 0.03202270716428757, -0.008715939708054066, 0.09026426076889038, 0.058972109109163284, 0.04024146497249603, -0.020364250987768173, 0.0287352055311203, 0.02991221286356449, 0.02857285924255848, 0.028654033318161964, 0.006478611845523119, 0.04423923045396805, 0.003277355805039406, -0.06453245133161545, -0.02524477057158947, 0.003916592337191105, -0.04525389149785042, -0.049271948635578156, 0.0247983206063509, -0.044888611882925034, -0.009928460232913494, -0.047080282121896744, -0.038983285427093506, 0.048257287591695786, 0.009593621827661991, 0.025427410379052162, -0.018223315477371216, -0.031109513714909554, 0.03760334476828575, -0.006209726445376873, -0.008289782330393791, 0.017492759972810745, -0.010674236342310905, 0.013880565762519836, -0.01138449925929308, 0.03246916085481644, 0.032712679356336594, -0.03078482113778591, 0.006671397481113672, 0.003574144095182419, -0.015615636482834816, -0.023398088291287422, -0.0034549215342849493, 0.0507330596446991, 0.055197570472955704, 0.008776819333434105, 0.007315707392990589, 0.02715233340859413, -0.052153587341308594, 0.017157921567559242, -0.024554802104830742, -0.029201949015259743, 0.036345165222883224, 0.0008148998022079468, 0.014316869899630547, 0.03453906625509262, 0.0484602190554142, 0.008624620735645294, 0.03934856131672859, 0.017066601663827896, -0.01947134919464588, -0.05511639639735222, 0.0050859893672168255, 0.03807009011507034, 0.09002074599266052, 0.07200036197900772, -0.029810747131705284, 0.028836671262979507, 0.07354264706373215, -0.03608135133981705, 0.011130833998322487, -0.06368013471364975, -0.04626855254173279, 0.032144468277692795, -0.016011353582143784, -0.021997855976223946, 0.040261756628751755, -0.018629180267453194, 0.022687824442982674, -0.04314339533448219, -0.016478098928928375, 0.0476079061627388, -0.005529903806746006, -0.03181977570056915, -0.047932595014572144, -0.022525480017066002, 0.02786259725689888, -0.0011288105743005872, -0.007249754387885332, -0.05584695190191269, -0.012460039928555489, -0.039531201124191284, -0.003837956115603447, -0.04440157487988472, -0.019684428349137306, 0.035310208797454834, -0.03918621689081192, -0.02469685487449169, 0.006255386397242546, -0.005352337844669819, 0.006032160948961973, 0.004616708494722843, -0.006514125037938356, 0.009497229009866714, 0.007823037914931774, 0.029993385076522827, -0.014347309246659279, -0.044766854494810104, -0.02571151591837406, 0.056212231516838074, -0.05816037952899933, 0.04643089696764946, 0.002343867439776659, 0.03048042394220829, 0.009410982951521873, 0.01845668815076351, 0.003051593666896224, -0.04261577129364014, 0.0019265880109742284, 0.01233828067779541, -0.02625943161547184, -0.006620664615184069, 0.010273444466292858, 0.019095923751592636, 0.024128643795847893, 0.0126122385263443, 0.02784230373799801, -0.03202270716428757, -0.01544314343482256, 0.01651868410408497, -0.025752101093530655, 0.028349634259939194, -0.018385661765933037, -0.021368766203522682, 0.03088628686964512, -0.027111748233437538, -0.034295547753572464, 0.0409720204770565, -0.0023946005385369062, -0.0293034166097641, -0.005905328318476677, -0.02741614542901516, -0.051138926297426224, 0.05978383868932724, -0.0003051910607609898, 0.02207902818918228, 0.02262694574892521, 0.0035690709482878447, 0.05178830772638321, -0.0027192921843379736, 0.0029399809427559376, 0.05385821685194969, 0.01888284459710121, 0.08377043157815933, -0.008406468667089939, 0.00985743384808302, -0.07118862867355347, 0.029425175860524178, 0.0057835690677165985, 0.012957223691046238, 0.007087408564984798, 0.008152802474796772, 0.0252244770526886, -0.0952158123254776, 0.02408805675804615, 0.05791686102747917, 0.0312921516597271, 0.016214286908507347, 0.04643089696764946, 0.023763366043567657, -0.023722779005765915, -0.029628107324242592, 0.07561255246400833, 0.0478920079767704, -0.010410424321889877, -0.0075541529804468155, 0.02871491201221943, 0.0003887420753017068, 0.01044086366891861, -0.025082426145672798, 0.03003397211432457, 0.018821965903043747, -0.02642177790403366, -0.07545021176338196, -0.012520919553935528, 0.019653987139463425, -0.026929108425974846, -0.002072445582598448, -0.030521009117364883, -0.058850351721048355, -0.011414938606321812, 0.026766762137413025, 0.010978634469211102, 0.011506258510053158, 0.025204185396432877, 0.07390792667865753, -0.03908475115895271, 0.005068232771009207, -0.041276417672634125, -0.035330504179000854, -0.020069999620318413, 0.048947256058454514, 0.0015359434764832258, 0.017198508605360985, -0.016721617430448532, 0.021084660664200783, 0.044888611882925034, -0.04334632679820061, -0.007188874762505293, 0.029688987880945206, -0.023560432717204094, 0.06359896808862686, -0.025082426145672798, -0.008984824642539024, 0.026584124192595482, 0.03709601238369942, -0.023174861446022987, -0.040728501975536346, -0.0168332289904356, 0.08226872980594635, -0.010877168737351894, 0.025589756667613983, 0.03307795524597168, -0.003353455336764455, 0.02425040304660797, 0.016802789643406868, 0.030216611921787262, -0.10528124868869781, 0.05211300030350685, -0.00884784571826458, 0.0015486266929656267, 0.044482748955488205, -0.0594591461122036, 0.023032810539007187, -0.014844493940472603, -0.029688987880945206, 0.03350411355495453, 0.05584695190191269, -0.016315752640366554, 0.016873816028237343, -0.019369883462786674, 0.05430466681718826, 0.012074468657374382, -0.007300487253814936, 0.07626193761825562, 0.0297295730561018, 0.01741158589720726, -0.02232254669070244, -0.017492759972810745, 0.03638575226068497, 0.01930900290608406, -0.021815216168761253, 0.032996781170368195, 0.033301182091236115, -0.027517613023519516, -0.013454407453536987, 0.04785142466425896, 0.030642768368124962, -0.012358573265373707, 0.017299974337220192, -0.03770481050014496, -0.02512301132082939, 0.02469685487449169, -0.0017617054982110858, 0.006838816683739424, 0.05880976468324661, 0.06136671081185341, 0.004900813568383455, 0.01343411486595869, 0.008284708485007286, -0.02177462913095951, -0.013423968106508255, 0.014824200421571732, 0.01305869035422802, 0.027355266734957695, -0.025610048323869705, 0.036629270762205124, 0.08669265359640121, 0.050570715218782425 ]
4,584
optbinning.binning.continuous_binning
ContinuousOptimalBinning
Optimal binning of a numerical or categorical variable with respect to a continuous target. Parameters ---------- name : str, optional (default="") The variable name. dtype : str, optional (default="numerical") The variable data type. Supported data types are "numerical" for continuous and ordinal variables and "categorical" for categorical and nominal variables. prebinning_method : str, optional (default="cart") The pre-binning method. Supported methods are "cart" for a CART decision tree, "quantile" to generate prebins with approximately same frequency and "uniform" to generate prebins with equal width. Method "cart" uses `sklearn.tree.DecisionTreeRegressor <https://scikit-learn.org/stable/modules/generated/sklearn.tree. DecisionTreeRegressor.html>`_. max_n_prebins : int (default=20) The maximum number of bins after pre-binning (prebins). min_prebin_size : float (default=0.05) The fraction of mininum number of records for each prebin. min_n_bins : int or None, optional (default=None) The minimum number of bins. If None, then ``min_n_bins`` is a value in ``[0, max_n_prebins]``. max_n_bins : int or None, optional (default=None) The maximum number of bins. If None, then ``max_n_bins`` is a value in ``[0, max_n_prebins]``. min_bin_size : float or None, optional (default=None) The fraction of minimum number of records for each bin. If None, ``min_bin_size = min_prebin_size``. max_bin_size : float or None, optional (default=None) The fraction of maximum number of records for each bin. If None, ``max_bin_size = 1.0``. monotonic_trend : str or None, optional (default="auto") The **mean** monotonic trend. Supported trends are “auto”, "auto_heuristic" and "auto_asc_desc" to automatically determine the trend minimize the L1-norm using a machine learning classifier, "ascending", "descending", "concave", "convex", "peak" and "peak_heuristic" to allow a peak change point, and "valley" and "valley_heuristic" to allow a valley change point. Trends "auto_heuristic", "peak_heuristic" and "valley_heuristic" use a heuristic to determine the change point, and are significantly faster for large size instances (``max_n_prebins> 20``). Trend "auto_asc_desc" is used to automatically select the best monotonic trend between "ascending" and "descending". If None, then the monotonic constraint is disabled. min_mean_diff : float, optional (default=0) The minimum mean difference between consecutives bins. max_pvalue : float or None, optional (default=None) The maximum p-value among bins. The T-test is used to detect bins not satisfying the p-value constraint. max_pvalue_policy : str, optional (default="consecutive") The method to determine bins not satisfying the p-value constraint. Supported methods are "consecutive" to compare consecutive bins and "all" to compare all bins. gamma : float, optional (default=0) Regularization strength to reduce the number of dominating bins. Larger values specify stronger regularization. .. versionadded:: 0.14.0 outlier_detector : str or None, optional (default=None) The outlier detection method. Supported methods are "range" to use the interquartile range based method, "zcore" to use the modified Z-score method or "yquantile" to use the y-axis detector over quantiles. outlier_params : dict or None, optional (default=None) Dictionary of parameters to pass to the outlier detection method. cat_cutoff : float or None, optional (default=None) Generate bin others with categories in which the fraction of occurrences is below the ``cat_cutoff`` value. This option is available when ``dtype`` is "categorical". cat_unknown : float, str or None (default=None) The assigned value to the unobserved categories in training but occurring during transform. If None, the assigned value to an unknown category follows this rule: - if transform metric == 'mean' then mean target - if transform metric == 'indices' then -1 - if transform metric == 'bins' then 'unknown' .. versionadded:: 0.17.1 user_splits : array-like or None, optional (default=None) The list of pre-binning split points when ``dtype`` is "numerical" or the list of prebins when ``dtype`` is "categorical". user_splits_fixed : array-like or None (default=None) The list of pre-binning split points that must be fixed. special_codes : array-like, dict or None, optional (default=None) List of special codes. Use special codes to specify the data values that must be treated separately. split_digits : int or None, optional (default=None) The significant digits of the split points. If ``split_digits`` is set to 0, the split points are integers. If None, then all significant digits in the split points are considered. time_limit : int (default=100) The maximum time in seconds to run the optimization solver. verbose : bool (default=False) Enable verbose output. **prebinning_kwargs : keyword arguments The pre-binning keywrord arguments. .. versionadded:: 0.6.1 Notes ----- The parameter values ``max_n_prebins`` and ``min_prebin_size`` control complexity and memory usage. The default values generally produce quality results, however, some improvement can be achieved by increasing ``max_n_prebins`` and/or decreasing ``min_prebin_size``. The pre-binning refinement phase guarantee that no prebin has zero number of records by merging those pure prebins. Pure bins produce infinity mean.
class ContinuousOptimalBinning(OptimalBinning): """Optimal binning of a numerical or categorical variable with respect to a continuous target. Parameters ---------- name : str, optional (default="") The variable name. dtype : str, optional (default="numerical") The variable data type. Supported data types are "numerical" for continuous and ordinal variables and "categorical" for categorical and nominal variables. prebinning_method : str, optional (default="cart") The pre-binning method. Supported methods are "cart" for a CART decision tree, "quantile" to generate prebins with approximately same frequency and "uniform" to generate prebins with equal width. Method "cart" uses `sklearn.tree.DecisionTreeRegressor <https://scikit-learn.org/stable/modules/generated/sklearn.tree. DecisionTreeRegressor.html>`_. max_n_prebins : int (default=20) The maximum number of bins after pre-binning (prebins). min_prebin_size : float (default=0.05) The fraction of mininum number of records for each prebin. min_n_bins : int or None, optional (default=None) The minimum number of bins. If None, then ``min_n_bins`` is a value in ``[0, max_n_prebins]``. max_n_bins : int or None, optional (default=None) The maximum number of bins. If None, then ``max_n_bins`` is a value in ``[0, max_n_prebins]``. min_bin_size : float or None, optional (default=None) The fraction of minimum number of records for each bin. If None, ``min_bin_size = min_prebin_size``. max_bin_size : float or None, optional (default=None) The fraction of maximum number of records for each bin. If None, ``max_bin_size = 1.0``. monotonic_trend : str or None, optional (default="auto") The **mean** monotonic trend. Supported trends are “auto”, "auto_heuristic" and "auto_asc_desc" to automatically determine the trend minimize the L1-norm using a machine learning classifier, "ascending", "descending", "concave", "convex", "peak" and "peak_heuristic" to allow a peak change point, and "valley" and "valley_heuristic" to allow a valley change point. Trends "auto_heuristic", "peak_heuristic" and "valley_heuristic" use a heuristic to determine the change point, and are significantly faster for large size instances (``max_n_prebins> 20``). Trend "auto_asc_desc" is used to automatically select the best monotonic trend between "ascending" and "descending". If None, then the monotonic constraint is disabled. min_mean_diff : float, optional (default=0) The minimum mean difference between consecutives bins. max_pvalue : float or None, optional (default=None) The maximum p-value among bins. The T-test is used to detect bins not satisfying the p-value constraint. max_pvalue_policy : str, optional (default="consecutive") The method to determine bins not satisfying the p-value constraint. Supported methods are "consecutive" to compare consecutive bins and "all" to compare all bins. gamma : float, optional (default=0) Regularization strength to reduce the number of dominating bins. Larger values specify stronger regularization. .. versionadded:: 0.14.0 outlier_detector : str or None, optional (default=None) The outlier detection method. Supported methods are "range" to use the interquartile range based method, "zcore" to use the modified Z-score method or "yquantile" to use the y-axis detector over quantiles. outlier_params : dict or None, optional (default=None) Dictionary of parameters to pass to the outlier detection method. cat_cutoff : float or None, optional (default=None) Generate bin others with categories in which the fraction of occurrences is below the ``cat_cutoff`` value. This option is available when ``dtype`` is "categorical". cat_unknown : float, str or None (default=None) The assigned value to the unobserved categories in training but occurring during transform. If None, the assigned value to an unknown category follows this rule: - if transform metric == 'mean' then mean target - if transform metric == 'indices' then -1 - if transform metric == 'bins' then 'unknown' .. versionadded:: 0.17.1 user_splits : array-like or None, optional (default=None) The list of pre-binning split points when ``dtype`` is "numerical" or the list of prebins when ``dtype`` is "categorical". user_splits_fixed : array-like or None (default=None) The list of pre-binning split points that must be fixed. special_codes : array-like, dict or None, optional (default=None) List of special codes. Use special codes to specify the data values that must be treated separately. split_digits : int or None, optional (default=None) The significant digits of the split points. If ``split_digits`` is set to 0, the split points are integers. If None, then all significant digits in the split points are considered. time_limit : int (default=100) The maximum time in seconds to run the optimization solver. verbose : bool (default=False) Enable verbose output. **prebinning_kwargs : keyword arguments The pre-binning keywrord arguments. .. versionadded:: 0.6.1 Notes ----- The parameter values ``max_n_prebins`` and ``min_prebin_size`` control complexity and memory usage. The default values generally produce quality results, however, some improvement can be achieved by increasing ``max_n_prebins`` and/or decreasing ``min_prebin_size``. The pre-binning refinement phase guarantee that no prebin has zero number of records by merging those pure prebins. Pure bins produce infinity mean. """ def __init__(self, name="", dtype="numerical", prebinning_method="cart", max_n_prebins=20, min_prebin_size=0.05, min_n_bins=None, max_n_bins=None, min_bin_size=None, max_bin_size=None, monotonic_trend="auto", min_mean_diff=0, max_pvalue=None, max_pvalue_policy="consecutive", gamma=0, outlier_detector=None, outlier_params=None, cat_cutoff=None, cat_unknown=None, user_splits=None, user_splits_fixed=None, special_codes=None, split_digits=None, time_limit=100, verbose=False, **prebinning_kwargs): self.name = name self.dtype = dtype self.prebinning_method = prebinning_method self.solver = "cp" self.max_n_prebins = max_n_prebins self.min_prebin_size = min_prebin_size self.min_n_bins = min_n_bins self.max_n_bins = max_n_bins self.min_bin_size = min_bin_size self.max_bin_size = max_bin_size self.monotonic_trend = monotonic_trend self.min_mean_diff = min_mean_diff self.max_pvalue = max_pvalue self.max_pvalue_policy = max_pvalue_policy self.gamma = gamma self.outlier_detector = outlier_detector self.outlier_params = outlier_params self.cat_cutoff = cat_cutoff self.cat_unknown = cat_unknown self.user_splits = user_splits self.user_splits_fixed = user_splits_fixed self.special_codes = special_codes self.split_digits = split_digits self.time_limit = time_limit self.verbose = verbose self.prebinning_kwargs = prebinning_kwargs # auxiliary self._categories = None self._cat_others = None self._n_records = None self._sums = None self._stds = None self._min_target = None self._max_target = None self._n_zeros = None self._n_records_cat_others = None self._n_records_missing = None self._n_records_special = None self._su
(name='', dtype='numerical', prebinning_method='cart', max_n_prebins=20, min_prebin_size=0.05, min_n_bins=None, max_n_bins=None, min_bin_size=None, max_bin_size=None, monotonic_trend='auto', min_mean_diff=0, max_pvalue=None, max_pvalue_policy='consecutive', gamma=0, outlier_detector=None, outlier_params=None, cat_cutoff=None, cat_unknown=None, user_splits=None, user_splits_fixed=None, special_codes=None, split_digits=None, time_limit=100, verbose=False, **prebinning_kwargs)
[ 0.007073788437992334, -0.01860182173550129, -0.04611213132739067, 0.013372926041483879, -0.002614447847008705, -0.02631775476038456, -0.07905519008636475, -0.04207579046487808, -0.021445605903863907, -0.09564903378486633, -0.037427883595228195, 0.04660138487815857, 0.004795702639967203, -0.022118330001831055, -0.046275217086076736, 0.035939738154411316, -0.010101043619215488, 0.008245958015322685, 0.012159985490143299, 0.036184366792440414, -0.03540971502661705, -0.01406603492796421, -0.014249504543840885, 0.07041171938180923, 0.01054952573031187, 0.0030170625541359186, 0.004026147536933422, -0.04130113869905472, -0.03432928025722504, 0.015819191932678223, -0.042157333344221115, -0.027418574318289757, 0.013311768881976604, -0.041158441454172134, 0.04492976889014244, -0.05944428592920303, 0.08651630580425262, 0.06413296610116959, -0.043584320694208145, 0.01736849546432495, 0.011140706948935986, -0.0931212306022644, -0.035552412271499634, -0.00536649813875556, 0.03410503640770912, 0.023993801325559616, 0.015431866981089115, 0.03759096935391426, 0.002907490124925971, -0.03439043462276459, -0.015340132638812065, -0.06217595189809799, 0.041097283363342285, 0.024972308427095413, -0.03259650617837906, 0.045826733112335205, 0.04223887622356415, 0.024666525423526764, -0.002266619121655822, -0.008648572489619255, -0.014494131319224834, 0.042768899351358414, 0.04550056532025337, -0.06413296610116959, -0.018754713237285614, -0.02413650043308735, -0.05663108080625534, 0.004566364921629429, -0.004739642143249512, 0.011324177496135235, 0.028600936755537987, -0.03551164269447327, 0.06490761786699295, 0.0472944937646389, -0.025971200317144394, -0.020334593951702118, -0.03261689096689224, -0.027173949405550957, -0.005213606636971235, -0.024177271872758865, 0.05177931860089302, 0.048884566873311996, 0.03259650617837906, -0.07000400871038437, 0.030537566170096397, -0.059525828808546066, 0.0006988423992879689, 0.058343466371297836, 0.07921827584505081, -0.016777314245700836, -0.0074203428812325, 0.01979437656700611, 0.06633460521697998, 0.08174608647823334, 0.030089084059000015, -0.009555730037391186, -0.02564503252506256, -0.010987815447151661, -0.017572350800037384, -0.06335831433534622, -0.006971860770136118, -0.005570353474467993, 0.01896876096725464, 0.06747619807720184, 0.004021051339805126, 0.021506763994693756, -0.01579880714416504, 0.016502108424901962, -0.032698433846235275, -0.041566152125597, -0.054674066603183746, -0.02476845309138298, -0.02258719876408577, -0.05129006505012512, -0.050311557948589325, -0.02134367823600769, -0.055285632610321045, 0.023157993331551552, -0.043584320694208145, 0.039609137922525406, -0.0010364782065153122, -0.013118106871843338, -0.02270951122045517, 0.015136276371777058, -0.03367694094777107, -0.025502333417534828, 0.06674231588840485, 0.06829161942005157, -0.029090190306305885, -0.0369386300444603, 0.04199424758553505, -0.03019101172685623, -0.04056726023554802, 0.016838470473885536, -0.006283848080784082, -0.050433870404958725, 0.007287837099283934, 0.058343466371297836, -0.002206736709922552, -0.039731450378894806, 0.1206825003027916, 0.009300910867750645, -0.017032133415341377, -0.021812546998262405, 0.038793716579675674, -0.0011505099246278405, 0.04672369733452797, -0.034940846264362335, -0.01829603873193264, -0.008485488593578339, -0.04219810292124748, -0.05842500925064087, -0.019508978351950645, -0.01552360225468874, 0.0466829277575016, -0.0021481281146407127, -0.0052645704708993435, -0.06690540164709091, -0.05226856842637062, -0.01867317035794258, -0.0299871563911438, -0.01734810881316662, -0.029783299192786217, -0.038671404123306274, -0.0587511770427227, 0.03265766426920891, -0.039038341492414474, -0.020711727440357208, -0.018275652080774307, 0.013770444318652153, 0.02768358774483204, -0.026297369971871376, -0.03824330493807793, 0.06967783719301224, -0.01568668708205223, 0.07750589400529861, 0.028662094846367836, -0.03192378208041191, -0.04207579046487808, 0.04517439752817154, 0.03092489205300808, -0.024666525423526764, -0.020772883668541908, -0.05381787195801735, -0.03255573660135269, -0.007593620102852583, 0.041912708431482315, -0.04505208134651184, 0.025237319990992546, 0.020803460851311684, -0.016522495076060295, -0.03347308561205864, 0.018336808308959007, -0.006711944937705994, 0.020518064498901367, -0.044522058218717575, 0.010401730425655842, 0.03355462849140167, 0.04578596353530884, -0.010600490495562553, 0.006171727553009987, 0.032453808933496475, 0.05699801817536354, 0.01241480465978384, -0.011008201166987419, 0.0016881789779290557, -0.01923377439379692, 0.024381127208471298, 0.01973322033882141, -0.005692666862159967, -0.01772524230182171, -0.042605817317962646, 0.013780636712908745, 0.07318415492773056, 0.030822962522506714, -0.04042455926537514, 0.01905030384659767, -0.011161092668771744, -0.01729714497923851, -0.0202326662838459, 0.048803023993968964, -0.0016601488459855318, 0.0348593033850193, 0.014616444706916809, 0.03043563850224018, -0.006594727747142315, 0.04590827599167824, 0.02364724688231945, 0.10437405854463577, -0.013383118435740471, 0.011150900274515152, -0.054714836180210114, -0.057079561054706573, -0.001852537621743977, 0.014382011257112026, 0.022607583552598953, -0.008087970316410065, 0.01272058766335249, -0.008516066707670689, -0.010682032443583012, -0.021792160347104073, -0.006436740048229694, 0.0003784069267567247, -0.04268735647201538, -0.0472944937646389, 0.00930600706487894, 0.06808776408433914, 0.06706848740577698, 0.0054786186665296555, 0.009382452815771103, 0.020049195736646652, -0.052431654185056686, -0.02476845309138298, -0.007603812962770462, 0.02501307986676693, -0.05035232752561569, -0.029477516189217567, 0.0032005326356738806, 0.027275877073407173, 0.01952936500310898, -0.04598981887102127, 0.0011078276438638568, 0.0027138274163007736, 0.0691070407629013, -0.019508978351950645, 0.006768004968762398, -0.003090960206463933, -0.02122136577963829, -0.012904058210551739, 0.04268735647201538, -0.03384002670645714, 0.02495192363858223, -0.019549749791622162, -0.0017569803167134523, -0.03858986124396324, 0.021302908658981323, -0.0029406168032437563, -0.01896876096725464, 0.009555730037391186, 0.008470199070870876, 0.041423454880714417, -0.013005985878407955, 0.011181478388607502, -0.04541902244091034, 0.012159985490143299, -0.029029034078121185, -0.057405732572078705, -0.03296344727277756, -0.001800299622118473, 0.01481010764837265, -0.057201873511075974, -0.021323293447494507, 0.04099535569548607, 0.016909820958971977, 0.05165700241923332, 0.0057181487791240215, 0.003302460303530097, -0.0695962905883789, -0.001209118403494358, -0.036490149796009064, 0.004143364727497101, -0.02538001909852028, 0.03043563850224018, -0.005794594995677471, -0.010009309276938438, 0.017072904855012894, 0.06608998030424118, -0.05981122702360153, -0.00489763030782342, -0.003101153066381812, 0.01244538277387619, 0.023300692439079285, 0.05394018441438675, -0.02446267008781433, 0.005269666668027639, -0.07306183874607086, 0.03932373970746994, 0.0008632009848952293, 0.012934636324644089, 0.0599743127822876, -0.04884379729628563, 0.011619768105447292, -0.0017977514071390033, -0.017246181145310402, -0.02507423609495163, 0.026215827092528343, 0.03934412822127342, 0.014687794260680676, -0.048313770443201065, -0.049822304397821426, -0.02010015957057476, -0.011293599382042885, 0.03610282391309738, 0.057650357484817505, -0.018000448122620583, -0.011619768105447292, 0.023382235318422318, -0.00029654617537744343, -0.0028845565393567085, -0.06250212341547012, 0.048884566873311996, 0.05027078464627266, 0.0012995792785659432, 0.03911988437175751, -0.012180371209979057, -0.031087975949048996, 0.02725549042224884, 0.005019943695515394, 0.03231110796332359, 0.08635322004556656, 0.030129853636026382, 0.016063818708062172, 0.0004191780462861061, 0.06727234274148941, 0.0847223773598671, -0.082398422062397, 0.030822962522506714, -0.039731450378894806, 0.048069145530462265, -0.03492046147584915, 0.008536452427506447, -0.020640376955270767, 0.004120430909097195, 0.04562287777662277, 0.06160515546798706, 0.009255043230950832, -0.03098604828119278, 0.021567920222878456, 0.00786882545799017, -0.0416884645819664, 0.009759585373103619, -0.10266166925430298, -0.02495192363858223, -0.002197817899286747, 0.014596058987081051, 0.021425221115350723, -0.04566365107893944, -0.019488593563437462, 0.0022577005438506603, 0.04541902244091034, 0.04603058844804764, 0.025298478081822395, -0.04211656376719475, 0.02856016717851162, 0.005320630501955748, -0.02021227963268757, -0.02234257198870182, -0.026358526200056076, 0.06723157316446304, -0.042157333344221115, 0.0291309617459774, 0.031577229499816895, -0.0027393093332648277, -0.014585866592824459, -0.031271446496248245, -0.003210725262761116, 0.05553026124835014, 0.004833925515413284, 0.0029380684718489647, -0.01786794140934944, -0.035063158720731735, -0.04562287777662277, 0.0076700663194060326, 0.05712033435702324, -0.01916242390871048, -0.05756881460547447, 0.047376036643981934, 0.0018920345464721322, -0.006696655880659819, 0.04105651378631592, -0.04089342802762985, 0.02458498254418373, 0.026215827092528343, -0.0010078110499307513, -0.04244273155927658, 0.004752383101731539, -0.013750058598816395, -0.035552412271499634, 0.03926258534193039, -0.041280753910541534, 0.05394018441438675, 0.016593843698501587, 0.02813206985592842, 0.02470729686319828, 0.02010015957057476, -0.0041153342463076115, -0.007634391542524099, -0.03665323182940483, -0.051045436412096024, 0.023443391546607018, -0.019875919446349144, -0.04280967265367508, -0.10233549773693085, -0.01923377439379692, -0.022301800549030304, 0.006115667521953583, -0.045215167105197906, 0.04660138487815857, 0.013270998373627663, -0.004724353086203337, -0.021119438111782074, -0.0017646248452365398, 0.03938489779829979, -0.010590297169983387, 0.001223133411258459, -0.015360517427325249, -0.03167915716767311, -0.01905030384659767, -0.10233549773693085, -0.03247419372200966, 0.03926258534193039, -0.034492362290620804, 0.010248838923871517, 0.02637891098856926, -0.03402349725365639, -0.016532687470316887, -0.03298383206129074, 0.010834923945367336, 0.003106249263510108, -0.01791890524327755, 0.002685797167941928, 0.035368941724300385, -0.028641708195209503, 0.0409545861184597, -0.013423889875411987, 0.007710837293416262, 0.026725465431809425, 0.03123067505657673, -0.007649680599570274, 0.03646976128220558, -0.009591405279934406, -0.01823488064110279, -0.015829386189579964, -0.019386665895581245, -0.019152231514453888, 0.06319522857666016, -0.016726350411772728, 0.013719480484724045, 0.0025418242439627647, -0.024748066440224648, 0.03697940334677696, -0.01555418036878109, 0.02270951122045517, 0.025278091430664062, -0.0047065154649317265, -0.022424113005399704, -0.003857966745272279, 0.025502333417534828, -0.0021086311899125576, -0.00792998168617487, -0.030537566170096397, 0.01748061552643776, 0.052798595279455185, 0.07334723323583603, -0.029885226860642433, 0.05394018441438675, 0.009897188283503056, 0.03351385518908501, 0.07921827584505081, -0.03339154273271561, -0.002976291347295046, 0.049006879329681396, -0.053614016622304916, -0.043584320694208145, 0.025420790538191795, -0.033697325736284256, -0.03031332418322563, 0.05177931860089302, -0.05569334328174591, -0.013260805048048496, -0.011069358326494694, -0.07187947630882263, 0.06356216967105865, 0.004329382907599211, 0.0028183034155517817, 0.03353424370288849, 0.013892757706344128, 0.003299912204965949, -0.052309341728687286, 0.001723853754810989, 0.025665417313575745, 0.017032133415341377, -0.0003538805467542261, -0.07505962252616882, 0.04480745643377304, 0.03271881863474846, -0.0037152678705751896, -0.024686910212039948, 0.021731004118919373, 0.04354355111718178, 0.008113452233374119, -0.02519654855132103, 0.03622513636946678, 0.06580457836389542, 0.04480745643377304, 0.01288367249071598, 0.005774209275841713, 0.0013123202370479703, 0.05438866838812828, -0.02631775476038456, -0.008230668492615223, 0.07607889920473099, 0.07016708701848984, -0.0016881789779290557, 0.030150240287184715, 0.07408111542463303, 0.017123868688941002, 0.06005585193634033, -0.002299745799973607, -0.004426214378327131, 0.0360824391245842, 0.011130514554679394, 0.02413650043308735, 0.015727458521723747, 0.0603412501513958, -0.02743896096944809, 0.029844457283616066, 0.016012854874134064, 0.02780590020120144, 0.037855979055166245, -0.049944616854190826, -0.005070907529443502, 0.028580551967024803, -0.0360824391245842, -0.03720364347100258, 0.03055795095860958, -0.04435897246003151, 0.030843349173665047, -0.022199872881174088, -0.007196101825684309, 0.0476614348590374, -0.00773122301325202, -0.05699801817536354, -0.005412365775555372, -0.03492046147584915, 0.01785774901509285, -0.004553623963147402, -0.016879241913557053, -0.0711863711476326, -0.03783559426665306, 0.00012876346590928733, -0.0009103425545617938, -0.0026195442769676447, -0.06898472458124161, -0.013485046103596687, 0.05308399349451065, -0.0582619234919548, 0.009418128058314323, -0.018775098025798798, 0.0012798308162018657, -0.02776513062417507, 0.029029034078121185, -0.036857087165117264, -0.05406250059604645, 0.015849770978093147, 0.017766013741493225, -0.06123821437358856, -0.007614005822688341, 0.06242057681083679, -0.007078885100781918, 0.009474188089370728, -0.027907827869057655, -0.033697325736284256, 0.04550056532025337, 0.01356658898293972, -0.011191670782864094, -0.02352493442595005, -0.012700202874839306, 0.016145361587405205, -0.029905613511800766, -0.021364064887166023, 0.016461336985230446, -0.000651382259093225, 0.006778197828680277, -0.04859916865825653, -0.0035063158720731735, -0.029395975172519684, -0.037733666598796844, 0.09173501282930374, -0.039221812039613724, -0.003947153687477112, 0.005376690998673439, 0.04374740645289421, 0.03453313559293747, -0.04338046535849571, -0.046886783093214035, 0.026215827092528343, -0.0581396110355854, 0.004523045849055052, -0.006732330657541752, 0.0009937959257513285, 0.017501002177596092, 0.06633460521697998, -0.011048972606658936, 0.0020500225946307182, 0.009469091892242432, 0.038426775485277176, 0.00394970178604126, 0.012975407764315605, -0.031577229499816895, 0.04130113869905472, -0.00017678100266493857, 0.009698429144918919, 0.005027587991207838, -0.0069005112163722515, -0.06091204658150673, 0.019498785957694054, 0.010631068609654903, 0.08610859513282776, 0.012893864884972572, -0.005233991891145706, 0.011334369890391827, -0.0603412501513958, -0.018020832911133766, 0.01384179387241602, 0.025726573541760445, 0.01568668708205223, 0.03384002670645714, 0.02089519612491131, -0.050556182861328125, -0.048313770443201065, 0.010651454329490662, 0.022811438888311386, -0.016389988362789154, -0.01772524230182171, 0.021323293447494507, 0.013750058598816395, -0.03196455538272858, 0.006003546994179487, 0.03490007668733597, -0.00522889569401741, -0.04075073078274727, -0.05630490928888321, -0.03443120792508125, 0.017215603962540627, -0.04126036912202835, -0.032005324959754944, 0.006156438495963812, -0.04350278154015541, -0.03216841071844101, 0.0706971138715744, 0.035695113241672516, -0.039609137922525406, 0.03789675235748291, 0.10274320840835571, 0.01829603873193264, -0.054837148636579514, -0.045949045568704605, -0.013913143426179886, 0.009311103262007236, 0.023178379982709885, 0.022301800549030304, 0.034064266830682755, 0.014922228641808033, -0.021996017545461655, 0.0006300411187112331, -0.0352262444794178, -0.013026371598243713, 0.02613428421318531, -0.04431820288300514, 0.054470211267471313, -0.045215167105197906, -0.032270338386297226, 0.011150900274515152, -0.013321962207555771, 0.06951475143432617, -0.0477837473154068, -0.027031250298023224, 0.06478530168533325, -0.023484162986278534, 0.014025263488292694, 0.08676093071699142, 0.01144649088382721, -0.05190163105726242, -0.0003634362656157464, 0.06409219652414322, -0.061890553683042526, 0.01698116958141327, -0.05667185038328171, 0.005200865212827921, 0.03850831836462021, 0.024686910212039948, 0.014769336208701134, 0.010498561896383762, -0.009535344317555428, -0.015839578583836555, 0.07424420118331909, -0.0821537971496582, 0.02694970741868019, 0.015013962984085083, 0.06633460521697998, 0.029640601947903633, -0.030904505401849747, -0.012241527438163757, 0.033004216849803925, -0.037489041686058044, 0.06221672147512436, -0.03143452852964401, 0.01885664090514183, 0.05365478992462158, -0.03308575972914696, -0.03983338177204132, -0.03061910718679428, -0.02992599830031395, -0.0072980294935405254, 0.043584320694208145, 0.0588734894990921, -0.014422781765460968, 0.0481506884098053, -0.05369555950164795, 0.019743412733078003, 0.010187682695686817, -0.013485046103596687, 0.02780590020120144, 0.015146469697356224, -0.0044797263108193874, 0.019437629729509354, 0.0008491859189234674, -0.008352981880307198, -0.08358078449964523, -0.023423006758093834, -0.04285044223070145, 0.013444275595247746, 0.004540883004665375, 0.028478624299168587, 0.030415251851081848, 0.01884644851088524, 0.007399957627058029 ]
4,586
optbinning.binning.continuous_binning
__init__
null
def __init__(self, name="", dtype="numerical", prebinning_method="cart", max_n_prebins=20, min_prebin_size=0.05, min_n_bins=None, max_n_bins=None, min_bin_size=None, max_bin_size=None, monotonic_trend="auto", min_mean_diff=0, max_pvalue=None, max_pvalue_policy="consecutive", gamma=0, outlier_detector=None, outlier_params=None, cat_cutoff=None, cat_unknown=None, user_splits=None, user_splits_fixed=None, special_codes=None, split_digits=None, time_limit=100, verbose=False, **prebinning_kwargs): self.name = name self.dtype = dtype self.prebinning_method = prebinning_method self.solver = "cp" self.max_n_prebins = max_n_prebins self.min_prebin_size = min_prebin_size self.min_n_bins = min_n_bins self.max_n_bins = max_n_bins self.min_bin_size = min_bin_size self.max_bin_size = max_bin_size self.monotonic_trend = monotonic_trend self.min_mean_diff = min_mean_diff self.max_pvalue = max_pvalue self.max_pvalue_policy = max_pvalue_policy self.gamma = gamma self.outlier_detector = outlier_detector self.outlier_params = outlier_params self.cat_cutoff = cat_cutoff self.cat_unknown = cat_unknown self.user_splits = user_splits self.user_splits_fixed = user_splits_fixed self.special_codes = special_codes self.split_digits = split_digits self.time_limit = time_limit self.verbose = verbose self.prebinning_kwargs = prebinning_kwargs # auxiliary self._categories = None self._cat_others = None self._n_records = None self._sums = None self._stds = None self._min_target = None self._max_target = None self._n_zeros = None self._n_records_cat_others = None self._n_records_missing = None self._n_records_special = None self._sum_cat_others = None self._sum_special = None self._sum_missing = None self._std_cat_others = None self._std_special = None self._std_missing = None self._min_target_missing = None self._min_target_special = None self._min_target_others = None self._max_target_missing = None self._max_target_special = None self._max_target_others = None self._n_zeros_missing = None self._n_zeros_special = None self._n_zeros_others = None self._problem_type = "regression" # info self._binning_table = None self._n_prebins = None self._n_refinements = 0 self._n_samples = None self._optimizer = None self._splits_optimal = None self._status = None # timing self._time_total = None self._time_preprocessing = None self._time_prebinning = None self._time_solver = None self._time_optimizer = None self._time_postprocessing = None self._is_fitted = False
(self, name='', dtype='numerical', prebinning_method='cart', max_n_prebins=20, min_prebin_size=0.05, min_n_bins=None, max_n_bins=None, min_bin_size=None, max_bin_size=None, monotonic_trend='auto', min_mean_diff=0, max_pvalue=None, max_pvalue_policy='consecutive', gamma=0, outlier_detector=None, outlier_params=None, cat_cutoff=None, cat_unknown=None, user_splits=None, user_splits_fixed=None, special_codes=None, split_digits=None, time_limit=100, verbose=False, **prebinning_kwargs)
[ 0.011357074603438377, -0.017526468262076378, -0.022714149206876755, 0.00501443725079298, -0.02696824073791504, -0.03928777948021889, -0.09247353672981262, -0.05077959969639778, -0.02021174319088459, -0.07511068880558014, -0.033782485872507095, 0.06329163163900375, -0.008994226343929768, 0.0026564006693661213, -0.025890281423926353, 0.04265640303492546, -0.003322906792163849, -0.004831569269299507, -0.0019285371527075768, -0.000013055297131359112, -0.012050049379467964, 0.016448508948087692, -0.04204042628407478, 0.07842156291007996, 0.011472570709884167, 0.023657364770770073, 0.010625602677464485, -0.03410972282290459, -0.023503370583057404, 0.017151108011603355, -0.0612512081861496, -0.001994706690311432, -0.017179982736706734, -0.012733398005366325, 0.02937440015375614, -0.06309913843870163, 0.06633301824331284, 0.0002091855276376009, -0.06182868778705597, 0.011135708540678024, 0.02831568941473961, -0.08307988941669464, -0.011607315391302109, -0.011588065885007381, -0.01129932701587677, 0.022694900631904602, -0.014148220419883728, 0.026871994137763977, -0.045004814863204956, -0.026525506749749184, -0.03399422764778137, -0.03888354450464249, 0.03869105130434036, 0.03487969562411308, -0.042155921459198, 0.05482194945216179, 0.03326275572180748, 0.03690087050199509, -0.00224374420940876, -0.004494706634432077, -0.02945139817893505, 0.04542829841375351, 0.03613089770078659, -0.040577482432127, -0.025832533836364746, -0.010615977458655834, -0.0692589059472084, -0.014562079682946205, 0.02277189865708351, 0.026448510587215424, 0.054937444627285004, -0.01878729648888111, 0.04003849998116493, 0.04042348638176918, -0.0019850819371640682, -0.02467757649719715, -0.037593841552734375, -0.06463908404111862, -0.014764197170734406, -0.04415784776210785, 0.03659288212656975, 0.061636194586753845, 0.014456208795309067, -0.07052936404943466, 0.01566891372203827, -0.06236766651272774, 0.020423484966158867, 0.08662176132202148, 0.05528393015265465, -0.04065447673201561, -0.0389990396797657, 0.01317613199353218, 0.06633301824331284, 0.06675650179386139, 0.035457171499729156, -0.013349375687539577, -0.03407122567296028, -0.02960539236664772, 0.004947064910084009, -0.052473537623882294, -0.021116459742188454, -0.020269490778446198, 0.012271415442228317, 0.04042348638176918, -0.015890279784798622, -0.003700674045830965, -0.0175168439745903, 0.008224254474043846, -0.029143409803509712, -0.06028874218463898, -0.03516843542456627, 0.014918191358447075, -0.009003850631415844, -0.03470645099878311, -0.04846968501806259, -0.007815207354724407, -0.06028874218463898, -0.00977382156997919, -0.03772858902812004, 0.043156884610652924, -0.0025433111004531384, 0.0002046739828074351, -0.022656401619315147, 0.05720885843038559, -0.022502407431602478, -0.02084697037935257, 0.061713188886642456, 0.059095289558172226, 0.014908567070960999, -0.043888356536626816, 0.05998075380921364, -0.0342252179980278, -0.02889316901564598, 0.047776710242033005, 0.024138595908880234, -0.032897017896175385, 0.02714148350059986, 0.037266604602336884, -0.00938402395695448, -0.016689125448465347, 0.113031767308712, -0.002308710478246212, -0.005962464492768049, -0.03416747227311134, 0.02641001157462597, 0.0173147264868021, -0.0036621754989027977, -0.042617905884981155, -0.05921078473329544, -0.009831569157540798, -0.03133782744407654, -0.05116458609700203, -0.014619828201830387, -0.027410974726080894, 0.04885467141866684, 0.0061790188774466515, -0.019615015015006065, -0.04727623239159584, -0.03961501643061638, -0.027834458276629448, -0.0413474515080452, -0.013936478644609451, -0.00962463952600956, -0.038960542529821396, -0.04827719181776047, 0.0413859523832798, -0.042694903910160065, -0.060211747884750366, -0.024716075509786606, 0.024388836696743965, 0.011270453222095966, -0.06390760838985443, -0.030933592468500137, 0.03780558332800865, -0.04885467141866684, 0.05643888935446739, 0.03605389967560768, -0.02163618989288807, -0.05871030315756798, 0.053359001874923706, 0.02277189865708351, -0.0202887412160635, -0.029220405966043472, -0.02658325433731079, -0.029258904978632927, -0.014196343719959259, 0.02935515157878399, -0.04431184008717537, 0.038152072578668594, 0.026390762999653816, 0.010875842534005642, -0.02180943451821804, 0.023330125957727432, 0.00846968311816454, 0.029335903003811836, -0.04153994470834732, 0.02818094566464424, 0.043811358511447906, 0.03595765307545662, 0.006280077621340752, -0.0017986046150326729, 0.03551492094993591, 0.04161694273352623, 0.004651107359677553, -0.026044275611639023, -0.019441772252321243, -0.037362851202487946, 0.01855630613863468, -0.003780077211558819, 0.01663137786090374, -0.0005464990972541273, -0.022714149206876755, 0.02338787540793419, 0.06910491734743118, 0.03455245867371559, -0.014023100025951862, 0.02943214774131775, -0.007006737869232893, -0.023368624970316887, -0.007978826761245728, 0.06748797744512558, -0.024446584284305573, 0.01797882653772831, -0.019210781902074814, 0.012271415442228317, -0.007853706367313862, 0.04361886903643608, 0.052473537623882294, 0.07295476645231247, -0.006775746587663889, 0.010019250214099884, -0.04257940500974655, -0.017555342987179756, 0.013512994162738323, 0.020173244178295135, 0.006924928165972233, -0.03957651928067207, 0.018575554713606834, -0.006823869422078133, -0.026679500937461853, 0.00012075915583409369, 0.0007898220210336149, -0.013349375687539577, -0.03126082941889763, -0.0445813313126564, 0.005447546020150185, 0.05894129350781441, 0.06263715773820877, -0.00017790545825846493, -0.002509624930098653, 0.002632339019328356, -0.04204042628407478, -0.019441772252321243, -0.008176131173968315, 0.013609240762889385, -0.05905678868293762, -0.0015628008404746652, 0.0008800529758445919, 0.04461982846260071, -0.010452358983457088, -0.01774783618748188, -0.008994226343929768, 0.00469201197847724, 0.0306256040930748, -0.02952839434146881, 0.008291627280414104, 0.004215592052787542, -0.019692013040184975, 0.008878730237483978, 0.03880654647946358, -0.02163618989288807, 0.03374398872256279, -0.025274304673075676, 0.011742061004042625, -0.029412899166345596, 0.0017540906555950642, -0.0015158808091655374, -0.00047341195750050247, 0.023580366745591164, 0.005153994541615248, 0.05166506767272949, -0.020981714129447937, 0.04188643395900726, -0.024600578472018242, -0.024542830884456635, -0.03487969562411308, -0.06964389234781265, -0.03291626647114754, 0.016823871061205864, 0.022021176293492317, -0.03938402608036995, 0.007131858263164759, 0.034340713173151016, 0.023041388019919395, 0.06791146099567413, -0.006154957227408886, 0.031549569219350815, -0.06032724305987358, 0.017680462449789047, -0.008580366149544716, -0.021616941317915916, -0.03861405327916145, 0.033859483897686005, -0.009124158881604671, -0.0398075096309185, 0.012675650417804718, 0.07156882435083389, -0.038864295929670334, 0.012540905736386776, 0.011751685291528702, 0.019133783876895905, 0.03849855810403824, 0.0835418701171875, 0.01947064697742462, -0.003926853183656931, -0.03876804932951927, 0.006703561637550592, -0.010019250214099884, 0.03749759495258331, 0.0732627585530281, -0.04565929248929024, 0.025524545460939407, -0.0016927334945648909, -0.0377863347530365, -0.013397498987615108, -0.0024759385269135237, 0.02346487157046795, -0.0010532964952290058, -0.023137634620070457, -0.03491819277405739, -0.01743984781205654, -0.014340713620185852, 0.0612897053360939, 0.04908566176891327, 0.0050336867570877075, 0.004128970671445131, 0.01161694061011076, -0.019865255802869797, -0.017921078950166702, -0.06779596209526062, 0.08015400171279907, 0.025351300835609436, -0.0024879693519324064, 0.03953802213072777, -0.015024063177406788, -0.05539942532777786, 0.04088547080755234, -0.02960539236664772, 0.027391724288463593, 0.08046198636293411, 0.002509624930098653, 0.019489895552396774, -0.005784408655017614, 0.10125120729207993, 0.06929740309715271, -0.04415784776210785, 0.001507459208369255, -0.03828681632876396, 0.027179982513189316, -0.023445622995495796, 0.004865255206823349, 0.012271415442228317, -0.016920117661356926, 0.08708374202251434, 0.050009626895189285, -0.022733399644494057, -0.03316650912165642, 0.0010334457037970424, 0.017834456637501717, -0.02275264821946621, 0.00484360009431839, -0.0907026082277298, -0.0353994257748127, 0.008931665681302547, -0.021867182105779648, 0.025274304673075676, -0.04096246883273125, -0.0010520934592932463, -0.01607314869761467, -0.013233879581093788, 0.0034456211142241955, 0.016246391460299492, -0.045389801263809204, 0.047083739191293716, -0.004220404662191868, -0.028296440839767456, -0.03141482546925545, -0.025351300835609436, 0.08870068192481995, -0.029470646753907204, 0.02650625817477703, 0.0175168439745903, 0.0047545721754431725, -0.0051973056979477406, -0.015283928252756596, -0.0024446584284305573, 0.0485466830432415, 0.008411935530602932, -0.05536092817783356, 0.0015315208584070206, -0.03670837730169296, -0.09054861217737198, 0.00721847964450717, 0.046506259590387344, -0.038479309529066086, -0.0692589059472084, 0.06071222946047783, -0.018719924613833427, -0.0037921080365777016, 0.05428296700119972, 0.0011934553040191531, 0.02410009875893593, 0.007343600038439035, -0.020173244178295135, -0.07230029255151749, 0.003363811643794179, -0.005755534395575523, -0.031549569219350815, 0.07684312760829926, -0.007141482550650835, 0.059326279908418655, 0.05108758807182312, 0.03709335997700691, 0.016159771010279655, 0.03572666272521019, 0.04846968501806259, -0.022309914231300354, -0.02211742289364338, -0.05690087005496025, -0.00906641036272049, -0.0477382130920887, 0.013089509680867195, -0.08053898811340332, -0.009104909375309944, 0.014610202983021736, 0.0012800771510228515, -0.04234841465950012, 0.043888356536626816, -0.009441771544516087, -0.015582291409373283, 0.011347450315952301, -0.049778636544942856, 0.026621753349900246, -0.005635226611047983, -0.03486044704914093, -0.03682387247681618, -0.02252165786921978, -0.035457171499729156, -0.10279115289449692, -0.0165255069732666, 0.06429259479045868, -0.014273340813815594, 0.022136671468615532, 0.008065448142588139, -0.0011790184071287513, -0.02180943451821804, 0.005822907201945782, 0.000898099213372916, 0.026063524186611176, -0.022098172456026077, 0.010038499720394611, 0.0398075096309185, 0.007343600038439035, 0.03849855810403824, -0.016111647710204124, 0.007083734963089228, 0.024331089109182358, 0.04227141663432121, -0.0013799327425658703, 0.02277189865708351, -0.011828682385385036, 0.005105871241539717, -0.001914100255817175, -0.01566891372203827, -0.052088551223278046, 0.05004812777042389, -0.02300288900732994, 0.01085659395903349, 0.0028681426774710417, -0.023214630782604218, 0.03826756775379181, -0.035052936524152756, 0.016794996336102486, 0.04096246883273125, -0.002382098464295268, -0.017507219687104225, -0.010173244401812553, 0.0070981718599796295, -0.0008451637113466859, 0.01965351402759552, -0.051857560873031616, 0.023099135607481003, 0.05405197665095329, 0.08662176132202148, 0.003686237148940563, 0.05867180600762367, 0.029932629317045212, 0.018623678013682365, 0.038729552179574966, -0.0006400385755114257, 0.019287778064608574, 0.02594802901148796, -0.041424449533224106, -0.042925894260406494, 0.0157170370221138, -0.043965354561805725, -0.05794033035635948, 0.03351299464702606, -0.06144370138645172, 0.01058710366487503, -0.006443696562200785, -0.05085659772157669, 0.04223291948437691, 0.008897979743778706, -0.010779596865177155, 0.019788259640336037, -0.004172281362116337, 0.00857074186205864, -0.06641001254320145, 0.02204042486846447, 0.028277192264795303, 0.057016365230083466, -0.0009853225201368332, -0.07118383795022964, 0.0139268534258008, 0.04342637583613396, 0.017738211899995804, -0.026294516399502754, 0.04481232166290283, 0.03557267040014267, 0.010076997801661491, -0.022945141419768333, 0.01500481367111206, 0.06198268011212349, 0.03272377699613571, 0.024812322109937668, 0.014658326283097267, -0.015187681652605534, 0.06306064128875732, -0.05501444265246391, -0.010991338640451431, 0.05905678868293762, 0.08069297671318054, -0.02737247571349144, -0.000785009702667594, 0.06452358514070511, 0.0006622955552302301, 0.0803849920630455, -0.014311839826405048, -0.021289702504873276, 0.02155919373035431, 0.005529355723410845, 0.026236768811941147, -0.005659288261085749, 0.07122233510017395, 0.003808951238170266, 0.049855634570121765, 0.01576516032218933, 0.047853708267211914, 0.02889316901564598, -0.044196344912052155, -0.02252165786921978, 0.024311840534210205, -0.01929740235209465, -0.03476420044898987, 0.015014437958598137, -0.01479307096451521, 0.024658327922225, -0.05659288167953491, -0.011405197903513908, 0.021616941317915916, -0.017661213874816895, -0.04631376639008522, 0.02848893404006958, -0.04246390983462334, -0.015409048646688461, -0.02340712398290634, -0.0017119827680289745, -0.07899904251098633, -0.03095284104347229, 0.023541869595646858, 0.011424447409808636, -0.016544755548238754, -0.08215592801570892, -0.00815206952393055, 0.04681424796581268, -0.06579403579235077, -0.004898941610008478, -0.00805101078003645, -0.008272377774119377, -0.021539943292737007, 0.03189605474472046, -0.04827719181776047, -0.06094321981072426, -0.027834458276629448, 0.042617905884981155, -0.05628489330410957, -0.007540905382484198, 0.030837345868349075, 0.01754571869969368, -0.024658327922225, 0.0007910250569693744, -0.005178056191653013, 0.043079886585474014, 0.02617901936173439, -0.016159771010279655, -0.02871992439031601, 0.027276229113340378, 0.013108759187161922, -0.03605389967560768, -0.0105389803647995, 0.0032699713483452797, 0.007333975750952959, -0.025274304673075676, -0.029874881729483604, -0.04654475674033165, -0.03755534440279007, -0.025928780436515808, 0.09963427484035492, -0.05586140975356102, -0.014205968007445335, 0.01954764313995838, 0.023291628807783127, 0.04358036816120148, -0.06352262198925018, -0.020577479153871536, 0.011674688197672367, -0.09108759462833405, 0.024966316297650337, -0.04034648835659027, 0.018440809100866318, 0.0031135710887610912, 0.09162656962871552, -0.04073147475719452, 0.00491337850689888, 0.01576516032218933, 0.052011553198099136, 0.036958616226911545, 0.014879693277180195, -0.00830125156790018, 0.05767084285616875, 0.0042661214247345924, 0.011231954209506512, 0.007930703461170197, -0.010769971646368504, -0.06025024503469467, 0.0016145333647727966, -0.003356593195348978, 0.09478345513343811, 0.013156882487237453, -0.02983638271689415, 0.024716075509786606, -0.04080847278237343, -0.032358039170503616, -0.004829163197427988, 0.004867661744356155, -0.014071223326027393, 0.025582293048501015, 0.023272378370165825, -0.055899906903505325, -0.03291626647114754, -0.0003061838506255299, 0.020596729591488838, -0.009119345806539059, 0.005938402842730284, 0.014831569977104664, 0.013378249481320381, -0.019595766440033913, -0.0027213669382035732, 0.023926854133605957, -0.026448510587215424, -0.004107315093278885, -0.02856593020260334, -0.008522618561983109, -0.004114533308893442, -0.007743022870272398, -0.023926854133605957, 0.005081809591501951, 0.0082627534866333, -0.006140520330518484, 0.04542829841375351, 0.03511068597435951, -0.038152072578668594, 0.013666988350450993, 0.08423484861850739, 0.038729552179574966, -0.05324350669980049, -0.015976902097463608, -0.014157844707369804, -0.010846968740224838, 0.016718000173568726, 0.028604429215192795, 0.03961501643061638, -0.002442252356559038, -0.00388835440389812, -0.013339750468730927, -0.058363813906908035, -0.0493551529943943, 0.029701638966798782, -0.012579403817653656, 0.039422523230314255, -0.025024063885211945, -0.028065450489521027, 0.012685275636613369, -0.015832532197237015, 0.0580558255314827, -0.041578445583581924, 0.002384504536166787, 0.03755534440279007, -0.03509143739938736, 0.04796920344233513, 0.10787296295166016, 0.02658325433731079, -0.04408084973692894, 0.003265158971771598, 0.05616939812898636, -0.027718963101506233, 0.018960541114211082, -0.08123195916414261, -0.01292589120566845, 0.027872957289218903, 0.03208854794502258, 0.029008664190769196, 0.010211742483079433, -0.011761309579014778, 0.00602983683347702, 0.05435996502637863, -0.0716458186507225, 0.05516843497753143, 0.010365736670792103, 0.053743988275527954, 0.03516843542456627, -0.01658325456082821, -0.0214821957051754, 0.03247353434562683, -0.053282007575035095, 0.041578445583581924, -0.0306256040930748, 0.042694903910160065, 0.05162656679749489, -0.056053902953863144, 0.015755536034703255, -0.051857560873031616, 0.007483157329261303, -0.0373820997774601, 0.042925894260406494, 0.036015402525663376, -0.007564967032521963, 0.03874880075454712, -0.05528393015265465, 0.01926852948963642, 0.013551493175327778, 0.006669875234365463, 0.036246392875909805, 0.0030028875917196274, -0.031838309019804, 0.05743984878063202, -0.027872957289218903, -0.007333975750952959, -0.06564003974199295, -0.030683351680636406, -0.04758422076702118, 0.006496632006019354, 0.02236766368150711, 0.01947064697742462, 0.013079885393381119, 0.03247353434562683, -0.01838306151330471 ]
4,593
optbinning.binning.continuous_binning
_compute_prebins
null
def _compute_prebins(self, splits_prebinning, x, y, sw): n_splits = len(splits_prebinning) if not n_splits: return splits_prebinning, np.array([]), np.array([]) if self.dtype == "categorical" and self.user_splits is not None: indices = np.digitize(x, splits_prebinning, right=True) n_bins = n_splits else: indices = np.digitize(x, splits_prebinning, right=False) n_bins = n_splits + 1 n_records = np.empty(n_bins, dtype=np.int64) sums = np.empty(n_bins) ssums = np.empty(n_bins) stds = np.zeros(n_bins) n_zeros = np.empty(n_bins, dtype=np.int64) min_t = np.full(n_bins, -np.inf) max_t = np.full(n_bins, np.inf) # Compute prebin information for i in range(n_bins): mask = (indices == i) n_records[i] = np.sum(sw[mask]) ymask = sw[mask] * y[mask] sums[i] = np.sum(ymask) ssums[i] = np.sum(ymask ** 2) n_zeros[i] = np.count_nonzero(ymask == 0) if len(ymask): stds[i] = np.std(ymask) min_t[i] = np.min(ymask) max_t[i] = np.max(ymask) mask_remove = (n_records == 0) if np.any(mask_remove): self._n_refinements += 1 if (self.dtype == "categorical" and self.user_splits is not None): mask_splits = mask_remove else: mask_splits = np.concatenate([ mask_remove[:-2], [mask_remove[-2] | mask_remove[-1]]]) if self.user_splits_fixed is not None: user_splits_fixed = np.asarray(self.user_splits_fixed) user_splits = np.asarray(self.user_splits) fixed_remove = user_splits_fixed & mask_splits if any(fixed_remove): raise ValueError( "Fixed user_splits {} are removed " "because produce pure prebins. Provide " "different splits to be fixed." .format(user_splits[fixed_remove])) # Update boolean array of fixed user splits. self.user_splits_fixed = user_splits_fixed[~mask_splits] self.user_splits = user_splits[~mask_splits] splits = splits_prebinning[~mask_splits] if self.verbose: logger.info("Pre-binning: number prebins removed: {}" .format(np.count_nonzero(mask_remove))) (splits_prebinning, n_records, sums, ssums, stds, min_t, max_t, n_zeros) = self._compute_prebins(splits, x, y, sw) return (splits_prebinning, n_records, sums, ssums, stds, min_t, max_t, n_zeros)
(self, splits_prebinning, x, y, sw)
[ 0.013207179494202137, 0.012854203581809998, -0.04918130114674568, 0.010118640959262848, 0.003990587778389454, -0.04345524683594704, -0.02266889251768589, 0.0011214336846023798, 0.004721052013337612, -0.01933523267507553, -0.014354350976645947, 0.046357493847608566, -0.014373959973454475, -0.0361211933195591, -0.040278464555740356, 0.018315523862838745, -0.005878027994185686, 0.015570156276226044, -0.008206687867641449, -0.019629377871751785, -0.022806160151958466, -0.02102167159318924, -0.023727819323539734, 0.10557899624109268, 0.0018629280384629965, 0.009231298230588436, 0.005304442252963781, -0.05698598921298981, -0.012138446792960167, 0.011040300130844116, 0.0167075227946043, 0.015491717495024204, 0.04423963651061058, -0.07930190116167068, 0.030453970655798912, -0.03714090213179588, 0.06306501477956772, 0.0815766379237175, -0.002524757757782936, 0.024296503514051437, 0.007059516850858927, -0.09051869064569473, 0.019246987998485565, 0.011197177693247795, 0.011726642027497292, 0.017325229942798615, 0.02978723868727684, -0.01043239701539278, -0.03115992248058319, 0.023904308676719666, 0.009471517987549305, -0.06714385002851486, 0.04620061442255974, 0.04890676215291023, -0.019070500507950783, 0.016334937885403633, 0.05000491067767143, -0.010050006210803986, -0.025394650176167488, -0.03186587244272232, 0.0224531851708889, 0.05114227533340454, 0.021335428580641747, -0.01029512844979763, -0.015952546149492264, -0.04906364157795906, -0.0366702675819397, -0.015560351312160492, -0.008584176190197468, 0.041376613080501556, 0.015736838802695274, 0.028002750128507614, 0.041533488780260086, 0.007868419401347637, -0.034689679741859436, 0.010461811907589436, 0.030728507786989212, -0.0022465442307293415, 0.024943625554442406, -0.05416218191385269, 0.07514463365077972, 0.0783214196562767, -0.0015651046996936202, -0.021158941090106964, 0.0394156351685524, -0.0037479170132428408, 0.032336506992578506, 0.04627905413508415, 0.016962449997663498, -0.011863909661769867, -0.019041085615754128, 0.05027944594621658, 0.08832240104675293, 0.06510443240404129, 0.039964709430933, 0.024218063801527023, -0.05361310765147209, -0.006588882301002741, 0.006373174954205751, -0.03329738602042198, 0.044710271060466766, -0.00614766264334321, -0.01388371642678976, 0.0531032532453537, 0.01844298653304577, 0.05318169295787811, 0.04400432109832764, -0.027179138734936714, -0.03970978036522865, -0.04365134611725807, 0.012354154139757156, -0.03482694923877716, -0.08832240104675293, 0.01324639841914177, -0.05184822902083397, -0.05722130462527275, -0.028492994606494904, 0.035121094435453415, -0.014334741048514843, 0.04157270863652229, -0.07024218887090683, -0.01576625369489193, -0.011648202314972878, 0.010000982321798801, -0.030297093093395233, -0.06424160301685333, 0.062437504529953, 0.05726052448153496, -0.0303951408714056, -0.0427100770175457, 0.019580354914069176, -0.024551430717110634, -0.07792922109365463, -0.005108344834297895, -0.04365134611725807, -0.0476517379283905, 0.060045111924409866, 0.04290617257356644, 0.04686734825372696, -0.0804784893989563, 0.06192765012383461, 0.011569763533771038, -0.031140312552452087, 0.02080596424639225, -0.006353565026074648, 0.020178452134132385, 0.09608786553144455, 0.041964903473854065, 0.036984022706747055, 0.017393864691257477, -0.01774684153497219, -0.018648890778422356, -0.009427396580576897, -0.038297876715660095, 0.014903424307703972, -0.030316703021526337, -0.013020886108279228, -0.02145308628678322, -0.00334591674618423, -0.023688601329922676, 0.0004283508751541376, 0.011628592386841774, -0.006642809137701988, -0.03947446495294571, -0.05714286491274834, 0.08094912767410278, -0.04165114834904671, -0.01736444979906082, -0.017599767073988914, -0.020354939624667168, 0.038572415709495544, 0.01264830119907856, -0.07271302491426468, 0.03163055703043938, -0.0036719292402267456, -0.0002616678539197892, 0.005853516049683094, -0.054122962057590485, -0.07220316678285599, 0.04565154016017914, 0.04576919972896576, -0.028767529875040054, 0.010265713557600975, -0.04121973365545273, -0.0350426584482193, 0.02496323548257351, 0.04565154016017914, -0.05573096126317978, 0.026728114113211632, 0.02398274652659893, -0.08769488334655762, -0.02129620872437954, -0.019139133393764496, 0.02688499353826046, 0.029610751196742058, 0.01654084026813507, -0.021609965711832047, 0.002791940700262785, -0.047769397497177124, -0.10934407263994217, -0.03602314367890358, -0.00517697911709547, 0.004431807901710272, 0.009045005775988102, 0.0008628297946415842, -0.024492600932717323, -0.02633591927587986, 0.013550350442528725, 0.014844594523310661, 0.0323168970644474, -0.015834888443350792, -0.05886852368712425, 0.01895284093916416, 0.03425826504826546, 0.016991864889860153, -0.037788026034832, 0.061143260449171066, 0.0067016384564340115, -0.008206687867641449, -0.04961271584033966, 0.0061623696237802505, 0.00955976266413927, 0.02441416122019291, -0.007613492663949728, -0.00966271385550499, -0.011295226402580738, 0.023355234414339066, 0.012432592920958996, 0.058829307556152344, 0.015893718227744102, 0.014570058323442936, -0.034532804042100906, -0.06832043081521988, -0.06565350294113159, -0.010108835995197296, 0.027002651244401932, -0.004385234322398901, -0.048867542296648026, 0.06635946035385132, -0.013677814044058323, -0.020492209121584892, -0.005799589212983847, 0.009084225632250309, -0.03768997639417648, -0.05271105840802193, 0.013422886840999126, 0.02682616375386715, 0.024767138063907623, -0.013766057789325714, 0.0015405924059450626, 0.025767236948013306, -0.04745563864707947, 0.01431513112038374, -0.0405137836933136, 0.053142473101615906, -0.02251201495528221, -0.007285029161721468, 0.031885482370853424, 0.006020199041813612, 0.024669088423252106, 0.0061378576792776585, 0.005677028093487024, 0.03306207060813904, -0.014442594721913338, 0.0013702325522899628, 0.002963526174426079, 0.026688894256949425, 0.038082171231508255, -0.04392588138580322, 0.053142473101615906, -0.018462596461176872, 0.0010129670845344663, -0.0055054426193237305, -0.015648595988750458, -0.016080010682344437, 0.03661143779754639, 0.008711639791727066, -0.01078537292778492, 0.06247672438621521, 0.047063443809747696, 0.04020002484321594, -0.015903523191809654, 0.03898422047495842, -0.014932839199900627, 0.040827538818120956, -0.04863222688436508, -0.01774684153497219, -0.049691155552864075, -0.008643005974590778, -0.023139527067542076, -0.03265026584267616, -0.006289833225309849, 0.010608884505927563, 0.010804982855916023, 0.02896362915635109, -0.017550742253661156, -0.01856064610183239, -0.04627905413508415, -0.01910972036421299, 0.001032576896250248, -0.02984606847167015, -0.004564173519611359, -0.015619181096553802, -0.0028140018694102764, 0.02945387177169323, -0.005559369456022978, 0.05361310765147209, -0.046122174710035324, 0.006618296727538109, -0.03290519118309021, 0.01801157183945179, -0.0018788609886541963, 0.051103055477142334, -0.04310227185487747, 0.023806259036064148, -0.05835867300629616, 0.05635847523808479, 0.037866462022066116, 0.006025101523846388, 0.06883028894662857, 0.010912836529314518, -0.008927347138524055, 0.0011680067982524633, 0.054122962057590485, -0.049848031252622604, 0.038199830800294876, 0.017325229942798615, -0.028120407834649086, -0.06737916171550751, -0.002921855542808771, -0.018433183431625366, 0.014481814578175545, 0.0036694779992103577, 0.06086872145533562, -0.014256302267313004, -0.014354350976645947, 0.03570938855409622, -0.029865678399801254, -0.030355921015143394, -0.06055496633052826, 0.011256007477641106, 0.007951761595904827, -0.00022398032888304442, 0.031728606671094894, -0.00253946497105062, -0.01231493428349495, 0.007785078138113022, 0.03527797386050224, 0.001818806049413979, 0.10102953016757965, 0.02196294069290161, 0.006020199041813612, -0.007843907922506332, 0.0383174866437912, 0.08447888493537903, -0.06498677283525467, 0.0002256655425298959, -0.05435827746987343, 0.042239442467689514, -0.019619572907686234, -0.0023678794968873262, 0.01174625102430582, 0.04502402991056442, 0.04467105120420456, 0.026649676263332367, -0.018903816118836403, -0.03290519118309021, 0.020786354318261147, -0.01927640289068222, -0.05926072224974632, -0.006490833591669798, -0.04290617257356644, -0.022531624883413315, 0.016236888244748116, 0.04078831896185875, 0.057848818600177765, -0.03055202029645443, -0.04937739670276642, 0.0025174040347337723, 0.02419845387339592, 0.006025101523846388, 0.04953427612781525, -0.03290519118309021, 0.03198353201150894, -0.004358271136879921, 0.033434655517339706, -0.034532804042100906, -0.03055202029645443, 0.08291010558605194, -0.049416616559028625, 0.028238067403435707, 0.02223747782409191, -0.007951761595904827, -0.044318076223134995, -0.015452497638761997, 0.02441416122019291, 0.058554768562316895, -0.0221786480396986, 0.014001375064253807, 0.018305718898773193, -0.012481617741286755, -0.0542014017701149, 0.008589078672230244, 0.06749682128429413, -0.024727918207645416, -0.04659280925989151, -0.01746249943971634, -0.006353565026074648, -0.001343269133940339, 0.019903915002942085, -0.028885189443826675, 0.01910972036421299, 0.034140605479478836, -0.06592804193496704, -0.013971960172057152, -0.015050497837364674, -0.007971370592713356, 0.01614864356815815, 0.03904305025935173, -0.04510246962308884, 0.044984810054302216, 0.03694480285048485, 0.025551527738571167, 0.023904308676719666, 0.010275518521666527, 0.013736642897129059, -0.028669482097029686, -0.03929797559976578, -0.030904995277523994, 0.007672321982681751, 0.000598404323682189, -0.03516031429171562, -0.061300136148929596, -0.024982845410704613, -0.06612414121627808, 0.00005522907667909749, 0.01856064610183239, 0.07326209545135498, -0.002121531870216131, 0.0098539087921381, -0.016060400754213333, 0.02633591927587986, 0.059770576655864716, -0.03510148450732231, 0.04674968868494034, 0.0047896858304739, -0.05651535466313362, 0.016187863424420357, -0.10855968296527863, -0.010138249956071377, 0.013207179494202137, -0.04172958806157112, 0.005373076535761356, 0.012226690538227558, -0.03357192501425743, -0.03465045988559723, -0.002686538267880678, 0.015187765471637249, -0.015060302801430225, -0.0023311113473027945, 0.015805473551154137, 0.039729390293359756, -0.05082852020859718, 0.032552216202020645, 0.02331601455807686, -0.020609866827726364, -0.0035444656386971474, 0.0026595748495310545, 0.01708991266787052, 0.03467006981372833, 0.03137563169002533, -0.03127758204936981, 0.009167566895484924, 0.025826064869761467, 0.022021770477294922, 0.03216002136468887, -0.014932839199900627, 0.014354350976645947, -0.004412197973579168, -0.014805375598371029, -0.025982944294810295, 0.051769789308309555, -0.058946963399648666, 0.024453381076455116, 0.0035322096664458513, -0.04745563864707947, -0.055221106857061386, 0.0071967849507927895, 0.02825767733156681, -0.02633591927587986, 0.0020479951053857803, 0.006201589480042458, 0.03549368306994438, 0.056868329644203186, -0.039121489971876144, 0.02359055168926716, 0.022904209792613983, 0.017727231606841087, 0.12628690898418427, -0.03892539069056511, -0.0005052579217590392, 0.03457202389836311, -0.06039808690547943, -0.03314051032066345, -0.03788607195019722, -0.010471616871654987, -0.004417100455611944, 0.042357102036476135, -0.04494559019804001, -0.019854890182614326, -0.05161290988326073, -0.1089518740773201, 0.028022360056638718, 0.0022820867598056793, -0.006628101691603661, -0.004289636854082346, 0.008946957066655159, 0.007525248918682337, -0.05698598921298981, -0.004757820162922144, 0.010412787087261677, 0.00873124971985817, -0.0054368083365261555, -0.024767138063907623, 0.027787042781710625, 0.038082171231508255, -0.03635651245713234, -0.03357192501425743, 0.024335723370313644, -0.003341014264151454, -0.023512111976742744, -0.03874890133738518, 0.050514765083789825, 0.017923329025506973, 0.06498677283525467, 0.017050694674253464, 0.0221786480396986, -0.04773017764091492, 0.06314345449209213, 0.006819297093898058, 0.0227277223020792, 0.029610751196742058, 0.07032062858343124, 0.0013273361837491393, 0.016834987327456474, 0.07424258440732956, 0.004299441818147898, 0.06275126338005066, -0.020727526396512985, -0.014344546012580395, -0.00999117735773325, -0.015727033838629723, 0.05349544808268547, 0.02868909202516079, 0.03400333970785141, -0.019188158214092255, 0.006598687265068293, -0.001810226822271943, -0.004490637220442295, 0.039768610149621964, -0.04055299982428551, -0.01954113505780697, 0.05180900916457176, -0.0124522028490901, -0.05988823249936104, 0.016070205718278885, -0.006284930743277073, 0.016521230340003967, -0.0004596039652824402, 0.027571335434913635, 0.02523777261376381, 0.00019012283883057535, -0.030355921015143394, -0.01347191073000431, -0.007843907922506332, 0.017344839870929718, -0.018148841336369514, -0.07643888145685196, -0.05706442520022392, -0.030963825061917305, 0.0021583002526313066, -0.02606138214468956, 0.008074321784079075, -0.043612126260995865, -0.024767138063907623, 0.018433183431625366, -0.09271498769521713, 0.0008542505674995482, -0.006250613834708929, 0.03402294963598251, -0.012991472147405148, 0.04172958806157112, -0.008873420767486095, 0.009280323050916195, 0.001335915527306497, -0.027277188375592232, -0.008623396046459675, -0.031238362193107605, -0.03170899674296379, -0.03061084821820259, 0.05447593703866005, -0.031140312552452087, 0.009765665046870708, 0.049298956990242004, 0.022198257967829704, -0.03839592635631561, -0.023610161617398262, -0.0037822341546416283, -0.001494019292294979, -0.01713893748819828, 0.003985685296356678, 0.00027545596822164953, 0.015530936419963837, 0.02496323548257351, 0.010638299398124218, 0.005677028093487024, 0.009368566796183586, -0.06063340604305267, 0.0881655216217041, -0.04157270863652229, 0.02080596424639225, -0.018590060994029045, 0.023178746923804283, 0.010177469812333584, -0.014128838665783405, -0.0246298685669899, 0.0416119284927845, 0.0012102903565391898, 0.016070205718278885, -0.024002356454730034, 0.019835280254483223, -0.003392490092664957, 0.07185019552707672, -0.013216984458267689, 0.02474752813577652, 0.04682812839746475, 0.03696441277861595, -0.0011275616707280278, 0.011756055988371372, -0.0558486208319664, 0.05961369723081589, -0.045141685754060745, 0.06043730676174164, -0.02196294069290161, -0.030316703021526337, -0.0848710760474205, 0.018913621082901955, -0.0036180024035274982, 0.04604373499751091, 0.07812532037496567, -0.01839396357536316, -0.03661143779754639, -0.06753604114055634, -0.021315818652510643, 0.015678010880947113, 0.05031866580247879, 0.008211590349674225, 0.021178551018238068, -0.027845870703458786, -0.061300136148929596, -0.03867046535015106, 0.006495736073702574, -0.013550350442528725, -0.003733209799975157, -0.02255123481154442, 0.01674674265086651, 0.010089226067066193, 0.00837827380746603, 0.039219535887241364, -0.020727526396512985, -0.01338366698473692, -0.01926659792661667, -0.0689871683716774, -0.052475739270448685, -0.007039906922727823, -0.016952645033597946, -0.06153545528650284, -0.004010197706520557, -0.05596628040075302, -0.023472893983125687, 0.011903129518032074, -0.01950191520154476, -0.02064908668398857, -0.0005604104371741414, 0.09695069491863251, -0.025708407163619995, -0.03192470222711563, -0.033160120248794556, -0.02288459986448288, 0.014128838665783405, 0.0251789428293705, 0.012962057255208492, 0.0761251226067543, 0.014334741048514843, -0.0073340535163879395, 0.01763898693025112, 0.017011474817991257, 0.02486518584191799, 0.04769095778465271, 0.015560351312160492, 0.031238362193107605, -0.058005694299936295, -0.03406216949224472, -0.04157270863652229, -0.031669776886701584, 0.056868329644203186, -0.05843710899353027, -0.006995785050094128, 0.01316795963793993, 0.016070205718278885, 0.005029905587434769, 0.03602314367890358, -0.02908128686249256, -0.033689580857753754, -0.01932542771100998, 0.03745465725660324, -0.055377986282110214, 0.007868419401347637, -0.014717130921781063, 0.006789882201701403, 0.029865678399801254, 0.05918228253722191, 0.02233552560210228, 0.017560547217726707, -0.04290617257356644, -0.010765762999653816, 0.09781352430582047, -0.08659673482179642, 0.03104226291179657, -0.017540937289595604, 0.04890676215291023, 0.009961762465536594, -0.03543485328555107, 0.0202568918466568, 0.06914404779672623, -0.0035346609074622393, 0.07730171084403992, -0.059103842824697495, 0.029198946431279182, 0.032885581254959106, -0.008290030062198639, -0.06290813535451889, -0.04988725110888481, 0.017982156947255135, -0.06494755297899246, 0.05961369723081589, 0.049691155552864075, -0.052867937833070755, 0.028512604534626007, -0.02978723868727684, 0.005196588579565287, 0.0009277871577069163, -0.009937250055372715, 0.01264830119907856, -0.02419845387339592, 0.03837631642818451, 0.021100111305713654, -0.05518189072608948, -0.009496030397713184, -0.014570058323442936, 0.027277188375592232, 0.027022261172533035, -0.023394454270601273, 0.006946760695427656, 0.01871752366423607, -0.014050398953258991, -0.011952154338359833, 0.01774684153497219 ]
4,594
optbinning.binning.continuous_binning
_fit
null
def _fit(self, x, y, sample_weight, check_input): time_init = time.perf_counter() if self.verbose: logger.info("Optimal binning started.") logger.info("Options: check parameters.") _check_parameters(**self.get_params()) # Pre-processing if self.verbose: logger.info("Pre-processing started.") self._n_samples = len(x) if self.verbose: logger.info("Pre-processing: number of samples: {}" .format(self._n_samples)) time_preprocessing = time.perf_counter() [x_clean, y_clean, x_missing, y_missing, x_special, y_special, y_others, categories, cat_others, sw_clean, sw_missing, sw_special, sw_others] = split_data( self.dtype, x, y, self.special_codes, self.cat_cutoff, self.user_splits, check_input, self.outlier_detector, self.outlier_params, None, None, None, sample_weight) self._time_preprocessing = time.perf_counter() - time_preprocessing if self.verbose: n_clean = len(x_clean) n_missing = len(x_missing) n_special = len(x_special) logger.info("Pre-processing: number of clean samples: {}" .format(n_clean)) logger.info("Pre-processing: number of missing samples: {}" .format(n_missing)) logger.info("Pre-processing: number of special samples: {}" .format(n_special)) if self.outlier_detector is not None: n_outlier = self._n_samples-(n_clean + n_missing + n_special) logger.info("Pre-processing: number of outlier samples: {}" .format(n_outlier)) if self.dtype == "categorical": n_categories = len(categories) n_categories_others = len(cat_others) n_others = len(y_others) logger.info("Pre-processing: number of others samples: {}" .format(n_others)) logger.info("Pre-processing: number of categories: {}" .format(n_categories)) logger.info("Pre-processing: number of categories others: {}" .format(n_categories_others)) logger.info("Pre-processing terminated. Time: {:.4f}s" .format(self._time_preprocessing)) # Pre-binning if self.verbose: logger.info("Pre-binning started.") time_prebinning = time.perf_counter() if self.user_splits is not None: n_splits = len(self.user_splits) if self.verbose: logger.info("Pre-binning: user splits supplied: {}" .format(n_splits)) if not n_splits: splits = self.user_splits n_records = np.array([]) sums = np.array([]) stds = np.array([]) else: if self.dtype == "numerical": user_splits = check_array( self.user_splits, ensure_2d=False, dtype=None, force_all_finite=True) if len(set(user_splits)) != len(user_splits): raise ValueError("User splits are not unique.") sorted_idx = np.argsort(user_splits) user_splits = user_splits[sorted_idx] else: [categories, user_splits, x_clean, y_clean, y_others, cat_others, sw_clean, sw_others, sorted_idx ] = preprocessing_user_splits_categorical( self.user_splits, x_clean, y_clean, sw_clean) if self.user_splits_fixed is not None: self.user_splits_fixed = np.asarray( self.user_splits_fixed)[sorted_idx] [splits, n_records, sums, ssums, stds, min_t, max_t, n_zeros] = self._prebinning_refinement( user_splits, x_clean, y_clean, y_missing, x_special, y_special, y_others, sw_clean, sw_missing, sw_special, sw_others) else: [splits, n_records, sums, ssums, stds, min_t, max_t, n_zeros] = self._fit_prebinning( x_clean, y_clean, y_missing, x_special, y_special, y_others, None, sw_clean, sw_missing, sw_special, sw_others) self._n_prebins = len(n_records) self._categories = categories self._cat_others = cat_others self._time_prebinning = time.perf_counter() - time_prebinning if self.verbose: logger.info("Pre-binning: number of prebins: {}" .format(self._n_prebins)) logger.info("Pre-binning terminated. Time: {:.4f}s" .format(self._time_prebinning)) # Optimization self._fit_optimizer(splits, n_records, sums, ssums, stds) # Post-processing if self.verbose: logger.info("Post-processing started.") logger.info("Post-processing: compute binning information.") time_postprocessing = time.perf_counter() if not len(splits): n_records = np.sum(sw_clean) sw_y_clean = sw_clean * y_clean sums = np.sum(sw_y_clean) ssums = np.sum(sw_y_clean ** 2) n_zeros = np.count_nonzero(sw_y_clean == 0) stds = np.std(sw_y_clean) min_t = np.min(sw_y_clean) max_t = np.max(sw_y_clean) [self._n_records, self._sums, self._stds, self._min_target, self._max_target, self._n_zeros] = continuous_bin_info( self._solution, n_records, sums, ssums, stds, min_t, max_t, n_zeros, self._n_records_missing, self._sum_missing, self._std_missing, self._min_target_missing, self._max_target_missing, self._n_zeros_missing, self._n_records_special, self._sum_special, self._std_special, self._min_target_special, self._max_target_special, self._n_zeros_special, self._n_records_cat_others, self._sum_cat_others, self._std_cat_others, self._min_target_others, self._max_target_others, self._n_zeros_others, self._cat_others) if self.dtype == "numerical": min_x = x_clean.min() max_x = x_clean.max() else: min_x = None max_x = None self._binning_table = ContinuousBinningTable( self.name, self.dtype, self.special_codes, self._splits_optimal, self._n_records, self._sums, self._stds, self._min_target, self._max_target, self._n_zeros, min_x, max_x, self._categories, self._cat_others, self.user_splits) self._time_postprocessing = time.perf_counter() - time_postprocessing if self.verbose: logger.info("Post-processing terminated. Time: {:.4f}s" .format(self._time_postprocessing)) self._time_total = time.perf_counter() - time_init if self.verbose: logger.info("Optimal binning terminated. Status: {}. Time: {:.4f}s" .format(self._status, self._time_total)) # Completed successfully self._is_fitted = True return self
(self, x, y, sample_weight, check_input)
[ -0.008217548951506615, -0.007288478780537844, -0.03640761598944664, 0.03416195139288902, -0.03245285898447037, -0.06478647887706757, -0.0823543444275856, -0.0036020090337842703, -0.026848630979657173, -0.044356878846883774, -0.04884821176528931, 0.041892606765031815, 0.021105289459228516, -0.01083086896687746, -0.04952389746904373, 0.03791797533631325, -0.014129811897873878, 0.00482172379270196, -0.01427886076271534, -0.0018568977247923613, -0.05067653954029083, -0.017190277576446533, -0.03477801755070686, 0.09419874846935272, 0.024006769061088562, 0.004230497404932976, -0.006727062631398439, -0.023907404392957687, -0.0005409223958849907, 0.012033194303512573, -0.008182770572602749, -0.01333488617092371, 0.035394087433815, -0.04455560818314552, 0.019535310566425323, -0.04825201630592346, 0.06303764134645462, 0.03752051293849945, 0.0013588268775492907, 0.034619033336639404, 0.019485626369714737, -0.10715604573488235, 0.011913955211639404, 0.021840594708919525, -0.021264273673295975, 0.033883728086948395, -0.00368895404972136, 0.046622417867183685, -0.02293361909687519, -0.030644401907920837, -0.04137590527534485, -0.06788669526576996, 0.026292182505130768, 0.05206766352057457, -0.005181924905627966, 0.009722940623760223, 0.026908250525593758, 0.00969809852540493, 0.009082031436264515, -0.04880846291780472, 0.016772940754890442, 0.045430026948451996, 0.01859133504331112, -0.010622200556099415, -0.0071344622410833836, -0.01239091157913208, -0.07826048135757446, -0.006130867637693882, 0.017150530591607094, 0.048967450857162476, 0.04709937423467636, 0.013275266624987125, 0.06105032563209534, 0.04244905710220337, -0.049007195979356766, -0.019098101183772087, -0.0046105715446174145, -0.02913404256105423, -0.028657088056206703, -0.07078817486763, 0.08016829937696457, 0.08040677756071091, -0.004198203794658184, -0.06816491484642029, 0.002343790140002966, -0.03314841911196709, 0.028239751234650612, 0.07027146965265274, 0.013404441997408867, -0.022158566862344742, -0.024265119805932045, 0.04372093826532364, 0.08561354130506516, 0.07492178678512573, 0.05969895422458649, -0.006573045626282692, -0.06780719757080078, -0.005206766072660685, -0.0062302337028086185, -0.035731930285692215, -0.001197357545606792, -0.012152433395385742, 0.02028055302798748, 0.07257675379514694, 0.007382876705378294, 0.007397781126201153, 0.015997888520359993, -0.022079072892665863, -0.038076963275671005, -0.04701988026499748, -0.041813116520643234, -0.013692602515220642, -0.04344271495938301, -0.010860678739845753, -0.050358571112155914, -0.040620725601911545, -0.03533446788787842, 0.05671798065304756, -0.0727357417345047, 0.0669725239276886, -0.012341228313744068, -0.013762158341705799, -0.023986896499991417, 0.0026033830363303423, -0.014944611117243767, -0.031121358275413513, 0.038812268525362015, 0.07102665305137634, 0.029650744050741196, -0.03102199174463749, -0.0034877383150160313, -0.01417949516326189, -0.022814380005002022, 0.022814380005002022, -0.04944440722465515, -0.04491332545876503, 0.0211649090051651, 0.05091501772403717, 0.009191333316266537, -0.046741656959056854, 0.12567782402038574, -0.00020401034271344543, -0.0075816079042851925, -0.024543344974517822, 0.050199586898088455, 0.026411421597003937, 0.044317133724689484, -0.002004704438149929, 0.0007011496927589178, -0.0032244191970676184, -0.010433405637741089, -0.031260471791028976, -0.0080834049731493, -0.0273255854845047, -0.009568923152983189, -0.014487529173493385, -0.018988797441124916, -0.03275095671415329, -0.019416071474552155, -0.02523890510201454, -0.017955394461750984, -0.04372093826532364, 0.0014793078880757093, -0.01993277296423912, -0.059818193316459656, 0.07977084070444107, -0.04495307430624962, 0.026331927627325058, 0.0058128973469138145, -0.01454714871942997, 0.029690491035580635, -0.019445881247520447, -0.0608118511736393, 0.046463433653116226, -0.019406134262681007, 0.05711544305086136, 0.021920088678598404, -0.053935740143060684, -0.045191552489995956, 0.0461852066218853, 0.02301311120390892, -0.024682456627488136, 0.0035399054177105427, -0.04614546149969101, -0.04582749307155609, 0.008391438983380795, 0.038732774555683136, -0.039229605346918106, 0.008595138788223267, 0.03831544145941734, -0.04737759754061699, -0.017846092581748962, 0.004449102096259594, -0.013036788441240788, 0.023688798770308495, 0.011377380229532719, 0.011804653331637383, 0.022715013474225998, 0.01785602793097496, -0.05588330700993538, -0.011089219711720943, 0.003005814505741, 0.03066427633166313, -0.035314593464136124, -0.027385205030441284, -0.03760000690817833, -0.03936871513724327, 0.05087527260184288, -0.017021356150507927, 0.018213745206594467, -0.004434197209775448, -0.038116708397865295, -0.020926430821418762, 0.0769885927438736, 0.04956364631652832, -0.014696196652948856, 0.04856998845934868, -0.030266812071204185, -0.031498949974775314, -0.03024693951010704, 0.013424315489828587, -0.04036237299442291, -0.013444188050925732, -0.01435835286974907, 0.013533617369830608, 0.0003850423381663859, 0.06605836004018784, 0.03748076781630516, 0.09523215144872665, -0.018641017377376556, 0.013533617369830608, -0.05318055674433708, -0.032810576260089874, -0.0031051801051944494, -0.026888376101851463, -0.0027623684145510197, -0.013205710798501968, 0.009678225964307785, 0.01612706482410431, -0.028994930908083916, -0.014557084999978542, -0.037500642240047455, -0.012460467405617237, -0.0892702043056488, -0.039507828652858734, 0.02050909399986267, 0.058745041489601135, 0.045390281826257706, -0.00456088874489069, 0.006374313961714506, 0.019108036532998085, -0.012053067795932293, -0.011824525892734528, -0.041892606765031815, 0.0038106772117316723, -0.0373217836022377, -0.004205656237900257, -0.009082031436264515, 0.008500741794705391, -0.004685095977038145, 0.009549050591886044, 0.023410575464367867, -0.0011781053617596626, 0.02482156828045845, -0.04853023961186409, 0.026769137009978294, 0.01947569102048874, -0.0051918611861765385, -0.0010967496782541275, 0.03662622347474098, -0.03249260410666466, 0.025735734030604362, -0.03720254451036453, 0.008967760019004345, -0.035195354372262955, 0.049245674163103104, 0.01239091157913208, -0.022794507443904877, 0.0423298180103302, 0.032035522162914276, 0.06279916316270828, 0.019217338413000107, 0.04236956313252449, -0.0342613160610199, 0.0007483484223484993, -0.042965758591890335, -0.025795353576540947, -0.02466258406639099, -0.016653701663017273, -0.01742875576019287, -0.057671889662742615, -0.00813805591315031, 0.05111375078558922, 0.04384017735719681, 0.022695140913128853, -0.00012009284546365961, 0.0020183671731501818, -0.06482622772455215, -0.007452432531863451, -0.027583936229348183, -0.041693877428770065, -0.011715224012732506, 0.029650744050741196, -0.024602964520454407, 0.033307403326034546, -0.01210275012999773, 0.06931755691766739, -0.05675772577524185, 0.012520086951553822, -0.006637633312493563, 0.02559662237763405, 0.0008818712085485458, 0.10111460089683533, -0.013603173196315765, 0.014477591961622238, -0.06510444730520248, 0.03944820910692215, 0.03789810463786125, 0.0020369982812553644, 0.0777437761425972, -0.03320803865790367, -0.0014097518287599087, 0.027723049744963646, 0.0019363904139027, -0.04236956313252449, 0.004419292323291302, 0.047814808785915375, -0.008783933706581593, -0.09125752002000809, -0.04737759754061699, 0.022754760459065437, -0.016673576086759567, 0.03875264897942543, 0.033347152173519135, -0.004824208095669746, 0.001584884012117982, 0.010652010329067707, -0.013444188050925732, 0.006364377215504646, -0.04642368480563164, 0.016902117058634758, 0.04507231339812279, 0.00026005884865298867, 0.04729810357093811, -0.000384731829399243, -0.05353827401995659, -0.008207612670958042, 0.003783351508900523, -0.005966914352029562, 0.05795011669397354, 0.012092813849449158, 0.03314841911196709, -0.009916703216731548, 0.06518394500017166, 0.07631290704011917, -0.05298182740807533, -0.004970772657543421, -0.028041020035743713, 0.03958732262253761, -0.002445640042424202, -0.028001273050904274, 0.01678287796676159, -0.0077704028226435184, 0.05663848668336868, 0.058784786611795425, -0.0022556029725819826, -0.00610105786472559, 0.009961417876183987, -0.02239704318344593, -0.04010402411222458, -0.003765962552279234, -0.06470698863267899, -0.04328372702002525, 0.007477274164557457, 0.019326642155647278, 0.06252094358205795, -0.03920973092317581, -0.007825054228305817, -0.0028120512142777443, 0.022178439423441887, 0.018541652709245682, 0.04948415234684944, -0.036308251321315765, 0.00996638648211956, -0.0025512161664664745, -0.034539539366960526, -0.017905712127685547, -0.018074633553624153, 0.04048161208629608, -0.05326005071401596, 0.04240930825471878, 0.014219241216778755, -0.019843343645334244, -0.029034677892923355, -0.002084197010844946, 0.023927276954054832, 0.0711856335401535, 0.03221438080072403, -0.03066427633166313, -0.008932982571423054, -0.04833151027560234, -0.057314176112413406, 0.0025537002366036177, 0.049046941101551056, -0.042051590979099274, -0.04864947870373726, 0.013354758732020855, -0.0044913324527442455, -0.009260889142751694, 0.04626470059156418, -0.04741734266281128, 0.020528966560959816, 0.010090593248605728, -0.0070003182627260685, -0.05795011669397354, 0.0021562371402978897, -0.0161668099462986, 0.04264778643846512, 0.05477041006088257, -0.017766598612070084, 0.046622417867183685, 0.042727280408144, 0.060096416622400284, 0.021304020658135414, -0.009012474678456783, 0.010781185701489449, -0.043164487928152084, -0.05326005071401596, -0.022456662729382515, -0.018641017377376556, -0.031459201127290726, -0.029193662106990814, -0.10461227595806122, 0.004031766206026077, -0.030723895877599716, -0.007993975654244423, -0.013165963813662529, 0.03913024067878723, 0.02305285818874836, -0.01058245450258255, -0.014338480308651924, -0.011933828704059124, 0.06470698863267899, -0.02354968711733818, 0.004367125686258078, -0.0033436580561101437, -0.04892770200967789, -0.008629917167127132, -0.10087613016366959, 0.000845851085614413, 0.039388589560985565, -0.01866089180111885, 0.021920088678598404, 0.009722940623760223, -0.05242537707090378, -0.008982664905488491, -0.018909305334091187, -0.006672411225736141, 0.02716660127043724, -0.010001164861023426, -0.026073576882481575, 0.03509598970413208, -0.03390359878540039, 0.03791797533631325, -0.014169557951390743, -0.023808037862181664, -0.012669134885072708, 0.009459621272981167, 0.025278650224208832, 0.04932516813278198, -0.012063004076480865, -0.03583129495382309, 0.0026182879228144884, -0.016613956540822983, 0.023490067571401596, 0.035115860402584076, -0.0071195573545992374, 0.022794507443904877, 0.020230870693922043, -0.02108541503548622, 0.01245053019374609, 0.018571462482213974, -0.015193025581538677, 0.025000426918268204, 0.014080129563808441, -0.026272308081388474, -0.01974397711455822, 0.007447464391589165, 0.025815226137638092, -0.01329513918608427, -0.009111841209232807, -0.0010271936189383268, 0.0592617429792881, 0.03132009133696556, -0.05433320254087448, 0.026808883994817734, 0.007641227450221777, 0.020409729331731796, 0.09101904183626175, -0.04006427899003029, 0.017995139583945274, 0.021641863510012627, -0.04761607572436333, -0.04590698331594467, 0.0026232562959194183, -0.006404123734682798, -0.02959112450480461, 0.006871142890304327, -0.07607442885637283, -0.012748627923429012, -0.06049387902021408, -0.06558140367269516, 0.0396469421684742, -0.0047372630797326565, 0.0037287003360688686, 0.0004934131284244359, -0.0020109147299081087, 0.016057508066296577, -0.032532352954149246, 0.01537188421934843, 0.01816406287252903, 0.046662162989377975, -0.004662738647311926, -0.030684148892760277, 0.042886264622211456, 0.03416195139288902, -0.007407717872411013, -0.028041020035743713, 0.025954337790608406, 0.015332138165831566, -0.015530869364738464, -0.04209133982658386, 0.03620888665318489, 0.024841440841555595, 0.04856998845934868, 0.009648416191339493, 0.02921353466808796, -0.06574039161205292, 0.030425798147916794, -0.021542498841881752, -0.00661776028573513, 0.03267146274447441, 0.05099451169371605, -0.03839493170380592, 0.011695350520312786, 0.08561354130506516, -0.00825729500502348, 0.07396787405014038, -0.015173153020441532, -0.01662389189004898, 0.013921143487095833, -0.003758510109037161, 0.04276702553033829, 0.05946047604084015, 0.07150360941886902, -0.043084997683763504, 0.017518185079097748, 0.04936491325497627, 0.015401693992316723, 0.05675772577524185, -0.05723468214273453, -0.020369982346892357, 0.013891334645450115, -0.04376068338751793, -0.045430026948451996, 0.015878649428486824, -0.03871290385723114, 0.046503178775310516, -0.017379073426127434, 0.00490618497133255, 0.002998362062498927, 0.02740507759153843, -0.05365751311182976, -0.0010129098081961274, -0.012649262323975563, 0.00731332041323185, -0.023569559678435326, -0.03143933042883873, -0.07035095989704132, -0.022754760459065437, 0.023947149515151978, 0.0002864528796635568, 0.0008899446693249047, -0.03789810463786125, -0.008098309859633446, -0.003470349358394742, -0.07094715535640717, -0.012997042387723923, 0.014815435744822025, 0.017756663262844086, -0.018452223390340805, 0.050557300448417664, -0.021482879295945168, -0.04252854734659195, 0.001222820021212101, 0.02666977234184742, -0.04093869775533676, -0.038235947489738464, 0.01892917789518833, -0.002581025706604123, 0.02871670573949814, 0.002081712707877159, -0.0144279096275568, 0.04471459612250328, 0.0146266408264637, -0.0022369718644768, -0.024583090096712112, 0.008530550636351109, -0.01800507679581642, -0.007422622758895159, -0.013205710798501968, 0.006414060480892658, 0.049086689949035645, -0.004829176235944033, -0.010393659584224224, -0.021800849586725235, -0.0063941869884729385, -0.02666977234184742, 0.10365837067365646, -0.04252854734659195, -0.001648229663260281, 0.004064059816300869, 0.025835098698735237, 0.04602622240781784, -0.04197210073471069, -0.0396469421684742, 0.035155609250068665, -0.00800391286611557, 0.02901480346918106, -0.0056489440612494946, -0.012599579058587551, -0.014328544028103352, 0.04698013514280319, -0.011625794693827629, 0.050080347806215286, 0.0423298180103302, 0.04761607572436333, 0.015948206186294556, 0.011904018931090832, -0.029312901198863983, 0.08092348277568817, -0.01273869164288044, 0.06613785773515701, -0.006011629011482, -0.004076480399817228, -0.059857938438653946, 0.016325796023011208, 0.02871670573949814, 0.06633658707141876, 0.05087527260184288, -0.04101818799972534, -0.008182770572602749, -0.07436534017324448, -0.03229387477040291, 0.023986896499991417, 0.012838057242333889, -0.008302009664475918, 0.02786216139793396, 0.015193025581538677, -0.05616153031587601, -0.055247366428375244, 0.03201565146446228, 0.04634419456124306, -0.02547738328576088, -0.05095476657152176, 0.01185433566570282, 0.008783933706581593, -0.02082706429064274, 0.01566004566848278, 0.0047447155229747295, -0.0261729434132576, -0.014884991571307182, -0.06152728199958801, -0.0027300743386149406, -0.005112368613481522, -0.009996196255087852, -0.04105793312191963, -0.03839493170380592, -0.042926009744405746, -0.03048541769385338, 0.0746435672044754, 0.0018867074977606535, -0.038812268525362015, 0.002056871308013797, 0.10954082012176514, 0.009221143089234829, -0.05246512591838837, -0.05588330700993538, -0.00798403937369585, 0.01058245450258255, -0.009330445900559425, 0.01031416654586792, 0.03817632794380188, 0.007238795980811119, -0.0020519031677395105, 0.004240434151142836, -0.024682456627488136, 0.001284302561543882, 0.0461852066218853, -0.006473679561167955, 0.01758773997426033, -0.042727280408144, -0.03106173872947693, 0.01585877686738968, 0.0017252381658181548, 0.06931755691766739, -0.07062918692827225, 0.01801501400768757, 0.06291840225458145, -0.01912791095674038, 0.04044186696410179, 0.02655053324997425, -0.028378862887620926, -0.031002119183540344, -0.0151035962626338, 0.029034677892923355, -0.05791036784648895, 0.016454970464110374, -0.021761102601885796, -0.013464061543345451, 0.039348844438791275, 0.015799157321453094, 0.014447782188653946, 0.0018941599410027266, -0.031498949974775314, -0.0073232571594417095, 0.05612178519368172, -0.09491418302059174, 0.07790276408195496, 0.02263552136719227, 0.052743349224328995, 0.015183089300990105, -0.04825201630592346, 0.01708097569644451, 0.045390281826257706, -0.024801695719361305, 0.058586057275533676, -0.024523470550775528, 0.041892606765031815, 0.03547357767820358, -0.015361947938799858, -0.04972263053059578, -0.03352601081132889, -0.001742627122439444, -0.037460893392562866, 0.0635145977139473, 0.04594673216342926, -0.05202791467308998, 0.028100639581680298, -0.03601015359163284, 0.020727699622511864, 0.01734926365315914, -0.021840594708919525, 0.047854553908109665, 0.03163805976510048, 0.06025540083646774, 0.023410575464367867, -0.01816406287252903, -0.00810327846556902, -0.03948795422911644, 0.04574799910187721, -0.0198234710842371, 0.016454970464110374, 0.025258777663111687, 0.015193025581538677, 0.02120465412735939, 0.029769983142614365, 0.033227913081645966 ]
4,595
optbinning.binning.continuous_binning
_fit_optimizer
null
def _fit_optimizer(self, splits, n_records, sums, ssums, stds): if self.verbose: logger.info("Optimizer started.") time_init = time.perf_counter() if len(n_records) <= 1: self._status = "OPTIMAL" self._splits_optimal = splits self._solution = np.zeros(len(splits)).astype(bool) if self.verbose: logger.warning("Optimizer: {} bins after pre-binning." .format(len(n_records))) logger.warning("Optimizer: solver not run.") logger.info("Optimizer terminated. Time: 0s") return if self.min_bin_size is not None: min_bin_size = int(np.ceil(self.min_bin_size * self._n_samples)) else: min_bin_size = self.min_bin_size if self.max_bin_size is not None: max_bin_size = int(np.ceil(self.max_bin_size * self._n_samples)) else: max_bin_size = self.max_bin_size # Monotonic trend trend_change = None if self.dtype == "numerical": auto_monotonic_modes = ("auto", "auto_heuristic", "auto_asc_desc") if self.monotonic_trend in auto_monotonic_modes: monotonic = auto_monotonic_continuous( n_records, sums, self.monotonic_trend) if self.monotonic_trend == "auto_heuristic": if monotonic in ("peak", "valley"): if monotonic == "peak": monotonic = "peak_heuristic" else: monotonic = "valley_heuristic" mean = sums / n_records trend_change = peak_valley_trend_change_heuristic( mean, monotonic) if self.verbose: logger.info("Optimizer: classifier predicts {} " "monotonic trend.".format(monotonic)) else: monotonic = self.monotonic_trend if monotonic in ("peak_heuristic", "valley_heuristic"): mean = sums / n_records trend_change = peak_valley_trend_change_heuristic( mean, monotonic) else: monotonic = self.monotonic_trend if monotonic is not None: monotonic = "ascending" if self.verbose: if monotonic is None: logger.info( "Optimizer: monotonic trend not set.") else: logger.info("Optimizer: monotonic trend set to {}." .format(monotonic)) optimizer = ContinuousBinningCP(monotonic, self.min_n_bins, self.max_n_bins, min_bin_size, max_bin_size, self.min_mean_diff, self.max_pvalue, self.max_pvalue_policy, self.gamma, self.user_splits_fixed, self.time_limit) if self.verbose: logger.info("Optimizer: build model...") optimizer.build_model(n_records, sums, ssums, trend_change) if self.verbose: logger.info("Optimizer: solve...") status, solution = optimizer.solve() self._solution = solution self._optimizer, self._time_optimizer = solver_statistics( self.solver, optimizer.solver_) self._status = status if self.dtype == "categorical" and self.user_splits is not None: self._splits_optimal = splits[solution] else: self._splits_optimal = splits[solution[:-1]] self._time_solver = time.perf_counter() - time_init if self.verbose: logger.info("Optimizer terminated. Time: {:.4f}s" .format(self._time_solver))
(self, splits, n_records, sums, ssums, stds)
[ -0.030182402580976486, -0.012889178469777107, -0.02730509266257286, 0.0040443832986056805, -0.041848234832286835, -0.024036310613155365, -0.06326168775558472, -0.04235714673995972, -0.08314841240644455, 0.0017897558864206076, -0.059777598828077316, 0.07030816376209259, 0.015893716365098953, -0.0059650372713804245, -0.04595867916941643, 0.07026901841163635, -0.036074038594961166, -0.020033521577715874, -0.01198879536241293, -0.00428660586476326, -0.030769608914852142, -0.02703106217086315, -0.05461018532514572, 0.05958186462521553, -0.0043722400441765785, -0.010618646629154682, 0.017900004982948303, -0.03215933218598366, -0.026013238355517387, 0.018144674599170685, -0.016950687393546104, -0.020043307915329933, 0.013035980053246021, -0.021237293258309364, 0.005666540469974279, -0.052691977471113205, 0.04415791109204292, 0.036367643624544144, -0.002984965220093727, 0.009698690846562386, -0.024055885151028633, -0.050147417932748795, 0.03147425875067711, 0.005387617740780115, -0.032100610435009, 0.004352666437625885, -0.014895466156303883, 0.060599688440561295, -0.022724883630871773, -0.04944276809692383, -0.009478488005697727, -0.04779859259724617, 0.007207957096397877, -0.01125478744506836, -0.013437237590551376, 0.024271193891763687, 0.04482341185212135, 0.01157775055617094, 0.021374309435486794, -0.08252205699682236, -0.00415448471903801, -0.028733961284160614, -0.00869065336883068, 0.011117772199213505, -0.027089783921837807, -0.0091848848387599, -0.07273528724908829, -0.02662001922726631, 0.04176994040608406, 0.03278568387031555, 0.060051631182432175, 0.007951752282679081, 0.027637843042612076, -0.0026204080786556005, -0.04059552773833275, -0.011088412255048752, -0.03652423247694969, -0.05688071623444557, -0.024173324927687645, -0.03055430017411709, 0.03789437934756279, 0.03397966921329498, 0.0020185215398669243, -0.10726301372051239, -0.023214222863316536, -0.031415536999702454, 0.004430960863828659, 0.011088412255048752, 0.040791261941194534, -0.057624511420726776, 0.02260744199156761, 0.02250957489013672, 0.06827251613140106, 0.05030400678515434, 0.010559926740825176, 0.02102198451757431, -0.04509744420647621, -0.027246370911598206, -0.02571963518857956, -0.027618268504738808, 0.00474903080612421, 0.019749704748392105, 0.017997872084379196, 0.06294851750135422, -0.013769987039268017, -0.03681783378124237, -0.0026766820810735226, -0.0004367346700746566, -0.0156784076243639, -0.03838371858000755, -0.028577372431755066, 0.01672559231519699, -0.0350562147796154, 0.002416109200567007, -0.06674578040838242, 0.004313519690185785, -0.04662417992949486, 0.03975386545062065, -0.025249870494008064, 0.04717223718762398, -0.017978299409151077, 0.02622854709625244, -0.03625020012259483, 0.03159169852733612, -0.017704268917441368, -0.02769656293094158, 0.05324003845453262, 0.04086955636739731, 0.03787480667233467, -0.059934187680482864, 0.024055885151028633, -0.03576086461544037, -0.0036455723457038403, 0.0374833345413208, -0.00034100780612789094, -0.0056714341044425964, -0.043061792850494385, 0.05547142028808594, -0.028968842700123787, -0.041182734072208405, 0.08385305851697922, 0.007677722256630659, -0.021883221343159676, -0.034469008445739746, 0.041026145219802856, 0.013241501525044441, 0.030593447387218475, -0.010961184278130531, -0.024682236835360527, 0.02250957489013672, -0.0028724174480885267, -0.04830750450491905, -0.004061510320752859, -0.007173703517764807, 0.0014508889289572835, -0.0023157948162406683, -0.012341118417680264, -0.015874143689870834, -0.03149383142590523, -0.038638174533843994, -0.03037813864648342, 0.006699045188724995, 0.0005104413139633834, -0.0059307836927473545, -0.052300505340099335, 0.046154413372278214, -0.05304430052638054, 0.03476261347532272, -0.031807009130716324, 0.005260389763861895, 0.009282752871513367, -0.04337497055530548, -0.0339992456138134, 0.019593115895986557, -0.03106321208178997, 0.04862068220973015, 0.029751785099506378, -0.03149383142590523, -0.050029974430799484, 0.02517157606780529, 0.0013554678298532963, -0.032218050211668015, -0.0032198478002101183, -0.02689404785633087, -0.023272942751646042, 0.052300505340099335, 0.01091224979609251, -0.036485083401203156, -0.001762842177413404, -0.005837809294462204, -0.07606279104948044, -0.047876887023448944, -0.004477447830140591, -0.05159585922956467, -0.001679654698818922, -0.0007676499080844223, 0.03403839096426964, 0.01821318082511425, 0.03658295050263405, -0.013897215947508812, 0.004925192799419165, 0.0442362055182457, 0.03773779049515724, -0.008044726215302944, -0.011567964218556881, 0.002524987095966935, -0.04454938322305679, 0.012027942575514317, 0.018007660284638405, 0.05186988785862923, -0.017909791320562363, -0.04161335155367851, -0.01358403917402029, 0.06490586698055267, 0.06283107399940491, 0.024427780881524086, 0.02744210697710514, -0.014729090966284275, 0.010305470786988735, -0.03321630135178566, 0.02221597172319889, -0.052143920212984085, -0.011851780116558075, 0.013016406446695328, 0.0401257649064064, -0.032335493713617325, 0.02773571014404297, 0.00572526128962636, 0.0533183328807354, -0.000298496539471671, -0.011460309848189354, -0.059386130422353745, -0.016392841935157776, -0.02652215026319027, 0.04807262122631073, -0.006610963959246874, -0.02920372597873211, 0.03897092491388321, 0.022039810195565224, -0.05198733136057854, -0.022959765046834946, -0.033960096538066864, -0.06146092340350151, -0.021511323750019073, -0.06674578040838242, 0.020513072609901428, 0.043844737112522125, 0.010608860291540623, -0.002994752023369074, 0.024290766566991806, 0.04165250062942505, -0.05367065593600273, -0.028225049376487732, -0.020043307915329933, 0.006043331231921911, -0.03617190569639206, 0.02693319506943226, 0.03656337782740593, 0.01805659383535385, -0.03994959965348244, -0.013231715187430382, 0.019191859290003777, -0.03276611119508743, 0.021765779703855515, -0.0428660586476326, 0.016921328380703926, 0.029145006090402603, -0.05140012502670288, 0.006478842813521624, 0.04028235003352165, 0.04830750450491905, 0.09387471526861191, -0.03949940949678421, 0.019338659942150116, -0.03482133150100708, 0.08502747118473053, 0.002395312301814556, -0.02810760773718357, 0.04137846827507019, 0.01645156368613243, 0.07860735058784485, 0.014543142169713974, 0.013319795951247215, -0.013897215947508812, -0.004279265645891428, -0.00850959774106741, -0.04995168000459671, -0.00712966313585639, 0.014063590206205845, 0.012644508853554726, 0.02932116761803627, 0.02759869582951069, 0.10773278027772903, -0.008304075337946415, 0.05218306556344032, 0.023527398705482483, 0.03239421173930168, -0.024271193891763687, 0.0040443832986056805, -0.011538603343069553, -0.031924448907375336, -0.022861897945404053, 0.03198317065834999, -0.030025815591216087, 0.0385403074324131, -0.022176824510097504, 0.011753912083804607, -0.060599688440561295, 0.0734790787100792, 0.018937403336167336, 0.0035110043827444315, 0.018771028146147728, 0.06349657475948334, 0.0209045447409153, 0.015355444513261318, -0.03949940949678421, -0.010863316245377064, -0.033294595777988434, 0.01738130673766136, 0.04764200374484062, -0.016412416473031044, 0.013750414364039898, 0.027814004570245743, -0.05715474486351013, -0.019045056775212288, -0.016676658764481544, 0.030338991433382034, -0.04380558803677559, -0.07868564128875732, -0.05476677417755127, 0.033666495233774185, -0.04940362274646759, 0.07668913900852203, 0.05504080280661583, 0.009033190086483955, 0.021491751074790955, 0.05198733136057854, 0.01224325131624937, -0.0058867428451776505, -0.021061131730675697, 0.07015157490968704, 0.06866399198770523, 0.0026375348679721355, 0.048268355429172516, 0.011421162635087967, -0.03026069700717926, -0.0064005483873188496, -0.003777693724259734, -0.03773779049515724, 0.02262701652944088, -0.01391678862273693, -0.009409980848431587, 0.0038241809234023094, 0.056684982031583786, 0.051086947321891785, -0.005338683724403381, 0.0348409079015255, -0.026326416060328484, 0.05183074250817299, -0.07398799061775208, -0.06870313733816147, 0.041182734072208405, 0.001329777529463172, 0.055236537009477615, 0.05547142028808594, -0.005206562578678131, -0.022646589204669, -0.04642844572663307, 0.030828330665826797, -0.06322254240512848, -0.01493461336940527, -0.06854654848575592, 0.01413209829479456, 0.02707020938396454, 0.015052054077386856, 0.057624511420726776, -0.031141506507992744, -0.009131058119237423, 0.03495834767818451, 0.009096804074943066, -0.013730840757489204, 0.02716807834804058, 0.018780814483761787, 0.029751785099506378, 0.004499468021094799, -0.035525981336832047, -0.014650796540081501, -0.023135928437113762, 0.07539729028940201, -0.03333374485373497, 0.06670663505792618, 0.024447355419397354, -0.029086284339427948, -0.027951018884778023, -0.019514821469783783, 0.03908836469054222, 0.07751122862100601, 0.047994326800107956, -0.05073462426662445, -0.015903504565358162, -0.06666748970746994, -0.06870313733816147, -0.0030290058348327875, 0.054962508380413055, -0.03994959965348244, -0.04259203001856804, 0.02571963518857956, -0.00249318010173738, -0.02331208996474743, 0.04580209031701088, -0.024858400225639343, -0.008152380585670471, 0.02023904398083687, -0.005705687683075666, -0.055902037769556046, -0.0009205681853927672, -0.014494208618998528, 0.041574206203222275, 0.07931199669837952, -0.020943690091371536, 0.0568024218082428, 0.023507824167609215, 0.05641094967722893, 0.01057950034737587, 0.0127228032797575, -0.012429200112819672, -0.02260744199156761, -0.050147417932748795, -0.018389344215393066, -0.04216141253709793, -0.007785376626998186, 0.01672559231519699, -0.06678492575883865, 0.01607966609299183, -0.0271876510232687, -0.024682236835360527, -0.01714642345905304, 0.045841239392757416, -0.00176651228684932, -0.01954418234527111, 0.011871353723108768, -0.04204396903514862, 0.01658857800066471, -0.002386748790740967, -0.0156784076243639, -0.016911542043089867, 0.03961684927344322, -0.036759112030267715, -0.15165580809116364, 0.019250579178333282, 0.030828330665826797, -0.003900028532370925, -0.002901777857914567, 0.02395801618695259, -0.00028152260347269475, -0.009825918823480606, 0.014680157415568829, -0.002684022067114711, -0.005407191347330809, -0.004577762447297573, 0.003816840937361121, 0.02503456175327301, 0.00864171888679266, -0.0113232946023345, -0.047720298171043396, -0.00565675413236022, 0.012771736830472946, 0.018291475251317024, 0.01765533536672592, -0.01431804709136486, 0.008113233372569084, -0.03478218615055084, 0.003033899236470461, -0.023938443511724472, -0.016980048269033432, 0.0299866683781147, 0.00562739372253418, 0.023370809853076935, -0.016764739528298378, 0.005333790555596352, 0.012223677709698677, 0.038755614310503006, -0.02973221242427826, 0.03734631836414337, 0.024995414540171623, -0.008123020641505718, -0.02247042767703533, -0.008558531291782856, 0.008264928124845028, 0.005226136185228825, 0.0312002282589674, -0.03339246287941933, 0.07641511410474777, 0.0533183328807354, -0.00869065336883068, 0.03305971249938011, 0.017704268917441368, 0.040086615830659866, 0.06838995963335037, -0.05903380736708641, 0.01738130673766136, -0.010188029147684574, -0.06114774942398071, -0.03151340410113335, 0.00783920381218195, -0.003386222990229726, -0.04208311811089516, 0.04979509487748146, -0.10123436152935028, -0.006806699559092522, -0.014464848674833775, -0.05030400678515434, -0.00023197707196231931, -0.0007272794609889388, 0.04427535459399223, -0.011284147389233112, -0.008123020641505718, -0.011059051379561424, -0.03290312737226486, 0.007716869469732046, 0.03053472749888897, 0.02061094157397747, -0.011352654546499252, -0.005681220907717943, 0.020708808675408363, 0.00323208118788898, 0.005206562578678131, 0.013544891960918903, 0.060873717069625854, 0.0159426499158144, 0.012331332080066204, -0.01728343777358532, 0.0033984563779085875, 0.05735047906637192, 0.06279192864894867, 0.009140844456851482, 0.036896128207445145, -0.055236537009477615, -0.02679618075489998, 0.0014080717228353024, -0.02329251542687416, 0.02984965220093727, 0.049090445041656494, -0.03993002697825432, 0.0022803177125751972, 0.08588870614767075, -0.011695192195475101, 0.00911637768149376, -0.008215994574129581, 0.008930428884923458, 0.029360314831137657, 0.06917290389537811, 0.03830542415380478, 0.06036480516195297, 0.05582374334335327, -0.0337839350104332, -0.025778356939554214, 0.00929743330925703, 0.020532647147774696, 0.04337497055530548, -0.04564550146460533, -0.04239629581570625, 0.0070317951031029224, -0.013319795951247215, -0.022294266149401665, 0.001165849156677723, 0.013613399118185043, 0.0242320466786623, 0.0029653918463736773, 0.01983778551220894, 0.0015927971107885242, 0.01138201542198658, -0.057389628142118454, -0.015776274725794792, -0.014973760582506657, 0.03816840797662735, -0.019103778526186943, -0.010197815485298634, -0.05770280584692955, -0.0023096781224012375, -0.0019573543686419725, -0.014719304628670216, -0.019319087266921997, -0.01794893853366375, -0.011832206510007381, 0.02945818193256855, -0.11102113872766495, -0.009405087679624557, -0.004675630014389753, 0.009219138883054256, -0.01070672832429409, 0.045293178409338, -0.05727218836545944, -0.02920372597873211, -0.010980757884681225, 0.01675495319068432, -0.06615857779979706, -0.02104155905544758, 0.014719304628670216, 0.004017469473183155, -0.04979509487748146, -0.019465887919068336, -0.007667935453355312, 0.01927015371620655, 0.029830079525709152, -0.004296392668038607, -0.01728343777358532, 0.052966006100177765, 0.030104108154773712, -0.011675618588924408, -0.019309300929307938, 0.02317507565021515, 0.06181325018405914, -0.010559926740825176, -0.021883221343159676, -0.012478133663535118, -0.020532647147774696, -0.004722117446362972, 0.08941194415092468, -0.05038230121135712, 0.03544768691062927, 0.02491712011396885, 0.030730461701750755, 0.03345118463039398, -0.06228301301598549, -0.008529171347618103, 0.059777598828077316, -0.0654539242386818, -0.009224032051861286, -0.04858153313398361, -0.00998250674456358, 0.01701919548213482, 0.04889471083879471, -0.013437237590551376, 0.0393819697201252, -0.0024503630120307207, 0.07355737686157227, 0.04400132596492767, 0.029399462044239044, -0.08714141696691513, 0.06553222239017487, -0.002569027477875352, 0.0484640933573246, -0.02799016609787941, 0.01632433570921421, -0.04274861887097359, 0.0038241809234023094, 0.058290012180805206, 0.06036480516195297, 0.03362734615802765, -0.032589949667453766, 0.003085279604420066, -0.09872894734144211, -0.01806638017296791, 0.06318339705467224, 0.020395630970597267, 0.01675495319068432, -0.010471845045685768, 0.0313568152487278, -0.03437114134430885, -0.02358611859381199, -0.00504997419193387, 0.04176994040608406, -0.05962101370096207, -0.0033813295885920525, 0.02838163636624813, -0.01929951272904873, 0.0029800718184560537, 0.00904787052422762, 0.01769448257982731, -0.031944021582603455, -0.03147425875067711, -0.05030400678515434, 0.03773779049515724, 0.011930074542760849, 0.012742376886308193, -0.040634676814079285, -0.04462767764925957, -0.08667165040969849, -0.047093942761421204, 0.08980341255664825, 0.004734350834041834, -0.001651517697609961, -0.044784266501665115, 0.07030816376209259, 0.008989149704575539, -0.03264867141842842, -0.0313568152487278, 0.054022978991270065, -0.010148881934583187, -0.014141884632408619, 0.0156784076243639, 0.010765448212623596, 0.011567964218556881, 0.03441028669476509, -0.02986922673881054, -0.029007989913225174, -0.012624935247004032, 0.052026476711034775, 0.002671788679435849, 0.0530051551759243, -0.03628934919834137, -0.045175738632678986, 0.02342953160405159, -0.010158669203519821, 0.039029642939567566, -0.06056054309010506, 0.019240792840719223, 0.039147086441516876, -0.03871646896004677, -0.0040786368772387505, 0.020141175016760826, -0.019182072952389717, -0.008171954192221165, 0.008715120144188404, 0.0028332702349871397, -0.0010802148608490825, -0.003303035395219922, -0.03711143881082535, -0.005416978150606155, 0.034077540040016174, 0.0013432344421744347, -0.012673868797719479, -0.013075126335024834, 0.002084582345560193, -0.034214552491903305, 0.07203064113855362, -0.0487772673368454, 0.05707645043730736, 0.015159709379076958, 0.07003413885831833, -0.01493461336940527, -0.007359652314335108, -0.049716800451278687, 0.015335870906710625, 0.02703106217086315, 0.043570708483457565, -0.053905535489320755, 0.030025815591216087, 0.058720629662275314, -0.023644840344786644, -0.013828707858920097, -0.024975840002298355, -0.037150584161281586, -0.07903796434402466, 0.049990829080343246, -0.004125124309211969, -0.014484421350061893, 0.04188738018274307, -0.015512032434344292, 0.020043307915329933, 0.009106590412557125, 0.05981674790382385, 0.06412293016910553, 0.027676990255713463, 0.019573543220758438, 0.012810884043574333, -0.051204387098550797, -0.010736088268458843, -0.03951898217201233, 0.0610303059220314, -0.028557799756526947, 0.016510283574461937, 0.03276611119508743, -0.024408208206295967, -0.021217720583081245, 0.03190487623214722, 0.005935676861554384 ]
4,596
optbinning.binning.binning
_fit_prebinning
null
def _fit_prebinning(self, x, y, y_missing, x_special, y_special, y_others, class_weight=None, sw_clean=None, sw_missing=None, sw_special=None, sw_others=None): min_bin_size = int(np.ceil(self.min_prebin_size * self._n_samples)) prebinning = PreBinning(method=self.prebinning_method, n_bins=self.max_n_prebins, min_bin_size=min_bin_size, problem_type=self._problem_type, class_weight=class_weight, **self.prebinning_kwargs ).fit(x, y, sw_clean) return self._prebinning_refinement(prebinning.splits, x, y, y_missing, x_special, y_special, y_others, sw_clean, sw_missing, sw_special, sw_others)
(self, x, y, y_missing, x_special, y_special, y_others, class_weight=None, sw_clean=None, sw_missing=None, sw_special=None, sw_others=None)
[ 0.014383796602487564, -0.05953732505440712, -0.004063554108142853, 0.029206659644842148, -0.030664358288049698, -0.044292960315942764, -0.019336458295583725, -0.037267908453941345, 0.020372655242681503, -0.0015916136326268315, 0.00879448838531971, -0.002093246439471841, -0.0026980594266206026, -0.021918166428804398, -0.06677313148975372, -0.02932959794998169, 0.006067889742553234, 0.013602259568870068, -0.03530089184641838, -0.011749401688575745, -0.006151312030851841, 0.01924864575266838, -0.03036579303443432, 0.11879365146160126, 0.014173044823110104, 0.03477401286363602, -0.03006722778081894, -0.01232896838337183, -0.006766004487872124, -0.02233966998755932, 0.01823001354932785, -0.011652806773781776, 0.02903103269636631, -0.04478471353650093, 0.02565900608897209, -0.029803788289427757, 0.032596245408058167, 0.04724348336458206, -0.01866907812654972, -0.0023380254860967398, 0.01697428524494171, -0.07060178369283676, 0.032157182693481445, -0.00773194944486022, 0.04271232336759567, 0.020794156938791275, 0.023094862699508667, 0.04555746912956238, -0.014998489059507847, 0.031718116253614426, 0.0020789767149835825, -0.06312010437250137, 0.059888578951358795, 0.041096560657024384, -0.009949231520295143, 0.03983205184340477, 0.026976203545928, 0.06919677555561066, 0.003308360930532217, -0.02627369947731495, 0.02332317642867565, 0.04102630913257599, -0.002706840867176652, -0.04169369116425514, 0.02973353862762451, -0.038567543029785156, -0.06870502233505249, -0.002838560612872243, -0.020074089989066124, 0.018475890159606934, 0.04506571590900421, -0.009650667198002338, 0.013145631179213524, 0.04871874302625656, -0.05296890065073967, -0.001536730444058776, -0.018493453040719032, -0.05022913217544556, 0.035107702016830444, -0.021110285073518753, 0.06540324538946152, 0.05918607488274574, -0.036108773201704025, -0.048788994550704956, -0.03164786472916603, -0.03556433320045471, 0.01392716821283102, 0.021373724564909935, 0.06585987657308578, 0.0035827772226184607, -0.06009932979941368, 0.055216919630765915, 0.07411431521177292, 0.03240305930376053, 0.10930982977151871, 0.03877829387784004, -0.020355092361569405, 0.018616391345858574, 0.014339890331029892, -0.04299332574009895, -0.03163030371069908, 0.007986607030034065, -0.022655796259641647, 0.032016679644584656, 0.014638454653322697, 0.04696248099207878, 0.03331631422042847, -0.03993742913007736, -0.08394938707351685, -0.0076880427077412605, -0.009747261181473732, -0.06111796200275421, -0.09364395588636398, 0.0423259474337101, -0.0016508875414729118, -0.032332807779312134, -0.030172603204846382, 0.03540626913309097, 0.030611669644713402, 0.043836332857608795, -0.0022172825410962105, -0.010642956010997295, -0.04021843150258064, 0.0035827772226184607, -0.012460688129067421, -0.0007272028014995158, 0.1080453172326088, 0.06740538775920868, -0.00769682414829731, -0.05409291014075279, 0.05613017454743385, 0.005040475632995367, -0.06501686573028564, 0.014436484314501286, -0.060907211154699326, -0.02390274405479431, -0.0063620638102293015, 0.04099118709564209, 0.043133825063705444, -0.059010446071624756, 0.0948382169008255, -0.02291923575103283, 0.025325316935777664, 0.03512526676058769, 0.001835295115597546, 0.024113494902849197, 0.015499023720622063, -0.011705494485795498, 0.03607364743947983, 0.021268349140882492, 0.013215881772339344, 0.006190828047692776, 0.004059163387864828, -0.025044314563274384, -0.010397078469395638, 0.018932517617940903, -0.0066474564373493195, 0.007248976733535528, -0.01866907812654972, -0.01774704083800316, 0.008517877198755741, -0.03312312439084053, 0.030734607949852943, -0.04636535048484802, -0.026607388630509377, 0.050580382347106934, -0.039305172860622406, -0.046751730144023895, 0.028398778289556503, -0.012952442280948162, 0.07657308131456375, -0.029680849984288216, -0.0178699791431427, 0.01866907812654972, 0.03688152879476547, 0.05472516641020775, 0.005123898386955261, -0.08584614843130112, -0.0009297218639403582, 0.056235551834106445, 0.03905929625034332, -0.006283031776547432, 0.0437309555709362, -0.05897532030940056, -0.02904859557747841, 0.0018506624037399888, 0.00795587245374918, -0.027977274730801582, -0.012697783298790455, 0.02521994151175022, 0.019916025921702385, 0.02759089693427086, -0.011872339993715286, 0.036530278623104095, -0.006774785928428173, 0.0049746157601475716, 0.004239180590957403, 0.03198155388236046, -0.020952221006155014, -0.006796739064157009, -0.03575751930475235, -0.011766964569687843, 0.029399847611784935, 0.010642956010997295, -0.03036579303443432, 0.008372985757887363, -0.03691665455698967, 0.022128917276859283, 0.009106225334107876, -0.036284398287534714, 0.02948766015470028, -0.013066599145531654, -0.004895584192126989, 0.009027193300426006, -0.0023029001895338297, -0.0014203779865056276, 0.041482940316200256, -0.032332807779312134, -0.01880957931280136, -0.045452095568180084, 0.039761800318956375, -0.009738479740917683, -0.021338598802685738, 0.009316977113485336, 0.03530089184641838, 0.00268269213847816, 0.04348507896065712, -0.03106829710304737, 0.022848986089229584, -0.0031920084729790688, -0.015305834822356701, -0.01613127812743187, -0.03410663455724716, -0.043836332857608795, 0.02377980574965477, 0.018177324905991554, -0.009000849910080433, -0.03036579303443432, 0.007205069996416569, 0.004588237963616848, -0.0016991847660392523, 0.012636314146220684, -0.0321396179497242, -0.07214729487895966, -0.004882412031292915, 0.025940008461475372, 0.005883482284843922, 0.047208357602357864, 0.010212671011686325, 0.006050327327102423, 0.002970280358567834, 0.008065639063715935, -0.03898904472589493, 0.00045553079689852893, 0.015261928550899029, 0.006524518132209778, -0.030611669644713402, -0.02321780100464821, -0.024341808632016182, 0.034914515912532806, -0.0075080255046486855, 0.053495779633522034, -0.003951592370867729, 0.03593314811587334, -0.006766004487872124, 0.024991627782583237, -0.027538208290934563, 0.02230454422533512, 0.008921817876398563, 0.03048873133957386, -0.06392798572778702, 0.014102794229984283, 0.023533929139375687, 0.022269418463110924, -0.0005625531193800271, 0.02962816134095192, -0.02246260829269886, -0.013532008975744247, 0.04787573963403702, -0.03600339964032173, 0.03835679218173027, -0.008733019232749939, 0.054198287427425385, -0.021356161683797836, 0.013075380586087704, -0.034651074558496475, -0.018475890159606934, -0.0167898777872324, -0.00887352041900158, -0.0466463528573513, -0.06540324538946152, 0.02465793676674366, 0.07994510233402252, 0.02932959794998169, 0.06220684573054314, -0.028662217780947685, -0.013084162026643753, -0.022673359140753746, 0.024552561342716217, -0.019898463040590286, 0.01972283609211445, -0.027169393375515938, -0.014761392958462238, -0.0013512250734493136, 0.041061434894800186, -0.015806369483470917, 0.05655167996883392, -0.010080951265990734, -0.06213659420609474, -0.018194887787103653, 0.027766522020101547, 0.03681127727031708, 0.055778924375772476, -0.037127405405044556, -0.0028890531975775957, -0.11781014502048492, 0.038602668792009354, 0.058588944375514984, -0.007385087199509144, 0.042677197605371475, 0.01986333727836609, -0.01663181371986866, -0.02274361066520214, 0.008030514232814312, -0.05300402641296387, 0.04246644675731659, 0.037548910826444626, -0.005892263259738684, -0.12005815654993057, -0.02743283286690712, 0.0196701493114233, 0.024622811004519463, -0.01088005118072033, 0.024833563715219498, -0.07488706707954407, 0.022655796259641647, -0.0039713503792881966, -0.018704203888773918, -0.0027265988755971193, -0.05486566573381424, 0.007117256987839937, -0.014155481941998005, -0.0017068684101104736, 0.03818116337060928, -0.01952964812517166, -0.02495650202035904, -0.0020164097659289837, -0.013470539823174477, 0.00933453906327486, 0.019916025921702385, 0.0022897282615303993, -0.007929529063403606, 0.025272628292441368, -0.005519057624042034, 0.07601107656955719, -0.05879969522356987, -0.007209460716694593, 0.0003655223117675632, 0.039761800318956375, -0.019916025921702385, 0.041377563029527664, 0.0022271613124758005, -0.05008862912654877, 0.05504129081964493, 0.02743283286690712, -0.00037704777787439525, -0.006643066182732582, 0.018879830837249756, -0.056832682341337204, 0.00933453906327486, 0.007398259360343218, -0.06547349691390991, -0.09750773757696152, 0.012021622620522976, 0.012056747451424599, 0.027467958629131317, -0.034510575234889984, -0.033614881336688995, 0.024693062528967857, 0.03006722778081894, -0.006524518132209778, 0.027748961001634598, -0.014295983128249645, -0.008974505588412285, -0.005497104022651911, -0.012838284485042095, -0.005663949064910412, -0.013909605331718922, 0.08106911182403564, -0.05528716742992401, 0.02263823337852955, -0.02102247253060341, 0.01217968575656414, 0.022866548970341682, -0.048964619636535645, -0.017896322533488274, 0.09237945079803467, 0.024605248123407364, -0.007433384656906128, -0.00971213635057211, 0.010107295587658882, -0.07692433148622513, 0.007604619953781366, 0.025483381003141403, 0.02757333405315876, -0.030611669644713402, -0.009958012960851192, 0.03470376133918762, 0.0014324522344395518, 0.050545256584882736, -0.047945987433195114, 0.04840261861681938, 0.047770362347364426, 0.007859278470277786, -0.048683617264032364, -0.005984467454254627, 0.010818582028150558, 0.01909058168530464, 0.013760322704911232, -0.0270113293081522, 0.04102630913257599, -0.0019274989608675241, 0.02010921575129032, 0.043695829808712006, -0.022989487275481224, 0.026800578460097313, 0.0015806369483470917, -0.093362957239151, -0.010265358723700047, 0.010028263553977013, -0.034651074558496475, -0.07692433148622513, -0.06406848877668381, -0.005352212581783533, -0.023814929649233818, -0.004045991692692041, -0.011099584400653839, 0.033614881336688995, -0.001392936334013939, -0.01952964812517166, -0.039480797946453094, -0.017439695075154305, 0.04123706370592117, -0.023586615920066833, -0.011196178384125233, -0.022884109988808632, -0.01854613982141018, 0.009009630419313908, -0.052582524716854095, -0.003536675125360489, -0.0007079936331138015, -0.03106829710304737, 0.016315685585141182, 0.026642514392733574, -0.021970853209495544, -0.019793087616562843, -0.006748441606760025, -0.041061434894800186, 0.013470539823174477, 0.002294118981808424, 0.010186327621340752, -0.005760543514043093, -0.0276962723582983, 0.03751378506422043, 0.0028824671171605587, -0.0025707304012030363, -0.048051364719867706, -0.024043245241045952, -0.025869758799672127, 0.006976755801588297, 0.028556840494275093, 0.010133638978004456, 0.04162343963980675, -0.038462165743112564, 0.015823932364583015, 0.044011957943439484, 0.006919677369296551, 0.0045223780907690525, 0.043379705399274826, -0.033456817269325256, 0.015419991686940193, 0.05135313794016838, -0.0003051507519558072, 0.03898904472589493, -0.010256577283143997, -0.024903813377022743, -0.07804834097623825, -0.006028373725712299, -0.016675719991326332, 0.02755577117204666, 0.013900823891162872, 0.05584917217493057, 0.043379705399274826, 0.05563842132687569, -0.06199609488248825, 0.04991300404071808, 0.027520645409822464, 0.00781537126749754, 0.08626765012741089, -0.05964270234107971, 0.016245435923337936, -0.02392030693590641, -0.030225291848182678, -0.001301830168813467, -0.030242854729294777, -0.01851101592183113, -0.047348860651254654, 0.024991627782583237, -0.03958617523312569, 0.061328716576099396, -0.003130539320409298, -0.06069646030664444, 0.03078729659318924, -0.005246836692094803, 0.021408850327134132, 0.0008232484105974436, 0.027977274730801582, 0.027661146596074104, -0.021250786259770393, 0.015340959653258324, 0.04914024844765663, 0.010765894316136837, 0.045135967433452606, -0.04826211556792259, 0.0408506840467453, 0.029505223035812378, 0.020074089989066124, -0.03867291659116745, 0.003934029955416918, 0.02555363066494465, 0.03235036879777908, -0.022532857954502106, 0.04387145861983299, 0.030400918796658516, 0.01657034456729889, 0.007995388470590115, 0.05472516641020775, 0.013294912874698639, 0.06182046979665756, -0.044854965060949326, 0.006063499022275209, 0.04418758302927017, 0.05321477726101875, 0.03821628913283348, 0.014436484314501286, 0.05061550810933113, 0.004204055294394493, 0.028995906934142113, -0.05219614505767822, 0.0024565733037889004, -0.05328502878546715, -0.014752611517906189, -0.006950411945581436, 0.06989928334951401, 0.0626986026763916, -0.06139896437525749, 0.04489009082317352, 0.03905929625034332, 0.014357452280819416, 0.05570867285132408, -0.024412060156464577, 0.025167252868413925, 0.035388704389333725, -0.05735956132411957, -0.049105122685432434, -0.031120985746383667, -0.04200981929898262, 0.07109353691339493, -0.019951151683926582, 0.011889902874827385, 0.04534671828150749, 0.07530856877565384, -0.023147549480199814, 0.01952964812517166, -0.018774455413222313, -0.02290167286992073, -0.023147549480199814, -0.046049222350120544, -0.11717788875102997, -0.04366070404648781, 0.008588127791881561, -0.04678685590624809, 0.0010246698511764407, -0.04197469353675842, -0.049386125057935715, -0.043098703026771545, -0.06512224674224854, 0.003624488366767764, -0.04162343963980675, -0.001256825984455645, -0.003446666756644845, 0.044573962688446045, -0.0024587686639279127, -0.016456186771392822, 0.02669520303606987, -0.0069284588098526, -0.019652586430311203, -0.05356603115797043, 0.0069460212253034115, -0.02555363066494465, 0.05033450573682785, 0.012636314146220684, -0.015226802788674831, 0.04415246099233627, 0.04496034234762192, -0.027608459815382957, -0.04935099929571152, 0.013813011348247528, -0.01708844117820263, -0.062066346406936646, 0.004087702836841345, 0.029944289475679398, 0.05198539420962334, -0.010599048808217049, -0.05514666810631752, 0.017035754397511482, -0.03401882201433182, -0.04552234336733818, 0.0772755891084671, -0.029575474560260773, -0.015902964398264885, -0.05584917217493057, -0.0046540978364646435, 0.0510370135307312, -0.028995906934142113, -0.028925657272338867, 0.011766964569687843, -0.025483381003141403, 0.01910814456641674, -0.013066599145531654, 0.01371641643345356, 0.0028714905492961407, 0.05528716742992401, -0.014585766941308975, 0.022655796259641647, 0.03298262506723404, 0.00240827607922256, 0.002500479808077216, -0.01563074253499508, -0.05876456946134567, 0.010985426604747772, -0.008877910673618317, 0.022216731682419777, 0.0025663396809250116, -0.021777665242552757, -0.08451139181852341, -0.03224499523639679, -0.023024611175060272, 0.04973737522959709, -0.0045004249550402164, -0.02759089693427086, -0.025940008461475372, -0.018458327278494835, -0.0010285116732120514, 0.020934658125042915, 0.032894812524318695, -0.0089262081310153, 0.00030377868097275496, 0.050966762006282806, -0.0438012070953846, -0.027801647782325745, 0.019740398973226547, 0.05476028844714165, 0.008381766267120838, -0.034633513540029526, 0.029399847611784935, -0.014515516348183155, -0.13094699382781982, 0.03356219083070755, -0.03238549456000328, -0.06139896437525749, 0.017106004059314728, -0.06593012809753418, -0.04274744912981987, -0.022813860327005386, -0.028416341170668602, -0.07126916199922562, -0.027907023206353188, -0.02599269710481167, 0.00998435728251934, 0.02307729981839657, -0.026589825749397278, -0.03572239726781845, 0.007082131691277027, 0.057851314544677734, 0.0006278641521930695, -0.05936169996857643, -0.03832166641950607, -0.002902225125581026, 0.062347348779439926, 0.03400125727057457, 0.0009824098087847233, 0.0801558569073677, 0.0069372402504086494, -0.030155040323734283, -0.003876951290294528, 0.0033369003795087337, -0.04608434811234474, 0.03019016608595848, -0.04696248099207878, 0.022831423208117485, -0.02565900608897209, -0.06484124064445496, -0.028205588459968567, -0.011363023892045021, 0.03677615523338318, -0.0393402986228466, -0.00017754724831320345, -0.009878980927169323, -0.014656017534434795, 0.015797588974237442, 0.019195957109332085, -0.015288271941244602, -0.0349847637116909, -0.0156746506690979, 0.05767568573355675, -0.017035754397511482, -0.0020317770540714264, -0.0012425562599673867, 0.004838505294173956, 0.012276280671358109, 0.02539556659758091, -0.005150242242962122, 0.03324606269598007, 0.0008880106615833938, 0.02246260829269886, 0.05328502878546715, -0.12645095586776733, 0.0063796266913414, -0.016816221177577972, 0.09104468673467636, -0.00035070383455604315, -0.05855381861329079, 0.018317826092243195, 0.05145851522684097, -0.007393868640065193, 0.021830352023243904, 0.0065508619882166386, 0.05342552810907364, 0.029153971001505852, -0.03575751930475235, -0.026484450325369835, -0.014585766941308975, 0.013268569484353065, 0.006190828047692776, 0.04685710370540619, 0.0393402986228466, -0.019933588802814484, 0.014295983128249645, -0.0078065902926027775, 0.005444416310638189, 0.03603852167725563, 0.011494743637740612, 0.02832852676510811, 0.012864628806710243, 0.04011305421590805, -0.0008858153014443815, 0.047664985060691833, 0.0026870828587561846, -0.04418758302927017, -0.012882191687822342, -0.039024170488119125, -0.0063620638102293015, 0.026519576087594032, 0.026484450325369835, 0.013031473383307457, 0.06975878030061722, 0.049105122685432434 ]
4,601
optbinning.binning.continuous_binning
_prebinning_refinement
null
def _prebinning_refinement(self, splits_prebinning, x, y, y_missing, x_special, y_special, y_others, sw_clean, sw_missing, sw_special, sw_others): # Compute n_records, sum and std for special, missing and others [self._n_records_special, self._sum_special, self._n_zeros_special, self._std_special, self._min_target_special, self._max_target_special] = target_info_special_continuous( self.special_codes, x_special, y_special, sw_special) if len(sw_missing): y_missing = y_missing * sw_missing self._n_records_missing = np.sum(sw_missing) self._sum_missing = np.sum(y_missing) self._n_zeros_missing = np.count_nonzero(y_missing == 0) if len(y_missing): self._std_missing = np.std(y_missing) self._min_target_missing = np.min(y_missing) self._max_target_missing = np.max(y_missing) if len(y_others): if len(sw_others): print(y_others.dtype, sw_others.dtype) y_others = y_others * sw_others self._n_records_cat_others = np.sum(sw_others) self._sum_cat_others = np.sum(y_others) self._std_cat_others = np.std(y_others) self._min_target_others = np.min(y_others) self._max_target_others = np.max(y_others) self._n_zeros_others = np.count_nonzero(y_others == 0) n_splits = len(splits_prebinning) if not n_splits: return (splits_prebinning, np.array([]), np.array([]), np.array([]), np.array([]), np.array([]), np.array([]), np.array([])) if self.split_digits is not None: splits_prebinning = np.round(splits_prebinning, self.split_digits) (splits_prebinning, n_records, sums, ssums, stds, min_t, max_t, n_zeros) = self._compute_prebins(splits_prebinning, x, y, sw_clean) return (splits_prebinning, n_records, sums, ssums, stds, min_t, max_t, n_zeros)
(self, splits_prebinning, x, y, y_missing, x_special, y_special, y_others, sw_clean, sw_missing, sw_special, sw_others)
[ 0.014256992377340794, -0.03991957753896713, -0.014256992377340794, 0.037619449198246, -0.030814113095402718, -0.058586735278367996, -0.016918297857046127, -0.011424602940678596, -0.026955220848321915, -0.021005302667617798, -0.020606106147170067, 0.015891794115304947, 0.0017072748159989715, -0.04512813314795494, -0.05904295668005943, 0.016633158549666405, -0.01803034357726574, -0.0008815573528409004, 0.0031674285419285297, -0.016386035829782486, -0.03157448396086693, -0.021138368174433708, -0.0459265261888504, 0.1006733775138855, 0.011937854811549187, 0.009837324731051922, -0.008031439036130905, -0.04858782887458801, 0.00617802981287241, -0.007413635961711407, -0.006044964771717787, -0.03389362245798111, 0.010977883823215961, -0.04383549839258194, 0.030110767111182213, -0.03263900801539421, 0.04642076790332794, 0.07558106631040573, 0.01045512780547142, 0.0005548346089199185, -0.00476421182975173, -0.09512265026569366, 0.03874099999666214, 0.006867118179798126, 0.01872418262064457, 0.018819229677319527, -0.009542680345475674, -0.018172912299633026, -0.045812468975782394, 0.03518625721335411, 0.024122830480337143, -0.08759496361017227, 0.05611552298069, 0.06390934437513351, -0.00716651463881135, 0.03874099999666214, 0.049766406416893005, 0.036516908556222916, 0.0009261104860343039, -0.03879803046584129, 0.028057761490345, 0.05341619998216629, -0.024522027000784874, -0.00931456871330738, -0.001072838669642806, -0.038436852395534515, -0.050678856670856476, -0.017859259620308876, 0.005104003474116325, 0.05238969624042511, 0.03071906603872776, 0.02524438127875328, 0.017393531277775764, 0.007242552004754543, -0.027335407212376595, -0.014969841577112675, -0.0014755986630916595, -0.03033887967467308, 0.04296107217669487, -0.08234839141368866, 0.036003656685352325, 0.06029757484793663, -0.010379090905189514, -0.012707732617855072, -0.0016894536092877388, -0.03581356629729271, 0.020244929939508438, 0.052237618714571, 0.0740223079919815, -0.023647598922252655, -0.04896801710128784, 0.0382087379693985, 0.061894357204437256, 0.03710619732737541, 0.05029866844415665, 0.014199964702129364, -0.052199602127075195, -0.008402121253311634, 0.027183331549167633, -0.04512813314795494, 0.009143484756350517, -0.01134856604039669, -0.026327911764383316, 0.06006946042180061, 0.02267812192440033, 0.021461525931954384, 0.034882109612226486, -0.02678413689136505, -0.04615463688969612, -0.047865476459264755, -0.00956168957054615, -0.06341510266065598, -0.0955028384923935, 0.02245001122355461, -0.050678856670856476, -0.052313655614852905, -0.030947178602218628, 0.05904295668005943, -0.02933138608932495, 0.022982271388173103, -0.006814842578023672, -0.03355145454406738, -0.04866386577486992, 0.009742277674376965, -0.011443612165749073, -0.02993968315422535, 0.09611114114522934, 0.086758553981781, 0.012536648660898209, -0.06288284063339233, 0.023286420851945877, -0.004621641710400581, -0.08120782673358917, 0.02153756283223629, -0.053986478596925735, -0.013116433285176754, 0.020701153203845024, 0.030015721917152405, 0.04318918287754059, -0.081588014960289, 0.07413636147975922, -0.013306526467204094, -0.014390057884156704, 0.0000963832062552683, -0.015388047322630882, 0.051667340099811554, 0.03634582459926605, 0.0382087379693985, 0.02243100106716156, 0.03146043047308922, -0.008112228475511074, -0.0016799488803371787, -0.009324072860181332, -0.058434657752513885, -0.011434108018875122, -0.01020800694823265, 0.01357265654951334, 0.02471211925148964, -0.006772071588784456, -0.026765126734972, 0.011766770854592323, -0.034330837428569794, 0.002556754043325782, -0.03581356629729271, -0.0043151164427399635, 0.07953500747680664, -0.05535515025258064, -0.04178249090909958, 0.010987388901412487, -0.02104332111775875, 0.028894171118736267, -0.006006946321576834, -0.05611552298069, 0.013011882081627846, 0.029369404539465904, 0.03203070908784866, -0.011576677672564983, -0.07341400533914566, -0.02895119972527027, 0.049386221915483475, 0.04512813314795494, -0.02763955667614937, 0.019085360690951347, -0.045318227261304855, -0.02636593207716942, 0.03210674598813057, 0.021955767646431923, -0.0740223079919815, 0.0056980447843670845, 0.038056664168834686, -0.009903857484459877, -0.011320051737129688, -0.01903783716261387, 0.05261780694127083, 0.01376274973154068, 0.0003671175509225577, 0.006539206951856613, 0.021518554538488388, 0.015910804271697998, -0.0535682737827301, -0.05938512459397316, -0.022354964166879654, -0.01294534932821989, 0.027316397055983543, -0.01798282004892826, -0.03197368234395981, -0.021233413368463516, 0.006235057953745127, -0.007247304543852806, 0.014931823126971722, 0.022278927266597748, -0.008359350264072418, -0.01351562887430191, 0.05147724598646164, 0.01905684731900692, 0.016671176999807358, 0.04406361281871796, -0.020092854276299477, -0.010711753740906715, -0.028000732883810997, 0.029787609353661537, -0.049766406416893005, -0.003412173595279455, -0.015216963365674019, 0.028133798390626907, -0.0058881379663944244, 0.05132517218589783, 0.018771706148982048, 0.03796161711215973, -0.018600622192025185, -0.018581613898277283, -0.04752330854535103, -0.06938403099775314, -0.031137270852923393, 0.031270336359739304, 0.006040212232619524, -0.003419301938265562, -0.03594662994146347, 0.05546920374035835, -0.0077415467239916325, -0.030814113095402718, -0.000491569226142019, -0.03469201549887657, -0.034844089299440384, -0.006548712030053139, -0.018220435827970505, 0.015197954140603542, 0.04995650053024292, -0.0037590935826301575, 0.0075514535419642925, 0.011605191975831985, -0.018572108820080757, -0.008007677271962166, -0.025073297321796417, 0.03058600053191185, -0.03596564009785652, -0.0051942975260317326, -0.003519101068377495, 0.020701153203845024, -0.018648145720362663, 0.007784317713230848, 0.02638494037091732, 0.008269055746495724, 0.02104332111775875, -0.032334860414266586, 0.02651800587773323, 0.019693659618496895, 0.016290990635752678, -0.00796490628272295, 0.016072383150458336, -0.061628226190805435, 0.02028294838964939, -0.03644087165594101, 0.02003582753241062, -0.020454032346606255, 0.06178029999136925, 0.013591665774583817, -0.028399929404258728, 0.07075270265340805, -0.002666057553142309, 0.062274541705846786, -0.005161031149327755, 0.04600256308913231, -0.015074393711984158, 0.015207458287477493, -0.018600622192025185, -0.040451839566230774, -0.04094608128070831, -0.008007677271962166, -0.051933471113443375, -0.046078599989414215, 0.014580151066184044, 0.0764935165643692, 0.034615978598594666, 0.07816633582115173, 0.0014399562496691942, -0.025073297321796417, -0.016386035829782486, 0.004880643915385008, -0.0027112048119306564, -0.017906783148646355, -0.007000183220952749, -0.008207275532186031, -0.019959788769483566, 0.011624201200902462, -0.020473040640354156, 0.07307183742523193, -0.027943704277276993, -0.0286660585552454, -0.0408320277929306, 0.03670700266957283, 0.024274906143546104, 0.0816640555858612, -0.03541436791419983, 0.030890149995684624, -0.08896363526582718, 0.006667519919574261, 0.04866386577486992, 0.012175471521914005, 0.07094279676675797, 0.014304515905678272, -0.02982562780380249, 0.006762566510587931, 0.026289893314242363, -0.043645404279232025, 0.0027896182145923376, 0.0020328094251453876, -0.01715591363608837, -0.09192908555269241, -0.019399015232920647, -0.0027183331549167633, -0.021993786096572876, 0.012070920318365097, 0.041250232607126236, -0.02129044197499752, -0.0030533724930137396, 0.02598574571311474, -0.02397075667977333, 0.009419119916856289, -0.026613052934408188, -0.010103454813361168, 0.02843794785439968, -0.020929263904690742, 0.03552842512726784, 0.013468105345964432, -0.009837324731051922, 0.023248402401804924, 0.0010906598763540387, 0.02064412459731102, 0.0586627721786499, -0.03606068715453148, 0.0010799671290442348, 0.006677024997770786, 0.03670700266957283, 0.09071248769760132, -0.04345531389117241, -0.022221898660063744, -0.029597517102956772, 0.061742283403873444, 0.0024902212899178267, -0.0012439226265996695, 0.01910436898469925, 0.006909889169037342, 0.07048656791448593, 0.037524402141571045, -0.03672601282596588, -0.049386221915483475, 0.026613052934408188, -0.07276768982410431, -0.06326302886009216, -0.015026870183646679, -0.07231146842241287, -0.029521478340029716, 0.03763845935463905, -0.00025469521642662585, 0.04771340265870094, -0.031916651874780655, -0.03889307379722595, 0.026708099991083145, 0.013144946657121181, -0.00888210628181696, 0.06980223208665848, -0.04216267913579941, 0.03590860962867737, 0.011358070187270641, -0.0008061141124926507, -0.017944801598787308, -0.030947178602218628, 0.054214589297771454, -0.04486200213432312, 0.059080976992845535, -0.006363370921462774, -0.005099250935018063, 0.0024213124997913837, -0.015026870183646679, -0.00011732316488632932, 0.06995430588722229, 0.009609213098883629, -0.011006398126482964, -0.0027919942513108253, 0.004120270721614361, -0.06698885560035706, -0.02638494037091732, 0.02524438127875328, -0.011652715504169464, -0.0649738684296608, 0.006696034222841263, 0.009267045184969902, -0.0020838971249759197, 0.04756132513284683, -0.05045074224472046, 0.026308903470635414, 0.04775141924619675, -0.02857101336121559, -0.05174337700009346, 0.0026422960218042135, 0.0018712301971390843, 0.06584829837083817, 0.02091025561094284, -0.006724548060446978, 0.06208445131778717, -0.023419486358761787, 0.02370462566614151, 0.0388360470533371, -0.014513618312776089, 0.004643027205020189, -0.06459368020296097, -0.05178139731287956, -0.010150978341698647, -0.008673003874719143, -0.010797295719385147, -0.05394845828413963, -0.05109706148505211, -0.02446499839425087, -0.03174556791782379, -0.010360080748796463, -0.007960153743624687, 0.05467081442475319, 0.015635168179869652, -0.014123926870524883, -0.011510144919157028, 0.014304515905678272, 0.05212356522679329, -0.021879730746150017, -0.0187907163053751, -0.03083312138915062, -0.026689089834690094, -0.017925791442394257, -0.10553976148366928, 0.004583623260259628, 0.004728569183498621, -0.018486566841602325, 0.00999890360981226, 0.030433926731348038, -0.020568087697029114, -0.035604462027549744, 0.025662586092948914, -0.004281850066035986, 0.00451233796775341, -0.013981357216835022, -0.000794233288615942, 0.026479987427592278, -0.05010857433080673, 0.054860908538103104, 0.012612685561180115, -0.009191007353365421, -0.027088286355137825, -0.029369404539465904, -0.025415465235710144, 0.01639554090797901, 0.011396089568734169, -0.03773350641131401, 0.005308353342115879, 0.0006504752673208714, 0.024693110957741737, 0.03125132620334625, -0.006078231148421764, 0.02906525507569313, 0.020320966839790344, -0.029217328876256943, 0.002616157988086343, 0.04265692085027695, -0.05303601175546646, 0.018172912299633026, 0.002803875133395195, -0.005560227204114199, -0.05873880907893181, 0.0051420219242572784, 0.008449643850326538, -0.004222446121275425, 0.008387863636016846, 0.018220435827970505, 0.03991957753896713, 0.04296107217669487, -0.07478267699480057, 0.05140120908617973, 0.036668986082077026, -0.0069003840908408165, 0.11610894650220871, -0.04904405400156975, 0.035129230469465256, -0.0066722724586725235, -0.041250232607126236, -0.012935844250023365, -0.031669531017541885, -0.04832169786095619, -0.017231950536370277, 0.026993239298462868, -0.05558326095342636, 0.027582528069615364, -0.030547982081770897, -0.07809030264616013, 0.05413855239748955, 0.005674283020198345, 0.0018284593243151903, -0.0011595686664804816, 0.028761105611920357, -0.0037804790772497654, -0.023666607216000557, 0.027430454269051552, 0.01313544251024723, 0.019446536898612976, -0.007080972660332918, -0.03514823690056801, 0.02893218956887722, 0.03471102565526962, -0.020853227004408836, -0.02127143181860447, 0.006296838168054819, -0.017041858285665512, 0.0023904223926365376, -0.03976750373840332, 0.06565820425748825, 0.017013344913721085, 0.026175837963819504, 0.022145861759781837, 0.045052096247673035, -0.048625849187374115, 0.039957597851753235, -0.02153756283223629, 0.031004205346107483, 0.026993239298462868, 0.017498081550002098, 0.003911168314516544, 0.0026969476602971554, 0.056001465767621994, -0.004590751603245735, 0.025187352672219276, -0.015787241980433464, 0.023609578609466553, -0.03138439357280731, -0.012660209089517593, 0.02600475400686264, 0.07151307165622711, 0.05174337700009346, -0.03138439357280731, 0.010055932216346264, 0.01677572727203369, 0.014399562031030655, 0.06140011548995972, -0.027240360155701637, 0.00707146804779768, 0.0446338914334774, -0.029141291975975037, -0.03904515132308006, 0.01473222579807043, 0.010169987566769123, 0.05835862085223198, -0.01294534932821989, 0.019351491704583168, 0.01720343716442585, 0.032543960958719254, -0.028913181275129318, 0.002415372058749199, 0.0004681045829784125, -0.000852449331432581, 0.0005610720254480839, -0.08637836575508118, -0.07885067164897919, -0.05037470534443855, 0.01963663101196289, -0.022107843309640884, 0.025282399728894234, -0.06003144383430481, -0.010122464969754219, -0.009333577938377857, -0.11740157753229141, 0.01905684731900692, 0.023799672722816467, 0.007627490907907486, -0.014104917645454407, 0.05455675721168518, -0.022849205881357193, -0.02843794785439968, -0.018458053469657898, 0.011586182750761509, -0.029616525396704674, -0.023248402401804924, 0.004654908087104559, -0.0312133077532053, 0.05048876255750656, -0.005574483890086412, 0.0047689639031887054, 0.041098155081272125, 0.03763845935463905, -0.03474904224276543, -0.001978157786652446, -0.008782307617366314, -0.011804789304733276, -0.036878086626529694, 0.025149334222078323, 0.002331018215045333, 0.03763845935463905, -0.0356995090842247, -0.018885763362050056, 0.01735551282763481, -0.023799672722816467, -0.006235057953745127, 0.0816640555858612, -0.010217511095106602, 0.0066722724586725235, -0.029274357482790947, -0.019028332084417343, 0.04436776041984558, -0.01608188822865486, 0.003982453141361475, 0.04562237486243248, -0.033342353999614716, 0.013239993713796139, -0.02142350748181343, -0.01662365347146988, 0.016148420050740242, 0.0803714171051979, -0.0248641949146986, 0.016538111492991447, 0.031137270852923393, 0.06128605827689171, 0.01684226095676422, -0.00891537219285965, -0.05303601175546646, 0.04159240052103996, -0.0229632630944252, 0.05622957646846771, 0.019294463098049164, -0.04794151335954666, -0.0675971508026123, -0.004029976669698954, -0.012536648660898209, 0.06717894971370697, 0.051173098385334015, -0.024141840636730194, 0.01841052994132042, -0.07634144276380539, -0.009300311096012592, 0.001447084709070623, 0.020853227004408836, -0.04341729357838631, 0.026194848120212555, 0.027335407212376595, -0.03531932085752487, -0.039729487150907516, 0.02779163047671318, 0.015055383555591106, -0.0014482728438451886, -0.017574118450284004, 0.034882109612226486, 0.009789801202714443, -0.03647889196872711, 0.06067775934934616, -0.01725096069276333, -0.03860793635249138, -0.015131421387195587, -0.0433412566781044, -0.022012796252965927, -0.009770791977643967, -0.05140120908617973, -0.036668986082077026, 0.004163041710853577, -0.02410382218658924, 0.002440321957692504, 0.042885031551122665, -0.008649242110550404, -0.0375814326107502, -0.003949186764657497, 0.08333687484264374, 0.011947359889745712, -0.05889088287949562, -0.0261188093572855, 0.022906234487891197, 0.03531932085752487, 0.0261188093572855, -0.005854871589690447, 0.07101882994174957, 0.019075855612754822, -0.03927326202392578, 0.01646207459270954, -0.018220435827970505, -0.015568635426461697, 0.031175289303064346, -0.020492050796747208, 0.0344068743288517, -0.055012982338666916, -0.05554524064064026, -0.011823799461126328, 0.003488210728392005, 0.06132407486438751, -0.04155438020825386, -0.0047832210548222065, -0.01256516296416521, -0.046458784490823746, 0.003029610961675644, 0.025054287165403366, -0.04946225881576538, -0.05641967058181763, -0.031422410160303116, 0.021119358018040657, -0.019446536898612976, 0.016338514164090157, -0.0030913911759853363, 0.00522756390273571, 0.027582528069615364, 0.0510210245847702, 0.030015721917152405, 0.005123012699186802, -0.02716432325541973, 0.040603913366794586, 0.09383001923561096, -0.11253519356250763, 0.023267410695552826, -0.020054835826158524, 0.09360190480947495, 0.039843540638685226, -0.0229632630944252, 0.04946225881576538, 0.03938731923699379, -0.0019817219581454992, 0.04258088394999504, -0.027943704277276993, 0.04356936737895012, 0.059575218707323074, -0.02001681737601757, -0.04261890426278114, -0.025833670049905777, 0.01778322272002697, -0.0535682737827301, 0.09451435506343842, 0.027962714433670044, -0.035756535828113556, -0.0006748309824615717, -0.032448913902044296, 0.016899287700653076, 0.02497825026512146, 0.029882656410336494, 0.00678632827475667, -0.0012017457047477365, 0.053074032068252563, 0.053986478596925735, -0.031308356672525406, -0.01811588555574417, -0.027126304805278778, 0.012821788899600506, 0.01007494144141674, -0.010369585826992989, 0.05178139731287956, 0.019085360690951347, 0.024008775129914284, 0.00975178275257349, 0.05341619998216629 ]
4,606
optbinning.binning.continuous_binning
fit
Fit the optimal binning according to the given training data. Parameters ---------- x : array-like, shape = (n_samples,) Training vector, where n_samples is the number of samples. y : array-like, shape = (n_samples,) Target vector relative to x. sample_weight : array-like of shape (n_samples,) (default=None) Array of weights that are assigned to individual samples. If not provided, then each sample is given unit weight. Only applied if ``prebinning_method="cart"``. check_input : bool (default=False) Whether to check input arrays. Returns ------- self : ContinuousOptimalBinning Fitted optimal binning.
def fit(self, x, y, sample_weight=None, check_input=False): """Fit the optimal binning according to the given training data. Parameters ---------- x : array-like, shape = (n_samples,) Training vector, where n_samples is the number of samples. y : array-like, shape = (n_samples,) Target vector relative to x. sample_weight : array-like of shape (n_samples,) (default=None) Array of weights that are assigned to individual samples. If not provided, then each sample is given unit weight. Only applied if ``prebinning_method="cart"``. check_input : bool (default=False) Whether to check input arrays. Returns ------- self : ContinuousOptimalBinning Fitted optimal binning. """ return self._fit(x, y, sample_weight, check_input)
(self, x, y, sample_weight=None, check_input=False)
[ 0.014361191540956497, -0.046437818557024, -0.01366876158863306, -0.025305192917585373, -0.02870439924299717, -0.041042253375053406, -0.04248107224702835, 0.027859093621373177, 0.027697226032614708, 0.004485062323510647, -0.0015118819428607821, -0.030880609527230263, 0.004347925074398518, -0.014514066278934479, -0.044783178716897964, 0.007747130002826452, -0.013650775887072086, -0.018524767830967903, -0.05787641182541847, 0.053272198885679245, 0.01273353025317192, 0.016321580857038498, -0.00796744879335165, 0.1036667600274086, -0.0009279245277866721, 0.04248107224702835, -0.004579484462738037, 0.02442391775548458, -0.03561072051525116, -0.02442391775548458, -0.00008908300515031442, -0.009604102931916714, 0.012805471196770668, -0.0018547250656411052, 0.05132979527115822, -0.02679796703159809, 0.07525012642145157, 0.023848392069339752, -0.031168373301625252, -0.05557430535554886, -0.003545335028320551, -0.05424340069293976, 0.037589091807603836, 0.05766059085726738, 0.02803894504904747, 0.03278704360127449, -0.02142038755118847, 0.09107711166143417, -0.019208205863833427, -0.010062726214528084, -0.0385962650179863, -0.056473568081855774, 0.04816439747810364, 0.0005024618585593998, 0.0077291447669267654, 0.006924306508153677, 0.022373603656888008, 0.006294824182987213, 0.04427959397435188, 0.015728067606687546, 0.008956635370850563, 0.009024079889059067, 0.04197748377919197, -0.020898817107081413, -0.016015831381082535, -0.00477507384493947, -0.09467415511608124, 0.0066185579635202885, -0.004662666469812393, 0.06708484143018723, 0.05154561996459961, 0.022031884640455246, 0.00950518436729908, 0.046329908072948456, -0.06564602255821228, 0.01929813250899315, -0.036509979516267776, 0.014019472524523735, -0.01634855754673481, -0.009810932911932468, 0.0743148997426033, 0.04805648699402809, 0.015889935195446014, -0.06956680119037628, -0.004302962217479944, -0.03766103461384773, 0.004105124622583389, 0.0557541586458683, 0.04654572904109955, -0.004905466455966234, -0.017814353108406067, 0.04086240381002426, 0.06079001724720001, 0.08352332562208176, 0.06478273123502731, -0.014612984843552113, -0.027553346008062363, 0.017751405015587807, -0.027571329846978188, 0.03609631955623627, -0.07755223661661148, -0.0009346689912490547, 0.03199569135904312, 0.055358484387397766, -0.017472634091973305, 0.02832670882344246, 0.0075987521559000015, -0.0232548788189888, -0.044495414942502975, 0.0038668205961585045, 0.0176165159791708, -0.028092902153730392, -0.019585896283388138, -0.013551857322454453, -0.05791238322854042, 0.033632345497608185, -0.030395008623600006, 0.020665008574724197, -0.04032284393906593, 0.036006394773721695, 0.004725614562630653, -0.009945821948349476, -0.01736472174525261, -0.0331287607550621, 0.03399205207824707, -0.04730110988020897, 0.04201345518231392, 0.007877523079514503, 0.004770577419549227, -0.008448553271591663, 0.021528299897909164, -0.016897106543183327, -0.05226502567529678, 0.014882762916386127, -0.02046717144548893, -0.017607523128390312, 0.003154156496748328, 0.006083498243242502, -0.0004611520853359252, -0.007499833591282368, 0.11345072090625763, -0.012409796006977558, 0.04553855583071709, -0.012050092220306396, 0.07007038593292236, 0.027427447959780693, 0.03028709813952446, -0.022157780826091766, 0.03963940590620041, 0.028218798339366913, -0.03485533967614174, -0.015188511461019516, 0.022013898938894272, -0.011600461788475513, -0.009082532487809658, 0.0013803649926558137, -0.05262473225593567, -0.025035414844751358, -0.008043886162340641, 0.01954992488026619, 0.02417212538421154, 0.004793059080839157, -0.011492550373077393, 0.008659879676997662, -0.015485268086194992, 0.07726447284221649, -0.04830827936530113, 0.04388391599059105, 0.017058974131941795, -0.02005351148545742, 0.033848170191049576, -0.0678761899471283, -0.042121365666389465, 0.001871586195193231, 0.04068255051970482, 0.0199276152998209, 0.0009987413650378585, -0.030610831454396248, 0.02974754013121128, 0.028614472597837448, 0.009181451052427292, 0.0023650554940104485, 0.016168706119060516, -0.06496258825063705, -0.04496303200721741, -0.0009127494995482266, 0.01580900140106678, 0.02753536030650139, -0.024855563417077065, 0.015862956643104553, 0.0033205198124051094, -0.009037569165229797, 0.030880609527230263, -0.002670804038643837, -0.020521126687526703, 0.02496347390115261, -0.0013938539195805788, 0.03881208971142769, -0.011924196034669876, 0.012940360233187675, 0.03233741223812103, -0.050862181931734085, 0.05208517611026764, -0.007135632913559675, -0.02167217992246151, 0.010224592871963978, -0.0019918621983379126, 0.05093412101268768, 0.02151031419634819, -0.038920000195503235, 0.009927837178111076, -0.0001009560510283336, -0.04546661674976349, 0.01528743002563715, 0.01736472174525261, 0.041581809520721436, -0.006964773405343294, -0.05873970314860344, -0.028182826936244965, 0.013785664923489094, 0.022121811285614967, -0.0064566913060843945, -0.005049348343163729, 0.02920798398554325, 0.034261830151081085, -0.031096432358026505, 0.06007060781121254, -0.00803039688616991, 0.04812842607498169, -0.0731998160481453, 0.011402624659240246, -0.017436662688851357, -0.010080710984766483, 0.021276505663990974, -0.038632236421108246, -0.047444988042116165, 0.02661811374127865, 0.016276616603136063, -0.03145613521337509, 0.013372004963457584, 0.021977929398417473, 0.0002741339849308133, 0.0011476813815534115, -0.052193086594343185, -0.03498123958706856, 0.025970647111535072, 0.031222328543663025, 0.02329085022211075, 0.024100184440612793, -0.014612984843552113, -0.047409020364284515, -0.0007857289747335017, -0.013587827794253826, -0.05014277249574661, 0.022013898938894272, 0.025071386247873306, 0.0043231952004134655, -0.04276883602142334, -0.038128651678562164, 0.035754602402448654, -0.036132290959358215, 0.06079001724720001, -0.010260563343763351, 0.0412580780684948, -0.04352421313524246, -0.017976218834519386, -0.02088083140552044, 0.003666735254228115, -0.0007452622521668673, 0.06600572913885117, -0.0984870195388794, -0.02712170034646988, 0.05097009241580963, 0.019855674356222153, -0.02046717144548893, 0.03154606372117996, 0.031132401898503304, 0.00942425150424242, 0.028596486896276474, -0.00906005036085844, 0.030610831454396248, 0.019406044855713844, 0.02870439924299717, 0.009325332939624786, -0.03233741223812103, -0.02176210656762123, -0.02230166271328926, 0.025143327191472054, -0.01526944525539875, -0.016654307022690773, -0.05294846370816231, 0.03294890746474266, 0.04463929682970047, 0.07661700248718262, 0.021977929398417473, -0.009532162919640541, 0.01815607212483883, -0.02600661665201187, 0.038128651678562164, -0.02683393657207489, -0.016834158450365067, 0.009096020832657814, -0.052193086594343185, -0.01875857636332512, 0.025556987151503563, 0.004051168914884329, 0.03476541489362717, -0.03888402879238129, -0.04010702297091484, -0.008502509444952011, 0.0477687232196331, 0.027607301250100136, 0.05377578362822533, -0.037049535661935806, -0.03433376923203468, -0.08050180971622467, 0.06485467404127121, 0.05902746692299843, -0.030305081978440285, 0.03834447264671326, -0.01828196831047535, 0.03366831690073013, 0.010476386174559593, -0.009864889085292816, -0.07999822497367859, 0.03503519296646118, 0.04352421313524246, 0.05262473225593567, -0.06708484143018723, -0.03143814951181412, 0.02480160817503929, 0.00734246289357543, 0.057516708970069885, 0.0011836517369374633, -0.05809223651885986, 0.004143343307077885, -0.004563747439533472, 0.002792204264551401, -0.01427126582711935, -0.012247929349541664, -0.019046340137720108, 0.048488132655620575, 0.010970978997647762, 0.01716688461601734, -0.03266114369034767, -0.054351311177015305, -0.015467282384634018, 0.011357661336660385, 0.02733752317726612, 0.03582654148340225, 0.012265915051102638, 0.024369962513446808, 0.0002838291402440518, -0.013093234039843082, 0.009082532487809658, -0.04043075814843178, 0.0004872868303209543, -0.019657837226986885, 0.03884805738925934, 0.008345138281583786, -0.03365033119916916, 0.014505073428153992, -0.04460332542657852, 0.027481405064463615, -0.0023807925172150135, 0.036545950919389725, -0.002749489387497306, 0.027301551774144173, -0.023110996931791306, 0.03098852001130581, 0.004192802589386702, -0.08402691036462784, -0.08920665085315704, 0.028272753581404686, 0.020251348614692688, 0.05417145788669586, -0.04201345518231392, 0.007495337165892124, 0.05614983290433884, 0.013363013043999672, 0.04147389903664589, 0.014073428697884083, -0.03884805738925934, -0.011717366054654121, 0.01150154322385788, 0.005552934482693672, -0.0232548788189888, -0.0032395862508565187, 0.03609631955623627, -0.03884805738925934, 0.014514066278934479, -0.0018704620888456702, -0.01967582292854786, -0.03953149542212486, -0.07035814970731735, -0.014603991992771626, 0.09460221976041794, 0.03877611830830574, -0.035592734813690186, -0.03748118132352829, 0.020772920921444893, -0.002969808178022504, -0.0371214784681797, -0.0106112752109766, -0.05719297379255295, -0.011258742772042751, -0.001235359231941402, 0.004224276635795832, -0.012535693123936653, -0.006434209644794464, -0.01349790208041668, 0.039423584938049316, 0.01742766983807087, 0.03697759658098221, -0.061797190457582474, 0.029945379123091698, -0.0050673335790634155, -0.0010408941889181733, 0.015755046159029007, -0.01121377944946289, 0.03794879838824272, 0.011834269389510155, 0.027679242193698883, 0.003902791067957878, 0.020808890461921692, -0.019118281081318855, 0.004356917459517717, -0.10970979183912277, 0.03748118132352829, -0.033182717859745026, -0.05348801985383034, -0.05719297379255295, -0.08337944746017456, -0.005400059744715691, -0.022283677011728287, -0.029315896332263947, 0.003387964330613613, 0.002886626636609435, 0.006551113445311785, -0.016339564695954323, -0.0597468763589859, -0.06053822487592697, 0.036006394773721695, 0.03168994560837746, -0.07640118151903152, -0.033308614045381546, -0.03206763416528702, -0.027715211734175682, -0.06284033507108688, -0.011654417961835861, 0.05208517611026764, -0.04499899968504906, 0.031024491414427757, 0.014244288206100464, -0.025485046207904816, -0.04194151610136032, -0.04571840912103653, -0.01634855754673481, 0.05927925929427147, -0.05686924234032631, 0.023704510182142258, -0.004851511213928461, 0.009181451052427292, -0.02255345694720745, -0.04338033124804497, -0.027157669886946678, -0.012481736950576305, 0.013776673004031181, 0.09114905446767807, 0.020395230501890182, 0.018416857346892357, 0.002830422716215253, -0.020287320017814636, 0.003106945427134633, 0.05827208608388901, 0.04276883602142334, -0.010215600952506065, 0.038128651678562164, 0.015323400497436523, -0.07010635733604431, -0.027355507016181946, 0.02021537907421589, 0.017571551725268364, 0.017319759353995323, -0.009203932248055935, -0.05025068297982216, -0.037840887904167175, -0.016150720417499542, 0.03098852001130581, 0.014837800525128841, 0.02746341936290264, 0.07582565397024155, 0.01938805915415287, -0.013201145455241203, -0.03645602613687515, 0.0012229944113641977, -0.002549403812736273, -0.0068118991330266, 0.05471101403236389, 0.007724648807197809, 0.030430978164076805, 0.037085507065057755, -0.025071386247873306, -0.05204920470714569, -0.01597086898982525, 0.006582587491720915, -0.032301440834999084, -0.00029282172909006476, -0.046869464218616486, 0.061293601989746094, -0.022607412189245224, -0.009738991968333721, 0.011420609429478645, 0.028938205912709236, 0.028488576412200928, 0.02417212538421154, -0.009307347238063812, 0.037840887904167175, 0.028758354485034943, -0.015889935195446014, 0.009370295330882072, 0.06557408720254898, 0.06697692722082138, -0.048739925026893616, 0.059638962149620056, 0.019693806767463684, -0.016231654211878777, -0.06406332552433014, -0.007962952367961407, 0.0798543393611908, 0.021438373252749443, -0.03402801975607872, -0.0005800231010653079, 0.04061060771346092, 0.008646390400826931, 0.0031429158989340067, -0.000608125003054738, -0.018524767830967903, -0.0010178505908697844, -0.033218685537576675, -0.007976441644132137, 0.02055709809064865, 0.036833714693784714, 0.005557430442422628, 0.009307347238063812, 0.07798387855291367, -0.0008245095959864557, 0.022319648414850235, -0.03485533967614174, -0.005031363107264042, -0.045034971088171005, -0.0072075738571584225, -0.00047267385525628924, 0.08172480762004852, 0.05902746692299843, -0.08086151629686356, -0.014379177242517471, 0.021708151325583458, -0.010233585722744465, 0.03025112673640251, -0.0823722705245018, 0.007810078561306, -0.004905466455966234, -0.04679752141237259, 0.011357661336660385, -0.007724648807197809, -0.011735350824892521, 0.015979861840605736, 0.030754713341593742, 0.008264205418527126, 0.032049648463726044, 0.06586184352636337, -0.06550214439630508, 0.028398649767041206, -0.02787707932293415, 0.053523991256952286, -0.029136043041944504, -0.06593378633260727, -0.06399138271808624, -0.029315896332263947, -0.016519417986273766, -0.056473568081855774, 0.011762328445911407, -0.04305659979581833, -0.008196760900318623, -0.045070942491292953, -0.0531642884016037, -0.06474676728248596, -0.05733685567975044, 0.040502697229385376, 0.007702167145907879, -0.004015198443084955, -0.020125452429056168, 0.011816284619271755, 0.02645624801516533, -0.011330683715641499, -0.06309212744235992, -0.01628560945391655, 0.06456691026687622, -0.043704066425561905, 0.024190111085772514, 0.04615005478262901, -0.006659024860709906, 0.04992694780230522, 0.0036847202572971582, 0.020862845703959465, -0.04201345518231392, -0.033470481634140015, -0.014774851500988007, -0.0364919938147068, -0.03168994560837746, 0.0005454577622003853, 0.03447765111923218, 0.031096432358026505, -0.06269644945859909, 0.033182717859745026, 0.020107466727495193, -0.037876855581998825, 0.037373270839452744, 0.01310222689062357, 0.013066256418824196, -0.03913582116365433, 0.01422630250453949, 0.024028243497014046, -0.036833714693784714, -0.015035637654364109, -0.0005839573568664491, -0.005458511877804995, 0.024405932053923607, 0.026492217555642128, 0.011132846586406231, -0.028182826936244965, 0.04406376928091049, -0.010107689537107944, 0.04999889060854912, 0.043452274054288864, 0.0055978973396122456, 0.015880942344665527, -0.006204898003488779, -0.02230166271328926, 0.020862845703959465, 0.04514288157224655, 0.07201278954744339, 0.0159348975867033, 0.00794946402311325, -0.03609631955623627, 0.0035858016926795244, 0.02978351153433323, -0.00437265494838357, 0.0051977261900901794, -0.022283677011728287, -0.04884783551096916, -0.023938316851854324, 0.013120212592184544, 0.08035793155431747, 0.017382707446813583, 0.015889935195446014, 0.0004496303154155612, 0.024783622473478317, -0.041330017149448395, -0.03143814951181412, 0.07539401203393936, 0.035340942442417145, 0.0004187182348687202, -0.047948576509952545, 0.05014277249574661, -0.007243544328957796, -0.06794813275337219, -0.05097009241580963, -0.01837189495563507, -0.0024145147763192654, 0.017544575035572052, -0.09481804072856903, -0.022031884640455246, -0.03561072051525116, -0.04834425076842308, -0.06053822487592697, -0.046941403299570084, -0.011267735622823238, -0.007153618149459362, 0.04676155000925064, -0.06417123973369598, -0.003327264217659831, 0.0339021235704422, 0.09913448989391327, 0.04179763421416283, -0.05625774338841438, -0.03003530390560627, -0.016879120841622353, -0.010854075662791729, 0.031240314245224, 0.013372004963457584, -0.0039140316657722, -0.025035414844751358, 0.01980171911418438, -0.005166252143681049, -0.024351976811885834, -0.06532228738069534, 0.03888402879238129, -0.05312831699848175, 0.04143792763352394, -0.004347925074398518, -0.018740590661764145, -0.012166996486485004, -0.01067422330379486, 0.004208539612591267, -0.05579013004899025, 0.008794768713414669, 0.046905431896448135, 0.015413327142596245, 0.04075448960065842, 0.02179807797074318, -0.059135377407073975, -0.03544885292649269, 0.020700979977846146, 0.07132935523986816, -0.07748029381036758, -0.007526811212301254, -0.03345249593257904, 0.029837466776371002, 0.018902458250522614, 0.02217576652765274, -0.036671847105026245, -0.04039478674530983, 0.013237115927040577, -0.013291072100400925, 0.05877567455172539, -0.03566467761993408, 0.015080600045621395, 0.0055889044888317585, 0.04564647004008293, -0.03481937199831009, -0.04589826241135597, 0.01926216296851635, 0.06816395372152328, 0.0265461727976799, -0.012095055542886257, 0.00574177922680974, 0.07827164232730865, 0.023488687351346016, -0.04607811197638512, -0.01143859513103962, 0.027427447959780693, -0.008767791092395782, 0.016879120841622353, 0.012589648365974426, 0.021708151325583458, -0.02911805920302868, 0.024729667231440544, -0.04751693084836006, -0.027984989807009697, 0.02230166271328926, 0.021402401849627495, 0.010809112340211868, 0.04150987043976784, 0.0020031030289828777, -0.07517818361520767, 0.023650554940104485, -0.003610531333833933, -0.017499610781669617, -0.012166996486485004, -0.03402801975607872, 0.07082576304674149, -0.010413438081741333, -0.03902791067957878, 0.01795823499560356, 0.10050136595964432, 0.06575393676757812 ]
4,607
optbinning.binning.continuous_binning
fit_transform
Fit the optimal binning according to the given training data, then transform it. Parameters ---------- x : array-like, shape = (n_samples,) Training vector, where n_samples is the number of samples. y : array-like, shape = (n_samples,) Target vector relative to x. sample_weight : array-like of shape (n_samples,) (default=None) Array of weights that are assigned to individual samples. If not provided, then each sample is given unit weight. Only applied if ``prebinning_method="cart"``. metric : str (default="mean"): The metric used to transform the input vector. Supported metrics are "mean" to choose the mean, "indices" to assign the corresponding indices of the bins and "bins" to assign the corresponding bin interval. metric_special : float or str (default=0) The metric value to transform special codes in the input vector. Supported metrics are "empirical" to use the empirical mean, and any numerical value. metric_missing : float or str (default=0) The metric value to transform missing values in the input vector. Supported metrics are "empirical" to use the empirical mean, and any numerical value. show_digits : int, optional (default=2) The number of significant digits of the bin column. Applies when ``metric="bins"``. check_input : bool (default=False) Whether to check input arrays. Returns ------- x_new : numpy array, shape = (n_samples,) Transformed array.
def fit_transform(self, x, y, sample_weight=None, metric="mean", metric_special=0, metric_missing=0, show_digits=2, check_input=False): """Fit the optimal binning according to the given training data, then transform it. Parameters ---------- x : array-like, shape = (n_samples,) Training vector, where n_samples is the number of samples. y : array-like, shape = (n_samples,) Target vector relative to x. sample_weight : array-like of shape (n_samples,) (default=None) Array of weights that are assigned to individual samples. If not provided, then each sample is given unit weight. Only applied if ``prebinning_method="cart"``. metric : str (default="mean"): The metric used to transform the input vector. Supported metrics are "mean" to choose the mean, "indices" to assign the corresponding indices of the bins and "bins" to assign the corresponding bin interval. metric_special : float or str (default=0) The metric value to transform special codes in the input vector. Supported metrics are "empirical" to use the empirical mean, and any numerical value. metric_missing : float or str (default=0) The metric value to transform missing values in the input vector. Supported metrics are "empirical" to use the empirical mean, and any numerical value. show_digits : int, optional (default=2) The number of significant digits of the bin column. Applies when ``metric="bins"``. check_input : bool (default=False) Whether to check input arrays. Returns ------- x_new : numpy array, shape = (n_samples,) Transformed array. """ return self.fit(x, y, sample_weight, check_input).transform( x, metric, metric_special, metric_missing, show_digits, check_input)
(self, x, y, sample_weight=None, metric='mean', metric_special=0, metric_missing=0, show_digits=2, check_input=False)
[ 0.017898427322506905, -0.024148965254426003, 0.04206594079732895, 0.0044815619476139545, 0.0032921978272497654, -0.04510774463415146, -0.030789004638791084, 0.02082894742488861, 0.017750047147274017, 0.010952353477478027, -0.020773304626345634, -0.016674285754561424, 0.03835642337799072, -0.026022272184491158, -0.046294793486595154, 0.03303326293826103, -0.02196034975349903, -0.01664646528661251, -0.01777786761522293, 0.044217463582754135, 0.019122568890452385, -0.046294793486595154, 0.01006206963211298, 0.06743904948234558, -0.000003255790943512693, 0.023852204903960228, -0.03722501918673515, -0.0020355982705950737, -0.015533609315752983, -0.02272080071270466, -0.010535032488405704, -0.03909832611680031, 0.05898134410381317, -0.04162079840898514, 0.03700244799256325, -0.06002001091837883, 0.011267662979662418, -0.010729782283306122, 0.029546314850449562, -0.02151520736515522, 0.011425317265093327, -0.042733654379844666, 0.007507138419896364, 0.05812815576791763, 0.03420175984501839, 0.060761913657188416, -0.019641900435090065, 0.10950499027967453, -0.018269378691911697, 0.01136040035635233, -0.028618935495615005, -0.05304611474275589, 0.04763022065162659, 0.023314325138926506, 0.0022106412798166275, 0.028711674734950066, 0.015311038121581078, 0.033942095935344696, 0.04113855957984924, -0.02325868234038353, 0.029286649078130722, 0.030510790646076202, -0.014114717952907085, -0.018074629828333855, 0.006301544606685638, -0.023203039541840553, -0.04826083779335022, -0.0019428604282438755, -0.005861039273440838, 0.07048085331916809, 0.026875462383031845, 0.0006097521400079131, 0.04262236878275871, 0.038727372884750366, -0.04269655793905258, 0.029249554499983788, -0.03418321534991264, 0.004731954541057348, -0.018510498106479645, -0.0022106412798166275, 0.0709259957075119, 0.0313454307615757, 0.011508781462907791, -0.026986747980117798, -0.04414327070116997, -0.019901568070054054, 0.01604366861283779, 0.023481253534555435, -0.010516485199332237, -0.014170360751450062, -0.006004783324897289, -0.001231096452102065, 0.07174208760261536, 0.06246829405426979, 0.02316594310104847, -0.003922815900295973, -0.03987732529640198, 0.04644317179918289, -0.01214867364615202, -0.010414473712444305, -0.018148818984627724, 0.04625769704580307, -0.002673171926289797, 0.0721130445599556, 0.029472125694155693, 0.03631618618965149, 0.013493373990058899, -0.014012706466019154, -0.04566417261958122, 0.015301764011383057, -0.011007996276021004, 0.0035356348380446434, -0.058573298156261444, -0.020068496465682983, -0.049076929688453674, -0.0050263977609574795, -0.007080543786287308, 0.018158093094825745, -0.03939508646726608, 0.02693110518157482, 0.015830371528863907, -0.03103012405335903, 0.012770017609000206, -0.06354405730962753, -0.022015992552042007, -0.06358114629983902, 0.06673423945903778, 0.026281939819455147, 0.032180074602365494, 0.022850634530186653, -0.03770725801587105, -0.024260250851511955, -0.036112163215875626, 0.04766731336712837, -0.03171638399362564, -0.051265548914670944, 0.010312461294233799, 0.025669869035482407, -0.01995721086859703, 0.004256672691553831, 0.08101588487625122, 0.006491657346487045, 0.05408478155732155, 0.013391362503170967, 0.0629134327173233, -0.003076581982895732, 0.04024827852845192, 0.02971324324607849, -0.0011638614814728498, -0.021051518619060516, -0.021756326779723167, -0.006357187405228615, 0.04095308482646942, -0.05015269294381142, 0.026096463203430176, 0.045775458216667175, -0.013678849674761295, -0.01258454192429781, 0.0032064151018857956, 0.018046807497739792, 0.035926688462495804, 0.002255850937217474, -0.028155246749520302, 0.07185337692499161, -0.0019938661716878414, 0.06851480901241302, 0.015403776429593563, 0.03928380087018013, 0.017462559044361115, -0.023666728287935257, -0.011703531257808208, -0.06873738020658493, -0.0320502407848835, 0.0111934719607234, 0.0777515098452568, 0.05286063998937607, 0.018417760729789734, -0.038541898131370544, 0.024408632889389992, 0.0963732898235321, -0.0016901494236662984, -0.014689694158732891, 0.02761736698448658, -0.0763418897986412, -0.07148241996765137, -0.03551864251494408, 0.0076137869618833065, 0.03336711972951889, -0.04180627316236496, -0.025224726647138596, 0.04599802941083908, -0.0002637236029841006, 0.012269232422113419, -0.014188908971846104, -0.04340136796236038, 0.034813832491636276, -0.06091029569506645, 0.008480886928737164, -0.005443718750029802, -0.005610646679997444, 0.0008039222448132932, -0.05323159322142601, 0.07574836909770966, 0.010136259719729424, -0.021274089813232422, 0.00682087754830718, -0.026096463203430176, 0.04069342091679573, -0.011267662979662418, -0.052823543548583984, 0.07715798914432526, -0.018491949886083603, -0.05601372942328453, 0.006640038453042507, 0.014606229960918427, 0.027598818764090538, -0.0008311640121974051, -0.01285348180681467, -0.017536750063300133, 0.002877195365726948, 0.03473964333534241, -0.03056643344461918, -0.0022315073292702436, 0.029861625283956528, 0.053009022027254105, 0.010572127997875214, 0.0799030289053917, -0.054752495139837265, 0.048038266599178314, -0.050041407346725464, 0.02351834811270237, -0.02936084009706974, -0.02160794660449028, 0.03779999539256096, 0.004305359907448292, -0.05801687017083168, 0.04225141555070877, -0.009004856459796429, -0.024260250851511955, 0.03232845291495323, 0.011657162569463253, -0.001217185752466321, -0.014949359931051731, -0.03242119401693344, -0.026634342968463898, 0.03577830642461777, 0.04384651035070419, 0.014884443022310734, 0.011202746070921421, -0.0016600096132606268, -0.04225141555070877, 0.01986447162926197, -0.0250948928296566, -0.040211182087659836, 0.003294516121968627, -0.021923255175352097, -0.04188046604394913, -0.03718792274594307, -0.029379388317465782, 0.029249554499983788, -0.004205666948109865, 0.01079469919204712, -0.02481667883694172, 0.01586746610701084, -0.03331147879362106, -0.026263391599059105, -0.03742904216051102, 0.029991457238793373, 0.042288511991500854, 0.048928551375865936, -0.12664297223091125, -0.018343569710850716, -0.01028463989496231, 0.03692825883626938, -0.008745189756155014, 0.051451023668050766, 0.010117712430655956, 0.012658732011914253, 0.06484238803386688, -0.01958625763654709, 0.00029676148551516235, -0.00022546917898580432, 0.018695974722504616, -0.02299901470541954, -0.036631494760513306, -0.022590968757867813, -0.011045091785490513, 0.05189616605639458, -0.011276936158537865, -0.03720647096633911, -0.06013129651546478, 0.02613355778157711, 0.01960480585694313, 0.008740553632378578, -0.030473696067929268, -0.01680411957204342, -0.04633188620209694, -0.04774150624871254, 0.05104297772049904, -0.03551864251494408, -0.026411771774291992, 0.027673007920384407, -0.06261667609214783, 0.000763928983360529, 0.0120188407599926, 0.02752462774515152, 0.031067218631505966, -0.06124415248632431, -0.021737778559327126, -0.002113266382366419, 0.035054951906204224, 0.03216152638196945, 0.0227393489331007, -0.055012162774801254, -0.011119281873106956, -0.06525043398141861, 0.05686692148447037, 0.06625200062990189, 0.026875462383031845, 0.03755887597799301, -0.004105973523110151, 0.0227393489331007, 0.0075488705188035965, -0.01285348180681467, -0.03987732529640198, 0.056755635887384415, 0.0388757549226284, 0.028173793107271194, -0.029119720682501793, -0.04451422393321991, 0.05070912092924118, 0.039320897310972214, 0.051005881279706955, -0.007836357690393925, -0.10995013266801834, -0.006282997317612171, -0.02413041889667511, -0.010720509104430676, 0.0002627092762850225, -0.009338713251054287, -0.03917251527309418, 0.059278108179569244, -0.01610858365893364, -0.016247691586613655, -0.012324875220656395, -0.01497718133032322, -0.049447882920503616, 0.009830224327743053, 0.008657089434564114, 0.027506081387400627, 0.0007882727077230811, -0.03685406595468521, 0.0454786978662014, -0.015440871007740498, -0.006347913760691881, -0.04800117015838623, 0.010303188115358353, -0.018399212509393692, 0.009700391441583633, -0.018779437988996506, 0.0012473256792873144, -0.025280369445681572, -0.05297192558646202, 0.01751820184290409, 0.025039250031113625, -0.00910223089158535, -0.0003045862540602684, 0.006431377958506346, 0.028025412932038307, 0.013753040693700314, 0.06747614592313766, -0.07419037073850632, -0.09718938916921616, 0.04321589320898056, 0.026523057371377945, -0.0033385667484253645, -0.037336304783821106, 0.005823944229632616, 0.0026221659500151873, 0.030789004638791084, 0.0626908615231514, 0.06436014920473099, -0.04258527234196663, 0.012389792129397392, 0.0374661386013031, 0.0006920570740476251, 0.021533755585551262, 0.000554688973352313, 0.010089891031384468, -0.05471539869904518, -0.02474248968064785, 0.01480097882449627, 0.005791485775262117, -0.05000431090593338, -0.01681339368224144, -0.04199175164103508, 0.054826684296131134, 0.015700537711381912, -0.017564570531249046, -0.04607222229242325, -0.030807552859187126, 0.002779820468276739, -0.03364533558487892, -0.025465846061706543, -0.04024827852845192, -0.009334076195955276, -0.020754756405949593, -0.03049224242568016, -0.018167367205023766, -0.00022836723655927926, -0.0002774893946480006, 0.059982914477586746, 0.027598818764090538, -0.011749899946153164, -0.048038266599178314, 0.033144548535346985, -0.016099311411380768, 0.0033918910194188356, -0.019011283293366432, 0.028600389137864113, 0.005587462335824966, 0.002390321111306548, 0.0009737486252561212, -0.03512914106249809, 0.01707305945456028, -0.06202315166592598, -0.015960203483700752, -0.11106298863887787, 0.007085180375725031, 0.0012623955262824893, -0.01542232371866703, -0.09303472936153412, -0.061281248927116394, -0.0020529867615550756, -0.015644894912838936, -0.029305197298526764, 0.004277538508176804, 0.005870313383638859, -0.01494008582085371, 0.02151520736515522, -0.03824513778090477, -0.06610362231731415, 0.0553831122815609, 0.009028040803968906, -0.051080070436000824, -0.0194378774613142, -0.05582825466990471, 0.015162657015025616, -0.09644748270511627, -0.005670926533639431, 0.09526044130325317, -0.0035101319663226604, 0.03344130888581276, -0.012770017609000206, 0.013929242268204689, -0.04039665684103966, 0.012269232422113419, -0.05148812010884285, 0.031141409650444984, 0.025243274867534637, -0.010868889279663563, -0.014763884246349335, -0.012046661227941513, -0.008040381595492363, -0.024501370266079903, -0.0039460002444684505, -0.022683706134557724, 0.009463909082114697, 0.06862609088420868, 0.03353404998779297, 0.015700537711381912, -0.030993027612566948, 0.027839936316013336, -0.006616853643208742, 0.04410617798566818, 0.05460411310195923, -0.039766039699316025, 0.007994012907147408, 0.028674578294157982, -0.011759174056351185, -0.011703531257808208, -0.006111431866884232, 0.06317310035228729, 0.0041337949223816395, -0.005694110877811909, 0.007938370108604431, -0.0018686699913814664, -0.05130264163017273, 0.02526182122528553, 0.06562138348817825, 0.01424455177038908, 0.09526044130325317, 0.05708949267864227, 0.0037350214552134275, -0.05835072696208954, 0.005638468079268932, 0.006018694024533033, 0.0033432035706937313, 0.002308016177266836, 0.006723502650856972, 0.04199175164103508, -0.0014907628064975142, -0.02728351019322872, -0.034275952726602554, 0.020328162238001823, -0.004305359907448292, -0.04128694161772728, 0.00853652972728014, -0.056050825864076614, 0.021292636170983315, -0.05393639951944351, -0.02142246998846531, 0.05252678319811821, 0.004993939306586981, -0.002127177082002163, -0.018881449475884438, -0.03668713942170143, 0.03839351609349251, 0.016525905579328537, -0.03397918865084648, 0.02464975044131279, 0.0028540107887238264, 0.03622344881296158, -0.0643230527639389, 0.054233163595199585, 0.023240134119987488, -0.04488517343997955, -0.029676148667931557, 0.009051225148141384, 0.02559567801654339, -0.005796122830361128, -0.013103874400258064, 0.018102450296282768, 0.017230713739991188, 0.017221439629793167, 0.02134827896952629, -0.002573478501290083, -0.03754032775759697, 0.0034568076953291893, -0.027988318353891373, -0.04321589320898056, 0.021997446194291115, -0.006120705511420965, 0.0004889029660262167, 0.037503231316804886, 0.08398350328207016, -0.011508781462907791, 0.007585965562611818, -0.01611785776913166, -0.008606082759797573, -0.06695681065320969, -0.01691540516912937, 0.016665011644363403, 0.09948928654193878, 0.04636898264288902, -0.04121275246143341, 0.003533316543325782, 0.07137113809585571, -0.033756621181964874, 0.01845485530793667, -0.06120705604553223, 0.053602542728185654, 0.024445727467536926, -0.028989888727664948, 0.02858184091746807, 0.005995509680360556, -0.025725511834025383, 0.031419623643159866, 0.01577472873032093, -0.04458841308951378, 0.06039096415042877, 0.04225141555070877, -0.037503231316804886, 0.013521195389330387, -0.03824513778090477, 0.06673423945903778, -0.008415970019996166, -0.05363963916897774, -0.03778144717216492, -0.0236852765083313, -0.031234147027134895, -0.01450421754270792, -0.03041805326938629, -0.0039807772263884544, 0.013558290898799896, -0.06061353534460068, -0.014865895733237267, -0.00871273223310709, -0.038987040519714355, -0.00577293848618865, -0.018937092274427414, 0.018658878281712532, -0.0054483553394675255, 0.014865895733237267, 0.03824513778090477, -0.05864749103784561, -0.044477127492427826, 0.00045267719542607665, 0.058424919843673706, -0.07081471383571625, 0.041435323655605316, 0.012844208627939224, 0.03203169256448746, 0.016609368845820427, 0.02047654241323471, 0.001637984300032258, -0.07745474576950073, -0.04121275246143341, -0.0194378774613142, -0.01827865280210972, -0.044031985104084015, -0.005564277991652489, 0.03980313614010811, -0.008624630980193615, -0.00153481331653893, 0.026615796610713005, -0.013706671074032784, -0.06013129651546478, 0.03687261417508125, -0.02657870016992092, 0.015403776429593563, -0.04102727398276329, -0.02533601224422455, 0.028285078704357147, -0.029472125694155693, 0.0019011283293366432, 0.019827377051115036, 0.014179634861648083, 0.00805892888456583, 0.003382617374882102, -0.03600087761878967, -0.04469969868659973, 0.07593384385108948, 0.004219577647745609, 0.05664435029029846, 0.016219869256019592, -0.027839936316013336, 0.05363963916897774, 0.0032551025506109, -0.016266239807009697, 0.030195482075214386, 0.02047654241323471, 0.08005141466856003, -0.02212727814912796, 0.00809602439403534, -0.0721130445599556, 0.023907847702503204, 0.03203169256448746, 0.01545941922813654, -0.0030139838345348835, 0.0021816606167703867, 0.008694184012711048, -0.0414724163711071, 0.00914860051125288, 0.08798978477716446, 0.01932659186422825, 0.02691255696117878, 0.02830362692475319, 0.02125554159283638, -0.026448868215084076, -0.03722501918673515, 0.07767731696367264, 0.033218737691640854, 0.0013412227854132652, -0.030510790646076202, 0.027673007920384407, -0.024093322455883026, -0.03913542255759239, -0.06487947702407837, -0.030863195657730103, 0.015635620802640915, 0.00034399988362565637, -0.06065062806010246, -0.026727082207798958, -0.03049224242568016, -0.03377516567707062, -0.004043375141918659, -0.022850634530186653, -0.04469969868659973, 0.0021005149465054274, 0.03206878900527954, -0.03796692192554474, -0.005610646679997444, 0.04826083779335022, 0.05026397854089737, 0.0024714667815715075, -0.03138252720236778, -0.05182197317481041, -0.05964905768632889, -0.0010293914237990975, 0.08442864567041397, -0.00840669684112072, 0.002605936722829938, -0.02719077095389366, 0.007748256903141737, 0.04636898264288902, -0.02707948535680771, -0.039766039699316025, 0.01689685694873333, -0.03561137989163399, 0.03286633640527725, -0.015784000977873802, -0.02158939838409424, -0.01602512039244175, 0.01837139017879963, -0.03151236101984978, -0.07048085331916809, -0.016971047967672348, 0.055531494319438934, -0.008963123895227909, 0.04863178730010986, 0.0128998514264822, -0.01364175509661436, -0.005870313383638859, 0.03423885628581047, 0.02177487500011921, -0.09043806046247482, 0.031568001955747604, 0.02019832842051983, 0.026430319994688034, 0.03256957232952118, -0.061021581292152405, -0.006306181661784649, -0.018491949886083603, -0.004648490343242884, 0.014467122964560986, 0.0737452283501625, -0.020754756405949593, 0.0030533974058926105, -0.019474972039461136, 0.04139822721481323, 0.0019289497286081314, -0.021923255175352097, 0.06732776015996933, 0.04069342091679573, 0.0421772263944149, -0.027116581797599792, -0.032013144344091415, 0.04981883615255356, 0.020773304626345634, -0.013307898305356503, 0.018918544054031372, 0.0407676100730896, -0.00989514123648405, -0.015830371528863907, 0.03255102410912514, 0.013530469499528408, -0.017666582018136978, 0.0008485523867420852, -0.024872321635484695, -0.035147689282894135, 0.02019832842051983, -0.018927818164229393, 0.00836960133165121, 0.07693541795015335, 0.032792143523693085, -0.021830517798662186, 0.05389930680394173, 0.011397495865821838, -0.009459272027015686, -0.023295776918530464, -0.025577131658792496, -0.004850195720791817, -0.006686407141387463, -0.002294105477631092, 0.02107006497681141, 0.11202745884656906, 0.08843492716550827 ]
4,610
optbinning.binning.binning
information
Print overview information about the options settings, problem statistics, and the solution of the computation. Parameters ---------- print_level : int (default=1) Level of details.
def information(self, print_level=1): """Print overview information about the options settings, problem statistics, and the solution of the computation. Parameters ---------- print_level : int (default=1) Level of details. """ self._check_is_fitted() if not isinstance(print_level, numbers.Integral) or print_level < 0: raise ValueError("print_level must be an integer >= 0; got {}." .format(print_level)) binning_type = self.__class__.__name__.lower() if self._optimizer is not None: solver = self._optimizer time_solver = self._time_solver else: solver = None time_solver = 0 dict_user_options = self.get_params() print_binning_information(binning_type, print_level, self.name, self._status, self.solver, solver, self._time_total, self._time_preprocessing, self._time_prebinning, time_solver, self._time_optimizer, self._time_postprocessing, self._n_prebins, self._n_refinements, dict_user_options)
(self, print_level=1)
[ 0.02922184020280838, -0.001447538728825748, 0.005039168056100607, 0.00010769054642878473, 0.04066883772611618, -0.04397496208548546, -0.050231706351041794, -0.10835544019937515, -0.04486370086669922, -0.03188806772232056, -0.0542132705450058, -0.01900130696594715, -0.01716160960495472, -0.03914020210504532, -0.05005395784974098, 0.028972992673516273, -0.0067366654984653, -0.05798153579235077, -0.03119484893977642, 0.04866752028465271, 0.025204727426171303, 0.002599570667371154, 0.028066476806998253, 0.03906910493969917, -0.004412604495882988, 0.005879029165953398, 0.0070121753960847855, -0.06320734322071075, -0.02212967909872532, -0.00014074065256863832, -0.09193148463964462, -0.020387744531035423, -0.04358391463756561, 0.02412046119570732, -0.01198024395853281, -0.0018963535549119115, 0.02529360167682171, 0.01944567821919918, -0.040313344448804855, 0.07493873685598373, -0.026431189849972725, -0.022502951323986053, -0.010398282669484615, -0.014477608725428581, -0.025364700704813004, -0.04689003527164459, 0.021418685093522072, 0.04098878800868988, -0.026768913492560387, -0.06541141867637634, 0.021880831569433212, -0.01974784955382347, 0.00519469752907753, -0.028955217450857162, 0.0047681014984846115, -0.001483088475652039, 0.050373904407024384, -0.054924264550209045, 0.06672675907611847, -0.05076495185494423, 0.010984852910041809, 0.015241927467286587, -0.03256351128220558, -0.007403221912682056, -0.0108515415340662, -0.019516777247190475, -0.01957010105252266, 0.004488147795200348, 0.011384787037968636, 0.020281095057725906, 0.046641185879707336, -0.036509525030851364, -0.014539821073412895, 0.02620011754333973, -0.039531249552965164, -0.05343117564916611, -0.05894137918949127, -0.047529928386211395, 0.02198748104274273, -0.016628365963697433, 0.00425929669290781, 0.013357793912291527, 0.0060256714932620525, -0.08901640772819519, -0.031994715332984924, -0.06971292942762375, 0.03629622980952263, -0.036242902278900146, 0.06498482078313828, 0.007927579805254936, -0.055208660662174225, 0.026733363047242165, 0.030003933236002922, 0.06647790968418121, -0.03882025554776192, -0.009838375262916088, -0.04002894461154938, -0.0464278869330883, -0.04607238993048668, -0.026555614545941353, -0.06925078481435776, -0.027142183855175972, 0.034092146903276443, 0.05072940140962601, -0.03853585943579674, -0.04169978201389313, -0.01423764880746603, -0.017277147620916367, 0.012602363713085651, 0.005252466071397066, -0.0032216901890933514, 0.04447265714406967, -0.06242524832487106, -0.05833703279495239, 0.015401900745928288, 0.032919008284807205, -0.04625013843178749, -0.03478536754846573, -0.039993394166231155, 0.003963789902627468, -0.009016288444399834, -0.007043281104415655, 0.003312786342576146, -0.03665172681212425, -0.028813019394874573, 0.04145093262195587, -0.04884526878595352, 0.008198645897209644, 0.019676750525832176, -0.07159706205129623, 0.08339956402778625, -0.04095323756337166, -0.03169254586100578, 0.0734456479549408, 0.06178535148501396, -0.05286237969994545, -0.024760356172919273, -0.02065436728298664, 0.01611289381980896, 0.053253427147865295, 0.012975635007023811, -0.035460811108350754, -0.047245532274246216, -0.042090825736522675, 0.019925598055124283, -0.03928240016102791, 0.027782078832387924, -0.07113491743803024, -0.010513819754123688, -0.06477152556180954, 0.026093468070030212, -0.013517768122255802, -0.011846932582557201, -0.048596419394016266, -0.03147924691438675, -0.016326192766427994, 0.048454221338033676, -0.047387730330228806, 0.001829697866924107, -0.04639234021306038, -0.06416717916727066, 0.00797646027058363, 0.027231058105826378, -0.02728438377380371, -0.01731269620358944, 0.03903355449438095, -0.007905361242592335, -0.025684647262096405, 0.020227771252393723, 0.011153713800013065, -0.005061386618763208, -0.05424882099032402, -0.04824092239141464, 0.04639234021306038, 0.03162144497036934, 0.04742328077554703, 0.027479905635118484, 0.03522973880171776, 0.014566482976078987, -0.01287787314504385, 0.03860695660114288, -0.034732043743133545, -0.07714281976222992, -0.017428232356905937, -0.014353184960782528, -0.023445017635822296, 0.050231706351041794, -0.029452914372086525, -0.03071492724120617, 0.01258458849042654, -0.005101379938423634, -0.011731396429240704, 0.055066462606191635, -0.00017149945779237896, 0.04052663967013359, -0.006452267989516258, -0.006821095943450928, -0.03339892998337746, 0.0747254341840744, -0.002590683288872242, 0.0454680472612381, 0.000538799911737442, -0.0053191217593848705, 0.038358110934495926, -0.014646470546722412, 0.04205527901649475, 0.034856464713811874, 0.014646470546722412, -0.002007446251809597, 0.03626067936420441, -0.009625077247619629, -0.04550359770655632, 0.01687721349298954, 0.021809732541441917, 0.026395641267299652, -0.0020529942121356726, 0.01957010105252266, -0.014210986904799938, -0.016761677339673042, 0.027319932356476784, 0.056417349725961685, -0.016894986853003502, 0.041024334728717804, 0.03842920809984207, -0.03899800404906273, 0.017597094178199768, 0.04155758023262024, 0.014095449820160866, 0.046463437378406525, -0.04223302751779556, 0.0004277071566320956, -0.01763264462351799, -0.08631463348865509, 0.02001447230577469, -0.04155758023262024, 0.027995377779006958, -0.04479260370135307, 0.045574694871902466, 0.03572743386030197, -0.03643842786550522, -0.0076742880046367645, 0.013260032050311565, -0.0198722742497921, -0.020387744531035423, -0.04955625906586647, -0.09655294567346573, 0.01582849770784378, 0.007403221912682056, 0.005643512587994337, -0.025577997788786888, -0.01731269620358944, -0.07436993718147278, -0.03435876965522766, 0.011766945943236351, 0.0024751469027251005, -0.020298870280385017, -0.030963774770498276, -0.025649096816778183, 0.002546246163547039, -0.006154539063572884, -0.02680446207523346, 0.04127318412065506, -0.021365361288189888, 0.024298209697008133, 0.004014892503619194, -0.005216916091740131, -0.026555614545941353, -0.05186698958277702, 0.0049103000201284885, -0.014362072572112083, 0.06985513120889664, 0.05584855377674103, -0.06039891391992569, 0.0545332171022892, -0.05392887070775032, 0.02890189364552498, 0.025542449206113815, -0.0012098002480342984, -0.06036336347460747, 0.02740880660712719, 0.021631984040141106, -0.0006710002780891955, -0.0201922208070755, -0.02275179885327816, -0.04568134620785713, -0.009882812388241291, -0.025577997788786888, 0.05268463119864464, 0.027302157133817673, 0.006545585580170155, -0.003714942140504718, 0.04553914815187454, 0.03885580599308014, -0.011411448940634727, 0.05186698958277702, 0.001421987428329885, 0.03028833121061325, -0.00970506388694048, 0.005741273984313011, -0.001014276989735663, 0.03416324779391289, -0.0855325385928154, 0.010025011375546455, -0.025382475927472115, 0.0346609428524971, 0.006701115518808365, 0.11169710755348206, -0.023427242413163185, 0.048596419394016266, 0.010087222792208195, -0.0186813585460186, 0.023231718689203262, 0.0929979756474495, 0.07024617493152618, -0.018610259518027306, -0.025684647262096405, -0.040882136672735214, -0.0010087223490700126, -0.0311592984944582, 0.07984459400177002, -0.056132953613996506, 0.04365501180291176, 0.09413556754589081, -0.04763657599687576, -0.03139037266373634, -0.08048448711633682, 0.00986503716558218, 0.01158919744193554, 0.033967722207307816, -0.009207368828356266, -0.06491372734308243, -0.034127697348594666, 0.07643182575702667, -0.005048055201768875, 0.004057107958942652, 0.05673729628324509, 0.0037438261788338423, 0.06434492766857147, -0.016477279365062714, -0.0006965516367927194, 0.04507699981331825, 0.03327450528740883, -0.01287787314504385, 0.03903355449438095, 0.0017419345676898956, -0.010273858904838562, 0.003970455378293991, 0.0006937743164598942, 0.012549038976430893, 0.03448319435119629, -0.047387730330228806, 0.008838540874421597, -0.03949569910764694, 0.015721848234534264, -0.011571422219276428, -0.008234195411205292, 0.050836049020290375, -0.033523354679346085, 0.007038837764412165, 0.034856464713811874, 0.00851859338581562, 0.01484199333935976, -0.04127318412065506, 0.030394980683922768, 0.0035260843578726053, -0.05663064867258072, 0.02769320458173752, 0.0200322475284338, 0.06352728605270386, -0.023693865165114403, -0.0035083096008747816, -0.06434492766857147, -0.0035238624550402164, -0.030466079711914062, -0.024475958198308945, 0.07458323985338211, -0.013135608285665512, 0.02396048791706562, -0.008274189196527004, -0.056417349725961685, 0.07301905006170273, 0.024156011641025543, -0.019925598055124283, -0.010993740521371365, -0.023285044357180595, -0.0316392183303833, -0.023142844438552856, 0.0370427705347538, 0.02668003924190998, 0.02801315113902092, -0.00697218207642436, -0.009589527733623981, -0.04223302751779556, 0.023622766137123108, -0.002220744267106056, 0.015881821513175964, 0.08567474037408829, 0.045716896653175354, -0.0666201114654541, -0.0162550937384367, -0.0337010994553566, -0.05975902080535889, -0.042410772293806076, 0.0009026287007145584, -0.016015132889151573, -0.06821984797716141, 0.008416388183832169, 0.017828166484832764, 0.038464758545160294, -0.01795259118080139, 0.014095449820160866, -0.010940415784716606, -0.023302817717194557, 0.06462932378053665, -0.030963774770498276, 0.014904205687344074, 0.013775503262877464, 0.006949963513761759, 0.013455555774271488, -0.0035527467261999846, 0.06825539469718933, -0.0031283723656088114, 0.02410268597304821, 0.08147987723350525, 0.033078983426094055, 0.023693865165114403, -0.058834727853536606, 0.015615198761224747, 0.027906503528356552, 0.011509210802614689, -0.055350858718156815, -0.021418685093522072, -0.028706369921565056, -0.009580640122294426, 0.0029417364858090878, -0.02317839488387108, -0.008856315165758133, 0.027053309604525566, 0.021152062341570854, 0.024813679978251457, 0.030181681737303734, -0.020085571333765984, 0.030626052990555763, -0.018183663487434387, -0.012797886505723, 0.015241927467286587, 0.00671000313013792, -0.03522973880171776, -0.07323235273361206, -0.00527024082839489, 0.013811052776873112, 0.004808094818145037, 0.000026592830181471072, -0.028279773890972137, -0.021596433594822884, -0.013464443385601044, -0.021436460316181183, 0.005465764086693525, -0.005479095038026571, 0.008696341887116432, -0.018085902556777, -0.01386437751352787, -0.009607302024960518, 0.045859094709157944, 0.0064167180098593235, -0.04969846084713936, 0.06658455729484558, 0.042837370187044144, -0.04593019187450409, -0.015508550219237804, 0.00970506388694048, 0.00933179259300232, -0.05481761321425438, -0.013837714679539204, -0.002208524150773883, 0.040455542504787445, -0.02317839488387108, 0.06466487795114517, -0.0017830388387665153, -0.03825145959854126, -0.006358949933201075, 0.006545585580170155, 0.0003529972746036947, 0.03181696683168411, 0.03235021233558655, -0.034429870545864105, 0.009438441134989262, 0.02047661878168583, -0.008003123104572296, -0.02230742760002613, 0.01182915735989809, 0.004470373038202524, 0.012122442945837975, -0.035638559609651566, 0.010673793032765388, 0.03267015889286995, -0.007447659038007259, 0.006332287564873695, 0.013491105288267136, 0.025400249287486076, 0.017223821952939034, -0.01077155489474535, 0.00842527486383915, 0.008483043871819973, 0.022680699825286865, 0.02500920370221138, 0.020245546475052834, 0.02636009082198143, 0.004341505467891693, 0.045574694871902466, -0.02954178862273693, -0.05272018164396286, -0.010842653922736645, 0.02468925528228283, 0.02257405035197735, 0.047992072999477386, -0.053111229091882706, 0.001963009126484394, 0.02618234232068062, -0.01062046829611063, -0.008007566444575787, 0.016175106167793274, 0.030857127159833908, -0.0373627170920372, 0.015766285359859467, 0.021454235538840294, -0.002766209887340665, 0.030501630157232285, -0.005559082143008709, 0.05794598534703255, 0.04685448482632637, -0.009376229718327522, 0.023142844438552856, 0.022947320714592934, 0.03602960705757141, 0.056275151669979095, 0.029719537124037743, -0.027764303609728813, -0.0073587847873568535, 0.0020641034934669733, 0.019356803968548775, 0.02394271269440651, 0.03448319435119629, -0.05016060546040535, 0.04959180951118469, -0.02785317786037922, 0.02923961542546749, 0.0029528457671403885, 0.02230742760002613, -0.039424601942300797, 0.03290123492479324, 0.015064178965985775, 0.026537839323282242, 0.028972992673516273, 0.028990767896175385, 0.04699668288230896, 0.008136434480547905, 0.0045503596775233746, 0.008558586239814758, -0.014788668602705002, -0.020405519753694534, -0.041806429624557495, 0.010727117769420147, 0.015126391313970089, -0.04536139965057373, 0.006598910316824913, -0.004741439130157232, 0.0842527523636818, -0.02412046119570732, -0.009625077247619629, 0.029719537124037743, 0.03796706348657608, -0.04265962168574333, -0.02980841137468815, -0.020974313840270042, 0.025862395763397217, 0.055528607219457626, 0.0602567158639431, 0.01973007433116436, 0.0626385435461998, -0.023249493911862373, -0.003886024933308363, -0.02109873853623867, 0.005372446030378342, -0.004381498787552118, 0.025684647262096405, -0.023125069215893745, -0.05780378729104996, 0.0535733737051487, 0.025222500786185265, -0.01806812733411789, -0.05254243314266205, 0.007145486772060394, -0.061714254319667816, 0.005061386618763208, -0.003406104166060686, -0.06413163244724274, -0.072343610227108, 0.062283046543598175, 0.0018874660599976778, -0.07444103807210922, -0.015153053216636181, -0.03393217548727989, 0.010184984654188156, -0.03782486543059349, 0.02847529761493206, 0.04198417812585831, 0.03357667848467827, 0.0015064178733155131, 0.0022973984014242887, -0.01955232582986355, -0.05104934796690941, -0.009305129759013653, -0.04184198006987572, -0.05019615590572357, -0.01896575652062893, 0.05570635572075844, 0.011331462301313877, 0.04077548906207085, -0.006696671713143587, -0.011740283109247684, 0.06793544441461563, -0.012842323631048203, 0.034856464713811874, -0.02815535105764866, 0.011793607845902443, 0.012797886505723, -0.06640680879354477, 0.03610070422291756, -0.023125069215893745, -0.0008731891284696758, 0.03224356472492218, -0.04447265714406967, 0.006941075902432203, -0.02516917698085308, -0.04596574231982231, 0.00828307680785656, 0.03931795060634613, -0.03448319435119629, 0.008478599600493908, 0.03839366137981415, 0.03284790739417076, -0.005959015805274248, 0.00933179259300232, 0.029470689594745636, 0.05232913792133331, -0.019925598055124283, -0.019463451579213142, 0.08915860950946808, -0.0023573883809149265, -0.06587356328964233, 0.04589464142918587, -0.05318232998251915, 0.052186936140060425, -0.007798712234944105, -0.01219354197382927, -0.004292624536901712, 0.008167539723217487, -0.008740779012441635, 0.007065499667078257, -0.07159706205129623, -0.012593476101756096, 0.008958520367741585, -0.03722051903605461, 0.04265962168574333, 0.03222578763961792, -0.06039891391992569, 0.02287622168660164, 0.01640618033707142, -0.032616835087537766, 0.035460811108350754, -0.008007566444575787, -0.002555133542045951, 0.007892030291259289, -0.046321239322423935, 0.06384723633527756, -0.03055495396256447, 0.0033505577594041824, -0.02124093659222126, -0.02755100652575493, 0.10664905607700348, -0.012966747395694256, -0.027604330331087112, -0.008536367677152157, 0.05147594213485718, 0.010424945503473282, -0.04628568887710571, -0.007767606060951948, -0.010656017810106277, 0.03075047768652439, -0.08446605503559113, -0.02442263439297676, 0.03690057247877121, 0.007963129319250584, 0.06896638870239258, -0.0036971671506762505, -0.015552987344563007, -0.06459377706050873, 0.10089000314474106, -0.06164315342903137, 0.04034889116883278, -0.01973007433116436, -0.018121451139450073, 0.02829754911363125, -0.011420336551964283, 0.013579979538917542, -0.03389662504196167, -0.002000780776143074, 0.036065153777599335, 0.0035949619486927986, 0.03871360793709755, 0.08332846313714981, 0.01629064232110977, -0.057910434901714325, -0.002119649900123477, 0.044970352202653885, -0.019196830689907074, 0.038038164377212524, -0.04216192662715912, -0.004039332736283541, -0.016370629891753197, 0.05908357724547386, 0.011651408858597279, -0.04518365114927292, 0.03629622980952263, 0.104302778840065, 0.005527975969016552, -0.05449766665697098, 0.0032972332555800676, 0.028866345062851906, 0.00896740797907114, -0.06235414743423462, -0.0488097183406353, -0.018254762515425682, -0.0017997027607634664, 0.021738631650805473, 0.017979253083467484, 0.028404198586940765, 0.06786435097455978, -0.002703998005017638, 0.042090825736522675, 0.04034889116883278, -0.009518427774310112, 0.02412046119570732, -0.015126391313970089, 0.006287850439548492, 0.011562534607946873, 0.009962799027562141, 0.012895648367702961, -0.001815255731344223, 0.051618143916130066, -0.002452928340062499, 0.033078983426094055, 0.011935806833207607, 0.038926903158426285, 0.0005676840082742274, 0.02970176190137863, -0.03686502203345299, 0.038180362433195114, -0.013260032050311565, 0.006754440255463123, -0.02472480572760105, 0.03400327265262604, 0.06096770986914635, -0.035354163497686386, 0.004270405974239111, -0.04056219011545181, -0.023676089942455292 ]
4,611
optbinning.binning.continuous_binning
read_json
Read json file containing split points and set them as the new split points. Parameters ---------- path: The path of the json file.
def read_json(self, path): """ Read json file containing split points and set them as the new split points. Parameters ---------- path: The path of the json file. """ if path is None: raise ValueError('Specify the path for the json file.') self._is_fitted = True with open(path, "r") as read_file: cont_table_attr = json.load(read_file) for key in cont_table_attr.keys(): if isinstance(cont_table_attr[key], list): cont_table_attr[key] = np.array(cont_table_attr[key]) self._binning_table = ContinuousBinningTable(**cont_table_attr)
(self, path)
[ 0.015513036400079727, -0.02717745490372181, -0.07018714398145676, -0.0026903855614364147, -0.049867890775203705, 0.02495218627154827, -0.019170137122273445, 0.04093034192919731, 0.011326978914439678, 0.006881003268063068, -0.020665809512138367, 0.014546321704983711, -0.05242148041725159, -0.02124948613345623, -0.05413603037595749, -0.019005978479981422, 0.07777494192123413, 0.014564561657607555, -0.050305649638175964, -0.013825845904648304, -0.01709078811109066, -0.06763355433940887, 0.0095394691452384, 0.09171022474765778, 0.030387677252292633, -0.04362984746694565, 0.0258824210613966, -0.0024418667890131474, 0.08864592760801315, -0.029256803914904594, -0.05231203883886337, -0.012457853183150291, -0.028344808146357536, 0.02936624176800251, 0.006393085699528456, -0.08871888369321823, 0.024915706366300583, 0.0028499846812337637, -0.07901525497436523, 0.056872013956308365, -0.022307399660348892, -0.02256275899708271, -0.062343984842300415, 0.038887470960617065, 0.010469703935086727, 0.020519889891147614, -0.02321939542889595, 0.041951775550842285, 0.010788901709020138, -0.01948021538555622, -0.059972796589136124, -0.0882081687450409, -0.00797995738685131, 0.0651894137263298, -0.029639840126037598, 0.012904730625450611, 0.013725526630878448, 0.05501154437661171, 0.005576849915087223, -0.005221171770244837, -0.028654886409640312, -0.020501650869846344, -0.015886954963207245, -0.044359441846609116, 0.027542252093553543, -0.03841323405504227, -0.042827289551496506, 0.014363923110067844, 0.029256803914904594, -0.020282771438360214, -0.01792982406914234, 0.0408209003508091, 0.04844518005847931, 0.0636572614312172, -0.05698145553469658, 0.03660748526453972, -0.06657564640045166, 0.0006515065324492753, 0.014108564704656601, 0.02391251176595688, -0.013524887152016163, -0.02522578462958336, 0.05720033496618271, -0.03241230547428131, -0.0630006194114685, 0.013005049899220467, 0.07711830735206604, 0.011591457761824131, -0.02542642317712307, 0.05544930323958397, -0.006953962612897158, 0.0561424195766449, -0.058623045682907104, -0.01854086108505726, 0.05603297799825668, -0.023784833028912544, 0.00962154846638441, -0.010460583493113518, -0.04023722559213638, -0.0013691326603293419, -0.023146435618400574, -0.012667612172663212, -0.005608770065009594, 0.046985987573862076, -0.0014933920465409756, -0.00833563506603241, 0.03108079358935356, 0.011190179735422134, -0.04684006795287132, 0.0004904823726974428, -0.04994085058569908, 0.08113108575344086, 0.02124948613345623, -0.0190789382904768, 0.038668591529130936, 0.0302599985152483, -0.0030004638247191906, -0.02781585045158863, 0.010943940840661526, 0.0486275777220726, 0.012904730625450611, 0.020720528438687325, 0.016051113605499268, 0.07095322012901306, -0.003128143260255456, 0.019425496459007263, 0.0284542478621006, 0.029202083125710487, 0.025152824819087982, -0.013087130151689053, 0.04640231281518936, -0.0386321134865284, 0.005107172764837742, -0.0016450111288577318, -0.0059598879888653755, -0.030953114852309227, -0.03173742815852165, 0.01581399515271187, 0.00041153779602609575, 0.006197006907314062, 0.07646167278289795, -0.010880101472139359, 0.025535862892866135, -0.09535820782184601, 0.028125928714871407, 0.035622529685497284, -0.010433224029839039, 0.010342024266719818, -0.059279680252075195, 0.006183326710015535, -0.03819435462355614, 0.028545446693897247, -0.04607399180531502, -0.0359690859913826, 0.02912912331521511, -0.05588705837726593, -0.018513500690460205, -0.0212677251547575, 0.029731040820479393, 0.021760202944278717, -0.004746934399008751, 0.02238035947084427, 0.02059284970164299, -0.010652102530002594, -0.0809851661324501, 0.05256739631295204, -0.05632481724023819, -0.06825371086597443, -0.05756513029336929, -0.02781585045158863, 0.050962287932634354, 0.007674438878893852, -0.03564076870679855, 0.05734625086188316, 0.04793446138501167, -0.014965839684009552, 0.011892416514456272, 0.020063892006874084, 0.058623045682907104, 0.03618796542286873, -0.006338365841656923, -0.009046991355717182, 0.027213934808969498, -0.0273598525673151, 0.000109368163975887, 0.010542663745582104, 0.01072506234049797, -0.009949866682291031, 0.04859109967947006, 0.050305649638175964, 0.0035408209078013897, 0.01880533993244171, 0.017300548031926155, -0.007327880710363388, 0.06216158717870712, -0.015531276352703571, 0.034072138369083405, 0.0010077545884996653, -0.07952596992254257, 0.02325587533414364, -0.031682711094617844, -0.06248990446329117, 0.030551835894584656, -0.029639840126037598, -0.02500690519809723, 0.003349302103742957, -0.0038987791631370783, 0.020246291533112526, 0.03171918913722038, 0.02343827486038208, -0.010287304408848286, -0.06942106783390045, 0.027779370546340942, 0.005015973001718521, 0.07000474631786346, -0.003390341764315963, -0.06449629366397858, -0.0019927092362195253, 0.003650260390713811, -0.012758811935782433, 0.09557709097862244, 0.005248531699180603, 0.028964964672923088, -0.009886027313768864, -0.037355318665504456, -0.0129412105306983, 0.019133657217025757, -0.02673969604074955, -0.03193806856870651, 0.001878709881566465, 0.006657564081251621, 0.015084398910403252, -0.02234387956559658, -0.0763157531619072, -0.003689020173624158, -0.001214093528687954, 0.033652618527412415, -0.004220257513225079, 0.0010898341424763203, 0.02281811833381653, -0.00017954903887584805, 0.005672609433531761, -0.012767931446433067, -0.06515292823314667, -0.055777620524168015, 0.025298744440078735, 0.031463831663131714, -0.018650300800800323, -0.012029215693473816, 0.022489799186587334, 0.0459645539522171, 0.03972650691866875, -0.00386229925788939, 0.06387613713741302, -0.006867323070764542, -0.08368466794490814, -0.025754742324352264, -0.03739180043339729, -0.00016116663755383343, 0.012539932504296303, -0.025371704250574112, -0.0512906052172184, 0.019425496459007263, 0.06818075478076935, 0.0053898910991847515, -0.008937551639974117, 0.0016883308999240398, 0.025481143966317177, 0.035841409116983414, -0.023091716691851616, -0.09966282546520233, 0.01096218079328537, -0.003761979751288891, -0.04184233397245407, 0.012339293956756592, 0.023730112239718437, 0.01661655120551586, -0.021413644775748253, 0.019790293648838997, 0.05231203883886337, 0.05698145553469658, -0.0240766704082489, 0.017036069184541702, -0.010652102530002594, -0.02759697288274765, -0.03071599453687668, -0.020702289417386055, -0.024660347029566765, -0.023821312934160233, -0.057966407388448715, -0.020501650869846344, 0.04180585592985153, -0.034947652369737625, 0.03874155133962631, 0.04800742119550705, 0.0056498097255826, -0.0022708678152412176, -0.04487016052007675, 0.03202926740050316, -0.014892879873514175, 0.04778854548931122, -0.0318286307156086, 0.0517648421227932, -0.005535810254514217, -0.029074404388666153, -0.07029658555984497, -0.011764736846089363, -0.018039263784885406, -0.031682711094617844, 0.014601041562855244, 0.031664468348026276, 0.0043752966448664665, -0.015294157899916172, -0.03128143399953842, 0.003508901223540306, -0.021103566512465477, -0.00842683482915163, 0.03370733931660652, 0.024496188387274742, 0.02188788168132305, -0.02409491129219532, -0.006598284468054771, 0.002116968622431159, -0.009548588655889034, 0.01792982406914234, 0.04078442230820656, 0.09243982285261154, 0.026447858661413193, -0.061687350273132324, 0.050086770206689835, 0.04859109967947006, -0.009220270439982414, 0.025262264534831047, -0.0011137740220874548, 0.016580071300268173, 0.007163721602410078, -0.0088144326582551, -0.010232585482299328, 0.008704992942512035, -0.014965839684009552, 0.03441869467496872, -0.03775659576058388, 0.04322856664657593, -0.007241241168230772, -0.014190644025802612, 0.003875979222357273, 0.03704524040222168, 0.001365712727420032, 0.03613324463367462, 0.07430936396121979, -0.07452823966741562, 0.002466946840286255, 0.023985471576452255, 0.06748763471841812, -0.05596001818776131, -0.0294027216732502, 0.019443735480308533, -0.05409954860806465, 0.029311522841453552, -0.05938912183046341, 0.04574567452073097, -0.02276339754462242, -0.04778854548931122, 0.005973568186163902, 0.028436006978154182, 0.01228457409888506, 0.004119937773793936, 0.009274990297853947, 0.016479751095175743, 0.03423629701137543, 0.003796179546043277, -0.01929781585931778, -0.0017225308110937476, 0.05807584896683693, 0.020428691059350967, 0.003431381657719612, 0.003871419234201312, 0.020428691059350967, -0.020939407870173454, 0.030588315799832344, -0.013114489614963531, -0.018176062032580376, 0.009813067503273487, -0.003513461211696267, 0.01840406097471714, 0.006643884349614382, -0.013087130151689053, -0.05063396692276001, -0.01336072850972414, -0.05698145553469658, 0.020684048533439636, -0.013087130151689053, 0.003629740560427308, 0.007756518200039864, -0.0179845429956913, -0.01554039679467678, 0.08740561455488205, 0.009325150400400162, 0.05439138785004616, 0.06281822174787521, -0.05450082942843437, -0.0595715194940567, -0.02041045017540455, 0.02827184833586216, -0.03390797972679138, -0.057966407388448715, 0.04778854548931122, 0.01832198165357113, -0.005129972472786903, -0.035804927349090576, 0.006657564081251621, 0.09397197514772415, 0.008910192176699638, 0.06923867017030716, -0.043483927845954895, 0.06084831431508064, -0.0454903170466423, -0.03204750642180443, -0.019881492480635643, 0.06449629366397858, 0.02978575974702835, 0.03381677716970444, -0.04687654972076416, 0.015057039447128773, -0.01228457409888506, 0.01667127013206482, -0.04494312033057213, -0.02101236768066883, 0.02035573124885559, 0.03613324463367462, -0.007916117087006569, -0.07339736819267273, -0.021559564396739006, -0.08404947072267532, -0.04432296380400658, -0.0013041530037298799, -0.003262662561610341, -0.02695857547223568, 0.02673969604074955, 0.016124073415994644, 0.014728721231222153, 0.032321106642484665, 0.0669039636850357, -0.03704524040222168, -0.02672145701944828, -0.01927957683801651, -0.01413592416793108, 0.014190644025802612, -0.012767931446433067, -0.06011871621012688, -0.008937551639974117, 0.034528136253356934, 0.036479804664850235, -0.05493858456611633, 0.01380760595202446, -0.012986809946596622, 0.007834037765860558, -0.016160553321242332, 0.04990437254309654, 0.04322856664657593, -0.0193160567432642, 0.011153699830174446, 0.016935748979449272, -0.02741457335650921, 0.0070132422260940075, -0.0547197051346302, -0.017364386469125748, 0.029840480536222458, -0.029238563030958176, 0.002143188612535596, -0.028654886409640312, 0.0030574635602533817, -0.02936624176800251, -0.045672714710235596, 0.025280503556132317, 0.058404166251420975, 0.04953957349061966, -0.00013017305172979832, 0.01291385106742382, 0.001952809514477849, -0.017099907621741295, -0.0969633162021637, -0.02104884758591652, 0.003390341764315963, 0.033853258937597275, 0.008946672081947327, -0.09499341249465942, -0.01717286743223667, -0.03042415715754032, -0.04924773424863815, -0.0070542823523283005, -0.00010074696183437482, -0.0015184718649834394, 0.016370311379432678, 0.005622449796646833, 0.034072138369083405, 0.06376669555902481, 0.014354802668094635, 0.0636572614312172, 0.012111295014619827, -0.0008960351697169244, 0.05391715094447136, -0.025079865008592606, 0.0110625009983778, -0.02300051599740982, 0.03248526528477669, 0.012311933562159538, 0.007364360615611076, -0.09448269009590149, -0.04184233397245407, -0.007378040347248316, 0.0014352522557601333, 0.004678534809499979, 0.043958164751529694, -0.013196568936109543, 0.008020997047424316, 0.008449634537100792, 0.020994126796722412, -0.04388520494103432, 0.015987275168299675, 0.004938453435897827, -0.03440045565366745, 0.031190233305096626, -0.0190789382904768, -0.011399938724935055, 0.021194767206907272, 0.01216601487249136, -0.057929929345846176, 0.047679103910923004, 0.0017852304736152291, 0.0403466634452343, 0.011700897477567196, 0.02914736419916153, 0.05979039892554283, 0.030643034726381302, 0.04800742119550705, 0.08769744634628296, -0.047241345047950745, 0.03423629701137543, -0.013579607009887695, -0.013771126046776772, -0.028837285935878754, 0.02435026876628399, 0.010031946003437042, 0.03704524040222168, 0.042170654982328415, -0.019626135006546974, 0.026338418945670128, 0.052932195365428925, 0.0012106734793633223, 0.027432812377810478, -0.0111810602247715, 0.006315566133707762, -0.032102227210998535, 0.051363565027713776, -0.06529884785413742, -0.003964898642152548, -0.05548578128218651, -0.0112996194511652, -0.0006509365048259497, -0.02013685181736946, 0.023383554071187973, 0.002900144550949335, 0.058367688208818436, -0.023091716691851616, 0.022033801302313805, -0.040638502687215805, 0.1144736260175705, -0.031007833778858185, -0.030953114852309227, 0.07704534381628036, 0.07182873785495758, -0.018276382237672806, -0.03925227001309395, 0.006429565604776144, -0.030533596873283386, -0.03664396330714226, -0.005430930759757757, -0.07558615505695343, 0.013196568936109543, -0.028326567262411118, 0.010259944945573807, -0.022891078144311905, 0.032539986073970795, -0.030843675136566162, 0.03197455033659935, -0.03947114944458008, 0.05658017471432686, 0.054208990186452866, 0.03947114944458008, -0.0289284847676754, 0.029183844104409218, 0.0318286307156086, -0.011746496893465519, -0.01031466480344534, 0.026557298377156258, -0.031171992421150208, -0.060556475073099136, -0.012238974682986736, -0.04570919647812843, -0.06183326989412308, -0.008362995460629463, -0.05658017471432686, 0.04341096803545952, -0.035203009843826294, -0.04574567452073097, 0.028964964672923088, 0.05628833919763565, -0.02234387956559658, 0.0007552459719590843, 0.018121343106031418, 0.010834502056241035, 0.030588315799832344, -0.021760202944278717, -0.0010835642460733652, 0.010132265277206898, 0.0012596932938322425, -0.03724588081240654, 0.03943466767668724, -0.0347834937274456, 0.0159143153578043, -0.03215694800019264, 0.019808534532785416, 0.0381578765809536, -0.04534439742565155, -0.07062490284442902, 0.02429554983973503, -0.04187881574034691, -0.014300083741545677, -0.06752412021160126, -0.024842746555805206, -0.09579596668481827, -0.014974960125982761, -0.03961706906557083, 0.02610130049288273, 0.00569540960714221, -0.03870507329702377, -0.02232564054429531, 0.050305649638175964, 0.042426012456417084, -0.0010043346555903554, -0.045271437615156174, 0.012330173514783382, -0.019334295764565468, -0.019808534532785416, -0.02673969604074955, -0.02673969604074955, 0.03465581312775612, 0.09440973401069641, 0.036005567759275436, -0.022015562281012535, 0.04381224513053894, -0.061504948884248734, 0.025754742324352264, 0.05150948464870453, -0.03465581312775612, 0.00011129190534120426, -0.044140562415122986, 0.02714097499847412, -0.0004939023638144135, -0.0408209003508091, 0.025991860777139664, -0.003103063441812992, -0.0073826005682349205, 0.0006064767367206514, -0.027925290167331696, 0.014300083741545677, 0.0024920266587287188, 0.01064298301935196, 0.08010964840650558, -0.019334295764565468, -0.02473330684006214, -0.04074794054031372, -0.032083988189697266, 0.02429554983973503, -0.005129972472786903, -0.01949845626950264, -0.018650300800800323, 0.04209769517183304, 0.008896511979401112, 0.010360264219343662, 0.03972650691866875, 0.021979082375764847, 0.0017225308110937476, 0.03950762748718262, 0.054026588797569275, 0.004614695440977812, -0.020465170964598656, -0.030588315799832344, 0.05504802614450455, 0.006548124831169844, 0.021085327491164207, 0.012448733672499657, -0.012631132267415524, -0.011263139545917511, -0.035203009843826294, 0.017793023958802223, -0.003771099727600813, -0.07792086154222488, 0.025481143966317177, -0.003438221523538232, -0.018659420311450958, -0.02456914819777012, 0.012649372220039368, -0.017181986942887306, 0.03129967302083969, -0.0021625685039907694, -0.006073887459933758, -0.0330689437687397, -0.04782502353191376, 0.02610130049288273, 0.03312366083264351, 0.01182857621461153, -0.020246291533112526, 0.021322445943951607, 0.12687675654888153, -0.08806224912405014, 0.010369384661316872, -0.004382136277854443, -0.021960841491818428, 0.01150937844067812, -0.006324686110019684, -0.009803947061300278, 0.05986335873603821, -0.014363923110067844, -0.03680812194943428, 0.03272238373756409, -0.003882819088175893, -0.024404989555478096, -0.003577300813049078, -0.011117219924926758, 0.006593724712729454, -0.028983203694224358, 0.009028751403093338, -0.0021067087072879076, -0.019899733364582062, 0.004961253609508276, 0.004658014979213476, 0.05778400972485542, 0.03044239617884159, -0.0251710657030344, -0.027925290167331696, 0.00037819298449903727, -0.004409496206790209, -0.03213870897889137, 0.02281811833381653, 0.000617876707110554, 0.029931679368019104, -0.03204750642180443, 0.025554103776812553, 0.014145043678581715, 0.05457378551363945, -0.007569559384137392, 0.027779370546340942, -0.011855936609208584, -0.04574567452073097, -0.0048198942095041275, 0.02958512119948864, -0.004072058014571667, -0.01778390444815159, -0.0442500039935112, 0.02298227697610855, 0.004534895531833172, 0.008185155689716339, 0.03943466767668724, 0.038449712097644806, 0.050269171595573425, 0.007779318373650312 ]
4,612
sklearn.utils._metadata_requests
set_fit_request
Request metadata passed to the ``fit`` method. Note that this method is only relevant if ``enable_metadata_routing=True`` (see :func:`sklearn.set_config`). Please see :ref:`User Guide <metadata_routing>` on how the routing mechanism works. The options for each parameter are: - ``True``: metadata is requested, and passed to ``fit`` if provided. The request is ignored if metadata is not provided. - ``False``: metadata is not requested and the meta-estimator will not pass it to ``fit``. - ``None``: metadata is not requested, and the meta-estimator will raise an error if the user provides it. - ``str``: metadata should be passed to the meta-estimator with this given alias instead of the original name. The default (``sklearn.utils.metadata_routing.UNCHANGED``) retains the existing request. This allows you to change the request for some parameters and not others. .. versionadded:: 1.3 .. note:: This method is only relevant if this estimator is used as a sub-estimator of a meta-estimator, e.g. used inside a :class:`~sklearn.pipeline.Pipeline`. Otherwise it has no effect. Parameters ---------- check_input : str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED Metadata routing for ``check_input`` parameter in ``fit``. sample_weight : str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED Metadata routing for ``sample_weight`` parameter in ``fit``. x : str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED Metadata routing for ``x`` parameter in ``fit``. Returns ------- self : object The updated object.
def __get__(self, instance, owner): # we would want to have a method which accepts only the expected args def func(**kw): """Updates the request for provided parameters This docstring is overwritten below. See REQUESTER_DOC for expected functionality """ if not _routing_enabled(): raise RuntimeError( "This method is only available when metadata routing is enabled." " You can enable it using" " sklearn.set_config(enable_metadata_routing=True)." ) if self.validate_keys and (set(kw) - set(self.keys)): raise TypeError( f"Unexpected args: {set(kw) - set(self.keys)}. Accepted arguments" f" are: {set(self.keys)}" ) requests = instance._get_metadata_request() method_metadata_request = getattr(requests, self.name) for prop, alias in kw.items(): if alias is not UNCHANGED: method_metadata_request.add_request(param=prop, alias=alias) instance._metadata_request = requests return instance # Now we set the relevant attributes of the function so that it seems # like a normal method to the end user, with known expected arguments. func.__name__ = f"set_{self.name}_request" params = [ inspect.Parameter( name="self", kind=inspect.Parameter.POSITIONAL_OR_KEYWORD, annotation=owner, ) ] params.extend( [ inspect.Parameter( k, inspect.Parameter.KEYWORD_ONLY, default=UNCHANGED, annotation=Optional[Union[bool, None, str]], ) for k in self.keys ] ) func.__signature__ = inspect.Signature( params, return_annotation=owner, ) doc = REQUESTER_DOC.format(method=self.name) for metadata in self.keys: doc += REQUESTER_DOC_PARAM.format(metadata=metadata, method=self.name) doc += REQUESTER_DOC_RETURN func.__doc__ = doc return func
(self: optbinning.binning.continuous_binning.ContinuousOptimalBinning, *, check_input: Union[bool, NoneType, str] = '$UNCHANGED$', sample_weight: Union[bool, NoneType, str] = '$UNCHANGED$', x: Union[bool, NoneType, str] = '$UNCHANGED$') -> optbinning.binning.continuous_binning.ContinuousOptimalBinning
[ 0.04383525252342224, -0.05837089940905571, -0.01913035847246647, 0.004746916238218546, -0.002937095006927848, -0.01727535016834736, -0.01155812293291092, 0.00996947567909956, 0.05700104683637619, 0.010854171589016914, -0.021461008116602898, 0.006492525804787874, 0.05125528201460838, -0.0053414697758853436, -0.019919926300644875, 0.037480663508176804, 0.02996550314128399, 0.023820197209715843, 0.030117709189653397, -0.033694542944431305, 0.019206460565328598, -0.04276981204748154, -0.02876688353717327, 0.01496372651308775, 0.008471200242638588, 0.06548652052879333, 0.03795630484819412, -0.04531925916671753, 0.08995358645915985, -0.006511551793664694, -0.025151997804641724, -0.014174158684909344, 0.014716392382979393, 0.06289902329444885, 0.028938114643096924, -0.03154463693499565, -0.010759042575955391, 0.02275475673377514, -0.06259460747241974, -0.01528716366738081, -0.03721430152654648, -0.0266740545630455, 0.04862973093986511, -0.09665064513683319, 0.059474390000104904, 0.0319061279296875, -0.005303418729454279, 0.10509806126356125, -0.019206460565328598, -0.01768440380692482, 0.01319433469325304, -0.01121565978974104, 0.015077880583703518, -0.005084622651338577, -0.005855164490640163, 0.057343509048223495, 0.05563119426369667, 0.04406356066465378, 0.05951244384050369, 0.028062932193279266, 0.02718774974346161, 0.03468388319015503, 0.03241982311010361, -0.008385584689676762, -0.04345473647117615, -0.03871733322739601, -0.046422749757766724, -0.013869747519493103, 0.008651944808661938, 0.03169684484601021, 0.028709806501865387, -0.017979301512241364, 0.005455624312162399, 0.026693081483244896, 0.021575162187218666, -0.026407694444060326, -0.04048672690987587, -0.052434876561164856, 0.0530056469142437, -0.04170437157154083, 0.01711363159120083, -0.01719924807548523, -0.0270355436950922, -0.08104955404996872, -0.009070510044693947, -0.03213443607091904, -0.00847595650702715, -0.04927660524845123, 0.03938323259353638, 0.0029965504072606564, -0.08553962409496307, 0.05148359015583992, -0.016200397163629532, -0.0030250889249145985, 0.009546153247356415, -0.030631404370069504, 0.0018359816167503595, -0.05844700336456299, 0.002411509631201625, -0.026616977527737617, 0.000663521874230355, 0.0358634777367115, 0.06643780320882797, 0.0757223516702652, 0.03706209734082222, -0.050570353865623474, -0.016704579815268517, -0.008675727061927319, -0.011263224296271801, -0.0038313036784529686, 0.011482019908726215, -0.010854171589016914, -0.05955049395561218, 0.019082793965935707, 0.0013520149514079094, 0.0011082480195909739, -0.019729668274521828, -0.04334058240056038, -0.0508367158472538, -0.014973239041864872, -0.026807235553860664, 0.011044428683817387, -0.0254183579236269, -0.06362199783325195, 0.0007479484775103629, 0.004283164627850056, 0.009617500007152557, 0.013432156294584274, 0.04482458904385567, -0.07241187989711761, -0.031601715832948685, -0.006782668177038431, -0.03907882049679756, 0.09284549951553345, 0.0439874567091465, 0.01622893661260605, 0.04748819023370743, 0.020471671596169472, -0.011929124593734741, 0.05905582383275032, -0.003013197798281908, 0.020129207521677017, 0.036757685244083405, -0.02134685404598713, -0.0013710407074540854, -0.05072256177663803, 0.026883337646722794, -0.0001608267630217597, 0.025722770020365715, -0.0340750589966774, 0.025913026183843613, -0.01833127811551094, 0.002818184206262231, -0.01269015297293663, -0.0026968952734023333, 0.0019322993466630578, 0.023021116852760315, -0.004782589618116617, 0.011234685778617859, -0.018150534480810165, -0.004782589618116617, -0.005702958442270756, -0.012052791193127632, -0.09139954298734665, 0.03521660342812538, 0.021461008116602898, -0.0061357938684523106, -0.04859168082475662, -0.03827974200248718, 0.03555906563997269, -0.060882292687892914, -0.02775852009654045, -0.03382772579789162, 0.006839745212346315, 0.03533075749874115, 0.0393071323633194, 0.017142171040177345, 0.0055650221183896065, 0.008552059531211853, 0.02808195725083351, 0.0137936444953084, -0.0526251345872879, -0.08553962409496307, -0.035825423896312714, 0.006364102475345135, 0.07123228162527084, 0.006392640992999077, 0.0019370558438822627, -0.043644994497299194, 0.045623667538166046, 0.029432784765958786, -0.008371314965188503, 0.05369057133793831, 0.03439849615097046, -0.031278278678655624, -0.04802091047167778, -0.05905582383275032, 0.04878193885087967, 0.013765105977654457, 0.07690194994211197, 0.05837089940905571, 0.008989650756120682, 0.01881643384695053, 0.049048297107219696, 0.006107254885137081, 0.049923479557037354, 0.03645327314734459, -0.00015934037219267339, -0.05235877260565758, -0.013042128644883633, 0.01319433469325304, -0.026597952470183372, 0.018064917996525764, -0.008490226231515408, 0.003912162967026234, -0.01093978714197874, 0.01777002029120922, -0.01557254884392023, -0.01204327866435051, -0.022868910804390907, 0.09284549951553345, 0.04813506454229355, 0.03367551788687706, 0.019710643216967583, 0.025932051241397858, -0.031107047572731972, 0.0555170401930809, -0.051902156323194504, -0.03660547733306885, -0.07914698123931885, 0.0046827043406665325, 0.0007895672461017966, 0.018673740327358246, 0.04391135275363922, -0.034702908247709274, -0.01993895135819912, 0.036148861050605774, 0.038527075201272964, -0.013422642834484577, -0.006668513640761375, -0.00593126704916358, 0.049390759319067, 0.05007568746805191, 0.03312377259135246, -0.05502237379550934, -0.01699947752058506, -0.0045804413966834545, 0.0678076520562172, 0.042922016233205795, -0.001805064850486815, 0.04269370809197426, -0.025760820135474205, -0.051864102482795715, -0.0027944021858274937, -0.031088020652532578, -0.034017980098724365, -0.042160987854003906, 0.0002696300798561424, 0.042922016233205795, -0.015325214713811874, -0.03078361041843891, 0.012195484712719917, 0.0018966261995956302, 0.04143800958991051, 0.018150534480810165, 0.011833995580673218, 0.04318837821483612, 0.013879260048270226, -0.05566924810409546, 0.004806371871381998, -0.009546153247356415, 0.045014847069978714, -0.0015708107966929674, 0.01760830171406269, -0.01825517602264881, -0.05235877260565758, -0.00006484350888058543, -0.02437194250524044, -0.04330253228545189, -0.012328664772212505, 0.05015178769826889, -0.023629941046237946, 0.04337863251566887, 0.006073960103094578, -0.014411980286240578, -0.03065042942762375, -0.004639896564185619, 0.05365252122282982, 0.012233535759150982, -0.02087121084332466, 0.011044428683817387, 0.007710171863436699, -0.005874190013855696, -0.04250345006585121, 0.032210540026426315, -0.0034674368798732758, -0.07313485443592072, 0.0012735339114442468, 0.0017170709325000644, -0.011520071886479855, 0.02094731479883194, -0.0011498667299747467, -0.03302864357829094, -0.017779532819986343, 0.05285344272851944, -0.021518085151910782, 0.08104955404996872, -0.00801458302885294, -0.011691302992403507, 0.0057505229488015175, 0.0038645986933261156, 0.04528120532631874, -0.033504288643598557, -0.04452017694711685, -0.001132624689489603, -0.0026802478823810816, -0.013983901590108871, 0.018179072067141533, 0.040182314813137054, 0.10410872101783752, -0.014392955228686333, 0.04737403616309166, -0.03436044603586197, -0.007353439461439848, -0.014012440107762814, -0.012243049219250679, -0.0035554307978600264, -0.004066747147589922, -0.038336820900440216, 0.0009483130997978151, -0.0313543826341629, -0.0038978937081992626, 0.022659629583358765, 0.02477148361504078, -0.0861484482884407, 0.031202174723148346, -0.0040929075330495834, -0.023496760055422783, 0.01462126336991787, -0.012423792853951454, 0.03510244935750961, -0.017475120723247528, -0.006211896426975727, -0.01272820495069027, -0.0364152230322361, -0.01121565978974104, 0.051940206438302994, -0.0023294612765312195, 0.07914698123931885, -0.02336358092725277, 0.021461008116602898, -0.038165587931871414, 0.05213046446442604, 0.049048297107219696, 0.08439808338880539, -0.006663757376372814, -0.0137936444953084, -0.04592807963490486, -0.007519914768636227, -0.07092787325382233, 0.02844344638288021, -0.048477526754140854, -0.0036362900864332914, 0.006192870903760195, 0.010863684117794037, -0.0009084779885597527, -0.0254183579236269, 0.0036600723396986723, 0.02581789717078209, -0.056544430553913116, 0.0034436548594385386, -0.0984010100364685, -0.05437549948692322, 0.02397240325808525, 0.019158896058797836, 0.0021867682226002216, -0.03999205678701401, -0.017893686890602112, -0.05072256177663803, 0.02876688353717327, 0.032210540026426315, 0.022145934402942657, -0.005065597128123045, 0.011367865838110447, 0.010359502397477627, -0.0457758754491806, 0.025722770020365715, 0.01615283265709877, 0.038450974971055984, -0.01773196831345558, 0.021898599341511726, -0.05277733877301216, -0.01427880022674799, 0.010654401034116745, -0.018987664952874184, -0.06986243277788162, 0.026217438280582428, -0.010321451351046562, 0.0072250161319971085, -0.04265565797686577, 0.054527703672647476, -0.056544430553913116, 0.013061154633760452, 0.024543175473809242, 0.03447460010647774, 0.009665064513683319, 0.038336820900440216, 0.0270355436950922, 0.015648651868104935, 0.019225487485527992, -0.04889609292149544, -0.04893414303660393, 0.020110182464122772, -0.02408655732870102, -0.0016599937807768583, 0.01651432178914547, 0.028652729466557503, -0.004723133984953165, 0.029413757845759392, 0.006492525804787874, 0.05616391450166702, 0.008590111508965492, 0.019472820684313774, 0.03468388319015503, 0.05167384818196297, 0.006877796724438667, -0.045090947300195694, -0.04261760413646698, -0.00257798470556736, 0.04132385551929474, 0.008899278938770294, 0.029413757845759392, -0.04143800958991051, -0.008533033542335033, -0.03630106896162033, -0.015477420762181282, -0.05646832659840584, -0.025113945826888084, 0.013308488763868809, 0.051179178059101105, -0.05646832659840584, -0.04463433101773262, -0.017665378749370575, -0.022145934402942657, -0.04250345006585121, -0.053994983434677124, 0.010492682456970215, 0.038812462240457535, 0.05692494288086891, -0.06636170297861099, 0.053195904940366745, 0.030802635475993156, 0.005370008759200573, 0.04166632145643234, -0.023420657962560654, -0.05220656841993332, 0.03529270365834236, -0.050494253635406494, -0.006083473097532988, 0.038774412125349045, 0.034265317022800446, 0.002770619932562113, -0.06259460747241974, -0.020928287878632545, -0.027929753065109253, 0.03464582934975624, 0.016780681908130646, 0.01059732399880886, -0.06655196100473404, -0.03249592334032059, 0.03017478622496128, -0.06971022486686707, -0.028538575395941734, -0.010302425362169743, -0.023306503891944885, 0.02167029120028019, -0.013232385739684105, 0.020680954679846764, -0.07123228162527084, -0.022050805389881134, 0.016942400485277176, -0.024543175473809242, 0.040905289351940155, 0.05125528201460838, -0.017151683568954468, -0.06624754518270493, -0.013327514752745628, -0.0020131587516516447, -0.0228879377245903, -0.007510401774197817, -0.009512858465313911, 0.06499184668064117, 0.05410913750529289, 0.02812000922858715, -0.017418043687939644, 0.053195904940366745, 0.04528120532631874, 0.015515471808612347, -0.018921075388789177, -0.014392955228686333, -0.01873081736266613, -0.033009618520736694, 0.020281413570046425, 0.04193267971277237, 0.015515471808612347, -0.05018984153866768, -0.0468793660402298, -0.015772318467497826, 0.001795551972463727, -0.0071061053313314915, -0.024790508672595024, -0.004254626110196114, -0.004932417068630457, 0.060806192457675934, -0.004454395733773708, -0.017379991710186005, -0.07743466645479202, 0.00805739127099514, -0.05566924810409546, -0.013983901590108871, 0.06845452636480331, 0.012794794514775276, 0.05361447110772133, -0.05167384818196297, 0.0116247134283185, -0.0009489076328463852, 0.012908948585391045, -0.01873081736266613, -0.012994564138352871, 0.02891908958554268, -0.011177608743309975, -0.006197627168148756, -0.010169245302677155, 0.017294377088546753, 0.015772318467497826, 0.061491116881370544, -0.024257788434624672, -0.01144396886229515, 0.04657495394349098, 0.005274880211800337, 0.024752456694841385, 0.04029646888375282, -0.06510600447654724, 0.03165879100561142, -0.006040665321052074, -0.0439874567091465, 0.023534812033176422, -0.013441668823361397, 0.02271670661866665, -0.09139954298734665, -0.06267070770263672, 0.03847000002861023, 0.04174242168664932, 0.015534497797489166, -0.012309638783335686, 0.010254861786961555, 0.05365252122282982, -0.01816955953836441, 0.030269915238022804, 0.0164001677185297, -0.020053105428814888, -0.026883337646722794, 0.02545640990138054, 0.029033243656158447, -0.0378611758351326, 0.07732051610946655, 0.05338616296648979, 0.01561060082167387, -0.04668910801410675, -0.09421534836292267, -0.00863767508417368, 0.007624555844813585, -0.003189185867086053, 0.027530211955308914, -0.035787373781204224, 0.05825674533843994, 0.017028016969561577, -0.01813150756061077, -0.03274326026439667, -0.060083214193582535, 0.02682626061141491, -0.046498853713274, 0.02170834317803383, -0.022088857367634773, -0.0674271434545517, 0.003108326578512788, -0.01464028935879469, 0.042960070073604584, -0.01691386289894581, 0.0073581961914896965, -0.031525611877441406, -0.07005269080400467, -0.03515952453017235, -0.03651035204529762, 0.02461927756667137, 0.04486263915896416, -0.055935606360435486, -0.03222956508398056, 0.03420823812484741, -0.027492159977555275, -0.040258415043354034, 0.020053105428814888, 0.011900586076080799, 0.009959963150322437, -0.007681633345782757, 0.0026945171412080526, -0.04592807963490486, 0.022773783653974533, 0.016628475859761238, -0.022336192429065704, -0.004138093441724777, -0.02083316072821617, 0.011872047558426857, -0.024562200531363487, 0.026940414682030678, 0.021175622940063477, -0.030916789546608925, 0.05426134541630745, 0.049771275371313095, -0.09824880212545395, -0.020281413570046425, -0.032286640256643295, 0.00863767508417368, 0.0059217545203864574, -0.05692494288086891, 0.014478570781648159, 0.00902294646948576, -0.07016684114933014, -0.01047365739941597, -0.052549030631780624, 0.012138407677412033, -0.025151997804641724, 0.042845916002988815, 0.0020155368838459253, 0.09223667532205582, -0.01688532344996929, 0.07073761522769928, 0.02465732954442501, -0.06575287878513336, 0.016742629930377007, 0.0021047198679298162, 0.009522370994091034, -0.021137570962309837, 0.028329292312264442, -0.06613339483737946, 0.037766046822071075, -0.00401918264105916, -0.04280786216259003, 0.08782270550727844, -0.01238574180752039, -0.037727996706962585, 0.07724440842866898, -0.03721430152654648, 0.00498473783954978, 0.058789465576410294, -0.015972089022397995, -0.01510641910135746, -0.00338419945910573, 0.030688481405377388, -0.04550951346755028, -0.024904662743210793, -0.004806371871381998, 0.05848505347967148, -0.031925152987241745, -0.0019441904732957482, 0.021613214164972305, -0.03824169188737869, -0.054489653557538986, 0.07408614456653595, 0.056049760431051254, 0.015772318467497826, 0.008609136566519737, -0.002903799992054701, 0.015639139339327812, 0.02119464799761772, -0.018483484163880348, 0.030479198321700096, -0.04737403616309166, -0.027244826778769493, 0.034455571323633194, -0.0068968222476542, 0.042160987854003906, -0.04874388501048088, 0.05152164027094841, 0.00015473258099518716, -0.007548453286290169, 0.027092620730400085, 0.00022949770209379494, -0.011501045897603035, -0.05376667529344559, 0.00029593906947411597, -0.08203889429569244, 0.05776207521557808, 0.024600252509117126, -0.009037215262651443, 0.00032997727976180613, -0.08386535942554474, -0.07671169191598892, 0.030441146343946457, -0.007167938631027937, -0.002649330999702215, 0.018026866018772125, 0.0058028437197208405, -0.014326364733278751, 0.007795787416398525, 0.007695902604609728, 0.007129887584596872, -0.020072130486369133, 0.004692217335104942, -0.029718169942498207, 0.040981393307447433, 0.007567478809505701, 0.04136190935969353, -0.04311227425932884, 0.08021242171525955, 0.009565179236233234, -0.006483012810349464, -0.007196477614343166, 0.01015022024512291, 0.028785910457372665, 0.014383441768586636, -0.00820008385926485, 0.04041062295436859, -0.0389266163110733, -0.0069348737597465515, -0.0003971618425566703, -0.02231716550886631, -0.032857414335012436, -0.0013472585706040263, -0.01937769167125225, 0.08386535942554474, 0.006654244381934404, -0.012452331371605396, -0.005141700152307749, 0.03690988942980766, -0.08143007010221481, 0.006116767879575491, -0.005964562296867371, 0.024885637685656548, 0.05015178769826889, -0.04257955402135849, 0.05897972360253334, -0.037518713623285294, 0.04383525252342224, 0.02087121084332466, 0.02224106341600418, 0.008185815066099167, 0.0056982021778821945, 0.07416224479675293, -0.013555822893977165, 0.02804390713572502, 0.016038678586483, 0.006021639332175255, 0.003724284004420042, 0.02163223922252655, -0.05437549948692322, 0.003671963233500719, 0.014954213052988052, 0.03373259678483009, -0.026046207174658775, -0.051217228174209595, -0.020414594560861588, 0.002381781814619899, -0.01508739311248064, 0.021289777010679245, 0.02711164578795433, 0.020110182464122772, 0.05627806857228279 ]
4,614
sklearn.utils._metadata_requests
set_transform_request
Request metadata passed to the ``transform`` method. Note that this method is only relevant if ``enable_metadata_routing=True`` (see :func:`sklearn.set_config`). Please see :ref:`User Guide <metadata_routing>` on how the routing mechanism works. The options for each parameter are: - ``True``: metadata is requested, and passed to ``transform`` if provided. The request is ignored if metadata is not provided. - ``False``: metadata is not requested and the meta-estimator will not pass it to ``transform``. - ``None``: metadata is not requested, and the meta-estimator will raise an error if the user provides it. - ``str``: metadata should be passed to the meta-estimator with this given alias instead of the original name. The default (``sklearn.utils.metadata_routing.UNCHANGED``) retains the existing request. This allows you to change the request for some parameters and not others. .. versionadded:: 1.3 .. note:: This method is only relevant if this estimator is used as a sub-estimator of a meta-estimator, e.g. used inside a :class:`~sklearn.pipeline.Pipeline`. Otherwise it has no effect. Parameters ---------- check_input : str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED Metadata routing for ``check_input`` parameter in ``transform``. metric : str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED Metadata routing for ``metric`` parameter in ``transform``. metric_missing : str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED Metadata routing for ``metric_missing`` parameter in ``transform``. metric_special : str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED Metadata routing for ``metric_special`` parameter in ``transform``. show_digits : str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED Metadata routing for ``show_digits`` parameter in ``transform``. x : str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED Metadata routing for ``x`` parameter in ``transform``. Returns ------- self : object The updated object.
def __get__(self, instance, owner): # we would want to have a method which accepts only the expected args def func(**kw): """Updates the request for provided parameters This docstring is overwritten below. See REQUESTER_DOC for expected functionality """ if not _routing_enabled(): raise RuntimeError( "This method is only available when metadata routing is enabled." " You can enable it using" " sklearn.set_config(enable_metadata_routing=True)." ) if self.validate_keys and (set(kw) - set(self.keys)): raise TypeError( f"Unexpected args: {set(kw) - set(self.keys)}. Accepted arguments" f" are: {set(self.keys)}" ) requests = instance._get_metadata_request() method_metadata_request = getattr(requests, self.name) for prop, alias in kw.items(): if alias is not UNCHANGED: method_metadata_request.add_request(param=prop, alias=alias) instance._metadata_request = requests return instance # Now we set the relevant attributes of the function so that it seems # like a normal method to the end user, with known expected arguments. func.__name__ = f"set_{self.name}_request" params = [ inspect.Parameter( name="self", kind=inspect.Parameter.POSITIONAL_OR_KEYWORD, annotation=owner, ) ] params.extend( [ inspect.Parameter( k, inspect.Parameter.KEYWORD_ONLY, default=UNCHANGED, annotation=Optional[Union[bool, None, str]], ) for k in self.keys ] ) func.__signature__ = inspect.Signature( params, return_annotation=owner, ) doc = REQUESTER_DOC.format(method=self.name) for metadata in self.keys: doc += REQUESTER_DOC_PARAM.format(metadata=metadata, method=self.name) doc += REQUESTER_DOC_RETURN func.__doc__ = doc return func
(self: optbinning.binning.continuous_binning.ContinuousOptimalBinning, *, check_input: Union[bool, NoneType, str] = '$UNCHANGED$', metric: Union[bool, NoneType, str] = '$UNCHANGED$', metric_missing: Union[bool, NoneType, str] = '$UNCHANGED$', metric_special: Union[bool, NoneType, str] = '$UNCHANGED$', show_digits: Union[bool, NoneType, str] = '$UNCHANGED$', x: Union[bool, NoneType, str] = '$UNCHANGED$') -> optbinning.binning.continuous_binning.ContinuousOptimalBinning
[ 0.04383525252342224, -0.05837089940905571, -0.01913035847246647, 0.004746916238218546, -0.002937095006927848, -0.01727535016834736, -0.01155812293291092, 0.00996947567909956, 0.05700104683637619, 0.010854171589016914, -0.021461008116602898, 0.006492525804787874, 0.05125528201460838, -0.0053414697758853436, -0.019919926300644875, 0.037480663508176804, 0.02996550314128399, 0.023820197209715843, 0.030117709189653397, -0.033694542944431305, 0.019206460565328598, -0.04276981204748154, -0.02876688353717327, 0.01496372651308775, 0.008471200242638588, 0.06548652052879333, 0.03795630484819412, -0.04531925916671753, 0.08995358645915985, -0.006511551793664694, -0.025151997804641724, -0.014174158684909344, 0.014716392382979393, 0.06289902329444885, 0.028938114643096924, -0.03154463693499565, -0.010759042575955391, 0.02275475673377514, -0.06259460747241974, -0.01528716366738081, -0.03721430152654648, -0.0266740545630455, 0.04862973093986511, -0.09665064513683319, 0.059474390000104904, 0.0319061279296875, -0.005303418729454279, 0.10509806126356125, -0.019206460565328598, -0.01768440380692482, 0.01319433469325304, -0.01121565978974104, 0.015077880583703518, -0.005084622651338577, -0.005855164490640163, 0.057343509048223495, 0.05563119426369667, 0.04406356066465378, 0.05951244384050369, 0.028062932193279266, 0.02718774974346161, 0.03468388319015503, 0.03241982311010361, -0.008385584689676762, -0.04345473647117615, -0.03871733322739601, -0.046422749757766724, -0.013869747519493103, 0.008651944808661938, 0.03169684484601021, 0.028709806501865387, -0.017979301512241364, 0.005455624312162399, 0.026693081483244896, 0.021575162187218666, -0.026407694444060326, -0.04048672690987587, -0.052434876561164856, 0.0530056469142437, -0.04170437157154083, 0.01711363159120083, -0.01719924807548523, -0.0270355436950922, -0.08104955404996872, -0.009070510044693947, -0.03213443607091904, -0.00847595650702715, -0.04927660524845123, 0.03938323259353638, 0.0029965504072606564, -0.08553962409496307, 0.05148359015583992, -0.016200397163629532, -0.0030250889249145985, 0.009546153247356415, -0.030631404370069504, 0.0018359816167503595, -0.05844700336456299, 0.002411509631201625, -0.026616977527737617, 0.000663521874230355, 0.0358634777367115, 0.06643780320882797, 0.0757223516702652, 0.03706209734082222, -0.050570353865623474, -0.016704579815268517, -0.008675727061927319, -0.011263224296271801, -0.0038313036784529686, 0.011482019908726215, -0.010854171589016914, -0.05955049395561218, 0.019082793965935707, 0.0013520149514079094, 0.0011082480195909739, -0.019729668274521828, -0.04334058240056038, -0.0508367158472538, -0.014973239041864872, -0.026807235553860664, 0.011044428683817387, -0.0254183579236269, -0.06362199783325195, 0.0007479484775103629, 0.004283164627850056, 0.009617500007152557, 0.013432156294584274, 0.04482458904385567, -0.07241187989711761, -0.031601715832948685, -0.006782668177038431, -0.03907882049679756, 0.09284549951553345, 0.0439874567091465, 0.01622893661260605, 0.04748819023370743, 0.020471671596169472, -0.011929124593734741, 0.05905582383275032, -0.003013197798281908, 0.020129207521677017, 0.036757685244083405, -0.02134685404598713, -0.0013710407074540854, -0.05072256177663803, 0.026883337646722794, -0.0001608267630217597, 0.025722770020365715, -0.0340750589966774, 0.025913026183843613, -0.01833127811551094, 0.002818184206262231, -0.01269015297293663, -0.0026968952734023333, 0.0019322993466630578, 0.023021116852760315, -0.004782589618116617, 0.011234685778617859, -0.018150534480810165, -0.004782589618116617, -0.005702958442270756, -0.012052791193127632, -0.09139954298734665, 0.03521660342812538, 0.021461008116602898, -0.0061357938684523106, -0.04859168082475662, -0.03827974200248718, 0.03555906563997269, -0.060882292687892914, -0.02775852009654045, -0.03382772579789162, 0.006839745212346315, 0.03533075749874115, 0.0393071323633194, 0.017142171040177345, 0.0055650221183896065, 0.008552059531211853, 0.02808195725083351, 0.0137936444953084, -0.0526251345872879, -0.08553962409496307, -0.035825423896312714, 0.006364102475345135, 0.07123228162527084, 0.006392640992999077, 0.0019370558438822627, -0.043644994497299194, 0.045623667538166046, 0.029432784765958786, -0.008371314965188503, 0.05369057133793831, 0.03439849615097046, -0.031278278678655624, -0.04802091047167778, -0.05905582383275032, 0.04878193885087967, 0.013765105977654457, 0.07690194994211197, 0.05837089940905571, 0.008989650756120682, 0.01881643384695053, 0.049048297107219696, 0.006107254885137081, 0.049923479557037354, 0.03645327314734459, -0.00015934037219267339, -0.05235877260565758, -0.013042128644883633, 0.01319433469325304, -0.026597952470183372, 0.018064917996525764, -0.008490226231515408, 0.003912162967026234, -0.01093978714197874, 0.01777002029120922, -0.01557254884392023, -0.01204327866435051, -0.022868910804390907, 0.09284549951553345, 0.04813506454229355, 0.03367551788687706, 0.019710643216967583, 0.025932051241397858, -0.031107047572731972, 0.0555170401930809, -0.051902156323194504, -0.03660547733306885, -0.07914698123931885, 0.0046827043406665325, 0.0007895672461017966, 0.018673740327358246, 0.04391135275363922, -0.034702908247709274, -0.01993895135819912, 0.036148861050605774, 0.038527075201272964, -0.013422642834484577, -0.006668513640761375, -0.00593126704916358, 0.049390759319067, 0.05007568746805191, 0.03312377259135246, -0.05502237379550934, -0.01699947752058506, -0.0045804413966834545, 0.0678076520562172, 0.042922016233205795, -0.001805064850486815, 0.04269370809197426, -0.025760820135474205, -0.051864102482795715, -0.0027944021858274937, -0.031088020652532578, -0.034017980098724365, -0.042160987854003906, 0.0002696300798561424, 0.042922016233205795, -0.015325214713811874, -0.03078361041843891, 0.012195484712719917, 0.0018966261995956302, 0.04143800958991051, 0.018150534480810165, 0.011833995580673218, 0.04318837821483612, 0.013879260048270226, -0.05566924810409546, 0.004806371871381998, -0.009546153247356415, 0.045014847069978714, -0.0015708107966929674, 0.01760830171406269, -0.01825517602264881, -0.05235877260565758, -0.00006484350888058543, -0.02437194250524044, -0.04330253228545189, -0.012328664772212505, 0.05015178769826889, -0.023629941046237946, 0.04337863251566887, 0.006073960103094578, -0.014411980286240578, -0.03065042942762375, -0.004639896564185619, 0.05365252122282982, 0.012233535759150982, -0.02087121084332466, 0.011044428683817387, 0.007710171863436699, -0.005874190013855696, -0.04250345006585121, 0.032210540026426315, -0.0034674368798732758, -0.07313485443592072, 0.0012735339114442468, 0.0017170709325000644, -0.011520071886479855, 0.02094731479883194, -0.0011498667299747467, -0.03302864357829094, -0.017779532819986343, 0.05285344272851944, -0.021518085151910782, 0.08104955404996872, -0.00801458302885294, -0.011691302992403507, 0.0057505229488015175, 0.0038645986933261156, 0.04528120532631874, -0.033504288643598557, -0.04452017694711685, -0.001132624689489603, -0.0026802478823810816, -0.013983901590108871, 0.018179072067141533, 0.040182314813137054, 0.10410872101783752, -0.014392955228686333, 0.04737403616309166, -0.03436044603586197, -0.007353439461439848, -0.014012440107762814, -0.012243049219250679, -0.0035554307978600264, -0.004066747147589922, -0.038336820900440216, 0.0009483130997978151, -0.0313543826341629, -0.0038978937081992626, 0.022659629583358765, 0.02477148361504078, -0.0861484482884407, 0.031202174723148346, -0.0040929075330495834, -0.023496760055422783, 0.01462126336991787, -0.012423792853951454, 0.03510244935750961, -0.017475120723247528, -0.006211896426975727, -0.01272820495069027, -0.0364152230322361, -0.01121565978974104, 0.051940206438302994, -0.0023294612765312195, 0.07914698123931885, -0.02336358092725277, 0.021461008116602898, -0.038165587931871414, 0.05213046446442604, 0.049048297107219696, 0.08439808338880539, -0.006663757376372814, -0.0137936444953084, -0.04592807963490486, -0.007519914768636227, -0.07092787325382233, 0.02844344638288021, -0.048477526754140854, -0.0036362900864332914, 0.006192870903760195, 0.010863684117794037, -0.0009084779885597527, -0.0254183579236269, 0.0036600723396986723, 0.02581789717078209, -0.056544430553913116, 0.0034436548594385386, -0.0984010100364685, -0.05437549948692322, 0.02397240325808525, 0.019158896058797836, 0.0021867682226002216, -0.03999205678701401, -0.017893686890602112, -0.05072256177663803, 0.02876688353717327, 0.032210540026426315, 0.022145934402942657, -0.005065597128123045, 0.011367865838110447, 0.010359502397477627, -0.0457758754491806, 0.025722770020365715, 0.01615283265709877, 0.038450974971055984, -0.01773196831345558, 0.021898599341511726, -0.05277733877301216, -0.01427880022674799, 0.010654401034116745, -0.018987664952874184, -0.06986243277788162, 0.026217438280582428, -0.010321451351046562, 0.0072250161319971085, -0.04265565797686577, 0.054527703672647476, -0.056544430553913116, 0.013061154633760452, 0.024543175473809242, 0.03447460010647774, 0.009665064513683319, 0.038336820900440216, 0.0270355436950922, 0.015648651868104935, 0.019225487485527992, -0.04889609292149544, -0.04893414303660393, 0.020110182464122772, -0.02408655732870102, -0.0016599937807768583, 0.01651432178914547, 0.028652729466557503, -0.004723133984953165, 0.029413757845759392, 0.006492525804787874, 0.05616391450166702, 0.008590111508965492, 0.019472820684313774, 0.03468388319015503, 0.05167384818196297, 0.006877796724438667, -0.045090947300195694, -0.04261760413646698, -0.00257798470556736, 0.04132385551929474, 0.008899278938770294, 0.029413757845759392, -0.04143800958991051, -0.008533033542335033, -0.03630106896162033, -0.015477420762181282, -0.05646832659840584, -0.025113945826888084, 0.013308488763868809, 0.051179178059101105, -0.05646832659840584, -0.04463433101773262, -0.017665378749370575, -0.022145934402942657, -0.04250345006585121, -0.053994983434677124, 0.010492682456970215, 0.038812462240457535, 0.05692494288086891, -0.06636170297861099, 0.053195904940366745, 0.030802635475993156, 0.005370008759200573, 0.04166632145643234, -0.023420657962560654, -0.05220656841993332, 0.03529270365834236, -0.050494253635406494, -0.006083473097532988, 0.038774412125349045, 0.034265317022800446, 0.002770619932562113, -0.06259460747241974, -0.020928287878632545, -0.027929753065109253, 0.03464582934975624, 0.016780681908130646, 0.01059732399880886, -0.06655196100473404, -0.03249592334032059, 0.03017478622496128, -0.06971022486686707, -0.028538575395941734, -0.010302425362169743, -0.023306503891944885, 0.02167029120028019, -0.013232385739684105, 0.020680954679846764, -0.07123228162527084, -0.022050805389881134, 0.016942400485277176, -0.024543175473809242, 0.040905289351940155, 0.05125528201460838, -0.017151683568954468, -0.06624754518270493, -0.013327514752745628, -0.0020131587516516447, -0.0228879377245903, -0.007510401774197817, -0.009512858465313911, 0.06499184668064117, 0.05410913750529289, 0.02812000922858715, -0.017418043687939644, 0.053195904940366745, 0.04528120532631874, 0.015515471808612347, -0.018921075388789177, -0.014392955228686333, -0.01873081736266613, -0.033009618520736694, 0.020281413570046425, 0.04193267971277237, 0.015515471808612347, -0.05018984153866768, -0.0468793660402298, -0.015772318467497826, 0.001795551972463727, -0.0071061053313314915, -0.024790508672595024, -0.004254626110196114, -0.004932417068630457, 0.060806192457675934, -0.004454395733773708, -0.017379991710186005, -0.07743466645479202, 0.00805739127099514, -0.05566924810409546, -0.013983901590108871, 0.06845452636480331, 0.012794794514775276, 0.05361447110772133, -0.05167384818196297, 0.0116247134283185, -0.0009489076328463852, 0.012908948585391045, -0.01873081736266613, -0.012994564138352871, 0.02891908958554268, -0.011177608743309975, -0.006197627168148756, -0.010169245302677155, 0.017294377088546753, 0.015772318467497826, 0.061491116881370544, -0.024257788434624672, -0.01144396886229515, 0.04657495394349098, 0.005274880211800337, 0.024752456694841385, 0.04029646888375282, -0.06510600447654724, 0.03165879100561142, -0.006040665321052074, -0.0439874567091465, 0.023534812033176422, -0.013441668823361397, 0.02271670661866665, -0.09139954298734665, -0.06267070770263672, 0.03847000002861023, 0.04174242168664932, 0.015534497797489166, -0.012309638783335686, 0.010254861786961555, 0.05365252122282982, -0.01816955953836441, 0.030269915238022804, 0.0164001677185297, -0.020053105428814888, -0.026883337646722794, 0.02545640990138054, 0.029033243656158447, -0.0378611758351326, 0.07732051610946655, 0.05338616296648979, 0.01561060082167387, -0.04668910801410675, -0.09421534836292267, -0.00863767508417368, 0.007624555844813585, -0.003189185867086053, 0.027530211955308914, -0.035787373781204224, 0.05825674533843994, 0.017028016969561577, -0.01813150756061077, -0.03274326026439667, -0.060083214193582535, 0.02682626061141491, -0.046498853713274, 0.02170834317803383, -0.022088857367634773, -0.0674271434545517, 0.003108326578512788, -0.01464028935879469, 0.042960070073604584, -0.01691386289894581, 0.0073581961914896965, -0.031525611877441406, -0.07005269080400467, -0.03515952453017235, -0.03651035204529762, 0.02461927756667137, 0.04486263915896416, -0.055935606360435486, -0.03222956508398056, 0.03420823812484741, -0.027492159977555275, -0.040258415043354034, 0.020053105428814888, 0.011900586076080799, 0.009959963150322437, -0.007681633345782757, 0.0026945171412080526, -0.04592807963490486, 0.022773783653974533, 0.016628475859761238, -0.022336192429065704, -0.004138093441724777, -0.02083316072821617, 0.011872047558426857, -0.024562200531363487, 0.026940414682030678, 0.021175622940063477, -0.030916789546608925, 0.05426134541630745, 0.049771275371313095, -0.09824880212545395, -0.020281413570046425, -0.032286640256643295, 0.00863767508417368, 0.0059217545203864574, -0.05692494288086891, 0.014478570781648159, 0.00902294646948576, -0.07016684114933014, -0.01047365739941597, -0.052549030631780624, 0.012138407677412033, -0.025151997804641724, 0.042845916002988815, 0.0020155368838459253, 0.09223667532205582, -0.01688532344996929, 0.07073761522769928, 0.02465732954442501, -0.06575287878513336, 0.016742629930377007, 0.0021047198679298162, 0.009522370994091034, -0.021137570962309837, 0.028329292312264442, -0.06613339483737946, 0.037766046822071075, -0.00401918264105916, -0.04280786216259003, 0.08782270550727844, -0.01238574180752039, -0.037727996706962585, 0.07724440842866898, -0.03721430152654648, 0.00498473783954978, 0.058789465576410294, -0.015972089022397995, -0.01510641910135746, -0.00338419945910573, 0.030688481405377388, -0.04550951346755028, -0.024904662743210793, -0.004806371871381998, 0.05848505347967148, -0.031925152987241745, -0.0019441904732957482, 0.021613214164972305, -0.03824169188737869, -0.054489653557538986, 0.07408614456653595, 0.056049760431051254, 0.015772318467497826, 0.008609136566519737, -0.002903799992054701, 0.015639139339327812, 0.02119464799761772, -0.018483484163880348, 0.030479198321700096, -0.04737403616309166, -0.027244826778769493, 0.034455571323633194, -0.0068968222476542, 0.042160987854003906, -0.04874388501048088, 0.05152164027094841, 0.00015473258099518716, -0.007548453286290169, 0.027092620730400085, 0.00022949770209379494, -0.011501045897603035, -0.05376667529344559, 0.00029593906947411597, -0.08203889429569244, 0.05776207521557808, 0.024600252509117126, -0.009037215262651443, 0.00032997727976180613, -0.08386535942554474, -0.07671169191598892, 0.030441146343946457, -0.007167938631027937, -0.002649330999702215, 0.018026866018772125, 0.0058028437197208405, -0.014326364733278751, 0.007795787416398525, 0.007695902604609728, 0.007129887584596872, -0.020072130486369133, 0.004692217335104942, -0.029718169942498207, 0.040981393307447433, 0.007567478809505701, 0.04136190935969353, -0.04311227425932884, 0.08021242171525955, 0.009565179236233234, -0.006483012810349464, -0.007196477614343166, 0.01015022024512291, 0.028785910457372665, 0.014383441768586636, -0.00820008385926485, 0.04041062295436859, -0.0389266163110733, -0.0069348737597465515, -0.0003971618425566703, -0.02231716550886631, -0.032857414335012436, -0.0013472585706040263, -0.01937769167125225, 0.08386535942554474, 0.006654244381934404, -0.012452331371605396, -0.005141700152307749, 0.03690988942980766, -0.08143007010221481, 0.006116767879575491, -0.005964562296867371, 0.024885637685656548, 0.05015178769826889, -0.04257955402135849, 0.05897972360253334, -0.037518713623285294, 0.04383525252342224, 0.02087121084332466, 0.02224106341600418, 0.008185815066099167, 0.0056982021778821945, 0.07416224479675293, -0.013555822893977165, 0.02804390713572502, 0.016038678586483, 0.006021639332175255, 0.003724284004420042, 0.02163223922252655, -0.05437549948692322, 0.003671963233500719, 0.014954213052988052, 0.03373259678483009, -0.026046207174658775, -0.051217228174209595, -0.020414594560861588, 0.002381781814619899, -0.01508739311248064, 0.021289777010679245, 0.02711164578795433, 0.020110182464122772, 0.05627806857228279 ]
4,615
optbinning.binning.continuous_binning
to_json
Save optimal bins and/or splits points and transformation depending on the target type. Parameters ---------- path: The path where the json is going to be saved.
def to_json(self, path): """ Save optimal bins and/or splits points and transformation depending on the target type. Parameters ---------- path: The path where the json is going to be saved. """ if path is None: raise ValueError('Specify the path for the json file.') table = self.binning_table opt_bin_dict = dict() opt_bin_dict['name'] = table.name opt_bin_dict['dtype'] = table.dtype opt_bin_dict['special_codes'] = table.special_codes if table.dtype == 'numerical': opt_bin_dict['splits'] = table.splits.tolist() elif table.dtype == 'categorical': opt_bin_dict['splits'] = [split.tolist() for split in table.splits] opt_bin_dict['n_records'] = table.n_records.tolist() opt_bin_dict['sums'] = table.sums.tolist() opt_bin_dict['stds'] = table.stds.tolist() opt_bin_dict['min_target'] = table.min_target.tolist() opt_bin_dict['max_target'] = table.max_target.tolist() opt_bin_dict['n_zeros'] = table.n_zeros.tolist() opt_bin_dict['min_x'] = table.min_x opt_bin_dict['max_x'] = table.max_x opt_bin_dict['categories'] = table.categories opt_bin_dict['cat_others'] = table.cat_others opt_bin_dict['user_splits'] = table.user_splits with open(path, "w") as write_file: json.dump(opt_bin_dict, write_file)
(self, path)
[ 0.004675684962421656, -0.0190308578312397, -0.013799195177853107, -0.009497200138866901, -0.028509829193353653, -0.02145528607070446, -0.08428993076086044, 0.030369166284799576, -0.04528031498193741, -0.061576854437589645, 0.004292880184948444, 0.031335290521383286, -0.040504373610019684, -0.0249005276709795, -0.028600972145795822, 0.026285916566848755, 0.04673862084746361, 0.0018752869218587875, 0.015248383395373821, 0.07291516661643982, 0.015503586269915104, -0.07626926153898239, 0.024918757379055023, 0.06985272467136383, 0.026231229305267334, -0.005395722109824419, 0.022366726770997047, -0.00142298499122262, 0.03135352209210396, -0.004208572208881378, -0.06646217405796051, -0.06992564350366592, 0.02553853578865528, 0.026522891595959663, 0.013990596868097782, -0.034981049597263336, 0.05031146481633186, 0.04188976064324379, -0.06030084192752838, -0.0025862096808850765, -0.029056692495942116, -0.011584396474063396, -0.08268579840660095, 0.02023395709693432, 0.04411367326974869, -0.01058181282132864, -0.07335265725851059, 0.0333404578268528, 0.00560535304248333, -0.06412888318300247, -0.04068666324019432, -0.07933169603347778, 0.028582744300365448, 0.0659153088927269, -0.05683736875653267, 0.005865113344043493, 0.02212975174188614, 0.004605048336088657, 0.009889119304716587, -0.017271779477596283, -0.02271307446062565, 0.0256296806037426, 0.030496766790747643, -0.03044208139181137, 0.016588199883699417, 0.020252186805009842, -0.11732050031423569, -0.011073990724980831, -0.008271314203739166, 0.04699382185935974, 0.03656695410609245, -0.04728548228740692, 0.07149332016706467, 0.06420180201530457, -0.030168648809194565, 0.03656695410609245, -0.05898836627602577, -0.03890024125576019, -0.0208719652146101, -0.01733558066189289, 0.02553853578865528, -0.04549906402826309, 0.028127023950219154, -0.03995750844478607, -0.007883951999247074, -0.02165580354630947, 0.05333744361996651, 0.037842970341444016, -0.015503586269915104, -0.03561905771493912, -0.02568436600267887, 0.019778238609433174, -0.015357756055891514, 0.031244147568941116, 0.03545499965548515, -0.04739485681056976, -0.02349691092967987, -0.0387544110417366, -0.0387544110417366, -0.02072613500058651, -0.02165580354630947, 0.007059099152684212, 0.003338147420436144, 0.055561356246471405, 0.04549906402826309, -0.04367618262767792, 0.003185481298714876, -0.0013352589448913932, -0.07262350618839264, -0.02028864435851574, -0.07947752624750137, 0.08392535150051117, 0.027124440297484398, -0.0892481580376625, 0.05446762591600418, -0.0007610520115122199, -0.003253839211538434, -0.004265537019819021, -0.0009627080289646983, 0.02267661690711975, 0.010663842782378197, 0.0208719652146101, 0.022749532014131546, 0.0578581839799881, -0.009743289090692997, 0.011201592162251472, 0.03503573685884476, 0.08035250753164291, 0.02150997333228588, -0.02296827733516693, 0.009118952788412571, -0.03673101216554642, -0.04214496538043022, 0.02291359007358551, 0.034288354218006134, -0.03999396786093712, -0.05319161340594292, 0.02048916183412075, 0.02005166932940483, 0.02916606515645981, 0.0688319131731987, -0.053082238882780075, 0.00560535304248333, -0.07404535263776779, 0.04276474192738533, 0.013899452984333038, 0.014163770712912083, 0.002222773153334856, -0.024189606308937073, -0.051186446100473404, -0.0017431281739845872, 0.0073325312696397305, -0.0673006996512413, -0.06595176458358765, 0.01696188934147358, -0.0325748510658741, -0.009469856508076191, -0.04626467078924179, 0.004880758933722973, -0.015767903998494148, -0.012313548475503922, 0.014737977646291256, 0.016925431787967682, -0.05377493426203728, -0.03835337609052658, 0.03567374497652054, 0.01123804971575737, 0.016241852194070816, -0.022549014538526535, -0.01748141087591648, -0.0018604759825393558, -0.01602310687303543, -0.0645299181342125, 0.06719132512807846, -0.008818177506327629, 0.049436479806900024, 0.04276474192738533, 0.016770487651228905, 0.0024198719765990973, 0.06846734136343002, 0.010837016627192497, -0.022166209295392036, -0.012951555661857128, 0.037879426032304764, 0.011547938920557499, -0.06777464598417282, 0.022585472092032433, -0.033522747457027435, 0.012350006029009819, 0.05362910404801369, 0.02023395709693432, 0.0022193551994860172, 0.027106212452054024, -0.007788251154124737, 0.032009758055210114, -0.05421242490410805, 0.018520452082157135, -0.007314302492886782, -0.042545996606349945, 0.01567676104605198, -0.019869381561875343, -0.03665809705853462, 0.041087694466114044, 0.004525297321379185, -0.006977069657295942, -0.040613748133182526, 0.0035546142607927322, -0.03297588229179382, 0.030861342325806618, 0.010262809693813324, 0.0012122145853936672, -0.057311318814754486, -0.009396941401064396, 0.016916317865252495, 0.0586237907409668, -0.026140086352825165, -0.019340747967362404, 0.02819993905723095, -0.014692405238747597, 0.008658675476908684, -0.008640446700155735, 0.01077321544289589, 0.016925431787967682, 0.03106185980141163, -0.016041336581110954, -0.015558273531496525, 0.030168648809194565, -0.03253839164972305, 0.04498865455389023, -0.03195507079362869, 0.0023856929037719965, -0.03406960889697075, -0.03926481679081917, -0.03290296718478203, -0.03441595658659935, 0.05607176199555397, -0.023715656250715256, -0.04666570574045181, 0.02659580670297146, -0.011174248531460762, 0.016004879027605057, -0.010508897714316845, -0.01529395580291748, -0.062014345079660416, -0.015840819105505943, 0.0052863494493067265, 0.08531074225902557, -0.024499494582414627, -0.014792663976550102, 0.0007621913100592792, 0.0651497021317482, -0.0025155730545520782, -0.010955503210425377, 0.04571780934929848, 0.018921485170722008, -0.09128978848457336, -0.0008220045710913837, -0.019978754222393036, -0.0034406844060868025, 0.002295688260346651, -0.03097071498632431, -0.03447064384818077, 0.0001696132094366476, 0.017244435846805573, -0.0029052135068923235, -0.050019800662994385, 0.0001434805162716657, 0.006475777830928564, -0.0009763796115294099, 0.025028130039572716, -0.07240475714206696, 0.020799050107598305, -0.06686320900917053, -0.029822301119565964, -0.0012361399130895734, 0.010016720741987228, 0.004149328451603651, -0.025301562622189522, 0.009943805634975433, 0.0008003578404895961, 0.03377794846892357, -0.012823954224586487, 0.017754841595888138, -0.02107248269021511, -0.023624513298273087, -0.01827436313033104, -0.03596540540456772, -0.02402554638683796, 0.026978610083460808, -0.03581957519054413, -0.00894577894359827, 0.05654570832848549, -0.03377794846892357, 0.0278171356767416, 0.033850863575935364, -0.008927550166845322, 0.03106185980141163, -0.0892481580376625, 0.06095707789063454, -0.006229689344763756, 0.01830170676112175, -0.014628604985773563, 0.09544594585895538, 0.006995298434048891, -0.04455116391181946, -0.005737511906772852, -0.00827587116509676, -0.056436337530612946, -0.001500457408837974, 0.04404075816273689, -0.003126237541437149, -0.031043631955981255, 0.06387368589639664, 0.030369166284799576, 0.010381296277046204, -0.00545952282845974, -0.009761517867445946, -0.003292575478553772, 0.013343474827706814, 0.07382660359144211, -0.08006084710359573, 0.03248370438814163, 0.015977535396814346, -0.04203559085726738, 0.04393138736486435, -0.049108363687992096, 0.048707328736782074, 0.034580014646053314, 0.008717919699847698, -0.034926362335681915, 0.003875896567478776, -0.017171520739793777, 0.09683133661746979, 0.05020209029316902, -0.004110592417418957, 0.022457869723439217, 0.03510865196585655, 0.0046164412051439285, -0.035218022763729095, 0.04469699412584305, 0.044004302471876144, 0.01862071081995964, 0.03157226741313934, 0.028291083872318268, -0.03554614260792732, 0.023916173726320267, 0.008777162991464138, 0.005172419361770153, -0.0022945490200072527, 0.051623936742544174, -0.039155442267656326, 0.06719132512807846, -0.014446317218244076, 0.08574823290109634, -0.032356105744838715, -0.04786880686879158, 0.047212567180395126, -0.06580593436956406, -0.002442657947540283, -0.028017651289701462, 0.028655659407377243, -0.021637575700879097, -0.024827612563967705, 0.024189606308937073, 0.07656092196702957, 0.011146905831992626, 0.033231087028980255, -0.016424139961600304, 0.07561302185058594, -0.031007172539830208, 0.012094803154468536, -0.057165488600730896, 0.012577866204082966, 0.03545499965548515, -0.005272677633911371, 0.0738995149731636, -0.014510117471218109, 0.015777017921209335, -0.027106212452054024, -0.020562076941132545, 0.00640742015093565, -0.01599576324224472, -0.030514996498823166, 0.03791588544845581, 0.056472793221473694, -0.026322374120354652, 0.022002151235938072, -0.048415668308734894, -0.012459378689527512, -0.0439678430557251, 0.0038827324751764536, 0.019304290413856506, 0.0234057679772377, 0.011958086863160133, 0.007232272997498512, 0.015685874968767166, 0.015348642133176327, 0.035272710025310516, -0.001072650426067412, 0.06194142997264862, -0.05957168713212013, -0.07991501688957214, 0.018702739849686623, 0.041197068989276886, -0.048525042831897736, -0.059389401227235794, 0.037405479699373245, 0.011657311581075191, 0.040358543395996094, -0.028309311717748642, -0.03283005207777023, 0.035072192549705505, -0.00824852753430605, 0.04265537112951279, -0.0270879827439785, 0.053082238882780075, -0.0490354485809803, -0.017709270119667053, -0.006430205889046192, 0.026176543906331062, 0.04520739987492561, 0.07583177089691162, 0.007027199026197195, 0.04469699412584305, 0.016661114990711212, -0.03534562513232231, -0.026085399091243744, 0.016925431787967682, -0.027798905968666077, 0.07816505432128906, 0.009597458876669407, -0.06894128769636154, -0.017290007323026657, -0.08946690708398819, 0.0058058700524270535, 0.03612946346402168, 0.020525619387626648, -0.02699683979153633, 0.03359566256403923, 0.05228017270565033, 0.03966584801673889, 0.027561932802200317, 0.0007029477274045348, -0.020416246727108955, 0.0021487188059836626, -0.02568436600267887, -0.03780651092529297, 0.013534877449274063, -0.011584396474063396, -0.014008825644850731, 0.057056114077568054, 0.011948972940444946, 0.04699382185935974, -0.08523782342672348, 0.0010453072609379888, -0.014892921783030033, 0.024062003940343857, -0.03195507079362869, 0.028418684378266335, 0.02296827733516693, 0.032884739339351654, 0.018547795712947845, 0.030496766790747643, 0.01579524762928486, 0.0025360805448144674, -0.042691826820373535, -0.018775654956698418, 0.01543978601694107, -0.00807079765945673, 0.021127168089151382, -0.01182137057185173, 0.030715512111783028, -0.03864503651857376, -0.024554181843996048, 0.03228319063782692, 0.06868608295917511, 0.007400888949632645, 0.020069899037480354, -0.0019561771769076586, -0.016715802252292633, -0.012997128069400787, -0.08472742140293121, -0.0193772055208683, 0.03955647721886635, 0.0380617156624794, 0.04564489424228668, -0.05403013527393341, -0.011711997911334038, 0.013607792556285858, -0.02572082355618477, -0.019213145598769188, -0.001749963965266943, -0.0049582310020923615, 0.019869381561875343, 0.011338308453559875, 0.06948815286159515, 0.010718529112637043, 0.014874693006277084, -0.001249811495654285, -0.006835796404629946, 0.00888653565198183, 0.049436479806900024, -0.09238351136445999, -0.005632696207612753, -0.023569826036691666, 0.02043447457253933, 0.01545801479369402, 0.02572082355618477, -0.11170603334903717, -0.0012213289737701416, -0.0446605384349823, -0.014747091569006443, -0.006275261286646128, 0.05665508285164833, -0.041926220059394836, 0.024298978969454765, 0.00638463394716382, 0.022694844752550125, -0.027780678123235703, 0.011301849968731403, -0.04772297292947769, 0.027215585112571716, 0.02253078483045101, -0.048998989164829254, -0.037879426032304764, 0.04626467078924179, 0.02189277857542038, -0.013780966401100159, 0.04232725128531456, 0.01029015239328146, 0.026486434042453766, 0.02349691092967987, 0.04024916887283325, 0.05712902918457985, 0.03233787417411804, 0.046045925468206406, 0.07054542005062103, 0.000001962621354323346, 0.05169685184955597, -0.05355618894100189, 0.009898233227431774, 0.017089491710066795, -0.0017818643245846033, -0.0578581839799881, 0.04761360213160515, 0.06092061847448349, 0.003871339373290539, 0.011584396474063396, 0.062014345079660416, -0.008284985087811947, 0.017636355012655258, 0.05082187056541443, 0.05406659469008446, 0.01873919740319252, 0.029257209971547127, -0.03190038353204727, 0.0006568061071448028, -0.05359264463186264, 0.03908252716064453, 0.0027981193270534277, -0.04425950348377228, 0.012377348728477955, -0.004343009553849697, 0.002323031658306718, -0.054175965487957, 0.05403013527393341, -0.014984066598117352, 0.08917524665594101, -0.03607477620244026, -0.0137353939935565, 0.041671015322208405, 0.058660250157117844, 0.012751039117574692, -0.07539428025484085, -0.014364287257194519, -0.023606283590197563, -0.009907348081469536, 0.0006830100319348276, -0.03383263573050499, -0.025739053264260292, -0.02078082226216793, 0.05596238747239113, -0.0329941101372242, -0.004042234271764755, 0.012896869331598282, 0.03751485049724579, -0.040941864252090454, 0.036767471581697464, 0.04907190427184105, 0.023314623162150383, -0.030223336070775986, 0.05891545116901398, -0.00003154435398755595, -0.04622821509838104, 0.03270244970917702, 0.02504635788500309, -0.033960238099098206, -0.02451772429049015, 0.02072613500058651, -0.03126237541437149, -0.07448284327983856, -0.039155442267656326, -0.05388430505990982, 0.033468060195446014, -0.007651534862816334, -0.00807079765945673, -0.0019482020288705826, 0.02907492220401764, -0.033431604504585266, 0.00514507619664073, -0.018383735790848732, 0.008690576069056988, 0.04068666324019432, -0.052790578454732895, -0.0461188405752182, -0.010062292218208313, -0.005938028451055288, -0.03015042096376419, 0.028436914086341858, -0.02960355579853058, -0.007797365542501211, -0.006749209947884083, 0.020015211775898933, 0.009588344022631645, -0.056582167744636536, -0.06248829513788223, 0.0005838909419253469, 0.019541263580322266, 0.007191258016973734, -0.06212371960282326, -0.05818630009889603, -0.08377952128648758, 0.0534103587269783, -0.04305640608072281, 0.022549014538526535, -0.009014137089252472, -0.018338164314627647, -0.019249603152275085, 0.02183809131383896, 0.013990596868097782, 0.02422606386244297, 0.0008430815651081502, 0.012659895233809948, -0.02601248398423195, -0.022804217413067818, -0.022056836634874344, -0.014081740751862526, 0.028035880997776985, 0.029968133196234703, -0.04564489424228668, -0.02980407327413559, 0.03403315320611, -0.05935294181108475, -0.002946228254586458, 0.0504937507212162, 0.0014127312460914254, -0.007400888949632645, -0.013142958283424377, 0.027634847909212112, -0.005619024857878685, -0.03481699153780937, 0.03503573685884476, -0.02005166932940483, -0.028473371639847755, -0.00537749333307147, -0.02553853578865528, -0.02329639531672001, -0.00010125523840542883, 0.017554325982928276, 0.02364274114370346, -0.0016554021276533604, -0.04272828623652458, -0.030569681897759438, -0.0146559476852417, -0.0358378030359745, -0.015694988891482353, 0.0026545675937086344, 0.02451772429049015, -0.0015312184114009142, -0.0439678430557251, -0.010089635848999023, 0.02985876053571701, 0.008435373194515705, 0.04013979807496071, 0.03864503651857376, 0.054175965487957, -0.020069899037480354, 0.0069542839191854, -0.02267661690711975, 0.022166209295392036, -0.012659895233809948, -0.009870890527963638, -0.013990596868097782, 0.009200981818139553, 0.026194771751761436, -0.030861342325806618, 0.00029279995942488313, 0.005072161089628935, -0.013152073137462139, -0.0025907668750733137, 0.05359264463186264, -0.050894785672426224, -0.0021156789734959602, 0.020525619387626648, 0.021710490807890892, -0.008207513019442558, -0.01570410281419754, -0.01873919740319252, 0.0186845101416111, -0.03747839480638504, -0.003153580939397216, 0.07440992444753647, 0.02513750270009041, -0.006835796404629946, -0.03970230743288994, 0.06770172715187073, -0.07852963358163834, 0.03530916944146156, -0.012495836243033409, -0.04495219886302948, 0.00859487522393465, 0.0003645758260972798, 0.024335436522960663, 0.0003084653289988637, -0.018110303208231926, -0.01637856848537922, 0.015011409297585487, -0.02772599086165428, 0.02699683979153633, -0.010180779732763767, -0.027798905968666077, -0.014610376209020615, -0.022312039509415627, -0.013999711722135544, 0.027561932802200317, -0.0008664372144266963, 0.03354097530245781, -0.028819719329476357, 0.025356248021125793, 0.05300932377576828, -0.02980407327413559, 0.027343185618519783, -0.004646063316613436, -0.006352733820676804, 0.02849159948527813, 0.013261445797979832, 0.05384784936904907, 0.030897799879312515, -0.03620237857103348, 0.0012577865272760391, 0.05665508285164833, 0.04684799164533615, -0.005960814654827118, 0.03835337609052658, 0.047504227608442307, -0.03087957203388214, 0.048415668308734894, 0.035072192549705505, -0.0011068293824791908, -0.034689389169216156, -0.05505095049738884, 0.006872254423797131, -0.014236685819923878, -0.03503573685884476, 0.049582310020923615, 0.045316774398088455, 0.024554181843996048, -0.052061427384614944 ]
4,616
optbinning.binning.continuous_binning
transform
Transform given data to mean using bins from the fitted optimal binning. Parameters ---------- x : array-like, shape = (n_samples,) Training vector, where n_samples is the number of samples. metric : str (default="mean"): The metric used to transform the input vector. Supported metrics are "mean" to choose the mean, "indices" to assign the corresponding indices of the bins and "bins" to assign the corresponding bin interval. metric_special : float or str (default=0) The metric value to transform special codes in the input vector. Supported metrics are "empirical" to use the empirical mean, and any numerical value. metric_missing : float or str (default=0) The metric value to transform missing values in the input vector. Supported metrics are "empirical" to use the empirical mean, and any numerical value. show_digits : int, optional (default=2) The number of significant digits of the bin column. Applies when ``metric="bins"``. check_input : bool (default=False) Whether to check input arrays. Returns ------- x_new : numpy array, shape = (n_samples,) Transformed array. Notes ----- Transformation of data including categories not present during training return zero mean.
def transform(self, x, metric="mean", metric_special=0, metric_missing=0, show_digits=2, check_input=False): """Transform given data to mean using bins from the fitted optimal binning. Parameters ---------- x : array-like, shape = (n_samples,) Training vector, where n_samples is the number of samples. metric : str (default="mean"): The metric used to transform the input vector. Supported metrics are "mean" to choose the mean, "indices" to assign the corresponding indices of the bins and "bins" to assign the corresponding bin interval. metric_special : float or str (default=0) The metric value to transform special codes in the input vector. Supported metrics are "empirical" to use the empirical mean, and any numerical value. metric_missing : float or str (default=0) The metric value to transform missing values in the input vector. Supported metrics are "empirical" to use the empirical mean, and any numerical value. show_digits : int, optional (default=2) The number of significant digits of the bin column. Applies when ``metric="bins"``. check_input : bool (default=False) Whether to check input arrays. Returns ------- x_new : numpy array, shape = (n_samples,) Transformed array. Notes ----- Transformation of data including categories not present during training return zero mean. """ self._check_is_fitted() return transform_continuous_target(self._splits_optimal, self.dtype, x, self._n_records, self._sums, self.special_codes, self._categories, self._cat_others, self.cat_unknown, metric, metric_special, metric_missing, self.user_splits, show_digits, check_input)
(self, x, metric='mean', metric_special=0, metric_missing=0, show_digits=2, check_input=False)
[ 0.0001719393185339868, -0.005951940547674894, 0.03496483713388443, 0.014135296456515789, 0.033255286514759064, -0.02620113454759121, -0.02528337389230728, -0.00371377682313323, 0.020298680290579796, -0.003850990906357765, -0.02181028574705124, 0.024833492934703827, 0.031311795115470886, -0.05168245732784271, -0.025823233649134636, 0.02501344494521618, 0.006649257615208626, 0.01844516582787037, 0.04052538052201271, 0.05326604098081589, 0.0075040338560938835, -0.025949200615286827, 0.003484336892142892, 0.01619575545191765, 0.0038532402832061052, 0.04369255155324936, -0.017761345952749252, -0.028630496934056282, -0.029314318671822548, -0.04239689186215401, -0.03278740867972374, -0.031095851212739944, 0.07252099364995956, -0.030178092420101166, 0.037826087325811386, -0.06593472510576248, -0.008961651474237442, 0.014081310480833054, -0.010617217980325222, 0.030969884246587753, 0.014324246905744076, -0.06838208436965942, -0.03303934261202812, 0.0571170337498188, 0.048767220228910446, 0.05772887170314789, 0.024905472993850708, 0.10732387751340866, -0.023681795224547386, -0.04732759669423103, -0.05582137405872345, -0.04891118407249451, 0.05323005095124245, 0.03316530957818031, 0.0023776269517838955, 0.056361231952905655, 0.0390857569873333, 0.006824711803346872, 0.034514956176280975, -0.009960389696061611, 0.029782196506857872, 0.06024821102619171, 0.007953915745019913, -0.06154387444257736, 0.016510672867298126, -0.01687057875096798, -0.058448683470487595, 0.00010340259177610278, -0.02618313953280449, 0.06039217486977577, 0.0052051362581551075, -0.01862511970102787, 0.06024821102619171, 0.03750217333436012, -0.016312725841999054, 0.016231747344136238, -0.02283601649105549, 0.003761014435440302, 0.016735615208745003, 0.002420365810394287, 0.09026435017585754, 0.022476110607385635, 0.008043891750276089, -0.026615025475621223, -0.05603731423616409, -0.051898401230573654, -0.012920614331960678, 0.025949200615286827, -0.004021945875138044, -0.0011786911636590958, 0.008088880218565464, -0.023339884355664253, 0.04567203298211098, 0.0785314217209816, -0.012740661390125751, 0.02085653506219387, -0.07759566605091095, 0.02405969612300396, -0.0025058432947844267, -0.03075394034385681, -0.007193615194410086, 0.07831548154354095, -0.003970209509134293, 0.04376453161239624, 0.019380921497941017, 0.013487465679645538, 0.0006793219945393503, -0.016789600253105164, -0.032265543937683105, 0.03829396516084671, -0.05035080760717392, 0.021216440945863724, -0.07003764808177948, -0.02524738386273384, -0.04182104021310806, -0.011912878602743149, 0.011193066835403442, 0.013766393065452576, -0.10170935094356537, 0.03165370598435402, 0.0005255185533314943, -0.041173212230205536, 0.03368717432022095, -0.039949532598257065, -0.013406487181782722, -0.020262690261006355, 0.06197575852274895, 0.011193066835403442, -0.0029489772859960794, 0.016231747344136238, -0.04038141667842865, -0.03735820949077606, -0.01974082738161087, 0.03064597025513649, -0.0017747849924489856, -0.07025358825922012, 0.025589294731616974, 0.02206221967935562, -0.01703253760933876, -0.0006067784852348268, 0.08097878098487854, 0.004881220869719982, 0.01696055568754673, -0.003009711392223835, 0.07536425441503525, -0.033327266573905945, 0.06802217662334442, 0.04376453161239624, -0.014090307988226414, -0.06453108787536621, -0.03707028552889824, 0.022566087543964386, 0.04498821124434471, -0.05063873156905174, 0.038797833025455475, 0.08083482086658478, 0.006734735332429409, -0.04052538052201271, -0.0341370552778244, -0.010212323628365993, 0.013406487181782722, 0.008687223307788372, -0.028810450807213783, 0.047579530626535416, -0.03417304530739784, 0.04477226734161377, -0.038761842995882034, 0.02630910649895668, 0.011921876110136509, -0.020334672182798386, -0.019326936453580856, -0.022512100636959076, -0.014945084229111671, 0.051862411201000214, 0.045456089079380035, 0.07151325792074203, -0.01986679434776306, -0.012461734935641289, 0.022314153611660004, 0.08529765158891678, 0.00435485877096653, 0.009699458256363869, 0.01251571998000145, -0.07975509762763977, -0.09357547760009766, -0.05938443914055824, 0.0305200032889843, 0.009897406212985516, -0.04793943837285042, -0.008390301838517189, 0.05542547628283501, -0.003025457262992859, 0.010554234497249126, -0.028972407802939415, -0.013424482196569443, -0.015574919059872627, -0.08565755188465118, 0.03363318741321564, 0.026884954422712326, 0.007364570163190365, -0.030969884246587753, -0.016789600253105164, 0.0528341569006443, 0.03419104218482971, -0.009438526816666126, -0.02290799655020237, -0.016789600253105164, 0.033453233540058136, -0.027712738141417503, -0.04603193700313568, 0.06938982009887695, -0.010761179961264133, -0.053086090832948685, 0.03649443760514259, 0.009573491290211678, 0.021486369892954826, 0.03138377517461777, -0.014594175852835178, -0.015565921552479267, 0.007472542114555836, 0.004217644687741995, -0.04901915416121483, 0.022764034569263458, 0.05366193875670433, 0.03912174701690674, 0.03503681719303131, 0.07064948976039886, -0.04585198312997818, 0.06215571239590645, 0.0030884407460689545, 0.018805071711540222, -0.05258222296833992, -0.015556923113763332, 0.048515286296606064, 0.012353762984275818, -0.0012832887005060911, 0.05009887367486954, -0.01139101479202509, -0.00659077288582921, 0.03386712446808815, -0.014450213871896267, -0.022386133670806885, -0.010878149420022964, -0.04156910628080368, -0.0228000245988369, -0.00573599711060524, 0.012290779501199722, 0.04365656152367592, -0.010302300564944744, 0.01263268943876028, -0.035684648901224136, 0.006545784883201122, -0.0012596698943525553, -0.039913542568683624, -0.004782246891409159, -0.028738468885421753, -0.07230505347251892, -0.01660964824259281, -0.024797502905130386, 0.012461734935641289, -0.0005955314263701439, 0.01970483735203743, 0.02531936578452587, 0.022476110607385635, -0.05107061564922333, -0.012371757999062538, -0.016294730827212334, 0.03599056974053383, 0.08270632475614548, 0.029008397832512856, -0.09623878449201584, 0.00426713190972805, 0.0026498057413846254, -0.016438692808151245, -0.006959676276892424, 0.0572969876229763, 0.01986679434776306, -0.011301038786768913, 0.019308939576148987, -0.01862511970102787, -0.011004116386175156, 0.02841455489397049, 0.009960389696061611, -0.03858188912272453, -0.04603193700313568, -0.04358457773923874, -0.01264168694615364, 0.013136557303369045, -0.028216606006026268, -0.010014375671744347, -0.06226368620991707, -0.009209087118506432, -0.010068361647427082, 0.003304384183138609, -0.01869709976017475, -0.02393372915685177, -0.07903528958559036, -0.051862411201000214, 0.034532949328422546, -0.03386712446808815, -0.012794647365808487, -0.003958962392061949, -0.04398047551512718, -0.006941680796444416, 0.0016645637806504965, 0.011193066835403442, 0.014585178345441818, -0.05477764457464218, 0.002856751438230276, 0.008174357935786247, 0.051970381289720535, 0.011382017284631729, 0.05679311975836754, -0.04491623118519783, -0.011328031308948994, -0.05153849348425865, 0.06089604273438454, 0.0639912337064743, 0.04898316413164139, 0.04038141667842865, -0.017770344391465187, 0.03692632541060448, -0.006631262134760618, -0.02942229062318802, -0.042072974145412445, 0.04916311800479889, 0.026039177551865578, 0.021054482087492943, -0.029926158487796783, -0.05672113597393036, 0.036728374660015106, 0.024923469871282578, 0.030430026352405548, -0.01304658129811287, -0.11236255615949631, -0.04448434337973595, -0.0067212386056780815, 0.01814824528992176, -0.014963079243898392, -0.0109321353957057, -0.05794481560587883, 0.08457783609628677, 0.017059529200196266, 0.022260166704654694, -0.009690460748970509, -0.03746618330478668, -0.041029248386621475, -0.003324628807604313, -0.019075002521276474, 0.015556923113763332, 0.013640426099300385, -0.04344061762094498, 0.03615252673625946, -0.03850990906357765, 0.053194060921669006, -0.059492409229278564, 0.03361519053578377, -0.05682910978794098, 0.0009059500880539417, -0.026884954422712326, 0.05873660743236542, -0.03255346789956093, -0.012983597815036774, 0.006325342692434788, 0.0346229262650013, -0.009744446724653244, -0.002133565954864025, -0.0039882049895823, 0.03282339870929718, -0.001565589802339673, 0.047471560537815094, -0.06273156404495239, -0.06298349797725677, 0.04056137055158615, 0.023303894326090813, 0.00936654582619667, -0.02845054492354393, -0.010302300564944744, -0.04034542664885521, 0.02389773726463318, 0.06453108787536621, 0.07881934940814972, -0.04480825737118721, 0.01538596861064434, 0.037574153393507004, -0.011552972719073296, 0.014765131287276745, -0.00115957111120224, -0.018841063603758812, -0.023339884355664253, -0.027604766190052032, 0.02742481417953968, -0.010185331106185913, -0.03951764479279518, -0.05132255330681801, -0.027676748111844063, 0.04567203298211098, -0.01961486041545868, -0.015322985127568245, -0.05366193875670433, -0.026866959407925606, 0.0006174631998874247, 0.015358975157141685, -0.033345263451337814, -0.05150250345468521, -0.029926158487796783, -0.030034130439162254, -0.04927108809351921, -0.02413167618215084, -0.005151150282472372, -0.0004470703424885869, 0.06442312151193619, 0.03321929648518562, 0.016276733949780464, -0.006608768366277218, 0.018949033692479134, 0.021378397941589355, -0.02722686529159546, -0.02936830371618271, 0.0390857569873333, -0.000003782700105148251, -0.014513197354972363, -0.0021200694609433413, -0.006905690301209688, 0.0207485631108284, -0.08141066879034042, -0.014666156843304634, -0.10847557336091995, -0.02508542686700821, -0.01972283236682415, -0.019416911527514458, -0.07723575830459595, -0.0500628799200058, -0.01371240708976984, -0.01809425838291645, -0.011229057796299458, -0.0285585168749094, 0.013433479703962803, 0.006523290649056435, 0.021252430975437164, -0.021432382985949516, -0.04300872981548309, 0.058664627373218536, 0.023843752220273018, -0.01862511970102787, -0.01428825594484806, -0.06956976652145386, 0.02200823277235031, -0.10206925123929977, -0.015322985127568245, 0.04937906190752983, -0.02281802147626877, 0.011139080859720707, -0.02306995540857315, 0.01318154577165842, -0.03059198334813118, -0.0017084273276850581, -0.022134199738502502, 0.046607788652181625, 0.04927108809351921, -0.013586440123617649, 0.0025170904118567705, 0.002726285718381405, -0.01418028399348259, -0.013298515230417252, -0.021000497043132782, -0.011085094884037971, 0.009096615947782993, 0.05168245732784271, 0.03707028552889824, 0.010428267531096935, -0.012452736496925354, 0.02733483724296093, -0.013829376548528671, 0.021414387971162796, 0.031239813193678856, -0.016681628301739693, -0.005241126753389835, 0.048515286296606064, 0.002027843613177538, 0.012317772023379803, -0.017428433522582054, 0.06388325989246368, 0.0007085643010213971, -0.015745874494314194, 0.06694246083498001, -0.003913974389433861, -0.0528341569006443, 0.032337527722120285, 0.030861912295222282, -0.0007282466976903379, 0.07601208239793777, 0.027820710092782974, -0.00575849087908864, -0.03865387290716171, 0.02504943683743477, 0.016564659774303436, 0.006775224581360817, 0.03411905840039253, 0.010653208009898663, 0.03746618330478668, -0.008264334872364998, -0.0651429295539856, -0.03608054667711258, 0.017392441630363464, 0.010104352608323097, -0.04635585471987724, 0.011229057796299458, -0.03825797513127327, -0.005119658540934324, -0.06161585450172424, -0.018895048648118973, 0.05287014693021774, 0.007612005341798067, 0.011292041279375553, -0.04189302399754524, -0.04333264380693436, 0.014216274954378605, 0.00928556639701128, -0.03176167607307434, 0.005870961584150791, -0.032247550785541534, -0.01606079190969467, -0.019128987565636635, 0.01848115772008896, 0.013334506191313267, -0.039805568754673004, -0.0036552920937538147, -0.04052538052201271, -0.003581061726436019, -0.01957887038588524, -0.005794481839984655, 0.029926158487796783, 0.05348198488354683, 0.007324080914258957, 0.05895255133509636, 0.009056126698851585, -0.025751251727342606, 0.009951392188668251, -0.0032414007000625134, -0.026992926374077797, 0.01416228897869587, 0.018877053633332253, 0.004303122404962778, 0.04804740846157074, 0.05823273956775665, -0.0025193397887051105, 0.018319198861718178, 0.020532619208097458, -0.017230484634637833, -0.04452033340930939, -0.003864487400278449, -0.007715478073805571, 0.08436189591884613, 0.0804029330611229, -0.03276941180229187, 0.012830638326704502, 0.04833533242344856, -0.029746204614639282, 0.02310594543814659, -0.047579530626535416, 0.030412031337618828, 0.02177429385483265, -0.01158896367996931, -0.014027324505150318, 0.01540396362543106, -0.04502420127391815, 0.026705002412199974, 0.0028500030748546124, -0.04020146653056145, 0.047687504440546036, -0.00231689284555614, -0.030232077464461327, -0.011759918183088303, -0.04052538052201271, 0.06334339827299118, 0.006275855470448732, -0.01703253760933876, -0.04182104021310806, -0.012407748959958553, -0.06208373233675957, -0.004611291456967592, -0.04826335236430168, -0.0011831899173557758, 0.03613452985882759, -0.03260745480656624, -0.02729884721338749, -0.0006871949299238622, -0.024563563987612724, -0.00686520105227828, 0.007926923222839832, 0.007445549126714468, 0.0026633020024746656, 0.021108468994498253, 0.038977786898612976, -0.04743557050824165, -0.04898316413164139, -0.039949532598257065, 0.04901915416121483, -0.05441774055361748, 0.0660426914691925, 0.0060104248113930225, 0.007998904213309288, 0.039985522627830505, 0.03159971907734871, 0.02753278613090515, -0.058448683470487595, -0.029260331764817238, -0.02935030870139599, -0.01860712468624115, -0.04156910628080368, 0.02627311460673809, 0.013469470664858818, 0.03276941180229187, 0.0075445231050252914, 0.02184627577662468, -0.018103256821632385, -0.058664627373218536, 0.04142514616250992, -0.02172030881047249, 0.021450379863381386, -0.03300335258245468, -0.013559446670114994, 0.006370330695062876, -0.02393372915685177, -0.031095851212739944, 0.022044222801923752, 0.030376039445400238, -0.01844516582787037, 0.0006916937418282032, -0.05153849348425865, -0.04455632343888283, 0.050782691687345505, 0.015161027200520039, 0.0071081374771893024, 0.008961651474237442, -0.025607289746403694, 0.05107061564922333, 0.0168885737657547, -0.01871509663760662, 0.04952302202582359, -0.003990454133599997, 0.06992967426776886, -0.028180615976452827, 0.016438692808151245, -0.09537500888109207, 0.00796741247177124, 0.04059736058115959, 0.011238055303692818, 0.010266309604048729, -0.0035158286336809397, 0.04020146653056145, -0.055317506194114685, 0.03597257286310196, 0.07172920554876328, 0.035648658871650696, 0.03258946165442467, 0.03305733948945999, 0.0009756818180903792, -0.028126629069447517, -0.06928184628486633, 0.062011752277612686, 0.02850452996790409, 0.010806168429553509, -0.02080254815518856, 0.007872937247157097, -0.030070120468735695, -0.03523476794362068, -0.04254085198044777, 0.017194494605064392, 0.022350143641233444, -0.01979481242597103, -0.04480825737118721, -0.022278161719441414, 0.009312559850513935, -0.021468374878168106, 0.039949532598257065, -0.0038082520477473736, -0.05384189262986183, -0.019021015614271164, 0.027658753097057343, -0.03496483713388443, 0.011804906651377678, 0.03919373080134392, 0.039841558784246445, -0.004134416580200195, -0.020082738250494003, -0.04156910628080368, -0.0740685909986496, 0.00001651910861255601, 0.03617052361369133, 0.012812642380595207, 0.012011852115392685, -0.0168885737657547, 0.0029242336750030518, 0.08472179621458054, -0.045528069138526917, -0.0013507710536941886, 0.020532619208097458, -0.03289537876844406, 0.07082944363355637, -0.025949200615286827, -0.026974931359291077, -0.005879959091544151, 0.024275638163089752, -0.0274428091943264, -0.04466429725289345, -0.0294042956084013, 0.05690108984708786, 0.0218642707914114, 0.06489099562168121, 0.05790882557630539, -0.021108468994498253, 0.013946345075964928, 0.036782361567020416, 0.008970648981630802, -0.08817689120769501, 0.020406652241945267, 0.01484610978513956, 0.01747342199087143, 0.029062384739518166, -0.08364208042621613, 0.02177429385483265, -0.007072146981954575, -0.02206221967935562, 0.024635544046759605, 0.06334339827299118, -0.04164109006524086, 0.023159930482506752, -0.015035060234367847, 0.025913210585713387, 0.018805071711540222, -0.008606244809925556, 0.0740685909986496, 0.037718117237091064, 0.050854675471782684, -0.020568611100316048, -0.021702313795685768, 0.044232409447431564, 0.01954287849366665, -0.01752740703523159, 0.009465519338846207, 0.04380052164196968, -0.019039010629057884, -0.03192363306879997, -0.008394800126552582, 0.021234435960650444, 0.03415504842996597, -0.008511769585311413, -0.00520063703879714, -0.031257808208465576, 0.013100567273795605, -0.012380755506455898, 0.03847391903400421, 0.07392463088035583, 0.05672113597393036, -0.011022111400961876, 0.022584082558751106, 0.05366193875670433, -0.01950688846409321, -0.004278379026800394, -0.003740769810974598, 0.005861964076757431, 0.006640260107815266, -0.018256215378642082, 0.016294730827212334, 0.07252099364995956, 0.05020684376358986 ]
4,617
optbinning.binning.multidimensional.continuous_binning_2d
ContinuousOptimalBinning2D
Optimal binning of two numerical variables with respect to a continuous target. Parameters ---------- name_x : str, optional (default="") The name of variable x. name_y : str, optional (default="") The name of variable y. dtype_x : str, optional (default="numerical") The data type of variable x. Supported data types are "numerical" for continuous and ordinal variables and "categorical" for categorical and nominal variables. dtype_y : str, optional (default="numerical") The data type of variable y. Supported data types are "numerical" for continuous and ordinal variables and "categorical" for categorical and nominal variables. prebinning_method : str, optional (default="cart") The pre-binning method. Supported methods are "cart" for a CART decision tree, "mdlp" for Minimum Description Length Principle (MDLP), "quantile" to generate prebins with approximately same frequency and "uniform" to generate prebins with equal width. Method "cart" uses `sklearn.tree.DecisionTreeRegressor <https://scikit-learn.org/stable/modules/generated/sklearn.tree. DecisionTreeRegressor.html>`_. strategy: str, optional (default="grid") The strategy used to create the initial prebinning 2D after computing prebinning splits on the x and y axis. The strategy "grid" creates a prebinning 2D with n_prebins_x times n_prebins_y elements. The strategy "cart" (experimental) reduces the number of elements by pruning. The latter is recommended when the number of prebins is large. solver : str, optional (default="cp") The optimizer to solve the optimal binning problem. Supported solvers are "mip" to choose a mixed-integer programming solver, and "cp" to choose a constrained programming solver. divergence : str, optional (default="iv") The divergence measure in the objective function to be maximized. Supported divergences are "iv" (Information Value or Jeffrey's divergence), "js" (Jensen-Shannon), "hellinger" (Hellinger divergence) and "triangular" (triangular discrimination). max_n_prebins_x : int (default=5) The maximum number of bins on variable x after pre-binning (prebins). max_n_prebins_y : int (default=5) The maximum number of bins on variable y after pre-binning (prebins). min_prebin_size_x : float (default=0.05) The fraction of mininum number of records for each prebin on variable x. min_prebin_size_y : float (default=0.05) The fraction of mininum number of records for each prebin on variable y. min_n_bins : int or None, optional (default=None) The minimum number of bins. If None, then ``min_n_bins`` is a value in ``[0, max_n_prebins]``. max_n_bins : int or None, optional (default=None) The maximum number of bins. If None, then ``max_n_bins`` is a value in ``[0, max_n_prebins]``. min_bin_size : float or None, optional (default=None) The fraction of minimum number of records for each bin. If None, ``min_bin_size = min_prebin_size``. max_bin_size : float or None, optional (default=None) The fraction of maximum number of records for each bin. If None, ``max_bin_size = 1.0``. monotonic_trend_x : str or None, optional (default=None) The **mean** monotonic trend on the x axis. Supported trends are “ascending”, and "descending". If None, then the monotonic constraint is disabled. monotonic_trend_y : str or None, optional (default=None) The **mean** monotonic trend on the y axis. Supported trends are “ascending”, and "descending". If None, then the monotonic constraint is disabled. min_mean_diff_x : float, optional (default=0) The minimum mean difference between consecutives bins on the x axis. min_mean_diff_y : float, optional (default=0) The minimum mean difference between consecutives bins on the y axis. gamma : float, optional (default=0) Regularization strength to reduce the number of dominating bins. Larger values specify stronger regularization. special_codes_x : array-like or None, optional (default=None) List of special codes for the variable x. Use special codes to specify the data values that must be treated separately. special_codes_y : array-like or None, optional (default=None) List of special codes for the variable y. Use special codes to specify the data values that must be treated separately. split_digits : int or None, optional (default=None) The significant digits of the split points. If ``split_digits`` is set to 0, the split points are integers. If None, then all significant digits in the split points are considered. n_jobs : int or None, optional (default=None) Number of cores to run in parallel while binning variables. ``None`` means 1 core. ``-1`` means using all processors. time_limit : int (default=100) The maximum time in seconds to run the optimization solver. verbose : bool (default=False) Enable verbose output.
class ContinuousOptimalBinning2D(OptimalBinning2D): """Optimal binning of two numerical variables with respect to a continuous target. Parameters ---------- name_x : str, optional (default="") The name of variable x. name_y : str, optional (default="") The name of variable y. dtype_x : str, optional (default="numerical") The data type of variable x. Supported data types are "numerical" for continuous and ordinal variables and "categorical" for categorical and nominal variables. dtype_y : str, optional (default="numerical") The data type of variable y. Supported data types are "numerical" for continuous and ordinal variables and "categorical" for categorical and nominal variables. prebinning_method : str, optional (default="cart") The pre-binning method. Supported methods are "cart" for a CART decision tree, "mdlp" for Minimum Description Length Principle (MDLP), "quantile" to generate prebins with approximately same frequency and "uniform" to generate prebins with equal width. Method "cart" uses `sklearn.tree.DecisionTreeRegressor <https://scikit-learn.org/stable/modules/generated/sklearn.tree. DecisionTreeRegressor.html>`_. strategy: str, optional (default="grid") The strategy used to create the initial prebinning 2D after computing prebinning splits on the x and y axis. The strategy "grid" creates a prebinning 2D with n_prebins_x times n_prebins_y elements. The strategy "cart" (experimental) reduces the number of elements by pruning. The latter is recommended when the number of prebins is large. solver : str, optional (default="cp") The optimizer to solve the optimal binning problem. Supported solvers are "mip" to choose a mixed-integer programming solver, and "cp" to choose a constrained programming solver. divergence : str, optional (default="iv") The divergence measure in the objective function to be maximized. Supported divergences are "iv" (Information Value or Jeffrey's divergence), "js" (Jensen-Shannon), "hellinger" (Hellinger divergence) and "triangular" (triangular discrimination). max_n_prebins_x : int (default=5) The maximum number of bins on variable x after pre-binning (prebins). max_n_prebins_y : int (default=5) The maximum number of bins on variable y after pre-binning (prebins). min_prebin_size_x : float (default=0.05) The fraction of mininum number of records for each prebin on variable x. min_prebin_size_y : float (default=0.05) The fraction of mininum number of records for each prebin on variable y. min_n_bins : int or None, optional (default=None) The minimum number of bins. If None, then ``min_n_bins`` is a value in ``[0, max_n_prebins]``. max_n_bins : int or None, optional (default=None) The maximum number of bins. If None, then ``max_n_bins`` is a value in ``[0, max_n_prebins]``. min_bin_size : float or None, optional (default=None) The fraction of minimum number of records for each bin. If None, ``min_bin_size = min_prebin_size``. max_bin_size : float or None, optional (default=None) The fraction of maximum number of records for each bin. If None, ``max_bin_size = 1.0``. monotonic_trend_x : str or None, optional (default=None) The **mean** monotonic trend on the x axis. Supported trends are “ascending”, and "descending". If None, then the monotonic constraint is disabled. monotonic_trend_y : str or None, optional (default=None) The **mean** monotonic trend on the y axis. Supported trends are “ascending”, and "descending". If None, then the monotonic constraint is disabled. min_mean_diff_x : float, optional (default=0) The minimum mean difference between consecutives bins on the x axis. min_mean_diff_y : float, optional (default=0) The minimum mean difference between consecutives bins on the y axis. gamma : float, optional (default=0) Regularization strength to reduce the number of dominating bins. Larger values specify stronger regularization. special_codes_x : array-like or None, optional (default=None) List of special codes for the variable x. Use special codes to specify the data values that must be treated separately. special_codes_y : array-like or None, optional (default=None) List of special codes for the variable y. Use special codes to specify the data values that must be treated separately. split_digits : int or None, optional (default=None) The significant digits of the split points. If ``split_digits`` is set to 0, the split points are integers. If None, then all significant digits in the split points are considered. n_jobs : int or None, optional (default=None) Number of cores to run in parallel while binning variables. ``None`` means 1 core. ``-1`` means using all processors. time_limit : int (default=100) The maximum time in seconds to run the optimization solver. verbose : bool (default=False) Enable verbose output. """ def __init__(self, name_x="", name_y="", dtype_x="numerical", dtype_y="numerical", prebinning_method="cart", strategy="grid", solver="cp", max_n_prebins_x=5, max_n_prebins_y=5, min_prebin_size_x=0.05, min_prebin_size_y=0.05, min_n_bins=None, max_n_bins=None, min_bin_size=None, max_bin_size=None, monotonic_trend_x=None, monotonic_trend_y=None, min_mean_diff_x=0, min_mean_diff_y=0, gamma=0, special_codes_x=None, special_codes_y=None, split_digits=None, n_jobs=1, time_limit=100, verbose=False): self.name_x = name_x self.name_y = name_y self.dtype_x = dtype_x self.dtype_y = dtype_y self.prebinning_method = prebinning_method self.strategy = strategy self.solver = solver self.max_n_prebins_x = max_n_prebins_x self.max_n_prebins_y = max_n_prebins_y self.min_prebin_size_x = min_prebin_size_x self.min_prebin_size_y = min_prebin_size_y self.min_n_bins = min_n_bins self.max_n_bins = max_n_bins self.min_bin_size = min_bin_size self.max_bin_size = max_bin_size self.monotonic_trend_x = monotonic_trend_x self.monotonic_trend_y = monotonic_trend_y self.min_mean_diff_x = min_mean_diff_x self.min_mean_diff_y = min_mean_diff_y self.gamma = gamma self.special_codes_x = special_codes_x self.special_codes_y = special_codes_y self.split_digits = split_digits self.n_jobs = n_jobs self.time_limit = time_limit self.verbose = verbose # auxiliary self._categories_x = None self._categories_y = None self._n_records_special = None self._n_records_missing = None self._sum_special = None self._sum_missing = None self._std_special = None self._std_missing = None self._problem_type = "regression" # info self._binning_table = None self._n_prebins = None self._n_refinements = 0 self._n_samples = None self._optimizer = None self._solution = None self._splits_x_optimal = None self._splits_y_optimal = None self._status = None # timing self._time_total = None self._time_preprocessing = None self._time_prebinning = None self._time_solver = None self._time_optimizer = None self._time_postprocessing = None self._is_fitted = False def fit(self, x, y, z, check_input=False): """Fit the optimal binning 2D according to the given training data. Parameters ---------- x : array-like,
(name_x='', name_y='', dtype_x='numerical', dtype_y='numerical', prebinning_method='cart', strategy='grid', solver='cp', max_n_prebins_x=5, max_n_prebins_y=5, min_prebin_size_x=0.05, min_prebin_size_y=0.05, min_n_bins=None, max_n_bins=None, min_bin_size=None, max_bin_size=None, monotonic_trend_x=None, monotonic_trend_y=None, min_mean_diff_x=0, min_mean_diff_y=0, gamma=0, special_codes_x=None, special_codes_y=None, split_digits=None, n_jobs=1, time_limit=100, verbose=False)
[ 0.02360260672867298, -0.016556907445192337, -0.04131918027997017, 0.03184695169329643, -0.009594040922820568, -0.03590090945363045, -0.09347490221261978, -0.01759963296353817, -0.04572395980358124, -0.08295020461082458, -0.024031391367316246, 0.027383701875805855, -0.01571882888674736, -0.01094373594969511, -0.060614459216594696, 0.035355184227228165, 0.0025069243274629116, 0.0016810279339551926, -0.026935428380966187, 0.04950505495071411, -0.047361135482788086, -0.033971384167671204, 0.010739088989794254, 0.08154691010713577, 0.011343284510076046, 0.008429503068327904, 0.008760835975408554, -0.04237164929509163, -0.02286197990179062, -0.010758578777313232, -0.05819767713546753, -0.030307229608297348, -0.016703084111213684, -0.03266553953289986, 0.04471047222614288, -0.04061753302812576, 0.0863025113940239, 0.07862338423728943, -0.04587988182902336, 0.014549419283866882, 0.011538186110556126, -0.08848541229963303, 0.006300200708210468, -0.0038152027409523726, 0.04046161100268364, -0.0062709650956094265, -0.006982356775552034, 0.030229268595576286, -0.006860543042421341, -0.05277940630912781, -0.008341796696186066, -0.11124994605779648, 0.04404780641198158, 0.029508132487535477, -0.030170798301696777, 0.05749602988362312, 0.05574191361665726, 0.060536496341228485, 0.026682056486606598, -0.045840904116630554, -0.011255579069256783, 0.024148331955075264, 0.012678361497819424, -0.03447812795639038, -0.03348412737250328, -0.022959431633353233, -0.06338206678628922, 0.0023363851942121983, 0.011918244883418083, 0.023017901927232742, 0.030229268595576286, 0.00868774764239788, 0.06755296140909195, 0.016946710646152496, -0.027266761288046837, 0.0012498077703639865, -0.037148281931877136, -0.044398628175258636, -0.007264964282512665, -0.025785507634282112, 0.04595784470438957, 0.06677335500717163, 0.00034229629090987146, -0.06349900364875793, 0.008858286775648594, -0.05227266252040863, 0.026857467368245125, 0.07967585325241089, 0.040110789239406586, -0.046893373131752014, -0.003681207774206996, 0.012483459897339344, 0.07035955041646957, 0.06373288482427597, 0.03077499382197857, -0.02609734982252121, -0.025142330676317215, -0.027792995795607567, -0.009988716803491116, -0.0626414343714714, -0.013721086084842682, -0.021906962618231773, 0.016761554405093193, 0.08739396184682846, -0.004317074548453093, 0.008103041909635067, -0.010982716456055641, 0.001486126217059791, -0.042020827531814575, -0.027442172169685364, -0.053753916174173355, 0.021341746672987938, -0.021341746672987938, -0.03441965579986572, -0.04833564534783363, -0.010125148110091686, -0.06416167318820953, 0.019636355340480804, -0.01624506525695324, 0.04759501665830612, 0.007386778015643358, 0.006811817642301321, -0.03465354070067406, 0.021712059155106544, -0.010729343630373478, -0.005652152001857758, 0.04919321462512016, 0.0837298110127449, -0.028689544647932053, -0.06809868663549423, 0.03788891062140465, -0.030034366995096207, -0.04381392523646355, 0.041553061455488205, -0.0041538444347679615, -0.040773455053567886, 0.013974458910524845, 0.02681848779320717, 0.005320819094777107, -0.036875419318675995, 0.09963379800319672, -0.004336564801633358, -0.023544136434793472, -0.029936915263533592, 0.019129611551761627, 0.006134533789008856, 0.05827563628554344, -0.035550087690353394, 0.00028047585510648787, -0.002333949087187648, -0.050908349454402924, -0.04697133228182793, -0.025921938940882683, -0.040890395641326904, 0.02642868272960186, 0.006266092881560326, 0.0012510259402915835, -0.03907781094312668, -0.0057447305880486965, -0.0002509360492695123, -0.05936708673834801, -0.03301636502146721, -0.02009437419474125, -0.040968358516693115, -0.03354259952902794, 0.04092937707901001, -0.02089347317814827, -0.02253064699470997, -0.024733038619160652, 0.010778069496154785, 0.015465457923710346, -0.023563627153635025, -0.06069241836667061, 0.05476740375161171, -0.010768324136734009, 0.08879725635051727, 0.030482640489935875, -0.02023080550134182, -0.024499155580997467, 0.051181212067604065, 0.030755503103137016, -0.02991742640733719, -0.016790790483355522, -0.039915889501571655, -0.035101812332868576, 0.021244294941425323, 0.07024260610342026, -0.056131716817617416, 0.028026878833770752, 0.020484179258346558, -0.01610863395035267, -0.04167000204324722, 0.0230568815022707, -0.0065779355354607105, 0.009706109762191772, -0.017609376460313797, 0.02985895425081253, 0.02722778171300888, 0.04322921857237816, -0.006402524188160896, 0.011353029869496822, 0.01674206368625164, 0.060926299542188644, 0.012863518670201302, 0.008098169229924679, -0.013496949337422848, -0.010495461523532867, 0.010466226376593113, 0.02841668203473091, 0.019168591126799583, -0.017278043553233147, -0.056716423481702805, -0.0019417090807110071, 0.05316920951008797, 0.04159204289317131, -0.025921938940882683, 0.003527722554281354, -0.017024671658873558, -0.010339540429413319, -0.010953481309115887, 0.05492332577705383, 0.003057522000744939, 0.01875929720699787, -0.005199005361646414, 0.025804998353123665, -0.013896497897803783, 0.05780787393450737, 0.03367903083562851, 0.09604760259389877, -0.04428168758749962, 0.020523158833384514, -0.055663954466581345, -0.04790686070919037, -0.00850746314972639, 0.006972611881792545, -0.009238345548510551, -0.023037392646074295, 0.0186228659003973, -0.006850798148661852, -0.013380007818341255, -0.0187885332852602, -0.010992460884153843, 0.0034936147276312113, -0.045178234577178955, -0.04143612086772919, 0.011918244883418083, 0.07238652557134628, 0.058158695697784424, 0.004799456801265478, 0.008254091255366802, -0.01682977005839348, -0.03849310427904129, -0.03705083206295967, 0.00026113796047866344, 0.006046828348189592, -0.06930708140134811, -0.010875520296394825, 0.0041440995410084724, 0.030736012384295464, 0.011684362776577473, -0.0323147177696228, 0.005008975975215435, -0.0056862598285079, 0.054533522576093674, -0.005978612694889307, 0.011226342990994453, -0.018661847338080406, 0.00018942018505185843, 0.004894471261650324, 0.03576447814702988, -0.04552906006574631, 0.03319177404046059, -0.02939119003713131, 0.015368006192147732, -0.02122480608522892, 0.058431558310985565, 0.011109402403235435, -0.02841668203473091, 0.02426527440547943, 0.009998462162911892, 0.019694825634360313, -0.00888264924287796, 0.014120634645223618, -0.04338514059782028, -0.01809663139283657, -0.03788891062140465, -0.05523516982793808, -0.0286700539290905, 0.008692620322108269, 0.002638482954353094, -0.06498026102781296, -0.00004876351522398181, 0.048608507961034775, 0.04591886326670647, 0.061666928231716156, -0.0057447305880486965, 0.025921938940882683, -0.0468154102563858, -0.008478228002786636, -0.029819974675774574, 0.004994358401745558, -0.008215110749006271, 0.04014977067708969, -0.008531826548278332, 0.007640150375664234, 0.006636406295001507, 0.059756889939308167, -0.04802380129694939, 0.0120254410430789, 0.008059189654886723, 0.03284095227718353, 0.018145356327295303, 0.053481053560972214, -0.00779607193544507, 0.0046727703884243965, -0.06774786114692688, 0.024538135156035423, 0.010670873336493969, -0.006402524188160896, 0.07375083863735199, -0.03962353616952896, -0.006977484095841646, 0.023212803527712822, -0.03058009222149849, -0.02149766869843006, 0.033640049397945404, 0.05874340236186981, 0.030794484540820122, -0.023349234834313393, -0.03638816624879837, -0.007006719708442688, -0.016868749633431435, 0.029098838567733765, 0.05055752396583557, 0.011489461176097393, -0.03412730619311333, 0.023154333233833313, -0.0070944251492619514, 0.012931734323501587, -0.057573989033699036, 0.05219469964504242, 0.03623224422335625, 0.0068313078954815865, 0.025980409234762192, -0.007367287762463093, -0.05067446827888489, 0.027266761288046837, 0.00728445453569293, 0.028436172753572464, 0.08295020461082458, 0.02280350960791111, 0.025746528059244156, -0.016761554405093193, 0.05324716866016388, 0.042410630732774734, -0.03987690806388855, 0.007303944788873196, -0.028514131903648376, 0.050050780177116394, -0.00874621793627739, -0.028689544647932053, -0.003396163694560528, -0.03683643788099289, 0.047361135482788086, 0.036875419318675995, -0.008336924016475677, -0.04038365185260773, 0.017784789204597473, 0.020289277657866478, -0.05687234550714493, 0.011265323497354984, -0.0777268335223198, -0.050908349454402924, -0.0025069243274629116, -0.003464379347860813, 0.04108529910445213, -0.051571015268564224, 0.00022550746507477015, 0.005043083801865578, -0.0011243397602811456, 0.06837154924869537, -0.003347438294440508, -0.04104631766676903, 0.026331232860684395, -0.010086167603731155, -0.013175361789762974, -0.020601119846105576, -0.017024671658873558, 0.06505821645259857, -0.045178234577178955, 0.0227450393140316, 0.014500693418085575, 0.030502131208777428, -0.008142022415995598, -0.02194594219326973, -0.005554701201617718, 0.07484228909015656, 0.022959431633353233, -0.012415244244039059, -0.00591526972129941, -0.051960818469524384, -0.03646612539887428, 0.023641588166356087, 0.06704621762037277, -0.01235677395015955, -0.06848849356174469, 0.061277125030756, 0.013341028243303299, 0.002197517780587077, 0.04903729259967804, -0.040305692702531815, 0.027773505076766014, 0.026077860966324806, 0.0022852234542369843, -0.07160691916942596, 0.021419707685709, -0.03280197083950043, -0.017999181523919106, 0.0474390983581543, -0.024109352380037308, 0.03603734076023102, 0.020328257232904434, 0.02820228971540928, 0.01720982789993286, -0.018574140965938568, 0.0006352580385282636, -0.030131816864013672, -0.039058320224285126, -0.056521520018577576, 0.005569318775087595, -0.04712725430727005, -0.03631020337343216, -0.0889531821012497, -0.028241269290447235, -0.030502131208777428, -0.0036251733545213938, -0.028494643047451973, 0.026701545342803, 0.03995486721396446, -0.00911653134971857, -0.013165616430342197, 0.00672411173582077, 0.04533415660262108, -0.04330717772245407, -0.014656615443527699, -0.01100220624357462, -0.042683493345975876, -0.039058320224285126, -0.09035646915435791, -0.014773556031286716, 0.05044058337807655, 0.01452992856502533, 0.013623635284602642, 0.00728445453569293, -0.04646458849310875, -0.02169257029891014, -0.03508232161402702, -0.010631892830133438, -0.008297943510115147, -0.03208083659410477, 0.00733317993581295, 0.023310255259275436, -0.022257784381508827, 0.036154281347990036, -0.031535111367702484, -0.028455661609768867, 0.030287738889455795, 0.022686569020152092, 0.00345219811424613, 0.029683543369174004, -0.022199314087629318, -0.020873982459306717, -0.025278761982917786, -0.04701031371951103, 0.010066677816212177, 0.05944504588842392, -0.024167822673916817, 0.025610096752643585, 0.014958713203668594, -0.049660976976156235, -0.003169590374454856, -0.009496590122580528, 0.019392728805541992, 0.0316130705177784, 0.011655127629637718, -0.01384777296334505, 0.012152126990258694, 0.012522440403699875, -0.014091399498283863, -0.012892753817141056, -0.02194594219326973, 0.033386677503585815, 0.03907781094312668, 0.04521721601486206, -0.0011389573337510228, 0.0560147762298584, -0.003552085254341364, 0.0070359548553824425, 0.05940606817603111, -0.039584554731845856, 0.012483459897339344, 0.016498437151312828, -0.03751859441399574, -0.03533569723367691, 0.019597375765442848, -0.027637073770165443, -0.041747964918613434, 0.04178694635629654, -0.07343899458646774, -0.0012680798536166549, -0.029897935688495636, -0.0922275260090828, 0.04108529910445213, -0.007201621308922768, 0.023368725553154945, 0.038590554147958755, 0.01152844075113535, 0.011889009736478329, -0.040695495903491974, -0.0035325950011610985, 0.014617634937167168, 0.02681848779320717, 0.023894960060715675, -0.057184185832738876, 0.04934913292527199, 0.051843877881765366, 0.0002859574742615223, -0.0253762137144804, 0.03241216763854027, 0.0415140837430954, 0.00870236475020647, -0.02642868272960186, 0.02543468400835991, 0.06685131788253784, 0.051843877881765366, 0.02562958560883999, 0.01282453816384077, -0.023232294246554375, 0.04260553419589996, -0.020932452753186226, -0.009218854829668999, 0.060614459216594696, 0.05874340236186981, -0.025941429659724236, 0.005164897534996271, 0.0718018189072609, 0.026857467368245125, 0.06689029932022095, 0.010047187097370625, -0.010164128616452217, 0.04587988182902336, 0.035744987428188324, 0.037128791213035583, 0.0073429252952337265, 0.03794737905263901, -0.039116788655519485, 0.0006376943201757967, -0.00825896393507719, 0.028884446248412132, 0.033055342733860016, -0.04720521345734596, 0.004375545307993889, 0.010436991229653358, -0.03346463665366173, -0.05266246572136879, 0.033990874886512756, -0.018603377044200897, 0.03584244102239609, -0.03077499382197857, 0.01152844075113535, 0.033581580966711044, 0.011996205896139145, -0.05168795585632324, -0.029176799580454826, -0.031476639211177826, 0.0038882908411324024, 0.009910756722092628, -0.04042263329029083, -0.08427553623914719, -0.026584604755043983, -0.00031001566094346344, -0.01074883434921503, 0.012619891203939915, -0.05960096791386604, -0.012191107496619225, 0.05199979990720749, -0.07086629420518875, -0.0056862598285079, 0.00484330952167511, -0.027130329981446266, -0.0230568815022707, 0.051181212067604065, -0.01704416237771511, -0.07671334594488144, -0.003742114407941699, 0.04256655275821686, -0.06911217421293259, -0.0000179008929990232, 0.06638354808092117, -0.03553059697151184, 0.0024143459741026163, -0.03155460208654404, -0.0401887483894825, 0.05235062167048454, -0.001750461757183075, -0.03315279632806778, -0.001134693855419755, -0.015670103952288628, 0.009301688522100449, -0.035920400172472, -0.013399498537182808, -0.011148382909595966, 0.026448173448443413, -0.008341796696186066, -0.06564292311668396, -0.012191107496619225, -0.014948967844247818, -0.00756218982860446, 0.08521106839179993, -0.02136123739182949, -0.02009437419474125, 0.029566602781414986, 0.04817972332239151, 0.030736012384295464, -0.02761758491396904, -0.04159204289317131, 0.04802380129694939, -0.06190080940723419, 0.0316130705177784, -0.004404780454933643, -0.008463610894978046, 0.018311023712158203, 0.0375770665705204, -0.028358211740851402, 0.02952762134373188, -0.002070831600576639, 0.041747964918613434, 0.005272093694657087, 0.0037396783009171486, -0.005978612694889307, 0.0593281053006649, -0.0000655509575153701, 0.013828282244503498, 0.04061753302812576, -0.023972921073436737, -0.036017850041389465, 0.0329773835837841, 0.021439198404550552, 0.08458738029003143, 0.022569628432393074, -0.01776529848575592, 0.00860491394996643, -0.07601170241832733, -0.010778069496154785, 0.018525416031479836, 0.02233574539422989, -0.005925014615058899, 0.010524696670472622, 0.026389703154563904, -0.03445863723754883, -0.010972971096634865, 0.017278043553233147, 0.009657383896410465, -0.011937734670937061, -0.04977791756391525, -0.008692620322108269, 0.01671282947063446, -0.024499155580997467, 0.014451968483626842, 0.03237318992614746, -0.007177258841693401, -0.05897728353738785, -0.055585991591215134, -0.03268503025174141, -0.005267221014946699, -0.02424578368663788, -0.04989485815167427, -0.008833924308419228, -0.030697032809257507, -0.00962814874947071, 0.07838950306177139, 0.02676001563668251, -0.045646000653505325, 0.02036723680794239, 0.10228446125984192, 0.023700058460235596, -0.039720986038446426, -0.039194751530885696, -0.0062612202018499374, 0.014812536537647247, 0.0019331822404637933, 0.04007180780172348, 0.05235062167048454, 0.006280710455030203, 0.0038346927613019943, -0.013984204269945621, -0.0336010679602623, -0.013730831444263458, 0.048803411424160004, -0.06022465601563454, 0.03217828646302223, -0.04981689900159836, -0.04732215777039528, 0.04474945366382599, 0.00109814980532974, 0.0619397908449173, -0.059484027326107025, -0.016917476430535316, 0.061783868819475174, -0.018769042566418648, 0.023388216271996498, 0.05808073654770851, 0.03383495286107063, -0.046776432543992996, 0.008302816189825535, 0.06221265345811844, -0.04209878668189049, 0.02656511403620243, -0.03675847873091698, 0.019246552139520645, 0.030307229608297348, 0.03685592859983444, 0.009087296202778816, 0.009910756722092628, -0.0037372419610619545, 0.0013813665136694908, 0.06275837868452072, -0.09386470168828964, 0.021906962618231773, 0.004416962154209614, 0.05745704844594002, 0.025220291689038277, -0.022179825231432915, 0.020601119846105576, 0.02490844950079918, -0.029215779155492783, 0.06248551607131958, -0.018369494006037712, 0.0049797408282756805, 0.06837154924869537, -0.02299841120839119, -0.05063548684120178, -0.036485616117715836, -0.025220291689038277, 0.004889598581939936, 0.05944504588842392, 0.04599682241678238, -0.01192799024283886, 0.024479664862155914, -0.04989485815167427, 0.051181212067604065, 0.014032929204404354, -0.004994358401745558, 0.038454122841358185, 0.009779197163879871, -0.023349234834313393, 0.021244294941425323, 0.0015007437905296683, -0.011206853203475475, -0.08162487298250198, -0.02703287824988365, -0.029644563794136047, 0.0052428580820560455, 0.007932502776384354, -0.001586013357155025, 0.0276955459266901, 0.026409193873405457, 0.026214292272925377 ]
4,619
optbinning.binning.multidimensional.continuous_binning_2d
__init__
null
def __init__(self, name_x="", name_y="", dtype_x="numerical", dtype_y="numerical", prebinning_method="cart", strategy="grid", solver="cp", max_n_prebins_x=5, max_n_prebins_y=5, min_prebin_size_x=0.05, min_prebin_size_y=0.05, min_n_bins=None, max_n_bins=None, min_bin_size=None, max_bin_size=None, monotonic_trend_x=None, monotonic_trend_y=None, min_mean_diff_x=0, min_mean_diff_y=0, gamma=0, special_codes_x=None, special_codes_y=None, split_digits=None, n_jobs=1, time_limit=100, verbose=False): self.name_x = name_x self.name_y = name_y self.dtype_x = dtype_x self.dtype_y = dtype_y self.prebinning_method = prebinning_method self.strategy = strategy self.solver = solver self.max_n_prebins_x = max_n_prebins_x self.max_n_prebins_y = max_n_prebins_y self.min_prebin_size_x = min_prebin_size_x self.min_prebin_size_y = min_prebin_size_y self.min_n_bins = min_n_bins self.max_n_bins = max_n_bins self.min_bin_size = min_bin_size self.max_bin_size = max_bin_size self.monotonic_trend_x = monotonic_trend_x self.monotonic_trend_y = monotonic_trend_y self.min_mean_diff_x = min_mean_diff_x self.min_mean_diff_y = min_mean_diff_y self.gamma = gamma self.special_codes_x = special_codes_x self.special_codes_y = special_codes_y self.split_digits = split_digits self.n_jobs = n_jobs self.time_limit = time_limit self.verbose = verbose # auxiliary self._categories_x = None self._categories_y = None self._n_records_special = None self._n_records_missing = None self._sum_special = None self._sum_missing = None self._std_special = None self._std_missing = None self._problem_type = "regression" # info self._binning_table = None self._n_prebins = None self._n_refinements = 0 self._n_samples = None self._optimizer = None self._solution = None self._splits_x_optimal = None self._splits_y_optimal = None self._status = None # timing self._time_total = None self._time_preprocessing = None self._time_prebinning = None self._time_solver = None self._time_optimizer = None self._time_postprocessing = None self._is_fitted = False
(self, name_x='', name_y='', dtype_x='numerical', dtype_y='numerical', prebinning_method='cart', strategy='grid', solver='cp', max_n_prebins_x=5, max_n_prebins_y=5, min_prebin_size_x=0.05, min_prebin_size_y=0.05, min_n_bins=None, max_n_bins=None, min_bin_size=None, max_bin_size=None, monotonic_trend_x=None, monotonic_trend_y=None, min_mean_diff_x=0, min_mean_diff_y=0, gamma=0, special_codes_x=None, special_codes_y=None, split_digits=None, n_jobs=1, time_limit=100, verbose=False)
[ 0.025232458487153053, -0.020748771727085114, -0.04566230624914169, 0.031198197975754738, -0.03012886829674244, -0.04660031571984291, -0.09927893429994583, -0.03348694369196892, -0.030466550961136818, -0.07215169817209244, -0.015524058602750301, 0.039809126406908035, -0.017390698194503784, 0.013929442502558231, -0.0456998273730278, 0.011453096754848957, 0.012747550383210182, -0.014726750552654266, -0.022137025371193886, -0.007822999730706215, -0.01333849597722292, -0.002126936800777912, -0.017728380858898163, 0.07065088301897049, 0.015758560970425606, 0.024238167330622673, 0.02620798721909523, -0.027352359145879745, -0.026958394795656204, 0.009056482464075089, -0.052866220474243164, -0.0016145489644259214, -0.03393718600273132, -0.011837680824100971, 0.03573816642165184, -0.05740618705749512, 0.06881238520145416, 0.02073001116514206, -0.05714354291558266, 0.004432095214724541, 0.028609292581677437, -0.0711011290550232, 0.012006523087620735, -0.018112964928150177, -0.0032947587314993143, 0.0013061783974990249, -0.025832783430814743, 0.03729525953531265, -0.03463131561875343, -0.033430662006139755, -0.03676997497677803, -0.08442085981369019, 0.03380586579442024, 0.03609460964798927, -0.05061499774456024, 0.07035072147846222, 0.04427405074238777, 0.05237845703959465, 0.004624387249350548, -0.028177807107567787, -0.027652522549033165, 0.034762635827064514, 0.03729525953531265, -0.021611740812659264, -0.02103017456829548, -0.019885802641510963, -0.06716148555278778, -0.013451057486236095, 0.008165373466908932, 0.02401304617524147, 0.06915006786584854, 0.010918431915342808, 0.05676833912730217, 0.009075243026018143, -0.007593187503516674, -0.0010089465649798512, -0.05598041042685509, -0.05650569871068001, 0.001785735716111958, -0.027258558198809624, 0.03206116706132889, 0.05639313533902168, -0.0011672356631606817, -0.07338987290859222, 0.009342575445771217, -0.06115822494029999, 0.05219085514545441, 0.07999345660209656, 0.020073404535651207, -0.040972258895635605, -0.03421859070658684, -0.0009444584138691425, 0.06708644330501556, 0.03977160528302193, 0.0405220128595829, -0.014004482887685299, -0.013160274364054203, -0.022606030106544495, -0.010655788704752922, -0.05669330060482025, -0.012194124981760979, -0.03470635414123535, -0.00023508864978794008, 0.033862147480249405, -0.029978785663843155, -0.007475936319679022, -0.012935152277350426, -0.00210583140142262, -0.049939628690481186, -0.042698197066783905, -0.04896410182118416, 0.04926426336169243, -0.014801790937781334, -0.01930423639714718, -0.03958400338888168, -0.012175364419817924, -0.07425283640623093, -0.006448816042393446, -0.006598897278308868, 0.027183517813682556, -0.007438416127115488, 0.010693308897316456, -0.01827242597937584, 0.0633719265460968, -0.013225935399532318, -0.00755566731095314, 0.05886948108673096, 0.07046327739953995, -0.0014632949605584145, -0.07031320035457611, 0.06663619726896286, -0.03977160528302193, -0.03009134717285633, 0.048251211643218994, 0.02862805314362049, -0.031836044043302536, 0.011321775615215302, 0.025194937363266945, 0.0013542512897402048, -0.003121226793155074, 0.11203586310148239, -0.02697715535759926, -0.013225935399532318, -0.03146084025502205, 0.027089716866612434, 0.023375198245048523, 0.013479197397828102, -0.04952690750360489, -0.05706850439310074, -0.012194124981760979, -0.025326259434223175, -0.04142250493168831, -0.01189396157860756, -0.0495644249022007, 0.03543800115585327, -0.004565761424601078, -0.007916800677776337, -0.024425769224762917, -0.0037145179230719805, -0.011246735230088234, -0.049676988273859024, 0.0008154821116477251, -0.00666924798861146, -0.025757743045687675, -0.040972258895635605, 0.05523000285029411, -0.03646981343626976, -0.06059541925787926, -0.031235719099640846, 0.006889680400490761, 0.004216352943331003, -0.03973408415913582, -0.03363702446222305, 0.038908638060092926, -0.05500488355755806, 0.06712396442890167, 0.024800973013043404, -0.005628057289868593, -0.03264273330569267, 0.054254475980997086, 0.001394116785377264, -0.024932295083999634, -0.02142413891851902, -0.025964105501770973, -0.04378628730773926, 0.007935561239719391, 0.06453505903482437, -0.0469755195081234, 0.04374876618385315, 0.02082381211221218, 0.000980806304141879, -0.018591349944472313, 0.01979200169444084, 0.022061984986066818, 0.013920062221586704, -0.026264268904924393, 0.027164757251739502, 0.032267529517412186, -0.0007304749451577663, 0.029472261667251587, -0.0034893956035375595, 0.03358074277639389, 0.05406687408685684, -0.011612558737397194, 0.003299448639154434, -0.01920105703175068, -0.029678624123334885, -0.00880321953445673, 0.008005911484360695, 0.03324306011199951, -0.005210643168538809, -0.03733278065919876, 0.0004616765945684165, 0.06975039094686508, 0.03508155792951584, -0.002673327224329114, 0.03378710523247719, -0.003693412756547332, 0.0039560552686452866, -0.006950650829821825, 0.0771419107913971, -0.007940251380205154, 0.022268347442150116, -0.026395589113235474, 0.0232813972979784, -0.014192084781825542, 0.06472266465425491, 0.05406687408685684, 0.0638221725821495, -0.03958400338888168, 0.0016403442714363337, -0.05639313533902168, -0.001574683585204184, -0.002323918743059039, 0.005177813116461039, -0.012025282718241215, -0.036319732666015625, 0.021630501374602318, -0.032736536115407944, -0.007246124092489481, -0.0010968849528580904, 0.011106033809483051, -0.010965332388877869, -0.04082217812538147, -0.03654485195875168, -0.009042412042617798, 0.04840129613876343, 0.06412233412265778, -0.010984092019498348, -0.011818921193480492, -0.017812801524996758, -0.023468999192118645, -0.026451870799064636, -0.0078089297749102116, -0.011762640438973904, -0.08712232857942581, -0.007410275749862194, -0.013451057486236095, 0.03358074277639389, 0.0006255351472645998, -0.016049344092607498, -0.0035058108624070883, -0.005557706579566002, 0.03491271659731865, -0.017184335738420486, 0.009014272131025791, -0.03042903169989586, 0.014820551499724388, 0.022943714633584023, 0.0500146709382534, 0.014858071692287922, 0.034556273370981216, -0.021930664777755737, 0.02138661779463291, -0.024594610556960106, 0.01790660247206688, -0.0047369482927024364, -0.008732869289815426, 0.016480827704072, -0.00614396296441555, 0.023206356912851334, -0.026789553463459015, 0.037651706486940384, -0.024369489401578903, -0.03905871883034706, -0.04536214470863342, -0.06791189312934875, -0.020673731341958046, 0.0193980373442173, 0.0211239755153656, -0.07260194420814514, 0.01773776113986969, 0.03363702446222305, 0.03361826390028, 0.07489068806171417, -0.014004482887685299, 0.0405220128595829, -0.04885153844952583, 0.008010601624846458, 0.01122797466814518, 0.006697388365864754, -0.023525280877947807, 0.024463290348649025, -0.015345836989581585, -0.025495100766420364, -0.001667311997152865, 0.0646851435303688, -0.031367041170597076, 0.01956688053905964, 0.02427568845450878, 0.041797708719968796, 0.040109291672706604, 0.0788678452372551, 0.01684665121138096, -0.005689028184860945, -0.038645993918180466, -0.0056984080001711845, -0.008442086167633533, 0.031798526644706726, 0.06029525771737099, -0.03928384184837341, -0.001802150858566165, 0.010824630968272686, -0.032098688185214996, -0.019322996959090233, 0.01564599946141243, 0.025063615292310715, 0.02560766227543354, -0.026320548728108406, -0.01899469457566738, -0.016255706548690796, -0.006894370540976524, 0.039846647530794144, 0.04341108351945877, 0.013619898818433285, -0.012438006699085236, 0.006247143726795912, -0.00615334277972579, -0.008413946256041527, -0.07301466912031174, 0.0672740489244461, 0.023168837651610374, -0.005735928658396006, 0.03680749610066414, -0.028946975246071815, -0.07020063698291779, 0.024688411504030228, -0.01620880514383316, 0.029209619387984276, 0.07620389759540558, 0.012719409540295601, 0.01435154676437378, -0.008015291765332222, 0.07519084960222244, 0.042398031800985336, -0.005088701844215393, -0.0008811427396722138, -0.0346875935792923, 0.029453501105308533, -0.013957582414150238, -0.008714108727872372, -0.009389475919306278, -0.03264273330569267, 0.08269492536783218, 0.027877645567059517, -0.028159048408269882, -0.036920055747032166, 0.0033111737575381994, 0.031104397028684616, -0.025964105501770973, 0.007447795942425728, -0.04423653334379196, -0.05117780342698097, 0.010834010317921638, -0.02776508405804634, 0.0405220128595829, -0.0346875935792923, 0.005576467141509056, -0.022568510845303535, -0.048776499927043915, 0.026057906448841095, -0.02215578593313694, -0.03369330242276192, 0.041309941560029984, -0.03872103616595268, -0.028252849355340004, -0.02029852755367756, -0.023262638598680496, 0.10528219491243362, -0.04682543873786926, 0.01571166142821312, -0.026132946833968163, 0.02922837808728218, 0.00632687471807003, -0.015617859549820423, -0.026283029466867447, 0.0780423954129219, 0.014773651026189327, -0.05710602179169655, 0.010646408423781395, -0.034762635827064514, -0.06881238520145416, 0.02849673107266426, 0.04757584631443024, -0.01922919601202011, -0.06667371839284897, 0.0607830211520195, -0.008165373466908932, -0.0041671073995530605, 0.06547307223081589, 0.005004281178116798, 0.025457579642534256, 0.01456728857010603, -0.03301793709397316, -0.10438171029090881, 0.004396920092403889, -0.037445344030857086, -0.03335561975836754, 0.06956279277801514, -0.004919860046356916, 0.022061984986066818, 0.04603751003742218, 0.010937191545963287, 0.014820551499724388, 0.002403649501502514, 0.04408644884824753, -0.018122345209121704, -0.03221124783158302, -0.04693799838423729, -0.022099506109952927, -0.07027567923069, -0.011256114579737186, -0.07811743766069412, -0.00411082711070776, 0.011687599122524261, -0.0063034244813025, -0.027483681216835976, 0.03358074277639389, 0.00012421299470588565, -0.007246124092489481, 0.0022441879846155643, -0.03224876895546913, 0.04408644884824753, -0.027089716866612434, -0.026132946833968163, -0.02146166004240513, -0.04408644884824753, -0.04753832519054413, -0.0887732282280922, 0.010505707003176212, 0.07057584077119827, 0.027277318760752678, 0.022043224424123764, -0.011349915526807308, -0.00332993408665061, -0.027127237990498543, -0.0011349916458129883, -0.010843390598893166, 0.029547302052378654, -0.017428217455744743, 0.02551386132836342, 0.03776426613330841, 0.0010253617074340582, 0.03581320494413376, -0.025157416239380836, -0.01215660385787487, 0.01734379678964615, 0.05376670882105827, 0.010036702267825603, 0.009487967006862164, -0.014342166483402252, 0.012953911907970905, -0.011696979403495789, -0.03129199892282486, -0.046150073409080505, 0.05785642936825752, -0.02521369792521, 0.03495023772120476, 0.026057906448841095, -0.03804566711187363, 0.012747550383210182, -0.04018433019518852, 0.025964105501770973, 0.04172266647219658, 0.01571166142821312, -0.007114802487194538, 0.012100324034690857, -0.014210845343768597, -0.00960052851587534, 0.01420146506279707, -0.04832625389099121, 0.033768344670534134, 0.03072919324040413, 0.08352037519216537, 0.0185350701212883, 0.05568024888634682, 0.014858071692287922, 0.01521451584994793, 0.023375198245048523, -0.013591758906841278, 0.035287920385599136, 0.021274058148264885, -0.022343387827277184, -0.030147628858685493, 0.02534501813352108, -0.051440443843603134, -0.028309129178524017, 0.019341757521033287, -0.08284500986337662, 0.0031259169336408377, -0.021105214953422546, -0.07721694558858871, 0.04085969924926758, -0.0020483783446252346, -0.001049398211762309, 0.02026100642979145, -0.011368676088750362, -0.006172102876007557, -0.05406687408685684, 0.026864593848586082, 0.031273238360881805, 0.04885153844952583, 0.034987758845090866, -0.05117780342698097, 0.008273244835436344, 0.06138334795832634, 0.04318596050143242, -0.004720533266663551, 0.039809126406908035, 0.05099020153284073, 0.00930036511272192, -0.022437188774347305, 0.000121941244287882, 0.06479769945144653, 0.03581320494413376, 0.043861329555511475, -0.002415374619886279, -0.023356439545750618, 0.06761173158884048, -0.048176173120737076, -0.018460027873516083, 0.05189068987965584, 0.09747795760631561, -0.03138580173254013, -0.014511007815599442, 0.06175855174660683, 0.020017124712467194, 0.07684174180030823, -0.005623367615044117, -0.027052195742726326, 0.05365414917469025, 0.026132946833968163, 0.016931073740124702, -0.009487967006862164, 0.04513702169060707, -0.008127853274345398, 0.022268347442150116, -0.007419656030833721, 0.04033441096544266, 0.027258558198809624, -0.031179439276456833, 0.0002474000211805105, 0.0278026033192873, -0.014970633201301098, -0.048776499927043915, 0.0067630489356815815, 0.003498775651678443, 0.037445344030857086, -0.04371124505996704, 0.00036934128729626536, 0.023206356912851334, -0.008329524658620358, -0.056355614215135574, -0.002069483743980527, -0.05395431071519852, -0.02504485659301281, -0.019341757521033287, -0.012916391715407372, -0.09447632730007172, -0.024256927892565727, 0.015824221074581146, 0.0028421690221875906, -0.008564027957618237, -0.0750032439827919, -0.015833601355552673, 0.05147796496748924, -0.07376507669687271, -0.01107789296656847, 0.005023041274398565, -0.032267529517412186, -0.005266923923045397, 0.04978954792022705, -0.018263045698404312, -0.05710602179169655, -0.03348694369196892, 0.05376670882105827, -0.05147796496748924, -0.01644330844283104, 0.011256114579737186, -0.01594616286456585, -0.0036230620462447405, -0.004453200381249189, -0.010017942637205124, 0.061195746064186096, 0.0234877597540617, -0.04078465700149536, -0.019548119977116585, 0.02508237585425377, 0.006753669120371342, -0.03463131561875343, 0.0003617199545260519, -0.019754482433199883, 0.02268107235431671, -0.029866226017475128, -0.04112233966588974, -0.04146002233028412, -0.02517617680132389, -0.022831153124570847, 0.08006849884986877, -0.036957576870918274, -0.020711252465844154, 0.028252849355340004, 0.02159298025071621, 0.050539955496788025, -0.03917127847671509, -0.036000806838274, 0.027952685952186584, -0.10205544531345367, 0.041572585701942444, -0.023938003927469254, 0.012728789821267128, 0.006448816042393446, 0.05939476564526558, -0.05038987472653389, 0.018807092681527138, 0.008981442078948021, 0.040709614753723145, 0.04862641543149948, 0.006908440496772528, -0.005177813116461039, 0.04663783684372902, 0.001453914912417531, 0.0005305616650730371, 0.030316470190882683, -0.02969738282263279, -0.06581075489521027, -0.0017470428720116615, -0.0023590940982103348, 0.1077585443854332, 0.029847465455532074, -0.03264273330569267, 0.019623160362243652, -0.03401222825050354, -0.023225117474794388, -0.015552198514342308, 0.03219248726963997, -0.03202364593744278, 0.0047369482927024364, 0.03224876895546913, -0.045624785125255585, -0.01664029061794281, 0.007021001540124416, 0.007321164943277836, 0.005356034729629755, -0.021274058148264885, -0.007649468258023262, 0.01780342124402523, -0.016452688723802567, -0.001170167000964284, 0.02905953675508499, -0.03039151057600975, -0.021836863830685616, -0.02587030455470085, -0.029022015631198883, -0.025326259434223175, 0.006702078506350517, -0.04228547215461731, 0.0026967774610966444, 0.010580748319625854, 0.00946920644491911, 0.05436703562736511, 0.014079524204134941, -0.049902111291885376, 0.010486947372555733, 0.07323978841304779, 0.03928384184837341, -0.032042406499385834, -0.01863825134932995, -0.01580546237528324, -0.005665577948093414, 0.018525689840316772, 0.06434746086597443, 0.04971450939774513, -0.0161712858825922, 0.008141922764480114, -0.008845430798828602, -0.052866220474243164, -0.04986459016799927, 0.05162804573774338, -0.024031804874539375, 0.020898854359984398, -0.022606030106544495, -0.03065415285527706, 0.041872747242450714, -0.008990821428596973, 0.06269656121730804, -0.0448368564248085, 0.0105619877576828, 0.022568510845303535, -0.029003256931900978, 0.05526752397418022, 0.07946816831827164, 0.04690048098564148, -0.03789558634161949, 0.0010576058411970735, 0.05781891196966171, -0.01172512024641037, 0.011650078929960728, -0.058006513863801956, 0.0052809938788414, 0.021668020635843277, 0.03211744874715805, 0.024763453751802444, 0.017325036227703094, -0.0011895133648067713, 0.0059657408855855465, 0.04652527719736099, -0.08216963708400726, 0.049939628690481186, -0.007447795942425728, 0.04660031571984291, 0.04491189867258072, -0.0234877597540617, 0.013376017101109028, 0.030747953802347183, -0.05361662805080414, 0.04164762422442436, -0.03305545821785927, 0.03258645161986351, 0.06190863251686096, -0.04142250493168831, -0.00960052851587534, -0.04341108351945877, -0.00524816382676363, -0.027990205213427544, 0.04945186525583267, 0.03667617589235306, 0.00306025636382401, 0.024200648069381714, -0.04232299327850342, 0.03339314088225365, 0.017512638121843338, -0.0038364592473953962, 0.045061979442834854, 0.014276505447924137, -0.05162804573774338, 0.04202282801270485, -0.00545452581718564, -0.02138661779463291, -0.06892494112253189, -0.03676997497677803, -0.043336041271686554, -0.010834010317921638, 0.01807544380426407, -0.0063690850511193275, 0.008915781043469906, 0.04292332008481026, 0.005252853501588106 ]
4,626
optbinning.binning.binning
_compute_prebins
null
def _compute_prebins(self, splits_prebinning, x, y0, y1, sw): n_splits = len(splits_prebinning) if not n_splits: return splits_prebinning, np.array([]), np.array([]) if self.dtype == "categorical" and self.user_splits is not None: indices = np.digitize(x, splits_prebinning, right=True) n_bins = n_splits else: indices = np.digitize(x, splits_prebinning, right=False) n_bins = n_splits + 1 n_nonevent = np.empty(n_bins, dtype=np.int64) n_event = np.empty(n_bins, dtype=np.int64) for i in range(n_bins): mask = (indices == i) n_nonevent[i] = np.sum(sw[y0 & mask]) n_event[i] = np.sum(sw[y1 & mask]) mask_remove = (n_nonevent == 0) | (n_event == 0) if np.any(mask_remove): if self.divergence in ("hellinger", "triangular"): self._flag_min_n_event_nonevent = True else: self._n_refinements += 1 if (self.dtype == "categorical" and self.user_splits is not None): mask_splits = mask_remove else: mask_splits = np.concatenate([ mask_remove[:-2], [mask_remove[-2] | mask_remove[-1]]]) if self.user_splits_fixed is not None: user_splits_fixed = np.asarray(self.user_splits_fixed) user_splits = np.asarray(self.user_splits) fixed_remove = user_splits_fixed & mask_splits if any(fixed_remove): raise ValueError( "Fixed user_splits {} are removed " "because produce pure prebins. Provide " "different splits to be fixed." .format(user_splits[fixed_remove])) # Update boolean array of fixed user splits. self.user_splits_fixed = user_splits_fixed[~mask_splits] self.user_splits = user_splits[~mask_splits] splits = splits_prebinning[~mask_splits] if self.verbose: logger.info("Pre-binning: number prebins removed: {}" .format(np.count_nonzero(mask_remove))) [splits_prebinning, n_nonevent, n_event] = self._compute_prebins(splits, x, y0, y1, sw) return splits_prebinning, n_nonevent, n_event
(self, splits_prebinning, x, y0, y1, sw)
[ -0.016317734494805336, 0.004381090402603149, -0.06583654880523682, 0.017769457772374153, -0.016317734494805336, -0.05097996070981026, -0.014649197459220886, -0.003551534842699766, 0.010077214799821377, -0.008809314109385014, -0.0016650028992444277, 0.02763928286731243, -0.011613777838647366, -0.0486421212553978, -0.03403063118457794, 0.0015094612026587129, -0.005571219604462385, 0.016760792583227158, 0.00163790094666183, -0.033295344561338425, -0.025094056501984596, -0.02665890008211136, -0.030467312783002853, 0.07620599120855331, -0.0014375820755958557, 0.01566728763282299, -0.01656283065676689, -0.0537702850997448, -0.029468076303601265, -0.0025428705848753452, 0.027658136561512947, -0.009360780008137226, 0.0404219813644886, -0.07111553847789764, 0.04487141594290733, -0.03489789366722107, 0.058596789836883545, 0.08340804278850555, -0.022341439500451088, 0.03610451892018318, -0.0012832187348976731, -0.08046688884496689, 0.012905244715511799, 0.015063975006341934, 0.031673938035964966, 0.026489216834306717, 0.02260538935661316, 0.013970470055937767, -0.02192666195333004, 0.04585179686546326, 0.006914534140378237, -0.07835529744625092, 0.052073463797569275, 0.05331780016422272, -0.009492754936218262, 0.055353980511426926, 0.05203576013445854, 0.0010664031142368913, -0.035180699080228806, -0.017948566004633904, 0.012679003179073334, 0.05874761566519737, 0.035180699080228806, -0.013631106354296207, 0.005359117407351732, -0.04732237383723259, -0.0264703631401062, 0.008158867247402668, -0.031183747574687004, 0.022134050726890564, -0.016270602121949196, 0.029543491080403328, 0.026489216834306717, 0.006429055705666542, -0.046304281800985336, 0.00920995231717825, 0.026187561452388763, 0.02188895456492901, 0.05516544356942177, -0.03357814624905586, 0.06364953517913818, 0.05165868625044823, -0.012301932089030743, -0.011057598516345024, 0.05399652570486069, 0.0011612599482759833, 0.007338738534599543, 0.05637207254767418, 0.00950218178331852, -0.016723085194826126, -0.009629443287849426, 0.04061051458120346, 0.05131932348012924, 0.07220903784036636, 0.047209251672029495, 0.04660594090819359, -0.04943396896123886, -0.0070417956449091434, 0.013659386895596981, -0.031711645424366, 0.04038427397608757, 0.00576446857303381, -0.021813541650772095, 0.049999576061964035, 0.025471126660704613, 0.04392873868346214, 0.031315721571445465, -0.019437994807958603, -0.06466762721538544, -0.030599288642406464, 0.02786552533507347, -0.039139941334724426, -0.08891327679157257, 0.02552768774330616, -0.04705842584371567, -0.03695293143391609, -0.026131000369787216, 0.0261121466755867, -0.00214930297806859, 0.04460746422410011, -0.049961868673563004, -0.017496081069111824, -0.015582446940243244, 0.019032644107937813, -0.01485658623278141, -0.0515078604221344, 0.05165868625044823, 0.05407194048166275, -0.04502224177122116, -0.04377790912985802, 0.03876286745071411, -0.008168294094502926, -0.07349108159542084, 0.001434047007933259, -0.03519955277442932, -0.041892554610967636, 0.019796213135123253, 0.04947167634963989, 0.052563656121492386, -0.08876244723796844, 0.046983011066913605, -0.010661674663424492, -0.010303457267582417, 0.04332542419433594, -0.012594161555171013, 0.0324280820786953, 0.08574587851762772, 0.03989408165216446, 0.02737533301115036, 0.011764606460928917, -0.010755942203104496, 0.010501419194042683, -0.011915434151887894, -0.05154556781053543, 0.013602825812995434, -0.03776363283395767, -0.0257539302110672, -0.019551116973161697, -0.00871033314615488, -0.011906007304787636, 0.02328411675989628, -0.004039369989186525, 0.011868300847709179, -0.03593483939766884, -0.05030123144388199, 0.04547472670674324, -0.03163623437285423, -0.010463712736964226, -0.024151379242539406, -0.012556455098092556, 0.04264669865369797, 0.026451511308550835, -0.05795576795935631, 0.0478125661611557, -0.02750730887055397, 0.026545777916908264, -0.005486378911882639, -0.052073463797569275, -0.073679618537426, 0.035048723220825195, 0.04611574858427048, -0.02507520280778408, 0.01496970746666193, -0.057201627641916275, -0.03097635880112648, 0.03765051066875458, 0.04472058638930321, -0.03868745639920235, 0.01994704082608223, 0.028619667515158653, -0.09102486819028854, -0.02669660560786724, -0.025282591581344604, 0.029562344774603844, 0.03714146465063095, 0.017628055065870285, -0.04430580884218216, -0.0017357036704197526, -0.06315934658050537, -0.11048171669244766, -0.04913231357932091, 0.010011227801442146, 0.002372010378167033, 0.007852497510612011, -0.009888679720461369, -0.0029199414420872927, -0.009063837118446827, 0.043966446071863174, 0.04528619349002838, -0.015214803628623486, -0.0071926238015294075, -0.0566360205411911, 0.022812778130173683, 0.042307332158088684, 0.005547652952373028, -0.025112910196185112, 0.05459984019398689, 0.013781934976577759, -0.02241685427725315, -0.04426810145378113, -0.014979134313762188, 0.005392111372202635, 0.016987035050988197, -0.01170804537832737, -0.016289453953504562, -0.005524085834622383, 0.025226030498743057, 0.006047271657735109, 0.06775961071252823, 0.017392385751008987, 0.0030354191549122334, -0.018203089013695717, -0.04407956451177597, -0.07820446789264679, 0.016638245433568954, 0.053242385387420654, -0.013404863886535168, -0.07186967879533768, 0.04577638581395149, 0.01036001741886139, -0.0033205789513885975, -0.014083591289818287, -0.008498230949044228, -0.02769584394991398, -0.015704995021224022, 0.021983223035931587, 0.01485658623278141, 0.028148328885436058, -0.0020762456115335226, 0.004004019778221846, 0.011151866056025028, -0.03412489965558052, -0.00848409067839384, -0.03570859506726265, 0.039592426270246506, -0.032126422971487045, -0.00514230178669095, 0.028695080429315567, 0.01299008633941412, 0.02043723315000534, 0.02092742547392845, 0.011576070450246334, 0.010869063436985016, -0.008908296003937721, 0.0019065637607127428, 0.00559478672221303, 0.04226962849497795, 0.03604796156287193, -0.02188895456492901, 0.05135703086853027, -0.04532390087842941, -0.019419141113758087, 0.009784985333681107, -0.023698894307017326, -0.01576155610382557, 0.032673176378011703, 0.0069381012581288815, -0.0161574799567461, 0.06191501021385193, 0.04389103129506111, 0.06172647699713707, 0.0036811528261750937, 0.03359699994325638, 0.004322173073887825, 0.045625556260347366, -0.03502986952662468, -0.006122685503214598, -0.05980341508984566, 0.009455048479139805, -0.022680804133415222, -0.015968944877386093, 0.007508420385420322, 0.030241070315241814, 0.007211477495729923, 0.01678907312452793, -0.012151103466749191, 0.002844527130946517, -0.03776363283395767, -0.020550353452563286, 0.0004468877159524709, -0.009299506433308125, 0.009063837118446827, -0.038159556686878204, -0.028525399044156075, 0.0166948065161705, -0.02426449954509735, 0.06606278568506241, -0.0379144586622715, 0.014800025150179863, -0.04264669865369797, 0.009073263965547085, 0.0011960212141275406, 0.02548998035490513, -0.04992416128516197, 0.018928950652480125, -0.03804643452167511, 0.09004448354244232, 0.02863852120935917, 0.016336588189005852, 0.053921110928058624, 0.012367919087409973, 0.008682053536176682, -0.0061886729672551155, 0.04242045432329178, -0.028487691655755043, 0.04449434578418732, 0.04517307132482529, -0.03555776923894882, -0.07190738618373871, -0.0031438269652426243, -0.024339914321899414, -0.0061556794680655, -0.01796741969883442, 0.04920772835612297, -0.03107062727212906, -0.04226962849497795, 0.04890607297420502, -0.03367241472005844, -0.0166948065161705, -0.07126636803150177, -0.00016349551151506603, 0.0010051290737465024, -0.007645108737051487, 0.04012032225728035, -0.003688222961500287, -0.01593123748898506, 0.008974283002316952, 0.033785536885261536, 0.0068862540647387505, 0.09223149716854095, 0.02202093042433262, -0.0025499407202005386, 0.0071454900316894054, 0.02786552533507347, 0.10422234237194061, -0.060670677572488785, 0.0019914046861231327, -0.05656060576438904, 0.0456632636487484, -0.030373046174645424, 0.019249459728598595, -0.0042373319156467915, 0.03107062727212906, 0.043476253747940063, 0.026734312996268272, -0.0039733825251460075, -0.025546541437506676, 0.02439647540450096, -0.039554718881845474, -0.052789900451898575, -0.0257539302110672, -0.036349616944789886, -0.010944477282464504, 0.027582721784710884, 0.041402366012334824, 0.028789348900318146, -0.012575307860970497, -0.0463796965777874, -0.003209814429283142, 0.019701944664120674, -0.004463574383407831, 0.05656060576438904, -0.05607041344046593, 0.026394950225949287, -0.0022365006152540445, 0.04619116336107254, -0.012679003179073334, -0.03107062727212906, 0.09841545671224594, -0.05524085834622383, 0.04132695123553276, 0.011472376063466072, 0.0009697787463665009, -0.03665127232670784, -0.04219421371817589, 0.025452272966504097, 0.05584417283535004, 0.0003965134092140943, 0.02079544961452484, 0.0020479653030633926, -0.002934081479907036, -0.03463394567370415, 0.005811602342873812, 0.05644748732447624, -0.005213002674281597, -0.03604796156287193, -0.0178260188549757, -0.0028044634964317083, 0.009087404236197472, 0.029317248612642288, -0.0389891117811203, 0.035953693091869354, 0.026753166690468788, -0.06798584759235382, -0.017844870686531067, -0.01332945004105568, -0.026357242837548256, 0.011199000291526318, 0.04008261859416962, -0.052525948733091354, 0.022812778130173683, 0.028581960126757622, 0.01774117723107338, 0.019551116973161697, 0.0011406389530748129, 0.0022789211943745613, -0.021455323323607445, -0.030410753563046455, -0.021756980568170547, 0.018533024936914444, -0.00604255823418498, -0.030957505106925964, -0.07028598338365555, -0.046530526131391525, -0.06787272542715073, -0.010350591503083706, 0.017392385751008987, 0.07168114185333252, 0.0013315309770405293, 0.009737851098179817, -0.04155319184064865, 0.045135363936424255, 0.06734482944011688, -0.01519594993442297, 0.05708850547671318, -0.005613640416413546, -0.06236749514937401, 0.02273736335337162, -0.09102486819028854, -0.03782019391655922, -0.007418866269290447, -0.03357814624905586, 0.0058775898069143295, 0.013555692508816719, -0.024113671854138374, -0.027205651625990868, -0.02818603627383709, 0.017213277518749237, -0.015271363779902458, -0.004663893487304449, -0.0014069450553506613, 0.029600050300359726, -0.07051222026348114, 0.03463394567370415, 0.018127674236893654, -0.01918347179889679, 0.010143201798200607, -0.012339639477431774, 0.0057220482267439365, 0.04547472670674324, 0.04758632555603981, -0.038065288215875626, 0.03623649477958679, 0.02773355133831501, 0.02507520280778408, 0.026055585592985153, -0.022002076730132103, -0.012886391952633858, 0.020644621923565865, -0.007550841197371483, -0.009784985333681107, 0.048566706478595734, -0.0506783053278923, 0.012631868943572044, -0.0015224230010062456, -0.046530526131391525, -0.06949413567781448, -0.011340402066707611, -0.0014269769890233874, 0.0044235107488930225, -0.016289453953504562, -0.014159005135297775, 0.02854425273835659, 0.055316273123025894, -0.016515696421265602, 0.029826292768120766, 0.03548235446214676, 0.005377971101552248, 0.13732914626598358, -0.030957505106925964, -0.006108545698225498, 0.04713384062051773, -0.06643985956907272, -0.03846121206879616, -0.031937889754772186, -0.029317248612642288, -0.013857348822057247, 0.03668897971510887, -0.05539168789982796, -0.000025371262381668203, -0.03444540873169899, -0.1030157208442688, 0.0574655756354332, 0.004840645473450422, 0.021625004708766937, -0.013367156498134136, 0.0228316318243742, 0.01800512708723545, -0.0552031509578228, 0.006000137887895107, 0.011264987289905548, 0.0061556794680655, 0.012528174556791782, -0.02562195435166359, 0.01953226327896118, 0.02922298014163971, -0.038838282227516174, -0.04079905152320862, 0.019645383581519127, -0.02345379814505577, -0.04532390087842941, -0.03668897971510887, 0.05241283029317856, 0.046078041195869446, 0.0515078604221344, 0.026394950225949287, 0.004996187053620815, -0.01562958024442196, 0.030354192480444908, 0.02552768774330616, 0.028336863964796066, 0.0184199046343565, 0.07168114185333252, 0.020776595920324326, 0.010953904129564762, 0.0692678913474083, 0.017590349540114403, 0.06353641301393509, -0.024377621710300446, -0.01130269467830658, -0.014375820755958557, -0.006433769129216671, 0.050452060997486115, 0.038875989615917206, 0.04736008122563362, -0.047435496002435684, 0.027658136561512947, 0.0057786088436841965, -0.0069852350279688835, 0.042571283876895905, -0.04901919141411781, -0.00536854425445199, 0.04076134413480759, -0.037348855286836624, -0.06014277786016464, 0.03372897580265999, 0.0061886729672551155, 0.0231898482888937, 0.013301169499754906, 0.0485289990901947, 0.018306782469153404, 0.009530462324619293, -0.05701309069991112, -0.03148540481925011, -0.02296360582113266, 0.021681565791368484, -0.014686903916299343, -0.09283480793237686, -0.07190738618373871, -0.04358937591314316, 0.001358632929623127, -0.06304622441530228, -0.003426630049943924, -0.04785027354955673, -0.025961318984627724, 0.030768970027565956, -0.08220141381025314, 0.02043723315000534, -0.00046633041347377, 0.048415880650281906, -0.010350591503083706, 0.027186797931790352, 0.003989879507571459, 0.02179468795657158, 0.0017027099383994937, -0.01055798027664423, 0.0020868508145213127, -0.02277507074177265, -0.04128924384713173, -0.021493030712008476, 0.06708087772130966, -0.02179468795657158, 0.018570732325315475, 0.043966446071863174, 0.02997712232172489, -0.03148540481925011, -0.02637609653174877, 0.013715947046875954, -0.0007388229132629931, -0.02909100614488125, -0.0012136963196098804, 0.020682329311966896, 0.025376858189702034, 0.02899673767387867, 0.002427392639219761, 0.027111385017633438, -0.005792748648673296, -0.052111171185970306, 0.07469771057367325, -0.014686903916299343, 0.029317248612642288, -0.017571495845913887, 0.017222704365849495, -0.0031037633307278156, -0.024698130786418915, -0.05701309069991112, 0.05965258553624153, -0.013386010192334652, 0.011877727694809437, -0.011906007304787636, 0.019437994807958603, -0.007711096201092005, 0.06010507047176361, -0.04174172878265381, 0.037348855286836624, 0.04547472670674324, 0.01576155610382557, 0.0018676783656701446, 0.010011227801442146, -0.07028598338365555, 0.03944159671664238, -0.02805406041443348, 0.041892554610967636, -0.02503749541938305, -0.023736601695418358, -0.06824979931116104, 0.0006681221420876682, 0.0030566295608878136, 0.0485289990901947, 0.05120620131492615, 0.004744020756334066, -0.018023980781435966, -0.052827607840299606, -0.006740138866007328, -0.003289941931143403, 0.04690759629011154, -0.002557010855525732, 0.006169819738715887, -0.028695080429315567, -0.05727704241871834, -0.015441046096384525, 0.024415329098701477, 0.007117209490388632, -0.005024467129260302, -0.024792399257421494, 0.010463712736964226, 0.02997712232172489, -0.020418379455804825, 0.05033893883228302, -0.007833643816411495, -0.02854425273835659, -0.022586535662412643, -0.062065839767456055, -0.029524637386202812, 0.009473901242017746, -0.024207940325140953, -0.04283523187041283, 0.00804103258997202, -0.05942634493112564, -0.02669660560786724, -0.02160615101456642, -0.005703194532543421, -0.0327862985432148, -0.036311909556388855, 0.07481083273887634, -0.03480362519621849, -0.021907808259129524, -0.02782781794667244, -0.003073126310482621, 0.013668813742697239, 0.035991400480270386, 0.014055310748517513, 0.06315934658050537, 0.003322935663163662, -0.00609911885112524, 0.01159492414444685, 0.020776595920324326, 0.02503749541938305, 0.02809176780283451, 0.018476465716958046, 0.04898148402571678, -0.06168876960873604, -0.045097656548023224, -0.04592721164226532, -0.04287293925881386, 0.06745795160531998, -0.05527856573462486, -0.029958268627524376, 0.0028610241133719683, 0.01644028350710869, -0.020965130999684334, 0.01927774026989937, -0.034426555037498474, -0.02341609075665474, -0.019833918660879135, 0.03685866296291351, -0.06346099823713303, 0.01219823770225048, -0.004996187053620815, 0.0036740826908499002, 0.007536700926721096, 0.06945642828941345, 0.0052365693263709545, 0.030335338786244392, -0.04532390087842941, -0.017995700240135193, 0.11229165643453598, -0.09034614264965057, 0.021229080855846405, -0.028072914108633995, 0.029637757688760757, 0.0034808339551091194, -0.03178706020116806, 0.007805363740772009, 0.06327246874570847, -0.010086641646921635, 0.08303096890449524, -0.056032709777355194, 0.01678907312452793, 0.004454148001968861, 0.0016508627450093627, -0.08853620290756226, -0.029882853850722313, 0.006627017632126808, -0.05527856573462486, 0.048868365585803986, 0.03288056701421738, -0.0462665781378746, 0.03012795001268387, -0.0455501414835453, -0.014686903916299343, 0.022680804133415222, 0.005410964600741863, -0.006763705983757973, -0.019258886575698853, 0.019833918660879135, 0.011283840984106064, -0.015912383794784546, -0.005684340838342905, -0.01657225750386715, 0.008121160790324211, 0.03474706783890724, -0.020550353452563286, 0.0037895606365054846, 0.020738888531923294, -0.006047271657735109, 0.002627711510285735, 0.009374920278787613 ]
4,627
optbinning.binning.multidimensional.continuous_binning_2d
_fit
null
def _fit(self, x, y, z, check_input): time_init = time.perf_counter() if self.verbose: logger.info("Optimal binning started.") logger.info("Options: check parameters.") _check_parameters(**self.get_params()) # Pre-processing if self.verbose: logger.info("Pre-processing started.") self._n_samples = len(x) if self.verbose: logger.info("Pre-processing: number of samples: {}" .format(self._n_samples)) time_preprocessing = time.perf_counter() [x_clean, y_clean, z_clean, x_missing, y_missing, z_missing, x_special, y_special, z_special, categories_x, categories_y] = split_data_2d( self.dtype_x, self.dtype_y, x, y, z, self.special_codes_x, self.special_codes_y, check_input) self._time_preprocessing = time.perf_counter() - time_preprocessing if self.verbose: n_clean = len(x_clean) n_missing = len(x_missing) n_special = len(x_special) logger.info("Pre-processing: number of clean samples: {}" .format(n_clean)) logger.info("Pre-processing: number of missing samples: {}" .format(n_missing)) logger.info("Pre-processing: number of special samples: {}" .format(n_special)) if self.dtype_x == "categorical": logger.info("Pre-processing: number of categories in x: {}" .format(len(categories_x))) if self.dtype_y == "categorical": logger.info("Pre-processing: number of categories in y: {}" .format(len(categories_y))) if self.verbose: logger.info("Pre-processing terminated. Time: {:.4f}s" .format(self._time_preprocessing)) # Pre-binning if self.verbose: logger.info("Pre-binning started.") time_prebinning = time.perf_counter() splits_x = self._fit_prebinning(self.dtype_x, x_clean, z_clean, self.max_n_prebins_x, self.min_prebin_size_x) splits_y = self._fit_prebinning(self.dtype_y, y_clean, z_clean, self.max_n_prebins_y, self.min_prebin_size_y) R, S, SS = self._prebinning_matrices( splits_x, splits_y, x_clean, y_clean, z_clean, x_missing, y_missing, z_missing, x_special, y_special, z_special) if self.strategy == "cart": if self.verbose: logger.info("Prebinning: applying strategy cart...") n_splits_x = len(splits_x) n_splits_y = len(splits_y) clf_nodes = n_splits_x * n_splits_y indices_x = np.digitize(x_clean, splits_x, right=False) n_bins_x = n_splits_x + 1 indices_y = np.digitize(y_clean, splits_y, right=False) n_bins_y = n_splits_y + 1 xt = np.empty(len(x_clean), dtype=int) yt = np.empty(len(y_clean), dtype=int) for i in range(n_bins_x): xt[(indices_x == i)] = i for i in range(n_bins_y): yt[(indices_y == i)] = i xyt = np.c_[xt, yt] min_prebin_size = min(self.min_prebin_size_x, self.min_prebin_size_y) * 0.25 clf = DecisionTreeRegressor(min_samples_leaf=min_prebin_size, max_leaf_nodes=clf_nodes) clf.fit(xyt, z_clean) self._clf = clf self._categories_x = categories_x self._categories_y = categories_y self._time_prebinning = time.perf_counter() - time_prebinning self._n_prebins = R.size if self.verbose: logger.info("Pre-binning: number of prebins: {}" .format(self._n_prebins)) logger.info("Pre-binning terminated. Time: {:.4f}s" .format(self._time_prebinning)) # Optimization rows, n_records, sums, stds = self._fit_optimizer( splits_x, splits_y, R, S, SS) # Post-processing if self.verbose: logger.info("Post-processing started.") logger.info("Post-processing: compute binning information.") time_postprocessing = time.perf_counter() # Refinements m, n = R.shape self._n_refinements = (m * n * (m + 1) * (n + 1)) // 4 - len(rows) # solution matrices D = np.empty(m * n, dtype=float) P = np.empty(m * n, dtype=int) selected_rows = np.array(rows, dtype=object)[self._solution] self._selected_rows = selected_rows self._m, self._n = m, n n_selected_rows = selected_rows.shape[0] + 2 opt_sums = np.empty(n_selected_rows, dtype=float) opt_n_records = np.empty(n_selected_rows, dtype=int) opt_stds = np.zeros(n_selected_rows, dtype=float) for i, r in enumerate(selected_rows): _n_records = n_records[self._solution][i] _sums = sums[self._solution][i] _mean = _sums / _n_records _stds = stds[self._solution][i] P[r] = i D[r] = _mean opt_sums[i] = _sums opt_n_records[i] = _n_records opt_stds[i] = _stds opt_n_records[-2] = self._n_records_special opt_sums[-2] = self._sum_special opt_stds[-2] = self._std_special opt_n_records[-1] = self._n_records_missing opt_sums[-1] = self._sum_missing opt_stds[-1] = self._std_missing self._sums = opt_sums self._n_records = opt_n_records D = D.reshape((m, n)) P = P.reshape((m, n)) # optimal bins splits_x_optimal, splits_y_optimal = self._splits_xy_optimal( selected_rows, splits_x, splits_y, P) self._splits_x_optimal = splits_x_optimal self._splits_y_optimal = splits_y_optimal # instatiate binning table self._binning_table = ContinuousBinningTable2D( self.name_x, self.name_y, self.dtype_x, self.dtype_y, splits_x_optimal, splits_y_optimal, m, n, opt_n_records, opt_sums, opt_stds, D, P, self._categories_x, self._categories_y) self.name = "-".join((self.name_x, self.name_y)) self._time_postprocessing = time.perf_counter() - time_postprocessing if self.verbose: logger.info("Post-processing terminated. Time: {:.4f}s" .format(self._time_postprocessing)) self._time_total = time.perf_counter() - time_init if self.verbose: logger.info("Optimal binning terminated. Status: {}. Time: {:.4f}s" .format(self._status, self._time_total)) # Completed successfully self._is_fitted = True return self
(self, x, y, z, check_input)
[ -0.0026310214307159185, -0.00571972643956542, -0.03447709232568741, 0.013608822599053383, -0.019556067883968353, -0.05574749410152435, -0.07119763642549515, -0.033524688333272934, -0.026413390412926674, -0.0496520958840847, -0.04444560781121254, 0.03796925023198128, -0.014984519220888615, -0.0008670862298458815, -0.053165413439273834, 0.01357707567512989, -0.021153993904590607, 0.011238389648497105, -0.04317573457956314, -0.001994761172682047, -0.05159923434257507, -0.003703800728544593, -0.029270607978105545, 0.09600251913070679, 0.03542950004339218, 0.00840233638882637, -0.001996084116399288, -0.032508786767721176, -0.007502842228859663, 0.02287890575826168, -0.02560913749039173, 0.009550514630973339, 0.004386358428746462, -0.025037692859768867, -0.00808486808091402, -0.04072064533829689, 0.07267915457487106, 0.03930261731147766, 0.009576970711350441, 0.03204316645860672, -0.004873143509030342, -0.07479561120271683, 0.008031956851482391, 0.014614139683544636, -0.0012070422526448965, 0.010233072564005852, -0.013122037053108215, 0.04306991025805473, -0.02469906024634838, -0.02738696150481701, -0.026688531041145325, -0.0803830623626709, 0.040889959782361984, 0.025270503014326096, -0.012698745355010033, 0.020582549273967743, 0.04406464844942093, 0.027852581813931465, 0.031069597229361534, -0.06878487020730972, 0.02273075468838215, 0.03847719728946686, -0.004563611466437578, -0.005973701365292072, -0.03297441080212593, -0.029291773214936256, -0.07018173485994339, -0.011291300877928734, 0.03259344771504402, 0.042202163487672806, 0.035598818212747574, 0.022413285449147224, 0.07466862350702286, 0.009830945171415806, -0.032360635697841644, -0.011238389648497105, 0.007904969155788422, -0.05257280543446541, -0.010555832646787167, -0.04897482693195343, 0.06010739505290985, 0.07047803699970245, -0.0009656337788328528, -0.06865788251161575, -0.020878853276371956, -0.030201850458979607, 0.033037904649972916, 0.06594882160425186, 0.015365482307970524, -0.05578982084989548, 0.004783194046467543, 0.03881583362817764, 0.07483793795108795, 0.06937748193740845, 0.041927024722099304, -0.0037487754598259926, -0.04571548476815224, -0.006762081757187843, 0.019058700650930405, -0.04108044132590294, -0.007322943303734064, -0.003354585263878107, 0.02169368974864483, 0.06307043880224228, 0.0012897163396701217, 0.015841685235500336, 0.012772821821272373, -0.007227702531963587, -0.05481624975800514, -0.0420963428914547, -0.019429080188274384, 0.02211698144674301, -0.03631841391324997, -0.02029682882130146, -0.044530268758535385, -0.04169421270489693, -0.06531388312578201, 0.029905546456575394, -0.07221353054046631, 0.05879519134759903, -0.0096827931702137, -0.004613877739757299, -0.028085391968488693, 0.030984938144683838, -0.0395565927028656, -0.028000734746456146, 0.05409665405750275, 0.08448898792266846, 0.013545328751206398, -0.06713403761386871, 0.008740969933569431, 0.0017513686325401068, -0.015968672931194305, 0.01885763742029667, -0.04715467616915703, -0.037016842514276505, 0.016391964629292488, 0.006455195602029562, -0.0033069648779928684, -0.047366321086883545, 0.12055342644453049, 0.0024577362928539515, -0.013714645057916641, -0.01626497693359852, 0.042985253036022186, 0.008042538538575172, 0.06628745049238205, -0.036360740661621094, -0.003484218381345272, -0.0004054339078720659, -0.016349634155631065, -0.03557765111327171, -0.011354794725775719, -0.020751867443323135, 0.013005631975829601, -0.016053330153226852, -0.007920842617750168, -0.04093229025602341, -0.024508578702807426, -0.01964072696864605, -0.044022317975759506, -0.046731382608413696, -0.005045105703175068, 0.009576970711350441, -0.052403490990400314, 0.06154658645391464, -0.03968358039855957, -0.006550436373800039, -0.004706472624093294, -0.010296566411852837, 0.0465620681643486, -0.016222646459937096, -0.06552552431821823, 0.03589512035250664, -0.038710009306669235, 0.0620122067630291, 0.03272043541073799, -0.0441916361451149, -0.0426466204226017, 0.04031851515173912, 0.04575781151652336, -0.0385618582367897, 0.012328365817666054, -0.035619981586933136, -0.05011771619319916, 0.013915708288550377, 0.04986374080181122, -0.05405432730913162, 0.013661733828485012, 0.028847316280007362, -0.04605411738157272, -0.023958299309015274, 0.013143201358616352, -0.005235586781054735, 0.014370746910572052, 0.008037247695028782, 0.026201745495200157, 0.022053487598896027, 0.058202583342790604, -0.042964089661836624, -0.017873484641313553, -0.003100610338151455, 0.0377364382147789, -0.02791607566177845, -0.03894282132387161, -0.03877350315451622, -0.03316488862037659, 0.026857847347855568, 0.011936821043491364, 0.03280509263277054, -0.02287890575826168, -0.059133823961019516, -0.009079603478312492, 0.0340961329638958, 0.04381067305803299, 0.019947612658143044, 0.03274159878492355, -0.03784226253628731, -0.011407705955207348, -0.023598501458764076, 0.011291300877928734, -0.03346119448542595, -0.02376781776547432, 0.01485753245651722, -0.008592817932367325, -0.0025357806589454412, 0.05028703063726425, 0.05621311441063881, 0.09083835780620575, -0.02285774238407612, 0.009206590242683887, -0.04635041952133179, -0.00918013509362936, -0.02781025320291519, -0.019079865887761116, -0.025736123323440552, -0.01964072696864605, 0.02351384423673153, 0.008100741542875767, -0.016201483085751534, -0.017270293086767197, -0.049313463270664215, -0.0009775388753041625, -0.06831925362348557, -0.032656941562891006, 0.03267810493707657, 0.05337706208229065, 0.045546166598796844, 0.022836577147245407, 0.0197782963514328, -0.009158969856798649, -0.02404295839369297, -0.02067779004573822, -0.026857847347855568, 0.012804568745195866, -0.03995871916413307, 0.02467789500951767, 0.01473054476082325, 0.02018042281270027, 0.009143096394836903, 0.00039915068191476166, 0.016328470781445503, 0.024106452241539955, 0.017778243869543076, -0.03720732405781746, 0.02546098455786705, 0.008312387391924858, -0.00285986321978271, 0.002480223774909973, 0.03413845971226692, -0.014529481530189514, 0.0413767471909523, -0.038202058523893356, 0.02493187040090561, -0.01937616989016533, 0.08177991956472397, 0.0002721632190514356, -0.032614611089229584, 0.02351384423673153, 0.012762239202857018, 0.06053068861365318, 0.015323152765631676, 0.0387311726808548, -0.02960924245417118, -0.021640779450535774, -0.031111925840377808, -0.03862535208463669, -0.0013928936095908284, -0.0009252888266928494, -0.011862744577229023, -0.05879519134759903, 0.003891636384651065, 0.04072064533829689, 0.040826465934515, 0.0441916361451149, -0.022180475294589996, 0.01629672385752201, -0.07432998716831207, -0.014571810141205788, -0.026561543345451355, -0.04393766075372696, -0.03775760158896446, 0.06395934522151947, -0.008047830313444138, 0.014222594909369946, 0.011450035497546196, 0.056170783936977386, -0.0418212004005909, 0.007127170916646719, -0.0014894569758325815, 0.03422312065958977, 0.028868481516838074, 0.0771237164735794, -0.009095476008951664, 0.013746391981840134, -0.06154658645391464, 0.02093176543712616, 0.030836787074804306, 0.01616973616182804, 0.05519721284508705, -0.030921446159482002, 0.004994839895516634, 0.022201640531420708, -0.019693637266755104, -0.03568347543478012, 0.009026691317558289, 0.04393766075372696, 0.004608586430549622, -0.06662608683109283, -0.045673154294490814, 0.019471410661935806, -0.016233230009675026, 0.04317573457956314, 0.04059365764260292, 0.030709799379110336, -0.008201273158192635, 0.028000734746456146, -0.019947612658143044, 0.020730702206492424, -0.039874061942100525, 0.04351436719298363, 0.0571020245552063, 0.006005448289215565, 0.033926814794540405, -0.024529743939638138, -0.03760945051908493, 0.012709327973425388, 0.00549220759421587, -0.02495303563773632, 0.07289079576730728, 0.0072753229178488255, 0.017259711399674416, 0.012984467670321465, 0.05540885776281357, 0.04499588906764984, -0.047366321086883545, -0.010476465336978436, -0.016222646459937096, 0.03824438899755478, -0.0073546902276575565, -0.007486968766897917, 0.029947875067591667, -0.02249794453382492, 0.04757796600461006, 0.05320774391293526, -0.023217540234327316, -0.038180895149707794, 0.024995364248752594, -0.026074757799506187, -0.04512287676334381, 0.009714540094137192, -0.061207953840494156, -0.05841422826051712, -0.0015172355342656374, 0.030286507681012154, 0.025164680555462837, -0.03915446624159813, 0.014741127379238605, 0.01988411881029606, 0.026857847347855568, 0.01643429324030876, 0.04290059581398964, -0.0359162837266922, 0.0038096236530691385, -0.01770416833460331, -0.032508786767721176, -0.007058386225253344, 0.0013796658022329211, 0.07009707391262054, -0.044530268758535385, 0.03915446624159813, 0.010026717558503151, 0.013143201358616352, -0.04249846935272217, -0.008550488390028477, 0.01614857092499733, 0.06861555576324463, 0.029418760910630226, -0.05451994761824608, 0.02107991836965084, -0.07356806844472885, -0.045673154294490814, 0.007698614615947008, 0.0371861606836319, -0.010614034719765186, -0.07208654284477234, 0.030286507681012154, -0.013820468448102474, -0.004687953740358353, 0.0387311726808548, -0.04977908357977867, 0.04304874688386917, 0.03242412954568863, 0.005449878051877022, -0.06759965419769287, 0.026328733190894127, -0.01266699843108654, 0.008598108775913715, 0.053969670087099075, -0.018138041719794273, 0.053038425743579865, 0.033037904649972916, 0.04266778379678726, 0.021132828667759895, -0.023556172847747803, 0.01898462511599064, -0.05282678082585335, -0.01901637203991413, -0.03769410774111748, -0.01861424371600151, -0.04482657089829445, -0.041440241038799286, -0.09905021637678146, 0.010116667486727238, -0.03784226253628731, -0.0033334207255393267, -0.009841527789831161, 0.03629724681377411, 0.017100976780056953, 0.0014735836302861571, -0.007365272380411625, -0.0020529639441519976, 0.0496520958840847, -0.03477339819073677, -0.014931607991456985, 0.009846818633377552, -0.020614296197891235, -0.01421201229095459, -0.104383684694767, 0.0015754380729049444, 0.05777929350733757, 0.0070001836866140366, 0.031344737857580185, -0.01862482726573944, -0.03642423450946808, -0.01362998690456152, -0.03176802769303322, 0.006550436373800039, -0.006095397751778364, -0.0010006875963881612, -0.011185478419065475, 0.033694006502628326, -0.01707981340587139, 0.03462524712085724, -0.03221248462796211, -0.027302302420139313, -0.016899913549423218, 0.021407969295978546, 0.012254289351403713, 0.041143935173749924, -0.029101291671395302, -0.03672054037451744, -0.035217855125665665, -0.007307069841772318, -0.006846740376204252, 0.04228682070970535, -0.00813777931034565, 0.02599009871482849, 0.001404798706062138, -0.0003058942675124854, 0.023556172847747803, 0.006852031219750643, -0.023915970697999, 0.023471513763070107, 0.018159206956624985, -0.024995364248752594, 0.009841527789831161, 0.04846687987446785, 0.007280614227056503, -0.017757078632712364, -0.006889069452881813, -0.004180003888905048, 0.0736527219414711, 0.0300960261374712, -0.014317835681140423, 0.033651676028966904, -0.0005347362603060901, 0.006259423214942217, 0.07797029614448547, -0.07441464811563492, 0.01628614030778408, 0.014751709066331387, -0.03765178099274635, -0.037926919758319855, 0.0033704587258398533, -0.015799356624484062, -0.04436095058917999, 0.02080477774143219, -0.06734567880630493, 0.001009285682812333, -0.05096429958939552, -0.10192859917879105, 0.034053802490234375, -0.0034498258028179407, 0.030159519985318184, 0.030392330139875412, 0.005423422437161207, 0.008158943615853786, -0.05578982084989548, 0.013471252284944057, 0.024656731635332108, 0.04524986445903778, -0.012127301655709743, -0.04973675310611725, 0.0503716915845871, 0.05185320973396301, 0.02740812487900257, -0.02893197536468506, 0.03765178099274635, 0.000732823449652642, -0.02804306335747242, -0.030159519985318184, 0.030434660613536835, 0.041927024722099304, 0.0447419136762619, 0.013788721524178982, 0.05257280543446541, -0.06243550032377243, 0.0465620681643486, -0.02751394920051098, -0.006492233835160732, 0.044403281062841415, 0.08461597561836243, -0.032127827405929565, 0.005994866136461496, 0.07246750593185425, 0.02068837359547615, 0.05985341966152191, 0.0052223592065274715, -0.0007500196807086468, 0.034836892038583755, -0.010121958330273628, 0.04112277179956436, 0.04048783332109451, 0.07458396255970001, -0.04338737949728966, 0.015862850472331047, 0.03538716956973076, 0.015460723079741001, 0.03902747854590416, -0.05337706208229065, -0.0001656789390835911, 0.01821211725473404, -0.045419178903102875, -0.05248814821243286, -0.00601603090763092, -0.03682636097073555, 0.04188469424843788, -0.02713298611342907, -0.00923833716660738, 0.016243811696767807, 0.046096447855234146, -0.058922179043293, 0.0025516541209071875, -0.017640674486756325, -0.005513371899724007, 0.00472234608605504, -0.04817057400941849, -0.07661576569080353, -0.008608691394329071, 0.024614401161670685, -0.017884066328406334, -0.0014735836302861571, -0.055493518710136414, -0.009550514630973339, -0.004444560967385769, -0.07229819148778915, -0.0013598239747807384, 0.009550514630973339, -0.013418341055512428, -0.024910705164074898, 0.05443529039621353, -0.017386699095368385, -0.08338842540979385, 0.0011402415111660957, 0.014550645835697651, -0.03217015415430069, -0.03589512035250664, 0.0022169894073158503, -0.040001049637794495, 0.007582209073007107, -0.014074442908167839, -0.037672944366931915, 0.05299609899520874, -0.0036799905356019735, -0.03424428403377533, -0.01654011569917202, 0.006910234224051237, -0.0016799381701275706, -0.03191617876291275, -0.008899704553186893, 0.007936716079711914, 0.028360530734062195, -0.027323467656970024, -0.021418550983071327, -0.03526018187403679, -0.02366199530661106, -0.004336092621088028, 0.09837295114994049, -0.019735967740416527, -0.02662503719329834, 0.02079419605433941, 0.027175314724445343, 0.04262545704841614, -0.03297441080212593, -0.03178919106721878, 0.03614909574389458, -0.035619981586933136, 0.03229714184999466, -0.02094234712421894, 0.004185294732451439, 0.007867931388318539, 0.03231830894947052, 0.009862692095339298, 0.05308075621724129, 0.014571810141205788, 0.04635041952133179, 0.027979569509625435, -0.0052144224755465984, -0.020878853276371956, 0.08453131467103958, -0.04048783332109451, 0.04228682070970535, 0.007375854533165693, 0.0024828691966831684, -0.05553584545850754, 0.023302197456359863, 0.01574644446372986, 0.09109233319759369, 0.031196584925055504, -0.02996903844177723, -0.004889016970992088, -0.09185425937175751, -0.02715415135025978, 0.023915970697999, 0.0023651414085179567, -0.006513398140668869, 0.0395565927028656, 0.007481677457690239, -0.03771527484059334, -0.021122246980667114, 0.029524583369493484, 0.017344370484352112, -0.03775760158896446, -0.05540885776281357, -0.0014153809752315283, 0.011333630420267582, -0.027302302420139313, -0.02533399686217308, 0.033694006502628326, -0.030455823987722397, -0.03526018187403679, -0.08063703030347824, -0.012571757659316063, -0.00571443559601903, -0.018138041719794273, -0.05578982084989548, -0.04095345363020897, -0.027831416577100754, 0.007846766151487827, 0.07052036374807358, -0.00911134947091341, -0.02416994608938694, 0.028106557205319405, 0.11919888854026794, 0.03204316645860672, -0.03890049085021019, -0.06505990773439407, -0.010323021560907364, 0.024487413465976715, -0.004994839895516634, 0.024593237787485123, 0.05998040735721588, -0.021630195900797844, 0.002074128482490778, 0.00002945265623566229, -0.011682845652103424, -0.0021230715792626143, 0.05155690759420395, -0.03217015415430069, 0.02948225475847721, -0.05172622203826904, -0.04061482101678848, 0.025270503014326096, -0.019302092492580414, 0.06387469172477722, -0.06599114835262299, 0.03322838246822357, 0.058922179043293, -0.00756104476749897, 0.037567123770713806, 0.03669937327504158, -0.010381224565207958, -0.02159844897687435, -0.0008591494988650084, 0.040762972086668015, -0.01556654553860426, 0.018709484487771988, -0.024974199011921883, -0.0032619901467114687, 0.02066720835864544, 0.018148623406887054, -0.011418288573622704, 0.006672132760286331, -0.025228174403309822, 0.01085742749273777, 0.05426597222685814, -0.08804463595151901, 0.06277412921190262, 0.01524907723069191, 0.05333473160862923, 0.02586311101913452, -0.03466757386922836, 0.004830814432352781, 0.008778007701039314, -0.028233544901013374, 0.06988543272018433, -0.03667820990085602, 0.028529848903417587, 0.03373633325099945, -0.03214899078011513, -0.035323675721883774, -0.03363051265478134, -0.01757718063890934, -0.01015370525419712, 0.08059470355510712, 0.032783929258584976, -0.04150373488664627, 0.02196883037686348, -0.03815973177552223, 0.046858370304107666, 0.025672631338238716, -0.0072382851503789425, 0.05016004294157028, 0.01613798923790455, 0.04152489826083183, 0.03269926831126213, -0.02973622828722, 0.006428739987313747, -0.032783929258584976, 0.013344265520572662, -0.047366321086883545, 0.015323152765631676, 0.018180370330810547, 0.0016680331900715828, 0.0183708518743515, 0.029164785519242287, 0.026963669806718826 ]
4,628
optbinning.binning.multidimensional.continuous_binning_2d
_fit_optimizer
null
def _fit_optimizer(self, splits_x, splits_y, R, S, SS): if self.verbose: logger.info("Optimizer started.") time_init = time.perf_counter() # Min/max number of bins (bin size) if self.min_bin_size is not None: min_bin_size = int(np.ceil(self.min_bin_size * self._n_samples)) else: min_bin_size = self.min_bin_size if self.max_bin_size is not None: max_bin_size = int(np.ceil(self.max_bin_size * self._n_samples)) else: max_bin_size = self.max_bin_size # Number of threads n_jobs = effective_n_jobs(self.n_jobs) if self.verbose: logger.info("Optimizer: {} jobs.".format(n_jobs)) if self.monotonic_trend_x is None: logger.info( "Optimizer: monotonic trend x not set.") else: logger.info("Optimizer: monotonic trend x set to {}." .format(self.monotonic_trend_x)) if self.monotonic_trend_y is None: logger.info( "Optimizer: monotonic trend y not set.") else: logger.info("Optimizer: monotonic trend y set to {}." .format(self.monotonic_trend_x)) if self.solver == "cp": scale = int(1e6) optimizer = Binning2DCP( self.monotonic_trend_x, self.monotonic_trend_y, self.min_n_bins, self.max_n_bins, self.min_mean_diff_x, self.min_mean_diff_y, self.gamma, n_jobs, self.time_limit) elif self.solver == "mip": scale = None optimizer = Binning2DMIP( self.monotonic_trend_x, self.monotonic_trend_y, self.min_n_bins, self.max_n_bins, self.min_mean_diff_x, self.min_mean_diff_y, self.gamma, n_jobs, self.time_limit) if self.verbose: logger.info("Optimizer: model data...") time_model_data = time.perf_counter() if self.strategy == "cart": [n_grid, n_rectangles, rows, cols, c, d_connected_x, d_connected_y, mean, n_records, sums, stds] = continuous_model_data_cart( self._clf, R, S, SS, self.monotonic_trend_x, self.monotonic_trend_y, scale, min_bin_size, max_bin_size) else: [n_grid, n_rectangles, rows, cols, c, d_connected_x, d_connected_y, mean, n_records, sums, stds] = continuous_model_data( R, S, SS, self.monotonic_trend_x, self.monotonic_trend_y, scale, min_bin_size, max_bin_size) self._time_model_data = time.perf_counter() - time_model_data if self.verbose: logger.info("Optimizer: model data terminated. Time {:.4f}s" .format(self._time_model_data)) if self.verbose: logger.info("Optimizer: build model...") optimizer.build_model(n_grid, n_rectangles, cols, c, d_connected_x, d_connected_y, mean, n_records) if self.verbose: logger.info("Optimizer: solve...") status, solution = optimizer.solve() self._solution = solution self._optimizer, self._time_optimizer = solver_statistics( self.solver, optimizer.solver_) self._status = status self._time_solver = time.perf_counter() - time_init if self.verbose: logger.info("Optimizer terminated. Time: {:.4f}s" .format(self._time_solver)) self._cols = cols self._rows = rows self._c = c return rows, n_records, sums, stds
(self, splits_x, splits_y, R, S, SS)
[ 0.004883620422333479, -0.03105221502482891, -0.058978911489248276, 0.018032610416412354, -0.024821477010846138, -0.022264234721660614, -0.06612294912338257, -0.03062600828707218, -0.059060096740722656, -0.0192706398665905, -0.021046500653028488, 0.03417773172259331, -0.0039043594151735306, 0.018631329759955406, -0.03513162210583687, 0.05224078521132469, -0.0348677821457386, -0.02248748578131199, -0.013242856599390507, -0.005236255936324596, -0.0384397991001606, -0.04258009418845177, -0.027906402945518494, 0.03192492574453354, 0.0019762807060033083, 0.009264925494790077, 0.010239113122224808, -0.02538975141942501, -0.006535171996802092, 0.02069132961332798, -0.028332609683275223, -0.008828571066260338, -0.011903349310159683, -0.02348196879029274, 0.014206895604729652, -0.036389946937561035, 0.05171310156583786, 0.048181671649217606, 0.0019115885952487588, -0.015099900774657726, -0.03572019562125206, -0.06413398683071136, 0.038277436047792435, 0.007813792675733566, -0.02727724052965641, -0.027541082352399826, -0.04684216529130936, 0.033081769943237305, 0.0079964529722929, -0.04359487444162369, -0.010969753377139568, -0.10318265110254288, -0.007930492050945759, 0.012197635136544704, 0.006514876615256071, 0.03255408629775047, 0.04473142698407173, 0.04363546520471573, 0.024314086884260178, -0.08321181684732437, 0.011446698568761349, -0.025937732309103012, -0.014633102342486382, 0.03206699341535568, -0.0075651719234883785, -0.027033692225813866, -0.06648827344179153, -0.0014498644741252065, 0.04469083622097969, 0.03584196791052818, 0.05309319868683815, -0.0014511329354718328, 0.04050994664430618, -0.0018481649458408356, -0.040672313421964645, -0.00692078797146678, -0.046760983765125275, -0.05033300071954727, 0.005774088203907013, -0.022386008873581886, 0.03860216587781906, 0.040164925158023834, -0.035496942698955536, -0.09271014481782913, -0.017565811052918434, -0.03799329698085785, 0.02672925963997841, 0.02015349641442299, 0.013648767955601215, -0.07058797776699066, 0.004563965369015932, 0.02961122989654541, 0.06230738386511803, 0.039657533168792725, 0.02206127904355526, 0.0017162436852231622, -0.046314481645822525, -0.02293398790061474, 0.010695762932300568, -0.028576156124472618, 0.0034147289115935564, 0.01598275825381279, -0.005312364082783461, 0.07489063590765, -0.007509359158575535, -0.020802954211831093, 0.004787216428667307, -0.0013889777474105358, -0.03186403587460518, -0.06855841726064682, -0.019544629380106926, 0.05301201716065407, -0.03912984952330589, 0.033589161932468414, -0.07411940395832062, 0.00007678224937990308, -0.058491818606853485, 0.010655172169208527, -0.019656255841255188, 0.033568866550922394, -0.04046935588121414, 0.035050440579652786, -0.04805989935994148, 0.01835733838379383, -0.004949580878019333, -0.007763053756207228, 0.03482719138264656, 0.04172768071293831, 0.00019090516434516758, -0.08694620430469513, 0.03192492574453354, -0.04525911062955856, 0.01172068901360035, 0.03239172324538231, 0.005076428409665823, -0.012948570773005486, -0.06510817259550095, 0.04497497156262398, -0.027906402945518494, -0.02206127904355526, 0.07801615446805954, 0.002630812581628561, -0.029773594811558723, -0.03427920863032341, 0.041078224778175354, 0.03052452951669693, 0.03910955414175987, -0.019849061965942383, 0.013526993803679943, 0.005129704251885414, -0.0018177215242758393, -0.010046305134892464, 0.027926698327064514, -0.017687585204839706, -0.02823113091289997, -0.014024235308170319, -0.019443150609731674, -0.0037318470422178507, -0.004898841958492994, -0.025734776630997658, -0.045786794275045395, -0.024212609976530075, -0.0023466746788471937, -0.040246106684207916, -0.021838027983903885, 0.03610581159591675, -0.046192705631256104, 0.03289911150932312, -0.017038127407431602, 0.005763940513134003, 0.019920097663998604, -0.03622758388519287, -0.044812608510255814, 0.009985418058931828, -0.04834403470158577, 0.06246975064277649, 0.015150639228522778, -0.02628275752067566, -0.018123939633369446, 0.03346738591790199, -0.0008708065724931657, -0.03468511998653412, 0.01458236388862133, -0.046760983765125275, -0.046192705631256104, 0.06405280530452728, 0.03529398888349533, -0.06819310039281845, 0.0011251353425905108, 0.010452216491103172, -0.053783249109983444, -0.03610581159591675, -0.015272412449121475, -0.02585655078291893, -0.02258896455168724, 0.016530737280845642, 0.04753221571445465, 0.009954974986612797, 0.01827615685760975, 0.028312314301729202, 0.0019293471705168486, 0.033650048077106476, 0.03574049100279808, -0.00644891569390893, -0.01977802813053131, -0.00737743778154254, -0.04931822419166565, 0.0024519579019397497, 0.03348768129944801, 0.06563585996627808, -0.030240392312407494, -0.04126088321208954, 0.003777512116357684, 0.07480945438146591, 0.08881339430809021, 0.050982460379600525, 0.023664629086852074, -0.008737240917980671, 0.026546599343419075, -0.04136236384510994, 0.049642954021692276, -0.0404287651181221, -0.0497647263109684, 0.009188816882669926, 0.003259975230321288, -0.0394342839717865, 0.03578108176589012, -0.001347118173725903, 0.03908925876021385, -0.027399012818932533, 0.0064641376957297325, -0.037851229310035706, 0.004662906285375357, -0.0225483737885952, 0.014957831241190434, -0.026891624554991722, -0.02301517128944397, 0.03821654990315437, -0.009305516257882118, -0.06656945496797562, -0.03949517011642456, -0.036856748163700104, -0.049074675887823105, -0.028109358623623848, -0.04180886596441269, 0.002040972700342536, 0.03103191964328289, 0.019372116774320602, -0.004114925861358643, -0.004807511810213327, 0.014876649715006351, -0.03415743634104729, -0.04448787868022919, -0.01828630454838276, -0.02019408717751503, -0.06819310039281845, 0.034522756934165955, 0.021533595398068428, 0.008331329561769962, -0.018052905797958374, -0.030443347990512848, 0.02494324930012226, -0.05305260792374611, 0.027114875614643097, -0.024659112095832825, 0.01431852113455534, 0.002180504845455289, -0.012776058167219162, -0.006124186795204878, 0.04493438079953194, 0.08183171600103378, 0.07911211252212524, -0.055650439113378525, 0.03224965184926987, -0.0202651210129261, 0.06823369115591049, -0.022243939340114594, -0.023745810613036156, 0.061739109456539154, -0.0026561820413917303, 0.06242915987968445, 0.018428374081850052, -0.01528256107121706, -0.024801181629300117, -0.03527369350194931, -0.02019408717751503, -0.023786403238773346, -0.021310344338417053, 0.028860293328762054, 0.011862757615745068, -0.029042953625321388, 0.02681044116616249, 0.0848354622721672, 0.03523310273885727, 0.07850324362516403, 0.02530856989324093, 0.023766107857227325, -0.001309063984081149, 0.017575958743691444, -0.007823940366506577, -0.01430837344378233, -0.01314137876033783, -0.011517733335494995, 0.0021297659259289503, 0.047694578766822815, -0.008869161829352379, 0.02301517128944397, -0.045827385038137436, 0.0477757602930069, 0.028271721675992012, 0.010766797699034214, 0.006443841848522425, 0.07054738700389862, 0.029448864981532097, 0.012613694183528423, -0.05297142639756203, -0.03484748676419258, -0.00468573858961463, -0.003407117910683155, 0.05747704207897186, -0.014704137109220028, 0.016611920669674873, 0.04176827147603035, -0.0599936917424202, -0.020863840356469154, 0.010335516184568405, 0.04375723749399185, -0.003736920887604356, -0.07874679565429688, -0.04424433410167694, 0.028515269979834557, -0.0386427566409111, 0.03904866799712181, 0.03474600613117218, 0.0103304423391819, 0.009178669191896915, 0.03669438138604164, 0.010411624796688557, 0.02059999853372574, 0.0013889777474105358, 0.0724145770072937, 0.0508606880903244, -0.013202264904975891, 0.05634048953652382, 0.009772314690053463, -0.04883113130927086, 0.03947487473487854, -0.00182152702473104, -0.03515191748738289, 0.003952561412006617, -0.013374777510762215, 0.026424825191497803, 0.01690620556473732, 0.07030383497476578, 0.04083467647433281, 0.018063053488731384, 0.00801674835383892, -0.002651108196005225, 0.04607093334197998, -0.049034085124731064, -0.07326699048280716, 0.043067190796136856, -0.01460265927016735, 0.04213359206914902, 0.01886472851037979, -0.010868275538086891, -0.04424433410167694, -0.02486206777393818, 0.04091585800051689, -0.0641745775938034, -0.0268713291734457, -0.04826285317540169, -0.0026764776557683945, 0.026181278750300407, 0.00346039398573339, 0.06401221454143524, -0.0506577305495739, -0.013324039056897163, 0.03722206503152847, -0.011801871471107006, 0.009990491904318333, 0.01601320132613182, 0.03160019591450691, -0.0021399136167019606, 0.012126600369811058, -0.014633102342486382, -0.010208669118583202, -0.031681377440690994, 0.11633417755365372, -0.05954718962311745, 0.03326443210244179, 0.016753988340497017, 0.0050003197975456715, -0.00623073847964406, -0.006733053829520941, 0.023624038323760033, 0.09563270211219788, 0.05029240995645523, -0.0544327050447464, -0.011406107805669308, -0.06364689022302628, -0.049480587244033813, 0.02871822565793991, 0.07501240819692612, -0.02591743692755699, -0.05869477614760399, 0.06023723632097244, 0.03285852074623108, -0.023177536204457283, 0.050576549023389816, -0.03673497214913368, 0.002276908839121461, 0.03326443210244179, 0.0112741868942976, -0.08702738583087921, -0.01590157486498356, -0.0011974383378401399, 0.03474600613117218, 0.08296827226877213, -0.0032802708446979523, 0.015120196156203747, 0.016733692958950996, 0.062347978353500366, 0.014866502024233341, -0.012816649861633778, 0.0074028074741363525, -0.04134206473827362, -0.036937929689884186, -0.01499842293560505, -0.03896748647093773, -0.03381241112947464, 0.0001691825600573793, -0.05179428309202194, 0.007707240991294384, -0.028292017057538033, -0.014217043295502663, 0.002314962912350893, 0.05025181919336319, 0.02534916065633297, -0.02248748578131199, 0.027033692225813866, -0.029266204684972763, 0.04093615338206291, -0.02622186951339245, -0.033041179180145264, 0.0007223952561616898, 0.023360196501016617, -0.021695958450436592, -0.11560353636741638, 0.03285852074623108, 0.03052452951669693, 0.016206009313464165, 0.008250147104263306, 0.00823492556810379, -0.03789182007312775, -0.015272412449121475, 0.017667289823293686, -0.013973496854305267, -0.03295999765396118, -0.012329556047916412, -0.009330886416137218, 0.02589714154601097, -0.0040844823233783245, 0.00917359534651041, -0.03391388803720474, 0.009899161756038666, 0.007204925641417503, 0.02065073698759079, 0.029286500066518784, -0.011142265051603317, -0.01595231518149376, 0.002561046741902828, 0.005621871445327997, -0.03868334740400314, 0.0007027339306659997, 0.027053987607359886, -0.01836748607456684, 0.042539503425359726, -0.009802757762372494, -0.011517733335494995, 0.009848423302173615, 0.009351181797683239, -0.007844235748052597, 0.03464452922344208, 0.03271644935011864, -0.006550393532961607, -0.008843792602419853, -0.001638866844587028, 0.009320738725364208, 0.00329802930355072, 0.007549950387328863, -0.010533398017287254, 0.04367605596780777, 0.01217733882367611, -0.009006157517433167, 0.0488717220723629, -0.0017086329171434045, 0.007930492050945759, 0.06149556115269661, -0.061292607337236404, 0.02585655078291893, -0.02445615641772747, -0.040164925158023834, -0.03131605684757233, 0.013334186747670174, -0.0013052584836259484, -0.0626727044582367, 0.04416314885020256, -0.10139664262533188, 0.01245132926851511, -0.024314086884260178, -0.07769142091274261, 0.0014917240478098392, -0.009574432857334614, 0.03322384133934975, -0.0019864283967763186, -0.011507585644721985, 0.012583250179886818, -0.05126659944653511, -0.007128817494958639, 0.012096157297492027, 0.024192314594984055, 0.025714481249451637, -0.029306795448064804, 0.02400965429842472, 0.04452846944332123, 0.012745615094900131, 0.0009405725868418813, 0.05780176818370819, 0.008047191426157951, -0.010234038345515728, -0.03302088379859924, -0.016551032662391663, 0.0857284665107727, 0.07756964862346649, -0.009838275611400604, 0.051428962498903275, -0.06661004573106766, 0.007179556414484978, -0.004071797709912062, -0.03478660061955452, -0.00047409170656464994, 0.07740728557109833, -0.02583625540137291, -0.024740293622016907, 0.05536630377173424, -0.000982432160526514, 0.041545022279024124, -0.02717576175928116, -0.011091526597738266, 0.027561377733945847, 0.06458048522472382, 0.037810638546943665, 0.04034758359193802, 0.04164649918675423, -0.03245260939002037, -0.04801930859684944, -0.0032269947696477175, 0.019920097663998604, 0.04258009418845177, -0.02589714154601097, -0.0192706398665905, 0.016317633911967278, -0.02204098366200924, -0.016287190839648247, 0.005672610364854336, 0.0006558004533872008, 0.01637852191925049, -0.00469588628038764, 0.020447781309485435, 0.024172017350792885, 0.022345418110489845, -0.03858187049627304, -0.028799407184123993, -0.025613002479076385, -0.00030411637271754444, -0.02165536768734455, -0.02587684616446495, -0.062185611575841904, -0.012755762785673141, 0.031255170702934265, -0.026018913835287094, -0.0032954923808574677, -0.01176127977669239, -0.013354482129216194, 0.020052017644047737, -0.1146293506026268, 0.0027931772638112307, 0.0138821667060256, -0.013983644545078278, 0.0058857137337327, 0.07346994429826736, -0.04607093334197998, -0.0555286668241024, 0.0003973491257056594, 0.03519251197576523, -0.04745103046298027, -0.029428569599986076, 0.008544432930648327, -0.017068570479750633, -0.034137140959501266, -0.0039221178740262985, -0.006636649835854769, 0.022304825484752655, 0.01546522043645382, -0.03789182007312775, -0.024537337943911552, 0.04923704266548157, 0.024273496121168137, -0.022386008873581886, -0.005489950533956289, -0.01430837344378233, 0.07075034081935883, -0.014399703592061996, -0.017129456624388695, -0.009447585791349411, 0.002285788068547845, 0.00010274630039930344, 0.10342620313167572, -0.026445122435688972, 0.041078224778175354, 0.0031331279315054417, 0.017667289823293686, 0.03434009477496147, -0.05491979792714119, 0.006408324930816889, 0.051428962498903275, -0.08252176642417908, -0.004160590935498476, -0.05029240995645523, -0.0094374381005764, -0.014034382998943329, 0.041565317660570145, -0.014551919884979725, 0.04834403470158577, -0.004421896301209927, 0.061292607337236404, 0.05504157394170761, 0.006606206297874451, -0.06214502081274986, 0.06453989446163177, -0.006200295407325029, 0.03285852074623108, 0.005081502255052328, -0.018073201179504395, -0.05496039241552353, 0.027601968497037888, 0.06612294912338257, 0.06003428250551224, 0.0650675818324089, -0.03835861757397652, -0.0006881465087644756, -0.08694620430469513, -0.011507585644721985, 0.03247290477156639, 0.0221018698066473, -0.004612167365849018, -0.01650029420852661, 0.04375723749399185, -0.0591006875038147, 0.008382068015635014, 0.02352255955338478, 0.03444157540798187, -0.03756709024310112, -0.03803388774394989, -0.023157240822911263, -0.01699753664433956, 0.005383398849517107, 0.03492866829037666, 0.03608551621437073, -0.02250778116285801, -0.056096941232681274, -0.05528511852025986, 0.009640393778681755, -0.024821477010846138, -0.01217733882367611, -0.022183053195476532, -0.06157674640417099, -0.06279447674751282, -0.015871131792664528, 0.04842521995306015, -0.010097043588757515, -0.012664432637393475, -0.019361969083547592, 0.08191290497779846, 0.023624038323760033, -0.016632216051220894, -0.03582167252898216, 0.04176827147603035, 0.009995565749704838, -0.01171054132282734, 0.0433107353746891, 0.0367552675306797, -0.01646985113620758, 0.038338322192430496, -0.057111721485853195, -0.03062600828707218, -0.004817659966647625, 0.07712315022945404, -0.04130147397518158, 0.030869554728269577, -0.04460965096950531, -0.051875464618206024, 0.011203152127563953, -0.010533398017287254, 0.041545022279024124, -0.07874679565429688, 0.015201378613710403, 0.027033692225813866, -0.03348768129944801, 0.01501871831715107, -0.022893397137522697, -0.0014980663545429707, -0.01130462996661663, 0.014978127554059029, 0.015668176114559174, -0.007352068554610014, -0.0009906772756949067, -0.008174038492143154, 0.012370146811008453, 0.04083467647433281, -0.007052708882838488, 0.01598275825381279, 0.000603793072514236, -0.00017267085786443204, -0.028089063242077827, 0.0726175308227539, -0.054716844111680984, 0.07858442515134811, 0.007478915620595217, 0.06559526920318604, 0.0028794333338737488, -0.010726206004619598, -0.007737684063613415, 0.015221673995256424, 0.00822477787733078, 0.03835861757397652, -0.049602363258600235, 0.014003939926624298, 0.06031842157244682, -0.00823492556810379, -0.02587684616446495, -0.039677828550338745, -0.016794580966234207, -0.055691029876470566, 0.05690876394510269, 0.00659605860710144, -0.011548176407814026, 0.027825219556689262, -0.005342807620763779, 0.056543443351984024, -0.016540884971618652, 0.05183487385511398, 0.049602363258600235, 0.00848862063139677, 0.002727216575294733, 0.003873916110023856, -0.033081769943237305, -0.018225418403744698, -0.03748590871691704, 0.06421516835689545, -0.05309319868683815, 0.005804531741887331, 0.012197635136544704, -0.020326009020209312, -0.011933792382478714, 0.04314837232232094, 0.020041869953274727 ]
4,629
optbinning.binning.multidimensional.binning_2d
_fit_prebinning
null
def _fit_prebinning(self, dtype, x, z, max_n_prebins, min_prebin_size): # Pre-binning algorithm min_bin_size = int(np.ceil(min_prebin_size * self._n_samples)) prebinning = PreBinning(method=self.prebinning_method, n_bins=max_n_prebins, min_bin_size=min_bin_size, problem_type=self._problem_type).fit(x, z) return prebinning.splits
(self, dtype, x, z, max_n_prebins, min_prebin_size)
[ -0.020966988056898117, 0.004691821988672018, -0.03739491105079651, -0.02719947323203087, 0.029678501188755035, 0.025855211541056633, -0.003943312913179398, -0.023009568452835083, -0.01558994222432375, -0.009436017833650112, -0.007746961899101734, 0.020094091072678566, -0.05324672535061836, -0.048567995429039, -0.023620596155524254, -0.0275660902261734, 0.002372097922489047, -0.006367784459143877, -0.0108850272372365, 0.015921643003821373, -0.016200970858335495, 0.018103886395692825, -0.018802203238010406, 0.08149367570877075, 0.009741531684994698, 0.0420038104057312, -0.025977417826652527, -0.009235251694917679, -0.012386409565806389, 0.02054799720644951, -0.011539699509739876, 0.011277830228209496, 0.008637316524982452, -0.023376185446977615, 0.028316782787442207, -0.03564911708235741, 0.054468780755996704, 0.055865414440631866, -0.03514283895492554, -0.003268999746069312, 0.018470503389835358, -0.05080261081457138, -0.025942502543330193, 0.052932482212781906, 0.05321180820465088, 0.024476034566760063, 0.04455266892910004, 0.03381603583693504, 0.005154457408934832, 0.005276663228869438, 0.0012035068357363343, -0.04657778888940811, 0.06152178719639778, 0.0025117613840848207, -0.02435383014380932, 0.02161293290555477, 0.03760440647602081, 0.04881240800023079, 0.003890938824042678, -0.006869700271636248, 0.004918775055557489, 0.04975513368844986, 0.009837550111114979, -0.05122160166501999, -0.020111549645662308, -0.026291660964488983, -0.06557203084230423, -0.014106017537415028, -0.03690608963370323, 0.00920033548027277, 0.025872670114040375, 0.005102083552628756, 0.03561420366168022, 0.04793950915336609, -0.032262276858091354, 0.02566317468881607, 0.021787511184811592, -0.006249943282455206, 0.020705118775367737, 0.0028521912172436714, 0.043400444090366364, 0.04455266892910004, -0.03067360445857048, -0.037115585058927536, -0.00002085064807033632, -0.03276855871081352, 0.011277830228209496, 0.03557928651571274, 0.03578878194093704, -0.021368522197008133, -0.03447943553328514, 0.04399401322007179, 0.05855393782258034, 0.038232892751693726, 0.02678048424422741, 0.002038214821368456, -0.020338501781225204, 0.030795810744166374, 0.016637418419122696, -0.03423502296209335, -0.01776345632970333, -0.0015199320623651147, 0.004613261204212904, 0.02894526906311512, -0.0016257708193734288, 0.02264295145869255, 0.034077901393175125, -0.02945154905319214, -0.10258287191390991, -0.0036683501675724983, -0.009959756396710873, -0.07122840732336044, -0.05918242409825325, 0.0012253293534740806, 0.0005237382720224559, -0.037359997630119324, -0.007873532362282276, 0.025279100984334946, 0.008820625022053719, 0.023515848442912102, 0.021473268046975136, 0.0034501259215176105, -0.036417268216609955, 0.0323844812810421, -0.07527864724397659, -0.004525971598923206, 0.10006892681121826, 0.031057680025696754, -0.03229719400405884, -0.05624948814511299, 0.0791892260313034, 0.01601766236126423, -0.0890355035662651, 0.011007232591509819, -0.033571623265743256, -0.014228222891688347, 0.008270700462162495, 0.02005917578935623, -0.005473064724355936, -0.08393778651952744, 0.06501337885856628, 0.02402212843298912, 0.02280007302761078, 0.012499886564910412, -0.02903255820274353, 0.005582177080214024, 0.08065569400787354, -0.030202239751815796, 0.053176891058683395, -0.008043746463954449, 0.007170849945396185, -0.01719607226550579, -0.018173716962337494, -0.04612388461828232, 0.002845644485205412, 0.0012777030933648348, -0.03488096967339516, -0.04395909979939461, -0.0006175747257657349, -0.006332868710160255, -0.01909898966550827, 0.05970616266131401, -0.05122160166501999, -0.019133904948830605, -0.06634017825126648, 0.040746837854385376, -0.03791864961385727, -0.04636829346418381, -0.0015712147578597069, -0.007851709611713886, 0.0770244374871254, 0.0105009526014328, -0.03058631531894207, 0.054643359035253525, 0.004106980748474598, -0.00968042854219675, 0.0038538407534360886, -0.03847730532288551, -0.04088649898767471, 0.048253752291202545, 0.044273342937231064, -0.011792839504778385, 0.03440960496664047, -0.05764612555503845, -0.03907087445259094, -0.01588672772049904, 0.030446650460362434, -0.014027456752955914, -0.0008930828771553934, -0.0417943149805069, -0.03248922899365425, -0.009086858481168747, -0.00511954165995121, 0.011452410370111465, -0.02513943612575531, -0.002819457557052374, -0.0050104293040931225, 0.023830091580748558, -0.01986713893711567, -0.061905864626169205, -0.04057225584983826, 0.017641250044107437, 0.05614474043250084, -0.027601007372140884, -0.0225382037460804, -0.0006917709833942354, -0.008563120849430561, 0.017335737124085426, 0.04060717299580574, -0.004923139698803425, 0.004440864082425833, -0.05143109709024429, 0.017606334760785103, 0.008776980452239513, -0.013966353610157967, -0.011513512581586838, 0.012491157278418541, -0.03648709878325462, 0.04270212724804878, -0.039873939007520676, 0.030987847596406937, 0.03722033277153969, 0.01075409259647131, 0.018453044816851616, 0.03212261199951172, 0.015275699086487293, 0.02409196086227894, -0.023603137582540512, 0.017012763768434525, -0.009916110895574093, -0.003471948206424713, -0.01645410992205143, -0.03816306218504906, -0.039001043885946274, 0.0035090462770313025, 0.019221194088459015, -0.0010753001552075148, -0.029050016775727272, 0.00779933575540781, -0.018679998815059662, 0.020425792783498764, 0.013573549687862396, -0.005839681718498468, -0.07105382531881332, -0.03760440647602081, 0.046019136905670166, -0.0006044812616892159, 0.006695121061056852, 0.019465604797005653, -0.0059182425029575825, 0.003231901442632079, -0.02927696891129017, -0.03016732446849346, -0.03016732446849346, 0.027618464082479477, 0.001555939088575542, 0.004436499439179897, 0.007397803012281656, 0.007087924517691135, 0.03966444358229637, -0.05174534022808075, -0.004975513555109501, 0.051291435956954956, 0.03509046509861946, 0.010745363309979439, 0.009174148552119732, -0.01533680222928524, 0.026413867250084877, 0.03315263241529465, 0.018191175535321236, 0.03231465071439743, 0.03362399712204933, 0.026588445529341698, -0.018610166385769844, 0.007293055299669504, 0.023009568452835083, -0.017510315403342247, -0.03777898848056793, 0.06166145205497742, -0.01135639101266861, 0.04846324771642685, -0.0037098126485943794, 0.01658504456281662, -0.028438987210392952, 0.04336552694439888, -0.020443249493837357, -0.03781390190124512, -0.0476950965821743, -0.03154650330543518, -0.03725524991750717, -0.0560050792992115, -0.0028609202709048986, 0.014909083023667336, -0.01204598043113947, 0.012988708913326263, -0.03220990300178528, 0.04210855811834335, -0.037534575909376144, 0.011443681083619595, -0.006908980663865805, -0.003207896836102009, -0.06368657201528549, 0.025645717978477478, 0.018714914098381996, -0.009881195612251759, -0.002359004458412528, 0.033466875553131104, -0.03847730532288551, -0.0665147602558136, -0.03809323161840439, 0.01654140092432499, 0.0643150582909584, 0.03774407133460045, -0.06916836649179459, -0.018889494240283966, -0.04605405032634735, 0.055586088448762894, 0.077443428337574, 0.0036268874537199736, 0.041340406984090805, 0.0055036162957549095, 0.003714177291840315, -0.0017796190222725272, 0.00415062578395009, -0.037639323621988297, 0.08952432870864868, 0.03886137902736664, -0.018784746527671814, -0.1050269827246666, -0.04706661403179169, 0.005673831328749657, 0.0016639601672068238, 0.0034959528129547834, 0.04734594002366066, -0.06707341223955154, 0.037988483905792236, 0.01690801791846752, -0.009261438623070717, 0.0010540232760831714, -0.04717135801911354, 0.010169250890612602, -0.008702783845365047, 0.028753230348229408, 0.023376185446977615, -0.0636516585946083, -0.012997438199818134, 0.018540333956480026, -0.014978914521634579, -0.005307214334607124, 0.12241508811712265, 0.0083143450319767, -0.02444111928343773, 0.05052328482270241, -0.014638484455645084, 0.059042759239673615, -0.09546002745628357, 0.031668707728385925, -0.029695959761738777, 0.04109599441289902, -0.007515644188970327, 0.04518115520477295, 0.012805400416254997, -0.013329138979315758, 0.03386840969324112, 0.03484605252742767, -0.004918775055557489, -0.021839885041117668, 0.042387884110212326, -0.018173716962337494, 0.027601007372140884, 0.010640615597367287, -0.03617285564541817, -0.08484560251235962, 0.021665306761860847, 0.03484605252742767, -0.028386613354086876, -0.03138938173651695, -0.011775381863117218, 0.00753746647387743, 0.06134720891714096, -0.017082596197724342, 0.03535233438014984, 0.010073232464492321, 0.004940597806125879, -0.01962272636592388, 0.01658504456281662, -0.02506960555911064, -0.008187774568796158, 0.06867954134941101, -0.05034870654344559, 0.03861696645617485, 0.007057372946292162, 0.007284326478838921, -0.002651425078511238, -0.046019136905670166, -0.02479027770459652, 0.06319775432348251, -0.013538634404540062, 0.027077268809080124, 0.016087492927908897, -0.013879064470529556, -0.054468780755996704, -0.010317644104361534, 0.05387520790100098, 0.03336212784051895, -0.029957829043269157, 0.011539699509739876, -0.0063241394236683846, -0.003096602391451597, 0.01226420421153307, -0.04577472433447838, 0.04364485666155815, 0.08156350255012512, -0.010020858608186245, -0.010300185531377792, 0.020792409777641296, 0.010422391816973686, -0.02229379303753376, -0.025698091834783554, -0.04804425686597824, 0.07129823416471481, -0.004792205058038235, 0.0035199576523154974, 0.017693623900413513, 0.014184578321874142, 0.015528840012848377, -0.014455175958573818, -0.06529270112514496, -0.021804969757795334, 0.009383643977344036, -0.04776493087410927, -0.06078855320811272, -0.05139618366956711, -0.03119734302163124, -0.047136444598436356, 0.022747699171304703, -0.024161791428923607, 0.06553711742162704, -0.03318754956126213, -0.010640615597367287, 0.005691288970410824, 0.006171382497996092, 0.023568222299218178, -0.0111032510176301, -0.0016672335332259536, 0.014376615174114704, 0.00460453238338232, 0.024039587005972862, -0.06228993833065033, -0.019587811082601547, 0.0072057656943798065, -0.052408743649721146, 0.04629846289753914, 0.011696821078658104, 0.0012962522450834513, -0.01824354939162731, -0.029399175196886063, 0.02402212843298912, -0.011111980304121971, 0.027007436379790306, 0.04235296696424484, -0.011958690360188484, -0.008109213784337044, 0.004883859306573868, -0.035107921808958054, 0.0166286900639534, -0.02920713648200035, 0.022415997460484505, 0.007183943409472704, 0.008580578491091728, 0.02808982878923416, 0.010177980177104473, 0.014027456752955914, 0.0033999341540038586, 0.014830522239208221, 0.04891715571284294, 0.029748333618044853, 0.02901509962975979, 0.03816306218504906, -0.01634063385426998, 0.0189244095236063, 0.039524782449007034, 0.006498719099909067, 0.035212669521570206, -0.03603319451212883, -0.03833764046430588, -0.08128418028354645, 0.01627953164279461, -0.026501156389713287, 0.004713644273579121, 0.014114745892584324, 0.07793225347995758, 0.0789797306060791, 0.07178705930709839, 0.0063721491023898125, 0.05729696527123451, 0.038407471030950546, 0.02782795950770378, 0.08770870417356491, -0.037534575909376144, -0.020966988056898117, 0.016829457134008408, -0.03240194171667099, -0.05761120840907097, -0.03645218163728714, 0.02695506252348423, -0.03385094925761223, 0.04235296696424484, -0.052129413932561874, 0.0038451116997748613, -0.032960593700408936, -0.06434997171163559, 0.0026885231491178274, 0.019762391224503517, 0.009776447899639606, 0.018994241952896118, 0.05562100559473038, 0.017030222341418266, -0.08519475907087326, 0.007524373009800911, 0.072206050157547, 0.01841812953352928, 0.011033419519662857, -0.08149367570877075, 0.05509726703166962, 0.030900558456778526, 0.04664762318134308, -0.03809323161840439, 0.014263139106333256, 0.05244365707039833, 0.025855211541056633, 0.00958441011607647, 0.05467827618122101, 0.03517775237560272, 0.03774407133460045, 0.019500521942973137, 0.01927356794476509, 0.03138938173651695, 0.12262458354234695, -0.009156690910458565, -0.023533307015895844, 0.028823062777519226, 0.05488777160644531, 0.026204371824860573, 0.02807237021625042, 0.06312792003154755, 0.037883736193180084, 0.06417539715766907, -0.018173716962337494, 0.0023131773341447115, 0.014402802102267742, -0.010736634023487568, 0.03145921230316162, 0.021455811336636543, 0.020146464928984642, -0.0533863864839077, 0.027932707220315933, -0.009750260971486568, -0.003177345497533679, 0.015860540792346, -0.007066102232784033, 0.03154650330543518, 0.06002040579915047, 0.013102185912430286, -0.08673105388879776, -0.020862240344285965, -0.02754863351583481, 0.021560559049248695, -0.020844783633947372, 0.004338298458606005, 0.0420038104057312, 0.040292929857969284, -0.05726205185055733, -0.0004514514876063913, 0.005608364008367062, -0.005276663228869438, -0.04036276414990425, -0.06728290766477585, -0.0855439156293869, -0.020268671214580536, -0.021630389615893364, -0.032262276858091354, -0.0181562602519989, -0.05883326381444931, -0.04619371518492699, -0.01874982938170433, -0.06976193934679031, 0.0037076305598020554, -0.05328163877129555, 0.023812633007764816, -0.01944814808666706, 0.054224368184804916, -0.033484332263469696, -0.028019996359944344, 0.03819797933101654, -0.04175939783453941, -0.017204802483320236, -0.06029973179101944, -0.012840316630899906, -0.04975513368844986, 0.036242686212062836, 0.0050889900885522366, -0.05191991850733757, 0.08309980481863022, 0.04577472433447838, -0.06581643968820572, -0.04619371518492699, -0.006577279884368181, -0.0015832171775400639, -0.06749240309000015, -0.0007190490141510963, 0.04985988140106201, -0.020321045070886612, -0.005988074000924826, -0.08847685158252716, -0.012028521858155727, -0.03708066791296005, -0.06316283345222473, 0.10684260725975037, -0.030481567606329918, -0.005150092765688896, -0.016794539988040924, 0.05656373128294945, 0.04598421975970268, -0.010282727889716625, -0.035282500088214874, 0.012246746569871902, -0.02487756684422493, 0.018784746527671814, -0.046961866319179535, 0.04144515469670296, 0.024912483990192413, 0.05789053812623024, -0.006743130274116993, 0.0025925044901669025, 0.010692989453673363, 0.0038014668971300125, 0.009837550111114979, -0.007354157976806164, -0.09050197154283524, 0.026239287108182907, -0.03395569697022438, 0.038826461881399155, -0.04430825635790825, 0.03393824025988579, -0.07904956489801407, 0.0046830931678414345, -0.024074502289295197, 0.031144969165325165, -0.014516279101371765, -0.022608034312725067, -0.021228857338428497, -0.036068107932806015, 0.01084138173609972, 0.012953792698681355, 0.031581416726112366, 0.013032353483140469, 0.01831338182091713, 0.011391307227313519, -0.06078855320811272, -0.013975082896649837, -0.010780279524624348, -0.0000963596539804712, -0.014158391393721104, -0.031721081584692, 0.03715050220489502, -0.00422700447961688, -0.07339318841695786, -0.04364485666155815, 0.007480728439986706, -0.042038723826408386, 0.011958690360188484, -0.04050242528319359, -0.06469913572072983, 0.03994377329945564, -0.0189244095236063, -0.09462204575538635, -0.02126377448439598, -0.05062803253531456, -0.0031686164438724518, 0.005333401262760162, -0.024755362421274185, -0.0032886399421840906, 0.027147099375724792, 0.04947580769658089, -0.005368317011743784, -0.04301637038588524, -0.06784156709909439, -0.01023908331990242, 0.08735954016447067, 0.057401712983846664, 0.03704575449228287, 0.06298825889825821, -0.019587811082601547, -0.06253434717655182, -0.013573549687862396, 0.014437718316912651, 0.005276663228869438, -0.012342764995992184, -0.03145921230316162, 0.03795356675982475, -0.03008003532886505, -0.05796036869287491, -0.027182016521692276, -0.025348931550979614, 0.02054799720644951, -0.027059810236096382, 0.011461138725280762, 0.0003472493845038116, 0.034095361828804016, 0.02946900576353073, 0.0404675118625164, -0.02719947323203087, -0.040746837854385376, -0.009662970900535583, 0.07444066554307938, -0.012927605770528316, 0.04881240800023079, -0.01709132455289364, 0.03732508048415184, 0.010614428669214249, 0.03886137902736664, -0.008388541638851166, 0.021892258897423744, -0.025767922401428223, 0.007773148827254772, 0.05719221755862236, -0.03837255761027336, -0.0420038104057312, -0.03652201592922211, 0.0787702351808548, -0.008855541236698627, -0.029940370470285416, 0.03049902431666851, 0.032873306423425674, 0.0013628106098622084, 0.04381943494081497, -0.01472577452659607, 0.02737405337393284, -0.016480296850204468, -0.014612297527492046, -0.029940370470285416, -0.03308280184864998, 0.013861605897545815, -0.0050104293040931225, 0.0501042939722538, 0.06075363978743553, -0.03351924940943718, 0.0271296426653862, -0.015153493732213974, -0.010509680956602097, 0.016401736065745354, 0.0032384481746703386, -0.006223756354302168, -0.031738538295030594, 0.005896419752389193, -0.006537999492138624, 0.0042182751931250095, -0.01459483988583088, -0.033466875553131104, -0.006721307523548603, -0.03542216494679451, -0.012089625000953674, -0.014586110599339008, 0.021822428330779076, -0.0003532505361363292, 0.04399401322007179, 0.00410261657088995 ]
4,634
optbinning.binning.multidimensional.continuous_binning_2d
_prebinning_matrices
null
def _prebinning_matrices(self, splits_x, splits_y, x_clean, y_clean, z_clean, x_missing, y_missing, z_missing, x_special, y_special, z_special): self._n_records_missing = len(z_missing) self._n_records_special = len(z_special) self._sum_missing = np.sum(z_missing) self._sum_special = np.sum(z_special) if len(z_missing): self._std_missing = np.std(z_missing) else: self._std_missing = 0 if len(z_special): self._std_special = np.std(z_special) else: self._std_special = 0 n_splits_x = len(splits_x) n_splits_y = len(splits_y) indices_x = np.digitize(x_clean, splits_x, right=False) n_bins_x = n_splits_x + 1 indices_y = np.digitize(y_clean, splits_y, right=False) n_bins_y = n_splits_y + 1 R = np.empty((n_bins_y, n_bins_x), dtype=float) S = np.empty((n_bins_y, n_bins_x), dtype=float) SS = np.empty((n_bins_y, n_bins_x), dtype=float) for i in range(n_bins_y): mask_y = (indices_y == i) for j in range(n_bins_x): mask_x = (indices_x == j) mask = mask_x & mask_y zmask = z_clean[mask] R[i, j] = np.count_nonzero(mask) S[i, j] = np.sum(zmask) SS[i, j] = np.sum(zmask ** 2) return R, S, SS
(self, splits_x, splits_y, x_clean, y_clean, z_clean, x_missing, y_missing, z_missing, x_special, y_special, z_special)
[ -0.028197044506669044, -0.0051488629542291164, -0.01653253100812435, 0.046321041882038116, 0.012965773232281208, -0.02735450491309166, -0.03272804617881775, 0.0176746416836977, -0.03364547714591026, 0.01980908028781414, -0.04298832267522812, 0.04995333030819893, -0.005088012665510178, 0.017337625846266747, -0.015961475670337677, 0.00010619529348332435, -0.011739407666027546, -0.014061076566576958, -0.004266534931957722, -0.02580048330128193, -0.061861246824264526, -0.021606501191854477, -0.009576885029673576, 0.1375027298927307, 0.0037001599557697773, 0.010924951173365116, -0.014912978745996952, -0.04325044900178909, 0.030705945566296577, 0.012600671499967575, -0.007681167218834162, -0.0023146478924900293, 0.03214762732386589, -0.008125841617584229, 0.016523169353604317, -0.03961816057562828, 0.06302208453416824, 0.05800427868962288, -0.011467921547591686, 0.00009719941590446979, 0.050140563398599625, -0.05100182816386223, 0.018863560631871223, 0.018339313566684723, 0.03654756397008896, 0.006520332768559456, -0.009211783297359943, -0.026530686765909195, -0.04617125913500786, 0.017290817573666573, 0.010550487786531448, -0.06665436923503876, 0.03950582072138786, 0.04662061110138893, 0.015465311706066132, 0.01816144399344921, 0.049578867852687836, 0.024883050471544266, -0.014360646717250347, -0.06998708844184875, 0.0063237398862838745, 0.05208776891231537, -0.022823505103588104, 0.003225060412660241, -0.030949346721172333, -0.04175259545445442, -0.08275626599788666, -0.01335895899683237, 0.06099998205900192, 0.040516868233680725, 0.023928169161081314, 0.06275995820760727, 0.03332718461751938, -0.007096068933606148, 0.0008735514129512012, 0.013134281150996685, 0.007901163771748543, -0.0315859317779541, -0.0014054054627195, -0.05995148792862892, 0.03652884066104889, 0.02628728561103344, -0.03469397500157356, -0.005949276965111494, -0.03856966271996498, -0.01732826419174671, 0.004980354569852352, 0.04624614864587784, 0.03059360757470131, -0.05092693492770195, -0.025594528764486313, 0.046920184046030045, 0.06287229806184769, 0.03424461930990219, 0.045347440987825394, -0.0046901460736989975, -0.04875504970550537, 0.0024503907188773155, 0.05485879257321358, -0.06410802155733109, 0.005078651010990143, -0.02407795563340187, -0.01819889061152935, 0.055008579045534134, 0.006178635638207197, 0.03898157179355621, 0.03540545329451561, -0.03791435435414314, -0.042052168399095535, -0.028009813278913498, 0.01872313767671585, -0.026043884456157684, -0.061411891132593155, 0.013227896764874458, -0.07133515179157257, -0.08440390229225159, -0.015746159479022026, 0.061449337750673294, -0.03976794332265854, 0.01780570298433304, -0.01473510917276144, -0.023516260087490082, -0.028047259896993637, 0.014997233636677265, -0.010335171595215797, -0.005354817491024733, 0.06328420341014862, 0.05826640501618385, -0.005387582816183567, -0.049578867852687836, -0.01571807451546192, 0.01526871882379055, -0.059839148074388504, 0.006805860437452793, -0.08320562541484833, -0.02838427573442459, 0.05470900982618332, 0.004727592226117849, 0.034619081765413284, -0.051189057528972626, 0.05182564631104469, 0.004102707374840975, -0.035049714148044586, 0.012535140849649906, -0.027747690677642822, 0.04220195114612579, 0.09878327697515488, 0.021007360890507698, 0.05294903367757797, 0.012254294008016586, 0.03113657794892788, -0.008682855404913425, -0.01183302327990532, -0.02038949728012085, -0.024546032771468163, 0.00028538156766444445, 0.07024921476840973, -0.008107118308544159, 0.0054718367755413055, -0.003569098189473152, -0.035573963075876236, -0.01392065268009901, -0.023235414177179337, -0.05837874487042427, -0.022804781794548035, 0.06635479629039764, -0.010297725908458233, -0.03003191202878952, 0.014051714912056923, -0.0374462753534317, -0.002339222002774477, 0.014398092404007912, -0.07234620302915573, 0.015708712860941887, 0.026549408212304115, -0.016794653609395027, -0.03770839795470238, -0.0612621046602726, -0.04407426714897156, 0.014341923408210278, 0.04145302623510361, -0.04778144881129265, 0.02203713357448578, -0.04868015646934509, -0.026942595839500427, 0.046920184046030045, 0.052836693823337555, -0.08073417097330093, 0.020052479580044746, 0.015484035015106201, -0.033551864326000214, -0.021119698882102966, -0.033626753836870193, 0.043737247586250305, 0.03497482091188431, 0.01885419897735119, 0.020277157425880432, 0.005434390623122454, 0.026980040594935417, -0.06912582367658615, -0.06227315589785576, -0.030780838802456856, -0.025014111772179604, 0.011374305933713913, 0.010812612250447273, -0.0547838993370533, -0.02952638827264309, 0.0141734154894948, 0.002081778831779957, 0.04145302623510361, 0.011692599393427372, -0.056019626557826996, -0.006805860437452793, 0.03587353229522705, 0.03216635063290596, 0.060775306075811386, 0.027129827067255974, -0.027785135433077812, 0.019640570506453514, -0.03950582072138786, 0.015409142710268497, -0.03649139404296875, -0.028234491124749184, 0.02407795563340187, -0.05100182816386223, 0.034581635147333145, 0.0677403137087822, 0.03606076166033745, 0.023272860795259476, 0.002593154553323984, -0.0005011364701204002, -0.05347328260540962, -0.07242109626531601, -0.029282987117767334, -0.001851250184699893, -0.04999077692627907, 0.012815987691283226, 0.003084636991843581, 0.04972865432500839, -0.04171514883637428, -0.03377654030919075, -0.05425965413451195, -0.005949276965111494, -0.036191824823617935, 0.006857349071651697, -0.0315859317779541, -0.003859306685626507, 0.033570583909749985, -0.00015856156824156642, 0.021681392565369606, 0.007985417731106281, -0.003997389692813158, 0.007217769511044025, -0.008916893973946571, 0.04774400219321251, -0.04197727516293526, 0.005925872828811407, 0.025032835081219673, 0.015203188173472881, -0.03609820827841759, 0.01612062193453312, -0.0037914353888481855, 0.03274676948785782, -0.029226817190647125, -0.015980197116732597, 0.01393937598913908, 0.03304633870720863, 0.04950397461652756, -0.016251683235168457, 0.00328591070137918, -0.010241555981338024, 0.01852654479444027, -0.03958071395754814, 0.009281995706260204, -0.013218535110354424, 0.08515282720327377, 0.03428206592798233, -0.04942908510565758, 0.054971132427453995, 0.01868569105863571, 0.04467340558767319, 0.00008001215610420331, 0.028271937742829323, -0.013761506415903568, 0.04774400219321251, 0.003363143652677536, -0.03385143354535103, -0.02797236666083336, 0.0043273852206766605, -0.07878696173429489, -0.03008808195590973, 0.0050084395334124565, 0.003337399335578084, 0.002236244734376669, 0.011065374128520489, -0.022673720493912697, -0.03875689581036568, -0.0030565522611141205, -0.022392872720956802, -0.00736755458638072, -0.05796683579683304, -0.03482503443956375, 0.07167217135429382, 0.005602899007499218, 0.01629849150776863, -0.012113870121538639, 0.0349186509847641, -0.023516260087490082, 0.0024784754496067762, -0.02742939628660679, 0.03269059956073761, 0.046321041882038116, 0.08455368876457214, -0.024414971470832825, 0.026043884456157684, -0.025369850918650627, 0.014276392757892609, 0.05324860289692879, 0.030986793339252472, 0.08979617059230804, 0.0365850105881691, -0.04972865432500839, 0.012684925459325314, 0.05141373723745346, -0.044748298823833466, 0.02903958596289158, 0.008771790191531181, -0.045759350061416626, -0.047444429248571396, -0.015137656591832638, -0.00036568628274835646, -0.02038949728012085, 0.028590230271220207, 0.04823080077767372, -0.005017800722271204, -0.03489992767572403, 0.020782683044672012, -0.0370156429708004, 0.006333101075142622, -0.032428473234176636, -0.005186309106647968, 0.02404050901532173, 0.004353129304945469, -0.005209713242948055, -0.0016499764751642942, -0.016204874962568283, 0.008959021419286728, 0.003866327926516533, -0.027523012831807137, 0.06942539662122726, -0.009324122220277786, -0.0028412360697984695, 0.011992169544100761, 0.04085388779640198, 0.06852668523788452, -0.0029863405507057905, -0.011804938316345215, 0.0020291199907660484, 0.05568261072039604, 0.002173054264858365, -0.01126196701079607, 0.040404532104730606, 0.0024176251608878374, 0.011402390897274017, 0.025557082146406174, -0.03652884066104889, -0.025856653228402138, 0.027485566213726997, -0.03690330311655998, -0.07504233717918396, -0.0006213741144165397, -0.042089615017175674, -0.04003006964921951, 0.015952114015817642, 0.005607579834759235, 0.04920440539717674, -0.035648852586746216, -0.037202876061201096, 0.03108040802180767, 0.002955915406346321, -0.027129827067255974, 0.0514511838555336, -0.018404845148324966, 0.003103360068053007, 0.004994397051632404, 0.005860342178493738, -0.02038949728012085, 0.003519949968904257, -0.009754754602909088, -0.010363256558775902, 0.04014240577816963, 0.0068620298989117146, 0.027204718440771103, -0.030705945566296577, -0.00603821175172925, 0.016598060727119446, 0.06369611620903015, 0.020520558580756187, -0.021681392565369606, 0.004849292803555727, -0.04456106573343277, -0.09091955423355103, -0.02082012966275215, 0.014248307794332504, -0.01610189862549305, -0.06702883541584015, -0.021718839183449745, -0.03439440205693245, -0.0049850353971123695, 0.019565679132938385, -0.046358488500118256, 0.014828724786639214, 0.06511907279491425, -0.0397304967045784, -0.03254081308841705, 0.010784527286887169, 0.029825957491993904, 0.015446588397026062, 0.018423566594719887, 0.012853434309363365, 0.062460385262966156, 0.005682472139596939, 0.02031460404396057, 0.021344376727938652, -0.03169827163219452, -0.002586133312433958, -0.06953773647546768, -0.04545977711677551, -0.02565069869160652, -0.015455950051546097, -0.01774953491985798, -0.04489808529615402, -0.0610748752951622, -0.02353498339653015, -0.05264946445822716, 0.002548687160015106, 0.02145671658217907, 0.06073785945773125, 0.0034427170176059008, 0.013050027191638947, -0.006192677654325962, 0.009230506606400013, 0.03641650080680847, -0.0495414212346077, -0.02799108996987343, -0.004715890157967806, -0.013555551879107952, 0.008317753672599792, -0.10117983818054199, 0.026530686765909195, 0.001982312183827162, -0.001626572571694851, -0.018676329404115677, -0.016466999426484108, 0.008013502694666386, -0.012432163581252098, 0.011243243701756, -0.014482347294688225, -0.015231272205710411, 0.004285258240997791, 0.003796116216108203, 0.02209330163896084, -0.05306137353181839, 0.04066665470600128, -0.018077189102768898, -0.012703648768365383, -0.026043884456157684, -0.01829250529408455, -0.01776825822889805, 0.021831179037690163, -0.008813916705548763, -0.035667575895786285, -0.02098863758146763, 0.011767491698265076, 0.022617550566792488, 0.002560388995334506, -0.0033935687970370054, 0.023872001096606255, -0.011598983779549599, -0.012647479772567749, -0.06852668523788452, 0.06665436923503876, -0.07436830550432205, 0.02688642591238022, -0.00012060333392582834, -0.005312690511345863, 0.010129217058420181, 0.012413440272212029, 0.04755676910281181, -0.031922951340675354, 0.049017176032066345, 0.017412517219781876, 0.0384947694838047, 0.06047573313117027, -0.04759421572089195, 0.047931231558322906, 0.0026586854364722967, 0.02467709593474865, 0.06706628203392029, -0.05324860289692879, 0.01123388297855854, -0.0030986792407929897, -0.03694074973464012, 0.012104508467018604, -0.030855730175971985, -0.01818016730248928, -0.021269483491778374, -0.022149471566081047, -0.03227869048714638, -0.022299256175756454, -0.04995333030819893, -0.09653649479150772, -0.02141926996409893, 0.01232918631285429, -0.005406306125223637, 0.03649139404296875, 0.026643024757504463, -0.026399623602628708, -0.03909391164779663, 0.02576303668320179, 0.019472062587738037, 0.014894256368279457, -0.032971445471048355, -0.01149600651115179, -0.014641493558883667, 0.034562911838293076, -0.004154196009039879, 0.012535140849649906, 0.015437226742506027, -0.007185004185885191, -0.05485879257321358, -0.023909445852041245, 0.0010467404499650002, 0.01392065268009901, 0.046358488500118256, 0.04564701020717621, 0.043100662529468536, -0.05343583598732948, 0.059165116399526596, -0.017702726647257805, 0.025819206610322, 0.031192747876048088, 0.03920625150203705, -0.02997574396431446, -0.0016956141917034984, 0.07185940444469452, 0.006487566977739334, 0.03707181289792061, -0.010616019368171692, 0.01344321295619011, -0.01716911792755127, -0.016794653609395027, 0.030162975192070007, 0.023778384551405907, 0.06496928632259369, -0.016598060727119446, -0.022317979484796524, -0.03757733851671219, -0.016401467844843864, 0.057143017649650574, 0.004839931149035692, -0.00013215902436058968, 0.05504602566361427, 0.0016792314127087593, -0.12177528440952301, -0.01980908028781414, 0.005841618869453669, 0.016906993463635445, -0.01660742238163948, 0.030294036492705345, -0.04729464650154114, 0.05362306535243988, -0.012703648768365383, -0.009422418661415577, 0.03147359564900398, -0.010176025331020355, 0.017468687146902084, -0.09271697700023651, -0.05115161091089249, -0.03549906983971596, 0.04010495916008949, -0.01666359230875969, 0.00004647872628993355, -0.04407426714897156, -0.005939915310591459, -0.03757733851671219, -0.1302381455898285, 0.03179188817739487, 0.04347512498497963, -0.0035925020929425955, -0.0014100862899795175, 0.04815591126680374, -0.011524091474711895, -0.05081459507346153, -0.011627068743109703, -0.039430927485227585, -0.031398702412843704, -0.04789378494024277, 0.005237797740846872, -0.05347328260540962, 0.05205032229423523, -0.014276392757892609, -0.021793732419610023, 0.048305694013834, 0.019415894523262978, -0.04343767836689949, 0.0014580643037334085, 0.016270406544208527, -0.031810611486434937, -0.015839774161577225, 0.0005075725493952632, 0.014061076566576958, 0.03695947304368019, -0.011374305933713913, 0.004374193027615547, -0.014547877945005894, -0.021157145500183105, 0.003962283954024315, 0.07021176815032959, 0.007578189950436354, 0.00403015548363328, -0.004631636198610067, -0.005373540334403515, 0.03224124386906624, 0.004900781437754631, 0.029657449573278427, 0.07635295391082764, 0.01707550138235092, 0.04021729901432991, -0.01655125431716442, -0.027073657140135765, 0.017646556720137596, 0.057030677795410156, -0.005621621850878, 0.05257457122206688, 0.01980908028781414, 0.051750753074884415, 0.045309994369745255, 0.027073657140135765, -0.011655152775347233, 0.08313073217868805, -0.08432900905609131, 0.05418476089835167, -0.000603236083406955, -0.03257825970649719, -0.04710741341114044, 0.05208776891231537, -0.004970992915332317, 0.060775306075811386, 0.036716073751449585, -0.03336463123559952, -0.009361568838357925, -0.09039530903100967, 0.004512276034802198, 0.03913135826587677, -0.008982425555586815, -0.03049999102950096, 0.030743392184376717, 0.016017643734812737, -0.04134068638086319, -0.03958071395754814, 0.005434390623122454, 0.004507595207542181, -0.0026352815330028534, -0.00890285149216652, 0.03340207785367966, 0.03965560719370842, -0.008514346554875374, 0.00995134748518467, 0.01177685335278511, -0.015942752361297607, -0.010906227864325047, -0.04119090363383293, -0.018713776022195816, -0.01397682260721922, -0.019771633669734, -0.054409436881542206, -0.007063303608447313, -0.0323910266160965, 0.001591466716490686, 0.047032520174980164, -0.005588856525719166, -0.022842228412628174, 0.024508588016033173, 0.09721053391695023, -0.0069509646855294704, -0.031848058104515076, -0.05302392691373825, 0.0032320816535502672, 0.04029219225049019, 0.010194748640060425, -0.0012088125804439187, 0.10095515847206116, -0.009679862298071384, -0.05736769363284111, 0.04272620007395744, 0.015278080478310585, 0.0198652483522892, 0.03548034653067589, -0.013883206993341446, 0.025950267910957336, -0.05369795858860016, -0.06594289094209671, 0.014931702055037022, -0.0015341270482167602, 0.03003191202878952, -0.027579180896282196, 0.04351257160305977, 0.0306310523301363, 0.0017541239503771067, -0.005448433104902506, 0.011552175506949425, 0.0006986070657148957, -0.03171699494123459, -0.037764567881822586, -0.02136310003697872, 0.01827378198504448, 0.057629816234111786, 0.02570686861872673, 0.006819902919232845, 0.008617323823273182, 0.030350206419825554, 0.03338335454463959, -0.0004069356946274638, -0.02731705829501152, -0.009810924530029297, 0.07728911191225052, -0.0731700211763382, 0.013808313757181168, -0.006871391553431749, 0.062385495752096176, 0.025856653228402138, -0.0017506133299320936, 0.07418107241392136, 0.02258010394871235, 0.007147557567805052, 0.05186309292912483, -0.08320562541484833, 0.007671805564314127, 0.05422220751643181, 0.025351127609610558, -0.06654202938079834, -0.0068854340352118015, -0.008013502694666386, -0.03216635063290596, 0.09526332467794418, 0.02679280936717987, -0.016635507345199585, -0.011936000548303127, -0.04388703405857086, 0.036697350442409515, 0.01792740449309349, -0.008907532319426537, -0.0022760313004255295, -0.023965615779161453, 0.054446883499622345, 0.040516868233680725, -0.057217907160520554, 0.003241443308070302, -0.029863404110074043, 0.00785903725773096, -0.013742783106863499, -0.04729464650154114, 0.06627991050481796, 0.004598870873451233, 0.033008892089128494, 0.020670343190431595, 0.047519322484731674 ]
4,635
optbinning.binning.binning
_prebinning_refinement
null
def _prebinning_refinement(self, splits_prebinning, x, y, y_missing, x_special, y_special, y_others, sw_clean, sw_missing, sw_special, sw_others): y0 = (y == 0) y1 = ~y0 # Compute n_nonevent and n_event for special, missing and others. self._n_nonevent_special, self._n_event_special = target_info_special( self.special_codes, x_special, y_special, sw_special) self._n_nonevent_missing, self._n_event_missing = target_info_samples( y_missing, sw_missing) if len(y_others): (self._n_nonevent_cat_others, self._n_event_cat_others) = target_info_samples( y_others, sw_others) n_splits = len(splits_prebinning) if not n_splits: return splits_prebinning, np.array([]), np.array([]) if self.split_digits is not None: splits_prebinning = np.round(splits_prebinning, self.split_digits) splits_prebinning, n_nonevent, n_event = self._compute_prebins( splits_prebinning, x, y0, y1, sw_clean) return splits_prebinning, n_nonevent, n_event
(self, splits_prebinning, x, y, y_missing, x_special, y_special, y_others, sw_clean, sw_missing, sw_special, sw_others)
[ 0.017465978860855103, -0.03769265115261078, -0.03658837452530861, 0.02790139615535736, -0.04240423068404198, -0.06228121742606163, 0.0014183055609464645, -0.005107280798256397, -0.01338935736566782, -0.035576120018959045, -0.0011893982300534844, -0.004361893516033888, -0.012984455563127995, -0.06246526166796684, -0.047152623534202576, -0.013739044778048992, -0.0110979825258255, -0.0009271324379369617, 0.004348090384155512, -0.04041653499007225, -0.013573403470218182, -0.00959800649434328, -0.06224440783262253, 0.07383931428194046, 0.023097790777683258, 0.03403013199567795, -0.014051923528313637, -0.03391970321536064, -0.008259071037173271, -0.004177847411483526, 0.02933695539832115, -0.036349114030599594, 0.012938444502651691, -0.05642854794859886, 0.030551660805940628, -0.014916940592229366, 0.036496352404356, 0.07700490951538086, -0.004863419570028782, 0.008300481364130974, -0.00918390229344368, -0.08657530695199966, 0.024791015312075615, 0.015956800431013107, 0.031140608713030815, 0.019840175285935402, -0.008751394227147102, 0.007025961764156818, -0.012137843295931816, 0.06316463649272919, 0.019122393801808357, -0.09378991276025772, 0.06997434794902802, 0.06875964254140854, -0.008024412207305431, 0.05499298870563507, 0.0601462796330452, 0.0396067313849926, -0.011972201988101006, -0.01417155284434557, 0.029833881184458733, 0.06482104957103729, -0.02090764231979847, -0.016067229211330414, 0.024827824905514717, -0.04339808225631714, -0.02376035787165165, -0.014015113934874535, -0.03012835420668125, 0.02567443810403347, 0.012735993601381779, 0.02871119976043701, -0.0053465403616428375, 0.0008460371172986925, -0.048882655799388885, -0.026686690747737885, 0.004677072633057833, 0.003496876684948802, 0.06887006759643555, -0.035263240337371826, 0.04067419841885567, 0.038907356560230255, -0.01569913700222969, 0.0007988752913661301, 0.01425437442958355, -0.03360682725906372, 0.007674724329262972, 0.04369255527853966, 0.06191312521696091, -0.009004457853734493, -0.052195485681295395, 0.01677580550312996, 0.02979707159101963, 0.0491035133600235, 0.048551373183727264, 0.016048824414610863, -0.03344118595123291, -0.002944738371297717, 0.03839202597737312, -0.0507231168448925, 0.004667870234698057, 0.012864825315773487, -0.049692459404468536, 0.024993466213345528, 0.026852332055568695, 0.02663147822022438, 0.03901778161525726, -0.03432460501790047, -0.06471062451601028, -0.03767424449324608, 0.02171744592487812, -0.07406017184257507, -0.11153196543455124, 0.034766316413879395, -0.03850245475769043, -0.021165307611227036, -0.03708529844880104, 0.04085824638605118, 0.00048570928629487753, 0.01867148093879223, -0.014548847451806068, -0.03629390150308609, -0.0506863072514534, 0.021607017144560814, -0.010085728950798512, -0.013481380417943, 0.11219453066587448, 0.08650168776512146, -0.021146902814507484, -0.04928755760192871, 0.05098078399896622, 0.0031011775135993958, -0.07567977905273438, 0.03242893144488335, -0.07678405195474625, -0.0005662294570356607, -0.005792852491140366, 0.033974919468164444, 0.046195581555366516, -0.0934954434633255, 0.06033032760024071, -0.03552090749144554, 0.0014700685860589147, 0.034784723073244095, -0.015533494763076305, 0.04409745708107948, 0.037637438625097275, 0.020410718396306038, 0.032244883477687836, 0.02598731592297554, 0.012910837307572365, 0.02584007941186428, -0.033662039786577225, -0.07803556323051453, -0.0021349352318793535, -0.004131835885345936, -0.003151790238916874, 0.01868068426847458, -0.02361312136054039, -0.014696084894239902, 0.03426939249038696, -0.03725093975663185, 0.03691965714097023, -0.03202402964234352, -0.00036464142613112926, 0.06699279695749283, -0.06088246405124664, -0.04214656725525856, 0.014576454646885395, -0.015588708221912384, 0.06246526166796684, 0.03259457275271416, -0.04836732894182205, 0.03023878112435341, 0.011475277133286, 0.04185209423303604, -0.018091736361384392, -0.07266142219305038, -0.02042912319302559, 0.02722042426466942, 0.049508415162563324, -0.01854264922440052, 0.027809372171759605, -0.05786410719156265, -0.03040442429482937, 0.010104133747518063, 0.015257425606250763, -0.07067371904850006, 0.0018393112113699317, 0.03364363685250282, -0.024367710575461388, -0.01569913700222969, -0.014558049850165844, 0.049508415162563324, 0.00048570928629487753, 0.01570833846926689, -0.013131693005561829, 0.024975061416625977, -0.0005389100988395512, -0.0633486807346344, -0.06246526166796684, -0.012137843295931816, -0.016067229211330414, 0.0300731398165226, -0.02996271289885044, -0.01267157681286335, -0.01569913700222969, 0.004564344417303801, 0.02250884287059307, -0.022306393831968307, 0.032705001533031464, -0.01708868518471718, 0.008907833136618137, 0.03347799554467201, -0.006358794402331114, 0.04501768574118614, 0.06161864846944809, 0.006216158624738455, -0.009294330142438412, -0.028435129672288895, 0.011944594793021679, -0.03601783141493797, 0.002726183505728841, -0.006538239307701588, 0.027386067435145378, 0.005010656546801329, 0.0443183109164238, 0.014613264240324497, 0.03012835420668125, -0.008866422809660435, -0.04733666777610779, -0.006055118050426245, -0.06250207126140594, -0.04707900434732437, 0.028435129672288895, 0.02088923752307892, 0.002290224190801382, -0.06537318974733353, 0.03218967095017433, -0.003777547273784876, 0.006979950238019228, 0.0013527391711249948, -0.03544728830456734, -0.041263144463300705, 0.01677580550312996, -0.018432222306728363, 0.0034025530330836773, 0.05248996242880821, -0.015423066914081573, 0.014870928600430489, 0.0033358363434672356, 0.003759142477065325, -0.020153053104877472, -0.019895387813448906, 0.027441279962658882, -0.020061029121279716, -0.020373908802866936, 0.01498135644942522, 0.011705335229635239, 0.006013707723468542, 0.010904734022915363, 0.03023878112435341, 0.009533590637147427, 0.006524435710161924, 0.005599603988230228, 0.024441327899694443, 0.02933695539832115, 0.01792609505355358, 0.01854264922440052, 0.017659228295087814, -0.022122347727417946, -0.010398607701063156, -0.016426118090748787, 0.016131645068526268, -0.01387707982212305, 0.042036138474941254, -0.00042215586290694773, -0.029097694903612137, 0.05955733358860016, -0.007071973290294409, 0.05797453597187996, 0.012947645969688892, 0.045091304928064346, 0.002320131752640009, 0.01211023610085249, -0.006009106524288654, -0.023337051272392273, -0.036698803305625916, 0.007476874627172947, -0.04700538516044617, -0.03719572722911835, 0.03231850266456604, 0.0713730975985527, 0.020870832726359367, 0.052048251032829285, -0.010748295113444328, -0.0021096288692206144, -0.014788107946515083, 0.011245219968259335, -0.008866422809660435, 0.01836780458688736, -0.01919601298868656, -0.032907452434301376, -0.03369884938001633, 0.00793238915503025, -0.02311619557440281, 0.07269822806119919, -0.014843321405351162, -0.03504238650202751, -0.06942220777273178, 0.022214369848370552, 0.017981309443712234, 0.05904200300574303, -0.05992542579770088, 0.024606969207525253, -0.07678405195474625, 0.042551469057798386, 0.053483810275793076, -0.011714537627995014, 0.032907452434301376, 0.025619223713874817, -0.021643826737999916, 0.0057606445625424385, 0.04568025469779968, -0.04579067975282669, 0.028545556589961052, 0.012091832235455513, -0.028011823073029518, -0.1029186025261879, -0.022453630343079567, -0.00060332624707371, -0.012294282205402851, -0.02411004528403282, 0.0348399356007576, -0.04833051934838295, -0.016831019893288612, 0.017162302508950233, -0.009625613689422607, 0.01808253303170204, -0.028251083567738533, -0.007849568501114845, 0.014392408542335033, -0.022913744673132896, 0.04417107626795769, -0.005723834969103336, 0.008203856647014618, 0.02803022786974907, 0.016849424690008163, 0.027919800952076912, 0.062170788645744324, -0.024680588394403458, -0.01680341362953186, -0.008512134663760662, 0.026097742840647697, 0.09077155590057373, -0.06224440783262253, -0.012735993601381779, -0.05462489649653435, 0.05440404266119003, -0.007417059503495693, 0.02326343208551407, 0.008861822076141834, -0.0013665426522493362, 0.07093138247728348, 0.01998741179704666, -0.03198722004890442, -0.04218337684869766, 0.044134266674518585, -0.09886959195137024, -0.04148400202393532, -0.021791063249111176, -0.04869861155748367, -0.020079433917999268, 0.03835521638393402, 0.0008000255911611021, 0.021938299760222435, 0.0041594430804252625, -0.038428835570812225, 0.024441327899694443, 0.012303484603762627, -0.02600572071969509, 0.05959414318203926, -0.04803604260087013, 0.015064177103340626, -0.003864969126880169, 0.034158963710069656, -0.0007287077023647726, -0.02615295723080635, 0.08466123044490814, -0.045569825917482376, 0.02867439016699791, -0.012625565752387047, -0.013849472627043724, 0.0020429121796041727, -0.03202402964234352, -0.01014094240963459, 0.09069794416427612, 0.002779096830636263, 0.016453726217150688, -0.006271372549235821, 0.021791063249111176, -0.040011633187532425, -0.05374147370457649, 0.014199160039424896, 0.020870832726359367, -0.0427723228931427, -0.0034025530330836773, 0.030386019498109818, 0.01331573911011219, 0.01773284561932087, -0.0395699217915535, 0.03465588763356209, 0.03456386551260948, -0.04214656725525856, -0.0506863072514534, 0.011070375330746174, -0.02284012734889984, 0.03934906795620918, 0.002256865845993161, -0.025619223713874817, 0.030625278130173683, -0.013288131915032864, 0.01329733431339264, 0.03040442429482937, -0.0166285689920187, 0.022711293771862984, -0.03679082542657852, -0.04866180196404457, -0.01117160078138113, 0.02042912319302559, -0.002172894775867462, -0.07394973933696747, -0.04939798638224602, -0.038723308593034744, -0.03623868525028229, -0.011714537627995014, 0.0029861486982554197, 0.04707900434732437, 0.0062575689516961575, -0.009390954859554768, -0.0348215326666832, 0.03712210804224014, 0.05801134556531906, -0.014870928600430489, 0.016407713294029236, -0.010720687918365002, -0.025453582406044006, -0.005599603988230228, -0.057091113179922104, -0.019619319587945938, -0.033496398478746414, -0.015653124079108238, -0.003554391209036112, 0.020005816593766212, 0.003630310297012329, -0.0475943349301815, -0.011208410374820232, 0.0130672762170434, 0.005553592462092638, -0.004067420028150082, -0.0012837218819186091, 0.01744757406413555, -0.06360635161399841, 0.052195485681295395, 0.031177416443824768, -0.00863636564463377, -0.016600962728261948, -0.04089505225419998, -0.0411895290017128, 0.028876841068267822, 0.011134792119264603, -0.0309013482183218, 0.026741905137896538, 0.011180803179740906, 0.021459780633449554, 0.01932484470307827, -0.008121035993099213, 0.006285175681114197, 0.04939798638224602, -0.021901492029428482, -0.00016377231804654002, 0.039054591208696365, -0.059483714401721954, 0.02663147822022438, 0.004863419570028782, -0.01837700791656971, -0.07752023637294769, 0.002071669325232506, -0.02094445191323757, 0.0007885227096267045, -0.0054017542861402035, 0.009156296029686928, 0.049986932426691055, 0.04803604260087013, -0.046637292951345444, 0.05278443545103073, 0.026741905137896538, -0.008792804554104805, 0.12920039892196655, -0.045054495334625244, 0.020981261506676674, 0.0031632932368665934, -0.03791350498795509, -0.012726791203022003, -0.03456386551260948, -0.054919369518756866, -0.020318694412708282, 0.023484287783503532, -0.06460019946098328, 0.03252095356583595, -0.013398559764027596, -0.09003537148237228, 0.076121486723423, 0.00028958512120880187, 0.0018232071306556463, -0.009133289568126202, 0.04652686417102814, 0.0003085648640990257, -0.017668429762125015, 0.026226576417684555, 0.03388289734721184, 0.00217749597504735, 0.015588708221912384, -0.04137357324361801, 0.02405483089387417, 0.02471739798784256, -0.017355551943182945, -0.034140560775995255, -0.012588756158947945, -0.0348399356007576, -0.0062575689516961575, -0.03861287981271744, 0.06953263282775879, 0.028085442259907722, 0.022398415952920914, 0.019564105197787285, 0.049508415162563324, -0.003989200107753277, 0.0427723228931427, -0.010895531624555588, 0.02600572071969509, 0.03187679126858711, 0.020392313599586487, 0.031784769147634506, 0.006483025383204222, 0.047115813940763474, 0.01836780458688736, 0.021349353715777397, -0.023245029151439667, 0.023576311767101288, -0.031453486531972885, -0.009864873252809048, 0.01820216327905655, 0.05764325335621834, 0.045533016324043274, -0.06875964254140854, 0.030606873333454132, 0.011926189996302128, 0.0043411883525550365, 0.05197463184595108, -0.03344118595123291, 0.030606873333454132, 0.04004844278097153, -0.04520173370838165, -0.03437982127070427, 0.01346297562122345, 0.027680540457367897, 0.05344700068235397, 0.01963772438466549, 0.036846037954092026, 0.046342819929122925, 0.037803079932928085, -0.0316375307738781, -0.022545652464032173, -0.016398511826992035, -0.012303484603762627, 0.0026732701808214188, -0.1045382097363472, -0.09702912718057632, -0.053631048649549484, 0.013508987613022327, -0.060440756380558014, -0.02630019374191761, -0.056980688124895096, -0.031011775135993958, -0.005479974206537008, -0.1013726145029068, 0.035226430743932724, 0.025619223713874817, 0.026833927258849144, -0.0174107663333416, 0.04244104027748108, 0.002314380370080471, -0.016831019893288612, -0.007357244845479727, 0.005512182135134935, -0.004348090384155512, -0.024754207581281662, -0.03717732056975365, -0.038907356560230255, 0.06842835992574692, -0.011751346290111542, 0.018450627103447914, 0.036385923624038696, 0.03375406190752983, -0.04310360923409462, -0.014134744182229042, -0.0017817968036979437, -0.015781957656145096, -0.04306679964065552, 0.021441375836730003, 0.01932484470307827, 0.027367662638425827, -0.01982177048921585, -0.029447384178638458, 0.04240423068404198, -0.031140608713030815, 0.006229962222278118, 0.07372888922691345, 0.011162398383021355, 0.007582701276987791, -0.0348399356007576, -0.016398511826992035, 0.029852284118533134, -0.027772564440965652, -0.0380607433617115, 0.050318215042352676, -0.05179058387875557, 0.012404710054397583, -0.033827681094408035, -0.008921637199819088, 0.001406802679412067, 0.06890688091516495, -0.036698803305625916, 0.019840175285935402, 0.03817117214202881, 0.03316511586308479, 0.01211023610085249, -0.014300385490059853, -0.06887006759643555, 0.023484287783503532, -0.021422971040010452, 0.05731197074055672, -0.01196299958974123, -0.011852571740746498, -0.054735325276851654, -0.012588756158947945, -0.016692984849214554, 0.06585171073675156, 0.02504868060350418, 0.00332433357834816, 0.024459732696413994, -0.058195389807224274, 0.009864873252809048, -0.023226624354720116, 0.03246574103832245, -0.03276021406054497, 0.023097790777683258, 0.02359471656382084, -0.04008525237441063, -0.022895339876413345, 0.03850245475769043, 0.00709497882053256, 0.007315834518522024, -0.019251227378845215, 0.0364595428109169, 0.010978352278470993, -0.049361176788806915, 0.06776579469442368, -0.006538239307701588, -0.039238639175891876, -0.021975109353661537, -0.040158867835998535, -0.015367853455245495, 0.011374051682651043, -0.047925617545843124, -0.04236742481589317, 0.01725432649254799, -0.025784865021705627, 0.0005084275035187602, 0.0036717206239700317, -0.028619175776839256, -0.03150869905948639, -0.015478281304240227, 0.06482104957103729, 0.0065750484354794025, -0.047115813940763474, -0.024349305778741837, 0.027017975226044655, 0.049692459404468536, 0.04689495638012886, 0.006312782876193523, 0.07501720637083054, 0.0003810330235864967, -0.04354531690478325, 0.008134840056300163, 0.007306632120162249, -0.014631669037044048, 0.014548847451806068, -0.030165163800120354, 0.058232199400663376, -0.0618395060300827, -0.0697902962565422, -0.02819586917757988, -0.012137843295931816, 0.06437934190034866, -0.03264978528022766, -0.03498717397451401, -0.03467429429292679, -0.01914079859852791, -0.022306393831968307, 0.0007735689869150519, -0.05433042347431183, -0.04188890382647514, -0.017189910635352135, 0.04310360923409462, -0.017696037888526917, 0.0007333088433369994, 0.0025858483277261257, 0.00704896729439497, -0.0025099292397499084, 0.04877222701907158, 0.008608758449554443, 0.030496446415781975, -0.03187679126858711, 0.018505839630961418, 0.09864873439073563, -0.11683249473571777, -0.0006568146636709571, -0.030956562608480453, 0.06997434794902802, 0.021110093221068382, -0.022067133337259293, 0.028435129672288895, 0.05988861620426178, -0.006690077483654022, 0.04862499237060547, -0.014926142059266567, 0.03690125420689583, 0.009073475375771523, 0.002749189268797636, -0.06003585457801819, -0.005512182135134935, 0.016067229211330414, -0.04328765347599983, 0.09754445403814316, 0.021607017144560814, -0.039238639175891876, -0.010720687918365002, -0.041263144463300705, -0.0009340341784991324, 0.04019567742943764, 0.02282172255218029, -0.003777547273784876, -0.021441375836730003, 0.02042912319302559, 0.033036284148693085, 0.022251179441809654, -0.018284983932971954, -0.015625517815351486, 0.0049600438214838505, 0.025545604526996613, -0.00008965060260379687, 0.03391970321536064, 0.011843369342386723, 0.020318694412708282, 0.010647069662809372, 0.03997482359409332 ]
4,638
optbinning.binning.multidimensional.binning_2d
_splits_xy_optimal
null
def _splits_xy_optimal(self, selected_rows, splits_x, splits_y, P): bins_x = np.concatenate([[-np.inf], splits_x, [np.inf]]) bins_y = np.concatenate([[-np.inf], splits_y, [np.inf]]) bins_str_x = np.array([[bins_x[i], bins_x[i+1]] for i in range(len(bins_x) - 1)]) bins_str_y = np.array([[bins_y[i], bins_y[i+1]] for i in range(len(bins_y) - 1)]) splits_x_optimal = [] splits_y_optimal = [] for i in range(len(selected_rows)): pos_y, pos_x = np.where(P == i) mask_x = np.arange(pos_x.min(), pos_x.max() + 1) mask_y = np.arange(pos_y.min(), pos_y.max() + 1) bin_x = bins_str_x[mask_x] bin_y = bins_str_y[mask_y] splits_x_optimal.append([bin_x[0][0], bin_x[-1][1]]) splits_y_optimal.append([bin_y[0][0], bin_y[-1][1]]) return splits_x_optimal, splits_y_optimal
(self, selected_rows, splits_x, splits_y, P)
[ 0.043789658695459366, -0.032634709030389786, -0.04295952245593071, -0.0024731126613914967, -0.022984381765127182, -0.021220343187451363, 0.04842458292841911, -0.0005712587735615671, -0.08695671707391739, 0.017666324973106384, 0.013965304009616375, 0.01952548325061798, -0.04088418185710907, -0.03109550103545189, -0.020805276930332184, -0.02410852536559105, -0.004522510338574648, -0.035384535789489746, -0.03915473446249962, -0.00044776525464840233, 0.00800302717834711, -0.01743284985423088, 0.0356612466275692, 0.02825920283794403, 0.0171042550355196, -0.013048695400357246, 0.02685834839940071, -0.010610171593725681, 0.019663840532302856, -0.03936226665973663, -0.017709562554955482, -0.010774469934403896, -0.004535480868071318, -0.01154407486319542, -0.05790196731686592, 0.0209263376891613, 0.06343620270490646, 0.08903205394744873, 0.08695671707391739, -0.01393936201930046, -0.07270605117082596, -0.026685403659939766, 0.002764957258477807, -0.0002309085102751851, -0.004215532913804054, -0.0025422906037420034, -0.02545749582350254, 0.006117927376180887, -0.025353727862238884, 0.028449442237615585, 0.02727341651916504, -0.0978868380188942, -0.0005477490485645831, 0.031648922711610794, 0.0006215208559297025, 0.06675674766302109, 0.05209101736545563, 0.037148572504520416, 0.04652218893170357, -0.059942714869976044, 0.004038264509290457, 0.012650921940803528, 0.017968978732824326, 0.03666432574391365, 0.012858456000685692, -0.08377452939748764, -0.07236016541719437, -0.03220234811306, -0.04572664201259613, 0.07830946892499924, 0.03732151910662651, 0.02931416779756546, 0.011466249823570251, -0.033741556107997894, -0.030957143753767014, 0.04078041762113571, 0.007432308979332447, 0.026304924860596657, 0.04320164769887924, 0.022223424166440964, -0.01924877241253853, -0.021185755729675293, 0.049496840685606, -0.011881317012012005, -0.008305680938065052, -0.015115387737751007, 0.03135491907596588, 0.02443712018430233, 0.041748907417058945, -0.020355619490146637, 0.018384046852588654, 0.06461223214864731, -0.011985084041953087, 0.021133871749043465, 0.01636059209704399, 0.004717073403298855, -0.010082690045237541, 0.06461223214864731, 0.007531752344220877, -0.015513161197304726, -0.003173539647832513, 0.004241474438458681, -0.015599633567035198, 0.050223208963871, 0.05759066343307495, 0.0011425175471231341, 0.03144139051437378, -0.010679350234568119, -0.03569583594799042, -0.02483489364385605, 0.031545158475637436, 0.05413176491856575, -0.05108793452382088, 0.024004757404327393, -0.05101875588297844, 0.008872075006365776, -0.035055939108133316, -0.031303033232688904, -0.02230989746749401, -0.00410960428416729, -0.03182186931371689, -0.016559477895498276, -0.043858837336301804, 0.045207805931568146, -0.024852188304066658, 0.0017910610185936093, 0.04544993117451668, 0.03707939386367798, -0.057417720556259155, -0.07319030165672302, 0.016187645494937897, 0.010938767343759537, -0.0078473761677742, -0.0074928393587470055, -0.09000054746866226, -0.02971194125711918, -0.04372048005461693, 0.002587688621133566, 0.030801493674516678, -0.06481976062059402, 0.006757823284715414, -0.009382262825965881, 0.008846133947372437, 0.03732151910662651, 0.029919475317001343, 0.0014981355052441359, 0.07346700876951218, 0.03465816751122475, 0.07830946892499924, 0.027688484638929367, -0.002300167689099908, 0.011673783883452415, -0.042060207575559616, -0.05696806311607361, 0.015642870217561722, -0.048770472407341, 0.025941740721464157, -0.011518132872879505, 0.010022159665822983, -0.027480950579047203, 0.0418526753783226, -0.06302113831043243, 0.008833162486553192, -0.015262390486896038, -0.014708966948091984, 0.07045777142047882, 0.014864617958664894, -0.0000712722321623005, -0.020805276930332184, -0.029573583975434303, 0.03377614542841911, 0.05302491784095764, -0.07180673629045486, -0.03400097414851189, -0.03171810135245323, -0.015063504688441753, -0.002723882906138897, -0.025734206661581993, 0.03635302558541298, 0.015314274467527866, 0.02829379215836525, -0.036871861666440964, 0.06035778298974037, -0.03676809370517731, 0.02377992868423462, 0.026668108999729156, 0.05475436896085739, -0.025699617341160774, -0.022500136867165565, 0.02687564305961132, -0.10293682664632797, -0.04292493313550949, 0.0195600725710392, 0.0034913260024040937, -0.057798199355602264, 0.08446630835533142, -0.026045508682727814, 0.019023943692445755, -0.04679889976978302, 0.0071383025497198105, -0.04389342665672302, -0.026962116360664368, 0.0038501867093145847, 0.022984381765127182, 0.0046219537034630775, -0.011682430282235146, -0.011353835463523865, 0.0027714427560567856, 0.05589580535888672, 0.002693617483600974, -0.010082690045237541, -0.06582284718751907, -0.036491382867097855, 0.03569583594799042, 0.032306116074323654, 0.056760530918836594, -0.03725234046578407, 0.003986380994319916, 0.0016516242176294327, -0.03166621923446655, 0.022085068747401237, -0.016689186915755272, 0.031597040593624115, 0.022915204986929893, 0.042371511459350586, -0.004096633289009333, 0.048770472407341, -0.048770472407341, -0.004829487297683954, 0.006230341270565987, 0.010783117264509201, -0.0993395745754242, 0.016559477895498276, -0.057417720556259155, -0.05036156624555588, 0.014553316868841648, 0.0092784957960248, -0.06084202975034714, -0.005486678332090378, 0.020027024671435356, -0.03974274545907974, 0.007185862399637699, 0.0243852362036705, -0.02379722334444523, -0.0019283361034467816, 0.0376674085855484, -0.022482842206954956, 0.000126668659504503, 0.03552288934588432, 0.007696049753576517, 0.014449549838900566, 0.003154083387926221, -0.016334649175405502, -0.042371511459350586, 0.06409339606761932, -0.029815707355737686, -0.00671891076490283, 0.015824461355805397, -0.002814678940922022, 0.04230233281850815, -0.017000487074255943, 0.010169162414968014, -0.028847215697169304, -0.015141329728066921, 0.017588499933481216, -0.03377614542841911, -0.003082743613049388, 0.03701021522283554, -0.05475436896085739, 0.01393936201930046, 0.028535915538668633, 0.07491974532604218, -0.057798199355602264, 0.026598932221531868, -0.02891639433801174, 0.08086905628442764, 0.008193266578018665, -0.03673350438475609, 0.007579312194138765, -0.021791063249111176, 0.056795116513967514, 0.02545749582350254, 0.028034374117851257, 0.023140033707022667, 0.003969086334109306, 0.008629952557384968, 0.05416635423898697, -0.03801329806447029, 0.027014000341296196, -0.015625575557351112, -0.07727179676294327, 0.03451981022953987, -0.008258121088147163, 0.020753392949700356, 0.05554991587996483, 0.033326487988233566, 0.04043452814221382, -0.05070745572447777, -0.016135763376951218, -0.041748907417058945, 0.02232719212770462, -0.05475436896085739, -0.00751878134906292, -0.0018764525884762406, 0.03880884498357773, 0.014371724799275398, -0.009857861325144768, -0.02716965042054653, 0.013031400740146637, 0.013697239570319653, 0.03569583594799042, -0.015590986236929893, 0.0017391775036230683, -0.09601902961730957, 0.010679350234568119, -0.008128412067890167, 0.027135061100125313, 0.024852188304066658, 0.01032481249421835, 0.009702211245894432, -0.019784901291131973, -0.04008863866329193, -0.006053072866052389, 0.005447765812277794, -0.0051840245723724365, 0.05164135992527008, 0.0050283740274608135, -0.01465708389878273, -0.04755985736846924, -0.010930120013654232, 0.012253149412572384, 0.029763823375105858, -0.01886829361319542, 0.017968978732824326, 0.04842458292841911, -0.0043819923885166645, 0.0676906481385231, 0.026979411020874977, 0.021497055888175964, -0.012538508512079716, 0.022638492286205292, -0.01397395133972168, -0.008923958986997604, 0.013766417279839516, 0.04818246141076088, 0.037874940782785416, 0.01534021645784378, 0.07526563853025436, -0.044550616294145584, 0.024748420342803, 0.02270767092704773, -0.02239636890590191, -0.003452413249760866, -0.06492353230714798, 0.03074960969388485, 0.03246176615357399, 0.016922662034630775, 0.0017121549462899566, 0.02729071117937565, 0.041748907417058945, 0.045588284730911255, -0.0791396051645279, 0.025353727862238884, -0.02234448678791523, -0.04410095885396004, 0.002159649971872568, -0.01553910318762064, -0.007579312194138765, 0.0007966276025399566, -0.027463655918836594, -0.020442090928554535, -0.027740368619561195, 0.001131708500906825, 0.038290008902549744, 0.038255419582128525, 0.056795116513967514, -0.05821326747536659, 0.00840080063790083, -0.03182186931371689, -0.0006253040628507733, 0.03068043291568756, -0.022275308147072792, 0.09574231505393982, 0.002022374887019396, -0.007955467328429222, 0.030161596834659576, -0.009339027106761932, -0.06890126317739487, 0.023987462744116783, -0.02651245892047882, 0.0005707183154299855, 0.03145868331193924, 0.03004053607583046, -0.02448900416493416, 0.027031293138861656, -0.009382262825965881, 0.054650600999593735, 0.04164514318108559, 0.00976274162530899, 0.002678484655916691, -0.02896827645599842, -0.01259039156138897, -0.05067286640405655, 0.0013349187793210149, -0.007553370203822851, -0.03465816751122475, 0.006865913979709148, 0.03277306631207466, 0.004487921018153429, -0.015115387737751007, -0.07485056668519974, 0.04842458292841911, 0.07471221685409546, -0.035125117748975754, -0.04015781357884407, -0.005581798031926155, -0.05717559531331062, 0.11192996799945831, 0.009122845716774464, -0.016308708116412163, 0.027065882459282875, -0.028743449598550797, -0.03590336814522743, -0.04008863866329193, -0.06108415126800537, -0.019750311970710754, -0.07063071429729462, -0.04755985736846924, 0.005478031001985073, -0.015262390486896038, -0.019058533012866974, -0.05772902071475983, -0.0633324384689331, -0.02441982552409172, -0.038566719740629196, -0.02547479048371315, -0.0007642004638910294, 0.0447581484913826, 0.02865697629749775, -0.02448900416493416, 0.028397558256983757, 0.017355024814605713, 0.05233313888311386, 0.010575583204627037, 0.05216019228100777, -0.02931416779756546, -0.03656056150794029, 0.017562558874487877, -0.054650600999593735, -0.0006166567909531295, 0.03811706602573395, 0.021479761227965355, 0.02723882719874382, -0.019300654530525208, -0.012434741482138634, -0.006485435180366039, 0.004474950488656759, -0.05036156624555588, -0.047352325171232224, 0.07830946892499924, 0.08273685723543167, 0.03732151910662651, 0.013083284720778465, 0.014242015779018402, -0.002940064063295722, -0.04230233281850815, -0.004643571563065052, -0.02552667260169983, 0.023157326504588127, 0.024212291464209557, 0.005175377242267132, -0.04707561433315277, -0.06084202975034714, -0.014605199918150902, 0.06606496870517731, 0.02516348846256733, 0.03078419901430607, 0.03559206798672676, 0.025405611842870712, -0.0031519215553998947, -0.06744852662086487, -0.010221045464277267, -0.04327082261443138, -0.01170837227255106, -0.015910934656858444, -0.002838458865880966, -0.07581906020641327, -0.005802302621304989, -0.052229370921850204, -0.022171542048454285, 0.047974925488233566, -0.008158677257597446, -0.015781225636601448, -0.024592770263552666, 0.0001963195245480165, -0.00646814052015543, 0.020822571590542793, 0.008906664326786995, 0.07976220548152924, -0.049496840685606, -0.009892450645565987, 0.03635302558541298, 0.01292763464152813, -0.018972059711813927, 0.05264443904161453, -0.02547479048371315, 0.05831703543663025, 0.023278389126062393, -0.0807998776435852, 0.015902286395430565, -0.040642060339450836, -0.10300600528717041, -0.012763336300849915, 0.02369345724582672, -0.0014516565715894103, 0.002948711160570383, 0.009927039965987206, 0.01603199541568756, 0.025941740721464157, -0.015271037817001343, 0.02377992868423462, 0.0383937768638134, 0.022102363407611847, -0.00801599770784378, -0.012080203741788864, 0.008093822747468948, 0.0034178243950009346, -0.033741556107997894, 0.009304437786340714, -0.028345676138997078, -0.018038157373666763, -0.024921365082263947, 0.028847215697169304, 0.049773555248975754, 0.045207805931568146, 0.07547317445278168, -0.017951684072613716, -0.021929418668150902, 0.04617629945278168, 0.0010036211460828781, 0.016611361876130104, 0.037909530103206635, -0.008560774847865105, -0.007008593529462814, -0.010238340124487877, 0.04437766969203949, -0.010757175274193287, 0.06450846046209335, -0.004829487297683954, 0.010921472683548927, 0.09802519530057907, 0.021756473928689957, 0.03360320255160332, -0.007146949414163828, 0.03253094479441643, -0.026598932221531868, -0.03873966634273529, -0.03311895579099655, -0.049081772565841675, 0.027325300499796867, 0.001571637112647295, 0.02753283455967903, 0.035730425268411636, -0.03400097414851189, -0.04856294021010399, -0.01485597062855959, -0.0342085100710392, 0.03360320255160332, -0.0008744528749957681, -0.005512619856745005, 0.030905259773135185, 0.05402800068259239, -0.04721396788954735, -0.0565875843167305, 0.02308814972639084, -0.016178999096155167, 0.03446792811155319, -0.10148409008979797, -0.0738820806145668, 0.031891047954559326, -0.002371507463976741, -0.0034480898175388575, -0.03491758182644844, -0.019629251211881638, -0.011111712083220482, 0.049496840685606, -0.07249851524829865, 0.013143815100193024, 0.02966005727648735, 0.023831812664866447, 0.020857159048318863, 0.07045777142047882, 0.03804788738489151, -0.011085771024227142, -0.030939849093556404, 0.006066043861210346, -0.021410582587122917, -0.007276658434420824, -0.002527158008888364, -0.07637248188257217, -0.00497216684743762, 0.01536615751683712, -0.02902016043663025, 0.03384532406926155, 0.05191807076334953, -0.02723882719874382, -0.013299466110765934, -0.019698427990078926, -0.05800573155283928, 0.01224450208246708, 0.028484031558036804, 0.007293952628970146, 0.05333621799945831, -0.0350213497877121, -0.08128412067890167, 0.06461223214864731, 0.0005999027634970844, 0.02891639433801174, 0.025388317182660103, -0.05143382400274277, -0.02483489364385605, 0.025561261922121048, 0.04465438425540924, 0.017934389412403107, 0.0011468410957604647, -0.007756580598652363, 0.03559206798672676, 0.02685834839940071, 0.016239529475569725, 0.032271526753902435, -0.03251364827156067, -0.02134140580892563, 0.025716912001371384, -0.02305356040596962, 0.017683619633316994, -0.0198367852717638, 0.057106420397758484, -0.026719992980360985, 0.005499648861587048, -0.016974546015262604, -0.016291413456201553, -0.00723774591460824, 0.006061720196157694, -0.053301628679037094, 0.008318651467561722, -0.05139923468232155, 0.0036318437196314335, 0.0758882388472557, 0.060565318912267685, 0.02727341651916504, 0.018020862713456154, 0.004725720267742872, -0.07796357572078705, -0.04302870109677315, 0.010471816174685955, -0.003949630074203014, -0.0538550540804863, 0.026719992980360985, 0.02345133386552334, -0.015590986236929893, -0.009676269255578518, 0.040676649659872055, 0.011907259002327919, -0.020390208810567856, -0.05088040232658386, 0.015928229317069054, 0.005408852826803923, -0.0014127439353615046, 0.021912124007940292, 0.01994055137038231, 0.012218560092151165, -0.04295952245593071, -0.07865536212921143, 0.007972761988639832, -0.023520512506365776, -0.02514619380235672, -0.06948927789926529, -0.06973139941692352, -0.07491974532604218, -0.003350808285176754, 0.0371139831840992, -0.030524780973792076, -0.023831812664866447, 0.01502026803791523, 0.025232667103409767, 0.05506566911935806, 0.013264876790344715, -0.001675404142588377, -0.0070475065149366856, 0.002907636808231473, 0.001345727825537324, 0.008067881688475609, 0.040711238980293274, 0.022171542048454285, -0.003281630342826247, 0.008132736198604107, 0.020511269569396973, -0.022915204986929893, 0.0516759492456913, 0.019715722650289536, -0.02587256208062172, -0.052851974964141846, -0.07983138412237167, 0.007445279508829117, -0.052921149879693985, 0.001500297337770462, -0.04109171777963638, 0.0058498624712228775, 0.029884885996580124, -0.013359996490180492, -0.021081987768411636, -0.07014646381139755, -0.01990596204996109, -0.025941740721464157, -0.01169107761234045, 0.023676162585616112, -0.030905259773135185, -0.013126521371304989, 0.04012322425842285, -0.010272929444909096, 0.002803869778290391, 0.006870237644761801, -0.007877642288804054, -0.02794790267944336, -0.05226396024227142, 0.01222720742225647, 0.07353618741035461, -0.053197864443063736, 0.013645355589687824, -0.0062130470760166645, -0.022102363407611847, 0.03109550103545189, 0.0005669351085089147, 0.03327460587024689, 0.036456793546676636, 0.026754582300782204, 0.0573139525949955, -0.054650600999593735, 0.01994055137038231, 0.02658163756132126, 0.013299466110765934, -0.0034783550072461367, 0.006593525875359774, 0.00646814052015543, -0.03495217114686966, 0.06928174197673798, 0.011301951482892036, -0.0025920122861862183, -0.010195104405283928, -0.026737287640571594, -0.0073890723288059235, 0.025042427703738213, 0.03460628166794777, 0.04126466438174248, -0.029763823375105858, -0.015271037817001343, 0.0396735705435276, 0.007216127589344978, -0.030213480815291405, -0.012175323441624641, -0.060876619070768356, 0.05157218128442764, -0.05620710551738739, -0.00020915528875775635, -0.018418636173009872, -0.002373669296503067, -0.0024731126613914967, 0.06571907550096512 ]
4,641
optbinning.binning.multidimensional.continuous_binning_2d
fit
Fit the optimal binning 2D according to the given training data. Parameters ---------- x : array-like, shape = (n_samples,) Training vector x, where n_samples is the number of samples. y : array-like, shape = (n_samples,) Training vector y, where n_samples is the number of samples. z : array-like, shape = (n_samples,) Target vector relative to x and y. check_input : bool (default=False) Whether to check input arrays. Returns ------- self : ContinuousOptimalBinning2D Fitted optimal binning 2D.
def fit(self, x, y, z, check_input=False): """Fit the optimal binning 2D according to the given training data. Parameters ---------- x : array-like, shape = (n_samples,) Training vector x, where n_samples is the number of samples. y : array-like, shape = (n_samples,) Training vector y, where n_samples is the number of samples. z : array-like, shape = (n_samples,) Target vector relative to x and y. check_input : bool (default=False) Whether to check input arrays. Returns ------- self : ContinuousOptimalBinning2D Fitted optimal binning 2D. """ return self._fit(x, y, z, check_input)
(self, x, y, z, check_input=False)
[ -0.008955775760114193, 0.006462608929723501, -0.02417345717549324, -0.006627630442380905, -0.016457574442029, -0.01860731840133667, -0.06800680607557297, 0.023227928206324577, -0.0069398339837789536, -0.011159039102494717, 0.0013603144325315952, -0.024280497804284096, -0.05423417687416077, -0.0295255146920681, -0.012800335884094238, 0.013620984740555286, 0.008081605657935143, -0.019106842577457428, -0.04463615640997887, 0.05865854397416115, -0.0036661589983850718, -0.008652492426335812, 0.023549050092697144, 0.1215987354516983, 0.011221479624509811, 0.024441059678792953, -0.00022091172286309302, -0.011283920146524906, -0.035840943455696106, -0.019303085282444954, -0.058943986892700195, -0.007144995965063572, 0.009928065352141857, 0.022781923413276672, 0.04320894181728363, -0.034092601388692856, 0.08392025530338287, 0.061869777739048004, -0.06062096729874611, -0.019766930490732193, 0.001395994913764298, -0.05676748603582382, 0.0005859387456439435, 0.061798419803380966, 0.06169137731194496, 0.0026648782659322023, -0.021979114040732384, 0.03692919388413429, -0.048917800188064575, -0.04706241935491562, -0.042673733085393906, -0.08770237118005753, 0.06615142524242401, -0.024904904887080193, 0.004201364703476429, 0.016475414857268333, 0.04163900390267372, 0.037143275141716, 0.057588133960962296, -0.0023995055817067623, -0.025386590510606766, 0.007408138830214739, 0.006993354298174381, -0.013415822759270668, -0.03189826011657715, 0.023566890507936478, -0.10361582040786743, 0.005588439293205738, 0.013728026300668716, 0.08827325701713562, 0.030435364693403244, 0.05951487272977829, 0.01076655462384224, 0.01691249944269657, -0.044671837240457535, 0.04353006184101105, -0.001160727348178625, -0.0005051003536209464, -0.0064759887754917145, -0.00681941257789731, 0.08284984529018402, 0.044885918498039246, -0.011952927336096764, -0.05030933395028114, -0.02586827613413334, -0.01624349318444729, 0.001957960892468691, 0.04138924181461334, -0.015333643183112144, -0.0023415249306708574, -0.016475414857268333, 0.03989066556096077, 0.047133781015872955, 0.03871321305632591, 0.030988410115242004, -0.003367335768416524, -0.03607286512851715, 0.02804477885365486, -0.0057267011143267155, 0.005485858302563429, -0.0480971522629261, -0.012684375047683716, 0.030899209901690483, 0.07885363698005676, -0.01672517880797386, -0.024690823629498482, -0.0023326047230511904, -0.019588528200984, -0.07371566444635391, 0.006890773307532072, 0.01104307733476162, 0.006270826794207096, -0.031630657613277435, -0.04328029975295067, -0.06686503440141678, 0.014834118075668812, -0.027884216979146004, 0.00848747044801712, -0.06764999777078629, 0.019142523407936096, 0.014200790785253048, -0.00045185856288298965, -0.005307456478476524, -0.01974909007549286, -0.0018107793293893337, -0.017884790897369385, 0.008023625239729881, 0.03063160553574562, 0.007831843569874763, -0.04196012765169144, 0.02226455695927143, -0.03746439889073372, -0.049595728516578674, 0.0046072290278971195, 0.005204875487834215, -0.041567642241716385, 0.03403908386826515, 0.0018687598640099168, -0.01565476693212986, -0.013790466822683811, 0.07771186530590057, 0.011721004731953144, 0.010240268893539906, -0.02752741239964962, 0.03785688430070877, 0.026242919266223907, 0.07863955944776535, -0.039070017635822296, 0.07364430278539658, 0.029971519485116005, -0.034895412623882294, 0.005557219032198191, -0.011569363065063953, 0.012764655984938145, -0.036857832223176956, -0.005695480853319168, -0.020712461322546005, -0.05455530062317848, 0.047347862273454666, 0.035020291805267334, -0.032397784292697906, 0.0015242212684825063, -0.06408195942640305, 0.008402729406952858, -0.010320549830794334, 0.04506431892514229, -0.0705757886171341, 0.018535956740379333, 0.027473893016576767, -0.022014794871211052, 0.013076859526336193, -0.04485023766756058, -0.06372515857219696, 0.020783821120858192, 0.02715276926755905, 0.008344748988747597, -0.02192559279501438, -0.01916036382317543, 0.04463615640997887, 0.016814379021525383, 0.022068314254283905, -0.019784770905971527, 0.02659972384572029, -0.04238829016685486, -0.05466234311461449, 0.00681941257789731, 0.03407476097345352, 0.005989843979477882, -0.033628758043050766, -0.011257159523665905, -0.0077872429974377155, -0.01399562880396843, 0.02756309323012829, -0.03237994387745857, 0.002555607119575143, 0.02774149551987648, -0.0012398932594805956, 0.057409729808568954, 0.03139873594045639, -0.034556448459625244, -0.00045464609866030514, -0.022335918620228767, 0.05120134353637695, -0.016136452555656433, -0.022068314254283905, 0.0027317791245877743, 0.021568790078163147, 0.034431565552949905, 0.031452253460884094, -0.01049003191292286, 0.01971340924501419, -0.016778698191046715, -0.049560047686100006, 0.000872496806550771, 0.03491325303912163, 0.05676748603582382, -0.044493433088064194, -0.065830297768116, -0.014441633597016335, 0.031791217625141144, 0.01387074775993824, -0.015137401409447193, -0.009705062955617905, 0.035787422209978104, 0.011453402228653431, 0.0048346915282309055, 0.06675799190998077, 0.007403678726404905, 0.05166519060730934, -0.07343022525310516, -0.0030863529536873102, -0.025975316762924194, -0.008607891388237476, 0.01652001589536667, -0.015360403805971146, -0.045528165996074677, 0.008648032322525978, 0.015833169221878052, -0.014851958490908146, -0.025333069264888763, 0.030310483649373055, -0.015199841931462288, -0.006957673933357, -0.04588496685028076, -0.017064141109585762, 0.014602195471525192, 0.00654288986697793, 0.03441372513771057, 0.045563846826553345, -0.011462322436273098, -0.03589446097612381, 0.006471528671681881, -0.024708662182092667, -0.03874889388680458, 0.013005498796701431, -0.02906166948378086, 0.01461111567914486, -0.03885593265295029, -0.0003113670682068914, 0.03127385303378105, -0.05255720019340515, 0.06547349691390991, 0.009544502012431622, 0.06600870192050934, -0.0398549847304821, -0.025939635932445526, -0.016814379021525383, 0.008973615244030952, 0.009482060559093952, 0.03942681849002838, -0.032183703035116196, 0.00023470999440178275, 0.03651886805891991, -0.0022367138881236315, -0.0011986377649009228, 0.07046875357627869, 0.06825656443834305, -0.006716831587255001, 0.0529496856033802, -0.00022495364828500897, 0.05073750019073486, 0.022103995084762573, -0.012158089317381382, -0.003284825012087822, -0.00422143517062068, -0.03548413887619972, -0.02476218342781067, 0.04056859016418457, -0.02838374301791191, -0.03949818015098572, -0.041567642241716385, 0.030578086152672768, 0.0460633710026741, 0.05423417687416077, 0.022103995084762573, -0.011729924939572811, 0.029329271987080574, -0.01780450902879238, 0.03803528472781181, -0.03878457471728325, -0.007234197109937668, -0.008929015137255192, -0.011060917750000954, 0.0009605827508494258, 0.023852333426475525, 0.005436798091977835, 0.0039092316292226315, -0.05840878188610077, -0.01882139965891838, 0.021354706957936287, 0.05644636228680611, 0.0009427425102330744, 0.041781723499298096, -0.030256962403655052, -0.03537709638476372, -0.031148971989750862, 0.05594683438539505, 0.07111099362373352, -0.026064516976475716, 0.04028314724564552, 0.005931863095611334, 0.01672517880797386, 0.027241969481110573, -0.03612638637423515, -0.06500965356826782, 0.030988410115242004, 0.052699919790029526, 0.0479901097714901, -0.040854036808013916, 0.0023615951649844646, 0.04888211935758591, -0.023263607174158096, 0.0439225472509861, 0.021996954455971718, -0.039319779723882675, 0.019356606528162956, 0.016716258600354195, 0.011248239316046238, 0.03407476097345352, -0.019517168402671814, -0.03466348722577095, 0.06233362480998039, 0.010400830768048763, -0.0012755736242979765, -0.045813608914613724, -0.044921599328517914, -0.02221103571355343, -0.0007242002175189555, 0.005566139239817858, 0.08977183699607849, -0.00005467042501550168, -0.017117662355303764, 0.028026938438415527, -0.020123735070228577, 0.025850435718894005, -0.004937272518873215, 0.02208615466952324, -0.006560729816555977, 0.06643686443567276, -0.010088627226650715, -0.023138726130127907, 0.029917998239398003, -0.04174604266881943, 0.002118522534146905, 0.013959948904812336, 0.027795016765594482, 0.006096885073930025, 0.016198892146348953, -0.03487757220864296, 0.012755735777318478, -0.021693671122193336, -0.06804248690605164, -0.06393924355506897, -0.0019289705669507384, 0.052699919790029526, 0.009004835970699787, -0.0775691494345665, 0.0045470185577869415, 0.05644636228680611, 0.01414727047085762, 0.020676780492067337, 0.032736748456954956, -0.029293591156601906, -0.013050098903477192, 0.02897246927022934, 0.003353955689817667, -0.08092310279607773, 0.03321843221783638, 0.049988213926553726, -0.011373121291399002, 0.048453956842422485, 0.0233171284198761, 0.03143441304564476, -0.045777928084135056, -0.05259288102388382, -0.01028486993163824, 0.08684604614973068, 0.049453005194664, -0.023584730923175812, -0.02940063364803791, -0.044707514345645905, 0.0009131947299465537, 0.0037397497799247503, 0.018571637570858, -0.03402124345302582, -0.025011945515871048, 0.0064759887754917145, -0.012372171506285667, -0.010311629623174667, -0.010516791604459286, -0.04499295726418495, 0.035323575139045715, 0.03767848014831543, 0.034128282219171524, -0.03678647056221962, 0.057588133960962296, -0.015512045472860336, 0.0053252968937158585, -0.009624782018363476, -0.0037821203004568815, 0.07314477860927582, -0.02460162155330181, 0.026581883430480957, 0.022318078204989433, -0.0182059146463871, -0.022353757172822952, -0.04506431892514229, -0.07928180694580078, 0.01916036382317543, -0.07211004942655563, -0.06968378275632858, -0.07671281695365906, -0.058301739394664764, -0.026920845732092857, -0.05730269104242325, -0.012434612028300762, 0.007916584610939026, -0.00487483199685812, 0.028437262400984764, 0.005579519551247358, -0.036251265555620193, 0.000778278277721256, 0.022674880921840668, 0.013959948904812336, -0.08927231281995773, 0.003445386653766036, -0.009705062955617905, -0.0004710925277322531, -0.05901534855365753, -0.04121083766222, 0.04374414682388306, -0.011373121291399002, 0.02863350510597229, 0.0030506725888699293, -0.013959948904812336, -0.04370846599340439, -0.08948639035224915, -0.021301187574863434, 0.024351859465241432, -0.009285818785429, -0.002381665399298072, -0.044885918498039246, 0.013380142860114574, 0.0058114416897296906, -0.08099446445703506, -0.05412713810801506, 0.005401117727160454, 0.0040474929846823215, 0.07607056945562363, -0.0007492879522033036, -0.01437919307500124, -0.01410267036408186, -0.019784770905971527, 0.003423086367547512, 0.055625710636377335, 0.05444825813174248, 0.004553708713501692, 0.037143275141716, 0.02693868614733219, -0.04588496685028076, -0.03543061763048172, 0.02595747634768486, -0.023673931136727333, 0.001368119614198804, -0.03250482678413391, -0.028026938438415527, -0.040211789309978485, 0.006003223825246096, 0.004426597151905298, 0.016163211315870285, 0.03487757220864296, 0.06572326272726059, 0.0052182553336024284, -0.039105694741010666, -0.03020344115793705, 0.04353006184101105, 0.013736946508288383, -0.004181294701993465, 0.006663310807198286, -0.021265506744384766, -0.018892761319875717, 0.03785688430070877, -0.023477690294384956, -0.058230381458997726, -0.00425934512168169, 0.013585304841399193, -0.06536645442247391, -0.008465169928967953, -0.03195178136229515, 0.06269042938947678, -0.029454153031110764, -0.07046875357627869, 0.014950078912079334, 0.03484189137816429, 0.056482043117284775, 0.016127532348036766, -0.004705349914729595, -0.004422137048095465, -0.0006032214150764048, 0.005525998771190643, 0.006890773307532072, 0.06347539275884628, 0.0665082260966301, -0.04973844811320305, 0.07285933941602707, 0.023013845086097717, 0.03309355303645134, -0.045528165996074677, 0.0023326047230511904, 0.043779827654361725, 0.012648694217205048, -0.003307125298306346, -0.0026403481606394053, 0.056303638964891434, 0.02081950195133686, 0.034128282219171524, 0.014468394219875336, 0.007640061434358358, 0.01104307733476162, -0.031969621777534485, 0.0053252968937158585, 0.01499467995017767, 0.06615142524242401, -0.019981013610959053, 0.005369897000491619, 0.05730269104242325, 0.01106983795762062, 0.030917048454284668, 0.022621361538767815, 0.0007124925614334643, -0.05926511064171791, 0.003251374699175358, 0.005494778510183096, 0.05926511064171791, 0.03742871806025505, -0.056945886462926865, -0.05658908188343048, 0.012693295255303383, -0.027010047808289528, 0.02420913800597191, -0.06682935357093811, 0.03742871806025505, 0.0004719287680927664, -0.0042147450149059296, -0.06044256314635277, -0.010909276083111763, -0.005133514758199453, 0.017920471727848053, 0.018999801948666573, 0.022335918620228767, 0.011694244109094143, 0.07792595028877258, -0.06326131522655487, 0.0005212680553086102, 0.009196617640554905, 0.04285213723778725, 0.0018821400590240955, -0.05687452480196953, -0.0543055385351181, -0.008063766174018383, -0.023691771551966667, -0.05038069561123848, -0.0011083218269050121, -0.04295917600393295, -0.009821024723351002, -0.042245570570230484, -0.06675799190998077, -0.04634881392121315, -0.05523322895169258, 0.03903433680534363, 0.017750989645719528, 0.055661391466856, -0.030738648027181625, -0.010481111705303192, 0.007144995965063572, -0.020962223410606384, -0.07599920779466629, -0.024958426132798195, 0.07093259692192078, -0.07521424442529678, 0.006997814401984215, 0.030899209901690483, -0.07175324112176895, 0.04338734224438667, -0.0050086332485079765, -0.03075648657977581, -0.03382499888539314, -0.02629644051194191, -0.05812333896756172, -0.03436020761728287, -0.009526661597192287, 0.011105517856776714, 0.0025600672233849764, 0.005262855906039476, -0.06497397273778915, 0.023227928206324577, -0.007894284091889858, -0.016091851517558098, 0.04984549060463905, 0.023763133212924004, 0.00602106424048543, -0.006948754191398621, 0.036304786801338196, 0.0264748428016901, -0.03134521469473839, -0.019642049446702003, 0.012363251298666, 0.020534059032797813, 0.02990015782415867, 0.025689873844385147, 0.0014807357219979167, 0.02765229530632496, 0.015726126730442047, 0.0034966771490871906, 0.029204390943050385, 0.014405953697860241, -0.016930339857935905, 0.01891060173511505, 0.005026473663747311, 0.0014796206960454583, 0.047776028513908386, 0.05205767601728439, 0.07025466859340668, 0.025422271341085434, 0.022764082998037338, -0.028865426778793335, 0.042209889739751816, 0.052699919790029526, 0.006979974452406168, -0.020962223410606384, -0.0364118292927742, -0.0063466476276516914, -0.05063045769929886, 0.034128282219171524, 0.05280696228146553, 0.002337064826861024, 0.0016056171152740717, -0.003922611940652132, 0.02051621861755848, -0.04927460476756096, -0.009767504408955574, 0.06033552065491676, 0.019392287358641624, -0.005815901793539524, -0.070004902780056, 0.02558283321559429, 0.01630593277513981, -0.0680781677365303, -0.09333987534046173, 0.018964121118187904, -0.01448623463511467, -0.005276236217468977, -0.0687560886144638, -0.035073813050985336, -0.035912301391363144, -0.07885363698005676, -0.0604068823158741, -0.011453402228653431, -0.015922369435429573, 0.01627025380730629, 0.04524272307753563, -0.05173655226826668, 0.010632753372192383, 0.04281645640730858, 0.10711249709129333, 0.054020095616579056, -0.044029589742422104, -0.056303638964891434, -0.011159039102494717, 0.04328029975295067, 0.00045715487794950604, 0.022496478632092476, 0.007216356694698334, -0.03648318722844124, 0.022193197160959244, -0.04217420890927315, -0.025761233642697334, -0.012818176299333572, 0.01962420903146267, -0.06122753024101257, 0.030096400529146194, -0.01924956403672695, -0.042887818068265915, 0.04545680433511734, -0.0285086240619421, 0.0032669848296791315, -0.04709810018539429, -0.02442321926355362, 0.0693269744515419, 0.007974565029144287, 0.0335930772125721, 0.006333267316222191, -0.022353757172822952, -0.022460799664258957, -0.009829944930970669, 0.057623814791440964, -0.02106926403939724, 0.013701265677809715, 0.012229450047016144, 0.04499295726418495, 0.02536875009536743, 0.02171151153743267, -0.019124682992696762, -0.04253101348876953, -0.0033517256379127502, 0.01096279639750719, 0.01079331524670124, -0.0384991280734539, 0.008523150347173214, 0.00782738346606493, 0.04206716641783714, -0.045813608914613724, -0.02893678843975067, 0.06814952194690704, 0.03423532471060753, 0.04699106141924858, 0.024619461968541145, 0.0003896966518368572, 0.03109545074403286, -0.00730555783957243, -0.031630657613277435, -0.05009525269269943, 0.04524272307753563, -0.024744343012571335, 0.01325526088476181, 0.032094500958919525, 0.02039133757352829, -0.018321875482797623, -0.00019178204820491374, -0.013371222652494907, 0.039319779723882675, 0.006676691118627787, 0.05195063352584839, -0.008737233467400074, 0.05330648645758629, 0.03484189137816429, -0.03628694638609886, -0.0033227354288101196, -0.006957673933357, -0.02476218342781067, -0.018214834854006767, -0.02663540281355381, 0.042673733085393906, -0.028455102816224098, 0.004674129653722048, 0.018321875482797623, 0.08441977947950363, 0.045813608914613724 ]
4,642
optbinning.binning.multidimensional.continuous_binning_2d
fit_transform
Fit the optimal binning 2D according to the given training data, then transform it. Parameters ---------- x : array-like, shape = (n_samples,) Training vector x, where n_samples is the number of samples. y : array-like, shape = (n_samples,) Training vector y, where n_samples is the number of samples. z : array-like, shape = (n_samples,) Target vector relative to x and y. metric : str (default="mean") The metric used to transform the input vector. Supported metrics are "mean" to choose the mean, "indices" to assign the corresponding indices of the bins and "bins" to assign the corresponding bin interval. metric_special : float or str (default=0) The metric value to transform special codes in the input vector. Supported metrics are "empirical" to use the empirical WoE or event rate, and any numerical value. metric_missing : float or str (default=0) The metric value to transform missing values in the input vector. Supported metrics are "empirical" to use the empirical WoE or event rate and any numerical value. show_digits : int, optional (default=2) The number of significant digits of the bin column. Applies when ``metric="bins"``. check_input : bool (default=False) Whether to check input arrays. Returns ------- z_new : numpy array, shape = (n_samples,) Transformed array.
def fit_transform(self, x, y, z, metric="mean", metric_special=0, metric_missing=0, show_digits=2, check_input=False): """Fit the optimal binning 2D according to the given training data, then transform it. Parameters ---------- x : array-like, shape = (n_samples,) Training vector x, where n_samples is the number of samples. y : array-like, shape = (n_samples,) Training vector y, where n_samples is the number of samples. z : array-like, shape = (n_samples,) Target vector relative to x and y. metric : str (default="mean") The metric used to transform the input vector. Supported metrics are "mean" to choose the mean, "indices" to assign the corresponding indices of the bins and "bins" to assign the corresponding bin interval. metric_special : float or str (default=0) The metric value to transform special codes in the input vector. Supported metrics are "empirical" to use the empirical WoE or event rate, and any numerical value. metric_missing : float or str (default=0) The metric value to transform missing values in the input vector. Supported metrics are "empirical" to use the empirical WoE or event rate and any numerical value. show_digits : int, optional (default=2) The number of significant digits of the bin column. Applies when ``metric="bins"``. check_input : bool (default=False) Whether to check input arrays. Returns ------- z_new : numpy array, shape = (n_samples,) Transformed array. """ return self.fit(x, y, z, check_input).transform( x, y, metric, metric_special, metric_missing, show_digits, check_input)
(self, x, y, z, metric='mean', metric_special=0, metric_missing=0, show_digits=2, check_input=False)
[ -0.007097509689629078, 0.021955933421850204, 0.03538758307695389, 0.018148178234696388, 0.007865422405302525, -0.04024042561650276, -0.043366603553295135, 0.013177194632589817, -0.012232071720063686, 0.013331686146557331, -0.030225759372115135, 0.003317018039524555, -0.016048913821578026, -0.033806320279836655, -0.03046203963458538, 0.04969165474176407, -0.0031488952226936817, -0.016785020008683205, 0.006220544688403606, 0.045438602566719055, 0.009551194496452808, -0.07244730740785599, 0.0299531277269125, 0.08346162736415863, 0.013377124443650246, 0.008088071830570698, -0.037041548639535904, -0.033806320279836655, -0.014876598492264748, -0.018193617463111877, -0.050527725368738174, -0.045656707137823105, 0.0460929200053215, -0.021301617845892906, 0.026572495698928833, -0.06830330938100815, 0.014031440950930119, 0.025972705334424973, -0.002630895236507058, 0.009969229809939861, 0.02955326810479164, -0.030916426330804825, -0.018602564930915833, 0.06528618186712265, 0.06797614693641663, 0.042203374207019806, -0.005139105953276157, 0.06932113319635391, -0.03656898811459541, -0.03925895318388939, -0.031479865312576294, -0.05896113067865372, 0.07012085616588593, 0.006752176210284233, 0.006279614754021168, 0.03313383087515831, 0.044529832899570465, 0.05699818208813667, 0.05787060409784317, -0.025009406730532646, -0.007088422309607267, 0.027263162657618523, -0.04667453467845917, -0.01032365020364523, 0.00044132242328487337, -0.008733299560844898, -0.05579860508441925, -0.0023116888478398323, 0.004121281206607819, 0.0693574845790863, 0.024009758606553078, 0.024882178753614426, 0.0452568493783474, 0.013540703803300858, -0.024318739771842957, 0.05107298865914345, -0.00902865082025528, -0.011659545823931694, -0.013431651517748833, 0.01193217746913433, 0.06819425523281097, 0.0224103182554245, -0.007629141677170992, -0.01672140508890152, -0.05423551797866821, -0.009651158936321735, 0.014540352858603, 0.010732597671449184, -0.05976084992289543, -0.005711632315069437, -0.011368738487362862, -0.014340423047542572, 0.055689550936222076, 0.03787761926651001, -0.004471158608794212, 0.005498071201145649, -0.06081502512097359, 0.04831032454967499, 0.0006208049017004669, -0.03307930380105972, 0.00701117655262351, 0.025518318638205528, 0.007547351997345686, 0.07895411550998688, 0.02030196785926819, -0.0016073905862867832, 0.003307930426672101, -0.016312459483742714, -0.055398743599653244, 0.021610599011182785, -0.021047161892056465, 0.03077102266252041, -0.07764548808336258, -0.04958260431885719, -0.03722330555319786, -0.01225933525711298, 0.0029012549202889204, 0.015785370022058487, -0.06252352148294449, 0.015258283354341984, 0.030825547873973846, -0.02171965315937996, 0.02615446038544178, -0.04718344658613205, -0.05445362254977226, -0.03933165594935417, 0.04300309345126152, 0.046347375959157944, 0.03213417902588844, 0.007565527223050594, -0.03838653117418289, -0.03925895318388939, -0.038895443081855774, 0.03400624915957451, -0.0091558787971735, -0.05507158860564232, 0.04558400809764862, 0.01775740645825863, -0.03420618176460266, -0.0008389102295041084, 0.0668129250407219, 0.02804470621049404, 0.02559102140367031, -0.008183492347598076, 0.03856828808784485, -0.01114154513925314, 0.07313797622919083, 0.007706386968493462, 0.009442142210900784, -0.03068014420568943, -0.012577405199408531, 0.010332738049328327, 0.017911897972226143, -0.03795032203197479, 0.01787554658949375, 0.046129271388053894, 0.019574949517846107, -0.02524568885564804, 0.026572495698928833, 0.02719045989215374, -0.006865772884339094, 0.018320845440030098, -0.06270527094602585, 0.07793629169464111, -0.000008537487701687496, 0.05154555290937424, 0.0005515110678970814, 0.026463443413376808, 0.016666879877448082, -0.01646694913506508, -0.03805937245488167, -0.04162175953388214, -0.05739804357290268, 0.03864098712801933, 0.07062976807355881, 0.054489973932504654, -0.006343229208141565, -0.02719045989215374, 0.030880074948072433, 0.07255636155605316, 0.007983562536537647, -0.03376996889710426, 0.03665986657142639, -0.06023341417312622, -0.08019004762172699, -0.042385127395391464, 0.030534740537405014, 0.02297375723719597, -0.05252702534198761, -0.05619846284389496, 0.04089474305510521, -0.0025241144467145205, 0.00902410689741373, -0.029316985979676247, -0.022210389375686646, 0.021519722416996956, -0.0654679387807846, 0.024445967748761177, 0.039404354989528656, -0.034442462027072906, -0.043802812695503235, -0.022610248997807503, 0.08106246590614319, -0.0033715444151312113, -0.0204655472189188, -0.00852882582694292, -0.006197825539857149, 0.020574599504470825, -0.00034249346936121583, -0.0353512316942215, 0.08288001269102097, -0.023428143933415413, -0.0646318718791008, -0.004323482979089022, 0.02709958329796791, 0.03896814584732056, -0.024936705827713013, -0.021319793537259102, 0.007638229057192802, 0.02408245950937271, 0.03327923268079758, -0.03954976052045822, -0.004848299082368612, 0.0508548840880394, 0.030607443302869797, 0.041730813682079315, 0.10105545073747635, -0.04133095219731331, 0.05325404182076454, -0.03969516232609749, 0.012913650833070278, -0.039149899035692215, -0.009951054118573666, 0.02977137267589569, 0.016794107854366302, -0.04602021723985672, 0.022246740758419037, 0.0012984081404283643, 0.0002318788756383583, 0.01245017722249031, 0.022846529260277748, -0.010841650888323784, -0.022028634324669838, -0.02839003875851631, -0.018311757594347, 0.02813558280467987, 0.01516740582883358, 0.024809477850794792, 0.023173687979578972, 0.0008758290787227452, -0.036514461040496826, 0.024809477850794792, -0.03875004127621651, -0.03235228732228279, -0.00682942196726799, -0.07124772667884827, -0.01702130027115345, -0.033806320279836655, 0.0032193250954151154, 0.023755302652716637, -0.024246038869023323, 0.007620053831487894, 0.001197307137772441, 0.0314435139298439, -0.033969901502132416, -0.0312435831874609, -0.0344788134098053, 0.026608845219016075, 0.05736169219017029, 0.027681197971105576, -0.08091706782579422, 0.01081438735127449, -0.016948599368333817, 0.013377124443650246, 0.006856685038655996, 0.07655496150255203, 0.03584197163581848, -0.012059405446052551, 0.06830330938100815, -0.025536494329571724, 0.020192915573716164, 0.01908421330153942, -0.01620340533554554, -0.03493319824337959, -0.017911897972226143, -0.030352987349033356, -0.02150154672563076, 0.06114218384027481, -0.024827653542160988, -0.048710182309150696, -0.054271869361400604, 0.010459966026246548, 0.017902810126543045, -0.022428493946790695, -0.034878671169281006, -0.02042919583618641, -0.0353512316942215, -0.036696214228868484, 0.04980070888996124, -0.036623515188694, -0.029680496081709862, 0.007638229057192802, -0.01208666805177927, 0.007747281808406115, 0.0040394919924438, 0.03689614683389664, 0.005070948041975498, -0.07321067899465561, -0.0019413643749430776, 0.011005229316651821, 0.060269761830568314, 0.02611810900270939, 0.012913650833070278, -0.052417971193790436, -0.012395651079714298, -0.0146494060754776, 0.05107298865914345, 0.06899397820234299, 0.03769586607813835, 0.03551481291651726, 0.0007122501265257597, 0.0071565802209079266, 0.01968400366604328, -0.029335161671042442, -0.031861547380685806, 0.05339944735169411, 0.03831382840871811, 0.024318739771842957, -0.009433054365217686, -0.0349150225520134, 0.05808870866894722, 0.012513791210949421, 0.037514109164476395, 0.004212158732116222, -0.09182232618331909, 0.006752176210284233, -0.02275565266609192, -0.006656755227595568, 0.034024424850940704, -0.009514843113720417, -0.045402251183986664, 0.0775727853178978, -0.0034487899392843246, -0.029625969007611275, -0.04547495394945145, -0.01365884393453598, -0.047256145626306534, 0.00007305675535462797, -0.015739932656288147, 0.062414463609457016, -0.01904786191880703, -0.06245081499218941, 0.06659481674432755, -0.014640318229794502, 0.006738544907420874, -0.03218870609998703, 0.03300660103559494, -0.02662702091038227, 0.045184146612882614, -0.046819936484098434, 0.0025241144467145205, -0.025500144809484482, -0.04129460081458092, -0.0018652547150850296, 0.03816842660307884, -0.02580912597477436, 0.01892063394188881, -0.011196072213351727, 0.012441089376807213, -0.006406843196600676, 0.048201270401477814, -0.05485348030924797, -0.0775727853178978, 0.01995663531124592, 0.04325754940509796, -0.04082204028964043, -0.06252352148294449, 0.0026445267722010612, -0.003810026915743947, 0.03875004127621651, 0.04921909421682358, 0.07706387341022491, -0.05143649876117706, 0.02181052975356579, 0.05023691803216934, -0.0024741319939494133, -0.02426421456038952, 0.029916776344180107, 0.015503651462495327, -0.02640891633927822, 0.0028421846218407154, 0.039186250418424606, 0.04140365496277809, -0.057979658246040344, -0.021701477468013763, -0.025918180122971535, 0.03482414409518242, 0.009832913987338543, -0.013840598985552788, -0.049400851130485535, -0.07055706530809402, 0.009160422720015049, 0.003360184608027339, -0.008592439815402031, -0.021174389868974686, -0.01986575685441494, -0.018666177988052368, -0.051254745572805405, -0.015976212918758392, -0.011550492607057095, -0.021574249491095543, 0.045220497995615005, 0.04576576128602028, -0.020447371527552605, -0.029098881408572197, 0.04343930631875992, -0.020065687596797943, -0.008092614822089672, -0.04463888332247734, 0.030607443302869797, 0.04260323569178581, -0.022955581545829773, 0.006152386777102947, -0.010459966026246548, 0.00015008938498795033, -0.06793980300426483, -0.055216990411281586, -0.10679889470338821, -0.004112193360924721, -0.030025828629732132, -0.027590319514274597, -0.1021459773182869, -0.05045502632856369, -0.014785721898078918, -0.025518318638205528, -0.0028739916160702705, 0.009960141964256763, 0.005261790473014116, 0.0007906316895969212, 0.04852842912077904, -0.020919932052493095, -0.023119160905480385, 0.0312435831874609, 0.0058388602919876575, -0.06201460584998131, 0.010414527729153633, -0.029662320390343666, 0.028371863067150116, -0.08855074644088745, -0.027045056223869324, 0.08607888966798782, 0.020956283435225487, 0.016185229644179344, -0.019284144043922424, 0.027081407606601715, -0.034024424850940704, -0.02495488151907921, -0.03936800733208656, 0.011723159812390804, 0.047983165830373764, -0.033333759754896164, -0.04325754940509796, -0.0016755484975874424, 0.009124071337282658, -0.053144991397857666, -0.018202705308794975, -0.012404738925397396, 0.003948614466935396, 0.06088772788643837, 0.02804470621049404, -0.0054935272783041, -0.04456618055701256, 0.015794457867741585, -0.005452632438391447, 0.021701477468013763, 0.05874302610754967, -0.024155162274837494, -0.0014199563302099705, 0.0275721438229084, 0.0033760881051421165, -0.00928765069693327, 0.003589649684727192, 0.04060393571853638, -0.0030489303171634674, -0.01882975734770298, 0.03524218127131462, -0.006502264179289341, -0.0374777615070343, 0.01804821379482746, 0.05794330686330795, 0.007915404625236988, 0.10229138284921646, 0.05027326941490173, -0.010332738049328327, -0.04576576128602028, 0.04285769164562225, 0.017866458743810654, 0.014658492989838123, -0.017957335337996483, -0.021265266463160515, 0.011495966464281082, 0.002453684573993087, -0.021901406347751617, -0.05096393823623657, 0.018339021131396294, -0.008110790513455868, -0.06761264055967331, 0.0002666678046807647, -0.036260005086660385, 0.027590319514274597, -0.06212365999817848, -0.048928286880254745, 0.05976084992289543, 0.008928685449063778, 0.008506106212735176, -0.0327339693903923, -0.03024393506348133, 0.009069545194506645, 0.0021163029596209526, -0.01952042430639267, 0.04024042561650276, -0.006656755227595568, 0.021483371034264565, -0.05459902435541153, 0.06295973062515259, 0.01804821379482746, -0.008106246590614319, -0.012123019434511662, 0.011532317847013474, -0.004464342724531889, -0.017166703939437866, 0.010887089185416698, 0.012859124690294266, 0.03080737218260765, 0.0292988121509552, 0.03689614683389664, 0.009687510319054127, -0.027244986966252327, 0.0030012198258191347, -0.038931794464588165, -0.02653614431619644, 0.018757054582238197, 0.010678071528673172, -0.01741207204759121, 0.03875004127621651, 0.05979720130562782, 0.0051345620304346085, 0.007965386845171452, 0.03266126662492752, -0.003405623370781541, -0.06212365999817848, -0.006093316711485386, 0.016321545466780663, 0.08724211901426315, 0.02680877596139908, -0.017612002789974213, -0.022210389375686646, 0.05648927018046379, -0.030062180012464523, 0.01844807341694832, -0.04391186684370041, 0.07917222380638123, 0.03387902304530144, -0.0005833180621266365, -0.013195370323956013, -0.002360535552725196, -0.011768598109483719, 0.036260005086660385, 0.004966439213603735, -0.03111635521054268, 0.04260323569178581, 0.04623832181096077, -0.0239188801497221, -0.009505756199359894, -0.017657442018389702, 0.05997895449399948, 0.013649756088852882, -0.044020917266607285, -0.014294984750449657, -0.006779439747333527, -0.040567584335803986, -0.015567265450954437, -0.02891712635755539, -0.006779439747333527, 0.02141067013144493, -0.054489973932504654, -0.01813909038901329, -0.004075842909514904, -0.03262491896748543, 0.0024786759167909622, -0.014603966847062111, 0.06106948107481003, -0.010205510072410107, 0.0023355442099273205, 0.0226284246891737, -0.07473741471767426, -0.04471158608794212, -0.018811581656336784, 0.04834667220711708, -0.08411594480276108, 0.032988425344228745, -0.0011655001435428858, -0.008451580069959164, 0.017730142921209335, 0.015385511331260204, -0.028589969500899315, -0.07451930642127991, -0.04416632279753685, -0.04369376227259636, -0.011477790772914886, -0.03369726985692978, 0.007679123897105455, 0.011841299943625927, -0.01917508989572525, -0.0008798049530014396, 0.019156914204359055, -0.04671088233590126, -0.03936800733208656, 0.03740505874156952, -0.017094003036618233, 0.006456825416535139, -0.014876598492264748, -0.014067791402339935, 0.032588567584753036, -0.026863303035497665, -0.01372245792299509, 0.0217560026794672, 0.03077102266252041, 0.005361755378544331, 0.0069475625641644, -0.04329390078783035, -0.005866123829036951, 0.05303593724966049, 0.0070838783867657185, 0.04162175953388214, -0.0062523516826331615, -0.035878319293260574, 0.05736169219017029, 0.004378009587526321, -0.012931826524436474, 0.06350499391555786, 0.01753930002450943, 0.08731482177972794, -0.014085967093706131, 0.02379165217280388, -0.06212365999817848, 0.05016421899199486, 0.04980070888996124, 0.02150154672563076, -0.014358598738908768, -0.013504352420568466, 0.051981762051582336, -0.05692548304796219, 0.035405758768320084, 0.05787060409784317, 0.011641370132565498, 0.004650641232728958, 0.02649979293346405, 0.021955933421850204, -0.030171232298016548, -0.02860814519226551, 0.07001180201768875, 0.0028126495890319347, 0.0020981275010854006, -0.05281783267855644, 0.007411036174744368, -0.0052481587044894695, -0.041476357728242874, -0.09851089119911194, -0.00033226978848688304, 0.007588246837258339, -0.02042919583618641, -0.033933550119400024, -0.03856828808784485, -0.022701125591993332, -0.05114569142460823, -0.009433054365217686, 0.0040894742123782635, -0.05834316834807396, 0.008942317217588425, 0.03973151370882988, -0.025827301666140556, 0.00702480785548687, 0.06106948107481003, 0.05874302610754967, 0.012731896713376045, -0.015758108347654343, -0.065504290163517, -0.051509201526641846, 0.0314435139298439, 0.0555805005133152, 0.016257932409644127, 0.0016675967490300536, -0.023409968242049217, 0.010778036899864674, 0.02420968748629093, -0.0344606377184391, -0.011359650641679764, 0.004866474308073521, -0.04598386585712433, 0.03609642758965492, -0.0254274420440197, -0.03954976052045822, 0.027081407606601715, 0.0038350180257111788, -0.02279200404882431, -0.05623481422662735, -0.0361873023211956, 0.08477025479078293, -0.016703231260180473, 0.04874653369188309, 0.0204655472189188, 0.01641242392361164, -0.001984531059861183, 0.009133159182965755, 0.011277860961854458, -0.04831032454967499, 0.04932814836502075, 0.044784288853406906, 0.033969901502132416, 0.023973407223820686, -0.06521348655223846, 0.005379930604249239, -0.017911897972226143, -0.011250598356127739, 0.028026530519127846, 0.030516566708683968, -0.013740633614361286, -0.00898321159183979, -0.0174575112760067, 0.033588215708732605, -0.013904212974011898, -0.006779439747333527, 0.09974682331085205, 0.01577628217637539, 0.057070884853601456, -0.009696598164737225, -0.048019517213106155, 0.016566915437579155, 0.0025150266010314226, -0.009460316970944405, -0.013322598300874233, 0.04885558784008026, -0.024118810892105103, -0.02253754809498787, 0.038204777985811234, 0.007865422405302525, 0.004437079653143883, -0.007956298999488354, -0.00889687892049551, 0.0008809409337118268, 0.004907369147986174, -0.001043383963406086, 0.0029012549202889204, 0.08862344920635223, 0.0624871663749218, 0.009914703667163849, 0.04340295493602753, 0.018548037856817245, -0.010287299752235413, -0.0353512316942215, -0.025536494329571724, -0.01447673887014389, -0.013331686146557331, 0.017384810373187065, 0.014540352858603, 0.08884155750274658, 0.06114218384027481 ]
4,646
optbinning.binning.binning
read_json
Read json file containing split points and set them as the new split points. Parameters ---------- path: The path of the json file.
def read_json(self, path): """ Read json file containing split points and set them as the new split points. Parameters ---------- path: The path of the json file. """ self._is_fitted = True with open(path, "r") as read_file: bin_table_attr = json.load(read_file) for key in bin_table_attr.keys(): if isinstance(bin_table_attr[key], list): bin_table_attr[key] = np.array(bin_table_attr[key]) self._binning_table = BinningTable(**bin_table_attr)
(self, path)
[ 0.01840529404580593, -0.03111841529607773, -0.06223683059215546, -0.0008854742627590895, -0.056059833616018295, 0.01748054102063179, -0.02849678322672844, 0.05024196580052376, 0.009651556611061096, 0.011159893125295639, -0.01808208040893078, 0.019464721903204918, -0.056526701897382736, -0.012758011929690838, -0.05641896277666092, -0.014966647140681744, 0.07268744707107544, 0.025138938799500465, -0.05789138749241829, 0.008259937167167664, -0.02036254107952118, -0.056526701897382736, 0.010737918317317963, 0.09768273681402206, 0.03144162893295288, -0.03792388737201691, 0.03129797801375389, -0.00461479090154171, 0.09380415827035904, -0.016654547303915024, -0.04546556621789932, -0.039109006524086, -0.011707562953233719, 0.03943222016096115, 0.007061348296701908, -0.09042835235595703, 0.03097476437687874, 0.011240697465837002, -0.06967077404260635, 0.05275585874915123, -0.01282085943967104, -0.03068746253848076, -0.049739185720682144, 0.04313123598694801, 0.015334753319621086, 0.019195375964045525, -0.024079512804746628, 0.03435056656599045, -0.012784946709871292, -0.015191101469099522, -0.06424794346094131, -0.07900809496641159, 0.00979520846158266, 0.06694140285253525, -0.028227437287569046, 0.012551513500511646, 0.010648136027157307, 0.04751259461045265, 0.008726803585886955, 0.008704357780516148, -0.026413843035697937, -0.01615176908671856, -0.014517737552523613, -0.05595209449529648, 0.030454028397798538, -0.04370584338903427, -0.05501836538314819, 0.009516884572803974, 0.02630610391497612, -0.007743691094219685, -0.0035037396010011435, 0.04295167326927185, 0.045645132660865784, 0.06669001281261444, -0.057101305574178696, 0.05042152851819992, -0.04941597208380699, 0.002929135225713253, 0.010280030779540539, 0.0248336810618639, -0.0050188098102808, -0.01959041692316532, 0.05128343775868416, -0.027006402611732483, -0.06798287481069565, 0.009768273681402206, 0.0780743658542633, 0.019141506403684616, -0.004390336107462645, 0.03989908844232559, -0.014589563012123108, 0.054731063544750214, -0.048159025609493256, -0.015020515769720078, 0.0457528680562973, -0.03453012928366661, 0.011635737493634224, -0.011779388412833214, -0.041982028633356094, -0.010414703749120235, -0.03594868257641792, -0.01906968094408512, -0.012434796430170536, 0.06266778707504272, 0.0011368636041879654, -0.0014264103956520557, 0.03620007261633873, -0.002763038733974099, -0.04665068909525871, 0.004071610514074564, -0.04352627694606781, 0.08209659159183502, 0.027850354090332985, -0.003297241171821952, 0.025174852460622787, 0.03068746253848076, 0.006392473354935646, -0.03144162893295288, 0.01788455992937088, 0.050026487559080124, 0.014867886900901794, 0.02916117012500763, 0.01272209919989109, 0.07164597511291504, 0.0000030687181151733967, 0.02564171887934208, 0.03111841529607773, 0.029933294281363487, 0.0248336810618639, -0.018441207706928253, 0.04941597208380699, -0.03582298755645752, -0.014347151853144169, 0.00012071460514562204, -0.01286575011909008, -0.040653254836797714, -0.025192808359861374, 0.014374086633324623, 0.004394825082272291, 0.0007362117758020759, 0.08101920783519745, -0.007011968642473221, 0.03810345008969307, -0.10177679359912872, 0.00799059122800827, 0.03709789365530014, -0.01615176908671856, 0.0005291522247716784, -0.04438818246126175, -0.008650488220155239, -0.03242923319339752, 0.018728509545326233, -0.04690207913517952, -0.026485668495297432, 0.02653953805565834, -0.05128343775868416, -0.020865319296717644, -0.03573320806026459, 0.030956808477640152, 0.02064984291791916, -0.004753952845931053, 0.020111151039600372, 0.02178109437227249, -0.03077724389731884, -0.0873398557305336, 0.05659852549433708, -0.04363401606678963, -0.05968702584505081, -0.050170138478279114, -0.033991437405347824, 0.04237706959247589, 0.008587641641497612, -0.05544931814074516, 0.05904059484601021, 0.054587412625551224, -0.01282085943967104, 0.014643432572484016, 0.012775967828929424, 0.05218125507235527, 0.03867805376648903, 0.0006537246517837048, -0.010477550327777863, 0.03842666372656822, -0.028245393186807632, 0.0015666945837438107, 0.01398802362382412, 0.00825095921754837, -0.007115217857062817, 0.043598104268312454, 0.044783223420381546, 0.0065855043940246105, 0.02460024692118168, 0.008659467101097107, -0.003532918868586421, 0.0467943400144577, -0.0125784482806921, 0.025480110198259354, 0.007380074355751276, -0.08741168677806854, 0.007263357751071453, -0.024707986041903496, -0.062380481511354446, 0.02059597335755825, -0.01581059768795967, -0.03196236491203308, 0.00031030879472382367, -0.001576795126311481, 0.01374561246484518, 0.03348865732550621, 0.014849931001663208, 0.0003768035094253719, -0.06884478032588959, 0.031998276710510254, 0.005166949704289436, 0.06884478032588959, -0.000755851564463228, -0.05771182104945183, 0.0011166627518832684, -0.009687470272183418, -0.014814017340540886, 0.08856089413166046, 0.0002741154457908124, 0.03273449093103409, 0.0022434259299188852, -0.04438818246126175, -0.00044498167699202895, 0.02607267163693905, -0.03616416081786156, -0.022625045850872993, 0.015128254890441895, 0.009050018154084682, 0.013144074007868767, -0.022607088088989258, -0.06920390576124191, -0.0198777187615633, 0.011088067665696144, 0.03147754445672035, -0.01272209919989109, 0.008717824704945087, 0.01282085943967104, 0.008057927712798119, -0.0009932125685736537, -0.02145788073539734, -0.06643862277269363, -0.05778364837169647, 0.03630781173706055, 0.03857031464576721, -0.027455313131213188, -0.018423251807689667, 0.005597902927547693, 0.049775101244449615, 0.04593243449926376, 0.018369382247328758, 0.06730052828788757, 0.011932018212974072, -0.08963827788829803, -0.023612646386027336, -0.03429669514298439, 0.0027742614038288593, 0.01926720142364502, -0.01984180510044098, -0.055485229939222336, 0.01762419193983078, 0.054012805223464966, 0.006486744154244661, -0.007784092798829079, -0.0012277677888050675, 0.03144162893295288, 0.029717817902565002, -0.02639588713645935, -0.07096363604068756, 0.004982897080481052, -0.0037596181500703096, -0.037169717252254486, 0.02122444659471512, 0.021062839776277542, 0.025228722020983696, -0.0039908066391944885, 0.03162119537591934, 0.0496673621237278, 0.05674217641353607, -0.021996572613716125, 0.01874646544456482, 0.010001706890761852, -0.02012910693883896, -0.022894391790032387, -0.024618204683065414, -0.01643907092511654, -0.023038042709231377, -0.0637451708316803, -0.009983750060200691, 0.03928856924176216, -0.03212397173047066, 0.03763658180832863, 0.029717817902565002, 0.006751600652933121, 0.00031956753809936345, -0.03257288411259651, 0.047692157328128815, -0.021008970215916634, 0.03928856924176216, -0.036648981273174286, 0.06065667048096657, 0.005095124244689941, -0.025426240637898445, -0.07060450315475464, -0.0006823426228947937, -0.02506711333990097, -0.03077724389731884, 0.01719323918223381, 0.02082940749824047, 0.005570968613028526, -0.008794140070676804, -0.02293030358850956, 0.010459594428539276, -0.01396108977496624, -0.01061222329735756, 0.03699015453457832, 0.019285157322883606, 0.02420520782470703, -0.030005119740962982, 0.0014084539143368602, 0.006693242583423853, -0.009759295731782913, 0.018656684085726738, 0.033039748668670654, 0.09509701281785965, 0.021421967074275017, -0.06363742798566818, 0.041694726794958115, 0.052253082394599915, -0.019392896443605423, 0.044352270662784576, 0.005602392368018627, 0.003140122862532735, 0.03133389353752136, -0.001286126091144979, -0.0033241757191717625, 0.00023806239187251776, -0.019913630560040474, 0.03321931138634682, -0.034745603799819946, 0.04797946289181709, 0.00035407746327109635, -0.010603245347738266, 0.011249675415456295, 0.02587515115737915, 0.0010330532677471638, 0.030238552019000053, 0.07563229650259018, -0.06485846638679504, -0.0015521050663664937, 0.016430092975497246, 0.058106862008571625, -0.04762033373117447, -0.03752884641289711, 0.014239413663744926, -0.047728072851896286, 0.019536547362804413, -0.04912867024540901, 0.02668318897485733, -0.02573150023818016, -0.04837450012564659, 0.0021659890189766884, 0.034566041082143784, 0.008057927712798119, 0.0010762608144432306, 0.007272336166352034, 0.024420684203505516, 0.03325522691011429, 0.006684264168143272, -0.02944847196340561, -0.015298840589821339, 0.04665068909525871, 0.036038465797901154, 0.005386915523558855, -0.0021513993851840496, 0.019536547362804413, -0.0077302237041294575, 0.023486951366066933, -0.019913630560040474, -0.013404441997408867, 0.019752023741602898, 0.00574155431240797, 0.03106454573571682, 0.009000638499855995, -0.013206921517848969, -0.046542949974536896, -0.008964725770056248, -0.05746043100953102, 0.011249675415456295, -0.0014252880355343223, 0.004857202060520649, 0.018477119505405426, -0.026413843035697937, -0.01762419193983078, 0.07879261672496796, 0.0013332616072148085, 0.04151516407728195, 0.059148333966732025, -0.05171439051628113, -0.07067633420228958, -0.03420691564679146, 0.028981605544686317, -0.03770840913057327, -0.06004615128040314, 0.029197081923484802, 0.02416929416358471, -0.0023679982405155897, -0.04273619502782822, 0.0032186820171773434, 0.09243947267532349, 0.012183407321572304, 0.056634437292814255, -0.034745603799819946, 0.06633088737726212, -0.031100459396839142, -0.024654116481542587, -0.01765112578868866, 0.04805128648877144, 0.03521247208118439, 0.033273182809352875, -0.04191020131111145, 0.013898242264986038, -0.009148778393864632, 0.013521158136427402, -0.04201794043183327, -0.020955100655555725, 0.018764423206448555, 0.04147924855351448, -0.006756090093404055, -0.07412395626306534, -0.01715732552111149, -0.08870454132556915, -0.039791349321603775, -0.00531509006395936, -0.004275864455848932, -0.03417100012302399, 0.012713120318949223, 0.013341594487428665, 0.026036757975816727, 0.03253696858882904, 0.06589993089437485, -0.03699015453457832, -0.02169131301343441, -0.02188883349299431, -0.01797434128820896, 0.022750740870833397, -0.0013747857883572578, -0.06651045382022858, -0.0024622692726552486, 0.013224877417087555, 0.05659852549433708, -0.056203484535217285, 0.0018652195576578379, -0.0134583106264472, 0.020380496978759766, -0.02786830998957157, 0.04438818246126175, 0.04600425809621811, -0.020955100655555725, 0.00813424214720726, 0.010881569236516953, -0.024707986041903496, 0.0034027351066470146, -0.06155448779463768, -0.013584005646407604, 0.03054381161928177, -0.021439924836158752, 0.01296451035887003, -0.011025220155715942, 0.0026687677018344402, -0.016106877475976944, -0.043741755187511444, 0.034943126142024994, 0.05609574913978577, 0.049918752163648605, -0.007209488656371832, -0.006118638440966606, -0.008327273651957512, -0.025516023859381676, -0.10242322087287903, -0.035266339778900146, 0.008686400949954987, 0.03515860065817833, 0.0030391181353479624, -0.1020640954375267, -0.010217183269560337, -0.028802040964365005, -0.04621973633766174, -0.007757158484309912, 0.00518490606918931, -0.0011379859643056989, 0.0220324844121933, 0.01465241052210331, 0.04173063859343529, 0.060584843158721924, 0.02406155690550804, 0.05379733070731163, 0.0002954386582132429, -0.005463230423629284, 0.05096022039651871, -0.026467712596058846, 0.0023051509633660316, -0.026413843035697937, 0.036074377596378326, -0.0014432445168495178, 0.006958099082112312, -0.09509701281785965, -0.03190849721431732, -0.016717394813895226, -0.007698799949139357, 0.008129753172397614, 0.044172707945108414, -0.011195805855095387, 0.02296621724963188, 0.01736382395029068, 0.031280022114515305, -0.04104829579591751, 0.019536547362804413, 0.013179986737668514, -0.02535441517829895, 0.024384770542383194, -0.039360396564006805, -0.013889264315366745, 0.0041030338034033775, 0.007065837737172842, -0.0573526956140995, 0.05289950966835022, -0.007110728416591883, 0.048589978367090225, 0.02264300175011158, 0.023343300446867943, 0.04593243449926376, 0.038175273686647415, 0.05009831488132477, 0.09078748524188995, -0.03594868257641792, 0.04173063859343529, -0.010755875147879124, -0.013188964687287807, -0.020488236099481583, 0.015738772228360176, 0.010684048756957054, 0.03661306947469711, 0.05480288714170456, -0.025857195258140564, 0.029717817902565002, 0.054910626262426376, -0.006711198948323727, 0.032519012689590454, -0.0024330902379006147, 0.015298840589821339, -0.03374004736542702, 0.04453183710575104, -0.08712437748908997, -0.01465241052210331, -0.0655767172574997, -0.011824280023574829, -0.00009735727508086711, -0.03120819665491581, 0.027904221788048744, 0.0006441853474825621, 0.06446342170238495, -0.022158179432153702, 0.028245393186807632, -0.04607608541846275, 0.10867204517126083, -0.03609233349561691, -0.034081220626831055, 0.06992216408252716, 0.07484221458435059, -0.026467712596058846, -0.04090464487671852, 0.016519874334335327, -0.03040016070008278, -0.041551075875759125, -0.011734497733414173, -0.07757158577442169, 0.013521158136427402, -0.029197081923484802, 0.015038472600281239, -0.040832821279764175, 0.03668489679694176, -0.02835313230752945, 0.03677467629313469, -0.03625394031405449, 0.05656261369585991, 0.04399314522743225, 0.055485229939222336, -0.029717817902565002, 0.02460024692118168, 0.028748173266649246, -0.02269687131047249, -0.009884989820420742, 0.01814492791891098, -0.03582298755645752, -0.05799912288784981, -0.01782171241939068, -0.05717312917113304, -0.05185804143548012, -0.003297241171821952, -0.0503137931227684, 0.04104829579591751, -0.023774253204464912, -0.03752884641289711, 0.017471563071012497, 0.05760408192873001, -0.029412558302283287, 0.003321931231766939, 0.00280568515881896, 0.013162029907107353, 0.03487129881978035, -0.030902938917279243, -0.0031468565575778484, 0.0020795739255845547, 0.00011040371464332566, -0.031082503497600555, 0.04162289947271347, -0.03391961008310318, 0.006320647429674864, -0.033273182809352875, 0.021942703053355217, 0.04234115779399872, -0.04880545660853386, -0.0739084780216217, 0.020721668377518654, -0.02697049081325531, -0.007380074355751276, -0.08425135910511017, -0.03724154457449913, -0.09940654784440994, 0.002338819205760956, -0.05365367978811264, 0.032698579132556915, 0.0014757903991267085, -0.03221375495195389, -0.030741332098841667, 0.044352270662784576, 0.0531868115067482, 0.010289008729159832, -0.04876954108476639, 0.000504742783959955, -0.02535441517829895, -0.010540397837758064, -0.01926720142364502, -0.031657107174396515, 0.03386574238538742, 0.08963827788829803, 0.022230004891753197, -0.02136809751391411, 0.03709789365530014, -0.07240014523267746, 0.02630610391497612, 0.057675909250974655, -0.034745603799819946, 0.010755875147879124, -0.0478358119726181, 0.022463437169790268, -0.00989396870136261, -0.04438818246126175, 0.013081226497888565, -0.006123127415776253, -0.009902946650981903, -0.00786040723323822, -0.015155188739299774, -0.002623876789584756, 0.008762716315686703, 0.018728509545326233, 0.07214875519275665, -0.025964932516217232, -0.01550533901900053, -0.04938006028532982, -0.03691832721233368, 0.011159893125295639, -0.004659682046622038, -0.021206490695476532, -0.017058566212654114, 0.04018639028072357, 0.01745360717177391, -0.005193884484469891, 0.03567933663725853, 0.018674639984965324, 0.007231933996081352, 0.03857031464576721, 0.0612671859562397, 0.0011183461174368858, -0.005674217827618122, -0.038498491048812866, 0.05728086829185486, -0.0009584220824763179, 0.0031670574098825455, 0.022984173148870468, -0.0075731053948402405, -0.00447787344455719, -0.03183666989207268, 0.031172284856438637, -0.009956815280020237, -0.07405213266611099, 0.01969815418124199, 0.005988454446196556, -0.025462154299020767, -0.033129531890153885, 0.01869259774684906, -0.013323637656867504, 0.01702265255153179, -0.02226591855287552, -0.004417270887643099, -0.03867805376648903, -0.03226762264966965, 0.012731077149510384, 0.02469003014266491, 0.01424839161336422, -0.03438647836446762, 0.026413843035697937, 0.1310097873210907, -0.08913549780845642, 0.006334114819765091, -0.012793924659490585, -0.026898665353655815, 0.0003305097052361816, -0.012192385271191597, 0.007649420294910669, 0.06313464790582657, -0.012695164419710636, -0.046830251812934875, 0.02460024692118168, -0.008488881401717663, -0.031710974872112274, 0.0022961727809160948, -0.007474345155060291, -0.0018248176202178001, -0.028945693746209145, 0.00937323272228241, -0.008367675356566906, -0.012659251689910889, 0.007487812545150518, 0.011896105483174324, 0.0587892048060894, 0.023002129048109055, -0.003968361299484968, -0.028029916808009148, -0.007662887219339609, 0.002081818412989378, -0.02258913218975067, 0.024187250062823296, 0.0051085916347801685, 0.02434885874390602, -0.03828301280736923, 0.021960658952593803, 0.021242404356598854, 0.06263187527656555, -0.007038902956992388, 0.03896535560488701, -0.012677207589149475, -0.04528600350022316, 0.010172292590141296, 0.024079512804746628, -0.008933302015066147, -0.03282427042722702, -0.040976472198963165, 0.01941085234284401, 0.0039459154941141605, 0.00030469740158878267, 0.036415550857782364, 0.032752446830272675, 0.041694726794958115, -0.003234393894672394 ]
4,647
sklearn.utils._metadata_requests
set_fit_request
Request metadata passed to the ``fit`` method. Note that this method is only relevant if ``enable_metadata_routing=True`` (see :func:`sklearn.set_config`). Please see :ref:`User Guide <metadata_routing>` on how the routing mechanism works. The options for each parameter are: - ``True``: metadata is requested, and passed to ``fit`` if provided. The request is ignored if metadata is not provided. - ``False``: metadata is not requested and the meta-estimator will not pass it to ``fit``. - ``None``: metadata is not requested, and the meta-estimator will raise an error if the user provides it. - ``str``: metadata should be passed to the meta-estimator with this given alias instead of the original name. The default (``sklearn.utils.metadata_routing.UNCHANGED``) retains the existing request. This allows you to change the request for some parameters and not others. .. versionadded:: 1.3 .. note:: This method is only relevant if this estimator is used as a sub-estimator of a meta-estimator, e.g. used inside a :class:`~sklearn.pipeline.Pipeline`. Otherwise it has no effect. Parameters ---------- check_input : str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED Metadata routing for ``check_input`` parameter in ``fit``. x : str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED Metadata routing for ``x`` parameter in ``fit``. z : str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED Metadata routing for ``z`` parameter in ``fit``. Returns ------- self : object The updated object.
def __get__(self, instance, owner): # we would want to have a method which accepts only the expected args def func(**kw): """Updates the request for provided parameters This docstring is overwritten below. See REQUESTER_DOC for expected functionality """ if not _routing_enabled(): raise RuntimeError( "This method is only available when metadata routing is enabled." " You can enable it using" " sklearn.set_config(enable_metadata_routing=True)." ) if self.validate_keys and (set(kw) - set(self.keys)): raise TypeError( f"Unexpected args: {set(kw) - set(self.keys)}. Accepted arguments" f" are: {set(self.keys)}" ) requests = instance._get_metadata_request() method_metadata_request = getattr(requests, self.name) for prop, alias in kw.items(): if alias is not UNCHANGED: method_metadata_request.add_request(param=prop, alias=alias) instance._metadata_request = requests return instance # Now we set the relevant attributes of the function so that it seems # like a normal method to the end user, with known expected arguments. func.__name__ = f"set_{self.name}_request" params = [ inspect.Parameter( name="self", kind=inspect.Parameter.POSITIONAL_OR_KEYWORD, annotation=owner, ) ] params.extend( [ inspect.Parameter( k, inspect.Parameter.KEYWORD_ONLY, default=UNCHANGED, annotation=Optional[Union[bool, None, str]], ) for k in self.keys ] ) func.__signature__ = inspect.Signature( params, return_annotation=owner, ) doc = REQUESTER_DOC.format(method=self.name) for metadata in self.keys: doc += REQUESTER_DOC_PARAM.format(metadata=metadata, method=self.name) doc += REQUESTER_DOC_RETURN func.__doc__ = doc return func
(self: optbinning.binning.multidimensional.continuous_binning_2d.ContinuousOptimalBinning2D, *, check_input: Union[bool, NoneType, str] = '$UNCHANGED$', x: Union[bool, NoneType, str] = '$UNCHANGED$', z: Union[bool, NoneType, str] = '$UNCHANGED$') -> optbinning.binning.multidimensional.continuous_binning_2d.ContinuousOptimalBinning2D
[ 0.04383525252342224, -0.05837089940905571, -0.01913035847246647, 0.004746916238218546, -0.002937095006927848, -0.01727535016834736, -0.01155812293291092, 0.00996947567909956, 0.05700104683637619, 0.010854171589016914, -0.021461008116602898, 0.006492525804787874, 0.05125528201460838, -0.0053414697758853436, -0.019919926300644875, 0.037480663508176804, 0.02996550314128399, 0.023820197209715843, 0.030117709189653397, -0.033694542944431305, 0.019206460565328598, -0.04276981204748154, -0.02876688353717327, 0.01496372651308775, 0.008471200242638588, 0.06548652052879333, 0.03795630484819412, -0.04531925916671753, 0.08995358645915985, -0.006511551793664694, -0.025151997804641724, -0.014174158684909344, 0.014716392382979393, 0.06289902329444885, 0.028938114643096924, -0.03154463693499565, -0.010759042575955391, 0.02275475673377514, -0.06259460747241974, -0.01528716366738081, -0.03721430152654648, -0.0266740545630455, 0.04862973093986511, -0.09665064513683319, 0.059474390000104904, 0.0319061279296875, -0.005303418729454279, 0.10509806126356125, -0.019206460565328598, -0.01768440380692482, 0.01319433469325304, -0.01121565978974104, 0.015077880583703518, -0.005084622651338577, -0.005855164490640163, 0.057343509048223495, 0.05563119426369667, 0.04406356066465378, 0.05951244384050369, 0.028062932193279266, 0.02718774974346161, 0.03468388319015503, 0.03241982311010361, -0.008385584689676762, -0.04345473647117615, -0.03871733322739601, -0.046422749757766724, -0.013869747519493103, 0.008651944808661938, 0.03169684484601021, 0.028709806501865387, -0.017979301512241364, 0.005455624312162399, 0.026693081483244896, 0.021575162187218666, -0.026407694444060326, -0.04048672690987587, -0.052434876561164856, 0.0530056469142437, -0.04170437157154083, 0.01711363159120083, -0.01719924807548523, -0.0270355436950922, -0.08104955404996872, -0.009070510044693947, -0.03213443607091904, -0.00847595650702715, -0.04927660524845123, 0.03938323259353638, 0.0029965504072606564, -0.08553962409496307, 0.05148359015583992, -0.016200397163629532, -0.0030250889249145985, 0.009546153247356415, -0.030631404370069504, 0.0018359816167503595, -0.05844700336456299, 0.002411509631201625, -0.026616977527737617, 0.000663521874230355, 0.0358634777367115, 0.06643780320882797, 0.0757223516702652, 0.03706209734082222, -0.050570353865623474, -0.016704579815268517, -0.008675727061927319, -0.011263224296271801, -0.0038313036784529686, 0.011482019908726215, -0.010854171589016914, -0.05955049395561218, 0.019082793965935707, 0.0013520149514079094, 0.0011082480195909739, -0.019729668274521828, -0.04334058240056038, -0.0508367158472538, -0.014973239041864872, -0.026807235553860664, 0.011044428683817387, -0.0254183579236269, -0.06362199783325195, 0.0007479484775103629, 0.004283164627850056, 0.009617500007152557, 0.013432156294584274, 0.04482458904385567, -0.07241187989711761, -0.031601715832948685, -0.006782668177038431, -0.03907882049679756, 0.09284549951553345, 0.0439874567091465, 0.01622893661260605, 0.04748819023370743, 0.020471671596169472, -0.011929124593734741, 0.05905582383275032, -0.003013197798281908, 0.020129207521677017, 0.036757685244083405, -0.02134685404598713, -0.0013710407074540854, -0.05072256177663803, 0.026883337646722794, -0.0001608267630217597, 0.025722770020365715, -0.0340750589966774, 0.025913026183843613, -0.01833127811551094, 0.002818184206262231, -0.01269015297293663, -0.0026968952734023333, 0.0019322993466630578, 0.023021116852760315, -0.004782589618116617, 0.011234685778617859, -0.018150534480810165, -0.004782589618116617, -0.005702958442270756, -0.012052791193127632, -0.09139954298734665, 0.03521660342812538, 0.021461008116602898, -0.0061357938684523106, -0.04859168082475662, -0.03827974200248718, 0.03555906563997269, -0.060882292687892914, -0.02775852009654045, -0.03382772579789162, 0.006839745212346315, 0.03533075749874115, 0.0393071323633194, 0.017142171040177345, 0.0055650221183896065, 0.008552059531211853, 0.02808195725083351, 0.0137936444953084, -0.0526251345872879, -0.08553962409496307, -0.035825423896312714, 0.006364102475345135, 0.07123228162527084, 0.006392640992999077, 0.0019370558438822627, -0.043644994497299194, 0.045623667538166046, 0.029432784765958786, -0.008371314965188503, 0.05369057133793831, 0.03439849615097046, -0.031278278678655624, -0.04802091047167778, -0.05905582383275032, 0.04878193885087967, 0.013765105977654457, 0.07690194994211197, 0.05837089940905571, 0.008989650756120682, 0.01881643384695053, 0.049048297107219696, 0.006107254885137081, 0.049923479557037354, 0.03645327314734459, -0.00015934037219267339, -0.05235877260565758, -0.013042128644883633, 0.01319433469325304, -0.026597952470183372, 0.018064917996525764, -0.008490226231515408, 0.003912162967026234, -0.01093978714197874, 0.01777002029120922, -0.01557254884392023, -0.01204327866435051, -0.022868910804390907, 0.09284549951553345, 0.04813506454229355, 0.03367551788687706, 0.019710643216967583, 0.025932051241397858, -0.031107047572731972, 0.0555170401930809, -0.051902156323194504, -0.03660547733306885, -0.07914698123931885, 0.0046827043406665325, 0.0007895672461017966, 0.018673740327358246, 0.04391135275363922, -0.034702908247709274, -0.01993895135819912, 0.036148861050605774, 0.038527075201272964, -0.013422642834484577, -0.006668513640761375, -0.00593126704916358, 0.049390759319067, 0.05007568746805191, 0.03312377259135246, -0.05502237379550934, -0.01699947752058506, -0.0045804413966834545, 0.0678076520562172, 0.042922016233205795, -0.001805064850486815, 0.04269370809197426, -0.025760820135474205, -0.051864102482795715, -0.0027944021858274937, -0.031088020652532578, -0.034017980098724365, -0.042160987854003906, 0.0002696300798561424, 0.042922016233205795, -0.015325214713811874, -0.03078361041843891, 0.012195484712719917, 0.0018966261995956302, 0.04143800958991051, 0.018150534480810165, 0.011833995580673218, 0.04318837821483612, 0.013879260048270226, -0.05566924810409546, 0.004806371871381998, -0.009546153247356415, 0.045014847069978714, -0.0015708107966929674, 0.01760830171406269, -0.01825517602264881, -0.05235877260565758, -0.00006484350888058543, -0.02437194250524044, -0.04330253228545189, -0.012328664772212505, 0.05015178769826889, -0.023629941046237946, 0.04337863251566887, 0.006073960103094578, -0.014411980286240578, -0.03065042942762375, -0.004639896564185619, 0.05365252122282982, 0.012233535759150982, -0.02087121084332466, 0.011044428683817387, 0.007710171863436699, -0.005874190013855696, -0.04250345006585121, 0.032210540026426315, -0.0034674368798732758, -0.07313485443592072, 0.0012735339114442468, 0.0017170709325000644, -0.011520071886479855, 0.02094731479883194, -0.0011498667299747467, -0.03302864357829094, -0.017779532819986343, 0.05285344272851944, -0.021518085151910782, 0.08104955404996872, -0.00801458302885294, -0.011691302992403507, 0.0057505229488015175, 0.0038645986933261156, 0.04528120532631874, -0.033504288643598557, -0.04452017694711685, -0.001132624689489603, -0.0026802478823810816, -0.013983901590108871, 0.018179072067141533, 0.040182314813137054, 0.10410872101783752, -0.014392955228686333, 0.04737403616309166, -0.03436044603586197, -0.007353439461439848, -0.014012440107762814, -0.012243049219250679, -0.0035554307978600264, -0.004066747147589922, -0.038336820900440216, 0.0009483130997978151, -0.0313543826341629, -0.0038978937081992626, 0.022659629583358765, 0.02477148361504078, -0.0861484482884407, 0.031202174723148346, -0.0040929075330495834, -0.023496760055422783, 0.01462126336991787, -0.012423792853951454, 0.03510244935750961, -0.017475120723247528, -0.006211896426975727, -0.01272820495069027, -0.0364152230322361, -0.01121565978974104, 0.051940206438302994, -0.0023294612765312195, 0.07914698123931885, -0.02336358092725277, 0.021461008116602898, -0.038165587931871414, 0.05213046446442604, 0.049048297107219696, 0.08439808338880539, -0.006663757376372814, -0.0137936444953084, -0.04592807963490486, -0.007519914768636227, -0.07092787325382233, 0.02844344638288021, -0.048477526754140854, -0.0036362900864332914, 0.006192870903760195, 0.010863684117794037, -0.0009084779885597527, -0.0254183579236269, 0.0036600723396986723, 0.02581789717078209, -0.056544430553913116, 0.0034436548594385386, -0.0984010100364685, -0.05437549948692322, 0.02397240325808525, 0.019158896058797836, 0.0021867682226002216, -0.03999205678701401, -0.017893686890602112, -0.05072256177663803, 0.02876688353717327, 0.032210540026426315, 0.022145934402942657, -0.005065597128123045, 0.011367865838110447, 0.010359502397477627, -0.0457758754491806, 0.025722770020365715, 0.01615283265709877, 0.038450974971055984, -0.01773196831345558, 0.021898599341511726, -0.05277733877301216, -0.01427880022674799, 0.010654401034116745, -0.018987664952874184, -0.06986243277788162, 0.026217438280582428, -0.010321451351046562, 0.0072250161319971085, -0.04265565797686577, 0.054527703672647476, -0.056544430553913116, 0.013061154633760452, 0.024543175473809242, 0.03447460010647774, 0.009665064513683319, 0.038336820900440216, 0.0270355436950922, 0.015648651868104935, 0.019225487485527992, -0.04889609292149544, -0.04893414303660393, 0.020110182464122772, -0.02408655732870102, -0.0016599937807768583, 0.01651432178914547, 0.028652729466557503, -0.004723133984953165, 0.029413757845759392, 0.006492525804787874, 0.05616391450166702, 0.008590111508965492, 0.019472820684313774, 0.03468388319015503, 0.05167384818196297, 0.006877796724438667, -0.045090947300195694, -0.04261760413646698, -0.00257798470556736, 0.04132385551929474, 0.008899278938770294, 0.029413757845759392, -0.04143800958991051, -0.008533033542335033, -0.03630106896162033, -0.015477420762181282, -0.05646832659840584, -0.025113945826888084, 0.013308488763868809, 0.051179178059101105, -0.05646832659840584, -0.04463433101773262, -0.017665378749370575, -0.022145934402942657, -0.04250345006585121, -0.053994983434677124, 0.010492682456970215, 0.038812462240457535, 0.05692494288086891, -0.06636170297861099, 0.053195904940366745, 0.030802635475993156, 0.005370008759200573, 0.04166632145643234, -0.023420657962560654, -0.05220656841993332, 0.03529270365834236, -0.050494253635406494, -0.006083473097532988, 0.038774412125349045, 0.034265317022800446, 0.002770619932562113, -0.06259460747241974, -0.020928287878632545, -0.027929753065109253, 0.03464582934975624, 0.016780681908130646, 0.01059732399880886, -0.06655196100473404, -0.03249592334032059, 0.03017478622496128, -0.06971022486686707, -0.028538575395941734, -0.010302425362169743, -0.023306503891944885, 0.02167029120028019, -0.013232385739684105, 0.020680954679846764, -0.07123228162527084, -0.022050805389881134, 0.016942400485277176, -0.024543175473809242, 0.040905289351940155, 0.05125528201460838, -0.017151683568954468, -0.06624754518270493, -0.013327514752745628, -0.0020131587516516447, -0.0228879377245903, -0.007510401774197817, -0.009512858465313911, 0.06499184668064117, 0.05410913750529289, 0.02812000922858715, -0.017418043687939644, 0.053195904940366745, 0.04528120532631874, 0.015515471808612347, -0.018921075388789177, -0.014392955228686333, -0.01873081736266613, -0.033009618520736694, 0.020281413570046425, 0.04193267971277237, 0.015515471808612347, -0.05018984153866768, -0.0468793660402298, -0.015772318467497826, 0.001795551972463727, -0.0071061053313314915, -0.024790508672595024, -0.004254626110196114, -0.004932417068630457, 0.060806192457675934, -0.004454395733773708, -0.017379991710186005, -0.07743466645479202, 0.00805739127099514, -0.05566924810409546, -0.013983901590108871, 0.06845452636480331, 0.012794794514775276, 0.05361447110772133, -0.05167384818196297, 0.0116247134283185, -0.0009489076328463852, 0.012908948585391045, -0.01873081736266613, -0.012994564138352871, 0.02891908958554268, -0.011177608743309975, -0.006197627168148756, -0.010169245302677155, 0.017294377088546753, 0.015772318467497826, 0.061491116881370544, -0.024257788434624672, -0.01144396886229515, 0.04657495394349098, 0.005274880211800337, 0.024752456694841385, 0.04029646888375282, -0.06510600447654724, 0.03165879100561142, -0.006040665321052074, -0.0439874567091465, 0.023534812033176422, -0.013441668823361397, 0.02271670661866665, -0.09139954298734665, -0.06267070770263672, 0.03847000002861023, 0.04174242168664932, 0.015534497797489166, -0.012309638783335686, 0.010254861786961555, 0.05365252122282982, -0.01816955953836441, 0.030269915238022804, 0.0164001677185297, -0.020053105428814888, -0.026883337646722794, 0.02545640990138054, 0.029033243656158447, -0.0378611758351326, 0.07732051610946655, 0.05338616296648979, 0.01561060082167387, -0.04668910801410675, -0.09421534836292267, -0.00863767508417368, 0.007624555844813585, -0.003189185867086053, 0.027530211955308914, -0.035787373781204224, 0.05825674533843994, 0.017028016969561577, -0.01813150756061077, -0.03274326026439667, -0.060083214193582535, 0.02682626061141491, -0.046498853713274, 0.02170834317803383, -0.022088857367634773, -0.0674271434545517, 0.003108326578512788, -0.01464028935879469, 0.042960070073604584, -0.01691386289894581, 0.0073581961914896965, -0.031525611877441406, -0.07005269080400467, -0.03515952453017235, -0.03651035204529762, 0.02461927756667137, 0.04486263915896416, -0.055935606360435486, -0.03222956508398056, 0.03420823812484741, -0.027492159977555275, -0.040258415043354034, 0.020053105428814888, 0.011900586076080799, 0.009959963150322437, -0.007681633345782757, 0.0026945171412080526, -0.04592807963490486, 0.022773783653974533, 0.016628475859761238, -0.022336192429065704, -0.004138093441724777, -0.02083316072821617, 0.011872047558426857, -0.024562200531363487, 0.026940414682030678, 0.021175622940063477, -0.030916789546608925, 0.05426134541630745, 0.049771275371313095, -0.09824880212545395, -0.020281413570046425, -0.032286640256643295, 0.00863767508417368, 0.0059217545203864574, -0.05692494288086891, 0.014478570781648159, 0.00902294646948576, -0.07016684114933014, -0.01047365739941597, -0.052549030631780624, 0.012138407677412033, -0.025151997804641724, 0.042845916002988815, 0.0020155368838459253, 0.09223667532205582, -0.01688532344996929, 0.07073761522769928, 0.02465732954442501, -0.06575287878513336, 0.016742629930377007, 0.0021047198679298162, 0.009522370994091034, -0.021137570962309837, 0.028329292312264442, -0.06613339483737946, 0.037766046822071075, -0.00401918264105916, -0.04280786216259003, 0.08782270550727844, -0.01238574180752039, -0.037727996706962585, 0.07724440842866898, -0.03721430152654648, 0.00498473783954978, 0.058789465576410294, -0.015972089022397995, -0.01510641910135746, -0.00338419945910573, 0.030688481405377388, -0.04550951346755028, -0.024904662743210793, -0.004806371871381998, 0.05848505347967148, -0.031925152987241745, -0.0019441904732957482, 0.021613214164972305, -0.03824169188737869, -0.054489653557538986, 0.07408614456653595, 0.056049760431051254, 0.015772318467497826, 0.008609136566519737, -0.002903799992054701, 0.015639139339327812, 0.02119464799761772, -0.018483484163880348, 0.030479198321700096, -0.04737403616309166, -0.027244826778769493, 0.034455571323633194, -0.0068968222476542, 0.042160987854003906, -0.04874388501048088, 0.05152164027094841, 0.00015473258099518716, -0.007548453286290169, 0.027092620730400085, 0.00022949770209379494, -0.011501045897603035, -0.05376667529344559, 0.00029593906947411597, -0.08203889429569244, 0.05776207521557808, 0.024600252509117126, -0.009037215262651443, 0.00032997727976180613, -0.08386535942554474, -0.07671169191598892, 0.030441146343946457, -0.007167938631027937, -0.002649330999702215, 0.018026866018772125, 0.0058028437197208405, -0.014326364733278751, 0.007795787416398525, 0.007695902604609728, 0.007129887584596872, -0.020072130486369133, 0.004692217335104942, -0.029718169942498207, 0.040981393307447433, 0.007567478809505701, 0.04136190935969353, -0.04311227425932884, 0.08021242171525955, 0.009565179236233234, -0.006483012810349464, -0.007196477614343166, 0.01015022024512291, 0.028785910457372665, 0.014383441768586636, -0.00820008385926485, 0.04041062295436859, -0.0389266163110733, -0.0069348737597465515, -0.0003971618425566703, -0.02231716550886631, -0.032857414335012436, -0.0013472585706040263, -0.01937769167125225, 0.08386535942554474, 0.006654244381934404, -0.012452331371605396, -0.005141700152307749, 0.03690988942980766, -0.08143007010221481, 0.006116767879575491, -0.005964562296867371, 0.024885637685656548, 0.05015178769826889, -0.04257955402135849, 0.05897972360253334, -0.037518713623285294, 0.04383525252342224, 0.02087121084332466, 0.02224106341600418, 0.008185815066099167, 0.0056982021778821945, 0.07416224479675293, -0.013555822893977165, 0.02804390713572502, 0.016038678586483, 0.006021639332175255, 0.003724284004420042, 0.02163223922252655, -0.05437549948692322, 0.003671963233500719, 0.014954213052988052, 0.03373259678483009, -0.026046207174658775, -0.051217228174209595, -0.020414594560861588, 0.002381781814619899, -0.01508739311248064, 0.021289777010679245, 0.02711164578795433, 0.020110182464122772, 0.05627806857228279 ]
4,650
optbinning.binning.binning
to_json
Save optimal bins and/or splits points and transformation depending on the target type. Parameters ---------- path: The path where the json is going to be saved.
def to_json(self, path): """ Save optimal bins and/or splits points and transformation depending on the target type. Parameters ---------- path: The path where the json is going to be saved. """ if path is None: raise ValueError('Specify the path for the json file') table = self.binning_table opt_bin_dict = dict() opt_bin_dict['name'] = table.name opt_bin_dict['dtype'] = table.dtype opt_bin_dict['special_codes'] = table.special_codes if table.dtype == 'numerical': opt_bin_dict['splits'] = table.splits.tolist() elif table.dtype == 'categorical': opt_bin_dict['splits'] = [split.tolist() for split in table.splits] opt_bin_dict['n_nonevent'] = table.n_nonevent.tolist() opt_bin_dict['n_event'] = table.n_event.tolist() opt_bin_dict['min_x'] = table.min_x opt_bin_dict['max_x'] = table.max_x opt_bin_dict['categories'] = table.categories opt_bin_dict['cat_others'] = table.cat_others opt_bin_dict['user_splits'] = table.user_splits with open(path, "w") as write_file: json.dump(opt_bin_dict, write_file)
(self, path)
[ 0.004397603217512369, -0.01927916519343853, -0.012441999278962612, -0.00960306916385889, -0.02809719182550907, -0.023642536252737045, -0.08420029282569885, 0.02915608510375023, -0.04337812215089798, -0.057216763496398926, 0.013263554312288761, 0.024957025423645973, -0.04319555312395096, -0.028024164959788322, -0.029028289020061493, 0.022802725434303284, 0.046992965042591095, -0.0015712245367467403, 0.010178158059716225, 0.07313667982816696, 0.014021211303770542, -0.07967261224985123, 0.023806847631931305, 0.06378920376300812, 0.03058011457324028, -0.005303596146404743, 0.023131346330046654, -0.0014502733247354627, 0.02758600190281868, -0.011218794621527195, -0.06254774332046509, -0.07280805706977844, 0.02251061610877514, 0.02517610602080822, 0.011912552639842033, -0.02749471925199032, 0.04136987403035164, 0.041844550520181656, -0.06090463325381279, 0.0028777257539331913, -0.02725738100707531, -0.009333780966699123, -0.08836284279823303, 0.020465856418013573, 0.050388727337121964, -0.014824509620666504, -0.07167613506317139, 0.035783298313617706, 0.013902542181313038, -0.0573263056576252, -0.04461958259344101, -0.08463845402002335, 0.028371043503284454, 0.060612525790929794, -0.05491640791296959, 0.005805657710880041, 0.026052432134747505, 0.01063457690179348, 0.00743507593870163, -0.009794765152037144, -0.0279146246612072, 0.02758600190281868, 0.03600237891077995, -0.029539478942751884, 0.020630167797207832, 0.019991179928183556, -0.1146526113152504, -0.013400480151176453, -0.013300067745149136, 0.042684365063905716, 0.036513570696115494, -0.052068352699279785, 0.06787873059511185, 0.06455599516630173, -0.02990461327135563, 0.03550944849848747, -0.061050690710544586, -0.03711604326963425, -0.01694229617714882, -0.014075981453061104, 0.025303903967142105, -0.0453498549759388, 0.022656669840216637, -0.031949374824762344, -0.009279010817408562, -0.01960778795182705, 0.05382100120186806, 0.03518082574009895, -0.021415209397673607, -0.032606616616249084, -0.020064206793904305, 0.016166383400559425, -0.021214384585618973, 0.03205891326069832, 0.0375724621117115, -0.05177624151110649, -0.017325688153505325, -0.03649531304836273, -0.03928860276937485, -0.016832755878567696, -0.02475620061159134, 0.004447809420526028, -0.0021657110191881657, 0.051045972853899, 0.04794231802225113, -0.041917577385902405, 0.008042113855481148, -0.0034071726258844137, -0.07952655851840973, -0.018448481336236, -0.07441465556621552, 0.08595294505357742, 0.024957025423645973, -0.08887402713298798, 0.05838519707322121, 0.005728066433221102, -0.0009299549856223166, -0.0036285361275076866, 0.005677860230207443, 0.020009435713291168, 0.01071673259139061, 0.025139592587947845, 0.022127224132418633, 0.06568790972232819, -0.012816263362765312, 0.01868581958115101, 0.031620752066373825, 0.08222856372594833, 0.02243758924305439, -0.019224394112825394, 0.014185521751642227, -0.03492522984743118, -0.03877741098403931, 0.018585408106446266, 0.032277997583150864, -0.034852202981710434, -0.0543321929872036, 0.017133992165327072, 0.020009435713291168, 0.030306262895464897, 0.06189050152897835, -0.05312724411487579, 0.007010605651885271, -0.075144924223423, 0.04900120943784714, 0.019899895414710045, 0.015856018289923668, 0.0030420369002968073, -0.021561263129115105, -0.056559521704912186, -0.0003334716020617634, 0.010041232220828533, -0.06820734590291977, -0.0712379738688469, 0.020666681230068207, -0.035692013800144196, -0.011291821487247944, -0.04045703634619713, 0.0020493241026997566, -0.014012082479894161, -0.011291821487247944, 0.01860366389155388, 0.01811985857784748, -0.0511920265853405, -0.037755031138658524, 0.033775053918361664, 0.012998831458389759, 0.016056843101978302, -0.01969907060265541, -0.019461732357740402, 0.0018998467130586505, -0.011593058705329895, -0.06787873059511185, 0.06667377799749374, -0.0117117278277874, 0.05049826577305794, 0.04162546992301941, 0.02285749465227127, 0.008233809843659401, 0.06886459141969681, 0.015171388164162636, -0.02450060471892357, -0.014130751602351665, 0.04644526168704033, 0.014578042551875114, -0.07171265035867691, 0.023076577112078667, -0.03392110764980316, 0.011227922514081001, 0.059298038482666016, 0.021488236263394356, 0.010981456376612186, 0.024573633447289467, -0.012432870455086231, 0.02924736961722374, -0.05294467508792877, 0.016577159985899925, -0.009767379611730576, -0.05407659709453583, 0.020995302125811577, -0.018174629658460617, -0.03481568768620491, 0.03326386213302612, 0.006065817084163427, -0.0077500054612755775, -0.0407126322388649, 0.010981456376612186, -0.035947609692811966, 0.030452316626906395, 0.00802385713905096, 0.0022512897849082947, -0.05517200380563736, -0.010543293319642544, 0.0124602559953928, 0.05685162916779518, -0.024299781769514084, -0.02510307915508747, 0.0332273505628109, -0.012241174466907978, 0.01147438958287239, -0.017599541693925858, 0.021323924884200096, 0.01794642023742199, 0.033117808401584625, -0.015719091519713402, -0.017590412870049477, 0.027859853580594063, -0.03737163916230202, 0.04202711954712868, -0.03421321511268616, 0.0034733533393591642, -0.027732057496905327, -0.03490697219967842, -0.04020144045352936, -0.03629449009895325, 0.06419085711240768, -0.023058319464325905, -0.050571296364068985, 0.023715563118457794, -0.009639582596719265, 0.024975281208753586, -0.012469383887946606, -0.016495006158947945, -0.06776918470859528, -0.00938398763537407, 0.004815226886421442, 0.08493056148290634, -0.02194465510547161, -0.012578925117850304, 0.002357407473027706, 0.06828037649393082, -0.0006566737429238856, -0.013829514384269714, 0.049074240028858185, 0.012889290228486061, -0.09420501440763474, -0.004283498041331768, -0.021068330854177475, -0.006595263723284006, 0.004618966486304998, -0.027640772983431816, -0.03025149367749691, -0.00016388317453674972, 0.016385463997721672, -0.0028503406792879105, -0.05013313144445419, 0.0014217471471056342, 0.008384428918361664, 0.00037968409014865756, 0.02367904968559742, -0.0733557641506195, 0.01993640884757042, -0.06134279817342758, -0.03355596959590912, -0.0011473248014226556, 0.005604832898825407, -0.0002083840809063986, -0.026746191084384918, 0.008986902423202991, 0.0014742354396730661, 0.03249707818031311, -0.005143849179148674, 0.024810971692204475, -0.016768857836723328, -0.029466452077031136, -0.019060082733631134, -0.027640772983431816, -0.02110484428703785, 0.025376930832862854, -0.03866787254810333, -0.005805657710880041, 0.05838519707322121, -0.03563724458217621, 0.0300141554325819, 0.03558247536420822, -0.0067595746368169785, 0.03342817351222038, -0.08675624430179596, 0.06488461792469025, 0.00014006377023179084, 0.025979405269026756, -0.006540493108332157, 0.08682926744222641, 0.007535487879067659, -0.042757391929626465, -0.0051940553821623325, -0.009114700369536877, -0.053236786276102066, -0.003560073208063841, 0.04513077437877655, -0.005143849179148674, -0.03244230896234512, 0.05608484521508217, 0.034541837871074677, 0.011675214394927025, -0.0032497078645974398, -0.00780934002250433, -0.0049612815491855145, 0.01026944164186716, 0.07127448916435242, -0.07616730779409409, 0.02775031328201294, 0.018055960536003113, -0.04414490610361099, 0.048490021377801895, -0.04326857998967171, 0.04312252625823021, 0.03414018824696541, 0.00893669668585062, -0.03264313191175461, 0.005075386259704828, -0.016558904200792313, 0.09530042111873627, 0.04962194338440895, -0.006951271090656519, 0.02019200474023819, 0.03804713860154152, 0.0013156295754015446, -0.037335123866796494, 0.04695644974708557, 0.04104125127196312, 0.016823627054691315, 0.026381054893136024, 0.028060678392648697, -0.03523559495806694, 0.026381054893136024, 0.004290344659239054, 0.00413287989795208, -0.00006436229887185618, 0.051557160913944244, -0.03928860276937485, 0.06773266941308975, -0.014824509620666504, 0.08529569953680038, -0.03558247536420822, -0.04852653667330742, 0.048307452350854874, -0.06287636607885361, -0.007325535174459219, -0.027805084362626076, 0.03074442595243454, -0.01979035511612892, -0.024482348933815956, 0.022620156407356262, 0.07401300966739655, 0.016394592821598053, 0.03424973040819168, -0.01026031281799078, 0.075144924223423, -0.03058011457324028, 0.007316406816244125, -0.04918377846479416, 0.009493527933955193, 0.0370430164039135, -0.004596145823597908, 0.07342878729104996, -0.0075628734193742275, 0.014012082479894161, -0.02849884144961834, -0.025632526725530624, 0.0028914182912558317, -0.019169624894857407, -0.03034277632832527, 0.031620752066373825, 0.058531254529953, -0.02101355977356434, 0.0279146246612072, -0.04604361206293106, -0.012204661034047604, -0.048416994512081146, -0.00046554801519960165, 0.01570083573460579, 0.01911485381424427, 0.011109253391623497, 0.0028777257539331913, 0.0143315764144063, 0.013866028748452663, 0.0337567962706089, -0.0014046314172446728, 0.0680978074669838, -0.06006482243537903, -0.07631336152553558, 0.015445239841938019, 0.03812016546726227, -0.04231922701001167, -0.059955283999443054, 0.031712036579847336, 0.007371176965534687, 0.04272087663412094, -0.03408541902899742, -0.03315431997179985, 0.04188106581568718, -0.011812140233814716, 0.04173501208424568, -0.02501179650425911, 0.053638435900211334, -0.05210486426949501, -0.023879874497652054, -0.007006041239947081, 0.02817021869122982, 0.03638577088713646, 0.0811331495642662, 0.00256736041046679, 0.04345114901661873, 0.01296231709420681, -0.034267984330654144, -0.025669040158391, 0.019845126196742058, -0.024372808635234833, 0.08544175326824188, 0.012469383887946606, -0.06908367574214935, -0.021378695964813232, -0.09033457189798355, 0.005011487286537886, 0.038266222923994064, 0.020502369850873947, -0.03414018824696541, 0.02992287091910839, 0.05407659709453583, 0.036349259316921234, 0.03833924978971481, -0.0007736312691122293, -0.019078340381383896, 0.01063457690179348, -0.028863977640867233, -0.03822970762848854, 0.016266794875264168, -0.0029781381599605083, -0.02220025099813938, 0.059042442589998245, 0.012807134538888931, 0.04918377846479416, -0.08587991446256638, 0.0016556621994823217, -0.014468502253293991, 0.021543007344007492, -0.036896962672472, 0.030141951516270638, 0.020246773958206177, 0.024153726175427437, 0.014057724736630917, 0.027458203956484795, 0.0062575130723416805, 0.008863668888807297, -0.045167285948991776, -0.027056556195020676, 0.01374735962599516, -0.00708363251760602, 0.01977209746837616, -0.011017969809472561, 0.03189460188150406, -0.04016492888331413, -0.024117212742567062, 0.03364725410938263, 0.06689286231994629, 0.006695676129311323, 0.02210896648466587, 0.003144731279462576, -0.016641059890389442, -0.011939937248826027, -0.08398120850324631, -0.021050073206424713, 0.04180803894996643, 0.04027446731925011, 0.05035221204161644, -0.0573263056576252, -0.01146526075899601, 0.008206425234675407, -0.022218506783246994, -0.020045949146151543, 0.0025856171268969774, -0.01110012549906969, 0.01586514711380005, 0.017763851210474968, 0.07006954401731491, 0.006161665078252554, 0.01629418134689331, 0.0016054559964686632, -0.003507584799081087, 0.003833924885839224, 0.044911690056324005, -0.09230630844831467, -0.004701122175902128, -0.027038298547267914, 0.02084924839437008, 0.017316561192274094, 0.024208497256040573, -0.1088104397058487, -0.00007021017518127337, -0.046408746391534805, -0.014404603280127048, -0.003973132930696011, 0.051557160913944244, -0.04096822440624237, 0.02658187970519066, 0.010214671492576599, 0.02409895695745945, -0.03441403806209564, 0.012624566443264484, -0.048563048243522644, 0.02692875824868679, 0.027859853580594063, -0.04155244305729866, -0.03903300687670708, 0.04180803894996643, 0.024810971692204475, -0.013035344891250134, 0.03979979082942009, 0.012515026144683361, 0.03025149367749691, 0.02377033419907093, 0.04147941619157791, 0.062109582126140594, 0.031182589009404182, 0.04151592776179314, 0.06860899925231934, 0.007795647252351046, 0.04626269266009331, -0.05407659709453583, 0.007873238995671272, 0.010388110764324665, -0.00024133187253028154, -0.05842171236872673, 0.0468469113111496, 0.059298038482666016, 0.010461137630045414, 0.005230568815022707, 0.0663086399435997, -0.010296827182173729, 0.017818622291088104, 0.04454655572772026, 0.053638435900211334, 0.01696055382490158, 0.02409895695745945, -0.036184947937726974, 0.0029324961360543966, -0.05495292320847511, 0.03656833991408348, -0.0018108448712155223, -0.0481979139149189, 0.020977046340703964, -0.0025696426164358854, 0.00633510435000062, -0.05535457283258438, 0.054222650825977325, -0.015527395531535149, 0.09318263083696365, -0.03497999906539917, -0.010077745653688908, 0.04779626429080963, 0.053967054933309555, 0.010214671492576599, -0.08230158686637878, -0.01072586141526699, -0.021159613505005836, -0.005869556218385696, 0.0012003836454823613, -0.03591109812259674, -0.02251061610877514, -0.027202609926462173, 0.04852653667330742, -0.03684219345450401, -0.002565078204497695, 0.009274446405470371, 0.036896962672472, -0.03242405131459236, 0.036184947937726974, 0.04538636654615402, 0.024883998557925224, -0.028224989771842957, 0.05641346424818039, 0.008384428918361664, -0.04326857998967171, 0.038193196058273315, 0.020301545038819313, -0.030780939385294914, -0.025468215346336365, 0.012925803661346436, -0.034852202981710434, -0.0695948675274849, -0.03841227665543556, -0.0525430291891098, 0.033282119780778885, -0.012624566443264484, -0.008498533628880978, -0.004294908605515957, 0.03216845542192459, -0.035363391041755676, 0.0027544924523681402, -0.019553016871213913, 0.009867792017757893, 0.04005538672208786, -0.043487660586833954, -0.04710250720381737, -0.0047193788923323154, -0.005618525668978691, -0.030123695731163025, 0.02002769336104393, -0.0286631528288126, -0.006650033872574568, -0.00724794389680028, 0.021652547642588615, 0.006029303185641766, -0.053054217249155045, -0.07112843543291092, 0.005066257901489735, 0.01787339337170124, 0.01146526075899601, -0.060466472059488297, -0.055975303053855896, -0.08011077344417572, 0.046408746391534805, -0.04754066839814186, 0.023368684574961662, -0.012250302359461784, -0.027695542201399803, -0.02178034372627735, 0.022474102675914764, 0.01291667576879263, 0.02143346518278122, 0.005121028050780296, 0.01200383622199297, -0.03067139908671379, -0.022967034950852394, -0.01570083573460579, -0.015509138815104961, 0.022547129541635513, 0.024957025423645973, -0.04951240122318268, -0.02583335153758526, 0.02508482336997986, -0.058713819831609726, -0.00034773469087667763, 0.0467008575797081, 0.0059699686244130135, -0.0016898936592042446, -0.010251184925436974, 0.02493876777589321, -0.0020584524609148502, -0.034103672951459885, 0.040603090077638626, -0.026746191084384918, -0.02915608510375023, -0.007631336338818073, -0.02583335153758526, -0.02685573138296604, -0.0036559212021529675, 0.021378695964813232, 0.02360602281987667, 0.002905110828578472, -0.040493547916412354, -0.025614269077777863, -0.013345710001885891, -0.03715255856513977, -0.01811073161661625, 0.00022221929975785315, 0.023386942222714424, -0.003204065840691328, -0.04016492888331413, -0.02002769336104393, 0.029539478942751884, 0.011583929881453514, 0.03414018824696541, 0.0370430164039135, 0.04903772473335266, -0.016303308308124542, 0.010105130262672901, -0.021396951749920845, 0.01977209746837616, -0.011118382215499878, -0.007028862368315458, -0.01737133041024208, 0.008055806159973145, 0.02842581458389759, -0.03393936529755592, 0.007946265861392021, 0.009913434274494648, -0.015636935830116272, -0.005184927023947239, 0.05367494747042656, -0.05320027098059654, 0.0022775339893996716, 0.02084924839437008, 0.023368684574961662, -0.010150772519409657, -0.014012082479894161, -0.02311309054493904, 0.011994707398116589, -0.03534513711929321, -0.008950388990342617, 0.07025210559368134, 0.02758600190281868, -0.002530846744775772, -0.03523559495806694, 0.06952183693647385, -0.07748179882764816, 0.03808365389704704, -0.008334222249686718, -0.04312252625823021, 0.00046583329094573855, 0.0015324288979172707, 0.019151367247104645, 0.00024389923783019185, -0.01869494840502739, -0.01986338198184967, 0.014075981453061104, -0.02526739053428173, 0.023660793900489807, -0.011063612066209316, -0.03348294273018837, -0.021725574508309364, -0.018841002136468887, -0.013409608975052834, 0.031949374824762344, 0.0010794324334710836, 0.027969393879175186, -0.024957025423645973, 0.025468215346336365, 0.04918377846479416, -0.02975855953991413, 0.03176680579781532, -0.002829801756888628, -0.008863668888807297, 0.03490697219967842, 0.009123828262090683, 0.05367494747042656, 0.03408541902899742, -0.04038400948047638, 0.003039754694327712, 0.05469732731580734, 0.051885783672332764, -0.0044455272145569324, 0.04038400948047638, 0.04589755833148956, -0.034541837871074677, 0.04589755833148956, 0.04166198521852493, 0.000599050777964294, -0.02899177558720112, -0.05498943850398064, 0.005426829215139151, -0.016659315675497055, -0.0407126322388649, 0.04812488704919815, 0.04538636654615402, 0.02218199335038662, -0.05575622245669365 ]
4,651
optbinning.binning.multidimensional.continuous_binning_2d
transform
Transform given data to mean using bins from the fitted optimal binning 2D. Parameters ---------- x : array-like, shape = (n_samples,) Training vector x, where n_samples is the number of samples. y : array-like, shape = (n_samples,) Training vector y, where n_samples is the number of samples. metric : str (default="mean") The metric used to transform the input vector. Supported metrics are "mean" to choose the mean, "indices" to assign the corresponding indices of the bins and "bins" to assign the corresponding bin interval. metric_special : float or str (default=0) The metric value to transform special codes in the input vector. Supported metrics are "empirical" to use the empirical WoE or event rate and any numerical value. metric_missing : float or str (default=0) The metric value to transform missing values in the input vector. Supported metrics are "empirical" to use the empirical WoE or event rate and any numerical value. show_digits : int, optional (default=2) The number of significant digits of the bin column. Applies when ``metric="bins"``. check_input : bool (default=False) Whether to check input arrays. Returns ------- z_new : numpy array, shape = (n_samples,) Transformed array.
def transform(self, x, y, metric="mean", metric_special=0, metric_missing=0, show_digits=2, check_input=False): """Transform given data to mean using bins from the fitted optimal binning 2D. Parameters ---------- x : array-like, shape = (n_samples,) Training vector x, where n_samples is the number of samples. y : array-like, shape = (n_samples,) Training vector y, where n_samples is the number of samples. metric : str (default="mean") The metric used to transform the input vector. Supported metrics are "mean" to choose the mean, "indices" to assign the corresponding indices of the bins and "bins" to assign the corresponding bin interval. metric_special : float or str (default=0) The metric value to transform special codes in the input vector. Supported metrics are "empirical" to use the empirical WoE or event rate and any numerical value. metric_missing : float or str (default=0) The metric value to transform missing values in the input vector. Supported metrics are "empirical" to use the empirical WoE or event rate and any numerical value. show_digits : int, optional (default=2) The number of significant digits of the bin column. Applies when ``metric="bins"``. check_input : bool (default=False) Whether to check input arrays. Returns ------- z_new : numpy array, shape = (n_samples,) Transformed array. """ self._check_is_fitted() return transform_continuous_target( self.dtype_x, self.dtype_y, self._splits_x_optimal, self._splits_y_optimal, x, y, self._n_records, self._sums, self.special_codes_x, self.special_codes_y, self._categories_x, self._categories_y, metric, metric_special, metric_missing, show_digits, check_input)
(self, x, y, metric='mean', metric_special=0, metric_missing=0, show_digits=2, check_input=False)
[ 0.007146615535020828, -0.013685605488717556, 0.04894660413265228, 0.008287082426249981, 0.010909222066402435, -0.03933676704764366, -0.03410183638334274, 0.016134805977344513, -0.011591632850468159, -0.003115251427516341, -0.01817268878221512, 0.01677982322871685, 0.02273455820977688, -0.0397854745388031, -0.024884618818759918, 0.034849684685468674, 0.0017270598327741027, -0.00887601263821125, 0.019313156604766846, 0.045880433171987534, -0.004592249635607004, -0.05219973996281624, 0.028848208487033844, 0.03400835394859314, 0.00275301281362772, 0.03017563745379448, -0.03301745653152466, -0.039299376308918, -0.03619580715894699, -0.047787442803382874, -0.03780367970466614, -0.04580564796924591, 0.07037243247032166, -0.021650178357958794, 0.05208756402134895, -0.07104549556970596, 0.00255202897824347, 0.038009338080883026, -0.005702335387468338, 0.030362600460648537, 0.010161374695599079, -0.07437341660261154, -0.011180317029356956, 0.06674537062644958, 0.04984402284026146, 0.05339629575610161, -0.009198521263897419, 0.07097070664167404, -0.03651364520192146, -0.04330035671591759, -0.052386701107025146, -0.07527083158493042, 0.06016431376338005, 0.043262965977191925, 0.01866813749074936, 0.06637144833803177, 0.0374484546482563, 0.03217612951993942, 0.04337514191865921, -0.02181844413280487, 0.0018287203274667263, 0.04890921339392662, -0.014489540830254555, -0.04531954601407051, 0.004194955807179213, -0.021743660792708397, -0.0747099444270134, 0.003977612592279911, -0.006987697910517454, 0.07934659719467163, 0.009044278413057327, 0.009712666273117065, 0.07048460841178894, 0.038962844759225845, -0.025015491992235184, 0.01602262817323208, -0.03385878726840019, 0.012760144658386707, 0.01655546948313713, -0.0029095932841300964, 0.06835324317216873, 0.03041868843138218, 0.010460513643920422, -0.018079208210110664, -0.05698596313595772, -0.033896178007125854, 0.0027389908209443092, 0.037037137895822525, -0.013629516586661339, -0.023127177730202675, 0.006824106443673372, -0.03017563745379448, 0.0373549722135067, 0.07123245298862457, -0.009712666273117065, 0.01209643017500639, -0.07710305601358414, 0.04236554726958275, 0.004991880618035793, -0.03019433468580246, -0.005548092070966959, 0.037261489778757095, 0.003914513159543276, 0.07089592516422272, 0.024753745645284653, 0.016443291679024696, 0.0022739232517778873, -0.013031238690018654, -0.05081622302532196, 0.0340457484126091, -0.036588430404663086, 0.030605649575591087, -0.07800047099590302, -0.036794085055589676, -0.05182581767439842, -0.011703809723258018, 0.008301105350255966, 0.011049443855881691, -0.08256234228610992, 0.025258542969822884, -0.008076750673353672, -0.033709216862916946, 0.03017563745379448, -0.037055835127830505, -0.016246981918811798, -0.030362600460648537, 0.06184697151184082, 0.02753947675228119, -0.010367033071815968, -0.003073184983804822, -0.05227452516555786, -0.03348486125469208, -0.028679942712187767, 0.05089100822806358, -0.012844277545809746, -0.07100810110569, 0.031746119260787964, 0.025763338431715965, -0.0071886819787323475, -0.00947896484285593, 0.09183564782142639, 0.013984744437038898, 0.018350303173065186, -0.0055247219279408455, 0.05014315992593765, -0.01846247911453247, 0.06835324317216873, 0.04389863461256027, 0.005618202965706587, -0.04169248789548874, -0.043001219630241394, 0.010273552499711514, 0.04958227649331093, -0.0417298786342144, 0.0498066283762455, 0.059566035866737366, 0.011722506023943424, -0.022921519353985786, -0.010404425673186779, 0.0053097158670425415, 0.0060014743357896805, -0.0023428653366863728, -0.024791138246655464, 0.03709322586655617, -0.02968953736126423, 0.06693233549594879, -0.008090772666037083, 0.022715860977768898, 0.026698147878050804, -0.02279064618051052, -0.03456924110651016, -0.04434734582901001, -0.039860259741544724, 0.0407576784491539, 0.05010576918721199, 0.06842802464962006, -0.00623517669737339, -0.02322065830230713, 0.0135453836992383, 0.0883207619190216, 0.018789663910865784, -0.00005411668462329544, 0.008488066494464874, -0.0714941993355751, -0.07141941785812378, -0.04674045741558075, 0.03911241516470909, -0.004117834381759167, -0.04307600483298302, -0.013077979907393456, 0.04632914066314697, 0.00041277665877714753, 0.0007858239114284515, -0.02013578824698925, -0.003512545255944133, -0.01450823713093996, -0.07949616760015488, 0.041355956345796585, 0.028567766770720482, -0.002367404056712985, -0.021201470866799355, -0.024772441014647484, 0.057621635496616364, 0.025239845737814903, 0.011460759676992893, -0.015069123357534409, -0.01235817652195692, 0.03574709966778755, -0.02015448361635208, -0.04068289324641228, 0.07549518346786499, -0.01991143450140953, -0.0739247053861618, 0.02129495143890381, 0.0308860931545496, 0.0451325848698616, 0.031951773911714554, -0.013274289667606354, -0.032942675054073334, 0.0016511066351085901, 0.030830005183815956, -0.04434734582901001, 0.008927427232265472, 0.0397854745388031, 0.028586462140083313, 0.03456924110651016, 0.08353454619646072, -0.04101942479610443, 0.07807525992393494, -0.01777072064578533, 0.017340708523988724, -0.05100318416953087, -0.024828530848026276, 0.03483098745346069, 0.004047723487019539, 0.004688067827373743, 0.04752569645643234, -0.015536527149379253, -0.004524475894868374, 0.04861007258296013, -0.01329298596829176, -0.019574902951717377, -0.019462725147604942, -0.043487321585416794, -0.027950791642069817, -0.0037368994671851397, 0.017929639667272568, 0.04359949752688408, -0.001157410559244454, 0.013162112794816494, -0.030138246715068817, 0.004720786120742559, -0.0020180190913379192, -0.038028035312891006, -0.000830811623018235, -0.05227452516555786, -0.05743467062711716, -0.03692495822906494, -0.013106023892760277, 0.009497660212218761, 0.004269740544259548, 0.023426316678524017, 0.0002878920058719814, 0.01921967603266239, -0.04307600483298302, -0.01771463267505169, -0.028567766770720482, 0.029558664187788963, 0.0713072419166565, 0.031521763652563095, -0.13042457401752472, -0.006632470525801182, -0.015265433117747307, -0.003199384082108736, -0.004620294086635113, 0.07482212036848068, 0.04752569645643234, -0.029857803136110306, 0.04771265760064125, -0.028661247342824936, -0.012629271484911442, 0.018284866586327553, 0.011189664714038372, -0.05081622302532196, -0.028941690921783447, -0.052835412323474884, -0.011470108292996883, 0.029409095644950867, -0.012386220507323742, -0.03189568594098091, -0.06259481608867645, 0.0017913279589265585, -0.0032017212361097336, 0.013769738376140594, -0.01136727910488844, -0.01328363735228777, -0.07224205136299133, -0.04890921339392662, 0.029390398412942886, -0.043711673468351364, -0.02664205990731716, 0.016116108745336533, -0.03262483701109886, -0.00007003765495028347, 0.003930872306227684, 0.0036013522185385227, 0.026660755276679993, -0.05949125066399574, 0.005730379838496447, 0.004344525281339884, 0.062445249408483505, 0.006352027878165245, 0.043524712324142456, -0.04531954601407051, -0.026903806254267693, -0.04079506918787956, 0.05227452516555786, 0.08390846848487854, 0.04674045741558075, 0.05104057863354683, -0.007473798934370279, 0.016433944925665855, -0.001959593500941992, -0.030586954206228256, -0.019462725147604942, 0.061959147453308105, 0.026698147878050804, 0.02808166667819023, -0.009955717250704765, -0.040122006088495255, 0.04857268184423447, 0.021687570959329605, 0.030306510627269745, -0.0015798273961991072, -0.07070896029472351, -0.05182581767439842, -0.02161278761923313, 0.001130534801632166, -0.013077979907393456, -0.019294459372758865, -0.08114143460988998, 0.0703350380063057, 0.010712912306189537, -0.0028815490659326315, 0.0017901594983413815, -0.04079506918787956, -0.048497896641492844, -0.011937512084841728, -0.004781548399478197, 0.033410076051950455, 0.00861893966794014, -0.04090724512934685, 0.042515117675065994, -0.026473794132471085, 0.021631482988595963, -0.03862631320953369, 0.019612295553088188, -0.04700220376253128, 0.00616506626829505, -0.027015984058380127, 0.024585479870438576, -0.028324715793132782, -0.03068043477833271, 0.004809592850506306, 0.029521271586418152, -0.006553011946380138, -0.002231856808066368, -0.006884869188070297, 0.0194066371768713, -0.010507254861295223, 0.04767526313662529, -0.04909617453813553, -0.06996111571788788, 0.031951773911714554, 0.020247966051101685, 0.011778594925999641, -0.033410076051950455, -0.0031316105742007494, -0.0308860931545496, 0.02419286035001278, 0.06674537062644958, 0.08061793446540833, -0.05537809059023857, 0.023164570331573486, 0.0369623526930809, -0.0005179426516406238, 0.0026758911553770304, 0.00861426629126072, -0.02877342514693737, -0.037298884242773056, -0.02161278761923313, 0.029109956696629524, 0.007497169077396393, -0.03524230420589447, -0.03873848915100098, -0.03971068933606148, 0.045618683099746704, 0.008637635968625546, -0.012059037573635578, -0.03959851339459419, -0.04745091125369072, 0.005323737859725952, 0.023407619446516037, -0.022398026660084724, -0.04917095974087715, -0.03742975741624832, -0.016368508338928223, -0.04176727309823036, -0.020004915073513985, 0.0034354235976934433, 0.005005902610719204, 0.05051708593964577, 0.03253135830163956, 0.015190647915005684, -0.025520289316773415, 0.02972692996263504, 0.001669802819378674, -0.013741694390773773, -0.018051164224743843, 0.04244033247232437, 0.010301596485078335, -0.0194066371768713, -0.00124212761875242, -0.013648212887346745, 0.014311927370727062, -0.07710305601358414, -0.036569733172655106, -0.10230550915002823, -0.01706026680767536, -0.01944402977824211, -0.020509712398052216, -0.0708211362361908, -0.06356701999902725, -0.019257068634033203, -0.020977117121219635, -0.017882898449897766, -0.001193634350784123, 0.008460022509098053, 0.02419286035001278, 0.03402705118060112, -0.03455054387450218, -0.03232569992542267, 0.06532446295022964, 0.01282558124512434, -0.04812397435307503, -0.02851167879998684, -0.06764278560876846, 0.023818936198949814, -0.09856627136468887, -0.01606936939060688, 0.06928805261850357, -0.004898399580270052, 0.00920786987990141, -0.022416722029447556, 0.007978595793247223, -0.039897654205560684, 0.017144398763775826, -0.033690519630908966, 0.04457169771194458, 0.044683877378702164, -0.01175055094063282, -0.01089987438172102, -0.007614020258188248, 0.010357685387134552, -0.014171706512570381, -0.02609986998140812, -0.00666051497682929, -0.000039072099752957, 0.05463024601340294, 0.038214996457099915, 0.00031316105742007494, -0.027146857231855392, 0.021276256069540977, -0.012797536328434944, 0.033933572471141815, 0.054742421954870224, -0.0032671578228473663, -0.005903319455683231, 0.03907502070069313, -0.009553749114274979, 0.00035055342596024275, -0.016461988911032677, 0.03959851339459419, -0.004723123274743557, -0.004080441780388355, 0.05448067560791969, 0.006160391960293055, -0.05657464638352394, 0.022360634058713913, 0.0451325848698616, 0.007272814866155386, 0.08719899505376816, 0.022136280313134193, -0.020696673542261124, -0.0483483262360096, 0.031989168375730515, 0.005239604972302914, 0.005178842693567276, 0.015256084501743317, 0.009796799160540104, 0.03283049538731575, -0.010656824335455894, -0.058107733726501465, -0.044459521770477295, 0.01367625780403614, -0.0021932958625257015, -0.04438473656773567, 0.011049443855881691, -0.05302237346768379, 0.022173672914505005, -0.05631290003657341, -0.020958419889211655, 0.047563087195158005, 0.00040109152905642986, 0.003727551316842437, -0.022454114630818367, -0.033428773283958435, 0.02327674627304077, 0.018350303173065186, -0.02922213263809681, 0.0006835791864432395, -0.019079454243183136, 0.003117588348686695, -0.02419286035001278, 0.03780367970466614, 0.018125949427485466, -0.04655349254608154, -0.005903319455683231, -0.01723787933588028, -0.017200488597154617, -0.016490032896399498, -0.009675274603068829, 0.031484369188547134, 0.041842054575681686, 0.0004227090103086084, 0.052648451179265976, 0.015228040516376495, -0.02471635304391384, 0.01602262817323208, -0.01329298596829176, -0.024978099390864372, 0.02735251560807228, 0.010217463597655296, -0.00027153283008374274, 0.038701098412275314, 0.06992372125387192, -0.003608363214880228, 0.021874533966183662, 0.03428879752755165, -0.01676112785935402, -0.046815238893032074, 0.003260146826505661, 0.02204279974102974, 0.08323540538549423, 0.05844426527619362, -0.01424649078398943, 0.002823123475536704, 0.048497896641492844, -0.038962844759225845, 0.035578835755586624, -0.056200724095106125, 0.04703959450125694, 0.010338989086449146, -0.017078962177038193, -0.018359651789069176, 0.028231235221028328, -0.028698639944195747, 0.049021389335393906, -0.0036574406549334526, -0.037485845386981964, 0.02970823273062706, 0.01700417697429657, -0.04045853763818741, -0.024118075147271156, -0.031241320073604584, 0.07463516294956207, 0.01533086970448494, -0.04378645867109299, -0.03877588361501694, -0.0165367741137743, -0.057135533541440964, -0.000051998755225213245, -0.03348486125469208, -0.01462976261973381, 0.01729396916925907, -0.04098203033208847, -0.0369623526930809, -0.007604672107845545, -0.009044278413057327, -0.0006420970312319696, 0.013423859141767025, 0.0316152460873127, -0.006193110253661871, 0.0021383757703006268, 0.0181913860142231, -0.046628277748823166, -0.053583256900310516, -0.02830602042376995, 0.05504155904054642, -0.06259481608867645, 0.06136086955666542, -0.0034611306618899107, 0.0011147598270326853, 0.021257558837532997, 0.030549561604857445, 0.012012297287583351, -0.05560244619846344, -0.043524712324142456, -0.0522371344268322, -0.015031730756163597, -0.042776864022016525, 0.025108972564339638, 0.03019433468580246, 0.00993702095001936, 0.012133821845054626, 0.02634292095899582, -0.015695445239543915, -0.05156407132744789, 0.0308860931545496, -0.013797782361507416, 0.015256084501743317, -0.01842508837580681, -0.008399260230362415, 0.015199996531009674, -0.033896178007125854, -0.029353005811572075, 0.031783509999513626, 0.029053866863250732, 0.0019151901360601187, 0.002498277463018894, -0.0698489397764206, -0.04330035671591759, 0.055452875792980194, -0.003528904402628541, 0.020266661420464516, -0.011600981466472149, -0.023183265700936317, 0.04894660413265228, 0.013190156780183315, -0.00550602562725544, 0.05107796937227249, -0.0060014743357896805, 0.06345484405755997, -0.005851904861629009, -0.0032741688191890717, -0.08794683963060379, 0.015302824787795544, 0.03956112265586853, 0.011348582804203033, -0.003171339863911271, 0.005552765913307667, 0.03688756749033928, -0.06506271660327911, 0.03825238719582558, 0.06730625778436661, 0.025052884593605995, 0.014330623671412468, 0.03279310464859009, 0.007347599603235722, -0.016443291679024696, -0.04558129236102104, 0.0782996118068695, 0.022584987804293633, 0.01150749996304512, -0.049470096826553345, 0.008128165267407894, -0.01319950446486473, -0.03279310464859009, -0.03974808380007744, 0.012133821845054626, 0.043973419815301895, -0.031951773911714554, -0.04389863461256027, -0.029596056789159775, -0.010011805221438408, -0.026286832988262177, 0.014685851521790028, 0.0005863005644641817, -0.04808657988905907, 0.00036048577749170363, 0.03322311490774155, -0.026473794132471085, 0.005996800493448973, 0.046590887010097504, 0.052162349224090576, 0.01259187888354063, -0.011844031512737274, -0.04363688826560974, -0.06412790715694427, -0.004606272093951702, 0.046815238893032074, 0.006553011946380138, 0.012030993588268757, -0.025707250460982323, 0.010525950230658054, 0.06558620929718018, -0.039411552250385284, -0.016714386641979218, 0.02372545562684536, -0.018331605941057205, 0.04655349254608154, -0.02851167879998684, -0.034157924354076385, -0.0016055346932262182, 0.022921519353985786, -0.01627502590417862, -0.045656077563762665, -0.027165552601218224, 0.07444819808006287, -0.0012830254854634404, 0.05773381143808365, 0.05033012107014656, -0.007025090511888266, -0.007445754483342171, 0.032213520258665085, 0.01247035339474678, -0.08338497579097748, 0.032437875866889954, 0.02537071891129017, 0.022398026660084724, 0.03625189885497093, -0.06768018007278442, 0.008922752924263477, -0.01936924457550049, -0.019462725147604942, 0.03169002756476402, 0.06113651767373085, -0.04502040520310402, 0.0244172140955925, -0.03241917863488197, 0.022641077637672424, 0.015041078440845013, -0.005043295212090015, 0.09722014516592026, 0.009796799160540104, 0.04797440394759178, -0.033466167747974396, -0.04954488202929497, 0.063417449593544, 0.032718319445848465, -0.018640093505382538, 0.005239604972302914, 0.05552766099572182, -0.004223000258207321, -0.03193308040499687, 0.012573182582855225, 0.025838123634457588, 0.018752271309494972, -0.008964819833636284, -0.003902828088030219, -0.025707250460982323, 0.02107059769332409, -0.012507745996117592, 0.041580308228731155, 0.057359885424375534, 0.05104057863354683, 0.007011068519204855, 0.023594582453370094, 0.03907502070069313, -0.01532152108848095, -0.013152764178812504, 0.020491015166044235, -0.0033092242665588856, 0.014199750497937202, -0.015891754999756813, 0.03527969494462013, 0.0722794383764267, 0.06610970199108124 ]
4,652
optbinning.binning.piecewise.continuous_binning
ContinuousOptimalPWBinning
Optimal Piecewise binning of a numerical variable with respect to a binary target. Parameters ---------- name : str, optional (default="") The variable name. objective : str, optional (default="l2") The objective function. Supported objectives are "l2", "l1", "huber" and "quantile". Note that "l1", "huber" and "quantile" are robust objective functions. degree : int (default=1) The degree of the polynomials. * degree = 0: piecewise constant functions. * degree = 1: piecewise linear functions. * degree > 1: piecewise polynomial functions. continuous : bool (default=True) Whether to fit a continuous or discontinuous piecewise regression. continuous_deriv : bool (default=True) Whether to fit a polynomial with continuous derivatives. This option fits a smooth degree d-polynomial with d-1 continuity in derivatives (splines). prebinning_method : str, optional (default="cart") The pre-binning method. Supported methods are "cart" for a CART decision tree, "quantile" to generate prebins with approximately same frequency and "uniform" to generate prebins with equal width. Method "cart" uses `sklearn.tree.DecistionTreeClassifier <https://scikit-learn.org/stable/modules/generated/sklearn.tree. DecisionTreeClassifier.html>`_. max_n_prebins : int (default=20) The maximum number of bins after pre-binning (prebins). min_prebin_size : float (default=0.05) The fraction of mininum number of records for each prebin. min_n_bins : int or None, optional (default=None) The minimum number of bins. If None, then ``min_n_bins`` is a value in ``[0, max_n_prebins]``. max_n_bins : int or None, optional (default=None) The maximum number of bins. If None, then ``max_n_bins`` is a value in ``[0, max_n_prebins]``. min_bin_size : float or None, optional (default=None) The fraction of minimum number of records for each bin. If None, ``min_bin_size = min_prebin_size``. max_bin_size : float or None, optional (default=None) The fraction of maximum number of records for each bin. If None, ``max_bin_size = 1.0``. monotonic_trend : str or None, optional (default="auto") The monotonic trend. Supported trends are “auto”, "auto_heuristic" and "auto_asc_desc" to automatically determine the trend maximizing IV using a machine learning classifier, "ascending", "descending", "concave", "convex", "peak" and "peak_heuristic" to allow a peak change point, and "valley" and "valley_heuristic" to allow a valley change point. Trends "auto_heuristic", "peak_heuristic" and "valley_heuristic" use a heuristic to determine the change point, and are significantly faster for large size instances (``max_n_prebins > 20``). Trend "auto_asc_desc" is used to automatically select the best monotonic trend between "ascending" and "descending". If None, then the monotonic constraint is disabled. n_subsamples : int or None (default=None) Number of subsamples to fit the piecewise regression algorithm. If None, all values are considered. max_pvalue : float or None, optional (default=None) The maximum p-value among bins. The Z-test is used to detect bins not satisfying the p-value constraint. Option supported by solvers "cp" and "mip". max_pvalue_policy : str, optional (default="consecutive") The method to determine bins not satisfying the p-value constraint. Supported methods are "consecutive" to compare consecutive bins and "all" to compare all bins. outlier_detector : str or None, optional (default=None) The outlier detection method. Supported methods are "range" to use the interquartile range based method, "zcore" to use the modified Z-score method or "yquantile" to use the y-axis detector over quantiles. outlier_params : dict or None, optional (default=None) Dictionary of parameters to pass to the outlier detection method. user_splits : array-like or None, optional (default=None) The list of pre-binning split points when ``dtype`` is "numerical" or the list of prebins when ``dtype`` is "categorical". user_splits_fixed : array-like or None (default=None) The list of pre-binning split points that must be fixed. special_codes : array-like, dict or None, optional (default=None) List of special codes. Use special codes to specify the data values that must be treated separately. split_digits : int or None, optional (default=None) The significant digits of the split points. If ``split_digits`` is set to 0, the split points are integers. If None, then all significant digits in the split points are considered. solver : str, optional (default="auto") The optimizer to solve the underlying mathematical optimization problem. Supported solvers are `"ecos" <https://github.com/embotech/ecos>`_, `"osqp" <https://github.com/oxfordcontrol/osqp>`_, "direct", to choose the direct solver, and "auto", to choose the most appropriate solver for the problem. Version 0.16.1 added support to solvers `"scs" <https://github.com/cvxgrp/scs>`_ and `"highs" <https://github.com/ERGO-Code/HiGHS>`_. h_epsilon: float (default=1.35) The parameter h_epsilon used when ``objective="huber"``, controls the number of samples that should be classified as outliers. quantile : float (default=0.5) The parameter quantile is the q-th quantile to be used when ``objective="quantile"``. regularization: str or None (default=None) Type of regularization. Supported regularization are "l1" (Lasso) and "l2" (Ridge). If None, no regularization is applied. reg_l1 : float (default=1.0) L1 regularization term. Increasing this value will smooth the regression model. Only applicable if ``regularization="l1"``. reg_l2 : float (default=1.0) L2 regularization term. Increasing this value will smooth the regression model. Only applicable if ``regularization="l2"``. random_state : int, RandomState instance or None, (default=None) If ``n_subsamples < n_samples``, controls the shuffling applied to the data before applying the split. verbose : bool (default=False) Enable verbose output.
class ContinuousOptimalPWBinning(BasePWBinning): """Optimal Piecewise binning of a numerical variable with respect to a binary target. Parameters ---------- name : str, optional (default="") The variable name. objective : str, optional (default="l2") The objective function. Supported objectives are "l2", "l1", "huber" and "quantile". Note that "l1", "huber" and "quantile" are robust objective functions. degree : int (default=1) The degree of the polynomials. * degree = 0: piecewise constant functions. * degree = 1: piecewise linear functions. * degree > 1: piecewise polynomial functions. continuous : bool (default=True) Whether to fit a continuous or discontinuous piecewise regression. continuous_deriv : bool (default=True) Whether to fit a polynomial with continuous derivatives. This option fits a smooth degree d-polynomial with d-1 continuity in derivatives (splines). prebinning_method : str, optional (default="cart") The pre-binning method. Supported methods are "cart" for a CART decision tree, "quantile" to generate prebins with approximately same frequency and "uniform" to generate prebins with equal width. Method "cart" uses `sklearn.tree.DecistionTreeClassifier <https://scikit-learn.org/stable/modules/generated/sklearn.tree. DecisionTreeClassifier.html>`_. max_n_prebins : int (default=20) The maximum number of bins after pre-binning (prebins). min_prebin_size : float (default=0.05) The fraction of mininum number of records for each prebin. min_n_bins : int or None, optional (default=None) The minimum number of bins. If None, then ``min_n_bins`` is a value in ``[0, max_n_prebins]``. max_n_bins : int or None, optional (default=None) The maximum number of bins. If None, then ``max_n_bins`` is a value in ``[0, max_n_prebins]``. min_bin_size : float or None, optional (default=None) The fraction of minimum number of records for each bin. If None, ``min_bin_size = min_prebin_size``. max_bin_size : float or None, optional (default=None) The fraction of maximum number of records for each bin. If None, ``max_bin_size = 1.0``. monotonic_trend : str or None, optional (default="auto") The monotonic trend. Supported trends are “auto”, "auto_heuristic" and "auto_asc_desc" to automatically determine the trend maximizing IV using a machine learning classifier, "ascending", "descending", "concave", "convex", "peak" and "peak_heuristic" to allow a peak change point, and "valley" and "valley_heuristic" to allow a valley change point. Trends "auto_heuristic", "peak_heuristic" and "valley_heuristic" use a heuristic to determine the change point, and are significantly faster for large size instances (``max_n_prebins > 20``). Trend "auto_asc_desc" is used to automatically select the best monotonic trend between "ascending" and "descending". If None, then the monotonic constraint is disabled. n_subsamples : int or None (default=None) Number of subsamples to fit the piecewise regression algorithm. If None, all values are considered. max_pvalue : float or None, optional (default=None) The maximum p-value among bins. The Z-test is used to detect bins not satisfying the p-value constraint. Option supported by solvers "cp" and "mip". max_pvalue_policy : str, optional (default="consecutive") The method to determine bins not satisfying the p-value constraint. Supported methods are "consecutive" to compare consecutive bins and "all" to compare all bins. outlier_detector : str or None, optional (default=None) The outlier detection method. Supported methods are "range" to use the interquartile range based method, "zcore" to use the modified Z-score method or "yquantile" to use the y-axis detector over quantiles. outlier_params : dict or None, optional (default=None) Dictionary of parameters to pass to the outlier detection method. user_splits : array-like or None, optional (default=None) The list of pre-binning split points when ``dtype`` is "numerical" or the list of prebins when ``dtype`` is "categorical". user_splits_fixed : array-like or None (default=None) The list of pre-binning split points that must be fixed. special_codes : array-like, dict or None, optional (default=None) List of special codes. Use special codes to specify the data values that must be treated separately. split_digits : int or None, optional (default=None) The significant digits of the split points. If ``split_digits`` is set to 0, the split points are integers. If None, then all significant digits in the split points are considered. solver : str, optional (default="auto") The optimizer to solve the underlying mathematical optimization problem. Supported solvers are `"ecos" <https://github.com/embotech/ecos>`_, `"osqp" <https://github.com/oxfordcontrol/osqp>`_, "direct", to choose the direct solver, and "auto", to choose the most appropriate solver for the problem. Version 0.16.1 added support to solvers `"scs" <https://github.com/cvxgrp/scs>`_ and `"highs" <https://github.com/ERGO-Code/HiGHS>`_. h_epsilon: float (default=1.35) The parameter h_epsilon used when ``objective="huber"``, controls the number of samples that should be classified as outliers. quantile : float (default=0.5) The parameter quantile is the q-th quantile to be used when ``objective="quantile"``. regularization: str or None (default=None) Type of regularization. Supported regularization are "l1" (Lasso) and "l2" (Ridge). If None, no regularization is applied. reg_l1 : float (default=1.0) L1 regularization term. Increasing this value will smooth the regression model. Only applicable if ``regularization="l1"``. reg_l2 : float (default=1.0) L2 regularization term. Increasing this value will smooth the regression model. Only applicable if ``regularization="l2"``. random_state : int, RandomState instance or None, (default=None) If ``n_subsamples < n_samples``, controls the shuffling applied to the data before applying the split. verbose : bool (default=False) Enable verbose output. """ def __init__(self, name="", objective="l2", degree=1, continuous=True, continuous_deriv=True, prebinning_method="cart", max_n_prebins=20, min_prebin_size=0.05, min_n_bins=None, max_n_bins=None, min_bin_size=None, max_bin_size=None, monotonic_trend="auto", n_subsamples=None, max_pvalue=None, max_pvalue_policy="consecutive", outlier_detector=None, outlier_params=None, user_splits=None, user_splits_fixed=None, special_codes=None, split_digits=None, solver="auto", h_epsilon=1.35, quantile=0.5, regularization=None, reg_l1=1.0, reg_l2=1.0, random_state=None, verbose=False): super().__init__(name, None, objective, degree, continuous, continuous_deriv, prebinning_method, max_n_prebins, min_prebin_size, min_n_bins, max_n_bins, min_bin_size, max_bin_size, monotonic_trend, n_subsamples, max_pvalue, max_pvalue_policy, outlier_detector, outlier_params, user_splits, user_splits_fixed, special_codes, split_digits, solver, h_epsilon, quantile, regularization, reg_l1, reg_l2, random_state, verbose) self._problem_type = "regression" self._n_records_missing = None self._n_
(name='', objective='l2', degree=1, continuous=True, continuous_deriv=True, prebinning_method='cart', max_n_prebins=20, min_prebin_size=0.05, min_n_bins=None, max_n_bins=None, min_bin_size=None, max_bin_size=None, monotonic_trend='auto', n_subsamples=None, max_pvalue=None, max_pvalue_policy='consecutive', outlier_detector=None, outlier_params=None, user_splits=None, user_splits_fixed=None, special_codes=None, split_digits=None, solver='auto', h_epsilon=1.35, quantile=0.5, regularization=None, reg_l1=1.0, reg_l2=1.0, random_state=None, verbose=False)
[ 0.04175153002142906, -0.02080218493938446, -0.042403243482112885, 0.02074962854385376, -0.007957177236676216, -0.059999432414770126, -0.08522694557905197, -0.04898341745138168, -0.052515268325805664, -0.059410788118839264, -0.008719258941709995, 0.02575308457016945, 0.02440761774778366, -0.01123675424605608, -0.05352437123656273, 0.05138003081083298, -0.009081903845071793, -0.025521833449602127, -0.00943403784185648, 0.0410577766597271, -0.03420430049300194, -0.0017422749660909176, 0.02793946862220764, 0.09241678565740585, -0.013170863501727581, -0.0010839946335181594, 0.009234320372343063, -0.03325827047228813, -0.01883654110133648, -0.018689380958676338, -0.06899724155664444, -0.020434284582734108, -0.01714419573545456, -0.03290088102221489, 0.035465676337480545, -0.04839477688074112, 0.07231886684894562, 0.07122567296028137, -0.04814250022172928, 0.04738567769527435, -0.021159576252102852, -0.051043666899204254, -0.007121516391634941, -0.0012915959814563394, 0.019908711314201355, 0.022158164530992508, -0.014526842162013054, 0.06807223707437515, 0.03170257434248924, -0.03336338326334953, 0.007121516391634941, -0.06517107039690018, 0.021884866058826447, 0.022095095366239548, -0.019761551171541214, 0.04995047301054001, 0.06260627508163452, 0.02764514833688736, 0.06739950180053711, -0.06281650066375732, -0.03494010493159294, 0.019835131242871284, 0.02611047402024269, -0.032165076583623886, 0.004674973431974649, -0.016608111560344696, -0.05037093162536621, -0.004485766869038343, 0.008908464573323727, 0.04368564113974571, 0.046124301850795746, -0.03252246603369713, 0.025858199223876, 0.022074073553085327, -0.01900472491979599, 0.016093049198389053, -0.025521833449602127, -0.0618494488298893, 0.0037552202120423317, -0.018437106162309647, 0.03597022593021393, 0.05482779070734978, 0.016839364543557167, -0.04915160313248634, -0.018205855041742325, -0.05369255319237709, 0.04032197222113609, 0.008519540540874004, 0.08224168419837952, -0.02224225550889969, -0.03420430049300194, 0.025626948103308678, 0.049403876066207886, 0.06798814237117767, 0.035381585359573364, -0.05016070231795311, -0.044064052402973175, -0.006128183100372553, -0.0380304753780365, -0.05693008378148079, -0.023251356557011604, -0.013328535482287407, -0.018247900530695915, 0.10107822716236115, 0.028128676116466522, -0.011047547683119774, -0.01547287404537201, 0.021170087158679962, -0.017816929146647453, -0.05566870793700218, -0.08068598806858063, 0.027077529579401016, -0.0687449723482132, -0.042634494602680206, -0.05697213113307953, 0.025647969916462898, -0.07803710550069809, 0.014537353999912739, -0.027224689722061157, 0.016954990103840828, 0.015535942278802395, 0.0016673807986080647, -0.057771001011133194, 0.018258411437273026, 0.006306877825409174, -0.030546311289072037, 0.04494701698422432, 0.04347541183233261, 0.009938588365912437, -0.06100853160023689, 0.02069707028567791, -0.00235456763766706, -0.051295939832925797, 0.01881551928818226, -0.02768719382584095, -0.02764514833688736, -0.000517689564730972, 0.02621558867394924, 0.01728084497153759, -0.028254812583327293, 0.07728027552366257, 0.004491022787988186, -0.01383308507502079, -0.010558764450252056, 0.06546539068222046, 0.001648985780775547, 0.05201071873307228, 0.004372768569737673, -0.017974602058529854, -0.019866665825247765, -0.04650271311402321, -0.04629248380661011, -0.016029981896281242, -0.039039574563503265, 0.04177255555987358, -0.007221375126391649, 0.00962849985808134, -0.021264690905809402, -0.02583717554807663, -0.024849098175764084, -0.02285192161798477, -0.015872308984398842, -0.010048958472907543, -0.02070758305490017, -0.03271167352795601, 0.03960719332098961, -0.0017961462726816535, -0.03121904470026493, 0.0023466842249035835, 0.02932698279619217, 0.0010366931091994047, -0.052641406655311584, -0.0663483589887619, 0.05545847862958908, -0.04360155016183853, 0.09721001237630844, 0.04313904419541359, -0.020139964297413826, -0.030062785372138023, 0.023125218227505684, 0.023608746007084846, -0.030483243986964226, -0.042214035987854004, -0.0386611633002758, -0.010516718961298466, 0.020339680835604668, 0.03683216869831085, -0.021411851048469543, -0.0017764372751116753, 0.010411604307591915, -0.03237530589103699, -0.04692317172884941, 0.030230967327952385, -0.008198941126465797, 0.009144973009824753, -0.021327758207917213, 0.026383772492408752, 0.04156232625246048, 0.040784478187561035, -0.00048648365191183984, 0.003778870915994048, 0.017858976498246193, 0.03441452980041504, -0.021432872861623764, -0.040868569165468216, 0.0033295059110969305, -0.020413260906934738, 0.018090227618813515, 0.03418327867984772, 0.014043314382433891, 0.018531709909439087, -0.027182644233107567, -0.024933191016316414, 0.08720310032367706, 0.05344028025865555, -0.02749798819422722, 0.0023834742605686188, -0.019730016589164734, 0.0005075066001154482, -0.010154073126614094, 0.012634778395295143, -0.02243146300315857, 0.0028275835793465376, 0.010043703019618988, 0.02777128480374813, 0.008798094466328621, 0.05007661134004593, 0.005975767038762569, 0.08636218309402466, -0.03807251900434494, 0.020192520692944527, -0.05772895738482475, -0.02751901000738144, -0.010453649796545506, -0.014737071469426155, 0.026467863470315933, -0.030020738020539284, 0.010521974414587021, -0.020182009786367416, 0.010910898447036743, -0.03260655701160431, -0.028654249384999275, -0.01719675399363041, -0.019887687638401985, -0.034477598965168, 0.023903068155050278, 0.059831246733665466, 0.046082254499197006, 0.024891145527362823, -0.013780527748167515, 0.019446207210421562, -0.05205276608467102, -0.023629769682884216, -0.0004923963570035994, 0.001789576606824994, -0.06281650066375732, -0.001793518429622054, -0.014663491398096085, 0.02915879897773266, -0.0059652552008628845, -0.02789742313325405, -0.005749770440161228, -0.021905889734625816, 0.06882905960083008, -0.014936788938939571, -0.012319434434175491, -0.023839998990297318, -0.015609522350132465, 0.02575308457016945, 0.02238941565155983, -0.02754003368318081, 0.03924980387091637, -0.06340514868497849, 0.011594143696129322, -0.040721409022808075, 0.044232238084077835, 0.014526842162013054, -0.0070006344467401505, 0.017764372751116753, 0.005923209711909294, 0.03622250258922577, 0.00007916445611044765, 0.03485601022839546, -0.03611738607287407, -0.011425960808992386, -0.0018920634174719453, -0.04662885144352913, -0.03327929228544235, 0.017701303586363792, -0.009055625647306442, -0.06739950180053711, 0.0027408639434725046, 0.03775717690587044, 0.020203031599521637, 0.09838729351758957, 0.03172359615564346, 0.0013119620271027088, -0.05886419489979744, 0.038850367069244385, -0.03641171008348465, 0.008009734563529491, -0.013412627391517162, 0.028738340362906456, -0.030714495107531548, -0.021590545773506165, -0.01923597790300846, 0.07160408794879913, -0.07072112709283829, -0.0029064195696264505, 0.009318412281572819, 0.016671180725097656, 0.03588613495230675, 0.056173257529735565, -0.006816683802753687, 0.03113495372235775, -0.06739950180053711, 0.04160436987876892, 0.007237142417579889, 0.020118940621614456, 0.05693008378148079, -0.05163230746984482, -0.0001323787437286228, 0.03414123132824898, -0.04124698042869568, -0.00008565199823351577, -0.006306877825409174, 0.035486698150634766, 0.00643301522359252, -0.007673368323594332, -0.05848577991127968, -0.02926391363143921, -0.04860500618815422, 0.04839477688074112, 0.02234737016260624, 0.009828218258917332, 0.00139671063516289, 0.04856295883655548, -0.005392380524426699, 0.005082292482256889, -0.049193646758794785, 0.05659371614456177, 0.0618494488298893, -0.022936012595891953, 0.03935491666197777, -0.02255759947001934, -0.056551672518253326, 0.030525289475917816, 0.015147018246352673, 0.016555555164813995, 0.07664959132671356, 0.0029116752557456493, -0.000836975232232362, -0.0029037916101515293, 0.07555639743804932, 0.0691654309630394, -0.05159026011824608, 0.010858341120183468, -0.008445960469543934, 0.04978229105472565, -0.030188921838998795, -0.02793946862220764, -0.028696294873952866, -0.030062785372138023, 0.05238913372159004, 0.03098779357969761, -0.042508356273174286, -0.01044839434325695, 0.028254812583327293, 0.02802356146275997, -0.03523442521691322, 0.0016831480897963047, -0.08371329307556152, -0.025647969916462898, -0.016502996906638145, 0.005981022492051125, 0.026825254783034325, -0.030188921838998795, 0.01386461965739727, -0.021653614938259125, -0.004459488205611706, 0.07194045186042786, -0.006685290485620499, -0.03868218511343002, 0.028149697929620743, 0.00874028168618679, -0.016124583780765533, 0.010879364795982838, -0.0073685357347130775, 0.0622699074447155, -0.05684599280357361, 0.012487618252635002, 0.03418327867984772, 0.007168817799538374, 0.002651516580954194, -0.018773473799228668, 0.01202511414885521, 0.052725497633218765, 0.01117368508130312, -0.06260627508163452, -0.016849875450134277, -0.026488887146115303, -0.037000350654125214, -0.01713368482887745, 0.0351082868874073, -0.011079082265496254, -0.07051089406013489, 0.05238913372159004, 0.026404796168208122, -0.0017908905865624547, 0.02922186814248562, -0.05318800359964371, 0.023167265579104424, 0.0031586945988237858, -0.025521833449602127, -0.06815632432699203, 0.0019222837872803211, -0.0003577182360459119, 0.007315978407859802, 0.03262758255004883, -0.011657212860882282, 0.05928465351462364, -0.004488394595682621, 0.03100881725549698, 0.035570792853832245, 0.0031718339305371046, 0.0012331260368227959, -0.02405022829771042, -0.03325827047228813, -0.043853823095560074, 0.020276611670851707, -0.03679012134671211, -0.02960027940571308, -0.10292824357748032, -0.02056042104959488, -0.011446983553469181, -0.02936902828514576, -0.023377494886517525, 0.04633453115820885, 0.013885642401874065, -0.010684901848435402, -0.001587230945006013, -0.00644878251478076, 0.04049015790224075, -0.007037424482405186, 0.013275978155434132, -0.021432872861623764, -0.02608945220708847, -0.04101572930812836, -0.09493953734636307, -0.006848218385130167, 0.04873114451766014, -0.006932309828698635, 0.021085994318127632, 0.02052888832986355, -0.03292190283536911, -0.021359292790293694, 0.004824761766940355, -0.01748056337237358, 0.015041903592646122, -0.03811456635594368, 0.016639646142721176, 0.04118391126394272, 0.004811622202396393, 0.05344028025865555, -0.014989346265792847, 0.0112052196636796, 0.03927082568407059, 0.009964867495000362, 0.008955766446888447, 0.031744617968797684, -0.0035896645858883858, 0.0000035157970614818623, -0.027098551392555237, -0.03908161818981171, 0.015136507339775562, 0.06210172548890114, -0.025164442136883736, 0.02741389535367489, 0.00012580907787196338, -0.06336309760808945, 0.023587724193930626, -0.030209945514798164, 0.04477883130311966, 0.018416084349155426, -0.0023020105436444283, -0.06037784367799759, 0.004625043831765652, -0.018027158454060555, -0.03494010493159294, -0.003799893893301487, -0.03418327867984772, 0.016828851774334908, 0.02592126838862896, 0.06622222065925598, -0.03983844444155693, 0.0523470863699913, 0.0007449999684467912, 0.0025989592541009188, 0.08913720399141312, -0.05394482985138893, 0.015388782136142254, 0.04515724629163742, -0.04309700056910515, -0.038703206926584244, 0.04721749201416969, -0.03132415935397148, -0.028149697929620743, 0.05007661134004593, -0.06622222065925598, 0.00786257442086935, -0.03685319051146507, -0.059915341436862946, 0.054197102785110474, 0.0062332977540791035, 0.003074602922424674, 0.03582306578755379, 0.017711816355586052, 0.03672705218195915, -0.026888322085142136, -0.011510051786899567, 0.0343724861741066, 0.03641171008348465, 0.018226876854896545, -0.06004147604107857, 0.04381177946925163, 0.027056505903601646, -0.05201071873307228, -0.03111393004655838, 0.04633453115820885, 0.05915851518511772, 0.03704239800572395, -0.016555555164813995, 0.02440761774778366, 0.052725497633218765, 0.03950207680463791, 0.018573755398392677, -0.013875131495296955, -0.032059963792562485, 0.033615659922361374, -0.03113495372235775, -0.032038938254117966, 0.061092622578144073, 0.04322313517332077, -0.02579513005912304, -0.016008958220481873, 0.0631108283996582, 0.026972414925694466, 0.06437219679355621, -0.023041127249598503, -0.020024336874485016, 0.04662885144352913, -0.008114849217236042, 0.033909980207681656, 0.012697847560048103, 0.05684599280357361, -0.00740006985142827, 0.013318023644387722, 0.025605924427509308, 0.013023702427744865, 0.026636047288775444, -0.06054602935910225, -0.0019879804458469152, 0.012939611449837685, -0.0413731187582016, -0.020245078951120377, 0.037210579961538315, -0.002539832377806306, 0.051211848855018616, -0.04212994500994682, -0.007930899038910866, 0.023776929825544357, 0.040826521813869476, -0.035465676337480545, -0.02048684097826481, -0.0417935773730278, -0.0031981125939637423, 0.024701938033103943, -0.016082538291811943, -0.07063703238964081, -0.02590024471282959, -0.0037394529208540916, 0.0277923084795475, 0.0062490650452673435, -0.08278828114271164, 0.0028696295339614153, 0.04271858558058739, -0.044274281710386276, 0.025017281994223595, -0.03687421232461929, 0.038997527211904526, 0.0019906084053218365, 0.0343724861741066, -0.039123665541410446, -0.08194736391305923, 0.0033662961795926094, 0.03615943342447281, -0.06941770017147064, -0.0014203614555299282, 0.08375533670186996, 0.013286489062011242, -0.021989980712532997, -0.00692705437541008, -0.023020103573799133, 0.0043123275972902775, 0.016555555164813995, -0.00865093432366848, -0.0013231304474174976, -0.033510543406009674, 0.01306574884802103, -0.025521833449602127, -0.0030509522184729576, 0.016534531489014626, 0.02078116312623024, -0.03311111032962799, -0.04641862213611603, 0.015062926337122917, -0.03163950517773628, -0.02243146300315857, 0.08081212639808655, -0.03506623953580856, -0.00855633057653904, 0.021107017993927002, 0.025059327483177185, 0.04511519894003868, -0.049319785088300705, -0.04540951922535896, 0.029032660648226738, -0.06088239327073097, 0.006517107132822275, -0.010816295631229877, -0.026783207431435585, 0.008624655194580555, 0.028507087379693985, -0.029810508713126183, 0.02447068691253662, 0.02050786465406418, 0.02442863956093788, -0.008619399741292, 0.001566207967698574, -0.004144144244492054, -0.003098253859207034, 0.01044839434325695, 0.010837318375706673, 0.0004835273139178753, -0.024701938033103943, -0.021516965702176094, 0.018195342272520065, 0.018142785876989365, 0.07685981690883636, -0.005408147815614939, -0.021390827372670174, 0.05722440406680107, -0.06815632432699203, -0.02245248481631279, -0.01721777580678463, -0.00519529078155756, 0.012182786129415035, 0.016681691631674767, 0.021611567586660385, -0.020213544368743896, -0.056299395859241486, 0.00010199403914157301, 0.04570384323596954, -0.0191203523427248, 0.000019852705008815974, 0.027350828051567078, 0.026888322085142136, 0.0048379008658230305, -0.001691031618975103, 0.023608746007084846, -0.01123675424605608, -0.05318800359964371, -0.01753311976790428, -0.014348147436976433, 0.0011720281327143312, -0.018247900530695915, -0.054659608751535416, -0.019624901935458183, -0.0488993264734745, 0.0020405377727001905, 0.1030123382806778, 0.03245939686894417, -0.042277105152606964, 0.018132273107767105, 0.1008259579539299, 0.03504521772265434, -0.0486890971660614, -0.01881551928818226, -0.03300599381327629, -0.013423138298094273, 0.003734197234734893, 0.023041127249598503, 0.01113163959234953, 0.0031140209175646305, 0.01907830499112606, -0.01903625950217247, -0.05735054239630699, -0.040448110550642014, 0.052893683314323425, -0.05222094804048538, 0.040700387209653854, -0.03798842802643776, -0.01114215049892664, 0.046124301850795746, 0.013160351663827896, 0.06470856815576553, -0.044190190732479095, -0.045914072543382645, 0.04271858558058739, -0.07051089406013489, 0.01200409047305584, 0.08039166778326035, 0.029978692531585693, -0.06546539068222046, 0.011184196919202805, 0.03266962617635727, -0.05701417475938797, 0.007699646987020969, -0.05243117734789848, 0.004787971265614033, 0.03788331151008606, -0.0021311992313712835, 0.038829345256090164, -0.025626948103308678, 0.0010228967294096947, 0.008850651793181896, 0.044442467391490936, -0.07736437022686005, 0.023020103573799133, 0.03269065171480179, 0.03271167352795601, 0.034036118537187576, -0.040469132363796234, 0.020129451528191566, 0.04633453115820885, -0.03939696401357651, 0.042171988636255264, -0.007168817799538374, 0.0030509522184729576, 0.05756077170372009, 0.0027776542119681835, -0.03620148077607155, 0.00388661352917552, -0.02789742313325405, -0.01710215024650097, 0.0721927285194397, 0.03851399943232536, 0.016240211203694344, 0.030420174822211266, -0.045661795884370804, 0.03946003317832947, -0.01371745951473713, 0.015189064666628838, 0.03464578092098236, 0.014001268893480301, -0.0012193297734484076, 0.019467229023575783, 0.01224585436284542, -0.029011638835072517, -0.056173257529735565, -0.025290580466389656, 0.013517742045223713, 0.03508726507425308, 0.035213403403759, 0.018636824563145638, 0.03836683928966522, -0.010196119546890259, 0.009187018498778343 ]
4,654
optbinning.binning.piecewise.continuous_binning
__init__
null
def __init__(self, name="", objective="l2", degree=1, continuous=True, continuous_deriv=True, prebinning_method="cart", max_n_prebins=20, min_prebin_size=0.05, min_n_bins=None, max_n_bins=None, min_bin_size=None, max_bin_size=None, monotonic_trend="auto", n_subsamples=None, max_pvalue=None, max_pvalue_policy="consecutive", outlier_detector=None, outlier_params=None, user_splits=None, user_splits_fixed=None, special_codes=None, split_digits=None, solver="auto", h_epsilon=1.35, quantile=0.5, regularization=None, reg_l1=1.0, reg_l2=1.0, random_state=None, verbose=False): super().__init__(name, None, objective, degree, continuous, continuous_deriv, prebinning_method, max_n_prebins, min_prebin_size, min_n_bins, max_n_bins, min_bin_size, max_bin_size, monotonic_trend, n_subsamples, max_pvalue, max_pvalue_policy, outlier_detector, outlier_params, user_splits, user_splits_fixed, special_codes, split_digits, solver, h_epsilon, quantile, regularization, reg_l1, reg_l2, random_state, verbose) self._problem_type = "regression" self._n_records_missing = None self._n_records_special = None self._sum_special = None self._sum_missing = None self._std_special = None self._std_missing = None self._min_target_missing = None self._min_target_special = None self._max_target_missing = None self._max_target_special = None self._n_zeros_missing = None self._n_zeros_special = None
(self, name='', objective='l2', degree=1, continuous=True, continuous_deriv=True, prebinning_method='cart', max_n_prebins=20, min_prebin_size=0.05, min_n_bins=None, max_n_bins=None, min_bin_size=None, max_bin_size=None, monotonic_trend='auto', n_subsamples=None, max_pvalue=None, max_pvalue_policy='consecutive', outlier_detector=None, outlier_params=None, user_splits=None, user_splits_fixed=None, special_codes=None, split_digits=None, solver='auto', h_epsilon=1.35, quantile=0.5, regularization=None, reg_l1=1.0, reg_l2=1.0, random_state=None, verbose=False)
[ 0.03188064321875572, -0.006578767206519842, 0.0050006103701889515, 0.033075932413339615, -0.021197732537984848, -0.05939100310206413, -0.08643445372581482, -0.05771012231707573, -0.06884127110242844, -0.047363389283418655, -0.013372313231229782, 0.05289160832762718, 0.001980867236852646, 0.020600086078047752, -0.03369225189089775, 0.03279578685760498, 0.0026870693545788527, -0.0329265221953392, -0.010813644155859947, 0.0363069511950016, -0.015464072115719318, 0.03750224411487579, -0.0024022539146244526, 0.09211207926273346, -0.03475680947303772, 0.009184127673506737, -0.01147665735334158, -0.02978888340294361, -0.004708791151642799, -0.027566390112042427, -0.09808853268623352, -0.014156723394989967, -0.01570686511695385, 0.006074503995478153, 0.021608613431453705, -0.06368657946586609, 0.0239805169403553, 0.03400975093245506, -0.06641333550214767, 0.04926838353276253, -0.0066161202266812325, -0.04388957470655441, 0.011065776459872723, -0.0063499812968075275, 0.007241779938340187, 0.012980109080672264, -0.03438328206539154, 0.03576533496379852, -0.013773856684565544, -0.033785637468099594, 0.005192043725401163, -0.0202639102935791, 0.026034923270344734, -0.008142917416989803, -0.06152011454105377, 0.08053270727396011, 0.05909217894077301, 0.036082834005355835, 0.06208040565252304, -0.03031182289123535, -0.02523183822631836, 0.02752903662621975, 0.01850832812488079, -0.023494930937886238, -0.02205684594810009, -0.0016435246216133237, -0.06196834519505501, -0.014969146810472012, 0.018078770488500595, 0.060063350945711136, 0.07070890814065933, -0.020170528441667557, -0.000735967478249222, 0.01660333387553692, 0.01977832429111004, 0.01656598038971424, -0.05292896181344986, -0.06936420500278473, 0.010850997641682625, -0.02627771720290184, 0.0047227987088263035, 0.03171255439519882, 0.01606171764433384, -0.03348681330680847, -0.03490621969103813, -0.05079985037446022, 0.02715550735592842, 0.006041820626705885, 0.050911907106637955, -0.01717296428978443, -0.07111979275941849, 0.03124564327299595, 0.030797408893704414, 0.036792539060115814, 0.05416160449385643, -0.03989282250404358, -0.03240358084440231, -0.00960901565849781, -0.0028831716626882553, -0.05800894647836685, -0.013549739494919777, -0.02820138819515705, -0.04071458429098129, 0.056701596826314926, 0.01473569218069315, -0.025810806080698967, -0.007428544107824564, 0.005803696345537901, 0.000026154277293244377, -0.046504274010658264, -0.0815785825252533, 0.06592774391174316, -0.04882014915347099, -0.016005687415599823, -0.07339831441640854, 0.021440524607896805, -0.04990338161587715, 0.0010067755356431007, -0.037464890629053116, 0.009917176328599453, 0.01471701543778181, 0.022505080327391624, -0.05132279172539711, 0.06499392539262772, -0.00763398502022028, -0.008997363038361073, 0.040863998234272, 0.031843289732933044, 0.03966870531439781, -0.08344622701406479, 0.043852224946022034, -0.039071060717105865, -0.03768900781869888, 0.037857092916965485, 0.018162814900279045, -0.036605775356292725, 0.024652868509292603, 0.028462857007980347, 0.018583033233880997, 0.01155136339366436, 0.05046367645263672, -0.0036045482847839594, 0.0026450473815202713, -0.04112546890974045, 0.011345922015607357, 0.04747544974088669, 0.0067748697474598885, 0.019890382885932922, -0.05651483312249184, -0.024279341101646423, -0.03632562980055809, -0.017677227035164833, -0.002988226478919387, -0.0405278205871582, 0.03880959004163742, 0.008581812493503094, 0.005014617461711168, -0.02469022199511528, -0.008329681120812893, -0.019105972722172737, -0.036605775356292725, 0.014950470998883247, 0.0024979705922305584, -0.0344579853117466, -0.019815677776932716, 0.03330004960298538, -0.0220381710678339, -0.07422007620334625, -0.023775076493620872, 0.027659771963953972, -0.048073094338178635, -0.08008447289466858, -0.0015291315503418446, 0.028836386278271675, -0.04852132871747017, 0.11243202537298203, 0.038548123091459274, 0.016930170357227325, -0.04676574468612671, 0.05367601662874222, 0.03311328589916229, -0.02648315764963627, -0.04657898098230362, -0.03070402704179287, 0.00036740012001246214, 0.030629321932792664, 0.00901137012988329, -0.021944787353277206, 0.011336584575474262, 0.03139505535364151, 0.03866017982363701, -0.015109220519661903, 0.041013408452272415, -0.0005637942813336849, 0.025007721036672592, -0.0018349578604102135, 0.029228590428829193, 0.03632562980055809, 0.03509298339486122, 0.022691844031214714, 0.009020708501338959, 0.05625336244702339, 0.017350390553474426, -0.0014089021133258939, -0.030610645189881325, 0.005742997862398624, -0.005019286647439003, 0.025866836309432983, 0.010524160228669643, 0.02416728250682354, 0.02999432384967804, -0.004540703725069761, -0.028182711452245712, 0.06843038648366928, 0.04747544974088669, -0.022803902626037598, -0.009524972178041935, -0.009039385244250298, 0.016715392470359802, -0.004694784060120583, 0.06525539606809616, -0.044001635164022446, 0.0015933316899463534, -0.019479501992464066, 0.016930170357227325, 0.014745029620826244, 0.0734730213880539, -0.016276495531201363, 0.0444125160574913, 0.007106376346200705, 0.007932807318866253, -0.08120505511760712, 0.011373937129974365, -0.026408450677990913, 0.003896367270499468, 0.05517012998461723, -0.03427122160792351, 0.014250105246901512, -0.04463663324713707, 0.0086985407397151, -0.021664641797542572, -0.003812323324382305, -0.008395048789680004, -0.02207552269101143, -0.024802280589938164, 0.018162814900279045, 0.06237922981381416, 0.04288104921579361, -0.006900935433804989, -0.012289081700146198, 0.009973205626010895, -0.03133902698755264, -0.017789285629987717, 0.03651239350438118, -0.0035578571259975433, -0.07332360744476318, 0.03070402704179287, -0.03725944831967354, 0.031488437205553055, -0.04004223644733429, -0.016052378341555595, -0.013531062752008438, -0.053526606410741806, 0.06387334316968918, -0.04971661791205406, 0.001025451929308474, -0.020936261862516403, -0.023737724870443344, 0.044524576514959335, 0.0164632610976696, 0.01648193597793579, 0.0358026884496212, -0.05139749497175217, 0.020039793103933334, -0.007223103661090136, 0.02525051310658455, 0.011934229172766209, -0.005486196838319302, 0.012317095883190632, 0.005304101854562759, 0.04217134788632393, -0.007335162255913019, 0.05431101471185684, -0.02289728634059429, -0.03686724603176117, -0.04060252755880356, -0.06241657957434654, -0.036456361413002014, 0.0022073187865316868, -0.001495280535891652, -0.04250752180814743, 0.043852224946022034, 0.047027215361595154, 0.03399107605218887, 0.11415024846792221, 0.010374749079346657, 0.028182711452245712, -0.013997973874211311, 0.025343896821141243, 0.010215999558568, 0.0055142114870250225, -0.008105563931167126, 0.022617138922214508, -0.03699797764420509, -0.033412106335163116, -0.06122129037976265, 0.08090623468160629, -0.04415104538202286, 0.004395961295813322, 0.03471945598721504, 0.025829482823610306, 0.0722777247428894, 0.07242713868618011, 0.015884291380643845, -0.029153885319828987, -0.026856685057282448, 0.010869673453271389, -0.013951282016932964, 0.0469525083899498, 0.06054893881082535, -0.03929517790675163, 0.008507107384502888, -0.003158648731186986, -0.057971592992544174, 0.022280963137745857, -0.008605158887803555, 0.035373132675886154, 0.008591150864958763, 0.0063499812968075275, -0.025493307039141655, -0.03632562980055809, -0.05520748347043991, 0.050388969480991364, 0.011691436171531677, 0.007036339491605759, -0.014072678983211517, 0.044524576514959335, 0.00887596607208252, -0.006639465689659119, -0.0476248599588871, 0.05375072360038757, 0.008852620609104633, -0.02312140166759491, 0.023028019815683365, -0.018218843266367912, -0.07119449973106384, 0.02909785509109497, -0.020245233550667763, 0.032534316182136536, 0.04919368028640747, -0.03955664858222008, 0.007876778021454811, -0.019684942439198494, 0.07859035581350327, 0.03914576768875122, -0.025138454511761665, -0.023364195600152016, 0.01253187470138073, 0.04501016065478325, -0.040826644748449326, -0.025306543335318565, -0.010187984444200993, -0.06107188016176224, 0.06469510495662689, 0.056701596826314926, -0.0560665987432003, -0.02207552269101143, 0.012858712114393711, 0.01808810792863369, -0.021421847864985466, -0.013895252719521523, -0.07978564500808716, -0.04123752564191818, 0.023532284423708916, -0.0039687384851276875, -0.008348357863724232, -0.019647588953375816, -0.0023520609829574823, -0.02521316148340702, -0.03356152027845383, 0.02155258320271969, -0.003868352621793747, -0.041573699563741684, 0.03339343145489693, -0.015202602371573448, -0.023719048127532005, -0.009655706584453583, -0.012541213072836399, 0.0803832933306694, -0.03145108371973038, 0.04553310200572014, 0.012578565627336502, 0.026371099054813385, 0.018312225118279457, -0.03692327439785004, 0.000349015521351248, 0.024652868509292603, -0.004781162366271019, -0.0971173644065857, -0.006910273805260658, -0.05322778597474098, -0.0346260741353035, -0.006849575322121382, 0.006606781855225563, -0.012662610039114952, -0.054946012794971466, 0.05330248922109604, 0.008315674029290676, 0.009058061987161636, 0.04979132488369942, -0.03316931426525116, 0.009590339846909046, 0.001088484888896346, -0.04280634596943855, -0.06279011070728302, -0.012102317065000534, 0.012727976776659489, -0.011747465468943119, 0.059017471969127655, 0.0069663031026721, 0.04235811159014702, 0.030031675472855568, 0.012102317065000534, 0.028462857007980347, 0.013829885981976986, 0.024447428062558174, -0.03619489446282387, -0.004435648676007986, -0.02345757745206356, -0.011364598758518696, -0.058830708265304565, 0.01817215234041214, -0.0690653845667839, -0.018993914127349854, -0.0024302685633301735, -0.022336993366479874, -0.026688598096370697, 0.0366431288421154, 0.00035631097853183746, -0.0041788481175899506, 0.006868251599371433, -0.020077146589756012, 0.048409268260002136, -0.0022633480839431286, -0.0262590404599905, -0.05322778597474098, -0.00987982377409935, -0.042246051132678986, -0.08240034431219101, -0.02045067586004734, 0.07593830674886703, 0.012896064668893814, 0.02328949049115181, 0.0027827860321849585, -0.009394236840307713, -0.027790505439043045, 0.014100694097578526, -0.03427122160792351, 0.03929517790675163, -0.013997973874211311, 0.0027757822535932064, 0.03425254672765732, 0.030946820974349976, 0.04852132871747017, -0.016528626903891563, -0.013250917196273804, 0.050911907106637955, 0.021627288311719894, -0.003471478819847107, -0.001805775915272534, -0.015622821636497974, 0.024223310872912407, -0.015566792339086533, -0.04026635363698006, -0.048745445907115936, 0.051434848457574844, -0.02855623885989189, 0.0009600844932720065, 0.030274469405412674, -0.05808365345001221, 0.018872518092393875, -0.06245393306016922, 0.05132279172539711, 0.03974341228604317, -0.006919612176716328, -0.033766958862543106, -0.007069023326039314, -0.03903370723128319, -0.04232075810432434, 0.050725143402814865, -0.04280634596943855, 0.024652868509292603, 0.004855867940932512, 0.06458304822444916, -0.03143240883946419, 0.04926838353276253, 0.019021930173039436, -0.008007513359189034, 0.04590662941336632, -0.013194887898862362, 0.01439017802476883, 0.0051967124454677105, -0.027080802246928215, -0.030386528000235558, 0.033449459820985794, -0.025978894904255867, -0.06813156604766846, 0.0366431288421154, -0.07324890047311783, 0.020170528441667557, -0.03703533113002777, -0.027062125504016876, 0.045047514140605927, 0.031843289732933044, -0.008278321474790573, 0.006237922701984644, -0.010729600675404072, 0.05240602046251297, -0.019834352657198906, 0.017686566337943077, 0.0358026884496212, 0.05345190316438675, 0.03156314045190811, -0.06719774007797241, 0.03628827631473541, -0.0033033909276127815, -0.00935688428580761, -0.021029643714427948, 0.0589427687227726, 0.047550152987241745, 0.04269428551197052, -0.018396269530057907, -0.005388145800679922, 0.03531710058450699, 0.0056356084533035755, 0.048932209610939026, -0.017238331958651543, -0.03690459579229355, 0.0059531074948608875, -0.05924158915877342, -0.0015279642539098859, 0.03612018749117851, 0.05924158915877342, -0.005962445866316557, -0.03634430468082428, 0.023382872343063354, 0.002472290536388755, 0.08904915302991867, -0.010841659270226955, -0.018078770488500595, 0.03133902698755264, -0.01278400607407093, 0.013568416237831116, -0.0012758326483890414, 0.0440763421356678, 0.0016330190701410174, 0.022523757070302963, 0.01957288384437561, 0.032515641301870346, 0.026016246527433395, -0.05065044015645981, -0.002217824338003993, 0.015361351892352104, -0.0006116526201367378, -0.032011374831199646, 0.04149899631738663, 0.008838613517582417, 0.05487130954861641, -0.06984979659318924, -0.00960901565849781, 0.009058061987161636, -0.005789688788354397, -0.028014622628688812, 0.019684942439198494, -0.05221925675868988, -0.0021652968134731054, 0.03018108755350113, 0.020898908376693726, -0.0888250321149826, -0.009081407450139523, 0.012494522146880627, 0.051584258675575256, -0.03481283783912659, -0.08247505128383636, -0.0015373025089502335, 0.03014373406767845, -0.052293963730335236, 0.020544057711958885, -0.027454331517219543, -0.008007513359189034, -0.0008561969152651727, 0.018228180706501007, -0.062155112624168396, -0.0810556411743164, -0.029900941997766495, 0.03974341228604317, -0.07339831441640854, -0.03389769420027733, 0.042955756187438965, 0.02399919368326664, -0.040453117340803146, 0.001495280535891652, -0.004729802254587412, -0.006004467606544495, 0.0078067416325211525, -0.01471701543778181, 0.003770301351323724, -0.014156723394989967, -0.0005600006552413106, -0.0276971235871315, -0.002366068307310343, 0.0007563948165625334, 0.0024886324536055326, -0.04123752564191818, -0.039407238364219666, -0.023382872343063354, -0.06241657957434654, -0.009581001475453377, 0.0663759782910347, -0.03742753714323044, -0.025810806080698967, 0.016388554126024246, 0.015678850933909416, 0.04213399440050125, -0.06342510879039764, -0.031656526029109955, 0.01898457668721676, -0.0849403366446495, 0.008931995369493961, -0.030405204743146896, -0.010654894635081291, -0.0003641901130322367, 0.04781162366271019, -0.0744815468788147, 0.048932209610939026, 0.0009507462964393198, 0.03283314034342766, 0.020786849781870842, 0.02327081374824047, 0.031507112085819244, -0.026016246527433395, 0.014866426587104797, -0.012130332179367542, -0.0012875053798779845, -0.048446621745824814, -0.042768992483615875, -0.02823873981833458, 0.016388554126024246, 0.0971173644065857, -0.014082017354667187, -0.017350390553474426, 0.07048479467630386, -0.03053594008088112, 0.003046590369194746, -0.03085343912243843, -0.012998784892261028, -0.020786849781870842, 0.01048680767416954, 0.03658709675073624, -0.014091355726122856, -0.03557857125997543, 0.008124240674078465, 0.03847341611981392, 0.02999432384967804, 0.04022900015115738, 0.012886726297438145, 0.005607593804597855, -0.010850997641682625, -0.0001486817782279104, -0.007629315834492445, -0.016659362241625786, -0.020357292145490646, 0.009702397510409355, 0.02504507265985012, -0.011261878535151482, -0.0019855364225804806, -0.016846125945448875, -0.01727568358182907, 0.02188875898718834, 0.026875361800193787, 0.0658530443906784, 0.04310516640543938, -0.01992773450911045, -0.021216407418251038, 0.05550630763173103, 0.044375162571668625, -0.032907843589782715, 0.024260664358735085, -0.02067479118704796, -0.025138454511761665, -0.004104142542928457, 0.027304919436573982, 0.007736705243587494, 0.010187984444200993, 0.018853841349482536, -0.022971991449594498, -0.09046855568885803, -0.06066099926829338, 0.027230214327573776, -0.041723113507032394, 0.03858547285199165, -0.00969306007027626, -0.005140683613717556, 0.06667480617761612, -0.0031002850737422705, 0.06488186866044998, -0.033580195158720016, -0.05079985037446022, 0.015912305563688278, -0.06966303288936615, 0.038734886795282364, 0.09793912619352341, 0.05558101087808609, -0.060100704431533813, 0.025157131254673004, 0.020562734454870224, -0.014847750775516033, -0.007106376346200705, -0.0822509378194809, 0.0032123434357345104, 0.017350390553474426, -0.002792124170809984, 0.04232075810432434, -0.018704429268836975, 0.01886317878961563, 0.045570455491542816, 0.03541048243641853, -0.0728006660938263, 0.0322541706264019, -0.0033664240036159754, 0.007960822433233261, 0.04250752180814743, -0.020431999117136, -0.0011783650843426585, 0.028462857007980347, -0.041386935859918594, 0.01683678850531578, 0.0017707576043903828, 0.03490621969103813, 0.04194723069667816, -0.009240156970918179, 0.011532686650753021, -0.0076900143176317215, 0.02293463796377182, -0.027790505439043045, 0.06155746430158615, 0.0025610034354031086, 0.026763303205370903, 0.03716606646776199, -0.01871376857161522, 0.04721397906541824, -0.014007311314344406, 0.04710191860795021, 0.03559724986553192, 0.018144138157367706, -0.02648315764963627, 0.050911907106637955, -0.015015837736427784, -0.014660986140370369, -0.03369225189089775, -0.03936988487839699, 0.0033337401691824198, 0.026950066909193993, 0.04090135172009468, 0.02696874365210533, 0.032086081802845, 0.015576130710542202, -0.008577143773436546 ]
4,661
optbinning.binning.piecewise.continuous_binning
_fit
null
def _fit(self, x, y, lb, ub, check_input): time_init = time.perf_counter() if self.verbose: logger.info("Optimal piecewise binning started.") logger.info("Options: check parameters.") _check_parameters(**self.get_params(deep=False), estimator=None, problem_type=self._problem_type) # Pre-processing if self.verbose: logger.info("Pre-processing started.") self._n_samples = len(x) if self.verbose: logger.info("Pre-processing: number of samples: {}" .format(self._n_samples)) time_preprocessing = time.perf_counter() [x_clean, y_clean, x_missing, y_missing, x_special, y_special, _, _, _, _, _, sw_special, _] = self._fit_preprocessing( x, y, check_input) self._time_preprocessing = time.perf_counter() - time_preprocessing if self.verbose: n_clean = len(x_clean) n_missing = len(x_missing) n_special = len(x_special) logger.info("Pre-processing: number of clean samples: {}" .format(n_clean)) logger.info("Pre-processing: number of missing samples: {}" .format(n_missing)) logger.info("Pre-processing: number of special samples: {}" .format(n_special)) if self.outlier_detector is not None: n_outlier = self._n_samples-(n_clean + n_missing + n_special) logger.info("Pre-processing: number of outlier samples: {}" .format(n_outlier)) logger.info("Pre-processing terminated. Time: {:.4f}s" .format(self._time_preprocessing)) # Pre-binning self._time_estimator = 0 # Fit optimal binning algorithm for continuous target. Use optimal # split points to compute optimal piecewise functions self._fit_binning(x_clean, y_clean, y_clean, lb, ub) # Post-processing if self.verbose: logger.info("Post-processing started.") logger.info("Post-processing: compute binning information.") time_postprocessing = time.perf_counter() [self._n_records_special, self._sum_special, self._n_zeros_special, self._std_special, self._min_target_special, self._max_target_special] = target_info_special_continuous( self.special_codes, x_special, y_special, sw_special) self._n_records_missing = len(y_missing) self._sum_missing = np.sum(y_missing) self._n_zeros_missing = np.count_nonzero(y_missing == 0) if len(y_missing): self._std_missing = np.std(y_missing) self._min_target_missing = np.min(y_missing) self._max_target_missing = np.max(y_missing) bt = self._optb.binning_table.build(add_totals=False) n_records = bt["Count"].values[:-2] sums = bt["Sum"].values[:-2] stds = bt["Std"].values[:-2] min_target = bt["Min"].values[:-2] max_target = bt["Max"].values[:-2] n_zeros = bt["Zeros count"].values[:-2] n_records = np.r_[n_records, self._n_records_special] sums = np.r_[sums, self._sum_special] stds = np.r_[stds, self._std_special] min_target = np.r_[min_target, self._min_target_special] max_target = np.r_[max_target, self._max_target_special] n_zeros = np.r_[n_zeros, self._n_zeros_special] n_records = np.r_[n_records, self._n_records_missing] sums = np.r_[sums, self._sum_missing] stds = np.r_[stds, self._std_missing] min_target = np.r_[min_target, self._min_target_missing] max_target = np.r_[max_target, self._max_target_missing] n_zeros = np.r_[n_zeros, self._n_zeros_missing] # Compute metrics if self.verbose: logger.info("Post-processing: compute performance metrics.") d_metrics = continuous_metrics( x_clean, y_clean, self._optb.splits, self._c, lb, ub, self._n_records_special, self._sum_special, self._n_records_missing, self._sum_missing, self.special_codes) # Binning table self._binning_table = PWContinuousBinningTable( self.name, self.special_codes, self._optb.splits, self._c, n_records, sums, stds, min_target, max_target, n_zeros, lb, ub, x_clean.min(), x_clean.max(), d_metrics) self._time_postprocessing = time.perf_counter() - time_postprocessing if self.verbose: logger.info("Post-processing terminated. Time: {:.4f}s" .format(self._time_postprocessing)) self._time_total = time.perf_counter() - time_init if self.verbose: logger.info("Optimal piecewise binning terminated. Status: {}. " "Time: {:.4f}s".format(self._status, self._time_total)) # Completed successfully self._is_fitted = True return self
(self, x, y, lb, ub, check_input)
[ -0.02373250015079975, -0.040105171501636505, -0.03516582027077675, 0.030226467177271843, -0.06549067795276642, -0.047897931188344955, -0.07163043320178986, -0.01869475468993187, -0.06450674682855606, -0.04679592326283455, -0.04081360250711441, 0.04530034586787224, 0.033158592879772186, -0.011541551910340786, -0.05380154028534889, 0.04408026486635208, -0.005800293758511543, -0.015103394165635109, -0.025975869968533516, -0.011472675949335098, -0.0391605943441391, 0.0004971944144926965, 0.00028503351495601237, 0.11555326730012894, 0.001560766133479774, 0.014532712288200855, -0.007561536505818367, -0.04526098817586899, -0.028711209073662758, 0.005020525772124529, -0.010301793925464153, -0.016087329015135765, 0.022256597876548767, -0.028278278186917305, 0.03426060080528259, -0.04097103327512741, 0.05899671092629433, 0.03325698524713516, -0.009972176514565945, 0.021213628351688385, -0.0004492276057135314, -0.09626815468072891, 0.02046583779156208, 0.013735725544393063, -0.005190254654735327, 0.018399575725197792, -0.02062326669692993, 0.04569391906261444, -0.033040519803762436, -0.026290729641914368, -0.023122461512684822, -0.05679269880056381, 0.03766501322388649, 0.04431641101837158, 0.003984934650361538, 0.029045745730400085, 0.027746953070163727, 0.005952803883701563, 0.022059811279177666, -0.05372282490134239, 0.005465756170451641, 0.052502743899822235, 0.0044867414981126785, -0.024067038670182228, 0.011000387370586395, -0.0037512502167373896, -0.10130589455366135, -0.014375283382833004, 0.03951480984687805, 0.06155494228005409, 0.06356216967105865, 0.013696367852389812, 0.049393512308597565, 0.024519648402929306, -0.021902382373809814, -0.02995096705853939, 0.0028657091315835714, -0.03321762755513191, -0.02284695953130722, -0.06434931606054306, 0.06151558458805084, 0.07438544929027557, -0.018399575725197792, -0.06639590114355087, -0.016598975285887718, -0.03498871251940727, 0.031072651967406273, 0.05942964553833008, 0.03298148512840271, -0.04034131392836571, -0.013775083236396313, 0.039180271327495575, 0.057501133531332016, 0.06151558458805084, 0.08076134324073792, -0.003623338881880045, -0.07914768904447556, 0.015083716250956059, -0.014670463278889656, -0.04203368350863457, -0.004115305840969086, -0.0014488435117527843, 0.030088717117905617, 0.0939067080616951, 0.025523260235786438, 0.01704174466431141, 0.020603587850928307, -0.011561230756342411, -0.03571682423353195, -0.04581199213862419, -0.02483450621366501, 0.005815052893012762, -0.08863282203674316, -0.035992324352264404, -0.04286018759012222, -0.027314022183418274, -0.03898348659276962, 0.039298344403505325, -0.06005936115980148, 0.047543715685606, 0.005318165756762028, -0.01358813513070345, -0.04042002931237221, -0.022177884355187416, 0.008019066415727139, -0.02215820550918579, 0.04549713060259819, 0.08060391247272491, 0.021784309297800064, -0.055572621524333954, -0.01821262761950493, 0.00630702031776309, -0.020328087732195854, 0.05033808946609497, -0.04124653339385986, -0.020800374448299408, 0.019403187558054924, 0.03331602364778519, -0.004604813642799854, -0.04419833794236183, 0.11319182813167572, -0.017789535224437714, 0.005785535089671612, -0.007576295640319586, 0.07407058775424957, 0.03325698524713516, 0.029498355463147163, 0.0029493437614291906, -0.001135214464738965, 0.0023257751017808914, -0.03290276974439621, -0.01675640419125557, 0.0039947740733623505, -0.023142140358686447, -0.005450997035950422, -0.01784857176244259, 0.01872427389025688, -0.005987241398543119, -0.015152591280639172, -0.03548067808151245, -0.02526743710041046, -0.02979353629052639, 0.010173882357776165, -0.02564133331179619, -0.049196723848581314, 0.08816052973270416, -0.06116136908531189, 0.013125685974955559, 0.03426060080528259, -0.009421172551810741, 0.008378202095627785, -0.037566620856523514, -0.05128266662359238, 0.039101555943489075, -0.00045629963278770447, 0.04101039096713066, 0.02971482276916504, -0.04028227925300598, -0.033158592879772186, 0.024204788729548454, 0.02022969350218773, -0.0012514416594058275, -0.013342151418328285, -0.058642495423555374, -0.04408026486635208, 0.03390638157725334, 0.033689916133880615, -0.05380154028534889, -0.027353379875421524, 0.03471320867538452, -0.024204788729548454, 0.006036438047885895, 0.00962779950350523, 0.015349377878010273, 0.01825198531150818, -0.004700746852904558, 0.024755792692303658, 0.044867414981126785, 0.05533647537231445, -0.014286728575825691, -0.006203706841915846, -0.005219772458076477, 0.028435707092285156, -0.015388735570013523, -0.03762565553188324, -0.05836699530482292, -0.054155755788087845, 0.055769406259059906, -0.012338538654148579, 0.02837667055428028, 0.01622507907450199, -0.031958192586898804, -0.04880315065383911, 0.05620233714580536, 0.04577263444662094, 0.03557907044887543, 0.04057746008038521, -0.03420156240463257, -0.023024067282676697, -0.024775471538305283, 0.025385510176420212, -0.0473075695335865, -0.011118459515273571, -0.0034191724844276905, 0.02207949012517929, 0.04089231789112091, 0.05608426779508591, 0.05773727595806122, 0.09060069173574448, -0.04581199213862419, 0.009642558172345161, -0.027707595378160477, -0.03666140139102936, 0.01109878160059452, 0.00151402922347188, -0.006061036605387926, -0.023929286748170853, 0.0019666391890496016, 0.017730500549077988, -0.031958192586898804, -0.034044135361909866, -0.03313891217112541, -0.028927674517035484, -0.060571007430553436, -0.017917446792125702, -0.0006294106133282185, 0.035342928022146225, 0.05313246324658394, 0.01322407927364111, 0.010380509309470654, 0.019560618326067924, -0.015920059755444527, -0.02568069100379944, -0.043371833860874176, 0.00274025765247643, -0.026389123871922493, 0.020701982080936432, -0.026428481563925743, 0.03166301175951958, -0.003608579747378826, 0.01663833297789097, -0.0009648707928135991, 0.005180415231734514, 0.016697367653250694, -0.06454610079526901, 0.014109620824456215, -0.012358217500150204, -0.007886234670877457, 0.006798987276852131, 0.027136914432048798, -0.06871798634529114, 0.012928899377584457, -0.04183689504861832, 0.0036799150984734297, -0.02987225167453289, 0.06434931606054306, 0.02446061186492443, 0.0037709290627390146, 0.04494612663984299, -0.0035224854946136475, 0.0632866695523262, -0.001446383772417903, 0.037920836359262466, -0.044867414981126785, -0.03063972108066082, -0.0353626050055027, -0.036110397428274155, -0.008599587716162205, 0.002079791622236371, -0.04864572361111641, -0.06454610079526901, 0.01518210954964161, 0.05136138200759888, 0.02619233727455139, 0.05321117863059044, 0.00944577157497406, -0.023201175034046173, -0.06002000346779823, 0.0011954804649576545, -0.025975869968533516, -0.02979353629052639, -0.020642945542931557, 0.011079102754592896, -0.017012227326631546, 0.021489130333065987, -0.019285116344690323, 0.05844571068882942, -0.044749341905117035, 0.007413946557790041, -0.022630494087934494, 0.03154493868350983, -0.0034880477469414473, 0.11594684422016144, 0.00044461540528573096, 0.0389244481921196, -0.07092200219631195, 0.0004910448333248496, 0.04876379296183586, -0.007615652866661549, 0.0627356618642807, -0.023437319323420525, 0.009268662892282009, 0.026546552777290344, 0.0019383509643375874, -0.03685818612575531, -0.024814827367663383, 0.04600877687335014, -0.0022015534341335297, -0.06804890930652618, -0.058917999267578125, 0.018389735370874405, -0.027077877894043922, 0.057579848915338516, 0.04289954528212547, 0.006016759667545557, 0.010724886320531368, -0.004216159228235483, -0.017376283183693886, 0.0029567230958491564, -0.03459513559937477, 0.007512339856475592, 0.08170592039823532, 0.0021339079830795527, 0.03689754381775856, 0.007502500433474779, -0.05998064577579498, -0.008083022199571133, 0.0025828280486166477, -0.020721660926938057, 0.01893089897930622, 0.0005783690139651299, 0.03166301175951958, -0.002782074734568596, 0.051164593547582626, 0.069623202085495, -0.021567843854427338, 0.004531018435955048, -0.013676689937710762, 0.03727144002914429, -0.00011476673535071313, 0.0038078264333307743, 0.009765549562871456, -0.017258211970329285, 0.040065813809633255, 0.06549067795276642, -0.027845347300171852, 0.0038078264333307743, 0.01631363481283188, -0.04860636591911316, -0.0233782846480608, -0.0007723885937593877, -0.0632079541683197, -0.06308987736701965, -0.0026541633997112513, 0.0012182339560240507, 0.04711078479886055, -0.026389123871922493, 0.0005070337210781872, -0.01537889614701271, 0.010262437164783478, 0.03815697878599167, 0.0397115983068943, -0.06391638517379761, 0.006680915132164955, 0.001246522064320743, -0.04258468374609947, 0.002473365282639861, -0.0012053197715431452, 0.04384412243962288, -0.0549822598695755, 0.06080715358257294, -0.01293873880058527, -0.012555004097521305, -0.006621879059821367, -0.003579061711207032, 0.0037807682529091835, 0.07214207947254181, 0.04892122372984886, -0.046481065452098846, 0.002149896929040551, -0.035303570330142975, -0.038334086537361145, 0.014699981547892094, 0.03622846677899361, -0.023437319323420525, -0.05128266662359238, 0.004048890434205532, -0.01487708929926157, -0.00021969412046018988, 0.0474650003015995, -0.05710756033658981, 0.015005000866949558, 0.01211223378777504, 0.006971175782382488, -0.06950513273477554, 0.008737338706851006, -0.020082103088498116, 0.017228692770004272, 0.01796664483845234, -0.016038132831454277, 0.05171559751033783, -0.011236531659960747, 0.055454548448324203, 0.038334086537361145, -0.007305713836103678, 0.007778002414852381, -0.04506419971585274, -0.05124330893158913, -0.0035987405572086573, -0.005913446191698313, -0.03416220471262932, -0.021056197583675385, -0.11271953582763672, 0.009494967758655548, -0.008584828115999699, -0.002399570308625698, -0.010350991040468216, 0.034536100924015045, 0.053880251944065094, -0.013342151418328285, -0.025779083371162415, -0.015683915466070175, 0.049393512308597565, 0.00016834503912832588, -0.014335925690829754, -0.008806213736534119, -0.03713368624448776, -0.027924060821533203, -0.07489709556102753, 0.022551778703927994, 0.047543715685606, -0.018871864303946495, 0.0352838896214962, -0.014985322020947933, -0.029163818806409836, -0.0235750712454319, -0.00954908411949873, -0.025562617927789688, 0.021213628351688385, -0.016608813777565956, -0.01747467741370201, 0.05163688212633133, -0.012141752056777477, 0.02583811990916729, -0.026349766179919243, -0.02192206121981144, 0.001344300457276404, 0.012594361789524555, 0.016903994604945183, 0.052738890051841736, 0.006282421760261059, -0.0271762702614069, -0.006848183926194906, -0.019472064450383186, 0.031308796256780624, 0.03063972108066082, -0.01707126386463642, 0.04408026486635208, 0.021685916930437088, -0.027865024283528328, 0.035952966660261154, 0.0011862560641020536, 0.004548237193375826, 0.017297567799687386, 0.0013688988983631134, -0.018960418179631233, -0.010931512340903282, 0.021863024681806564, 0.019560618326067924, -0.007620572578161955, -0.00821585301309824, -0.010990547947585583, 0.05344732105731964, 0.007837038487195969, -0.06915091723203659, 0.01860620081424713, 0.03886541351675987, -0.000023579836124554276, 0.07615652680397034, -0.055651336908340454, 0.028750566765666008, 0.014099781401455402, -0.028691530227661133, -0.01666785031557083, 0.004567916039377451, -0.0002667384978849441, -0.023830894380807877, 0.025562617927789688, -0.06919027119874954, 0.036720436066389084, -0.03858990967273712, -0.04856700822710991, 0.026172658428549767, -0.014867249876260757, 0.018665237352252007, 0.0118859289214015, -0.010892154648900032, -0.01340118795633316, -0.02575940452516079, 0.00962779950350523, 0.024578683078289032, 0.05502161756157875, 0.0018141291802749038, -0.03959352523088455, 0.050889093428850174, 0.04097103327512741, -0.009475288912653923, -0.021331699565052986, 0.0033724354580044746, 0.022512421011924744, 0.0048606363125145435, -0.04203368350863457, 0.04533970355987549, 0.014257211238145828, 0.027235306799411774, 0.02115459181368351, 0.04254532605409622, -0.08516936749219894, 0.03662204369902611, -0.02127266302704811, -0.002681221580132842, 0.022669851779937744, 0.053919609636068344, -0.024854185059666634, -0.002600046806037426, 0.07324408739805222, -0.025326473638415337, 0.07344087213277817, 0.0009464219911023974, 0.011236531659960747, 0.011354603804647923, -0.015615040436387062, 0.031958192586898804, 0.08060391247272491, 0.06761597841978073, -0.022551778703927994, 0.023634105920791626, 0.05828827992081642, 0.0024549164809286594, 0.05348667874932289, -0.05939028784632683, -0.037920836359262466, 0.010478902608156204, -0.052817605435848236, -0.08024969696998596, 0.00594296446070075, -0.026310408487915993, 0.05010194331407547, -0.0136274928227067, -0.01541825383901596, -0.004314552992582321, 0.06989870965480804, -0.0623420886695385, -0.024637719616293907, -0.01224998477846384, -0.009662237018346786, -0.013558617793023586, -0.043253760784864426, -0.049157366156578064, -0.020524874329566956, 0.01666785031557083, 0.0016566996928304434, 0.017228692770004272, -0.052620816975831985, 0.0046933675184845924, -0.010665849782526493, -0.09052197635173798, -0.04506419971585274, 0.017582910135388374, -0.015152591280639172, -0.007723886054009199, 0.03727144002914429, -0.02806181274354458, -0.062145303934812546, -0.00019309714843984693, 0.050928451120853424, -0.062263377010822296, -0.027195949107408524, 0.04415898025035858, -0.011915447190403938, 0.02849474363029003, 0.02119394950568676, -0.012279503047466278, 0.028809601441025734, 0.022787922993302345, -0.004134984686970711, -0.012682915665209293, -0.010262437164783478, -0.010537938214838505, -0.022414028644561768, 0.017828892916440964, 0.0035692225210368633, 0.05053487420082092, -0.019235920161008835, -0.017592748627066612, -0.033729273825883865, -0.020642945542931557, 0.0020638026762753725, 0.09288341552019119, -0.016982709988951683, -0.01477869600057602, 0.00839296169579029, 0.0037020535673946142, 0.05356539413332939, -0.03815697878599167, -0.03689754381775856, 0.037605974823236465, -0.0317220501601696, 0.02211884781718254, 0.014768856577575207, -0.01403090637177229, -0.003987394738942385, 0.02971482276916504, -0.00995249766856432, 0.03636622056365013, 0.02526743710041046, 0.05903606861829758, 0.026664625853300095, -0.01881282776594162, -0.0022544399835169315, 0.05041680485010147, -0.008506113663315773, 0.044591911137104034, -0.0024364679120481014, -0.0003031748055946082, -0.05517904832959175, -0.005997080821543932, 0.018114233389496803, 0.05761920288205147, 0.02806181274354458, -0.02845538593828678, 0.006735031493008137, -0.06501839309930801, -0.017789535224437714, 0.008791455067694187, 0.007015453185886145, -0.02257145754992962, 0.036071039736270905, 0.03136783093214035, -0.035834893584251404, -0.049354154616594315, 0.03239112347364426, 0.027353379875421524, -0.023476677015423775, -0.05805213376879692, 0.004887694492936134, 0.017878089100122452, -0.04093167558312416, -0.013145364820957184, 0.020032906904816628, -0.02022969350218773, -0.02099716290831566, -0.07450351864099503, -0.009539244696497917, -0.016362830996513367, 0.0016886775847524405, -0.04230918362736702, -0.034044135361909866, -0.05183367058634758, -0.02022969350218773, 0.08328021317720413, -0.015880702063441277, -0.06556939333677292, 0.02526743710041046, 0.10374605655670166, 0.02814052626490593, -0.02434253878891468, -0.04415898025035858, -0.0072024003602564335, 0.02434253878891468, -0.011049584485590458, 0.0027943740133196115, 0.025424867868423462, 0.016894156113266945, 0.013509420678019524, -0.003918519243597984, -0.02200077474117279, -0.025739725679159164, 0.07198464870452881, -0.027353379875421524, 0.021981095895171165, -0.03408348932862282, -0.0469927117228508, 0.015447772108018398, 0.01009516790509224, 0.08540551364421844, -0.05018065869808197, 0.028632493689656258, 0.0547461174428463, -0.03075779229402542, 0.033040519803762436, 0.027018841356039047, -0.02511000819504261, -0.05635976791381836, -0.018921060487627983, 0.016963031142950058, -0.02196141891181469, 0.01994435302913189, -0.031230080872774124, -0.007915752939879894, 0.030462611466646194, 0.016539938747882843, 0.008284728042781353, -0.036071039736270905, -0.03063972108066082, 0.037566620856523514, 0.03565778583288193, -0.08934125304222107, 0.06643525511026382, 0.032843735069036484, 0.04892122372984886, 0.01978692226111889, -0.04494612663984299, 0.018025679513812065, 0.02014113962650299, -0.030462611466646194, 0.037487905472517014, -0.009047278203070164, 0.0197377260774374, 0.015979096293449402, -0.010144365020096302, -0.021902382373809814, -0.0022605895064771175, -0.008939044550061226, -0.028750566765666008, 0.06804890930652618, 0.03593328967690468, -0.060610365122556686, 0.033965419977903366, -0.03557907044887543, 0.036071039736270905, 0.02422446757555008, -0.0025508501566946507, 0.040183886885643005, 0.04439512640237808, 0.041600748896598816, 0.031131688505411148, -0.00839296169579029, -0.02438189648091793, -0.038767021149396896, 0.019353991374373436, -0.010754403658211231, 0.03420156240463257, 0.046205565333366394, 0.0025434705894440413, 0.02959674969315529, 0.029852572828531265, 0.04431641101837158 ]
4,662
optbinning.binning.piecewise.base
_fit_binning
null
def _fit_binning(self, x, y, prediction, lb, ub): if self.verbose: logger.info("Pre-binning: optimal binning started.") time_prebinning = time.perf_counter() # Determine optimal split points monotonic_trend = self.monotonic_trend if self.monotonic_trend in ("concave", "convex"): monotonic_trend = "auto" if self._problem_type == "regression": self._optb = ContinuousOptimalBinning( name=self.name, dtype="numerical", prebinning_method=self.prebinning_method, max_n_prebins=self.max_n_prebins, min_prebin_size=self.min_prebin_size, min_n_bins=self.min_n_bins, max_n_bins=self.max_n_bins, min_bin_size=self.min_bin_size, max_bin_size=self.max_bin_size, monotonic_trend=monotonic_trend, max_pvalue=self.max_pvalue, max_pvalue_policy=self.max_pvalue_policy, outlier_detector=self.outlier_detector, outlier_params=self.outlier_params, user_splits=self.user_splits, user_splits_fixed=self.user_splits_fixed, split_digits=self.split_digits) elif self._problem_type == "classification": self._optb = OptimalBinning( name=self.name, dtype="numerical", prebinning_method=self.prebinning_method, max_n_prebins=self.max_n_prebins, min_prebin_size=self.min_prebin_size, min_n_bins=self.min_n_bins, max_n_bins=self.max_n_bins, min_bin_size=self.min_bin_size, max_bin_size=self.max_bin_size, monotonic_trend=monotonic_trend, max_pvalue=self.max_pvalue, max_pvalue_policy=self.max_pvalue_policy, outlier_detector=self.outlier_detector, outlier_params=self.outlier_params, user_splits=self.user_splits, user_splits_fixed=self.user_splits_fixed, split_digits=self.split_digits) self._optb.fit(x, y) splits = self._optb.splits n_splits = len(splits) if self.verbose: logger.info("Pre-binning: number of splits: {}." .format(n_splits)) # Prepare optimization model data n_bins = n_splits + 1 self._n_bins = n_bins if self.n_subsamples is None or self.n_subsamples > len(x): x_subsamples = x pred_subsamples = prediction if self.verbose: logger.info("Pre-binning: no need for subsamples.") else: indices = np.digitize(x, splits, right=False) [_, x_subsamples, _, pred_subsamples, _, _, _, _] = train_test_split( x, prediction, y, indices, test_size=self.n_subsamples, random_state=self.random_state) if self.verbose: logger.info("Pre-binning: number of subsamples: {}." .format(self.n_subsamples)) self._time_prebinning = time.perf_counter() - time_prebinning if self.verbose: logger.info("Pre-binning: optimal binning terminated. Time {:.4}s." .format(self._time_prebinning)) # LP problem if self.verbose: logger.info("Optimizer started.") if self.monotonic_trend == "auto": indices = np.digitize(x, splits, right=False) mean = np.array([y[indices == i].mean() for i in range(n_bins)]) monotonic = type_of_monotonic_trend(mean) if monotonic in ("undefined", "no monotonic"): monotonic = None elif "peak" in monotonic: monotonic = "peak" elif "valley" in monotonic: monotonic = "valley" if self.verbose: logger.info("Optimizer: {} monotonic trend." .format(monotonic)) else: monotonic = self.monotonic_trend time_solver = time.perf_counter() optimizer = RobustPWRegression( objective=self.objective, degree=self.degree, continuous=self.continuous, continuous_deriv=self.continuous_deriv, monotonic_trend=monotonic, solver=self.solver, h_epsilon=self.h_epsilon, quantile=self.quantile, regularization=self.regularization, reg_l1=self.reg_l1, reg_l2=self.reg_l2, extrapolation="continue", verbose=self.verbose) optimizer.fit(x_subsamples, pred_subsamples, splits, lb=lb, ub=ub) self._c = optimizer.coef_ self._optimizer = optimizer self._status = retrieve_status(optimizer.status) self._splits_optimal = splits self._time_solver = time.perf_counter() - time_solver if self.verbose: logger.info("Optimizer terminated. Time: {:.4f}s" .format(self._time_solver))
(self, x, y, prediction, lb, ub)
[ -0.025629160925745964, -0.02030842937529087, -0.06260141730308533, 0.012629427015781403, -0.027071410790085793, -0.05094648525118828, -0.055078331381082535, -0.048217903822660446, -0.06451142579317093, -0.0535971038043499, -0.011050748638808727, 0.023095479235053062, 0.006811704486608505, -0.022335374727845192, -0.07928473502397537, 0.06295223534107208, -0.021399861201643944, -0.025258854031562805, -0.03422418609261513, 0.03724511340260506, -0.03897971287369728, -0.005700782872736454, 0.004550881218165159, 0.10267256200313568, 0.0023497457150369883, -0.0078008146956563, -0.018749240785837173, -0.0375179722905159, -0.020327920094132423, 0.011849832721054554, -0.026077426970005035, -0.03683582693338394, 0.028143351897597313, -0.05819670855998993, 0.013438255526125431, -0.029799990355968475, 0.07764758914709091, 0.04942627623677254, -0.029429683461785316, 0.002886934904381633, -0.03449704498052597, -0.08435209840536118, -0.0036275493912398815, 0.036913786083459854, -0.00019352817616891116, -0.00718688452616334, -0.015523670241236687, 0.058040790259838104, 0.0331132672727108, -0.041396453976631165, -0.015864742919802666, -0.08357249945402145, 0.004777451045811176, 0.015104638412594795, -0.021770169958472252, 0.04595708101987839, 0.05531221255660057, 0.020327920094132423, 0.03223622217774391, -0.034594494849443436, -0.0053889453411102295, 0.009818014688789845, -0.009311278350651264, -0.02081516571342945, 0.026467224583029747, -0.016907449811697006, -0.10672645270824432, 0.009988551028072834, -0.0022340246941894293, 0.04307258129119873, 0.06345897167921066, -0.0013557630591094494, 0.020210981369018555, 0.03954491764307022, -0.04490462690591812, 0.013438255526125431, -0.019977102056145668, -0.03849246725440025, -0.01743367686867714, -0.012385803274810314, 0.061003249138593674, 0.06501816213130951, -0.01647867262363434, -0.06283529847860336, -0.01145029067993164, -0.0668112263083458, 0.015241067856550217, 0.014695351012051105, 0.05184301733970642, -0.0403440035879612, -0.02056179754436016, 0.05133628100156784, 0.07928473502397537, 0.0737885981798172, 0.05203791707754135, -0.006655785720795393, -0.06197774410247803, 0.016225304454565048, -0.03946695849299431, -0.03855093568563461, -0.027324778959155083, 0.024576708674430847, -0.024830076843500137, 0.09323947131633759, 0.03365898132324219, 0.007576681673526764, 0.023680174723267555, -0.01267815101891756, -0.04888055846095085, -0.0573781356215477, -0.03447755426168442, 0.02674008160829544, -0.0674348995089531, 0.022744661197066307, -0.06061345338821411, 0.036796849220991135, -0.05784589424729347, 0.0076741306111216545, -0.024576708674430847, 0.05004994943737984, 0.005846956744790077, 0.0013314008247107267, -0.05051770806312561, -0.0005575926043093204, -0.01683923602104187, -0.008789924904704094, 0.051687099039554596, 0.060457535088062286, -0.03381489962339401, -0.06720102578401566, 0.030482135713100433, 0.0027115261182188988, -0.048724640160799026, 0.004394962452352047, 0.00016520697681698948, -0.011255391873419285, -0.028279781341552734, 0.042721763253211975, 0.005252516362816095, -0.04607401788234711, 0.07359369844198227, 0.0028479553293436766, 0.010748655535280704, -0.007898264564573765, 0.05901528522372246, 0.028221311047673225, 0.036173172295093536, -0.0019112239824607968, 0.03393184021115303, -0.0015567522495985031, -0.021204963326454163, -0.02106853388249874, -0.022491293027997017, -0.060886308550834656, -0.018807711079716682, -0.0082783168181777, -0.026194365695118904, -0.014325044117867947, -0.018115820363163948, -0.028533149510622025, -0.01683923602104187, -0.028162842616438866, 0.00999829638749361, -0.05562404915690422, -0.02944917231798172, 0.05176505818963051, -0.01943138614296913, 0.009496432729065418, 0.0009215047466568649, 0.007683875970542431, 0.02231588587164879, -0.043618299067020416, -0.06677224487066269, 0.05207689478993416, -0.015377496369183064, 0.049348317086696625, 0.04205910861492157, -0.023699665442109108, -0.03771287202835083, 0.06544693559408188, 0.04428095370531082, -0.017131583765149117, -0.008263698779046535, -0.07686799019575119, -0.05714425817131996, 0.012181160040199757, 0.02276415191590786, -0.029293254017829895, -0.011918047443032265, 0.02976101078093052, -0.03777134045958519, -0.030949890613555908, 0.021458331495523453, -0.04860769957304001, -0.011947281658649445, 0.006918898783624172, 0.026623142883181572, 0.029039885848760605, 0.028396720066666603, -0.018749240785837173, 0.004319439176470041, 0.011411311104893684, 0.04022706300020218, 0.000275294209131971, -0.026779063045978546, 0.010349113494157791, -0.022432824596762657, 0.03798573091626167, 0.05402588099241257, -0.002377762459218502, 0.00047019278281368315, -0.04938729479908943, -0.027889983728528023, 0.0706312358379364, 0.03404877707362175, 0.023426806554198265, -0.015016933903098106, -0.025395281612873077, 0.005510756745934486, -0.028279781341552734, 0.021614249795675278, -0.03853144496679306, 0.012951008975505829, 0.016235049813985825, 0.007045582868158817, 0.018797965720295906, 0.043618299067020416, 0.002048871014267206, 0.08435209840536118, -0.011508760042488575, 0.03794674947857857, -0.03921359032392502, -0.007771580014377832, -0.043618299067020416, -0.0119862612336874, 0.017482401803135872, -0.042215026915073395, -0.010738911107182503, -0.017959902063012123, -0.042098090052604675, -0.007264843676239252, -0.009715693071484566, -0.024069972336292267, -0.055078331381082535, -0.04891953989863396, 0.0274222269654274, 0.03858991339802742, 0.015562649816274643, 0.028026413172483444, -0.009496432729065418, 0.0015445711323991418, -0.02800692245364189, -0.034652963280677795, -0.012619681656360626, 0.030657542869448662, -0.04330645874142647, 0.026818042621016502, -0.022686192765831947, 0.005198919214308262, 0.044436872005462646, -0.03426316753029823, 0.038940731436014175, -0.012366313487291336, 0.03915512189269066, -0.04307258129119873, -0.012726875953376293, -0.022725172340869904, -0.0027310161385685205, 0.01746291108429432, 0.043540339916944504, 0.03165152668952942, 0.021399861201643944, -0.028844986110925674, 0.014695351012051105, -0.028513658791780472, 0.06318611651659012, 0.00786902941763401, 0.00342046981677413, 0.04630789905786514, -0.00031138089252635837, 0.07686799019575119, 0.022276906296610832, 0.020074551925063133, -0.017414186149835587, -0.012804835103452206, -0.03954491764307022, -0.03108632005751133, -0.016030406579375267, 0.00832216814160347, -0.007961606606841087, -0.058040790259838104, 0.009208956733345985, 0.07086511701345444, 0.05655956268310547, 0.05429873988032341, 0.037673890590667725, 0.051609139889478683, -0.04276074469089508, 0.0343606173992157, -0.03323020413517952, -0.0017638319404795766, -0.013740348629653454, 0.00753770163282752, -0.0018722442910075188, 0.02408946119248867, -0.01059273723512888, 0.04646381735801697, -0.05624772608280182, -0.00004168240775470622, 0.014783055521547794, 0.0034935567528009415, 0.004380345344543457, 0.08481985330581665, 0.00103844387922436, -0.0042341710068285465, -0.08154555410146713, 0.024362320080399513, 0.00873145554214716, -0.024576708674430847, 0.043540339916944504, -0.046190958470106125, 0.017901433631777763, 0.05184301733970642, -0.039954204112291336, -0.01582576334476471, 0.01833995431661606, 0.04716545343399048, 0.021146493032574654, -0.06384877115488052, -0.05776793509721756, -0.0002346395922359079, -0.04085073992609978, 0.024362320080399513, 0.04888055846095085, -0.01912929303944111, 0.006007748190313578, 0.03712817654013634, -0.007966478355228901, 0.010602481663227081, -0.029722031205892563, 0.04658075422048569, 0.03295734524726868, -0.0034643218386918306, 0.07281409949064255, 0.0016249667387455702, -0.025882529094815254, 0.008994568139314651, 0.02389456331729889, -0.008302678354084492, 0.03749848157167435, 0.004151339177042246, -0.004614223260432482, -0.005345093086361885, 0.021360881626605988, 0.052349753677845, -0.056169766932725906, 0.0068360669538378716, -0.007488977164030075, 0.06482326239347458, -0.004775014705955982, -0.04591809958219528, -0.017443420365452766, -0.03233367204666138, 0.03999318554997444, 0.041201554238796234, -0.02011353150010109, -0.018008626997470856, 0.02106853388249874, -0.021594760939478874, -0.032060813158750534, -0.0053986902348697186, -0.08591128885746002, -0.03514020889997482, 0.018944140523672104, 0.0020732334814965725, 0.050478726625442505, -0.021614249795675278, -0.022335374727845192, 0.012756111100316048, 0.019675008952617645, 0.04303360357880592, 0.011771872639656067, 0.011167687363922596, 0.01507540326565504, -0.0018320464296266437, -0.02541477233171463, -0.01825224980711937, -0.05125832185149193, 0.09932030737400055, -0.06451142579317093, 0.043423399329185486, 0.02262772247195244, -0.0021767732687294483, -0.006270861253142357, -0.05355812609195709, 0.014081421308219433, 0.08076596260070801, 0.003003874095156789, -0.02792896330356598, 0.00025489076506346464, -0.03492582216858864, -0.02093210630118847, -0.01833995431661606, 0.04357931762933731, 0.0007235609227791429, -0.014617391861975193, 0.0327819362282753, 0.03794674947857857, -0.01563086546957493, 0.04268278554081917, -0.07031939923763275, 0.014354279264807701, 0.015845252200961113, -0.00030574711854569614, -0.05133628100156784, 0.013399275951087475, -0.0011017859214916825, 0.03794674947857857, 0.025940997526049614, -0.03422418609261513, 0.04502156749367714, 0.0023339102044701576, 0.04369625821709633, 0.009486687369644642, -0.007147904485464096, 0.0013752529630437493, -0.01428606454282999, -0.06439448148012161, -0.0011480742832645774, 0.00039649676182307303, -0.025258854031562805, -0.03991522639989853, -0.10251664370298386, 0.005174556747078896, -0.008809414692223072, -0.0018478819401934743, -0.004151339177042246, 0.06174386292695999, 0.010427072644233704, -0.04459279030561447, -0.0030793973710387945, 0.0013971790904179215, 0.053324244916439056, -0.00463371304795146, 0.008044438436627388, -0.007966478355228901, -0.02660365402698517, -0.03734256327152252, -0.07640023529529572, -0.009934954345226288, 0.04634687677025795, -0.01437376905232668, 0.041903190314769745, 0.021088024601340294, -0.054766494780778885, -0.028143351897597313, -0.03432163596153259, -0.018369188532233238, 0.02459619753062725, -0.010105490684509277, -0.012288354337215424, 0.04116257652640343, 0.011079982854425907, 0.023504765704274178, -0.03096938133239746, -0.008950716815888882, 0.040071144700050354, 0.026252835988998413, 0.029429683461785316, 0.03695276752114296, -0.000012828284525312483, 0.005768997594714165, 0.02290058135986328, -0.01718030869960785, 0.014081421308219433, 0.0460350401699543, -0.012317589484155178, 0.04229298606514931, 0.04202013090252876, -0.046385858207941055, 0.015513925813138485, 0.009350258857011795, 0.003257242264226079, 0.06653837114572525, -0.004694619216024876, -0.04061685875058174, -0.06548591703176498, 0.029234783723950386, -0.022413333877921104, 0.025200383737683296, -0.006782469805330038, 0.013925502076745033, 0.019791949540376663, 0.020717717707157135, -0.04763320833444595, 0.03089142218232155, -0.0017467783764004707, 0.023348847404122353, 0.07098205387592316, -0.058235689997673035, 0.012083711102604866, -0.00032310528331436217, -0.03165152668952942, -0.06657734513282776, 0.022237924858927727, 0.012132435105741024, -0.0498160719871521, 0.05157015845179558, -0.09253783524036407, 0.04303360357880592, -0.040382981300354004, -0.06930592656135559, 0.005174556747078896, 0.004850537981837988, 0.03556898608803749, 0.01293151918798685, -0.003383926348760724, 0.019626285880804062, -0.03438010439276695, -0.012707386165857315, 0.04615198075771332, 0.03562745824456215, 0.025258854031562805, -0.07640023529529572, 0.09113457053899765, 0.013467490673065186, -0.009550029411911964, -0.016098620370030403, 0.027792533859610558, 0.030287235975265503, 0.018973374739289284, -0.0277535542845726, 0.03241163119673729, 0.05418179929256439, 0.054961394518613815, 0.01298998948186636, 0.0004695837269537151, -0.03960338607430458, 0.03870685398578644, -0.005091724917292595, -0.03701123595237732, 0.048217903822660446, 0.056169766932725906, -0.04092869907617569, 0.005827466957271099, 0.06513509899377823, -0.018174290657043457, 0.08996517211198807, -0.018914904445409775, 0.012220139615237713, 0.03057958371937275, 0.010904574766755104, 0.029410192742943764, 0.06731796264648438, 0.018778476864099503, -0.057612013071775436, -0.013944991864264011, 0.04888055846095085, 0.016829490661621094, 0.030930401757359505, -0.058040790259838104, 0.01232733391225338, 0.02403099276125431, -0.030111826956272125, -0.054142821580171585, 0.03576388582587242, -0.036913786083459854, 0.05878140404820442, -0.000550588418263942, -0.0023266016505658627, 0.039876244962215424, 0.019791949540376663, -0.04646381735801697, -0.03381489962339401, -0.02750018611550331, 0.0006918899016454816, 0.0032718596048653126, -0.015689333900809288, -0.08669088035821915, 0.01644943840801716, -0.0004695837269537151, -0.0076400237157940865, -0.006217264104634523, -0.039817776530981064, -0.00718688452616334, 0.015465200878679752, -0.03361999988555908, -0.01582576334476471, -0.014256829395890236, -0.022276906296610832, -0.03860940411686897, 0.05063464492559433, -0.018184036016464233, -0.07269716262817383, 0.03381489962339401, 0.022296395152807236, -0.07234634459018707, -0.03476990386843681, 0.0334056131541729, -0.0337369404733181, 0.017277756705880165, -0.0020634885877370834, -0.022998029366135597, 0.034536026418209076, 0.020951595157384872, -0.0057543800212442875, -0.01718030869960785, -0.009228446520864964, 0.015406731516122818, -0.033132754266262054, 0.002631130628287792, 0.010290644131600857, 0.037167154252529144, 0.0008624261245131493, -0.019655520096421242, -0.009564646519720554, -0.009199212305247784, -0.03272346779704094, 0.10126928985118866, -0.026876511052250862, 0.0061198147013783455, 0.01675153151154518, 0.044748708605766296, 0.06653837114572525, -0.06451142579317093, -0.05153118073940277, 0.05102444440126419, -0.06844837218523026, 0.025063954293727875, -0.03870685398578644, 0.009247936308383942, -0.008156504482030869, 0.029293254017829895, -0.028279781341552734, 0.034087758511304855, 0.030910911038517952, 0.043540339916944504, 0.0045654987916350365, -0.007498722057789564, -0.0498160719871521, 0.015543160028755665, -0.00667040329426527, 0.03927205875515938, -0.009457452222704887, 0.004421761259436607, -0.034282658249139786, -0.0096913306042552, 0.05266159027814865, 0.0517260767519474, 0.006027237977832556, -0.029722031205892563, 0.01718030869960785, -0.054961394518613815, 0.005116087384521961, -0.015250812284648418, 0.03260653093457222, 0.028357740491628647, 0.014714841730892658, 0.02950764261186123, -0.039077162742614746, -0.0611591674387455, 0.013233612291514874, 0.036173172295093536, -0.045177485793828964, -0.03015080653131008, 0.01862255670130253, -0.02970254048705101, -0.02868906781077385, -0.013379786163568497, 0.0035788249224424362, -0.007552319206297398, -0.010826614685356617, -0.07269716262817383, -0.012717131525278091, -0.006295223720371723, 0.006665530614554882, -0.05511731281876564, -0.06568081676959991, -0.058547526597976685, -0.04521646723151207, 0.06665530800819397, -0.01567958854138851, -0.04011012241244316, -0.029605090618133545, 0.08793823421001434, 0.024381810799241066, -0.04186421260237694, 0.00027361931279301643, -0.0074256351217627525, 0.018125565722584724, -0.0077569629065692425, 0.016693061217665672, 0.008487832732498646, 0.011460035108029842, 0.02705192007124424, -0.028416210785508156, -0.024635178968310356, -0.030871931463479996, 0.05983385816216469, -0.05102444440126419, 0.039252571761608124, -0.047399330884218216, -0.04634687677025795, -0.006334203295409679, -0.012629427015781403, 0.07183960825204849, -0.05831364914774895, -0.01847638376057148, 0.027987433597445488, -0.04268278554081917, 0.029098354279994965, 0.020776186138391495, -0.01570882461965084, -0.06482326239347458, 0.02787049487233162, 0.022549763321876526, -0.0687602087855339, 0.007406145334243774, -0.034594494849443436, 0.013048458844423294, 0.018778476864099503, 0.0236411951482296, 0.022218436002731323, -0.030735503882169724, 0.01156722940504551, -0.02005506120622158, 0.07643921673297882, -0.0529734306037426, 0.004838356748223305, 0.03147611767053604, 0.05554609000682831, 0.0043243118561804295, -0.03701123595237732, -0.016907449811697006, 0.041084617376327515, 0.01864204742014408, 0.03102785162627697, -0.017131583765149117, 0.051180362701416016, 0.04584014043211937, 0.017043879255652428, -0.02358272671699524, -0.013691623695194721, -0.007825177162885666, -0.04825688526034355, 0.0498160719871521, 0.03356153145432472, -0.026954470202326775, 0.04775014892220497, -0.020133022218942642, 0.032002344727516174, -0.0008350185235030949, 0.014890249818563461, 0.03293785825371742, 0.02767559513449669, 0.015426221303641796, 0.030228767544031143, 0.023368338122963905, -0.02674008160829544, -0.0410066582262516, 0.01864204742014408, -0.020659247413277626, 0.03580286726355553, 0.007771580014377832, -0.0067093828693032265, 0.001333837048150599, 0.005013765301555395, 0.009705948643386364 ]
4,663
optbinning.binning.piecewise.base
_fit_preprocessing
null
def _fit_preprocessing(self, x, y, check_input): return split_data(dtype="numerical", x=x, y=y, special_codes=self.special_codes, user_splits=self.user_splits, check_input=check_input, outlier_detector=self.outlier_detector, outlier_params=self.outlier_params)
(self, x, y, check_input)
[ -0.0038231329526752234, 0.011917153373360634, 0.0032720507588237524, -0.009928090497851372, -0.0017910172464326024, -0.001897574169561267, 0.0034012107644230127, -0.008412614464759827, 0.05066512152552605, 0.01035001315176487, 0.055659305304288864, -0.023283224552869797, 0.020493371412158012, -0.030619505792856216, -0.00041465708636678755, -0.02378264255821705, 0.004477543290704489, -0.021474985405802727, -0.015955552458763123, -0.009230627678334713, -0.010806377977132797, 0.0077840364538133144, -0.03359879553318024, 0.009781709872186184, 0.027536889538168907, 0.031118925660848618, 0.021543871611356735, 0.021113337948918343, -0.008868979290127754, -0.020458927378058434, -0.03588923066854477, 0.06661206483840942, -0.022938797250390053, 0.009308123029768467, 0.02426484040915966, -0.05421271547675133, -0.002634861972182989, 0.023369330912828445, 0.0031773336231708527, 0.027536889538168907, -0.029500121250748634, -0.06206563860177994, -0.016213873401284218, 0.06189342215657234, -0.03909239545464516, 0.02846684120595455, -0.05211171507835388, 0.03592367470264435, -0.010995812714099884, -0.01641191728413105, -0.035028163343667984, -0.059895750135183334, 0.04680754616856575, 0.05696812644600868, -0.0112196896225214, 0.013768444769084454, 0.08059577643871307, 0.03213498368859291, 0.025797536596655846, -0.02302490547299385, 0.0066818720661103725, 0.09933257102966309, -0.018564583733677864, -0.04146893694996834, 0.003588492516428232, -0.02240493707358837, -0.049907386302948, 0.005218059755861759, -0.045292071998119354, 0.0423644483089447, -0.028380734845995903, -0.03575145825743675, 0.003353852080181241, 0.04691087454557419, 0.0187540166079998, 0.01600721664726734, 0.028208522126078606, -0.03606144338846207, 0.0411933958530426, -0.013131256215274334, 0.03356435149908066, 0.1025012955069542, -0.020183386281132698, -0.013105424121022224, -0.02541866898536682, -0.03506260737776756, 0.02485036477446556, 0.047599729150533676, 0.022043289616703987, 0.0487363338470459, -0.04815081134438515, 0.02312823198735714, 0.002725273836404085, 0.07036631554365158, -0.010410287417471409, 0.02664138190448284, -0.05820805951952934, 0.020855018869042397, -0.0008675240096636117, 0.00742238899692893, -0.01029834896326065, 0.08197348564863205, -0.009359787218272686, 0.04753084108233452, -0.008205958642065525, -0.016670238226652145, 0.0510784350335598, -0.004245055373758078, -0.056830354034900665, -0.015783339738845825, -0.01487922016531229, -0.0012937516439706087, -0.050802893936634064, 0.046394236385822296, -0.013906216248869896, -0.031945548951625824, -0.05104399099946022, 0.021561091765761375, -0.03957459330558777, 0.01878846064209938, -0.0413656085729599, 0.0273818988353014, -0.03222109004855156, 0.006699093617498875, -0.04732418805360794, -0.009411451406776905, 0.07639377564191818, 0.04205446317791939, 0.004821969661861658, -0.08369561284780502, 0.02426484040915966, -0.01646358147263527, -0.053764961659908295, -0.007340587675571442, -0.06492437422275543, -0.02865627594292164, 0.03397766500711441, 0.013441240414977074, 0.02915569394826889, -0.06182453781366348, 0.0644766241312027, 0.007439610082656145, 0.01279544085264206, 0.006470910739153624, 0.02137165702879429, 0.023197118192911148, 0.04480987414717674, 0.032565515488386154, 0.014130093157291412, 0.018013499677181244, -0.041090067476034164, 0.049562957137823105, 0.054970454424619675, -0.047186415642499924, 0.011116362176835537, 0.009781709872186184, -0.028329070657491684, -0.030774498358368874, 0.045326512306928635, 0.01933954283595085, 0.006259949877858162, -0.048254139721393585, 0.02366209402680397, 0.010074472054839134, -0.002647778019309044, 0.06123901158571243, -0.014629511162638664, -0.07722039520740509, 0.04670421779155731, -0.010246685706079006, 0.07308728247880936, -0.018547361716628075, -0.02975844033062458, 0.005403188988566399, 0.0010252066422253847, 0.0024325114209204912, -0.006462300196290016, -0.008546080440282822, 0.012476846575737, 0.077702596783638, 0.0390235111117363, 0.02061391994357109, 0.004460321739315987, -0.017092160880565643, -0.05534932017326355, -0.027554111555218697, -0.009988365694880486, 0.014517572708427906, -0.01890900917351246, 0.023438217118382454, -0.004354841075837612, 0.003106295596808195, -0.020786132663488388, 0.003390447236597538, 0.004959740210324526, -0.004049162846058607, -0.01731603778898716, 0.04084897041320801, -0.03158390149474144, -0.03520037606358528, -0.026899700984358788, -0.0009073482942767441, 0.015370028093457222, -0.017238540574908257, -0.06712870299816132, 0.025039799511432648, -0.04594648256897926, 0.0450509712100029, -0.043363284319639206, -0.00700477184727788, 0.03747359290719032, 0.0011979580158367753, -0.031893882900476456, 0.0473930723965168, 0.020768912509083748, 0.0187540166079998, 0.05087177827954292, -0.027536889538168907, 0.029551785439252853, -0.005661508999764919, 0.025177570059895515, -0.031945548951625824, -0.007129626348614693, 0.03470095992088318, 0.04122783988714218, 0.0017253609839826822, 0.022336052730679512, -0.022594371810555458, 0.020527813583612442, -0.0316527858376503, -0.02183663286268711, -0.03592367470264435, -0.054419372230768204, -0.001783482963219285, -0.01305376086384058, 0.005424715578556061, 0.04060787335038185, -0.042226675897836685, -0.043466612696647644, 0.01766907423734665, -0.03647475689649582, 0.01880568079650402, 0.0032914248295128345, -0.06550990045070648, 0.009471725672483444, 0.013897605240345001, 0.011073308996856213, 0.046463120728731155, 0.015921110287308693, 0.022714920341968536, -0.005700256675481796, 0.02844962105154991, 0.0012883699964731932, -0.0004262276634108275, 0.008868979290127754, 0.036750297993421555, -0.035613689571619034, -0.013966490514576435, 0.023386552929878235, 0.0022150923032313585, -0.011168026365339756, 0.03513149172067642, 0.016050269827246666, 0.02121666632592678, -0.029878990724682808, -0.025797536596655846, -0.015473355539143085, 0.03292716294527054, 0.026245292276144028, -0.010134746320545673, -0.023266002535820007, 0.01731603778898716, -0.0008104783482849598, -0.009816152043640614, 0.009359787218272686, 0.027674660086631775, -0.013837330043315887, -0.011107751168310642, 0.05338609218597412, 0.03451152518391609, 0.08479777723550797, -0.017479639500379562, -0.005205143708735704, -0.028897374868392944, -0.01248545665293932, -0.011288574896752834, -0.0022818248253315687, -0.008748430758714676, -0.03723249211907387, -0.037921346724033356, -0.12971098721027374, 0.02621084824204445, 0.0017920936224982142, 0.050217367708683014, 0.02014894410967827, -0.0013260416453704238, 0.0007604288985021412, -0.05083733797073364, 0.011262742802500725, -0.024557601660490036, -0.005489295814186335, 0.025229234248399734, -0.017979057505726814, 0.012554341927170753, -0.021474985405802727, -0.02441983111202717, 0.03278939425945282, -0.04009123146533966, -0.04539540037512779, -0.004662672523409128, 0.043397724628448486, 0.07315616309642792, 0.016084711998701096, -0.055521536618471146, 0.006905749440193176, -0.04012567549943924, 0.05417827144265175, 0.08459112048149109, 0.04177892208099365, 0.049425188452005386, 0.01770351640880108, -0.052042827010154724, 0.01818571425974369, -0.0091703524813056, -0.02724412828683853, 0.05338609218597412, 0.025229234248399734, -0.033822670578956604, -0.04556761309504509, 0.011831047013401985, -0.014173146337270737, 0.024523159489035606, -0.0029362349305301905, -0.0038231329526752234, 0.003414126578718424, -0.012003259733319283, 0.004378520417958498, -0.02614196389913559, 0.012089366093277931, -0.030550621449947357, -0.06461439281702042, 0.002299046143889427, -0.03029230237007141, 0.017152434214949608, -0.052490584552288055, -0.033133819699287415, -0.03513149172067642, -0.002097771968692541, 0.009308123029768467, 0.09023971855640411, -0.0363369844853878, -0.019666748121380806, 0.028380734845995903, -0.015680011361837387, 0.09313289821147919, -0.04852968081831932, -0.04508541524410248, -0.010048639960587025, 0.019115665927529335, -0.001705987029708922, 0.12633560597896576, -0.010909706354141235, 0.04005679115653038, 0.015748897567391396, -0.001682307687588036, -0.05717478320002556, -0.012218526564538479, 0.02180219069123268, -0.0028867237269878387, 0.04202001914381981, -0.030843384563922882, -0.020286714658141136, -0.03358157351613045, -0.03575145825743675, 0.005812195595353842, 0.03383989259600639, 0.009652549400925636, -0.025074241682887077, -0.004860717337578535, 0.03878241404891014, -0.008989528752863407, 0.033185482025146484, -0.028828488662838936, -0.03454596921801567, 0.0007523564272560179, 0.004649756476283073, -0.01121107954531908, 0.008434141054749489, 0.06344334036111832, -0.04012567549943924, 0.03971236199140549, -0.022921577095985413, 0.03595811501145363, -0.01825459860265255, -0.031876664608716965, -0.03161834180355072, 0.030533399432897568, 0.015654180198907852, -0.03208331763744354, -0.011331628076732159, -0.02254270762205124, -0.031824998557567596, -0.012244358658790588, 0.011434956453740597, -0.0028113804291933775, -0.036199215799570084, -0.00394798768684268, 0.035613689571619034, -0.0022258555982261896, 0.011133583262562752, -0.012933211401104927, 0.024747036397457123, 0.08011358231306076, -0.005243891850113869, -0.028966259211301804, 0.045257627964019775, -0.02123388648033142, 0.009316734038293362, -0.02056225575506687, 0.008619270287454128, 0.02844962105154991, -0.013682338409125805, -0.032479409128427505, 0.03971236199140549, 0.004964045248925686, 0.023266002535820007, -0.051353976130485535, -0.018495697528123856, 0.009308123029768467, -0.010556668974459171, -0.06272004544734955, -0.016015827655792236, -0.08307565003633499, -0.04133116826415062, -0.03501094505190849, -0.013940658420324326, -0.018461255356669426, 0.06241006404161453, -0.022732142359018326, -0.016859672963619232, -0.025074241682887077, 0.008141378872096539, 0.09781709313392639, 0.0008363103261217475, 0.0014099956024438143, 0.010591112077236176, -0.06306447088718414, 0.047599729150533676, -0.12130697816610336, -0.05407494306564331, 0.0411933958530426, 0.0022925881203264, 0.06895416229963303, -0.00595427118241787, 0.006109263282269239, -0.004671283066272736, -0.0011818130733445287, -0.040538985282182693, 0.05228392779827118, 0.017057716846466064, 0.006987550761550665, 0.011727718636393547, -0.002045031636953354, 0.011366071179509163, -0.0074998848140239716, 0.024109847843647003, -0.04122783988714218, -0.002660693833604455, 0.00793041754513979, 0.013622064143419266, -0.004860717337578535, -0.022301608696579933, 0.0411933958530426, 0.006617292296141386, -0.00257889274507761, 0.07074518501758575, 0.045808710157871246, 0.0018555972492322326, 0.033151041716337204, -0.008266233839094639, 0.024454273283481598, -0.04784082621335983, 0.0005650745588354766, 0.01641191728413105, -0.018685132265090942, -0.007021993398666382, -0.06392554193735123, -0.0365091972053051, -0.046497564762830734, 0.028311850503087044, 0.009488947689533234, 0.042881086468696594, 0.014164535328745842, -0.00021836096129845828, -0.012347686104476452, 0.010143357329070568, 0.06637096405029297, -0.009049803949892521, 0.0448787584900856, -0.041537825018167496, -0.010169189423322678, 0.018065163865685463, -0.03823133185505867, -0.04188225045800209, 0.03592367470264435, -0.0008772109868004918, -0.029362350702285767, 0.002176344394683838, -0.07556714862585068, 0.02912125177681446, -0.08596882969141006, -0.047703057527542114, 0.04663533344864845, 0.05345497652888298, -0.01371678151190281, 0.002692983951419592, -0.0194256491959095, 0.014465908519923687, -0.04022900387644768, 0.025849200785160065, 0.0155336307361722, 0.015938332304358482, 0.034924834966659546, -0.053799401968717575, 0.04742751643061638, 0.05948244035243988, -0.042295560240745544, -0.018444033339619637, 0.004070689436048269, -0.002826449228450656, 0.027175242081284523, -0.05094066262245178, 0.05872470140457153, 0.05524599552154541, -0.02011450193822384, 0.03287550061941147, 0.039057955145835876, 0.014095650054514408, 0.048254139721393585, -0.0007437457679770887, -0.0018200782360509038, 0.03898906707763672, 0.005286945030093193, 0.01219269447028637, 0.02481592260301113, 0.03301326930522919, 0.027536889538168907, 0.06919526308774948, -0.053041666746139526, -0.021750526502728462, -0.039815690368413925, -0.039781250059604645, 0.014939495362341404, 0.028776826336979866, 0.08713988214731216, -0.04866744950413704, 0.051353976130485535, 0.06234117969870567, -0.015068654902279377, -0.004860717337578535, -0.03228997439146042, -0.0100055867806077, 0.03571701794862747, -0.047737497836351395, -0.0696774572134018, -0.03177333623170853, -0.08107797056436539, 0.03991901874542236, -0.07356947660446167, -0.04422434791922569, 0.06712870299816132, 0.033133819699287415, 0.01517198234796524, 0.04246777296066284, -0.03764580562710762, 0.008038051426410675, -0.015955552458763123, -0.025866422802209854, -0.09588830918073654, -0.022060511633753777, 0.001783482963219285, 0.0031773336231708527, -0.04611869528889656, -0.049528516829013824, -0.02192274108529091, -0.07715151458978653, -0.018960673362016678, -0.008180126547813416, -0.03757692128419876, 0.04360438138246536, -0.00595427118241787, 0.031325582414865494, -0.005075984168797731, 0.022818248718976974, 0.009807541966438293, -0.0019115664763376117, -0.03592367470264435, -0.07060740888118744, 0.00028415178530849516, -0.057450324296951294, 0.03447708114981651, 0.07191623002290726, -0.025091463699936867, 0.026985807344317436, 0.06912637501955032, -0.059275783598423004, -0.06561322510242462, -0.010461951605975628, -0.03210053965449333, -0.0780470222234726, 0.0009821533458307385, 0.038610197603702545, 0.013604843057692051, -0.01946009136736393, -0.0016812313115224242, 0.05028625577688217, -0.005020014941692352, -0.07604935020208359, 0.0303956288844347, -0.023455437272787094, 0.02378264255821705, -0.041572265326976776, 0.01303653884679079, 0.043397724628448486, -0.002893181750550866, -0.027812432497739792, -0.01178799383342266, -0.04866744950413704, 0.0037413316313177347, -0.06426996737718582, 0.019615083932876587, 0.004369909875094891, 0.045326512306928635, -0.04112451151013374, 0.054350484162569046, 0.07983803749084473, -0.013329301960766315, 0.01770351640880108, -0.016282757744193077, -0.03383989259600639, -0.006488132290542126, -0.020217830315232277, 0.06351222842931747, -0.02683081664144993, -0.005644287448376417, -0.12206471711397171, 0.012993485666811466, 0.0000341735576512292, 0.05793251842260361, 0.017496861517429352, -0.03337491676211357, 0.011133583262562752, -0.007758204825222492, -0.011796603910624981, 0.03630254045128822, 0.01456062588840723, -0.01885734498500824, 0.004938213620334864, -0.009781709872186184, -0.06375332921743393, -0.048908546566963196, 0.0561070591211319, 0.03781801834702492, 0.02252548560500145, 0.003579881973564625, 0.04267442971467972, -0.0025401446036994457, -0.02009727992117405, -0.030223416164517403, 0.0267102662473917, -0.06519991904497147, 0.03365045785903931, -0.03950570896267891, -0.026279734447598457, -0.0062857819721102715, -0.054316043853759766, -0.011701886542141438, -0.06013684719800949, 0.005515127908438444, 0.03599255904555321, -0.0063245296478271484, -0.02805352956056595, -0.003969514276832342, 0.02621084824204445, 0.061583440750837326, -0.027743546292185783, -0.019236214458942413, -0.04071120172739029, -0.043363284319639206, 0.058759141713380814, 0.031377244740724564, 0.05548709258437157, 0.04394880682229996, -0.08135351538658142, -0.04367326572537422, -0.003498080652207136, -0.031256694346666336, -0.026899700984358788, 0.003418432082980871, 0.008722598664462566, -0.002535839332267642, -0.02974122017621994, -0.03272050619125366, 0.0007469747215509415, -0.014741449616849422, 0.022387715056538582, -0.052628353238105774, 0.0034378059208393097, -0.010169189423322678, -0.02975844033062458, 0.02423039637506008, -0.012778219766914845, -0.03706027939915657, -0.0255392175167799, 0.012313243933022022, 0.02860461175441742, -0.039850134402513504, 0.03201443329453468, 0.041090067476034164, 0.03139446675777435, 0.07122737914323807, -0.004494764376431704, 0.04632535204291344, 0.010444730520248413, -0.0695052444934845, 0.038851298391819, 0.035579245537519455, -0.08500443398952484, 0.049907386302948, -0.06261672079563141, 0.04715197533369064, 0.061101242899894714, -0.07563603669404984, 0.0448787584900856, 0.045843154191970825, -0.009626718237996101, 0.006772283930331469, 0.013260416686534882, 0.034235984086990356, -0.019046779721975327, 0.007633349858224392, -0.051836173981428146, 0.021543871611356735, 0.007370724808424711, -0.008042355999350548, 0.04611869528889656, 0.04935630410909653, -0.016825228929519653, -0.002164504723623395, 0.007637655362486839, -0.010746103711426258, -0.033822670578956604, -0.014646732248365879, -0.02118222415447235, 0.011469398625195026, 0.03571701794862747, 0.007224343717098236, 0.014457298442721367, 0.010573890060186386, -0.011159415356814861, 0.018495697528123856, 0.02002839557826519, 0.037990231066942215, 0.004899465478956699, 0.028070751577615738, -0.016919946298003197, 0.06378776580095291, 0.03409821167588234 ]
4,672
optbinning.binning.piecewise.base
fit
Fit the optimal piecewise binning according to the given training data. Parameters ---------- x : array-like, shape = (n_samples,) Training vector, where n_samples is the number of samples. y : array-like, shape = (n_samples,) Target vector relative to x. check_input : bool (default=False) Whether to check input arrays. Returns ------- self : BasePWBinning Fitted optimal piecewise binning.
def fit(self, x, y, lb=None, ub=None, check_input=False): """Fit the optimal piecewise binning according to the given training data. Parameters ---------- x : array-like, shape = (n_samples,) Training vector, where n_samples is the number of samples. y : array-like, shape = (n_samples,) Target vector relative to x. check_input : bool (default=False) Whether to check input arrays. Returns ------- self : BasePWBinning Fitted optimal piecewise binning. """ return self._fit(x, y, lb, ub, check_input)
(self, x, y, lb=None, ub=None, check_input=False)
[ -0.006861167028546333, -0.03640760853886604, -0.03918681666254997, -0.0008299623732455075, -0.05773802101612091, -0.037519291043281555, -0.03109237551689148, -0.001888992148451507, -0.008902146480977535, -0.019002826884388924, 0.018568575382232666, -0.025169191882014275, 0.0019345885375514627, -0.007291075307875872, -0.06044774875044823, 0.0178216639906168, -0.013652853667736053, -0.04755917564034462, -0.06225423142313957, 0.036893971264362335, -0.0069480170495808125, 0.019680257886648178, 0.06114254891872406, 0.12659287452697754, -0.022598424926400185, 0.013253342360258102, 0.01863805577158928, -0.018985455855727196, -0.03883941471576691, -0.017317932099103928, -0.022285765036940575, -0.0028552007861435413, 0.010491505265235901, -0.02574240230023861, 0.06371331959962845, -0.021052490919828415, 0.07774831354618073, 0.01688368059694767, -0.02141726203262806, -0.030744975432753563, -0.023432187736034393, -0.0629490315914154, 0.03479219600558281, 0.06183735281229019, 0.03769299387931824, 0.025342892855405807, -0.025169191882014275, 0.07034867256879807, 0.019107047468423843, 0.008398415520787239, -0.060551967471838, -0.05186694860458374, 0.03199561685323715, -0.0014807961415499449, 0.027705218642950058, 0.0031939165201038122, 0.0053760283626616, -0.0050590247847139835, 0.027635738253593445, 0.0127148712053895, -0.008029302582144737, 0.028799530118703842, 0.04109752178192139, -0.027774697169661522, 0.03531329706311226, 0.010891016572713852, -0.10658258199691772, 0.003619482507929206, -0.004273030441254377, 0.0760113075375557, 0.0479760579764843, 0.024630719795823097, -0.024839160963892937, 0.04999098181724548, -0.039568956941366196, 0.03672026842832565, -0.01276698149740696, 0.014460560865700245, -0.010986551642417908, 0.01224588043987751, 0.08962941914796829, 0.05905814468860626, -0.018186435103416443, -0.02695830538868904, -0.021347781643271446, -0.018551206216216087, 0.016102029010653496, 0.02758362703025341, 0.07684506475925446, -0.004151440225541592, -0.035261187702417374, 0.044328346848487854, 0.05850230157375336, 0.042765043675899506, 0.08830929547548294, -0.025568703189492226, -0.0555841363966465, 0.059857167303562164, -0.04498840868473053, 0.00879792682826519, -0.06788212805986404, 0.02212943509221077, 0.020114509388804436, 0.09081058204174042, 0.020427169278264046, 0.02468283101916313, 0.012567225843667984, -0.03161347657442093, -0.062323711812496185, -0.008676336146891117, 0.008593828417360783, -0.00465951394289732, -0.07086977362632751, -0.009475357830524445, -0.07045289129018784, 0.039881616830825806, -0.03302045166492462, -0.02459597960114479, -0.0314745157957077, 0.021382521837949753, 0.008203002624213696, 0.0009016137919388711, -0.04561373218894005, -0.04630853235721588, 0.041167002171278, -0.017856404185295105, 0.02296319603919983, 0.013149121776223183, -0.013765758834779263, -0.061489950865507126, 0.023519037291407585, -0.011299212463200092, -0.054402973502874374, 0.015494078397750854, -0.019888699054718018, -0.04783709719777107, 0.011559762991964817, 0.008363675326108932, 0.02645457535982132, -0.017265822738409042, 0.06538084149360657, 0.007490830961614847, 0.04398094862699509, 0.01759585365653038, 0.06173313036561012, 0.03303782269358635, 0.01915915682911873, -0.02478705160319805, 0.07205093652009964, 0.045127369463443756, -0.06909803301095963, -0.0031200938392430544, -0.014026309363543987, -0.02654142491519451, -0.023432187736034393, -0.02520393207669258, -0.008893461897969246, -0.040402717888355255, 0.022997936233878136, -0.005653948988765478, 0.018499094992876053, -0.010882331989705563, -0.019523927941918373, -0.02183414436876774, -0.019906068220734596, 0.08407100290060043, -0.0527007095515728, 0.035886507481336594, 0.056661080569028854, -0.016874996945261955, 0.01492086611688137, -0.08511320501565933, -0.06287955492734909, 0.03065812587738037, 0.029581181704998016, -0.019923439249396324, 0.00532391807064414, 0.0059014721773564816, 0.010578355751931667, 0.013513892889022827, 0.007912054657936096, 0.026176653802394867, 0.005310890730470419, -0.05044260248541832, -0.038735195994377136, 0.017144231125712395, 0.013270712457597256, 0.029407482594251633, -0.04439782723784447, -0.005658291280269623, -0.04578743129968643, -0.023831699043512344, 0.017726128920912743, 0.005814621690660715, -0.02779206819832325, 0.030918676406145096, 0.0024100933223962784, 0.05145006626844406, -0.0018944202456623316, -0.0027010415215045214, 0.028469499200582504, -0.04676015302538872, 0.05030364170670509, 0.007390953134745359, -0.030137022957205772, -0.016075974330306053, -0.020444540306925774, 0.054889336228370667, 0.023327967151999474, -0.02829580008983612, 0.07170353829860687, -0.01707475259900093, -0.07385741919279099, 0.05012994259595871, 0.023831699043512344, 0.03281201049685478, -0.007855601608753204, -0.05700847879052162, -0.018915975466370583, -0.003734559053555131, 0.008580801077187061, 0.00971853919327259, 0.0033524183090776205, 0.021452002227306366, 0.0016197564546018839, 0.030831824988126755, 0.05627893656492233, 0.0014048021985217929, 0.0705571100115776, -0.05224908888339996, 0.027114637196063995, -0.00696972943842411, -0.03374999389052391, 0.008676336146891117, -0.038457274436950684, -0.004794131964445114, -0.008216029964387417, 0.016345210373401642, -0.027010416612029076, -0.027600998058915138, 0.016814202070236206, -0.006183735094964504, -0.014382394962012768, -0.03560858592391014, -0.0031135801691561937, -0.00558012630790472, -0.002722754143178463, 0.01110814232379198, 0.03109237551689148, -0.017856404185295105, -0.018811756744980812, 0.004396792035549879, -0.006018719635903835, -0.03602546826004982, 0.043703027069568634, 0.02120882272720337, -0.0011724778451025486, -0.055410437285900116, -0.008051014505326748, 0.030102284625172615, -0.013852609321475029, 0.04808027669787407, 0.009284287691116333, 0.02965066209435463, -0.028556350618600845, -0.0343579426407814, -0.036199167370796204, 0.015198787674307823, 0.01569383405148983, 0.03414950519800186, -0.07239833474159241, -0.04950462281703949, 0.03939525783061981, 0.014981661923229694, -0.016188880428671837, 0.0519016869366169, 0.05040786415338516, 0.05179746821522713, 0.06604090332984924, -0.010682576335966587, 0.06114254891872406, 0.026993045583367348, -0.00245786109007895, 0.006752604153007269, -0.01640600524842739, -0.018655424937605858, -0.029146932065486908, 0.015363802202045918, -0.00465951394289732, -0.07899895310401917, -0.05475037544965744, 0.011333952657878399, 0.03168295696377754, 0.04999098181724548, 0.04342510551214218, 0.029668033123016357, 0.02152148261666298, -0.026089804247021675, 0.06249741464853287, -0.04293874651193619, 0.005219697952270508, -0.005957924760878086, -0.06044774875044823, -0.005975294858217239, 0.02471757121384144, -0.03170032799243927, 0.03890889510512352, -0.05669581890106201, -0.03190876916050911, -0.010230954736471176, 0.038735195994377136, -0.009232177399098873, 0.052144866436719894, -0.015329062938690186, -0.0033263631630688906, -0.06433863937854767, 0.044189389795064926, 0.05277018994092941, -0.06485974043607712, 0.02336270734667778, -0.004294742830097675, -0.003519604913890362, 0.047698136419057846, -0.0029963322449475527, -0.035886507481336594, 0.030831824988126755, 0.05197116732597351, 0.0074821459129452705, -0.039360515773296356, -0.0450926311314106, 0.011377377435564995, -0.008654623292386532, 0.07434378564357758, 0.010734686627984047, -0.05273544788360596, 0.03418424353003502, 0.01862068474292755, -0.0009781505214050412, -0.029476962983608246, -0.016579706221818924, -0.018394874408841133, 0.04408516734838486, -0.004563978873193264, 0.03911733627319336, 0.0009347253944724798, -0.03496589511632919, -0.04026375710964203, 0.02716674655675888, 0.01945444755256176, 0.06103833019733429, 0.02296319603919983, -0.001582845114171505, 0.0007659103139303625, -0.04599587246775627, 0.06451233476400375, -0.023519037291407585, 0.011003921739757061, 0.0007642818964086473, 0.02503023110330105, 0.008237742818892002, 0.011464227922260761, -0.03758877143263817, -0.043286144733428955, 0.01558961346745491, -0.026419835165143013, 0.02428331971168518, 0.017057381570339203, 0.01832539401948452, -0.026593534275889397, 0.05238804966211319, 0.011368692852556705, -0.06986231356859207, -0.0802496001124382, -0.006070829927921295, 0.013887348584830761, 0.04880981892347336, -0.03831831365823746, 0.010257010348141193, 0.0019747568294405937, -0.0012647561961784959, 0.050790004432201385, -0.006175050046294928, -0.03005017340183258, -0.004175323992967606, 0.02077457122504711, -0.008298537693917751, -0.02468283101916313, -0.0235885176807642, 0.06510291993618011, -0.031248707324266434, 0.02789628878235817, 0.021643072366714478, 0.01588490419089794, -0.00931902788579464, -0.05158902704715729, -0.02780943736433983, 0.07587234675884247, 0.016605760902166367, -0.031648218631744385, -0.046169571578502655, 0.006830769125372171, -0.00584501912817359, -0.021886253729462624, 0.022997936233878136, -0.03418424353003502, -0.020236099138855934, -0.017674017697572708, 0.013852609321475029, -0.01957603730261326, 0.00589712942019105, -0.037206631153821945, 0.044814709573984146, 0.019593408331274986, 0.023345336318016052, -0.04936566203832626, 0.025568703189492226, 0.0015372487250715494, 0.00019202039402443916, -0.02603769302368164, -0.013800499029457569, 0.04550950974225998, -0.0403679795563221, 0.02636772394180298, 0.02172992378473282, -0.02087879180908203, 0.0008652452379465103, -0.009188752621412277, -0.08379308879375458, 0.038144614547491074, -0.011716093868017197, -0.05124162510037422, -0.05238804966211319, -0.08587749302387238, -0.010804166086018085, -0.020131878554821014, -0.03109237551689148, -0.0037953543942421675, 0.01926337741315365, 0.025568703189492226, -0.04825397953391075, -0.032065097242593765, -0.03220405802130699, 0.036199167370796204, 0.016553649678826332, -0.04880981892347336, -0.026906196027994156, -0.06364383548498154, -0.03302045166492462, -0.057911720126867294, 0.00169792165979743, 0.04623905196785927, -0.034114763140678406, 0.04919195920228958, 0.009518783539533615, -0.018672795966267586, -0.03458375483751297, -0.029285890981554985, -0.062323711812496185, 0.04314718395471573, -0.014521355740725994, 0.038561493158340454, -0.005771196447312832, 0.018394874408841133, -0.0011377377668395638, -0.03581702709197998, -0.02007976919412613, 0.0018140837782993913, 0.004985202103853226, 0.092269666492939, 0.03531329706311226, 0.01884649693965912, 0.006205447483807802, 0.0021484571043401957, -0.00044755000271834433, 0.09088006615638733, 0.055201996117830276, -0.013010161928832531, 0.07177301496267319, 0.01780429296195507, -0.07517754286527634, -0.021747292950749397, 0.011047347448766232, 0.023519037291407585, 0.01943707838654518, -0.016553649678826332, -0.07767882943153381, -0.05221434682607651, -0.0029333659913390875, -0.0006877451087348163, 0.01276698149740696, 0.05412505194544792, 0.05211012810468674, -0.011021291837096214, -0.028434759005904198, -0.05693899840116501, 0.012159029953181744, -0.002507800003513694, 0.011012607254087925, 0.015407227911055088, -0.026576165109872818, -0.00349789229221642, 0.024335429072380066, -0.015928329899907112, -0.035365406423807144, 0.011386062949895859, 0.015763314440846443, -0.012879886664450169, 0.026107173413038254, -0.026506684720516205, 0.0639912337064743, -0.023519037291407585, -0.05040786415338516, -0.0076211062259972095, 0.016162823885679245, 0.03665078803896904, 0.019193897023797035, 0.001786943175829947, 0.02798313833773136, -0.011898479424417019, -0.022476835176348686, 0.02419647015631199, 0.05711270123720169, 0.07531650364398956, -0.05329129099845886, 0.06697888672351837, 0.015346433036029339, -0.029876472428441048, -0.052839670330286026, -0.014582150615751743, 0.0833762064576149, 0.04095856100320816, -0.014278175309300423, 0.021677812561392784, 0.01924600638449192, 0.021174082532525063, 0.05422927439212799, -0.028330540284514427, -0.028347909450531006, 0.04304296523332596, -0.007347527891397476, -0.013739703223109245, 0.019315486773848534, 0.048323459923267365, -0.0030223873909562826, -0.011203677393496037, 0.07163405418395996, -0.044710490852594376, 0.03025861456990242, 0.003230827860534191, 0.0002148185740225017, -0.028799530118703842, -0.017682703211903572, 0.0005411853780969977, 0.05443771183490753, 0.04075011983513832, -0.062323711812496185, -0.020635610446333885, 0.023953288793563843, -0.05169324576854706, 0.017925884574651718, -0.09150538593530655, -0.017361357808113098, 0.026680385693907738, -0.00756899593397975, -0.04974780231714249, -0.010604411363601685, -0.025342892855405807, 0.004381593316793442, 0.016788145527243614, -0.015806738287210464, 0.0263503547757864, 0.09553523361682892, -0.06941068917512894, -0.013244657777249813, -0.01518141757696867, 0.013097012415528297, -0.009093217551708221, -0.06829901039600372, -0.06406071782112122, -0.012593280524015427, -0.03654656931757927, -0.013496522791683674, 0.006822084076702595, -0.036893971264362335, 0.0016523252706974745, -0.028799530118703842, -0.029146932065486908, -0.045023150742053986, -0.06381753832101822, 0.033715251833200455, 0.02327585779130459, 0.01945444755256176, -0.02265053614974022, -0.00679168663918972, 0.015719888731837273, -0.008559088222682476, -0.08553008735179901, -0.0315961092710495, 0.08275087922811508, -0.038769934326410294, 0.031005525961518288, 0.03734559193253517, -0.02654142491519451, 0.01987132802605629, 0.013791813515126705, 0.017248451709747314, -0.04345984756946564, -0.009692483581602573, -0.027409927919507027, -0.027114637196063995, 0.02183414436876774, 0.00812917947769165, 0.048636119812726974, 0.004546608775854111, -0.042765043675899506, 0.011194992810487747, 0.029303262010216713, -0.043807245790958405, 0.043494585901498795, 0.009049791842699051, -0.00002904054053942673, -0.01863805577158928, 0.012584595941007137, 0.05343025177717209, -0.019367597997188568, -0.04714229702949524, 0.01254985574632883, 0.01841224543750286, 0.03232564777135849, 0.0072259376756846905, -0.019906068220734596, -0.007738354150205851, 0.03281201049685478, -0.01235878560692072, 0.021382521837949753, 0.024335429072380066, 0.004520553629845381, -0.02245946414768696, -0.014816646464169025, -0.004750706721097231, 0.0005802679806947708, 0.050859484821558, 0.06892433017492294, 0.00011636571434792131, 0.03065812587738037, 0.00349789229221642, -0.028747420758008957, 0.01976710930466652, -0.022094694897532463, -0.04273030534386635, -0.014964291825890541, -0.019280746579170227, -0.029077451676130295, 0.019697628915309906, 0.03870045393705368, 0.030831824988126755, 0.04026375710964203, -0.0007501686923205853, 0.022893715649843216, -0.03420161455869675, -0.07073081284761429, 0.03178717941045761, 0.04599587246775627, -0.018360134214162827, -0.020149249583482742, 0.061281509697437286, 0.008037987165153027, -0.04158388078212738, -0.042243942618370056, -0.012115604244172573, -0.006683123763650656, 0.012827776372432709, -0.07260677963495255, -0.03366314247250557, -0.03807513415813446, -0.042243942618370056, -0.06621459871530533, -0.06909803301095963, -0.027965769171714783, -0.009614318609237671, 0.04700333625078201, -0.06697888672351837, -0.0127148712053895, 0.014530040323734283, 0.09206122905015945, 0.08949045836925507, -0.027705218642950058, -0.002494772430509329, -0.04207024350762367, 0.014495300129055977, -0.01008330937474966, -0.011585818603634834, 0.00029936182545498013, 0.0035673724487423897, 0.050164684653282166, -0.04002057760953903, -0.011716093868017197, -0.0700012743473053, 0.05968346446752548, -0.03883941471576691, 0.023796958848834038, 0.006327038165181875, -0.029615921899676323, -0.003057127585634589, 0.0017934568459168077, 0.0028660569805651903, -0.06499870121479034, -0.007265020161867142, 0.0291121918708086, -0.009553523734211922, 0.01995817944407463, 0.01995817944407463, -0.030692866072058678, -0.06624934077262878, 0.032777272164821625, 0.043077707290649414, -0.05857178196310997, 0.007425693329423666, -0.009405878372490406, 0.015198787674307823, 0.04085433855652809, 0.025134451687335968, 0.018811756744980812, -0.06253215670585632, 0.0036846203729510307, 0.00303758610971272, 0.041931282728910446, -0.03685922920703888, -0.009119272232055664, 0.005992664489895105, 0.03727611154317856, -0.006296640262007713, -0.043494585901498795, 0.040715381503105164, 0.05103318393230438, 0.02060087025165558, -0.004980859812349081, 0.01630178466439247, 0.04054167866706848, -0.004388106986880302, 0.013453098013997078, -0.030137022957205772, 0.06218475103378296, -0.009562208317220211, -0.026610905304551125, 0.016432059928774834, 0.03849201276898384, -0.028434759005904198, 0.028591090813279152, -0.013887348584830761, 0.020409800112247467, 0.037623513489961624, 0.02348429709672928, 0.0314745157957077, 0.042660824954509735, 0.009405878372490406, -0.0216257032006979, 0.021486742421984673, -0.03284674882888794, -0.03057127445936203, -0.040819600224494934, 0.017465578392148018, 0.057494841516017914, 0.010691260918974876, -0.008216029964387417, 0.01820380426943302, 0.05158902704715729, 0.06249741464853287 ]
4,673
optbinning.binning.piecewise.continuous_binning
fit_transform
Fit the optimal piecewise binning according to the given training data, then transform it. Parameters ---------- x : array-like, shape = (n_samples,) Training vector, where n_samples is the number of samples. y : array-like, shape = (n_samples,) Target vector relative to x. metric_special : float or str (default=0) The metric value to transform special codes in the input vector. Supported metrics are "empirical" to use the empirical mean and any numerical value. metric_missing : float or str (default=0) The metric value to transform missing values in the input vector. Supported metrics are "empirical" to use the empirical mean and any numerical value. lb : float or None (default=None) Avoid values below the lower bound lb. ub : float or None (default=None) Avoid values above the upper bound ub. check_input : bool (default=False) Whether to check input arrays. Returns ------- x_new : numpy array, shape = (n_samples,) Transformed array.
def fit_transform(self, x, y, metric_special=0, metric_missing=0, lb=None, ub=None, check_input=False): """Fit the optimal piecewise binning according to the given training data, then transform it. Parameters ---------- x : array-like, shape = (n_samples,) Training vector, where n_samples is the number of samples. y : array-like, shape = (n_samples,) Target vector relative to x. metric_special : float or str (default=0) The metric value to transform special codes in the input vector. Supported metrics are "empirical" to use the empirical mean and any numerical value. metric_missing : float or str (default=0) The metric value to transform missing values in the input vector. Supported metrics are "empirical" to use the empirical mean and any numerical value. lb : float or None (default=None) Avoid values below the lower bound lb. ub : float or None (default=None) Avoid values above the upper bound ub. check_input : bool (default=False) Whether to check input arrays. Returns ------- x_new : numpy array, shape = (n_samples,) Transformed array. """ return self.fit(x, y, check_input).transform( x, metric_special, metric_missing, lb, ub, check_input)
(self, x, y, metric_special=0, metric_missing=0, lb=None, ub=None, check_input=False)
[ -0.01246568001806736, -0.02806558832526207, 0.000860354513861239, 0.029490238055586815, -0.021903980523347855, -0.04861615225672722, -0.027121758088469505, -0.008668099530041218, -0.010951990261673927, -0.0028248121961951256, -0.0015982782933861017, -0.020069744437932968, 0.03591896593570709, -0.018609479069709778, -0.054136667400598526, 0.02979297563433647, -0.011655410751700401, -0.03814498335123062, -0.002904948778450489, 0.0212450809776783, 0.016445793211460114, -0.02519848197698593, 0.03850114345550537, 0.08106254041194916, -0.013738960027694702, 0.018342358991503716, -0.012608145363628864, -0.019446460530161858, -0.027745041996240616, -0.039035387337207794, -0.033318981528282166, -0.018894409760832787, 0.023168357089161873, -0.03981894254684448, 0.03768197074532509, -0.05032573267817497, 0.011236920021474361, -0.009509533643722534, 0.03456554934382439, -0.008472210727632046, -0.017505377531051636, -0.04053127020597458, 0.003570527071133256, 0.03949839994311333, 0.052462704479694366, 0.04345180094242096, -0.03029160387814045, 0.10257474333047867, 0.0035081985406577587, 0.026908060535788536, -0.03209022432565689, -0.05452844873070717, 0.054136667400598526, 0.031787484884262085, 0.008018103428184986, 0.04135044291615486, 0.024824511259794235, 0.02765600197017193, 0.04566000774502754, -0.011975957080721855, 0.01775469072163105, 0.05876677855849266, -0.02646285854279995, -0.017558801919221878, 0.04302440583705902, -0.009981447830796242, -0.06767083704471588, -0.017834827303886414, -0.0009493951220065355, 0.07486531138420105, 0.02220671810209751, -0.0016850928077474236, 0.02213548682630062, 0.03928470239043236, -0.017567705363035202, 0.04352303221821785, -0.03718334436416626, -0.010310898534953594, -0.008080432191491127, 0.007670845370739698, 0.07807077467441559, 0.03953401371836662, 0.0036328553687781096, -0.016614971682429314, -0.0584818497300148, -0.032624464482069016, 0.03502856194972992, 0.007439339999109507, 0.020069744437932968, -0.00458113756030798, -0.006486605852842331, 0.013943754136562347, 0.03328336775302887, 0.0403888039290905, 0.06724344193935394, 0.00806262344121933, -0.07052013278007507, 0.057911988347768784, -0.033176518976688385, -0.040780581533908844, 0.0036506634205579758, 0.07272834330797195, -0.023934105411171913, 0.07714474946260452, 0.04729835316538811, 0.03162721171975136, 0.01106774341315031, -0.025803958997130394, -0.03789566829800606, 0.014317723922431469, -0.02277657948434353, 0.008436594158411026, -0.11062400788068771, -0.0149677200242877, -0.056095562875270844, -0.006700302939862013, -0.0070653692819178104, 0.0076975575648248196, -0.043416183441877365, 0.015893742442131042, 0.012928691692650318, -0.0170601736754179, -0.009509533643722534, -0.06635303795337677, 0.00787118636071682, -0.03739704191684723, 0.07372559607028961, 0.047868210822343826, 0.013347181491553783, -0.022295759990811348, -0.03070119023323059, -0.03119981661438942, -0.028439559042453766, 0.049898337572813034, -0.03647102043032646, -0.06147361174225807, 0.013267045840620995, 0.029686126857995987, 0.002668991219252348, -0.020443715155124664, 0.06147361174225807, -0.00017585513705853373, 0.04712027311325073, 0.03356829658150673, 0.07885432988405228, 0.012376639991998672, 0.03493952006101608, 0.029703935608267784, 0.00984788779169321, -0.008619127795100212, -0.047868210822343826, 0.012572528794407845, 0.028706680983304977, -0.06396675109863281, 0.012795130722224712, 0.027940932661294937, 0.014397860504686832, -0.022295759990811348, 0.0028648804873228073, 0.02208206243813038, 0.019998513162136078, -0.01246568001806736, -0.023506712168455124, 0.03885730728507042, -0.0035015204921364784, 0.05509830638766289, -0.009536245837807655, 0.02153000980615616, 0.03810936585068703, -0.0116643151268363, 0.0024530678056180477, -0.05677226930856705, -0.04797505959868431, 0.034084729850292206, 0.07956665754318237, 0.04302440583705902, 0.0013534167082980275, -0.007247902452945709, 0.020069744437932968, 0.06147361174225807, 0.0016138603677973151, 0.009794463403522968, 0.019054682925343513, -0.08277211338281631, -0.0612599141895771, -0.008966385386884212, 0.011584178544580936, 0.028172437101602554, -0.05673665180802345, -0.01885879412293434, 0.04142167419195175, 0.00042099496931768954, 0.0023106029257178307, 0.008855084888637066, -0.02806558832526207, 0.024771086871623993, -0.05036134645342827, 0.03771758824586868, 0.00877049658447504, 0.011352673172950745, -0.0128841707482934, -0.03842991217970848, 0.07978035509586334, 0.029686126857995987, -0.04950655996799469, -0.020016320049762726, -0.03800251707434654, 0.04088743031024933, -0.01901906728744507, -0.042454544454813004, 0.09858572483062744, -0.005823253653943539, -0.08697482943534851, 0.020301250740885735, 0.021779324859380722, 0.05203530937433243, -0.008659196086227894, -0.03194775804877281, -0.0008631370728835464, -0.0012265339028090239, 0.038892921060323715, -0.04241893067955971, 0.006112635135650635, 0.033176518976688385, 0.058375000953674316, 0.04199153557419777, 0.08042144775390625, -0.04715588688850403, 0.05809006839990616, -0.0487230010330677, 0.014406764879822731, -0.025394370779395103, -0.025875190272927284, 0.0295970868319273, 0.018342358991503716, -0.035420339554548264, 0.027602577582001686, -0.008570155128836632, -0.02591080591082573, 0.006971877068281174, -0.023702600970864296, -0.02325739711523056, -0.030255986377596855, -0.015101280994713306, 0.0017574382945895195, 0.0013311565853655338, 0.004567781463265419, 0.028742296621203423, 0.009420492686331272, 0.006143799517303705, -0.02074645273387432, 0.0032633370719850063, -0.030238179489970207, -0.03543814644217491, 0.02201082929968834, -0.012804034166038036, -0.034725822508335114, -0.06439414620399475, -0.0044854190200567245, 0.018645096570253372, 0.00458113756030798, 0.010818429291248322, -0.016614971682429314, 0.02040809951722622, -0.05068189278244972, -0.029703935608267784, -0.03928470239043236, 0.04405727609992027, 0.05958595126867294, 0.020835494622588158, -0.110054150223732, -0.02005193755030632, -0.01333827804774046, 0.01417525950819254, -0.0024953619576990604, 0.07621873170137405, 0.022687537595629692, 0.00477257464081049, 0.08191733062267303, -0.020728645846247673, 0.03050529956817627, 0.004122578538954258, 0.005378050729632378, -0.027620386332273483, -0.02938338927924633, -0.012474584393203259, -0.02694367803633213, 0.018645096570253372, -0.029846400022506714, -0.06314757466316223, -0.09359945356845856, 0.016045112162828445, 0.024610813707113266, 0.011771163903176785, 0.028706680983304977, 0.003334569511935115, -0.06663796305656433, -0.03486828878521919, 0.07027082145214081, -0.039106618613004684, 0.0022260143887251616, 0.021636858582496643, -0.07778584212064743, -0.016837572678923607, 0.010355418547987938, -0.01586703024804592, 0.010088296607136726, -0.050183266401290894, -0.03914223611354828, -0.0007446017698384821, 0.04915039613842964, 0.010293090716004372, 0.030131330713629723, -0.04060250148177147, 0.00343696610070765, -0.06564071029424667, 0.04412850737571716, 0.08369813859462738, 0.009669805876910686, 0.028991609811782837, 0.018217701464891434, -0.013471839018166065, 0.016570450738072395, -0.0038688129279762506, -0.033942267298698425, 0.02938338927924633, 0.041670989245176315, -0.005324626341462135, -0.030594341456890106, -0.06528455018997192, 0.054421599954366684, 0.003828744636848569, 0.04309563711285591, -0.019820431247353554, -0.09559395909309387, -0.004521035123616457, -0.015751278027892113, -0.009171179495751858, 0.001212064758874476, -0.000196584893274121, -0.06414482742547989, 0.0800652801990509, -0.015964975580573082, 0.0014235362177714705, -0.010132817551493645, -0.02275877073407173, -0.06218593567609787, 0.0028047780506312847, 0.0012654891470447183, 0.011014319024980068, -0.006157155614346266, -0.043914809823036194, 0.04569562152028084, -0.035171028226614, 0.03493952006101608, -0.016908803954720497, 0.021547818556427956, -0.007822214625775814, 0.014353340491652489, -0.028439559042453766, 0.06923794746398926, -0.060476358979940414, -0.042917557060718536, -0.0011135636596009135, 0.009197890758514404, -0.030594341456890106, 0.005150997079908848, 0.006419825367629528, 0.006286264397203922, 0.03746827319264412, 0.032624464482069016, -0.07066259533166885, -0.0835556760430336, 0.02680121175944805, 0.020710837095975876, 0.007323587313294411, -0.03935593366622925, 0.0188053697347641, -0.023934105411171913, 0.02562587708234787, 0.056914735585451126, 0.0368984118103981, -0.06218593567609787, -0.0047414107248187065, 0.04192030057311058, 0.0030629956163465977, 0.032001182436943054, 0.002793648047372699, 0.03014913760125637, -0.050254497677087784, 0.0128841707482934, -0.00013022184430155903, 0.020710837095975876, -0.017460856586694717, -0.030255986377596855, -0.04117236286401749, 0.05940787121653557, 0.024040954187512398, -0.02514505758881569, -0.059016093611717224, -0.021547818556427956, 0.010720484890043736, -0.01086295023560524, -0.020710837095975876, -0.0208889190107584, -0.01653483510017395, -0.021209465339779854, -0.02437930926680565, -0.028991609811782837, 0.02562587708234787, -0.018217701464891434, 0.05381612107157707, 0.041528522968292236, -0.001880982075817883, -0.057484593242406845, 0.024699855595827103, -0.006513318046927452, 0.001794167561456561, -0.035473763942718506, 0.034921713173389435, 0.005645172204822302, -0.046051785349845886, -0.017069077119231224, -0.0009866808541119099, -0.017532089725136757, -0.07408175617456436, -0.02325739711523056, -0.10179118067026138, 0.01820879802107811, 0.0031075160950422287, -0.028884761035442352, -0.09794463217258453, -0.07262149453163147, -0.014851967804133892, -0.015519771724939346, -0.00747050391510129, 0.0019344064639881253, 0.02096015028655529, -0.0027513536624610424, 0.01825331710278988, -0.03447651118040085, -0.034440893679857254, 0.052462704479694366, 0.016241000965237617, -0.03419157862663269, -0.01172664389014244, -0.06934479624032974, 0.014647174626588821, -0.08818578720092773, 0.006166059523820877, 0.062684565782547, 0.005533871706575155, 0.02388068102300167, -0.02680121175944805, 0.01837797462940216, -0.031092967838048935, 0.01746976003050804, -0.07329820096492767, 0.02500259317457676, 0.024076571688055992, 0.005489351227879524, -0.0013356085401028395, -0.006317428778856993, 0.0022516134195029736, 0.00010017064778367057, 0.0014847515849396586, -0.03488609567284584, -0.008939673192799091, 0.0529257170855999, 0.01852043904364109, 0.019535502418875694, -0.01586703024804592, 0.04053127020597458, -0.006998589262366295, 0.056522954255342484, 0.045375075191259384, -0.03682718053460121, 0.03974771127104759, 0.037361424416303635, -0.029151882976293564, 0.014780735597014427, -0.021262889727950096, 0.07123246043920517, 0.0032254948746412992, -0.02589299902319908, 0.006339688785374165, -0.011236920021474361, -0.0633612722158432, 0.012973211705684662, 0.04505452886223793, 0.021334121003746986, 0.06289826333522797, 0.026338201016187668, -0.007225642446428537, -0.06414482742547989, 0.008592415601015091, 0.012305406853556633, -0.010186241939663887, 0.011325960978865623, -0.015350595116615295, 0.029650511220097542, 0.001101877074688673, -0.024397116154432297, -0.019108107313513756, 0.047939445823431015, 0.011975957080721855, -0.013801288791000843, 0.017638936638832092, -0.04630109667778015, 0.029561471194028854, -0.06329003721475601, -0.023008083924651146, 0.04590931907296181, -0.005159900989383459, 0.0033479256089776754, -0.021850556135177612, -0.02395191416144371, 0.01992728002369404, 0.012625953182578087, -0.024877935647964478, 0.020301250740885735, 0.014629365876317024, 0.04359426349401474, -0.04776136204600334, 0.05103805661201477, 0.017906058579683304, -0.07155300676822662, -0.029347773641347885, -0.011219112202525139, 0.035135410726070404, 0.0012031607329845428, -0.028261477127671242, 0.024628622457385063, 0.02526971511542797, 0.02596423029899597, 0.07265710830688477, -0.0014591524377465248, -0.04135044291615486, 0.021957404911518097, -0.022260142490267754, -0.028314901515841484, 0.01294649951159954, 0.01417525950819254, 0.015252649784088135, 0.006437633652240038, 0.06695850938558578, -0.01832455024123192, 0.028314901515841484, 0.013641015626490116, 0.018983449786901474, -0.08013651520013809, -0.016045112162828445, -0.0022660826798528433, 0.08896934241056442, 0.06678043305873871, -0.050112035125494, 0.004897231701761484, 0.05958595126867294, -0.04726273566484451, 0.02770942635834217, -0.05645172297954559, 0.03953401371836662, 0.05317503213882446, -0.014424572698771954, -0.01632113754749298, 0.0020668543875217438, -0.039783328771591187, 0.027691617608070374, 0.031929951161146164, -0.033318981528282166, 0.045232612639665604, 0.06763521581888199, -0.04252577945590019, -0.010916374623775482, -0.03253542631864548, 0.02680121175944805, -0.005124284885823727, -0.05256955325603485, -0.052605170756578445, -0.02840394340455532, -0.043273717164993286, -0.006735919509083033, -0.02290123514831066, -0.021227272227406502, 0.017336199060082436, -0.058802396059036255, -0.023203972727060318, -0.000571529206354171, -0.031003927811980247, -0.002046820241957903, 0.006535578053444624, 0.020514948293566704, -0.007661941461265087, 0.03217926248908043, 0.0327313132584095, -0.042240846902132034, -0.05192846059799194, -0.009491724893450737, 0.06585440784692764, -0.060191426426172256, 0.04858053848147392, 0.017567705363035202, 0.022456033155322075, 0.02153000980615616, 0.028457367792725563, 0.0016416856087744236, -0.06852562725543976, -0.026160120964050293, -0.019036874175071716, -0.01964235119521618, -0.0038042585365474224, 0.019820431247353554, 0.045303843915462494, -0.008423238061368465, -0.005987978540360928, 0.021049192175269127, -0.02555464394390583, -0.03417377173900604, 0.03438746929168701, -0.02876010537147522, 0.010301994159817696, -0.04380796104669571, -0.04476960003376007, 0.019410844892263412, -0.03383541852235794, -0.021334121003746986, 0.024005338549613953, 0.02060398831963539, -0.0030340575613081455, 0.007808858063071966, -0.04142167419195175, -0.04402165859937668, 0.0494353249669075, -0.009723230265080929, 0.046265482902526855, 0.017309486865997314, -0.03438746929168701, 0.041670989245176315, -0.005747568793594837, -0.008507826365530491, 0.007336943410336971, 0.054421599954366684, 0.07515024393796921, -0.023435479030013084, 0.010524596087634563, -0.062684565782547, -0.008409881964325905, 0.03746827319264412, 0.006735919509083033, -0.011940340511500835, -0.0036328553687781096, 0.0515010692179203, -0.014825255610048771, 0.01333827804774046, 0.06350373476743698, 0.016766339540481567, 0.006366400979459286, 0.021262889727950096, 0.03486828878521919, -0.02589299902319908, -0.054421599954366684, 0.057911988347768784, 0.05670103803277016, 0.013097868300974369, -0.005783185362815857, 0.015875933691859245, -0.00436744000762701, -0.04120797663927078, -0.05242709070444107, -0.015964975580573082, 0.009901312179863453, -0.01438005268573761, -0.04352303221821785, -0.02318616583943367, -0.025875190272927284, -0.049542173743247986, 0.0035794309806078672, -0.04430658742785454, -0.04744081571698189, 0.010524596087634563, 0.024272460490465164, -0.026338201016187668, -0.031003927811980247, 0.04758328199386597, 0.05969280004501343, 0.014299916103482246, -0.027887508273124695, -0.036310747265815735, -0.0515366829931736, 0.0116643151268363, 0.0710187628865242, -0.0027290936559438705, -0.0038421007338911295, -0.01957111805677414, 0.023435479030013084, 0.02450396493077278, -0.023577943444252014, -0.03924908488988876, 0.025323139503598213, -0.03292720392346382, 0.037005260586738586, -0.01832455024123192, -0.04199153557419777, -0.004799286834895611, 0.028492983430624008, 0.00015442974108736962, -0.05958595126867294, -0.016089631244540215, 0.030736805871129036, -0.035171028226614, 0.03914223611354828, 0.013178004883229733, -0.020835494622588158, -0.03347925469279289, 0.021761516109108925, 0.003287823172286153, -0.0605832077562809, 0.03778881952166557, 0.029490238055586815, 0.027940932661294937, 0.0466572605073452, -0.056095562875270844, 0.029294349253177643, -0.026071079075336456, -0.024949168786406517, 0.0431668683886528, 0.049470942467451096, -0.048224374651908875, 0.001691770856268704, -0.008730428293347359, 0.02988201566040516, 0.030398450791835785, -0.025501219555735588, 0.065462626516819, 0.0431668683886528, 0.027869699522852898, -0.02988201566040516, -0.016018399968743324, 0.027406688779592514, 0.004429768305271864, -0.0020334641449153423, -0.0016962229274213314, 0.0737968236207962, -0.031288858503103256, -0.031929951161146164, 0.023524519056081772, 0.013035539537668228, -0.0017351781716570258, 0.004643465857952833, -0.0071098897606134415, -0.011788971722126007, 0.025162866339087486, -0.010034872218966484, 0.006954068783670664, 0.07550640404224396, 0.0403888039290905, -0.007924610748887062, 0.06314757466316223, -0.0012487940257415175, -0.005747568793594837, -0.028492983430624008, 0.004897231701761484, 0.011023223400115967, 0.026783404871821404, 0.011780068278312683, 0.0257683414965868, 0.08868440985679626, 0.09381315112113953 ]
4,676
optbinning.binning.piecewise.base
information
Print overview information about the options settings, problem statistics, and the solution of the computation. Parameters ---------- print_level : int (default=1) Level of details.
def information(self, print_level=1): """Print overview information about the options settings, problem statistics, and the solution of the computation. Parameters ---------- print_level : int (default=1) Level of details. """ self._check_is_fitted() if not isinstance(print_level, numbers.Integral) or print_level < 0: raise ValueError("print_level must be an integer >= 0; got {}." .format(print_level)) if self._optimizer is not None: solver = self._optimizer time_solver = self._time_solver else: solver = None time_solver = 0 dict_user_options = self.get_params() if self._problem_type == "regression": dict_user_options["estimator"] = None print_binning_information(print_level, self.name, self._status, self.solver, solver, self._time_total, self._time_preprocessing, self._time_estimator, self._time_prebinning, time_solver, self._time_postprocessing, self._n_bins, dict_user_options)
(self, print_level=1)
[ 0.03437815234065056, 0.010092751123011112, 0.008554167114198208, 0.0058089387603104115, 0.04209350049495697, -0.04808635264635086, -0.04525141045451164, -0.11088568717241287, -0.04065808653831482, -0.020490527153015137, -0.040622200816869736, -0.028457071632146835, -0.017888840287923813, -0.03685424104332924, -0.042237039655447006, 0.027398454025387764, -0.010828400030732155, -0.06785917282104492, -0.031130529940128326, 0.040048036724328995, 0.025532416999340057, 0.00382403121329844, 0.019144827499985695, 0.03192000836133957, -0.009572413749992847, 0.0037231037858873606, 0.005714739672839642, -0.06997640430927277, -0.01687507890164852, -0.0068451277911663055, -0.09086167067289352, -0.012174100615084171, -0.04891171306371689, 0.023325469344854355, -0.022177137434482574, 0.0030480108689516783, 0.019413966685533524, 0.018983343616127968, -0.03154321014881134, 0.07399556785821915, -0.04019157588481903, -0.01549349445849657, -0.0069303554482758045, -0.020490527153015137, -0.024760883301496506, -0.042237039655447006, 0.021441489458084106, 0.03828965499997139, -0.02319987118244171, -0.07492858171463013, 0.03466523438692093, -0.015789547935128212, 0.0031422097235918045, -0.031040815636515617, 0.0034203212708234787, -0.01007480826228857, 0.05328972637653351, -0.05659117549657822, 0.07094530761241913, -0.06358882039785385, 0.017260847613215446, 0.0154845230281353, -0.04718921706080437, 0.0013950425200164318, -0.01882185973227024, -0.02034698612987995, -0.0051450603641569614, 0.0014432633761316538, 0.0121651291847229, 0.01966516487300396, 0.03498820215463638, -0.03382192924618721, -0.017924726009368896, 0.019898418337106705, -0.025406818836927414, -0.04837343469262123, -0.06007205322384834, -0.05831367149949074, 0.01703656278550625, -0.005737168248742819, -0.008446510881185532, 0.013600542210042477, 0.0037477747537195683, -0.07923482358455658, -0.03622624650597572, -0.07485681027173996, 0.035975050181150436, -0.04625619947910309, 0.06272757053375244, 0.017180105671286583, -0.05917492136359215, 0.023522838950157166, 0.028869753703475, 0.06071798875927925, -0.028833867982029915, -0.008293998427689075, -0.035382941365242004, -0.04230881109833717, -0.05113660544157028, -0.029120950028300285, -0.055909354239702225, -0.01901922933757305, 0.031040815636515617, 0.042811207473278046, -0.036638930439949036, -0.04238058254122734, -0.012021588161587715, -0.009464757516980171, 0.029677173122763634, 0.010810458101332188, -0.015654977411031723, 0.045287296175956726, -0.07700993120670319, -0.053756233304739, 0.01851683296263218, 0.032260917127132416, -0.04525141045451164, -0.032260917127132416, -0.047835152596235275, -0.0019624794367700815, -0.02497619390487671, -0.00878293626010418, -0.00010380113963037729, -0.04693802073597908, -0.03674658387899399, 0.031184358522295952, -0.05275144428014755, 0.011878046207129955, 0.01672256737947464, -0.0780864953994751, 0.07722524553537369, -0.041949957609176636, -0.025980982929468155, 0.07169890403747559, 0.06441418081521988, -0.05433040112257004, -0.01900128647685051, -0.022751303389668465, 0.027613766491413116, 0.05540696159005165, 0.00419634161517024, -0.03132789954543114, -0.057344768196344376, -0.03563413769006729, 0.02917477861046791, -0.05038301274180412, 0.03050253540277481, -0.057237111032009125, -0.026106582954525948, -0.06398355215787888, 0.027954677119851112, 0.0007463028887286782, -0.00627096276730299, -0.0648089200258255, -0.022661590948700905, -0.019916361197829247, 0.048122238367795944, -0.053648579865694046, 0.004660608246922493, -0.04876817390322685, -0.05738065391778946, 0.006921384483575821, 0.032260917127132416, -0.010083779692649841, -0.007840946316719055, 0.03828965499997139, -0.004983576014637947, -0.022482164204120636, 0.01871420256793499, 0.015035956166684628, -0.008262598887085915, -0.04747629910707474, -0.037105437368154526, 0.035975050181150436, 0.027721421793103218, 0.04543083533644676, 0.027990562841296196, 0.026106582954525948, 0.016973763704299927, -0.008733593858778477, 0.03771548718214035, -0.02650132216513157, -0.08246450126171112, 0.000546129944268614, -0.017305703833699226, -0.03315805271267891, 0.04169876128435135, -0.026286009699106216, -0.03360661864280701, 0.0163726843893528, -0.014533561654388905, -0.0032476228661835194, 0.051351916044950485, -0.0017348317196592689, 0.046902135014534, 0.003023339668288827, 0.0040931710973382, -0.03933032974600792, 0.08332575112581253, -0.002857369836419821, 0.04392365366220474, -0.0030278253834694624, -0.00546354241669178, 0.034719064831733704, -0.024061119183897972, 0.05038301274180412, 0.0310767013579607, 0.020203445106744766, -0.01648034155368805, 0.03986860811710358, -0.010783543810248375, -0.035777680575847626, 0.009330187924206257, 0.019521623849868774, 0.030897274613380432, -0.00501049030572176, 0.025963041931390762, -0.01220998540520668, -0.015942061319947243, 0.02603481151163578, 0.05483279377222061, -0.0289774090051651, 0.036926012486219406, 0.041268136352300644, -0.027488168329000473, 0.020203445106744766, 0.0415911041200161, 0.009913324378430843, 0.036154475063085556, -0.03493437543511391, 0.01197673100978136, -0.01957545056939125, -0.07643576711416245, 0.013753055594861507, -0.03954564034938812, 0.025711843743920326, -0.054294515401124954, 0.040909282863140106, 0.03574179485440254, -0.03868439421057701, -0.020364928990602493, 0.014946242794394493, -0.011608906090259552, -0.021728571504354477, -0.049629420042037964, -0.09071812778711319, 0.018301522359251976, 0.0061902208253741264, 0.0030367965810000896, -0.03832554072141647, -0.005934537388384342, -0.06552662700414658, -0.03832554072141647, 0.011465365067124367, -0.01045160461217165, -0.022876901552081108, -0.0009358223178423941, -0.022482164204120636, 0.0030771675519645214, -0.004732378758490086, -0.02052641287446022, 0.042703550308942795, -0.030287224799394608, 0.02614246867597103, -0.00429726904258132, -0.01993430405855179, -0.02725491300225258, -0.04966530576348305, 0.011250053532421589, -0.012183072045445442, 0.08799084275960922, 0.06211751699447632, -0.05992851406335831, 0.040909282863140106, -0.046112656593322754, 0.023594608530402184, 0.016336798667907715, -0.0033395790960639715, -0.056124668568372726, 0.031399670988321304, 0.009859496727585793, -0.0062799337320029736, -0.02196182683110237, -0.018319465219974518, -0.04923468083143234, -0.022195080295205116, -0.02052641287446022, 0.047835152596235275, 0.02165680006146431, 0.02059818245470524, -0.0044946386478841305, 0.046040888875722885, 0.022948672994971275, -0.01196775957942009, 0.04277532175183296, 0.006284419447183609, 0.025819499045610428, -0.0006156578310765326, 0.01278415136039257, 0.008495853282511234, 0.026106582954525948, -0.07126827538013458, 0.00503291841596365, -0.035490598529577255, 0.04040689021348953, 0.008993762545287609, 0.10478518158197403, -0.03477289155125618, 0.040514543652534485, 0.011223139241337776, -0.016758453100919724, 0.024186717346310616, 0.07571806013584137, 0.0807420089840889, -0.03145349770784378, -0.025424761697649956, -0.02641160786151886, -0.002390860579907894, -0.021710628643631935, 0.07794295251369476, -0.05318206921219826, 0.029623346403241158, 0.09523968398571014, -0.05171076953411102, -0.024814710021018982, -0.08189033716917038, 0.005669882986694574, 0.000640328973531723, 0.04582557454705238, -0.004436324816197157, -0.0628352239727974, -0.0325121134519577, 0.0754309743642807, -0.008868163451552391, 0.016354741528630257, 0.042595893144607544, -0.007607691455632448, 0.06035913527011871, -0.011079597286880016, 0.010469547472894192, 0.037105437368154526, 0.018373291939496994, -0.016695652157068253, 0.03498820215463638, 0.007329579908400774, -0.024150831624865532, 0.012012616731226444, 0.001346821547485888, 0.0168122798204422, 0.03236857429146767, -0.05576581507921219, 0.024384086951613426, -0.03523940220475197, 0.016139430925250053, -0.017224961891770363, 0.00008095227531157434, 0.0446772426366806, -0.024186717346310616, 0.014102937653660774, 0.03147143870592117, 0.010855314321815968, 0.012748265638947487, -0.0418064184486866, 0.03190206363797188, -0.005436628591269255, -0.06380412727594376, 0.034162841737270355, 0.01794266887009144, 0.07090942561626434, -0.021531201899051666, -0.004624722991138697, -0.06078976020216942, 0.0063517047092318535, -0.02241039276123047, -0.02926449291408062, 0.06538308411836624, -0.007369950879365206, 0.025119734928011894, -0.008482396602630615, -0.0621534027159214, 0.06516776978969574, 0.013474944047629833, -0.01549349445849657, -0.024455856531858444, -0.02831353060901165, -0.03183029219508171, -0.026537206023931503, 0.04119636490941048, 0.0188039168715477, 0.016803309321403503, -0.00883676391094923, -0.01955750770866871, -0.04263177886605263, 0.022823074832558632, 0.0035952620673924685, 0.02072378247976303, 0.07557451725006104, 0.04521552473306656, -0.08476116508245468, -0.011402565985918045, -0.03523940220475197, -0.05910314992070198, -0.03897147625684738, -0.0035279772710055113, -0.014937271364033222, -0.05454571172595024, 0.0002844193368218839, 0.02032904326915741, 0.03224297612905502, -0.0035548910964280367, 0.020669953897595406, -0.012407355010509491, -0.02946186065673828, 0.05939023196697235, -0.02804439142346382, 0.01586131937801838, 0.015376866795122623, 0.019216597080230713, 0.02307427115738392, 0.009348129853606224, 0.06197397783398628, -0.007423778995871544, 0.015735719352960587, 0.09078989923000336, 0.030843447893857956, 0.025909213349223137, -0.0636964738368988, 0.012846950441598892, 0.032924797385931015, 0.01297254953533411, -0.054689254611730576, -0.01401322428137064, -0.026770461350679398, -0.007073896937072277, 0.0013782212045043707, -0.017422331497073174, -0.004880405962467194, 0.039186786860227585, 0.010514403693377972, 0.024402029812335968, 0.035598255693912506, -0.02099292166531086, 0.03563413769006729, -0.01363642793148756, -0.011160340160131454, 0.02574772946536541, 0.010900171473622322, -0.03541882708668709, -0.07779940962791443, 0.0015699834330007434, 0.019647222012281418, 0.010783543810248375, -0.0008623694884590805, -0.026752518489956856, -0.022733360528945923, -0.01448870450258255, -0.015089783817529678, -0.0028282131534069777, -0.00036249798722565174, 0.0070021264255046844, -0.015547322109341621, -0.01178833283483982, -0.0038756164722144604, 0.04220115765929222, 0.010586174204945564, -0.0528591014444828, 0.0639117881655693, 0.029713058844208717, -0.04550260677933693, -0.023217812180519104, 0.011178282089531422, 0.010846342891454697, -0.050311241298913956, -0.011214167810976505, -0.018678318709135056, 0.04151933640241623, -0.01946779526770115, 0.06330173462629318, 0.0018806159496307373, -0.04055042937397957, -0.010326005518436432, -0.0009133939747698605, 0.011276966892182827, 0.035975050181150436, 0.040909282863140106, -0.04349302873015404, 0.00040623321547172964, 0.004243440926074982, -0.008738079108297825, -0.020257271826267242, 0.003476392012089491, -0.003193794982507825, 0.0144348768517375, -0.03753606230020523, -0.0013412145199254155, 0.01818489469587803, -0.007132210768759251, 0.0013883139472454786, 0.007374436594545841, 0.0301975104957819, 0.027577880769968033, -0.014928299933671951, 0.0196831077337265, 0.013268603011965752, 0.028762096539139748, 0.028367359191179276, 0.03260182961821556, 0.02614246867597103, 0.00024404832220170647, 0.050203587859869, -0.03608270734548569, -0.04410307854413986, 0.009186645969748497, 0.01910894177854061, 0.01809518039226532, 0.04571791738271713, -0.060861531645059586, 0.009150761179625988, 0.039581526070833206, -0.016462398692965508, -0.007719832938164473, 0.016399599611759186, 0.0460050031542778, -0.030574306845664978, 0.026160409674048424, 0.020454641431570053, -0.01149227935820818, 0.0336245596408844, -0.007858889177441597, 0.06362470239400864, 0.039760954678058624, -0.01254192553460598, 0.028636498376727104, 0.021872112527489662, 0.030753733590245247, 0.044031307101249695, 0.04008392244577408, -0.04234469681978226, -0.020831437781453133, 0.0004866948875132948, 0.028349416330456734, 0.027864964678883553, 0.037392519414424896, -0.06197397783398628, 0.04952176660299301, -0.04230881109833717, 0.025586245581507683, 0.011689648032188416, 0.008226713165640831, -0.046112656593322754, 0.02709342911839485, 0.010415718890726566, 0.023217812180519104, 0.035670023411512375, 0.026052754372358322, 0.05935434624552727, 0.010559259913861752, 0.017072448506951332, 0.010864285752177238, -0.020741725340485573, -0.013483915477991104, -0.050131816416978836, 0.008347826078534126, 0.022266851738095284, -0.03854085132479668, 0.0065759881399571896, -0.013806883245706558, 0.08433054387569427, -0.03563413769006729, -0.020849380642175674, 0.03156115487217903, 0.02614246867597103, -0.03269154205918312, -0.022769246250391006, -0.02793673425912857, 0.022679531946778297, 0.058277785778045654, 0.06732089072465897, 0.016758453100919724, 0.08059846609830856, -0.02470705471932888, -0.0015520408051088452, -0.016318857669830322, 0.005324486643075943, -0.001629418577067554, 0.020203445106744766, -0.014273392967879772, -0.053828004747629166, 0.051926083862781525, 0.01918071322143078, -0.0127751799300313, -0.054868679493665695, -0.0016910964623093605, -0.0581701323390007, 0.00512711750343442, 0.010173493064939976, -0.05852898582816124, -0.06961755454540253, 0.06308642029762268, 0.013986309990286827, -0.07794295251369476, -0.012057472951710224, -0.02156708762049675, -0.004344368819147348, -0.03441403806209564, 0.02621423825621605, 0.03640567511320114, 0.038253769278526306, 0.003117538522928953, 0.0014926057774573565, -0.011187253519892693, -0.05921080708503723, -0.007486578542739153, -0.04388776794075966, -0.04173464700579643, -0.016157373785972595, 0.054868679493665695, 0.0037522604689002037, 0.038720279932022095, -0.006212648935616016, -0.00679578585550189, 0.07195010036230087, -0.007625633850693703, 0.032727427780628204, -0.026465436443686485, 0.016309885308146477, 0.010720744729042053, -0.07230895012617111, 0.02499413676559925, -0.023504896089434624, 0.006840642541646957, 0.03288891166448593, -0.04586146026849747, 0.008859192952513695, -0.015798520296812057, -0.04718921706080437, 0.01235352735966444, 0.04029923304915428, -0.03200972080230713, 0.002024157205596566, 0.025227392092347145, 0.041555218398571014, -0.0007597598596476018, 0.0035055489279329777, 0.029713058844208717, 0.054007433354854584, -0.018319465219974518, -0.015035956166684628, 0.09193823486566544, 0.003559376811608672, -0.07026349008083344, 0.03685424104332924, -0.04338537156581879, 0.05149545893073082, -0.009150761179625988, -0.007042497396469116, -0.002363946521654725, -0.0010059108026325703, -0.007235380820930004, 0.011196224950253963, -0.07349316775798798, -0.013241689652204514, 0.015323039144277573, -0.032171204686164856, 0.05006004497408867, 0.031399670988321304, -0.06531131267547607, 0.02745228260755539, 0.020669953897595406, -0.03299656882882118, 0.03448580950498581, -0.0008091022027656436, 0.018131066113710403, 0.017736326903104782, -0.028995351865887642, 0.07245249301195145, -0.024455856531858444, -0.002967268694192171, -0.026734575629234314, -0.027864964678883553, 0.12201014161109924, -0.0013389716623350978, -0.03154321014881134, -0.013914539478719234, 0.03961741179227829, -0.004256898071616888, -0.035670023411512375, -0.0012862650910392404, -0.010227320715785027, 0.024294372648000717, -0.08547887206077576, -0.02185416966676712, 0.029766887426376343, -0.0005455692880786955, 0.06541896611452103, -0.009419901296496391, -0.025478588417172432, -0.05637586489319801, 0.11023975163698196, -0.05027535557746887, 0.02680634707212448, -0.007181553170084953, -0.013421116396784782, 0.03647744655609131, -0.011949816718697548, 0.024760883301496506, -0.04381599649786949, -0.011985702440142632, 0.0297489445656538, -0.0210108645260334, 0.04015569016337395, 0.0692228153347969, 0.016040746122598648, -0.06778740137815475, -0.008276055566966534, 0.03484466299414635, -0.017691470682621002, 0.02784702181816101, -0.022159194573760033, 0.0005921080592088401, -0.011528164148330688, 0.0513160303235054, 0.011133425869047642, -0.051172491163015366, 0.031202299520373344, 0.11167516559362411, -0.015269210562109947, -0.06943812966346741, 0.014847557991743088, 0.02906712330877781, 0.0006302362307906151, -0.057344768196344376, -0.04058631509542465, -0.02156708762049675, -0.001866037491708994, 0.016040746122598648, 0.006122935563325882, 0.02782907895743847, 0.06796682626008987, -0.0019434152636677027, 0.03854085132479668, 0.042524125427007675, -0.007562834769487381, 0.02888769656419754, -0.010370862670242786, 0.0003846459439955652, 0.007522463798522949, 0.012129243463277817, 0.013044320046901703, -0.000017049040252459235, 0.04772749915719032, -0.021890055388212204, 0.0314176119863987, 0.007612177170813084, 0.04284709319472313, 0.00900273397564888, 0.018480949103832245, -0.03278125450015068, 0.046040888875722885, -0.0013255146332085133, 0.009958180598914623, -0.019916361197829247, 0.03523940220475197, 0.06710557639598846, -0.03850496560335159, 0.0017000677762553096, -0.05339737981557846, -0.015009041875600815 ]
4,677
sklearn.utils._metadata_requests
set_fit_request
Request metadata passed to the ``fit`` method. Note that this method is only relevant if ``enable_metadata_routing=True`` (see :func:`sklearn.set_config`). Please see :ref:`User Guide <metadata_routing>` on how the routing mechanism works. The options for each parameter are: - ``True``: metadata is requested, and passed to ``fit`` if provided. The request is ignored if metadata is not provided. - ``False``: metadata is not requested and the meta-estimator will not pass it to ``fit``. - ``None``: metadata is not requested, and the meta-estimator will raise an error if the user provides it. - ``str``: metadata should be passed to the meta-estimator with this given alias instead of the original name. The default (``sklearn.utils.metadata_routing.UNCHANGED``) retains the existing request. This allows you to change the request for some parameters and not others. .. versionadded:: 1.3 .. note:: This method is only relevant if this estimator is used as a sub-estimator of a meta-estimator, e.g. used inside a :class:`~sklearn.pipeline.Pipeline`. Otherwise it has no effect. Parameters ---------- check_input : str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED Metadata routing for ``check_input`` parameter in ``fit``. lb : str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED Metadata routing for ``lb`` parameter in ``fit``. ub : str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED Metadata routing for ``ub`` parameter in ``fit``. x : str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED Metadata routing for ``x`` parameter in ``fit``. Returns ------- self : object The updated object.
def __get__(self, instance, owner): # we would want to have a method which accepts only the expected args def func(**kw): """Updates the request for provided parameters This docstring is overwritten below. See REQUESTER_DOC for expected functionality """ if not _routing_enabled(): raise RuntimeError( "This method is only available when metadata routing is enabled." " You can enable it using" " sklearn.set_config(enable_metadata_routing=True)." ) if self.validate_keys and (set(kw) - set(self.keys)): raise TypeError( f"Unexpected args: {set(kw) - set(self.keys)}. Accepted arguments" f" are: {set(self.keys)}" ) requests = instance._get_metadata_request() method_metadata_request = getattr(requests, self.name) for prop, alias in kw.items(): if alias is not UNCHANGED: method_metadata_request.add_request(param=prop, alias=alias) instance._metadata_request = requests return instance # Now we set the relevant attributes of the function so that it seems # like a normal method to the end user, with known expected arguments. func.__name__ = f"set_{self.name}_request" params = [ inspect.Parameter( name="self", kind=inspect.Parameter.POSITIONAL_OR_KEYWORD, annotation=owner, ) ] params.extend( [ inspect.Parameter( k, inspect.Parameter.KEYWORD_ONLY, default=UNCHANGED, annotation=Optional[Union[bool, None, str]], ) for k in self.keys ] ) func.__signature__ = inspect.Signature( params, return_annotation=owner, ) doc = REQUESTER_DOC.format(method=self.name) for metadata in self.keys: doc += REQUESTER_DOC_PARAM.format(metadata=metadata, method=self.name) doc += REQUESTER_DOC_RETURN func.__doc__ = doc return func
(self: optbinning.binning.piecewise.continuous_binning.ContinuousOptimalPWBinning, *, check_input: Union[bool, NoneType, str] = '$UNCHANGED$', lb: Union[bool, NoneType, str] = '$UNCHANGED$', ub: Union[bool, NoneType, str] = '$UNCHANGED$', x: Union[bool, NoneType, str] = '$UNCHANGED$') -> optbinning.binning.piecewise.continuous_binning.ContinuousOptimalPWBinning
[ 0.04383368045091629, -0.05829270929098129, -0.019129673019051552, 0.004701561760157347, -0.002906074048951268, -0.01725570671260357, -0.011529171839356422, 0.010007168166339397, 0.05699900537729263, 0.010863294824957848, -0.02144121564924717, 0.006497049704194069, 0.05129149556159973, -0.005384084768593311, -0.01991921104490757, 0.03751736879348755, 0.029983455315232277, 0.023819344118237495, 0.030154680833220482, -0.0336933359503746, 0.019224798306822777, -0.04280633106827736, -0.02878487855195999, 0.014915627427399158, 0.00845662783831358, 0.0655222237110138, 0.03793592005968094, -0.0453176349401474, 0.08995036780834198, -0.006535099819302559, -0.025189146399497986, -0.014202188700437546, 0.014725377783179283, 0.06289676576852798, 0.028956104069948196, -0.03156253322958946, -0.01070158276706934, 0.022791992872953415, -0.06263041496276855, -0.015286616049706936, -0.03721296787261963, -0.026673099026083946, 0.04862799122929573, -0.09664718061685562, 0.059472259134054184, 0.03190498426556587, -0.005327010061591864, 0.10517039149999619, -0.019215285778045654, -0.017617182806134224, 0.01321288663893938, -0.011205745860934258, 0.015134415589272976, -0.0050749280489981174, -0.005835929419845343, 0.05737950652837753, 0.05562920495867729, 0.04406198114156723, 0.059510309249162674, 0.02802387624979019, 0.027167750522494316, 0.03475873917341232, 0.03245671093463898, -0.00842333398759365, -0.04352927953004837, -0.038715947419404984, -0.04642108455300331, -0.013869251124560833, 0.008623097091913223, 0.03167668357491493, 0.028689753264188766, -0.01791207119822502, 0.005498235113918781, 0.026711149141192436, 0.021574389189481735, -0.02638772316277027, -0.04044722393155098, -0.05243299901485443, 0.05304179713129997, -0.04170287773013115, 0.01707496866583824, -0.017236681655049324, -0.027053600177168846, -0.08104664832353592, -0.009089211001992226, -0.03213328495621681, -0.008428090251982212, -0.04923679307103157, 0.03941987454891205, 0.0029940649401396513, -0.08553656190633774, 0.05151979625225067, -0.01619981788098812, -0.0029607710894197226, 0.00950300507247448, -0.030611282214522362, 0.0018109455704689026, -0.05840685963630676, 0.002432826440781355, -0.026596998795866966, 0.0007497053011320531, 0.03590024262666702, 0.06643542647361755, 0.07571963965892792, 0.03706076741218567, -0.05056854337453842, -0.016713494434952736, -0.008656390942633152, -0.011234283447265625, -0.003809763351455331, 0.01144355908036232, -0.01094890758395195, -0.059548359364271164, 0.01904406026005745, 0.0013983401004225016, 0.0011076137889176607, -0.01969091221690178, -0.04330097883939743, -0.05087294429540634, -0.015001240186393261, -0.026787249371409416, 0.011015495285391808, -0.02536037191748619, -0.06373386830091476, 0.0007384091732092202, 0.004237826447933912, 0.009588617831468582, 0.013431674800813198, 0.04478493332862854, -0.07240928709506989, -0.03160058334469795, -0.006806206423789263, -0.03907742351293564, 0.09284216910600662, 0.04398588091135025, 0.016256893053650856, 0.04748648777604103, 0.02045191265642643, -0.011966747231781483, 0.059053707867860794, -0.0030249806586652994, 0.02010946162045002, 0.036737341433763504, -0.021346090361475945, -0.0013935838360339403, -0.05072074383497238, 0.02692042477428913, -0.0001587401347933337, 0.02574087306857109, -0.03413091227412224, 0.025950148701667786, -0.018311597406864166, 0.0027800332754850388, -0.01266116090118885, -0.0026539925020188093, 0.0019203395349904895, 0.0230393186211586, -0.004808577708899975, 0.011196233332157135, -0.018149884417653084, -0.004777661990374327, -0.0056361667811870575, -0.012156997807323933, -0.0913962721824646, 0.0352153405547142, 0.021460240706801414, -0.006097523961216211, -0.04855189099907875, -0.03827837109565735, 0.03557681664824486, -0.060918163508176804, -0.02771947719156742, -0.03375041112303734, 0.006815718952566385, 0.0354246161878109, 0.03930572420358658, 0.01710350625216961, 0.00553152896463871, 0.008551753126084805, 0.02806192636489868, 0.013812175951898098, -0.05266129598021507, -0.08546046167612076, -0.03584316745400429, 0.006344849243760109, 0.07126778364181519, 0.006359118036925793, 0.001926284865476191, -0.04368147999048233, 0.04558398574590683, 0.02939368039369583, -0.0083805276080966, 0.05365059897303581, 0.03437823802232742, -0.031201057136058807, -0.04805723950266838, -0.059091757982969284, 0.04885629191994667, 0.01378363836556673, 0.07678504288196564, 0.05833075940608978, 0.009008354507386684, 0.018834784626960754, 0.04900849238038063, 0.006116549018770456, 0.0498836413025856, 0.03649001941084862, -0.00015695653564762324, -0.05239494889974594, -0.013070199638605118, 0.013203374110162258, -0.02657797373831272, 0.01809280924499035, -0.008470896631479263, 0.0038620822597295046, -0.010882319882512093, 0.01775035820901394, -0.015552965924143791, -0.01203333493322134, -0.02284906804561615, 0.09276606887578964, 0.04813333973288536, 0.03367431089282036, 0.019786037504673004, 0.025950148701667786, -0.031105931848287582, 0.05551505461335182, -0.05190029740333557, -0.03660416975617409, -0.07914415001869202, 0.00467540230602026, 0.0007746756309643388, 0.018654046580195427, 0.04390978068113327, -0.03468263894319534, -0.01999531127512455, 0.03620464354753494, 0.03850667178630829, -0.013393624685704708, -0.0067253499291837215, -0.005973861087113619, 0.04938898980617523, 0.05007389187812805, 0.03312258794903755, -0.05505845323204994, -0.01703691855072975, -0.004592167679220438, 0.0678052231669426, 0.04288243129849434, -0.001782407984137535, 0.04273023083806038, -0.025797948241233826, -0.05186224728822708, -0.0028513772413134575, -0.031067881733179092, -0.03401676192879677, -0.04219752922654152, 0.0002815110783558339, 0.04292048141360283, -0.015286616049706936, -0.030744457617402077, 0.012156997807323933, 0.0018775331554934382, 0.04143652692437172, 0.01816890947520733, 0.011776496656239033, 0.04314877837896347, 0.013831201009452343, -0.05570530518889427, 0.004794308915734291, -0.009598130360245705, 0.04497518390417099, -0.0015065449988469481, 0.0176076702773571, -0.01824500970542431, -0.05235689878463745, -0.0000814509330666624, -0.0243710707873106, -0.04333902895450592, -0.012347247451543808, 0.05014999210834503, -0.023705193772912025, 0.04330097883939743, 0.00609276769682765, -0.014392439275979996, -0.030649332329630852, -0.0045826551504433155, 0.0536886490881443, 0.012242610566318035, -0.02087046392261982, 0.011120133101940155, 0.007681358139961958, -0.005845441948622465, -0.04250193014740944, 0.03209523484110832, -0.003469690913334489, -0.0731322392821312, 0.0012627866817638278, 0.0016967953415587544, -0.011510146781802177, 0.020927539095282555, -0.0011141536524519324, -0.03300843760371208, -0.01779792085289955, 0.05281349644064903, -0.021536339074373245, 0.08097054809331894, -0.008038077503442764, -0.011747959069907665, 0.005688485689461231, 0.003912022802978754, 0.04527958482503891, -0.03359821066260338, -0.0445566326379776, -0.0011551763163879514, -0.002606429858133197, -0.013945350423455238, 0.01821647211909294, 0.04021892324090004, 0.10410499572753906, -0.014392439275979996, 0.04744843766093254, -0.03437823802232742, -0.007362688891589642, -0.01399291306734085, -0.012252123095095158, -0.0035576815716922283, -0.004109407775104046, -0.03831642121076584, 0.0009310376481153071, -0.03127715736627579, -0.0038573259953409433, 0.02262076735496521, 0.02475157007575035, -0.08614535629749298, 0.03125813230872154, -0.004145079758018255, -0.023476893082261086, 0.014630252495408058, -0.01239481009542942, 0.03506314009428024, -0.017464982345700264, -0.0061593553982675076, -0.012746773660182953, -0.03645196929574013, -0.01121525838971138, 0.05193834751844406, -0.0022723027504980564, 0.07914415001869202, -0.023362742736935616, 0.02147926576435566, -0.038145195692777634, 0.05212859809398651, 0.04900849238038063, 0.08431895822286606, -0.006677787285298109, -0.01378363836556673, -0.04588838666677475, -0.007524401415139437, -0.07088728249073029, 0.02848047763109207, -0.04847579076886177, -0.003610000479966402, 0.0061213052831590176, 0.010920369997620583, -0.000892987591214478, -0.02543647214770317, 0.003714638063684106, 0.025835998356342316, -0.05654240399599075, 0.0034268845338374376, -0.09839748591184616, -0.05429745092988014, 0.023971544578671455, 0.019167723134160042, 0.0021593414712697268, -0.03995257243514061, -0.017921583727002144, -0.05075879395008087, 0.028803903609514236, 0.03213328495621681, 0.022145140916109085, -0.0050368779338896275, 0.011319896206259727, 0.010406694374978542, -0.04577423632144928, 0.025721848011016846, 0.01615225523710251, 0.03843057155609131, -0.01775035820901394, 0.0218978151679039, -0.05281349644064903, -0.014278288930654526, 0.010682557709515095, -0.018996497616171837, -0.06985992938280106, 0.02619747444987297, -0.010349619202315807, 0.007229513488709927, -0.0426541306078434, 0.05452575162053108, -0.05650435388088226, 0.013032149523496628, 0.024504246190190315, 0.03447336331009865, 0.00973130576312542, 0.03827837109565735, 0.027015550062060356, 0.015638578683137894, 0.0192343108355999, -0.04885629191994667, -0.04897044226527214, 0.02007141150534153, -0.02414277009665966, -0.0016361530870199203, 0.01653275638818741, 0.028651703149080276, -0.004746746271848679, 0.029374655336141586, 0.006482780911028385, 0.05616190284490585, 0.008599315769970417, 0.01946261152625084, 0.0346636138856411, 0.05171004682779312, 0.006844256538897753, -0.04508933424949646, -0.04261608049273491, -0.0025469765532761812, 0.04136042669415474, 0.008889447897672653, 0.029412705451250076, -0.04147457703948021, -0.00857553444802761, -0.03629976883530617, -0.015486379154026508, -0.05646630376577377, -0.025113046169281006, 0.013308011926710606, 0.05117734521627426, -0.05646630376577377, -0.0445566326379776, -0.017693283036351204, -0.022145140916109085, -0.04261608049273491, -0.05399305000901222, 0.010492307133972645, 0.03888717293739319, 0.05692290514707565, -0.06639737635850906, 0.05319399759173393, 0.030820557847619057, 0.00535079138353467, 0.04162677749991417, -0.023476893082261086, -0.05220469832420349, 0.03531046584248543, -0.05049244314432144, -0.006116549018770456, 0.03881107270717621, 0.0342831127345562, 0.002772898878902197, -0.06259236484766006, -0.020965589210391045, -0.027890700846910477, 0.03472068905830383, 0.016780080273747444, 0.01058743242174387, -0.06658762693405151, -0.03251378610730171, 0.030249806120991707, -0.06978382915258408, -0.028499502688646317, -0.01028303150087595, -0.02326761744916439, 0.02170756459236145, -0.013269961811602116, 0.020699238404631615, -0.0711916834115982, -0.02201196551322937, 0.016970330849289894, -0.02456132136285305, 0.04090382531285286, 0.05125344544649124, -0.017132043838500977, -0.06620712578296661, -0.013308011926710606, -0.0020333006978034973, -0.022830042988061905, -0.007543426472693682, -0.009560080245137215, 0.06502757221460342, 0.05410720035433769, 0.02809997648000717, -0.01737936958670616, 0.05319399759173393, 0.0453176349401474, 0.01549589168280363, -0.018901372328400612, -0.01444951444864273, -0.01873965933918953, -0.03298941254615784, 0.02026166208088398, 0.0418931283056736, 0.01549589168280363, -0.05007389187812805, -0.0468396358191967, -0.01577175408601761, 0.0017907314468175173, -0.007120119407773018, -0.024770595133304596, -0.004247338976711035, -0.004894190467894077, 0.060842063277959824, -0.004442345816642046, -0.01740790717303753, -0.07743189483880997, 0.00806185882538557, -0.05570530518889427, -0.014021450653672218, 0.06849012523889542, 0.012803848832845688, 0.05357449874281883, -0.05171004682779312, 0.01165283378213644, -0.0009857346303761005, 0.012917999178171158, -0.01870160922408104, -0.012984586879611015, 0.028918053954839706, -0.011158183217048645, -0.006154599133878946, -0.01016888115555048, 0.017274731770157814, 0.015790779143571854, 0.06156501546502113, -0.024275945499539375, -0.011491121724247932, 0.04657328501343727, 0.00531274126842618, 0.024770595133304596, 0.04029502347111702, -0.0651417225599289, 0.03165765851736069, -0.005997642409056425, -0.04398588091135025, 0.02349591813981533, -0.013488749973475933, 0.022791992872953415, -0.0913962721824646, -0.06270651519298553, 0.03850667178630829, 0.04174092784523964, 0.015552965924143791, -0.012328223325312138, 0.01024498138576746, 0.05365059897303581, -0.01816890947520733, 0.030249806120991707, 0.01639006845653057, -0.020090436562895775, -0.026863349601626396, 0.02547452226281166, 0.02901317924261093, -0.037878844887018204, 0.07735579460859299, 0.05338424816727638, 0.01562906615436077, -0.04664938524365425, -0.09421197324991226, -0.008637365885078907, 0.0075957453809678555, -0.0031795590184628963, 0.02752922661602497, -0.03578609228134155, 0.05833075940608978, 0.017055943608283997, -0.01813085936009884, -0.03264696151018143, -0.060157161206007004, 0.02680627442896366, -0.04657328501343727, 0.02178366482257843, -0.02208806574344635, -0.0674247220158577, 0.0030677870381623507, -0.014620739966630936, 0.04295853152871132, -0.01692276820540428, 0.007329395040869713, -0.03156253322958946, -0.07020238041877747, -0.03519631549715996, -0.03643294423818588, 0.024618396535515785, 0.04482298344373703, -0.05589555203914642, -0.0321713350713253, 0.03420701250433922, -0.02749117650091648, -0.04025697335600853, 0.020052386447787285, 0.01188113447278738, 0.009959605522453785, -0.007700383197516203, 0.0027419831603765488, -0.04600253701210022, 0.02273491770029068, 0.016627881675958633, -0.022297341376543045, -0.004133189097046852, -0.02079436369240284, 0.011862109415233135, -0.02448522113263607, 0.02699652500450611, 0.02117486484348774, -0.030934708192944527, 0.05425940081477165, 0.04980754107236862, -0.09816918522119522, -0.02022361196577549, -0.03234256058931351, 0.008627853356301785, 0.005883492063730955, -0.05692290514707565, 0.014516102150082588, 0.00898932944983244, -0.07012628018856049, -0.010530357249081135, -0.05247104912996292, 0.012156997807323933, -0.025189146399497986, 0.04284438118338585, 0.002035678829997778, 0.09230947494506836, -0.01691325567662716, 0.07069703191518784, 0.024656446650624275, -0.06575052440166473, 0.016742030158638954, 0.0021236694883555174, 0.009469711221754551, -0.021155839785933495, 0.028309252113103867, -0.06613102555274963, 0.03778371959924698, -0.003985744901001453, -0.04284438118338585, 0.08781956136226654, -0.012366272509098053, -0.03770761936903, 0.07724164426326752, -0.03713686764240265, 0.005022609140723944, 0.05886346101760864, -0.01597151719033718, -0.015105878002941608, -0.0034149938728660345, 0.030706407502293587, -0.04550788551568985, -0.02490377053618431, -0.0048299808986485004, 0.05844490975141525, -0.03190498426556587, -0.002009519375860691, 0.02155536413192749, -0.03820227086544037, -0.05452575162053108, 0.07408348470926285, 0.05600970238447189, 0.01581931672990322, 0.008680172264575958, -0.0028561335057020187, 0.015591016039252281, 0.021193889901041985, -0.018463796004652977, 0.030497131869196892, -0.04737233743071556, -0.02726287581026554, 0.0344543382525444, -0.006868037860840559, 0.04219752922654152, -0.0487421415746212, 0.05148174613714218, 0.00016721223073545843, -0.007638551760464907, 0.027129700407385826, 0.0002247332304250449, -0.01148160919547081, -0.05376474931836128, 0.00031985840178094804, -0.08211205154657364, 0.05776000767946243, 0.024618396535515785, -0.009079698473215103, 0.00029533394263125956, -0.08386235684156418, -0.07663284242153168, 0.030440056696534157, -0.007110606878995895, -0.002644479973241687, 0.01806427165865898, 0.005831173155456781, -0.01437341421842575, 0.007757458370178938, 0.007686114404350519, 0.007063044235110283, -0.020090436562895775, 0.0046587553806602955, -0.029698079451918602, 0.04097992554306984, 0.007524401415139437, 0.04132237657904625, -0.04307267814874649, 0.08020954579114914, 0.009560080245137215, -0.006554124876856804, -0.007134388200938702, 0.010178393684327602, 0.02878487855195999, 0.014401951804757118, -0.008190277963876724, 0.04040917381644249, -0.03900132328271866, -0.007001212798058987, -0.0004191453044768423, -0.022373441606760025, -0.03287526220083237, -0.0013186727883294225, -0.019376998767256737, 0.08386235684156418, 0.006658762227743864, -0.01243286021053791, -0.005108221899718046, 0.03690856695175171, -0.08135104924440384, 0.006073742639273405, -0.006026179995387793, 0.024884745478630066, 0.05007389187812805, -0.0426541306078434, 0.058977607637643814, -0.03751736879348755, 0.04383368045091629, 0.020927539095282555, 0.02216416597366333, 0.008156984113156796, 0.005740804597735405, 0.07415958493947983, -0.013507775031030178, 0.028042901307344437, 0.016019079834222794, 0.00594056723639369, 0.0036718319170176983, 0.021650489419698715, -0.05425940081477165, 0.0036504287272691727, 0.014934652484953403, 0.03375041112303734, -0.02604527398943901, -0.05125344544649124, -0.020394837483763695, 0.0023472136817872524, -0.015105878002941608, 0.021308040246367455, 0.027129700407385826, 0.020052386447787285, 0.0563521534204483 ]
4,679
sklearn.utils._metadata_requests
set_transform_request
Request metadata passed to the ``transform`` method. Note that this method is only relevant if ``enable_metadata_routing=True`` (see :func:`sklearn.set_config`). Please see :ref:`User Guide <metadata_routing>` on how the routing mechanism works. The options for each parameter are: - ``True``: metadata is requested, and passed to ``transform`` if provided. The request is ignored if metadata is not provided. - ``False``: metadata is not requested and the meta-estimator will not pass it to ``transform``. - ``None``: metadata is not requested, and the meta-estimator will raise an error if the user provides it. - ``str``: metadata should be passed to the meta-estimator with this given alias instead of the original name. The default (``sklearn.utils.metadata_routing.UNCHANGED``) retains the existing request. This allows you to change the request for some parameters and not others. .. versionadded:: 1.3 .. note:: This method is only relevant if this estimator is used as a sub-estimator of a meta-estimator, e.g. used inside a :class:`~sklearn.pipeline.Pipeline`. Otherwise it has no effect. Parameters ---------- check_input : str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED Metadata routing for ``check_input`` parameter in ``transform``. lb : str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED Metadata routing for ``lb`` parameter in ``transform``. metric_missing : str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED Metadata routing for ``metric_missing`` parameter in ``transform``. metric_special : str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED Metadata routing for ``metric_special`` parameter in ``transform``. ub : str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED Metadata routing for ``ub`` parameter in ``transform``. x : str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED Metadata routing for ``x`` parameter in ``transform``. Returns ------- self : object The updated object.
def __get__(self, instance, owner): # we would want to have a method which accepts only the expected args def func(**kw): """Updates the request for provided parameters This docstring is overwritten below. See REQUESTER_DOC for expected functionality """ if not _routing_enabled(): raise RuntimeError( "This method is only available when metadata routing is enabled." " You can enable it using" " sklearn.set_config(enable_metadata_routing=True)." ) if self.validate_keys and (set(kw) - set(self.keys)): raise TypeError( f"Unexpected args: {set(kw) - set(self.keys)}. Accepted arguments" f" are: {set(self.keys)}" ) requests = instance._get_metadata_request() method_metadata_request = getattr(requests, self.name) for prop, alias in kw.items(): if alias is not UNCHANGED: method_metadata_request.add_request(param=prop, alias=alias) instance._metadata_request = requests return instance # Now we set the relevant attributes of the function so that it seems # like a normal method to the end user, with known expected arguments. func.__name__ = f"set_{self.name}_request" params = [ inspect.Parameter( name="self", kind=inspect.Parameter.POSITIONAL_OR_KEYWORD, annotation=owner, ) ] params.extend( [ inspect.Parameter( k, inspect.Parameter.KEYWORD_ONLY, default=UNCHANGED, annotation=Optional[Union[bool, None, str]], ) for k in self.keys ] ) func.__signature__ = inspect.Signature( params, return_annotation=owner, ) doc = REQUESTER_DOC.format(method=self.name) for metadata in self.keys: doc += REQUESTER_DOC_PARAM.format(metadata=metadata, method=self.name) doc += REQUESTER_DOC_RETURN func.__doc__ = doc return func
(self: optbinning.binning.piecewise.continuous_binning.ContinuousOptimalPWBinning, *, check_input: Union[bool, NoneType, str] = '$UNCHANGED$', lb: Union[bool, NoneType, str] = '$UNCHANGED$', metric_missing: Union[bool, NoneType, str] = '$UNCHANGED$', metric_special: Union[bool, NoneType, str] = '$UNCHANGED$', ub: Union[bool, NoneType, str] = '$UNCHANGED$', x: Union[bool, NoneType, str] = '$UNCHANGED$') -> optbinning.binning.piecewise.continuous_binning.ContinuousOptimalPWBinning
[ 0.04383368045091629, -0.05829270929098129, -0.019129673019051552, 0.004701561760157347, -0.002906074048951268, -0.01725570671260357, -0.011529171839356422, 0.010007168166339397, 0.05699900537729263, 0.010863294824957848, -0.02144121564924717, 0.006497049704194069, 0.05129149556159973, -0.005384084768593311, -0.01991921104490757, 0.03751736879348755, 0.029983455315232277, 0.023819344118237495, 0.030154680833220482, -0.0336933359503746, 0.019224798306822777, -0.04280633106827736, -0.02878487855195999, 0.014915627427399158, 0.00845662783831358, 0.0655222237110138, 0.03793592005968094, -0.0453176349401474, 0.08995036780834198, -0.006535099819302559, -0.025189146399497986, -0.014202188700437546, 0.014725377783179283, 0.06289676576852798, 0.028956104069948196, -0.03156253322958946, -0.01070158276706934, 0.022791992872953415, -0.06263041496276855, -0.015286616049706936, -0.03721296787261963, -0.026673099026083946, 0.04862799122929573, -0.09664718061685562, 0.059472259134054184, 0.03190498426556587, -0.005327010061591864, 0.10517039149999619, -0.019215285778045654, -0.017617182806134224, 0.01321288663893938, -0.011205745860934258, 0.015134415589272976, -0.0050749280489981174, -0.005835929419845343, 0.05737950652837753, 0.05562920495867729, 0.04406198114156723, 0.059510309249162674, 0.02802387624979019, 0.027167750522494316, 0.03475873917341232, 0.03245671093463898, -0.00842333398759365, -0.04352927953004837, -0.038715947419404984, -0.04642108455300331, -0.013869251124560833, 0.008623097091913223, 0.03167668357491493, 0.028689753264188766, -0.01791207119822502, 0.005498235113918781, 0.026711149141192436, 0.021574389189481735, -0.02638772316277027, -0.04044722393155098, -0.05243299901485443, 0.05304179713129997, -0.04170287773013115, 0.01707496866583824, -0.017236681655049324, -0.027053600177168846, -0.08104664832353592, -0.009089211001992226, -0.03213328495621681, -0.008428090251982212, -0.04923679307103157, 0.03941987454891205, 0.0029940649401396513, -0.08553656190633774, 0.05151979625225067, -0.01619981788098812, -0.0029607710894197226, 0.00950300507247448, -0.030611282214522362, 0.0018109455704689026, -0.05840685963630676, 0.002432826440781355, -0.026596998795866966, 0.0007497053011320531, 0.03590024262666702, 0.06643542647361755, 0.07571963965892792, 0.03706076741218567, -0.05056854337453842, -0.016713494434952736, -0.008656390942633152, -0.011234283447265625, -0.003809763351455331, 0.01144355908036232, -0.01094890758395195, -0.059548359364271164, 0.01904406026005745, 0.0013983401004225016, 0.0011076137889176607, -0.01969091221690178, -0.04330097883939743, -0.05087294429540634, -0.015001240186393261, -0.026787249371409416, 0.011015495285391808, -0.02536037191748619, -0.06373386830091476, 0.0007384091732092202, 0.004237826447933912, 0.009588617831468582, 0.013431674800813198, 0.04478493332862854, -0.07240928709506989, -0.03160058334469795, -0.006806206423789263, -0.03907742351293564, 0.09284216910600662, 0.04398588091135025, 0.016256893053650856, 0.04748648777604103, 0.02045191265642643, -0.011966747231781483, 0.059053707867860794, -0.0030249806586652994, 0.02010946162045002, 0.036737341433763504, -0.021346090361475945, -0.0013935838360339403, -0.05072074383497238, 0.02692042477428913, -0.0001587401347933337, 0.02574087306857109, -0.03413091227412224, 0.025950148701667786, -0.018311597406864166, 0.0027800332754850388, -0.01266116090118885, -0.0026539925020188093, 0.0019203395349904895, 0.0230393186211586, -0.004808577708899975, 0.011196233332157135, -0.018149884417653084, -0.004777661990374327, -0.0056361667811870575, -0.012156997807323933, -0.0913962721824646, 0.0352153405547142, 0.021460240706801414, -0.006097523961216211, -0.04855189099907875, -0.03827837109565735, 0.03557681664824486, -0.060918163508176804, -0.02771947719156742, -0.03375041112303734, 0.006815718952566385, 0.0354246161878109, 0.03930572420358658, 0.01710350625216961, 0.00553152896463871, 0.008551753126084805, 0.02806192636489868, 0.013812175951898098, -0.05266129598021507, -0.08546046167612076, -0.03584316745400429, 0.006344849243760109, 0.07126778364181519, 0.006359118036925793, 0.001926284865476191, -0.04368147999048233, 0.04558398574590683, 0.02939368039369583, -0.0083805276080966, 0.05365059897303581, 0.03437823802232742, -0.031201057136058807, -0.04805723950266838, -0.059091757982969284, 0.04885629191994667, 0.01378363836556673, 0.07678504288196564, 0.05833075940608978, 0.009008354507386684, 0.018834784626960754, 0.04900849238038063, 0.006116549018770456, 0.0498836413025856, 0.03649001941084862, -0.00015695653564762324, -0.05239494889974594, -0.013070199638605118, 0.013203374110162258, -0.02657797373831272, 0.01809280924499035, -0.008470896631479263, 0.0038620822597295046, -0.010882319882512093, 0.01775035820901394, -0.015552965924143791, -0.01203333493322134, -0.02284906804561615, 0.09276606887578964, 0.04813333973288536, 0.03367431089282036, 0.019786037504673004, 0.025950148701667786, -0.031105931848287582, 0.05551505461335182, -0.05190029740333557, -0.03660416975617409, -0.07914415001869202, 0.00467540230602026, 0.0007746756309643388, 0.018654046580195427, 0.04390978068113327, -0.03468263894319534, -0.01999531127512455, 0.03620464354753494, 0.03850667178630829, -0.013393624685704708, -0.0067253499291837215, -0.005973861087113619, 0.04938898980617523, 0.05007389187812805, 0.03312258794903755, -0.05505845323204994, -0.01703691855072975, -0.004592167679220438, 0.0678052231669426, 0.04288243129849434, -0.001782407984137535, 0.04273023083806038, -0.025797948241233826, -0.05186224728822708, -0.0028513772413134575, -0.031067881733179092, -0.03401676192879677, -0.04219752922654152, 0.0002815110783558339, 0.04292048141360283, -0.015286616049706936, -0.030744457617402077, 0.012156997807323933, 0.0018775331554934382, 0.04143652692437172, 0.01816890947520733, 0.011776496656239033, 0.04314877837896347, 0.013831201009452343, -0.05570530518889427, 0.004794308915734291, -0.009598130360245705, 0.04497518390417099, -0.0015065449988469481, 0.0176076702773571, -0.01824500970542431, -0.05235689878463745, -0.0000814509330666624, -0.0243710707873106, -0.04333902895450592, -0.012347247451543808, 0.05014999210834503, -0.023705193772912025, 0.04330097883939743, 0.00609276769682765, -0.014392439275979996, -0.030649332329630852, -0.0045826551504433155, 0.0536886490881443, 0.012242610566318035, -0.02087046392261982, 0.011120133101940155, 0.007681358139961958, -0.005845441948622465, -0.04250193014740944, 0.03209523484110832, -0.003469690913334489, -0.0731322392821312, 0.0012627866817638278, 0.0016967953415587544, -0.011510146781802177, 0.020927539095282555, -0.0011141536524519324, -0.03300843760371208, -0.01779792085289955, 0.05281349644064903, -0.021536339074373245, 0.08097054809331894, -0.008038077503442764, -0.011747959069907665, 0.005688485689461231, 0.003912022802978754, 0.04527958482503891, -0.03359821066260338, -0.0445566326379776, -0.0011551763163879514, -0.002606429858133197, -0.013945350423455238, 0.01821647211909294, 0.04021892324090004, 0.10410499572753906, -0.014392439275979996, 0.04744843766093254, -0.03437823802232742, -0.007362688891589642, -0.01399291306734085, -0.012252123095095158, -0.0035576815716922283, -0.004109407775104046, -0.03831642121076584, 0.0009310376481153071, -0.03127715736627579, -0.0038573259953409433, 0.02262076735496521, 0.02475157007575035, -0.08614535629749298, 0.03125813230872154, -0.004145079758018255, -0.023476893082261086, 0.014630252495408058, -0.01239481009542942, 0.03506314009428024, -0.017464982345700264, -0.0061593553982675076, -0.012746773660182953, -0.03645196929574013, -0.01121525838971138, 0.05193834751844406, -0.0022723027504980564, 0.07914415001869202, -0.023362742736935616, 0.02147926576435566, -0.038145195692777634, 0.05212859809398651, 0.04900849238038063, 0.08431895822286606, -0.006677787285298109, -0.01378363836556673, -0.04588838666677475, -0.007524401415139437, -0.07088728249073029, 0.02848047763109207, -0.04847579076886177, -0.003610000479966402, 0.0061213052831590176, 0.010920369997620583, -0.000892987591214478, -0.02543647214770317, 0.003714638063684106, 0.025835998356342316, -0.05654240399599075, 0.0034268845338374376, -0.09839748591184616, -0.05429745092988014, 0.023971544578671455, 0.019167723134160042, 0.0021593414712697268, -0.03995257243514061, -0.017921583727002144, -0.05075879395008087, 0.028803903609514236, 0.03213328495621681, 0.022145140916109085, -0.0050368779338896275, 0.011319896206259727, 0.010406694374978542, -0.04577423632144928, 0.025721848011016846, 0.01615225523710251, 0.03843057155609131, -0.01775035820901394, 0.0218978151679039, -0.05281349644064903, -0.014278288930654526, 0.010682557709515095, -0.018996497616171837, -0.06985992938280106, 0.02619747444987297, -0.010349619202315807, 0.007229513488709927, -0.0426541306078434, 0.05452575162053108, -0.05650435388088226, 0.013032149523496628, 0.024504246190190315, 0.03447336331009865, 0.00973130576312542, 0.03827837109565735, 0.027015550062060356, 0.015638578683137894, 0.0192343108355999, -0.04885629191994667, -0.04897044226527214, 0.02007141150534153, -0.02414277009665966, -0.0016361530870199203, 0.01653275638818741, 0.028651703149080276, -0.004746746271848679, 0.029374655336141586, 0.006482780911028385, 0.05616190284490585, 0.008599315769970417, 0.01946261152625084, 0.0346636138856411, 0.05171004682779312, 0.006844256538897753, -0.04508933424949646, -0.04261608049273491, -0.0025469765532761812, 0.04136042669415474, 0.008889447897672653, 0.029412705451250076, -0.04147457703948021, -0.00857553444802761, -0.03629976883530617, -0.015486379154026508, -0.05646630376577377, -0.025113046169281006, 0.013308011926710606, 0.05117734521627426, -0.05646630376577377, -0.0445566326379776, -0.017693283036351204, -0.022145140916109085, -0.04261608049273491, -0.05399305000901222, 0.010492307133972645, 0.03888717293739319, 0.05692290514707565, -0.06639737635850906, 0.05319399759173393, 0.030820557847619057, 0.00535079138353467, 0.04162677749991417, -0.023476893082261086, -0.05220469832420349, 0.03531046584248543, -0.05049244314432144, -0.006116549018770456, 0.03881107270717621, 0.0342831127345562, 0.002772898878902197, -0.06259236484766006, -0.020965589210391045, -0.027890700846910477, 0.03472068905830383, 0.016780080273747444, 0.01058743242174387, -0.06658762693405151, -0.03251378610730171, 0.030249806120991707, -0.06978382915258408, -0.028499502688646317, -0.01028303150087595, -0.02326761744916439, 0.02170756459236145, -0.013269961811602116, 0.020699238404631615, -0.0711916834115982, -0.02201196551322937, 0.016970330849289894, -0.02456132136285305, 0.04090382531285286, 0.05125344544649124, -0.017132043838500977, -0.06620712578296661, -0.013308011926710606, -0.0020333006978034973, -0.022830042988061905, -0.007543426472693682, -0.009560080245137215, 0.06502757221460342, 0.05410720035433769, 0.02809997648000717, -0.01737936958670616, 0.05319399759173393, 0.0453176349401474, 0.01549589168280363, -0.018901372328400612, -0.01444951444864273, -0.01873965933918953, -0.03298941254615784, 0.02026166208088398, 0.0418931283056736, 0.01549589168280363, -0.05007389187812805, -0.0468396358191967, -0.01577175408601761, 0.0017907314468175173, -0.007120119407773018, -0.024770595133304596, -0.004247338976711035, -0.004894190467894077, 0.060842063277959824, -0.004442345816642046, -0.01740790717303753, -0.07743189483880997, 0.00806185882538557, -0.05570530518889427, -0.014021450653672218, 0.06849012523889542, 0.012803848832845688, 0.05357449874281883, -0.05171004682779312, 0.01165283378213644, -0.0009857346303761005, 0.012917999178171158, -0.01870160922408104, -0.012984586879611015, 0.028918053954839706, -0.011158183217048645, -0.006154599133878946, -0.01016888115555048, 0.017274731770157814, 0.015790779143571854, 0.06156501546502113, -0.024275945499539375, -0.011491121724247932, 0.04657328501343727, 0.00531274126842618, 0.024770595133304596, 0.04029502347111702, -0.0651417225599289, 0.03165765851736069, -0.005997642409056425, -0.04398588091135025, 0.02349591813981533, -0.013488749973475933, 0.022791992872953415, -0.0913962721824646, -0.06270651519298553, 0.03850667178630829, 0.04174092784523964, 0.015552965924143791, -0.012328223325312138, 0.01024498138576746, 0.05365059897303581, -0.01816890947520733, 0.030249806120991707, 0.01639006845653057, -0.020090436562895775, -0.026863349601626396, 0.02547452226281166, 0.02901317924261093, -0.037878844887018204, 0.07735579460859299, 0.05338424816727638, 0.01562906615436077, -0.04664938524365425, -0.09421197324991226, -0.008637365885078907, 0.0075957453809678555, -0.0031795590184628963, 0.02752922661602497, -0.03578609228134155, 0.05833075940608978, 0.017055943608283997, -0.01813085936009884, -0.03264696151018143, -0.060157161206007004, 0.02680627442896366, -0.04657328501343727, 0.02178366482257843, -0.02208806574344635, -0.0674247220158577, 0.0030677870381623507, -0.014620739966630936, 0.04295853152871132, -0.01692276820540428, 0.007329395040869713, -0.03156253322958946, -0.07020238041877747, -0.03519631549715996, -0.03643294423818588, 0.024618396535515785, 0.04482298344373703, -0.05589555203914642, -0.0321713350713253, 0.03420701250433922, -0.02749117650091648, -0.04025697335600853, 0.020052386447787285, 0.01188113447278738, 0.009959605522453785, -0.007700383197516203, 0.0027419831603765488, -0.04600253701210022, 0.02273491770029068, 0.016627881675958633, -0.022297341376543045, -0.004133189097046852, -0.02079436369240284, 0.011862109415233135, -0.02448522113263607, 0.02699652500450611, 0.02117486484348774, -0.030934708192944527, 0.05425940081477165, 0.04980754107236862, -0.09816918522119522, -0.02022361196577549, -0.03234256058931351, 0.008627853356301785, 0.005883492063730955, -0.05692290514707565, 0.014516102150082588, 0.00898932944983244, -0.07012628018856049, -0.010530357249081135, -0.05247104912996292, 0.012156997807323933, -0.025189146399497986, 0.04284438118338585, 0.002035678829997778, 0.09230947494506836, -0.01691325567662716, 0.07069703191518784, 0.024656446650624275, -0.06575052440166473, 0.016742030158638954, 0.0021236694883555174, 0.009469711221754551, -0.021155839785933495, 0.028309252113103867, -0.06613102555274963, 0.03778371959924698, -0.003985744901001453, -0.04284438118338585, 0.08781956136226654, -0.012366272509098053, -0.03770761936903, 0.07724164426326752, -0.03713686764240265, 0.005022609140723944, 0.05886346101760864, -0.01597151719033718, -0.015105878002941608, -0.0034149938728660345, 0.030706407502293587, -0.04550788551568985, -0.02490377053618431, -0.0048299808986485004, 0.05844490975141525, -0.03190498426556587, -0.002009519375860691, 0.02155536413192749, -0.03820227086544037, -0.05452575162053108, 0.07408348470926285, 0.05600970238447189, 0.01581931672990322, 0.008680172264575958, -0.0028561335057020187, 0.015591016039252281, 0.021193889901041985, -0.018463796004652977, 0.030497131869196892, -0.04737233743071556, -0.02726287581026554, 0.0344543382525444, -0.006868037860840559, 0.04219752922654152, -0.0487421415746212, 0.05148174613714218, 0.00016721223073545843, -0.007638551760464907, 0.027129700407385826, 0.0002247332304250449, -0.01148160919547081, -0.05376474931836128, 0.00031985840178094804, -0.08211205154657364, 0.05776000767946243, 0.024618396535515785, -0.009079698473215103, 0.00029533394263125956, -0.08386235684156418, -0.07663284242153168, 0.030440056696534157, -0.007110606878995895, -0.002644479973241687, 0.01806427165865898, 0.005831173155456781, -0.01437341421842575, 0.007757458370178938, 0.007686114404350519, 0.007063044235110283, -0.020090436562895775, 0.0046587553806602955, -0.029698079451918602, 0.04097992554306984, 0.007524401415139437, 0.04132237657904625, -0.04307267814874649, 0.08020954579114914, 0.009560080245137215, -0.006554124876856804, -0.007134388200938702, 0.010178393684327602, 0.02878487855195999, 0.014401951804757118, -0.008190277963876724, 0.04040917381644249, -0.03900132328271866, -0.007001212798058987, -0.0004191453044768423, -0.022373441606760025, -0.03287526220083237, -0.0013186727883294225, -0.019376998767256737, 0.08386235684156418, 0.006658762227743864, -0.01243286021053791, -0.005108221899718046, 0.03690856695175171, -0.08135104924440384, 0.006073742639273405, -0.006026179995387793, 0.024884745478630066, 0.05007389187812805, -0.0426541306078434, 0.058977607637643814, -0.03751736879348755, 0.04383368045091629, 0.020927539095282555, 0.02216416597366333, 0.008156984113156796, 0.005740804597735405, 0.07415958493947983, -0.013507775031030178, 0.028042901307344437, 0.016019079834222794, 0.00594056723639369, 0.0036718319170176983, 0.021650489419698715, -0.05425940081477165, 0.0036504287272691727, 0.014934652484953403, 0.03375041112303734, -0.02604527398943901, -0.05125344544649124, -0.020394837483763695, 0.0023472136817872524, -0.015105878002941608, 0.021308040246367455, 0.027129700407385826, 0.020052386447787285, 0.0563521534204483 ]
4,680
optbinning.binning.piecewise.continuous_binning
transform
Transform given data using bins from the fitted optimal piecewise binning. Parameters ---------- x : array-like, shape = (n_samples,) Training vector, where n_samples is the number of samples. metric_special : float or str (default=0) The metric value to transform special codes in the input vector. Supported metrics are "empirical" to use the empirical mean and any numerical value. metric_missing : float or str (default=0) The metric value to transform missing values in the input vector. Supported metrics are "empirical" to use the empirical mean and any numerical value. lb : float or None (default=None) Avoid values below the lower bound lb. ub : float or None (default=None) Avoid values above the upper bound ub. check_input : bool (default=False) Whether to check input arrays. Returns ------- x_new : numpy array, shape = (n_samples,) Transformed array.
def transform(self, x, metric_special=0, metric_missing=0, lb=None, ub=None, check_input=False): """Transform given data using bins from the fitted optimal piecewise binning. Parameters ---------- x : array-like, shape = (n_samples,) Training vector, where n_samples is the number of samples. metric_special : float or str (default=0) The metric value to transform special codes in the input vector. Supported metrics are "empirical" to use the empirical mean and any numerical value. metric_missing : float or str (default=0) The metric value to transform missing values in the input vector. Supported metrics are "empirical" to use the empirical mean and any numerical value. lb : float or None (default=None) Avoid values below the lower bound lb. ub : float or None (default=None) Avoid values above the upper bound ub. check_input : bool (default=False) Whether to check input arrays. Returns ------- x_new : numpy array, shape = (n_samples,) Transformed array. """ self._check_is_fitted() return transform_continuous_target( self._optb.splits, x, self._c, lb, ub, self._n_records_special, self._sum_special, self._n_records_missing, self._sum_missing, self.special_codes, metric_special, metric_missing, check_input)
(self, x, metric_special=0, metric_missing=0, lb=None, ub=None, check_input=False)
[ -0.00840013101696968, -0.019136838614940643, -0.013921739533543587, 0.019865354523062706, -0.013086613267660141, -0.04356873780488968, -0.03710094839334488, -0.025906695052981377, -0.008857673034071922, -0.03443564847111702, 0.004328887909650803, 0.027186037972569466, 0.04932577908039093, -0.03653234988451004, -0.055580347776412964, 0.02402321808040142, 0.011087639257311821, -0.017288899049162865, 0.028802985325455666, 0.04328443855047226, 0.001892361557111144, -0.024183137342333794, 0.0331207700073719, 0.06357623636722565, -0.008551164530217648, 0.040548067539930344, -0.006156838033348322, -0.03196580708026886, -0.023792225867509842, -0.049254704266786575, -0.03582160547375679, -0.02112692780792713, 0.0319480374455452, -0.025249255821108818, 0.04360427334904671, -0.04410179704427719, 0.004677597898989916, -0.009683915413916111, 0.029940180480480194, 0.05039190128445625, 0.02183767408132553, -0.060235731303691864, -0.011096524074673653, 0.03185919299721718, 0.06357623636722565, 0.0361592099070549, 0.004484363831579685, 0.09623502194881439, -0.01479240320622921, -0.004859726410359144, -0.025764547288417816, -0.05831671878695488, 0.05884977802634239, 0.021198002621531487, 0.016658112406730652, 0.04719354212284088, 0.04623403400182724, 0.0478687509894371, 0.04804643616080284, -0.012189296074211597, 0.019083533436059952, 0.08585812896490097, -0.013033307157456875, -0.05579356849193573, 0.05156463012099266, -0.017066791653633118, -0.05774812027812004, -0.031841427087783813, -0.00958618801087141, 0.04765552654862404, 0.03519970178604126, -0.012349213473498821, 0.03397366404533386, 0.04296460375189781, -0.012207064777612686, 0.017848610877990723, -0.040690213441848755, -0.009461808018386364, 0.0038824507500976324, 0.005814791657030582, 0.0955953523516655, 0.033369529992341995, 0.004455489572137594, -0.020345106720924377, -0.04491915553808212, -0.062474582344293594, 0.028412075713276863, 0.01042131520807743, 0.03077530674636364, 0.0035448463167995214, -0.008231328800320625, -0.03077530674636364, 0.020380644127726555, 0.05931176245212555, 0.054158855229616165, 0.012100452557206154, -0.08337052166461945, 0.037029873579740524, -0.022086435928940773, -0.028802985325455666, 0.0035448463167995214, 0.05749936029314995, -0.05241752415895462, 0.05138694494962692, 0.04918362945318222, 0.042218320071697235, 0.008897652849555016, -0.025746777653694153, -0.0325344018638134, -0.0051795621402561665, -0.03628358989953995, 0.0492902435362339, -0.1107342466711998, -0.03105960600078106, -0.05618448182940483, -0.001842387137003243, 0.02084263041615486, 0.009452923201024532, -0.07818207144737244, 0.04523899033665657, 0.008675544522702694, -0.05088942125439644, 0.02093147300183773, -0.024893881753087044, 0.00005139721542946063, 0.001415939535945654, 0.07505478709936142, 0.04200509563088417, 0.003264989936724305, -0.02368561364710331, -0.013051075860857964, -0.05661092698574066, -0.02944265864789486, 0.021766599267721176, -0.02059386856853962, -0.05426546558737755, 0.012953347526490688, 0.01226925477385521, -0.0034759927075356245, -0.025764547288417816, 0.06503327190876007, 0.0033782650716602802, 0.02716827020049095, 0.026439756155014038, 0.08159365504980087, -0.015423190779983997, 0.060910940170288086, 0.05042743682861328, -0.010563463903963566, -0.0361592099070549, -0.06087540462613106, 0.04676709324121475, 0.02606661431491375, -0.06840931624174118, 0.03134390339255333, 0.0539456307888031, 0.020487256348133087, -0.025000493973493576, -0.025036031380295753, 0.012189296074211597, 0.023099249228835106, 0.0004966893466189504, -0.029833568260073662, 0.016480425372719765, -0.0377761572599411, 0.03296085074543953, -0.028145546093583107, 0.009106434881687164, 0.01968766748905182, -0.0043022348545491695, -0.0020811534486711025, -0.027612486854195595, -0.02240627072751522, 0.05650431662797928, 0.054585300385951996, 0.06695228070020676, -0.017466586083173752, -0.00880436785519123, 0.018052950501441956, 0.042218320071697235, 0.011407474987208843, 0.022050898522138596, 0.022814949974417686, -0.06940435618162155, -0.07327792793512344, -0.0170756746083498, 0.021322382614016533, 0.009470691904425621, -0.044883616268634796, 0.013850664719939232, 0.05437207594513893, 0.00927523709833622, 0.011718426831066608, -0.012660165317356586, -0.01911907084286213, -0.010607886128127575, -0.06602831184864044, 0.046305108815431595, 0.00894207414239645, 0.026137689128518105, -0.018763696774840355, -0.04477700591087341, 0.055971257388591766, 0.04985883831977844, -0.03543069213628769, -0.03162820264697075, -0.011478549800813198, 0.017919685691595078, -0.004155643749982119, -0.038700126111507416, 0.0877060666680336, -0.004191181156784296, -0.06524649262428284, 0.014072773046791553, 0.006498884875327349, 0.05266628786921501, -0.00822688639163971, -0.020913705229759216, 0.004155643749982119, -0.006472231820225716, 0.03230341151356697, -0.0466960184276104, 0.03505755215883255, 0.04808197543025017, 0.03848690167069435, 0.06304317712783813, 0.05749936029314995, -0.026795128360390663, 0.06371838599443436, 0.0029207223560661077, 0.004930801223963499, -0.021517839282751083, -0.033653829246759415, 0.013468638993799686, 0.02938935160636902, -0.014490336179733276, 0.030455470085144043, -0.0008884326671250165, -0.010927721858024597, 0.027008352801203728, -0.03720755875110626, -0.008484532125294209, -0.01656038500368595, -0.02283271960914135, 0.009030917659401894, -0.019207913428544998, 0.015920713543891907, 0.021571144461631775, -0.014357071369886398, 0.00840013101696968, -0.026031076908111572, -0.014143847860395908, -0.006627707276493311, -0.03347614035010338, 0.0044377208687365055, 0.004917474463582039, -0.040796827524900436, -0.04783321171998978, -0.027843479067087173, 0.005277290008962154, 0.0023077037185430527, 0.009328542277216911, 0.0258711576461792, 0.007298474200069904, -0.04698031768202782, -0.017635388299822807, -0.016533730551600456, 0.04058360308408737, 0.07405974715948105, 0.02036287635564804, -0.11044994741678238, -0.01122978888452053, -0.019776510074734688, -0.0026230972725898027, -0.014854594133794308, 0.06275888532400131, 0.03230341151356697, -0.016729187220335007, 0.03335176035761833, -0.025995539501309395, 0.0085378373041749, 0.03573276102542877, 0.014552527107298374, -0.04360427334904671, -0.04189848154783249, -0.036603424698114395, -0.03228564187884331, 0.008595585823059082, -0.030100097879767418, -0.03471994772553444, -0.10405322909355164, -0.0029007326811552048, 0.007915934547781944, 0.01365520991384983, 0.04484808072447777, -0.023010404780507088, -0.07484156638383865, -0.03852244094014168, 0.05156463012099266, -0.02825215831398964, -0.013539713807404041, -0.006827604956924915, -0.04246708005666733, 0.002294377190992236, -0.010758919641375542, -0.014739097096025944, 0.008391246199607849, -0.06581509113311768, -0.038842275738716125, 0.005037412978708744, 0.062439046800136566, -0.0008034762577153742, 0.05142248049378395, -0.03987285867333412, 0.02745256945490837, -0.07512586563825607, 0.030668694525957108, 0.09090442955493927, 0.022619495168328285, 0.03663896396756172, -0.009053128771483898, -0.011016564443707466, 0.003267211141064763, -0.01448145229369402, -0.05504728481173515, 0.02697281539440155, 0.018132910132408142, -0.0064189257100224495, -0.045736514031887054, -0.0855027586221695, 0.025942232459783554, 0.02791455388069153, 0.04509684070944786, -0.016960179433226585, -0.09730114042758942, -0.036603424698114395, -0.0027363726403564215, 0.0006696560885757208, -0.017626503482460976, -0.020202958956360817, -0.051635704934597015, 0.08969616144895554, -0.0002631981624290347, 0.03397366404533386, -0.01979427970945835, -0.03200134262442589, -0.04371088743209839, 0.003824702464044094, -0.02439635992050171, -0.008311287499964237, 0.016249433159828186, -0.06055556982755661, 0.037172023206949234, -0.019190145656466484, 0.0628654956817627, -0.04300013929605484, 0.03230341151356697, -0.051920004189014435, 0.018852541223168373, -0.015218851156532764, 0.10049950331449509, -0.051920004189014435, -0.022672800347208977, -0.0034315711818635464, 0.03827367722988129, -0.03948194533586502, -0.004457710776478052, 0.015325463376939297, -0.001958993962034583, 0.027008352801203728, 0.037598468363285065, -0.059667136520147324, -0.051493555307388306, 0.043497662991285324, 0.02731041982769966, 0.0013637441443279386, -0.038415826857089996, 0.0003856352996081114, -0.05511835962533951, 0.022424040362238884, 0.043639812618494034, 0.04470593109726906, -0.06410930305719376, 0.0033471700735390186, 0.028412075713276863, -0.000664658669847995, 0.02915835939347744, 0.01645377278327942, 0.017626503482460976, -0.04168526083230972, -0.0038535764906555414, 0.026368681341409683, 0.0010366898495703936, -0.01741327904164791, -0.0628654956817627, -0.022601725533604622, 0.06503327190876007, 0.004846400115638971, -0.0005388899007812142, -0.061337389051914215, -0.022992637008428574, 0.0010844430653378367, 0.010225859470665455, -0.012233717367053032, -0.037598468363285065, -0.05369686707854271, -0.02212197333574295, -0.012669049203395844, -0.014854594133794308, 0.007116345688700676, -0.03182365745306015, 0.07199858129024506, 0.04580758884549141, 0.006738761439919472, -0.04662494361400604, 0.012233717367053032, 0.006334524601697922, -0.02930050902068615, -0.04253815487027168, 0.03667449951171875, 0.005281731951981783, -0.02601330727338791, -0.0037047641817480326, -0.005703737493604422, -0.006769856903702021, -0.07189197093248367, -0.010341355577111244, -0.07448619604110718, -0.017040137201547623, 0.020469488576054573, -0.02887406013906002, -0.08230440318584442, -0.06897790729999542, -0.017377741634845734, -0.004395520314574242, -0.00042228313395753503, -0.014037235639989376, 0.048401810228824615, 0.026102151721715927, 0.02601330727338791, -0.02683066576719284, -0.016098398715257645, 0.047584451735019684, -0.004519901238381863, -0.014152731746435165, -0.01317545585334301, -0.06435806304216385, -0.004248929210007191, -0.09587965160608292, -0.01307772845029831, 0.04779767617583275, -0.01513000763952732, 0.016515962779521942, -0.039268724620342255, 0.0043599833734333515, -0.02615545690059662, 0.012580206617712975, -0.047406766563653946, 0.035377386957407, 0.02853645570576191, 0.0022121972870081663, -0.0027785731945186853, 0.02249511517584324, -0.02521371841430664, 0.007396201603114605, 0.006410041358321905, -0.0377761572599411, -0.005117372144013643, 0.03509308770298958, 0.03573276102542877, -0.0005083500291220844, 0.007107461337000132, 0.020487256348133087, -0.010323586873710155, 0.04427948221564293, 0.024289747700095177, -0.04058360308408737, 0.01760873571038246, 0.03642573952674866, -0.022139741107821465, 0.02716827020049095, -0.02620876207947731, 0.07086138427257538, 0.015911828726530075, -0.02368561364710331, 0.027648024260997772, 0.0033627175725996494, -0.05369686707854271, 0.01740439608693123, 0.0031539357732981443, -0.00017449371807742864, 0.06044895574450493, 0.02555132284760475, 0.00341824465431273, -0.03990839421749115, 0.020540563389658928, 0.019047996029257774, -0.0219265166670084, 0.05422993004322052, -0.009355195797979832, 0.026528598740696907, 0.007480602711439133, -0.04801090061664581, -0.02126907743513584, 0.027843479067087173, 0.007094134576618671, -0.01803518272936344, 0.024467434734106064, -0.04513237997889519, 0.010341355577111244, -0.08308622241020203, -0.02835877053439617, 0.03752739354968071, -0.009093107655644417, -0.0012749008601531386, -0.03438234329223633, -0.045878659933805466, 0.006010246928781271, -0.025960002094507217, -0.013122149743139744, 0.029762493446469307, -0.015858523547649384, 0.00292516453191638, -0.024271979928016663, 0.03653234988451004, 0.006827604956924915, -0.052630748599767685, -0.021997591480612755, -0.031095141544938087, 0.014881246723234653, -0.019918659701943398, -0.03463110327720642, 0.033511679619550705, 0.05817456915974617, 0.01855047419667244, 0.0812382772564888, 0.005184004548937082, -0.020807093009352684, 0.0170756746083498, -0.016205010935664177, -0.027470337226986885, 0.043177828192710876, 0.03877120092511177, 0.008475647307932377, 0.013877318240702152, 0.06169276311993599, -0.007613867521286011, 0.03763400763273239, 0.025391405448317528, 0.011629583314061165, -0.06556633114814758, -0.004819747060537338, 0.0076982686296105385, 0.09467138350009918, 0.08863004297018051, -0.05124479532241821, 0.03324514999985695, 0.02734595723450184, -0.02635091170668602, 0.017386626452207565, -0.03973070904612541, 0.026244299486279488, 0.038557976484298706, -0.009568419307470322, -0.036123670637607574, 0.02436082251369953, -0.03637243062257767, 0.026670748367905617, 0.027186037972569466, -0.031219523400068283, 0.05931176245212555, 0.028465382754802704, -0.03791830688714981, 0.0007446176023222506, -0.02935381419956684, 0.0022899352479726076, 0.015449843369424343, -0.022175278514623642, -0.047726601362228394, -0.02739926241338253, -0.049396853893995285, 0.0029340488836169243, -0.03466664254665375, -0.022939329966902733, 0.03424019366502762, -0.04719354212284088, -0.031219523400068283, 0.009008706547319889, -0.0004195067740511149, -0.027470337226986885, 0.021624449640512466, 0.007493929471820593, -0.015467612072825432, 0.01835501752793789, 0.038877811282873154, -0.04698031768202782, -0.0708969235420227, -0.02254842035472393, 0.039410870522260666, -0.042076170444488525, 0.05863655358552933, -0.002022294793277979, 0.020096346735954285, 0.03710094839334488, 0.017946340143680573, 0.006667687091976404, -0.04829519987106323, -0.030793074518442154, -0.006556632928550243, -0.018115142360329628, 0.0012693480821326375, 0.022193048149347305, 0.015423190779983997, 0.031219523400068283, -0.02677736058831215, -0.0009278568322770298, -0.0281988512724638, -0.02306371182203293, 0.04936131834983826, -0.03766954317688942, 0.009639494121074677, -0.04491915553808212, -0.028483150526881218, 0.03228564187884331, -0.04058360308408737, -0.025284793227910995, 0.04136542230844498, 0.0402282290160656, -0.0068498156033456326, 0.011469664983451366, -0.029318276792764664, -0.044172871857881546, 0.05831671878695488, -0.0026430871803313494, 0.004726461600512266, 0.014214922674000263, -0.0369943343102932, 0.04015715420246124, 0.008791040629148483, -0.007342895958572626, 0.036461275070905685, 0.017386626452207565, 0.05803241953253746, -0.025675702840089798, -0.0005908077000640333, -0.08450771123170853, 0.005068508442491293, 0.034080274403095245, -0.0005835891934111714, 0.003957967273890972, -0.017919685691595078, 0.06169276311993599, -0.04609188437461853, 0.03425796329975128, 0.047264616936445236, 0.018941383808851242, 0.01564529910683632, 0.028518687933683395, 0.01134528499096632, -0.029424889013171196, -0.06158614903688431, 0.049645617604255676, 0.03905550017952919, -0.007023060228675604, -0.01740439608693123, -0.010909953154623508, 0.0001786582579370588, -0.03457779809832573, -0.04857949540019035, 0.017626503482460976, 0.012589090503752232, -0.04655386880040169, -0.06197706237435341, -0.02640421874821186, 0.008311287499964237, -0.037456318736076355, 0.0265819039195776, -0.019190145656466484, -0.053910091519355774, -0.015725256875157356, 0.02411206252872944, -0.03381374478340149, -0.005277290008962154, 0.05227537825703621, 0.0690845251083374, 0.00037619570503011346, -0.03329845517873764, -0.024183137342333794, -0.06780517846345901, 0.01906576380133629, 0.05021421238780022, 0.03077530674636364, 0.01003928855061531, -0.014312650077044964, 0.006920890416949987, 0.06805393844842911, -0.026368681341409683, -0.006974196061491966, 0.025178181007504463, -0.027701329439878464, 0.06254565715789795, -0.0521332286298275, -0.0428224541246891, -0.002476505935192108, 0.02739926241338253, 0.004597638733685017, -0.03139720857143402, -0.04594973474740982, 0.035892680287361145, 0.0044377208687365055, 0.05607786774635315, 0.055011749267578125, -0.017235593870282173, -0.03015340305864811, 0.023419084027409554, 0.014685791917145252, -0.08329944312572479, 0.05056958645582199, 0.017377741634845734, 0.02773686684668064, 0.022388502955436707, -0.06332747638225555, 0.034471187740564346, -0.02306371182203293, -0.024218672886490822, 0.03663896396756172, 0.05490513890981674, -0.06595724076032639, 0.0015802995767444372, 0.006196817848831415, 0.02126907743513584, 0.01575191132724285, -0.015076701529324055, 0.05661092698574066, 0.04037037864327431, 0.03633689507842064, -0.02501826360821724, -0.013610787689685822, 0.028696374967694283, 0.023774458095431328, -0.011967187747359276, -0.002407652558758855, 0.056148942559957504, -0.028234388679265976, -0.04001500457525253, 0.019918659701943398, 0.012597975321114063, 0.009097550064325333, 0.005050739739090204, -0.018923616036772728, -0.008448994718492031, 0.02597776986658573, -0.013450870290398598, 0.00915974099189043, 0.05888531729578972, 0.03727863356471062, -0.004322224762290716, 0.05216876417398453, 0.018230637535452843, -0.011522971093654633, -0.008142485283315182, 0.031237291172146797, 0.0050285286270082, 0.0329253152012825, 0.015352115966379642, 0.009595072828233242, 0.07811100035905838, 0.059205152094364166 ]
4,681
optbinning.binning.mdlp
MDLP
Minimum Description Length Principle (MDLP) discretization algorithm. Parameters ---------- min_samples_split : int (default=2) The minimum number of samples required to split an internal node. min_samples_leaf : int (default=2) The minimum number of samples required to be at a leaf node. max_candidates : int (default=32) The maximum number of split points to evaluate at each partition. Notes ----- Implementation of the discretization algorithm in [FI93]. A dynamic split strategy based on binning the number of candidate splits [CMR2001] is implemented to increase efficiency. For large size datasets, it is recommended to use a smaller ``max_candidates`` (e.g. 16) to get a significant speed up. References ---------- .. [FI93] U. M. Fayyad and K. B. Irani. "Multi-Interval Discretization of Continuous-Valued Attributes for Classification Learning". International Joint Conferences on Artificial Intelligence, 13:1022–1027, 1993. .. [CMR2001] D. M. Chickering, C. Meek and R. Rounthwaite. "Efficient Determination of Dynamic Split Points in a Decision Tree". In Proceedings of the 2001 IEEE International Conference on Data Mining, 91-98, 2001.
class MDLP(BaseEstimator): """ Minimum Description Length Principle (MDLP) discretization algorithm. Parameters ---------- min_samples_split : int (default=2) The minimum number of samples required to split an internal node. min_samples_leaf : int (default=2) The minimum number of samples required to be at a leaf node. max_candidates : int (default=32) The maximum number of split points to evaluate at each partition. Notes ----- Implementation of the discretization algorithm in [FI93]. A dynamic split strategy based on binning the number of candidate splits [CMR2001] is implemented to increase efficiency. For large size datasets, it is recommended to use a smaller ``max_candidates`` (e.g. 16) to get a significant speed up. References ---------- .. [FI93] U. M. Fayyad and K. B. Irani. "Multi-Interval Discretization of Continuous-Valued Attributes for Classification Learning". International Joint Conferences on Artificial Intelligence, 13:1022–1027, 1993. .. [CMR2001] D. M. Chickering, C. Meek and R. Rounthwaite. "Efficient Determination of Dynamic Split Points in a Decision Tree". In Proceedings of the 2001 IEEE International Conference on Data Mining, 91-98, 2001. """ def __init__(self, min_samples_split=2, min_samples_leaf=2, max_candidates=32): self.min_samples_split = min_samples_split self.min_samples_leaf = min_samples_leaf self.max_candidates = max_candidates # auxiliary self._splits = [] self._is_fitted = None def fit(self, x, y): """Fit MDLP discretization algorithm. Parameters ---------- x : array-like, shape = (n_samples) Data samples, where n_samples is the number of samples. y : array-like, shape = (n_samples) Target vector relative to x. Returns ------- self : MDLP """ return self._fit(x, y) def _fit(self, x, y): _check_parameters(**self.get_params()) x = check_array(x, ensure_2d=False, force_all_finite=True) y = check_array(y, ensure_2d=False, force_all_finite=True) idx = np.argsort(x) x = x[idx] y = y[idx] self._recurse(x, y, 0) self._is_fitted = True return self def _recurse(self, x, y, id): u_x = np.unique(x) n_x = len(u_x) n_y = len(np.bincount(y)) split = self._find_split(u_x, x, y) if split is not None: self._splits.append(split) t = np.searchsorted(x, split, side="right") if not self._terminate(n_x, n_y, y, y[:t], y[t:]): self._recurse(x[:t], y[:t], id + 1) self._recurse(x[t:], y[t:], id + 2) def _find_split(self, u_x, x, y): n_x = len(x) u_x = np.unique(0.5 * (x[1:] + x[:-1])[(y[1:] - y[:-1]) != 0]) if len(u_x) > self.max_candidates: percentiles = np.linspace(1, 100, self.max_candidates) splits = np.percentile(u_x, percentiles) else: splits = u_x max_entropy_gain = 0 best_split = None tt = np.searchsorted(x, splits, side="right") for i, t in enumerate(tt): samples_l = t >= self.min_samples_leaf samples_r = n_x - t >= self.min_samples_leaf if samples_l and samples_r: entropy_gain = self._entropy_gain(y, y[:t], y[t:]) if entropy_gain > max_entropy_gain: max_entropy_gain = entropy_gain best_split = splits[i] return best_split def _entropy(self, x): n = len(x) ns1 = np.sum(x) ns0 = n - ns1 p = np.array([ns0, ns1]) / n return -special.xlogy(p, p).sum() def _entropy_gain(self, y, y1, y2): n = len(y) n1 = len(y1) n2 = n - n1 ent_y = self._entropy(y) ent_y1 = self._entropy(y1) ent_y2 = self._entropy(y2) return ent_y - (n1 * ent_y1 + n2 * ent_y2) / n def _terminate(self, n_x, n_y, y, y1, y2): splittable = (n_x >= self.min_samples_split) and (n_y >= 2) n = len(y) n1 = len(y1) n2 = n - n1 ent_y = self._entropy(y) ent_y1 = self._entropy(y1) ent_y2 = self._entropy(y2) gain = ent_y - (n1 * ent_y1 + n2 * ent_y2) / n k = len(np.bincount(y)) k1 = len(np.bincount(y1)) k2 = len(np.bincount(y2)) t0 = np.log(3**k - 2) t1 = k * ent_y t2 = k1 * ent_y1 t3 = k2 * ent_y2 delta = t0 - (t1 - t2 - t3) return gain <= (np.log(n - 1) + delta) / n or not splittable @property def splits(self): """List of split points Returns ------- splits : numpy.ndarray """ if not self._is_fitted: raise NotFittedError("This {} instance is not fitted yet. Call " "'fit' with appropriate arguments." .format(self.__class__.__name__)) return np.sort(self._splits)
(min_samples_split=2, min_samples_leaf=2, max_candidates=32)
[ 0.013581105507910252, -0.012692911550402641, -0.0201082993298769, 0.043707408010959625, 0.021440589800477028, -0.027410078793764114, -0.019540267065167427, -0.020170265808701515, -0.04614477604627609, 0.0065271928906440735, -0.03383399546146393, 0.014934052713215351, 0.002126243431121111, 0.01319897547364235, -0.036725789308547974, 0.0023934761993587017, -0.005608015693724155, 0.0070177651941776276, -0.00415695458650589, 0.04259200021624565, -0.03930774703621864, 0.002889212453737855, -0.00037857977440580726, 0.026852376759052277, -0.0429224893450737, -0.0038161356933414936, 0.0284428633749485, -0.018590105697512627, -0.03825430944561958, -0.017392078414559364, -0.057505395263433456, -0.015057986602187157, 0.00004457914110389538, 0.012982090935111046, -0.0260674599558115, -0.056100811809301376, 0.04399658739566803, 0.055605076253414154, -0.04279855638742447, -0.013787662610411644, -0.07237748056650162, -0.04754936322569847, 0.035899560898542404, -0.004724985454231501, -0.017309455201029778, 0.043707408010959625, -0.0163799487054348, 0.061016861349344254, -0.025096643716096878, 0.0032532685436308384, 0.008370711468160152, -0.09658592939376831, -0.00020300655160099268, 0.018238959833979607, -0.017722567543387413, 0.09526396542787552, 0.0851840004324913, -0.019777808338403702, 0.03881201148033142, -0.04224085435271263, 0.029785482212901115, 0.007606451865285635, 0.03730414807796478, 0.012093896977603436, -0.04916050285100937, -0.03858479857444763, -0.07039453834295273, 0.014169792644679546, -0.0182802714407444, 0.05886867269873619, 0.02970285899937153, -0.04366609454154968, 0.05519196018576622, 0.02278320863842964, 0.010699639096856117, 0.03245006501674652, -0.004830845631659031, -0.019323382526636124, 0.07894598692655563, -0.03234678506851196, -0.017867157235741615, 0.02995072677731514, 0.04046446457505226, -0.042757246643304825, -0.003947815857827663, 0.004665600601583719, 0.045814283192157745, 0.04164183884859085, 0.04457494616508484, -0.01629732735455036, -0.02478680945932865, 0.06903126090765, 0.05258934572339058, 0.06985749304294586, 0.015192247927188873, 0.015316182747483253, -0.03552775830030441, 0.018073715269565582, -0.001482044579461217, -0.022452717646956444, 0.004051093943417072, 0.06589160114526749, 0.009284725412726402, 0.1030305027961731, -0.024580251425504684, -0.018197648227214813, -0.0028143355157226324, 0.03699431195855141, -0.028133027255535126, -0.03232612833380699, -0.09377676248550415, 0.04870608076453209, -0.03507333621382713, 0.04234413057565689, -0.07101421058177948, -0.01084422878921032, -0.03174776956439018, 0.03558972477912903, -0.044740188866853714, -0.01947830058634281, -0.025633690878748894, -0.00036115155671723187, -0.09212430566549301, -0.010937179438769817, -0.0006048239301890135, -0.08997611701488495, 0.05531589686870575, 0.047921162098646164, -0.032367441803216934, -0.06452832370996475, 0.009677182883024216, 0.024807464331388474, -0.022246161475777626, 0.02501402050256729, -0.004384167026728392, -0.03936971351504326, -0.0018125353381037712, 0.012878812849521637, 0.012827173806726933, -0.03998938575387001, 0.036023493856191635, -0.029207123443484306, 0.024828121066093445, -0.0005286561790853739, 0.025447789579629898, 0.004296380095183849, 0.052878525108098984, -0.02995072677731514, 0.029041877016425133, 0.004128552973270416, -0.04891263693571091, 0.008515301160514355, 0.0263979509472847, -0.058207690715789795, 0.03112810105085373, -0.01497536338865757, -0.018218304961919785, -0.009641035459935665, 0.009088496677577496, 0.00686801178380847, -0.02170911431312561, -0.06320635974407196, 0.008830300532281399, 0.021141082048416138, -0.01214553602039814, 0.04507068172097206, -0.026934998109936714, -0.03292514383792877, -0.04903656989336014, -0.01486175786703825, 0.006129571236670017, -0.002260505221784115, -0.06737881153821945, -0.014335038140416145, -0.0677092969417572, 0.04478150233626366, 0.01190799567848444, 0.000780397211201489, -0.009326037019491196, 0.032739244401454926, 0.032119572162628174, -0.04800378531217575, 0.0020733133424073458, -0.04350084811449051, -0.02478680945932865, 0.03019859455525875, 0.044533632695674896, -0.009883739985525608, 0.0070177651941776276, 0.037923816591501236, -0.07745877653360367, -0.07630205899477005, 0.007188174407929182, 0.010157427750527859, 0.0319543294608593, 0.02722417749464512, -0.0034314238000661135, 0.0365605428814888, -0.012785862199962139, 0.008355219848453999, 0.0013439097674563527, 0.02714155614376068, 0.02336156740784645, -0.015502083115279675, -0.020666001364588737, 0.040051352232694626, -0.027286145836114883, 0.04779722914099693, -0.004593305289745331, 0.016710439696907997, -0.048871323466300964, -0.042757246643304825, 0.0010308471973985434, 0.07609550654888153, 0.07237748056650162, -0.02914515696465969, -0.00511486129835248, -0.0026271436363458633, 0.04395527392625809, -0.03976217284798622, 0.02393992617726326, -0.05002804100513458, -0.0036715460009872913, 0.05618343502283096, 0.0014923724811524153, -0.003880684729665518, 0.06109948456287384, 0.02023223228752613, 0.04610346257686615, -0.021915670484304428, 0.007916287519037724, -0.059240471571683884, 0.03740742430090904, -0.047838542610406876, 0.028380896896123886, 0.0008681837935000658, -0.0205833800137043, -0.000631289032753557, -0.058538179844617844, 0.024807464331388474, -0.05895129218697548, -0.03360678255558014, -0.00516391871497035, -0.012992419302463531, -0.012042257934808731, 0.041332002729177475, 0.06820503622293472, 0.03174776956439018, 0.05238278955221176, 0.010079968720674515, -0.02416713908314705, -0.06969224661588669, -0.024435661733150482, -0.024146482348442078, 0.03158252686262131, -0.09014136344194412, -0.0022695420775562525, 0.02311369962990284, 0.034371040761470795, -0.020397478714585304, -0.011422587558627129, 0.02997138351202011, -0.04870608076453209, 0.07415387034416199, -0.052300166338682175, 0.021895013749599457, 0.03302842378616333, 0.009109152480959892, 0.007322436664253473, -0.004317035898566246, 0.020397478714585304, 0.07349288463592529, -0.04147659242153168, -0.01343651581555605, -0.0511847585439682, 0.042509377002716064, 0.006103751715272665, -0.04552510380744934, 0.0169273242354393, 0.046640511602163315, 0.0327598974108696, -0.02418779395520687, -0.019199449568986893, 0.009537757374346256, -0.012672255747020245, 0.010575705207884312, -0.026150083169341087, -0.09807313978672028, 0.014593233354389668, 0.002305689500644803, -0.09328102320432663, 0.01982944644987583, 0.01285815704613924, 0.0565965473651886, 0.08307711780071259, 0.02123403362929821, 0.009367348626255989, -0.033895961940288544, -0.011422587558627129, -0.027058932930231094, 0.003217121120542288, -0.005742277484387159, 0.022452717646956444, -0.020645346492528915, -0.013343565165996552, -0.05110213905572891, 0.026811065152287483, -0.04998673126101494, 0.020449116826057434, -0.0029382696375250816, 0.027534013614058495, 0.0801440179347992, 0.039906762540340424, -0.016720768064260483, -0.007193338591605425, -0.05097820237278938, 0.02842220664024353, 0.018259616568684578, 0.060686368495225906, 0.06973355263471603, -0.00182028126437217, 0.012827173806726933, 0.01091652363538742, 0.02722417749464512, 0.013013074174523354, -0.009491282515227795, 0.0721709281206131, 0.005324000027030706, -0.003041547955945134, -0.016586506739258766, -0.037428081035614014, -0.04013397544622421, -0.007900794968008995, 0.002337964018806815, -0.017588306218385696, 0.0009482245077379048, 0.048871323466300964, -0.03133465722203255, 0.040629711002111435, -0.032367441803216934, 0.03585825115442276, 0.004513264633715153, -0.03416448459029198, 0.023630091920495033, 0.0006887376075610518, -0.03042580746114254, 0.06271062791347504, -0.003315235720947385, -0.023898614570498466, 0.10228689759969711, -0.0016731095965951681, -0.004004618618637323, 0.04597952961921692, 0.018734697252511978, 0.04461625590920448, -0.012765206396579742, -0.02476615272462368, -0.007668418809771538, -0.005969489924609661, -0.005855883471667767, -0.0053962948732078075, -0.048995260149240494, -0.014903068542480469, 0.011536194011569023, -0.033772025257349014, -0.07101421058177948, -0.020376821979880333, 0.006599487736821175, 0.018590105697512627, -0.028215650469064713, -0.035197269171476364, -0.0775827094912529, -0.0049470337107777596, 0.0346602201461792, 0.022948453202843666, 0.029454991221427917, -0.046764444559812546, -0.006010801065713167, 0.013054385781288147, 0.055026713758707047, 0.023444190621376038, 0.012599960900843143, 0.020046330988407135, 0.012155864387750626, -0.04255068674683571, -0.008752841502428055, 0.03327628970146179, -0.021296000108122826, 0.06291718035936356, -0.035093989223241806, 0.06093423813581467, 0.014810117892920971, 0.018714040517807007, -0.014520938508212566, -0.04585559666156769, 0.002051366725936532, 0.04837558791041374, 0.003526956308633089, -0.03476350009441376, -0.014675856567919254, -0.03490808978676796, -0.013859957456588745, -0.02912450022995472, 0.027657948434352875, 0.004014946520328522, -0.0260674599558115, 0.0335654690861702, 0.023382222279906273, -0.03348284587264061, 0.020624689757823944, -0.05519196018576622, 0.01991206966340542, 0.034990713000297546, -0.022597307339310646, -0.017495356500148773, -0.0364159531891346, -0.03137597069144249, 0.04531854763627052, 0.04300511255860329, 0.0012206212850287557, 0.026377296075224876, -0.023402879014611244, -0.0002377016207901761, -0.012765206396579742, -0.026274017989635468, -0.04234413057565689, -0.08948037773370743, -0.023919271305203438, -0.016916997730731964, -0.039679549634456635, -0.04246806725859642, -0.006485881749540567, -0.07997877150774002, -0.03348284587264061, -0.055605076253414154, -0.005166500341147184, -0.030591053888201714, 0.0655197948217392, 0.016844702884554863, -0.035569071769714355, -0.0032119574025273323, 0.02879400923848152, 0.06490013003349304, 0.009739150293171406, 0.061512596905231476, -0.014944380149245262, -0.01422143168747425, -0.0034443335607647896, -0.1010475605726242, -0.026852376759052277, 0.03137597069144249, 0.004988345317542553, 0.04195167496800423, 0.019189121201634407, -0.05494409427046776, -0.0013529466232284904, 0.013426188379526138, -0.02501402050256729, 0.013364220969378948, 0.04031987488269806, 0.026232706382870674, 0.04730149358510971, 0.008773497305810452, 0.04494674503803253, -0.013601761311292648, 0.004812771920114756, 0.026811065152287483, 0.01284782961010933, 0.022555995732545853, -0.006372275296598673, 0.018424861133098602, 0.007998909801244736, -0.0063929310999810696, -0.006589159835129976, -0.004355765413492918, 0.022969109937548637, 0.004373839125037193, -0.00904202088713646, 0.020769279450178146, -0.032739244401454926, -0.002470934996381402, -0.029888760298490524, 0.018197648227214813, -0.010271034203469753, -0.033895961940288544, -0.0537460632622242, -0.04222019761800766, -0.02278320863842964, -0.0282982736825943, -0.014035530388355255, -0.04399658739566803, -0.03158252686262131, 0.011660127900540829, 0.0173301100730896, -0.007048748899251223, 0.018414532765746117, 0.05139131844043732, -0.01029169000685215, 0.08130073547363281, -0.10980556160211563, 0.009666855446994305, 0.05263065919280052, -0.03360678255558014, -0.044533632695674896, 0.04705362394452095, 0.036023493856191635, -0.015584706328809261, 0.043211668729782104, -0.07944171875715256, 0.020769279450178146, -0.03397858515381813, -0.07960696518421173, 0.0632476732134819, 0.005690637975931168, 0.007105551660060883, 0.023402879014611244, -0.012434715405106544, 0.01947830058634281, 0.01687568612396717, 0.01422143168747425, 0.02183304727077484, 0.019746825098991394, 0.03523857891559601, -0.054696224629879, 0.029207123443484306, 0.01735076680779457, -0.044988058507442474, -0.009511938318610191, 0.021915670484304428, 0.021750424057245255, -0.005551212467253208, -0.01650388352572918, 0.04399658739566803, 0.07316239923238754, 0.0032042113598436117, 0.04058840125799179, -0.0015840319683775306, -0.009207266382873058, 0.027058932930231094, 0.002896958263590932, -0.00869087502360344, -0.004247323144227266, 0.023630091920495033, -0.00947579089552164, 0.010260705836117268, 0.0505237802863121, 0.025530412793159485, 0.04858214408159256, -0.0014136226382106543, 0.042757246643304825, 0.07105551660060883, 0.021027475595474243, 0.02867007628083229, -0.011484554968774319, 0.06754405051469803, -0.03759332746267319, -0.020727969706058502, -0.022328782826662064, 0.011938979849219322, 0.005104533396661282, -0.03800643980503082, 0.04655788838863373, 0.019767479971051216, -0.04317035898566246, 0.02346484549343586, 0.00021301163360476494, -0.005628671031445265, 0.020438790321350098, -0.024146482348442078, -0.0002961184654850513, 0.010178083553910255, 0.053126394748687744, -0.022246161475777626, 0.0191581379622221, -0.053374260663986206, 0.03077695518732071, 0.004998673219233751, -0.06308242678642273, -0.06403259187936783, -0.01887928694486618, 0.0029382696375250816, 0.0016266342718154192, 0.015109625644981861, -0.02842220664024353, 0.00835005659610033, 0.02416713908314705, -0.058538179844617844, 0.018817318603396416, -0.02784384787082672, 0.028112372383475304, -0.036519233137369156, 0.01066865585744381, 0.009770133532583714, -0.04932574927806854, -0.0000017196251747009228, 0.028360240161418915, -0.044409699738025665, -0.01928207091987133, 0.040299221873283386, -0.05275459215044975, 0.012579305097460747, 0.0032971620094031096, -0.05370475351810455, 0.03416448459029198, 0.05676179379224777, -0.0265425406396389, -0.006196702364832163, -0.03397858515381813, 0.008856120519340038, -0.026026148349046707, -0.022824520245194435, 0.027100244536995888, 0.03278055414557457, -0.04597952961921692, -0.033317603170871735, 0.01567765697836876, 0.012228159233927727, -0.027265489101409912, 0.08295318484306335, -0.02604680508375168, 0.027678603306412697, 0.008830300532281399, 0.037552013993263245, 0.011308981105685234, -0.027182867750525475, -0.04796247556805611, 0.0007816881407052279, -0.06432177126407623, 0.002425750717520714, -0.015595033764839172, -0.016669128090143204, -0.019819119945168495, 0.006878339219838381, -0.028752697631716728, 0.0846056416630745, 0.028050405904650688, 0.058909982442855835, -0.032491374760866165, 0.003898758441209793, 0.019375022500753403, -0.05919916182756424, 0.001608560560271144, 0.0002073635987471789, -0.012703239917755127, -0.03676709905266762, -0.06585028767585754, 0.009036857634782791, 0.10336099565029144, 0.07878074049949646, 0.02393992617726326, 0.0027549504302442074, 0.0274927020072937, -0.04081561043858528, -0.057009659707546234, 0.005019328556954861, -0.015543394722044468, -0.007549648638814688, 0.038729388266801834, 0.012362420558929443, -0.02900056540966034, 0.0003006368933711201, 0.03858479857444763, 0.023919271305203438, 0.00533949164673686, -0.028339585289359093, -0.012579305097460747, 0.039204470813274384, -0.018011746928095818, -0.03207826241850853, 0.03713890165090561, -0.027389423921704292, -0.024807464331388474, -0.034494977444410324, 0.0036741280928254128, -0.015564050525426865, -0.046764444559812546, -0.018342237919569016, -0.03701496869325638, -0.008711530826985836, 0.026687130331993103, 0.08431646227836609, 0.06750274449586868, -0.019664201885461807, -0.04048512130975723, 0.06919650733470917, 0.03542448207736015, -0.023444190621376038, -0.0338546484708786, -0.01988108642399311, -0.05824900045990944, 0.024704186245799065, 0.005943670403212309, 0.03468087688088417, -0.027926471084356308, -0.019612561911344528, 0.017588306218385696, -0.028256962075829506, 0.011980290524661541, 0.016658801585435867, -0.04874739050865173, 0.00426281476393342, -0.0260674599558115, -0.04519461467862129, 0.01988108642399311, -0.037675950676202774, 0.0603971891105175, -0.09022398293018341, 0.019189121201634407, 0.0022953618317842484, -0.047218870371580124, 0.0028530650306493044, -0.017309455201029778, -0.0015827410388737917, -0.04186905175447464, 0.025158610194921494, 0.018776006996631622, -0.0297235157340765, 0.0037412589881569147, 0.007286289241164923, 0.02935171313583851, 0.020294200628995895, 0.0004434515140019357, 0.06638733297586441, 0.010260705836117268, -0.06766799092292786, 0.026439262554049492, 0.07448436319828033, -0.027513356879353523, 0.03527989238500595, -0.03325563669204712, -0.015357493422925472, 0.05209361016750336, -0.04283986613154411, 0.00869087502360344, -0.0033049078192561865, -0.03079761005938053, 0.015791263431310654, -0.040877580642700195, 0.055026713758707047, 0.02263861894607544, 0.0056493268348276615, -0.03333825618028641, -0.027058932930231094, 0.0070952242240309715, -0.02714155614376068, 0.08634071797132492, -0.023196322843432426, 0.012558650225400925, 0.03228481858968735, -0.049490995705127716, 0.03798578307032585, -0.04267462342977524, 0.0050632222555577755, 0.03594087436795235, -0.002842737128958106, 0.0016963472589850426, 0.036023493856191635, -0.021667802706360817, -0.010802917182445526, -0.04858214408159256, -0.017268143594264984, -0.0019906905945390463, 0.03294580057263374, 0.034618910402059555, -0.050771646201610565, 0.03457759693264961, 0.01708224229514599, 0.045235924422740936 ]
4,683
optbinning.binning.mdlp
__init__
null
def __init__(self, min_samples_split=2, min_samples_leaf=2, max_candidates=32): self.min_samples_split = min_samples_split self.min_samples_leaf = min_samples_leaf self.max_candidates = max_candidates # auxiliary self._splits = [] self._is_fitted = None
(self, min_samples_split=2, min_samples_leaf=2, max_candidates=32)
[ 0.01857997104525566, -0.01757097989320755, -0.018779950216412544, -0.01855270005762577, -0.031851377338171005, 0.0010146718705073, -0.0025156589690595865, 0.0016032496932893991, -0.03326942026615143, 0.0010868237586691976, -0.014271308667957783, 0.08275540918111801, -0.022997712716460228, 0.01148067694157362, -0.00035252177622169256, -0.009212720207870007, 0.03037879802286625, -0.033760279417037964, 0.0006482310127466917, 0.052758391946554184, -0.02701549604535103, 0.045849986374378204, -0.06323007494211197, 0.0967903733253479, -0.0067856889218091965, 0.05064950883388519, 0.01876177079975605, -0.018270909786224365, 0.020925192162394524, -0.012180606834590435, -0.07628332078456879, 0.006494808942079544, 0.005872143432497978, 0.011171616613864899, -0.019434431567788124, -0.0714837983250618, 0.03879614174365997, 0.04112318530678749, -0.06650248169898987, 0.030633317306637764, -0.01447128877043724, -0.07555612176656723, -0.0655207559466362, 0.029669776558876038, 0.0035382844507694244, 0.04134134575724602, 0.038105301558971405, 0.03108781762421131, -0.04061414301395416, -0.016907410696148872, -0.04643174633383751, -0.051449429243803024, -0.015180308371782303, 0.022434132173657417, -0.08050108700990677, 0.0759197250008583, 0.04461374506354332, 0.010935276746749878, -0.0009629724081605673, 0.01908901147544384, -0.036341842263936996, 0.021197892725467682, 0.05788515508174896, -0.02814265713095665, -0.0030860567931085825, -0.016462000086903572, -0.08290084451436996, 0.006831138860434294, -0.04334114491939545, 0.09104549139738083, 0.043232064694166183, -0.016180209815502167, 0.03519650176167488, 0.042032185941934586, -0.005903958342969418, 0.04166858270764351, -0.03857798129320145, 0.020616132766008377, 0.01271691732108593, -0.032414957880973816, 0.02757907658815384, 0.05610351264476776, -0.005290383007377386, -0.055521752685308456, -0.024106694385409355, -0.033160340040922165, 0.028506256639957428, -0.015153038315474987, 0.05864871293306351, 0.026015594601631165, -0.04494098573923111, 0.07013848423957825, 0.036850880831480026, 0.01148067694157362, 0.02459755353629589, 0.02165239304304123, -0.03076057694852352, 0.01572570949792862, 0.0003843367740046233, -0.03463292121887207, -0.038105301558971405, -0.004658627789467573, -0.018152739852666855, 0.06206655502319336, -0.02668825536966324, -0.008058289997279644, 0.00020054823835380375, -0.03546920046210289, -0.04388654604554176, 0.0046904426999390125, -0.03774170204997063, 0.08290084451436996, -0.012080617249011993, 0.11991535127162933, -0.06319371610879898, 0.016452910378575325, -0.019452610984444618, 0.015971139073371887, -0.03806894272565842, -0.027142755687236786, 0.017761869356036186, 0.008630960248410702, -0.06435723602771759, 0.039414264261722565, -0.029269816353917122, 0.009926285594701767, 0.05377647280693054, 0.023415854200720787, -0.021343331784009933, -0.05214026942849159, 0.08260996639728546, -0.053231071680784225, -0.0339420810341835, -0.004626812878996134, -0.018743591383099556, -0.04806794598698616, 0.026197394356131554, 0.013035067357122898, -0.0244157537817955, -0.043050263077020645, 0.03230587765574455, 0.012480577453970909, 0.036650899797677994, -0.014125867746770382, -0.008258270099759102, 0.022343233227729797, 0.025706535205245018, -0.015998410061001778, 0.04621358588337898, 0.007562884595245123, -0.01628929004073143, -0.04086866229772568, 0.009040010161697865, -0.014353117905557156, -0.03321487829089165, -0.010808016173541546, 0.024070333689451218, -0.07919212430715561, 0.03995966166257858, -0.014707628637552261, -0.007226554211229086, -0.028197195380926132, -0.02668825536966324, 0.009294530376791954, -0.01643472909927368, 0.023415854200720787, -0.047486186027526855, -0.07082932442426682, -0.03835982084274292, -0.011880637146532536, 0.020470691844820976, -0.02674279548227787, -0.03557828068733215, 0.012735097669064999, -0.0297788567841053, 0.042577583342790604, 0.024579374119639397, -0.010017185471951962, 0.0038223471492528915, 0.03450566157698631, 0.020925192162394524, -0.013989518396556377, 0.015134858898818493, -0.04283210635185242, -0.022088712081313133, 0.001238513272255659, 0.004035962279886007, 0.028215376660227776, 0.01682559959590435, -0.005390373058617115, -0.015889329835772514, -0.04399562627077103, -0.03377845883369446, 0.017825501039624214, -0.021252432838082314, 0.031433239579200745, -0.0029724317137151957, 0.02996065653860569, -0.0009016148978844285, 0.015362109057605267, -0.050249550491571426, 0.03616004064679146, 0.022997712716460228, -0.05454003065824509, -0.018889030441641808, 0.05395827069878578, -0.036887239664793015, 0.04654082655906677, 0.0354328416287899, 0.017307370901107788, -0.008858210407197475, -0.03503287956118584, 0.02510659396648407, 0.08464612811803818, 0.07410172373056412, -0.01700739935040474, -0.006803868804126978, -0.03439658135175705, -0.0009317255462519825, -0.010608036071062088, 0.06024855375289917, -0.04046870395541191, 0.031905919313430786, 0.007153834216296673, 0.005072223022580147, 0.008003749884665012, 0.06693879514932632, -0.0562853142619133, -0.015834789723157883, 0.0072947293519973755, 0.005017682909965515, -0.06330280005931854, -0.000313321128487587, -0.03626912087202072, -0.02310679294168949, 0.0452682264149189, 0.011844276450574398, -0.024052154272794724, -0.05708523467183113, -0.03508742153644562, -0.007449259515851736, 0.006199383642524481, -0.021488772705197334, -0.05755791440606117, -0.0022634114138782024, 0.041050463914871216, -0.006026673596352339, 0.028215376660227776, 0.03230587765574455, -0.022525032982230186, 0.011498856358230114, -0.015571178868412971, -0.022434132173657417, -0.00817191507667303, 0.025361115112900734, -0.02394307404756546, -0.01787094958126545, -0.009789935313165188, 0.010417145676910877, 0.011126166209578514, -0.025142954662442207, 0.032742198556661606, -0.007785589434206486, 0.11220702528953552, -0.026906415820121765, 0.021306972950696945, 0.009108184836804867, 0.019579870626330376, 0.01159884687513113, -0.017707331106066704, 0.1330776810646057, 0.05083131045103073, -0.010535316541790962, 0.019307171925902367, -0.01965259201824665, -0.029615236446261406, -0.00548581825569272, -0.037778060883283615, 0.005531268194317818, 0.007449259515851736, 0.04901330918073654, -0.005035862792283297, 0.011235246434807777, 0.02599741518497467, 0.04035962373018265, -0.022924993187189102, -0.019452610984444618, -0.03650546073913574, -0.013180507346987724, -0.036705441772937775, -0.07497436553239822, 0.005544903222471476, 0.03879614174365997, 0.021343331784009933, 0.062466517090797424, 0.011335236951708794, 0.011589756235480309, -0.005240388214588165, -0.01959805190563202, -0.004422287456691265, 0.003917792346328497, -0.056867074221372604, -0.006849318742752075, 0.011635206639766693, -0.01605295017361641, -0.05334015190601349, 0.007340179290622473, -0.022579573094844818, 0.039741501212120056, 0.031105998903512955, 0.04341386631131172, 0.04628630727529526, 0.07199284434318542, -0.02507023513317108, -0.025779254734516144, -0.033251240849494934, 0.0607575960457325, -0.02170693315565586, 0.013607737608253956, 0.04243214428424835, -0.034796539694070816, -0.008158279582858086, 0.010935276746749878, 0.002486116485670209, 0.00775831937789917, -0.0033178518060594797, 0.03416024148464203, -0.016571080312132835, -0.06915675848722458, -0.011044356040656567, -0.057521551847457886, -0.03177865967154503, 0.039232462644577026, 0.004131407476961613, -0.04003238305449486, 0.03314216062426567, 0.01855270005762577, 0.020779751241207123, 0.002069112379103899, -0.049631427973508835, 0.06137571483850479, -0.012662377208471298, -0.012726007029414177, 0.04457738623023033, -0.012289687059819698, -0.004913148004561663, 0.003281491808593273, -0.04428650438785553, -0.016116579994559288, -0.004826792981475592, -0.009553595446050167, -0.029742497950792313, 0.028506256639957428, 0.0162347499281168, 0.0759197250008583, 0.007190193980932236, -0.005013138055801392, -0.010817105881869793, 0.016298379749059677, -0.017052849754691124, 0.0244157537817955, -0.03159685805439949, -0.02748817577958107, 0.019761672243475914, -0.010389875620603561, -0.017825501039624214, -0.03570554032921791, 0.004179129842668772, 0.01950715109705925, -0.011835186742246151, -0.009699035435914993, -0.06846591830253601, -0.0390143021941185, 0.02623375505208969, 0.05017682909965515, -0.005131307989358902, -0.07882852852344513, 0.010444415733218193, 0.01453491859138012, 0.024761173874139786, -0.04065050184726715, 0.023306773975491524, 0.0640299990773201, 0.0031701393891125917, -0.07577428221702576, -0.003415569430217147, -0.007603789214044809, -0.021543312817811966, 0.09817205369472504, 0.02099791169166565, 0.02557927556335926, 0.018743591383099556, -0.04235942289233208, -0.021906912326812744, -0.030651498585939407, 0.015443919226527214, 0.051267631351947784, -0.004826792981475592, -0.03252403810620308, -0.013571377843618393, -0.024761173874139786, -0.01547118928283453, -0.04545002803206444, 0.04410470649600029, 0.03183319792151451, -0.0031587767880409956, 0.06257559359073639, 0.025633815675973892, 0.00836734939366579, 0.00009374068031320348, -0.02263411320745945, -0.014553098008036613, 0.04690442606806755, 0.0006777734961360693, -0.036614540964365005, 0.0001728521310724318, -0.0339420810341835, 0.038723424077034, 0.022379592061042786, -0.04148678481578827, 0.028215376660227776, 0.04232306405901909, -0.0026906414423137903, -0.013189597986638546, 0.00380416726693511, 0.010308066383004189, -0.019288990646600723, -0.05395827069878578, 0.04508642479777336, -0.05304927006363869, -0.08879116922616959, 0.004313207697123289, -0.06141207367181778, -0.03154231980443001, -0.029233457520604134, -0.009944465942680836, -0.0842825323343277, 0.05697615444660187, -0.020707031711935997, -0.05610351264476776, 0.02117971144616604, -0.03643273934721947, 0.07253824174404144, -0.004476827569305897, 0.01697104051709175, -0.007153834216296673, -0.024761173874139786, 0.015016688965260983, -0.051922108978033066, -0.033251240849494934, 0.03268766030669212, -0.036141861230134964, 0.013298677280545235, 0.006390273571014404, 0.03154231980443001, -0.02450665459036827, -0.047304388135671616, 0.025124775245785713, 0.035632818937301636, 0.004199582617729902, -0.00884457491338253, 0.0038609798066318035, 0.02147059328854084, -0.01584387943148613, -0.028815316036343575, 0.03188773989677429, 0.037778060883283615, 0.036850880831480026, 0.0037609897553920746, -0.024961154907941818, 0.017561890184879303, 0.04443194717168808, 0.03121507726609707, -0.02692459523677826, 0.006558438763022423, 0.01297143753618002, 0.022888632491230965, -0.01867086999118328, 0.017761869356036186, -0.024088513106107712, -0.00354055711068213, -0.007517434190958738, 0.024088513106107712, 0.021306972950696945, -0.0485406294465065, -0.03206953778862953, -0.09497237205505371, -0.03654181957244873, -0.04341386631131172, 0.002540656365454197, -0.01234422717243433, 0.028542617335915565, -0.015798429027199745, 0.013453207910060883, -0.018889030441641808, 0.02227051369845867, 0.05992131307721138, 0.03766898065805435, 0.03285127878189087, 0.00769014423713088, -0.0220341719686985, 0.01341684814542532, -0.027451815083622932, -0.038723424077034, 0.043704744428396225, 0.015462098643183708, -0.058212392032146454, -0.011689746752381325, -0.08362805098295212, 0.016398370265960693, -0.011862456798553467, -0.06813868135213852, 0.023652194067835808, 0.04283210635185242, 0.011262516491115093, 0.007749229669570923, -0.004547275137156248, 0.031942278146743774, -0.011544306762516499, 0.04475918412208557, 0.03308761864900589, 0.03139687702059746, 0.022434132173657417, -0.0351419597864151, 0.018334541469812393, -0.020107092335820198, 0.01617112010717392, -0.03356029838323593, 0.03332395851612091, 0.037778060883283615, 0.030269717797636986, -0.027288196608424187, -0.006358458660542965, 0.06890223920345306, -0.015116678550839424, 0.04955871030688286, 0.015552999451756477, -0.014871248975396156, 0.11140710115432739, 0.00348828942514956, -0.011580666527152061, 0.007290184032171965, 0.04839518666267395, 0.005794878117740154, -0.013989518396556377, 0.027270015329122543, 0.01085346657782793, 0.05286747217178345, 0.022888632491230965, 0.014416748657822609, 0.08937293291091919, -0.017943670973181725, -0.016652889549732208, -0.04028690233826637, 0.018189100548624992, -0.035487379878759384, 0.004563182592391968, -0.0545036718249321, 0.018743591383099556, 0.0010959138162434101, -0.013571377843618393, 0.03825074061751366, 0.03416024148464203, 0.006608434021472931, 0.012689647264778614, -0.025724714621901512, -0.028833497315645218, 0.00582214817404747, -0.05021318793296814, 0.00096126802964136, 0.022906813770532608, 0.04425014555454254, -0.034323859959840775, 0.057012513279914856, -0.038941580802202225, 0.03263311833143234, -0.004935872741043568, 0.01377135794609785, -0.0693749189376831, 0.02576107531785965, 0.01652562990784645, 0.012353316880762577, -0.013425937853753567, -0.03108781762421131, -0.013880438171327114, 0.047995228320360184, -0.06243015453219414, -0.011417046189308167, -0.06926584243774414, 0.005044952966272831, 0.04741346836090088, 0.05497635155916214, -0.022743193432688713, -0.031669579446315765, -0.015716619789600372, -0.012144247069954872, -0.03659636154770851, -0.06061215326189995, 0.005481273401528597, -0.05879415571689606, -0.03361484035849571, 0.04537730664014816, -0.054394591599702835, 0.061048474162817, 0.041741304099559784, -0.0354328416287899, -0.029578877612948418, 0.010498955845832825, -0.0550854317843914, 0.030415156856179237, -0.016116579994559288, 0.01885267160832882, 0.026524635031819344, -0.07322908192873001, -0.03912338241934776, -0.012180606834590435, -0.012007896788418293, -0.0024156689178198576, 0.05014047026634216, -0.04312298446893692, -0.00372690218500793, -0.024106694385409355, -0.004599542822688818, 0.05214026942849159, -0.06799323856830597, -0.07421080023050308, -0.02939707785844803, -0.05813967436552048, -0.0026179214473813772, -0.0034564745146781206, 0.016480179503560066, -0.03570554032921791, 0.00899455975741148, -0.07628332078456879, 0.05563083291053772, 0.040723223239183426, 0.03452384099364281, 0.008985470049083233, 0.041232265532016754, 0.0021986449137330055, -0.04101410508155823, 0.00847188476473093, 0.04999502748250961, -0.032596759498119354, -0.015807518735527992, -0.08050108700990677, 0.0024906613398343325, 0.077446848154068, 0.056539833545684814, 0.0011419318616390228, -0.010262615978717804, 0.05239478871226311, -0.01708921045064926, -0.006144843529909849, -0.028106296434998512, -0.031996820122003555, 0.011444316245615482, 0.030487878248095512, 0.043195705860853195, -0.021670572459697723, -0.0550854317843914, 0.012726007029414177, 0.06410271674394608, -0.023034073412418365, 0.0016214296920225024, 0.03656000271439552, 0.006808414123952389, 0.0037950770929455757, -0.03165140002965927, 0.05697615444660187, -0.05963043496012688, 0.017743689939379692, -0.006526623852550983, -0.010026276111602783, -0.02939707785844803, -0.02454301342368126, -0.019252631813287735, -0.021761473268270493, -0.001180564402602613, 0.01754371076822281, 0.02507023513317108, 0.05755791440606117, -0.01638018898665905, -0.04494098573923111, 0.05763063207268715, 0.022979533299803734, -0.0878458097577095, 0.008371895179152489, 0.007149289362132549, 0.024942973628640175, 0.017652790993452072, 0.0044927350245416164, 0.061448436230421066, -0.00991719588637352, -0.0405050627887249, 0.06348459422588348, -0.03314216062426567, -0.06257559359073639, -0.0009561549522913992, -0.023906713351607323, 0.022343233227729797, 0.017143750563263893, -0.09264533221721649, 0.033723920583724976, -0.0324694998562336, 0.015180308371782303, -0.08704589307308197, 0.02894257754087448, 0.01220787689089775, -0.046322666108608246, 0.057339753955602646, 0.04494098573923111, -0.03014245815575123, -0.015125769190490246, -0.01784368045628071, 0.03937790170311928, 0.031105998903512955, 0.011080716736614704, -0.006481173913925886, 0.0014566733734682202, 0.0405050627887249, -0.04061414301395416, 0.053412869572639465, 0.024724815040826797, -0.02963341772556305, 0.009262715466320515, 0.048831507563591, 0.00038291647797450423, 0.0339420810341835, -0.051740311086177826, 0.027288196608424187, 0.00954450573772192, -0.06333915889263153, 0.0040086922235786915, 0.011817006394267082, -0.035069242119789124, 0.055194512009620667, -0.02001619152724743, 0.06410271674394608, 0.00020154245430603623, 0.01428039837628603, -0.031615037471055984, 0.03654181957244873, 0.03132415935397148, -0.06035763397812843, 0.04083230346441269, 0.007281094323843718, -0.011207976378500462, 0.028197195380926132, -0.01885267160832882, -0.0043700202368199825, -0.00400641979649663, 0.039923302829265594, 0.042395785450935364, -0.013016887940466404, -0.03536012023687363, -0.010044455528259277, -0.026288295164704323, -0.022434132173657417, -0.06141207367181778, 0.0013225957518443465, -0.015980228781700134, 0.05297655239701271, -0.017561890184879303, -0.013707728125154972, 0.039923302829265594, 0.05824875459074974, -0.01796185038983822 ]
4,689
optbinning.binning.mdlp
_entropy
null
def _entropy(self, x): n = len(x) ns1 = np.sum(x) ns0 = n - ns1 p = np.array([ns0, ns1]) / n return -special.xlogy(p, p).sum()
(self, x)
[ -0.07544626295566559, -0.016148600727319717, 0.07461945712566376, 0.06225178390741348, 0.11754459142684937, -0.00410174485296011, -0.056808628141880035, -0.06145942583680153, 0.04516441002488136, 0.07358594983816147, 0.0067048994824290276, -0.013203096576035023, 0.04375194385647774, 0.011446128599345684, -0.04650797322392464, 0.008418804034590721, 0.009258531965315342, 0.011316940188407898, -0.015950512140989304, -0.010602095164358616, 0.028731591999530792, 0.059013448655605316, -0.01167005579918623, -0.035053230822086334, -0.08784839510917664, 0.013134196400642395, 0.02123863995075226, -0.020050102844834328, -0.06800498813390732, -0.05126212164759636, -0.014822263270616531, 0.0013414104469120502, 0.04630127176642418, -0.009818349964916706, 0.03500155732035637, -0.012893043458461761, 0.0008591056102886796, 0.0025493258144706488, -0.05115877091884613, -0.030884739011526108, -0.03575946390628815, -0.013134196400642395, -0.028507664799690247, 0.046818025410175323, -0.03637956827878952, 0.015580170787870884, 0.0020756334997713566, 0.08405885100364685, -0.034863755106925964, -0.03286563232541084, -0.04430314898490906, -0.02185874618589878, 0.030919188633561134, -0.01774192973971367, 0.01506341528147459, 0.0591857023537159, 0.040651414543390274, -0.030798612162470818, -0.013194483704864979, 0.027077974751591682, 0.02919667214155197, 0.054155949503183365, 0.039101146161556244, -0.031005315482616425, 0.03748198226094246, 0.030436884611845016, -0.06455995887517929, 0.04519885778427124, 0.03841213881969452, 0.043372992426157, 0.02480425126850605, -0.03415752202272415, 0.03317568823695183, 0.014710299670696259, 0.01698402315378189, 0.04619792103767395, -0.01098104938864708, 0.015545720234513283, 0.03744753077626228, -0.01400406751781702, 0.000926929758861661, 0.01190259587019682, 0.043028488755226135, 0.030385209247469902, 0.033744119107723236, -0.06559346616268158, 0.0053182728588581085, 0.021824296563863754, -0.033020660281181335, 0.03436422348022461, -0.015287342481315136, 0.040823664516210556, 0.027525829151272774, 0.03462260216474533, -0.012376287952065468, 0.04475100338459015, -0.04637017101049423, 0.02967897616326809, 0.08839959651231766, -0.007992480881512165, 0.041926074773073196, 0.13869710266590118, 0.008095832541584969, 0.05591291934251785, -0.023736290633678436, 0.034312549978494644, 0.026320068165659904, 0.02132476679980755, 0.014598336070775986, 0.00461204070597887, -0.04995300620794296, 0.041478220373392105, 0.03129814192652702, -0.04512995854020119, -0.028628241270780563, -0.07496396452188492, -0.0001095413463190198, 0.0398935042321682, -0.010903535410761833, 0.04461320489645004, -0.010636545717716217, -0.029523950070142746, 0.0030703875236213207, -0.0024718125350773335, 0.015606008470058441, -0.03892889618873596, 0.01694095879793167, -0.035862814635038376, -0.03730972856283188, 0.016165826469659805, 0.0033718280028551817, 0.008715938776731491, 0.036241769790649414, 0.07896020263433456, 0.014805037528276443, -0.05777323618531227, 0.006170919165015221, -0.03286563232541084, 0.09446285665035248, -0.03920449689030647, 0.026216715574264526, 0.014469146728515625, 0.06559346616268158, 0.023288436233997345, 0.08633257448673248, 0.007436969317495823, 0.033675216138362885, 0.03069526143372059, 0.05518946051597595, -0.05450045317411423, -0.012238486669957638, 0.020963037386536598, 0.046060118824243546, -0.03443312644958496, 0.010188691318035126, 0.04013465717434883, -0.00769534707069397, -0.026767922565340996, -0.023305661976337433, 0.0036022146232426167, 0.010447069071233273, -0.0009075513808056712, -0.017862506210803986, -0.028455989435315132, -0.023357337340712547, -0.029093321412801743, -0.02738802880048752, 0.01801753230392933, 0.026854047551751137, -0.04895394667983055, -0.007910661399364471, -0.060942668467760086, -0.001775269629433751, 0.016613680869340897, 0.03703412786126137, 0.003989781253039837, -0.05026306211948395, 0.02974787726998329, -0.028972744941711426, 0.04568116366863251, 0.01844816282391548, -0.05253678560256958, -0.014029905200004578, -0.027319127693772316, -0.034140296280384064, 0.01318587176501751, 0.05849669501185417, 0.016424205154180527, -0.032934535294771194, 0.03300343453884125, -0.03755088150501251, -0.047334782779216766, -0.014658624306321144, -0.038343239575624466, 0.044957708567380905, 0.011980108916759491, -0.024201370775699615, 0.013254771940410137, -0.027698080986738205, -0.031659871339797974, -0.01377152744680643, 0.01837926171720028, -0.011893982999026775, 0.01984340138733387, -0.029799552634358406, -0.011506416834890842, -0.0066316924057900906, 0.009172406047582626, -0.016785932704806328, -0.023856867104768753, 0.008647037670016289, 0.019791726022958755, -0.047713734209537506, 0.017707480117678642, -0.014477759599685669, -0.00044677796540781856, -0.035587210208177567, -0.011566705070436, -0.010447069071233273, -0.04023800790309906, -0.019895076751708984, -0.037344180047512054, -0.011988721787929535, 0.036241769790649414, 0.03923894837498665, 0.013452861458063126, 0.023116184398531914, 0.04196052625775337, 0.031212016940116882, 0.014658624306321144, 0.004043609835207462, 0.0715189278125763, 0.005809190217405558, 0.024855926632881165, 0.07806449383497238, 0.001557801733724773, -0.012238486669957638, -0.0061364686116576195, -0.03405417129397392, 0.03040243312716484, -0.08109612762928009, -0.03768868371844292, 0.0407547652721405, -0.0052493722178041935, -0.026027239859104156, 0.049918558448553085, -0.00861689355224371, 0.08206073194742203, -0.016424205154180527, 0.010912148281931877, -0.04433760046958923, -0.06283743679523468, -0.0030294775497168303, -0.06035701185464859, 0.04678357392549515, -0.03048855997622013, 0.009689160622656345, 0.04244283214211464, -0.011747569777071476, -0.042959585785865784, -0.006722124759107828, 0.020618533715605736, -0.05115877091884613, -0.009077667258679867, -0.06493891030550003, -0.00032889319118112326, -0.002885216847062111, 0.03837769106030464, -0.0033933594822883606, 0.030178505927324295, 0.09391165524721146, 0.010645158588886261, 0.01594189926981926, -0.07606637477874756, 0.013452861458063126, -0.013487312011420727, 0.06910740584135056, 0.014985902234911919, -0.014934226870536804, 0.11099902540445328, 0.006549872923642397, -0.025372682139277458, 0.014710299670696259, 0.02056685835123062, -0.02940337359905243, 0.008026931434869766, -0.03810208663344383, -0.08791729062795639, -0.003309386782348156, -0.0026419111527502537, -0.015924673527479172, 0.09590977430343628, 0.003776619676500559, 0.07799559086561203, 0.04227057844400406, -0.02774975635111332, -0.018224235624074936, -0.013582050800323486, 0.02378796599805355, 0.08750388771295547, -0.0016633059130981565, 0.0324866808950901, -0.02940337359905243, -0.04705917835235596, 0.008814983069896698, -0.03768868371844292, 0.0509176179766655, -0.0075187887996435165, 0.01632085256278515, 0.028886618092656136, 0.0019378322176635265, 0.06421545147895813, 0.006037423852831125, 0.04271843284368515, 0.022203249856829643, -0.021359216421842575, 0.020497959107160568, 0.014167706482112408, 0.04430314898490906, 0.06349199265241623, 0.043028488755226135, 0.07468836009502411, 0.021531468257308006, -0.006670448929071426, -0.011678668670356274, -0.06283743679523468, 0.0398935042321682, -0.035225484520196915, 0.008362822234630585, -0.0662824735045433, -0.02902442030608654, -0.054224852472543716, -0.0012768161250278354, 0.00996476411819458, -0.11148133128881454, 0.020963037386536598, 0.032004375010728836, 0.014761975035071373, -0.035690560936927795, -0.04416535049676895, -0.056808628141880035, 0.027801431715488434, -0.03627621755003929, 0.049091748893260956, -0.020635759457945824, -0.062424033880233765, -0.0064163776114583015, -0.04299403727054596, -0.03160819783806801, 0.029989030212163925, 0.023839641362428665, -0.024046344682574272, 0.09439396113157272, 0.0037443223409354687, 0.05067646503448486, 0.008276696316897869, -0.026681795716285706, -0.011403066106140614, -0.042029425501823425, 0.015502657741308212, -0.0002441130200168118, -0.027870332822203636, -0.017673030495643616, -0.013022231869399548, -0.007053709123283625, 0.03703412786126137, 0.012143748812377453, 0.018069209530949593, -0.012910268269479275, 0.029523950070142746, -0.056429672986269, -0.04819604009389877, -0.0670059323310852, 0.0468524768948555, 0.025872213765978813, 0.004857499152421951, -0.055430613458156586, -0.0420638769865036, -0.02461477555334568, 0.015442369505763054, 0.00778577895835042, 0.038549941033124924, -0.041202619671821594, -0.0032124952413141727, -0.009585809893906116, 0.04299403727054596, 0.01125665195286274, -0.013013619929552078, 0.017845280468463898, 0.003195269964635372, -0.0055292812176048756, -0.03830878809094429, 0.015218442305922508, -0.024666450917720795, -0.05067646503448486, -0.006076180376112461, 0.04326963797211647, 0.026492320001125336, -0.030161282047629356, -0.01965392380952835, -0.006386233493685722, 0.0351049080491066, 0.027301901951432228, -0.031177567318081856, -0.0530879907310009, -0.020980263128876686, -0.025699961930513382, 0.011144688352942467, -0.0073163933120667934, -0.0038175294175744057, -0.06989976018667221, 0.06435325741767883, 0.02526933141052723, -0.041340421885252, 0.015761034563183784, -0.061769478023052216, -0.009740836918354034, -0.05522391200065613, -0.014891163446009159, -0.005684307776391506, 0.011480579152703285, -0.029696201905608177, -0.016277790069580078, 0.015054803341627121, 0.0034837916027754545, -0.02893829345703125, -0.019963977858424187, 0.0011110238265246153, -0.0014899775851517916, 0.0039316462352871895, -0.048540543764829636, -0.010016439482569695, 0.016837608069181442, -0.022754456847906113, 0.024270271882414818, -0.04178827628493309, 0.01910271868109703, 0.025682736188173294, -0.04216722771525383, -0.00048795691691339016, -0.03112589195370674, 0.05005635693669319, 0.07255243510007858, 0.057635433971881866, 0.06028811261057854, 0.009017379023134708, -0.02029125578701496, -0.0025170287117362022, -0.028455989435315132, -0.029885679483413696, 0.008074300363659859, -0.04957405477762222, 0.06710927933454514, 0.00021787155128549784, -0.030919188633561134, -0.0031371349468827248, -0.04647352173924446, -0.016966797411441803, 0.017543841153383255, 0.03326181322336197, 0.0016342385206371546, 0.05257123336195946, 0.01074850931763649, -0.02766363136470318, -0.0020465662237256765, -0.0696241557598114, -0.03879109397530556, 0.04072031378746033, 0.07627307623624802, 0.027508605271577835, 0.048540543764829636, 0.07062321901321411, 0.0027840188704431057, -0.012264324352145195, -0.011721731163561344, -0.042959585785865784, -0.00693743908777833, 0.005042669828981161, 0.04292513430118561, -0.020980263128876686, -0.028524890542030334, -0.049298450350761414, 0.050194159150123596, -0.061769478023052216, -0.0048144361935555935, -0.011713119223713875, -0.04361414164304733, -0.00983557477593422, 0.06776383519172668, 0.0014135409146547318, 0.020429058000445366, -0.006373314652591944, -0.009344657883048058, 0.005809190217405558, -0.04898839816451073, -0.05129656940698624, 0.04998745769262314, 0.0063431705348193645, -0.019877852872014046, -0.030092380940914154, -0.026802372187376022, 0.028817716985940933, -0.02637174353003502, -0.012565765529870987, 0.001256361254490912, 0.06938300281763077, -0.02533823251724243, 0.0167514830827713, -0.03324458748102188, 0.010584870353341103, -0.020997488871216774, -0.02664734609425068, 0.013797365128993988, -0.0448199063539505, 0.02893829345703125, -0.012660503387451172, -0.05429375171661377, 0.03768868371844292, 0.030712487176060677, 0.029627300798892975, -0.009181017987430096, 0.029076095670461655, 0.0034536474850028753, -0.024011893197894096, 0.0023103265557438135, 0.03507045656442642, -0.03134981915354729, -0.020342931151390076, -0.023960217833518982, 0.0784778967499733, -0.04199497774243355, -0.06073596701025963, -0.034949880093336105, 0.06514561176300049, -0.07145002484321594, 0.07654868066310883, -0.06225178390741348, -0.04123706743121147, 0.0041491142474114895, 0.010851860046386719, -0.037516430020332336, -0.08364544808864594, 0.06755713373422623, 0.009646098129451275, 0.02196209877729416, 0.015950512140989304, -0.03593171387910843, 0.04978075623512268, -0.0020896289497613907, 0.00084403355140239, -0.02883494272828102, -0.01636391691863537, 0.004646490793675184, -0.018585963174700737, 0.08212963491678238, -0.02003287896513939, 0.02048073336482048, 0.020963037386536598, -0.032572805881500244, 0.020687434822320938, -0.015993574634194374, -0.04216722771525383, 0.0545349046587944, -0.06473220884799957, -0.019326645880937576, -0.02297838404774666, -0.02573441155254841, -0.011609767563641071, -0.023564038798213005, 0.01478781271725893, -0.06331974267959595, 0.0641121044754982, -0.032211076468229294, 0.016837608069181442, -0.036620721220970154, -0.021927647292613983, 0.008423110470175743, -0.0696241557598114, 0.02149701863527298, -0.049849655479192734, -0.0448199063539505, -0.03810208663344383, -0.021738171577453613, 0.00922408141195774, 0.011997334659099579, 0.02626839280128479, -0.02442529797554016, 0.03525993227958679, -0.01708737388253212, 0.02351236343383789, -0.048643894493579865, -0.05777323618531227, -0.027198551222682, 0.0020691740792244673, 0.006213981658220291, -0.0033632153645157814, -0.01583854854106903, 0.007992480881512165, 0.018982142210006714, 0.005873784888535738, 0.03300343453884125, 0.010869085788726807, -0.011782019399106503, 0.01235045026987791, 0.04251173138618469, -0.016096925362944603, 0.007893436588346958, -0.046990279108285904, 0.007803004235029221, -0.0674537867307663, -0.021066389977931976, 0.03240055590867996, -0.010584870353341103, 0.018792666494846344, -0.009387720376253128, 0.0047326167114079, 0.05808328837156296, -0.038722194731235504, 0.02092858776450157, -0.012264324352145195, 0.0017063688719645143, 0.0032275670673698187, -0.0004898409242741764, -0.03699967637658119, 0.003565611317753792, -0.029351698234677315, 0.012290162034332752, 0.04013465717434883, -0.005985748488456011, 0.01855151355266571, -0.011454741470515728, -0.00021746783750131726, -0.024029118940234184, 0.012255712412297726, 0.05150327458977699, 0.04557781293988228, -0.02489037811756134, 0.00119930284563452, -0.0034579539205878973, 0.029506724327802658, -0.011558092199265957, 0.06883180141448975, -0.02855934016406536, -0.02947227470576763, -0.015511269681155682, 0.008057075552642345, -0.03520825877785683, 0.06879734992980957, -0.03253835439682007, -0.02387409284710884, 0.015959125012159348, -0.010059501975774765, 0.049367353320121765, 0.0032813958823680878, 0.048540543764829636, -0.039652351289987564, -0.03327903896570206, 0.02607891522347927, 0.004383807070553303, -0.056257423013448715, -0.010266204364597797, -0.009930313564836979, -0.01781083084642887, 0.03689632564783096, 0.03682742267847061, -0.025889437645673752, -0.018224235624074936, -0.06249293312430382, -0.09315374493598938, -0.013952392153441906, 0.024597549811005592, -0.02783588320016861, -0.018430937081575394, 0.006235513370484114, 0.04196052625775337, -0.030454110354185104, 0.022254925221204758, 0.03665517270565033, 0.03796428442001343, 0.0008278850000351667, -0.0059900544583797455, -0.021634818986058235, 0.01818978413939476, -0.06335419416427612, 0.040823664516210556, -0.018224235624074936, -0.027439704164862633, 0.013719852082431316, -0.07709988206624985, -0.0062010628171265125, -0.04647352173924446, -0.048299390822649, -0.017139049246907234, -0.0073077804408967495, 0.004599121864885092, 0.010154240764677525, -0.012806917540729046, 0.08020041137933731, 0.04223613068461418, -0.03190102428197861, 0.021720945835113525, 0.020342931151390076, 0.0022694168146699667, 0.0033912062644958496, -0.03150484338402748, 0.009508296847343445, 0.0002607999194879085, -0.03140149265527725, -0.02902442030608654, 0.034123070538043976, 0.016785932704806328, 0.002835694467648864, -0.019154394045472145, -0.020704660564661026, 0.012849980965256691, 0.07303474098443985, -0.011316940188407898, 0.025493258610367775, -0.03383024409413338, 0.021359216421842575, -0.0038842770736664534, -0.013246160000562668, 0.046714674681425095, 0.05660192668437958, -0.0536736436188221, -0.004084519576281309, 0.06407765299081802, -0.002964883344247937, 0.018672090023756027, -0.025131531059741974, -0.028697142377495766, -0.00505558867007494, -0.013849040493369102, -0.03958345204591751, -0.009938926436007023, 0.006782412528991699, -0.029541175812482834, -0.011058562435209751, -0.004136194940656424, -0.04585341736674309, -0.0029885678086429834, 0.004874724429100752, 0.009344657883048058, 0.0001522005768492818, 0.05894454941153526, -0.006653223652392626, -0.02332288771867752, -0.01965392380952835, 0.03648291900753975, -0.005339804105460644, 0.010584870353341103, 0.018224235624074936, -0.037068575620651245, -0.03551831096410751, 0.05126212164759636, -0.012806917540729046, 0.00987002532929182, -0.004136194940656424, -0.002155299996957183, 0.003449341282248497, -0.023357337340712547, -0.0620795302093029, -0.005339804105460644, 0.021979322656989098, -0.03389914333820343, -0.0078073106706142426, 0.0586000457406044, 0.004534527193754911 ]
4,690
optbinning.binning.mdlp
_entropy_gain
null
def _entropy_gain(self, y, y1, y2): n = len(y) n1 = len(y1) n2 = n - n1 ent_y = self._entropy(y) ent_y1 = self._entropy(y1) ent_y2 = self._entropy(y2) return ent_y - (n1 * ent_y1 + n2 * ent_y2) / n
(self, y, y1, y2)
[ -0.045938875526189804, -0.03664786368608475, 0.07804446667432785, 0.07852622121572495, 0.04026103392243385, -0.025773944333195686, -0.049758508801460266, 0.006843515671789646, 0.006598336156457663, 0.0518920011818409, 0.006383266765624285, -0.045388296246528625, 0.014409665018320084, 0.058498941361904144, -0.033017490059137344, -0.023588838055729866, -0.005617619026452303, -0.06476176530122757, 0.020818740129470825, -0.03926311060786247, 0.009832983836531639, 0.004778847098350525, 0.017214173451066017, -0.027597734704613686, -0.08616549521684647, -0.017145350575447083, -0.008701717481017113, -0.022367242723703384, -0.07694331556558609, -0.022780176252126694, -0.017326010391116142, -0.06789318472146988, 0.03377453610301018, 0.022487681359052658, 0.03334439545869827, -0.0437021479010582, 0.0027528912760317326, 0.03795548900961876, -0.052855513989925385, -0.07604862004518509, -0.0700610801577568, 0.004525064956396818, 0.03895341232419014, 0.04273863881826401, -0.03613169863820076, 0.026427756994962692, -0.0801091343164444, 0.0042089126072824, 0.003245400730520487, 0.0017108789179474115, -0.010633043013513088, -0.030488271266222, 0.0007016646559350193, -0.008207057602703571, 0.03671668842434883, 0.03158942610025406, 0.031744278967380524, -0.0005693968269042671, -0.05602133646607399, 0.004051912110298872, 0.035787586122751236, -0.00036185464705340564, 0.018719660118222237, -0.004297091159969568, -0.00009073250112123787, 0.007987686432898045, -0.09077659249305725, 0.07425924390554428, 0.05196082219481468, 0.02257370948791504, 0.008749032393097878, 0.01578611135482788, 0.0373016782104969, 0.007708095479756594, -0.040846023708581924, 0.018891716375947, -0.07515393197536469, 0.05106613412499428, 0.06572528183460236, 0.001387199154123664, -0.042256880551576614, -0.030247393995523453, 0.08767958730459213, -0.022143568843603134, 0.043564505875110626, -0.007441409397870302, -0.06255945563316345, 0.019511116668581963, 0.021334907039999962, -0.02439749985933304, -0.04518182948231697, 0.04827883094549179, 0.027288034558296204, 0.05199523642659187, 0.050033800303936005, 0.007712397258728743, -0.07315808534622192, 0.0350305400788784, 0.055814869701862335, 0.032690584659576416, 0.012482641264796257, 0.08582139015197754, -0.001589364605024457, 0.04576681926846504, -0.027322446927428246, -0.003314223140478134, 0.0031099068000912666, 0.02116285264492035, 0.008142536506056786, 0.023915743455290794, -0.07432806491851807, -0.08320613950490952, 0.017076529562473297, -0.04253217205405235, -0.041155725717544556, -0.030006514862179756, 0.00299161858856678, 0.030522681772708893, 0.03189912810921669, 0.049035876989364624, 0.01040076743811369, -0.025963205844163895, 0.02284899726510048, 0.024879254400730133, 0.005892907734960318, -0.06538116931915283, 0.049035876989364624, -0.03153781220316887, -0.016224853694438934, -0.04060514643788338, 0.0247932281345129, 0.0163883063942194, 0.002206614473834634, 0.09139598906040192, 0.04851970821619034, -0.024311471730470657, -0.017824972048401833, 0.021042412146925926, 0.10144404321908951, 0.006920940708369017, 0.04624857380986214, 0.006753186695277691, 0.06940726935863495, -0.008396318182349205, 0.0055014812387526035, -0.0020646685734391212, 0.019717583432793617, -0.024139415472745895, 0.015553835779428482, 0.0002943765721283853, 0.00552728958427906, 0.014994654804468155, 0.060873307287693024, -0.019442295655608177, 0.01787658780813217, 0.03723285347223282, -0.0400545671582222, -0.011605157516896725, 0.004697120748460293, 0.018409959971904755, 0.018891716375947, -0.024689994752407074, 0.03571876510977745, -0.04019221290946007, 0.029146237298846245, -0.0005602564197033644, -0.0354778878390789, 0.04728090763092041, 0.009635119698941708, -0.04019221290946007, -0.005325124133378267, -0.062180932611227036, -0.0012656848412007093, -0.009506077505648136, 0.035512298345565796, -0.007209134288132191, -0.0341186448931694, -0.00803500134497881, -0.022195186465978622, 0.024139415472745895, 0.04617975279688835, -0.033241163939237595, -0.032518528401851654, -0.014160185120999813, 0.012973000295460224, 0.004744436126202345, 0.062180932611227036, 0.026410551741719246, -0.0054197548888623714, 0.027339652180671692, -0.042704224586486816, -0.05378461256623268, -0.01219874992966652, -0.032914258539676666, 0.0869225412607193, 0.011699788272380829, 0.037921078503131866, 0.02116285264492035, -0.02443191036581993, 0.027184801176190376, -0.01574309729039669, 0.01299020554870367, -0.01933906227350235, 0.010667453519999981, 0.05034349858760834, 0.018891716375947, 0.0074629164300858974, 0.06197446584701538, -0.04008898138999939, -0.07136870920658112, -0.013368728570640087, 0.004389571025967598, -0.02265973575413227, 0.029197853058576584, 0.028010668233036995, 0.005806880071759224, 0.005135862622410059, 0.00994481984525919, -0.028974181041121483, -0.03654463216662407, 0.018375549465417862, -0.04955204203724861, -0.04896705597639084, 0.03453158214688301, 0.042394526302814484, -0.002391574438661337, 0.012998809106647968, 0.06355737894773483, 0.014960243366658688, 0.011192223988473415, -0.012525655329227448, 0.04473448544740677, 0.022642530500888824, 0.0023657658603042364, 0.0651058778166771, 0.035649944096803665, 0.01040076743811369, -0.02475881576538086, -0.031967949122190475, 0.04067396745085716, -0.04163748025894165, 0.0035529504530131817, 0.032965872436761856, 0.020078901201486588, -0.05357814580202103, 0.015725892037153244, 0.04342686012387276, 0.020681096240878105, 0.0014743023784831166, 0.04445919394493103, -0.02357163093984127, -0.023365164175629616, -0.0015958166914060712, -0.010839509777724743, 0.003892760258167982, -0.039297524839639664, -0.005054136272519827, -0.022831792011857033, -0.02926667593419552, -0.035237010568380356, -0.021833868697285652, 0.06603498011827469, -0.13434109091758728, 0.02630731835961342, -0.04951763153076172, 0.04951763153076172, 0.020010078325867653, -0.007015571463853121, -0.047487374395132065, 0.02816551923751831, 0.07749389111995697, 0.02744288556277752, 0.014031142927706242, -0.031107671558856964, -0.037060800939798355, -0.01806584931910038, 0.07308926433324814, -0.009660927578806877, -0.018668044358491898, 0.05319962278008461, 0.0007339251460507512, -0.039848100394010544, -0.023003848269581795, 0.00617680000141263, 0.007660780567675829, 0.0054541658610105515, -0.019218621775507927, -0.05227052420377731, 0.04032985866069794, -0.016732417047023773, -0.01471936609596014, 0.06362619996070862, 0.045663584023714066, 0.06252504140138626, 0.0637294352054596, -0.009901805780827999, -0.01200948841869831, 0.01078789308667183, 0.00578967435285449, 0.08121029287576675, -0.00720053119584918, 0.05966892093420029, -0.021128440275788307, -0.033292777836322784, 0.01875407248735428, -0.07350219786167145, 0.08203615993261337, -0.0048347655683755875, 0.028475219383835793, 0.016715211793780327, -0.004165899008512497, 0.034204673022031784, -0.00914476066827774, 0.03878135606646538, -0.027236418798565865, -0.008447934873402119, 0.02293502539396286, 0.07226339727640152, 0.031090466305613518, 0.045938875526189804, 0.0491391085088253, 0.004744436126202345, 0.037783432751894, 0.0003884695179294795, 0.04108690097928047, -0.03857488930225372, 0.03406703099608421, 0.01902936026453972, 0.035925231873989105, -0.0008946896996349096, -0.07164399325847626, -0.01574309729039669, -0.021076824516057968, 0.003673389321193099, -0.033017490059137344, 0.002031332580372691, -0.0002094240626320243, -0.003972336184233427, -0.029335498809814453, 0.005157369654625654, -0.07776918262243271, -0.02789022959768772, -0.039297524839639664, 0.004963807296007872, 0.045078594237565994, -0.021231673657894135, -0.00030244168010540307, -0.05010262131690979, 0.008929691277444363, 0.035787586122751236, -0.018599221482872963, -0.02329634316265583, 0.08499551564455032, -0.01582912541925907, 0.020010078325867653, 0.03599405288696289, -0.020268162712454796, -0.04535388574004173, -0.025447038933634758, -0.015734493732452393, -0.0568816177546978, -0.01723998226225376, -0.008267276920378208, -0.012938588857650757, -0.04132778197526932, 0.060185085982084274, 0.013893498107790947, -0.0013925759121775627, -0.0532340370118618, 0.028922563418745995, -0.05337167903780937, -0.02247047610580921, -0.03798989951610565, 0.05316521227359772, -0.0017108789179474115, -0.00025727704633027315, -0.03222603350877762, -0.005406850483268499, 0.008667306043207645, 0.01615603081882, 0.0008086618036031723, 0.0623529888689518, -0.09979230910539627, 0.04012339189648628, -0.01535597164183855, 0.028836537152528763, -0.0001205062071676366, -0.040433090180158615, 0.002039935439825058, -0.002060367027297616, 0.07639273256063461, -0.04273863881826401, 0.0464206300675869, -0.04473448544740677, -0.01773894391953945, -0.025361010804772377, -0.0011516979429870844, 0.04081161320209503, -0.048485297709703445, -0.01151052676141262, -0.023967359215021133, 0.04032985866069794, -0.017541078850626945, -0.0491391085088253, -0.029645198956131935, 0.03936634585261345, 0.02630731835961342, 0.07570450752973557, -0.059049516916275024, 0.007015571463853121, -0.10571102797985077, 0.01828952133655548, -0.005131561309099197, -0.012680505402386189, -0.012973000295460224, -0.0682372897863388, -0.02589438296854496, -0.06366061419248581, 0.02202313020825386, 0.02893977053463459, 0.0034733745269477367, -0.0327766127884388, -0.037749022245407104, -0.014444076456129551, 0.01933906227350235, -0.040983669459819794, -0.06039155274629593, 0.02429426647722721, 0.042428936809301376, -0.02548144944012165, 0.00468851812183857, 0.012998809106647968, 0.03668227791786194, -0.024879254400730133, 0.016964692622423172, -0.012938588857650757, 0.060357142239809036, -0.0033292779698967934, 0.02907741442322731, -0.032742202281951904, -0.022332830354571342, 0.02365765906870365, 0.06675761193037033, 0.06548440456390381, -0.005510083865374327, -0.0714375302195549, -0.00907593872398138, 0.003292716108262539, -0.038024310022592545, -0.011063181795179844, -0.020595068112015724, 0.021489758044481277, 0.03712962195277214, 0.03654463216662407, 0.0034841280430555344, 0.02556747756898403, -0.05409431457519531, -0.03076356090605259, -0.0022173679899424314, 0.017945410683751106, 0.0048691765405237675, 0.03878135606646538, -0.0015786110889166594, 0.08072853833436966, 0.0008194153197109699, -0.028974181041121483, 0.017033515498042107, 0.0006140238256193697, 0.028544042259454727, 0.0028453711420297623, 0.015106490813195705, -0.031279727816581726, -0.002065743785351515, 0.020371396094560623, -0.011347074061632156, -0.0019625104032456875, 0.01747225783765316, 0.010142683982849121, 0.05602133646607399, -0.04518182948231697, -0.04146542400121689, 0.0030754958279430866, 0.013730045408010483, -0.05419754609465599, 0.03084958903491497, -0.02825154736638069, -0.04624857380986214, -0.043805383145809174, -0.011570746079087257, 0.009583503007888794, 0.013480564579367638, -0.028544042259454727, -0.012233160436153412, -0.016121620312333107, -0.08492669463157654, -0.013196672312915325, 0.03057429939508438, -0.018100259825587273, -0.03785225376486778, 0.005049834959208965, -0.024517938494682312, 0.028199929744005203, -0.04012339189648628, -0.014882818795740604, 0.004206762183457613, 0.056537505239248276, -0.01656036265194416, 0.022539297118782997, -0.032294854521751404, 0.06875345855951309, 0.032019566744565964, -0.006529514212161303, 0.03623493015766144, -0.009764160960912704, 0.02689230628311634, 0.007045681122690439, -0.017575491219758987, 0.058223649859428406, 0.07246986031532288, 0.019924050197005272, -0.0423257052898407, 0.032053977251052856, 0.038609299808740616, -0.050894077867269516, 0.039297524839639664, -0.03936634585261345, -0.020543450489640236, -0.022195186465978622, 0.00571224931627512, 0.022229596972465515, -0.016551759093999863, -0.04036426916718483, 0.005695044063031673, 0.030436653643846512, -0.09531886130571365, 0.00857697706669569, -0.05932480841875076, -0.009506077505648136, -0.06851258128881454, 0.0008484497084282339, -0.0023485603742301464, -0.07584215700626373, 0.02074991911649704, 0.031382959336042404, 0.01033194549381733, 0.047212086617946625, -0.041843947023153305, -0.008439332246780396, 0.0014151581563055515, 0.05492018163204193, -0.03795548900961876, -0.0007823157939128578, 0.0005989689379930496, 0.004770244471728802, 0.05151347815990448, 0.007037078496068716, -0.000600044266320765, 0.024105004966259003, -0.020491834729909897, 0.03905664384365082, -0.01629367470741272, -0.0341186448931694, 0.018822893500328064, -0.04531947150826454, -0.0031744278967380524, -0.027356857433915138, -0.002447492443025112, 0.05430078133940697, 0.006598336156457663, 0.011200826615095139, -0.08382554352283478, 0.08079735934734344, 0.005600413307547569, 0.03940075635910034, -0.06393589824438095, 0.0505155548453331, -0.002048538299277425, -0.07763153314590454, 0.023055464029312134, -0.015011860057711601, -0.009299610741436481, 0.005393946543335915, 0.0023076971992850304, 0.017859382554888725, -0.007991987280547619, 0.013781662099063396, -0.01787658780813217, 0.010288931429386139, -0.022590914741158485, 0.06255945563316345, -0.05264904722571373, -0.05450724810361862, -0.021679019555449486, 0.0013194521889090538, -0.005062739364802837, 0.0044046263210475445, -0.016732417047023773, 0.02097359113395214, 0.0159237552434206, 0.021266086027026176, 0.030006514862179756, -0.039331935346126556, 0.011192223988473415, -0.038437243551015854, 0.02238444797694683, 0.035787586122751236, 0.006538116838783026, -0.06183682009577751, -0.021214468404650688, -0.022195186465978622, -0.022866202518343925, 0.0341186448931694, -0.006155292969197035, -0.00548427551984787, -0.03176148235797882, 0.025447038933634758, 0.03195074573159218, -0.04026103392243385, -0.03840283304452896, 0.05337167903780937, -0.016775431111454964, 0.02529218979179859, 0.02838919125497341, -0.007368285674601793, -0.013506373390555382, -0.04022662341594696, 0.025361010804772377, 0.0017280845204368234, 0.0035464982502162457, 0.007527437061071396, -0.03217441588640213, -0.009781367145478725, 0.005475672893226147, -0.020784329622983932, 0.049896154552698135, 0.0026303015183657408, -0.0056219203397631645, -0.010082464665174484, 0.019597144797444344, 0.010590028949081898, -0.04294510558247566, 0.059634506702423096, -0.061183009296655655, 0.016439922153949738, -0.03829960152506828, -0.002832466969266534, -0.07694331556558609, 0.05357814580202103, -0.01687866449356079, -0.04208482429385185, 0.022177981212735176, -0.019683172926306725, 0.049620866775512695, 0.024603966623544693, -0.014874216169118881, -0.024741610512137413, -0.02949034795165062, 0.02506851591169834, 0.014667749404907227, -0.04180953651666641, 0.0035249912180006504, 0.032415296882390976, 0.025447038933634758, 0.022745763882994652, -0.004636901430785656, 0.008310290984809399, 0.02470720000565052, -0.10571102797985077, -0.013549386523663998, 0.0015302204992622137, 0.028509629890322685, -0.054266370832920074, -0.013953717425465584, 0.014435473829507828, -0.007905960083007812, -0.024328676983714104, 0.02116285264492035, 0.04201600328087807, 0.04346127063035965, 0.011484718881547451, 0.02930108644068241, 0.021042412146925926, 0.002924947068095207, -0.04697120934724808, 0.03582199662923813, 0.03737049922347069, -0.010177095420658588, 0.03084958903491497, -0.014056950807571411, -0.03398100286722183, -0.03007533773779869, -0.04907028749585152, -0.04697120934724808, -0.023554425686597824, -0.003509936388581991, -0.054851360619068146, -0.009910408407449722, 0.022177981212735176, -0.01597537286579609, -0.02962799184024334, -0.003632526146247983, 0.012172941118478775, -0.02343398705124855, -0.043667737394571304, -0.04039867967367172, 0.031004438176751137, -0.037921078503131866, -0.01933906227350235, -0.04445919394493103, -0.019184211269021034, -0.04280745983123779, -0.01001364178955555, 0.012474038638174534, -0.01611301675438881, 0.010048053227365017, 0.04531947150826454, -0.0157000832259655, 0.024948077276349068, -0.015614055097103119, 0.013136452995240688, -0.028698891401290894, 0.024586761370301247, -0.0029636595863848925, 0.0016495840391144156, -0.02517174929380417, -0.004011048469692469, 0.0741904228925705, -0.02893977053463459, 0.0025098626501858234, -0.03840283304452896, -0.03695756569504738, -0.02130049653351307, 0.008641498163342476, -0.06548440456390381, -0.05309639126062393, 0.005914414767175913, -0.06548440456390381, -0.08499551564455032, 0.08024678379297256, -0.004912190604954958, 0.004912190604954958, 0.005617619026452303, 0.010263122618198395, 0.02069830149412155, 0.007277956232428551, -0.026221290230751038, -0.016147427260875702, -0.03840283304452896, 0.02484484389424324, -0.023692071437835693, 0.020423011854290962, 0.04704003036022186, 0.01952832192182541, 0.0054670702666044235, 0.06954491883516312, 0.0012194447917863727, 0.01656896434724331, 0.0012431024806573987, -0.006589733529835939, 0.025240572169423103, 0.010082464665174484, -0.018409959971904755, 0.021180057898163795, 0.01779055967926979, -0.04518182948231697, 0.017145350575447083, 0.03447996452450752, 0.05447283759713173 ]
4,691
optbinning.binning.mdlp
_find_split
null
def _find_split(self, u_x, x, y): n_x = len(x) u_x = np.unique(0.5 * (x[1:] + x[:-1])[(y[1:] - y[:-1]) != 0]) if len(u_x) > self.max_candidates: percentiles = np.linspace(1, 100, self.max_candidates) splits = np.percentile(u_x, percentiles) else: splits = u_x max_entropy_gain = 0 best_split = None tt = np.searchsorted(x, splits, side="right") for i, t in enumerate(tt): samples_l = t >= self.min_samples_leaf samples_r = n_x - t >= self.min_samples_leaf if samples_l and samples_r: entropy_gain = self._entropy_gain(y, y[:t], y[t:]) if entropy_gain > max_entropy_gain: max_entropy_gain = entropy_gain best_split = splits[i] return best_split
(self, u_x, x, y)
[ 0.01109541766345501, -0.020712634548544884, -0.05278782919049263, 0.05805949121713638, 0.04552149027585983, 0.00875344779342413, 0.040890976786613464, 0.015458784066140652, -0.030365468934178352, 0.006896790582686663, 0.017702801153063774, 0.009661740623414516, -0.03668789938092232, -0.049582093954086304, -0.0025245193392038345, -0.004657226148992777, 0.005311730783432722, -0.013045575469732285, 0.007640344090759754, 0.02808583341538906, -0.027302207425236702, 0.018361758440732956, 0.003922577481716871, 0.010730319656431675, -0.042102035135030746, 0.008277039043605328, 0.03561931848526001, 0.021923691034317017, -0.017310988157987595, -0.022778553888201714, -0.037542764097452164, -0.0217277854681015, 0.003470657393336296, 0.001833281829021871, -0.027106301859021187, -0.0024221136700361967, 0.06924395263195038, 0.10073143243789673, -0.0014158679405227304, -0.0390031561255455, -0.09168412536382675, -0.03248481824994087, 0.013446292839944363, 0.036759138107299805, -0.025111619383096695, 0.050187621265649796, -0.014826541766524315, 0.042102035135030746, -0.010970749892294407, 0.06792604178190231, -0.00019757590780500323, -0.08035718649625778, -0.042565084993839264, 0.021335972473025322, 0.021834641695022583, 0.044844724237918854, 0.05332212150096893, -0.03259167820215225, 0.0013245934387668967, 0.014960113912820816, 0.019857769832015038, 0.030187372118234634, 0.03925248980522156, 0.031202523037791252, -0.028584502637386322, -0.034639786928892136, -0.07017005980014801, 0.01735551282763481, -0.060730937868356705, 0.056100428104400635, 0.023170366883277893, -0.026732299476861954, 0.04926151782274246, 0.022814173251390457, -0.014247727580368519, 0.0351206474006176, 0.03585084527730942, 0.01811242289841175, 0.07472933083772659, -0.01766718178987503, 0.02219083532691002, 0.01150504034012556, 0.016135551035404205, -0.05503184720873833, 0.012529095634818077, -0.006456001661717892, 0.01983996108174324, 0.021603116765618324, 0.06382981687784195, -0.001534970011562109, -0.047801125794649124, 0.03494255244731903, 0.06030350551009178, 0.07323332130908966, -0.011033084243535995, 0.03132719174027443, -0.05453317612409592, 0.06447096914052963, -0.009483643807470798, -0.03722218796610832, -0.0011520623229444027, 0.07807754725217819, 0.0020314143039286137, 0.07786383479833603, 0.00008814389730105177, -0.0032391317654401064, 0.03077509254217148, 0.0217455942183733, -0.06012541055679321, -0.0067943851463496685, -0.06008979305624962, 0.017818564549088478, -0.054818131029605865, 0.07544171810150146, -0.06343800574541092, -0.010632366873323917, -0.009234308265149593, 0.031060045585036278, 0.025628099218010902, -0.03193271905183792, -0.054319459944963455, -0.010997464880347252, -0.08505893498659134, -0.00776055920869112, -0.003931482322514057, -0.06247628480195999, 0.05228916183114052, 0.031469669193029404, -0.06347362697124481, 0.016055408865213394, 0.05595795065164566, 0.009679550305008888, -0.06927957385778427, -0.005017871502786875, 0.00029302455368451774, -0.01438129972666502, -0.01299214642494917, 0.02714192122220993, 0.04758740961551666, -0.05499622970819473, -0.00458598742261529, -0.034532930701971054, 0.005396327003836632, 0.008107847534120083, 0.038931917399168015, 0.019715292379260063, 0.04320623353123665, 0.007399913389235735, 0.07964479923248291, -0.02039206027984619, -0.04769426956772804, 0.048192936927080154, 0.026518583297729492, -0.06899461895227432, -0.007373198866844177, -0.014568301849067211, -0.01276062149554491, -0.002288541290909052, 0.029065364971756935, 0.010026838630437851, 0.051469914615154266, -0.011407086625695229, -0.020605776458978653, -0.013855915516614914, -0.002268505282700062, 0.03268072381615639, -0.030472327023744583, 0.0225826483219862, -0.008379444479942322, -0.019875580444931984, -0.015975264832377434, 0.02130035310983658, -0.10172877460718155, 0.015565642155706882, -0.07041939347982407, -0.02758716233074665, -0.022707315161824226, -0.03967992216348648, -0.020944159477949142, 0.05033009871840477, 0.03768523782491684, -0.043954238295555115, 0.06486278027296066, -0.06500525772571564, -0.033642448484897614, -0.009118545800447464, 0.06610945612192154, 0.011041988618671894, -0.01609993167221546, 0.010641271248459816, -0.06415039300918579, -0.048406653106212616, -0.03266291692852974, -0.01585950143635273, 0.0056857336312532425, 0.03462197631597519, -0.012689382769167423, 0.055316802114248276, -0.08285053819417953, -0.03611798956990242, -0.03939496725797653, -0.014532682485878468, -0.02040986903011799, -0.02357998862862587, -0.015868406742811203, 0.003953744191676378, -0.0011732113780453801, 0.056385383009910583, 0.008410612121224403, -0.02402523159980774, -0.030864140018820763, -0.005988498218357563, -0.02881602942943573, 0.06155018508434296, 0.023722466081380844, 0.01036522164940834, -0.027106301859021187, -0.016687650233507156, 0.07049063593149185, -0.03871820122003555, 0.01861109398305416, -0.0340164490044117, 0.042280130088329315, 0.055103085935115814, 0.01989338919520378, -0.012529095634818077, 0.04331309348344803, -0.01651845872402191, 0.034426070749759674, -0.055708613246679306, 0.003906994126737118, -0.026625441387295723, 0.02391837351024151, -0.03109566494822502, 0.010828273370862007, 0.022921031340956688, 0.012716096825897694, 0.001088615390472114, -0.01552111841738224, -0.0036264918744564056, -0.03125595301389694, 0.004741821903735399, -0.0009550430113449693, -0.011077607981860638, -0.01614445634186268, -0.022493600845336914, -0.0016574114561080933, -0.017658278346061707, 0.01638488657772541, -0.001479314872995019, -0.0005501515115611255, -0.04302813857793808, -0.014096345752477646, -0.07002758234739304, 0.02591305412352085, -0.0601966492831707, -0.0417814627289772, 0.01438129972666502, 0.0029007482808083296, 0.00950145348906517, -0.012404427863657475, 0.042386990040540695, -0.033357493579387665, 0.014497063122689724, -0.07280588895082474, 0.002275184029713273, 0.011442705988883972, 0.011451611295342445, 0.005369612481445074, -0.009287737309932709, 0.003210191149264574, 0.04865599051117897, -0.012894193641841412, -0.037542764097452164, -0.0641147717833519, -0.029083173722028732, 0.007800630759447813, -0.026108961552381516, 0.06386543810367584, 0.03389178216457367, 0.0036865994334220886, -0.00018811452900990844, -0.018771382048726082, 0.01805899478495121, 0.02235112339258194, 0.005761425010859966, -0.0051247295923531055, -0.08733856678009033, -0.013392863795161247, -0.0004029435513075441, -0.11512164026498795, -0.007511224132031202, -0.03561931848526001, 0.05969797819852829, 0.02352656051516533, 0.05731148272752762, 0.03533436357975006, -0.04074849933385849, 0.055209945887327194, 0.008241419680416584, -0.02603772282600403, 0.008891472592949867, -0.03228891268372536, -0.013375054113566875, -0.010356317274272442, -0.049688950181007385, 0.04341994971036911, -0.06514773517847061, 0.002809473779052496, 0.005605590529739857, 0.025040380656719208, 0.027159729972481728, 0.10685795545578003, -0.03243139013648033, -0.0050134193152189255, -0.0434911884367466, 0.039537444710731506, 0.04409671574831009, 0.0005548822227865458, 0.04983142763376236, 0.03875381872057915, -0.0033237277530133724, 0.0027092944364994764, 0.06806851923465729, 0.022155215963721275, 0.05335773900151253, 0.0011687589576467872, 0.027711831033229828, -0.024434853345155716, -0.00904285442084074, -0.04466662555932999, -0.02691039629280567, -0.01996462792158127, 0.006487168371677399, -0.01206604391336441, 0.0331437774002552, 0.06671498715877533, 0.017497990280389786, 0.036153607070446014, -0.028958506882190704, -0.021977119147777557, -0.034194547683000565, -0.02374027669429779, 0.022618267685174942, 0.011157752014696598, -0.02753373421728611, 0.02865574136376381, 0.004572629928588867, -0.014648444950580597, 0.04480910301208496, 0.022155215963721275, -0.01780075393617153, 0.03125595301389694, -0.03289443999528885, 0.028620122000575066, 0.016812318935990334, -0.008829139173030853, -0.023597799241542816, 0.01706165447831154, 0.0551743246614933, 0.012965432368218899, -0.06343800574541092, 0.007707130163908005, -0.018931668251752853, -0.05449755862355232, -0.028833838179707527, 0.0065940264612436295, 0.04039230942726135, 0.021870261058211327, -0.00590835465118289, -0.042173273861408234, 0.009385691024363041, 0.019376909360289574, 0.052752211689949036, 0.0018288294086232781, 0.047017499804496765, -0.022101787850260735, -0.03611798956990242, -0.001684125978499651, 0.01677669957280159, 0.02122911438345909, 0.003401644993573427, 0.04096221551299095, 0.0035018243361264467, -0.05260973423719406, 0.009056211449205875, -0.017889803275465965, -0.041710224002599716, 0.05773891508579254, -0.027124110609292984, 0.04488034173846245, -0.003167893271893263, 0.007502319291234016, 0.036135800182819366, -0.03382054343819618, -0.026376105844974518, 0.06621631234884262, -0.0066741700284183025, 0.00429880665615201, 0.0025334241800010204, -0.005414136685431004, -0.007186197675764561, -0.05271659046411514, 0.02219083532691002, -0.006932409945875406, 0.009554882533848286, 0.01181670930236578, 0.04153212532401085, -0.03499598056077957, -0.023330653086304665, -0.0908292606472969, -0.03729342669248581, 0.019715292379260063, -0.021834641695022583, -0.038540102541446686, -0.023669037967920303, -0.01446144375950098, 0.08035718649625778, -0.015717023983597755, -0.023063508793711662, -0.004799703136086464, -0.054818131029605865, -0.05823758617043495, -0.02769402042031288, -0.03025861084461212, -0.01884261891245842, -0.04260070621967316, -0.058380063623189926, 0.0065049780532717705, -0.022440170869231224, -0.07992975413799286, 0.009706264361739159, -0.05307278409600258, -0.06756985187530518, -0.003410549834370613, -0.024523900821805, -0.009643930941820145, 0.06643003225326538, -0.006887885741889477, -0.002442149678245187, 0.0037689690943807364, 0.024719808250665665, 0.016652030870318413, 0.04420357570052147, 0.06418601423501968, 0.0004452414868865162, -0.04783674702048302, 0.029724322259426117, -0.06650126725435257, -0.00939459539949894, 0.0031812505330890417, -0.08797971904277802, 0.029510606080293655, -0.001679673558101058, 0.005721352994441986, -0.023437511175870895, -0.028833838179707527, 0.00004720255310530774, 0.05396327003836632, 0.055708613246679306, 0.033410921692848206, 0.021478449925780296, 0.06115837022662163, 0.02347313053905964, -0.051648013293743134, 0.018094614148139954, 0.017337704077363014, -0.014176488853991032, 0.05724024400115013, -0.0027181992772966623, 0.00696802930906415, 0.028014594689011574, -0.034924741834402084, -0.01780075393617153, 0.05122058093547821, 0.0037177663762122393, 0.04003611579537392, 0.030401088297367096, 0.06329552829265594, -0.04979580640792847, -0.04641197249293327, -0.016500649973750114, -0.011700945906341076, -0.010623461566865444, -0.02860231325030327, -0.047017499804496765, -0.0869823768734932, -0.020534537732601166, -0.013170243240892887, -0.0456995852291584, -0.0032680726144462824, 0.015841692686080933, -0.043277472257614136, -0.0000911353636183776, -0.013481912203133106, -0.013018861413002014, 0.07423066347837448, 0.010196030139923096, 0.07216474413871765, -0.04081973806023598, 0.02559247985482216, 0.05880749598145485, 0.0018633356085047126, -0.03567274659872055, 0.013179147616028786, 0.04441729187965393, 0.0032369056716561317, -0.01278733555227518, -0.058949973434209824, -0.011282418854534626, -0.024149898439645767, -0.04979580640792847, -0.004296580329537392, 0.010694700293242931, -0.023490941151976585, 0.006576216779649258, 0.02685696631669998, -0.008303754031658173, 0.011068703606724739, 0.006433739326894283, -0.0002817543863784522, 0.0021660998463630676, 0.04723121598362923, -0.03886067867279053, 0.049688950181007385, 0.011433801613748074, -0.027284398674964905, 0.03435483202338219, -0.02915441244840622, 0.01774732582271099, -0.014229917898774147, -0.00859761331230402, 0.01973310299217701, 0.035423412919044495, 0.0068834335543215275, 0.07202226668596268, -0.015895120799541473, 0.012725002132356167, 0.05919930711388588, 0.014933399856090546, -0.01800556667149067, -0.01800556667149067, 0.046127017587423325, 0.01699041575193405, 0.023116938769817352, 0.033927399665117264, -0.010632366873323917, 0.08313549309968948, -0.00047390389954671264, 0.011041988618671894, 0.09845180064439774, 0.03200395777821541, 0.04313499480485916, -0.04641197249293327, 0.0328766331076622, -0.04017859324812889, -0.04220889136195183, -0.011122132651507854, -0.03779209777712822, -0.008931544609367847, 0.010525508783757687, 0.023170366883277893, 0.04719559848308563, 0.026821346953511238, -0.021692166104912758, -0.03293006122112274, 0.0139360586181283, 0.0015338569646701217, 0.018254900351166725, -0.0019089728593826294, -0.017284274101257324, 0.07665277272462845, -0.04797922447323799, -0.004249829798936844, -0.013579864986240864, 0.021656546741724014, 0.02491571381688118, -0.06365172564983368, -0.06824661791324615, -0.01396277267485857, -0.033464349806308746, -0.01630474254488945, 0.035922084003686905, -0.005520994309335947, -0.04580644518136978, 0.0030120585579425097, -0.011362562887370586, 0.009225403890013695, -0.04655444994568825, 0.031184714287519455, 0.02881602942943573, 0.025681529194116592, 0.0017152928048744798, 0.00017642694001551718, -0.014434728771448135, -0.004065054934471846, -0.07205788046121597, -0.021264733746647835, 0.02993803843855858, -0.05645662173628807, 0.063010573387146, 0.01615336164832115, -0.03775647655129433, 0.04480910301208496, 0.06204885244369507, -0.014817636460065842, -0.015378640964627266, -0.035922084003686905, -0.01900290697813034, -0.023116938769817352, -0.005819306243211031, 0.03978677839040756, 0.02753373421728611, 0.0006400346173904836, -0.05410574749112129, 0.03166557475924492, 0.0852726474404335, -0.026269247755408287, 0.03643856197595596, -0.03180805221199989, 0.018094614148139954, 0.03426578640937805, 0.07063311338424683, 0.032751962542533875, 0.021389400586485863, -0.0253609549254179, 0.026572011411190033, -0.018967287614941597, 0.043562427163124084, 0.019038526341319084, -0.04078412055969238, -0.024951333180069923, 0.02096197009086609, -0.013277101330459118, 0.04167460277676582, 0.05456879734992981, 0.025877434760332108, -0.014470348134636879, -0.03857572376728058, -0.026572011411190033, -0.031968340277671814, 0.0359577015042305, 0.03683037683367729, -0.015058066695928574, -0.01805899478495121, -0.057774536311626434, 0.027070682495832443, 0.12887069582939148, 0.022493600845336914, 0.006144332699477673, -0.005396327003836632, -0.0022262074053287506, 0.005636757239699364, -0.05823758617043495, -0.00024070868676062673, -0.014933399856090546, -0.007586915045976639, 0.05538804084062576, -0.002442149678245187, -0.05428384244441986, -0.014336775988340378, 0.011041988618671894, 0.024434853345155716, 0.032573867589235306, -0.040107354521751404, 0.007533486001193523, 0.014443634077906609, -0.05474689230322838, -0.06682184338569641, 0.021994929760694504, 0.03339311107993126, -0.024933522567152977, -0.013179147616028786, -0.00711941160261631, -0.007640344090759754, -0.037150949239730835, -0.031006617471575737, -0.016242409124970436, -0.039038773626089096, -0.010151506401598454, 0.04605577886104584, 0.008348277769982815, -0.02391837351024151, -0.0417814627289772, 0.06447096914052963, 0.04028544947504997, -0.03216424584388733, -0.011086513288319111, 0.004236472770571709, -0.011460515670478344, 0.012582524679601192, 0.003998268395662308, 0.018717952072620392, -0.003564158221706748, -0.042280130088329315, 0.04936837777495384, 0.0130990045145154, 0.03878943994641304, 0.04363366588950157, -0.0038958629593253136, -0.0009416857501491904, -0.005075753200799227, -0.038326386362314224, -0.00414742436259985, -0.03661666065454483, 0.015690309926867485, -0.037150949239730835, 0.01342848315834999, -0.003837981726974249, -0.031505286693573, 0.0009427988552488387, -0.07380323112010956, -0.0353877916932106, -0.03305472806096077, -0.019804341718554497, 0.054212603718042374, -0.053037166595458984, 0.03886067867279053, 0.004675035830587149, 0.040606025606393814, 0.00009071795648196712, 0.007297507952898741, 0.08427530527114868, 0.00875344779342413, -0.03672351688146591, 0.01201261579990387, 0.10600309073925018, -0.0004794694250449538, -0.03276977315545082, -0.011692041531205177, -0.01363329403102398, 0.031736813485622406, -0.03574398532509804, 0.05734710395336151, 0.04192394018173218, -0.01939471997320652, 0.01609993167221546, -0.05282345041632652, 0.04936837777495384, -0.01607321761548519, 0.021656546741724014, -0.04039230942726135, -0.021140065044164658, -0.011122132651507854, -0.06219132989645004, 0.05927054584026337, -0.0047240122221410275, -0.008326015435159206, -0.010391936637461185, -0.031006617471575737, 0.017132893204689026, -0.03506721928715706, 0.04602016136050224, 0.03515626862645149, -0.05310840532183647, 0.016839032992720604, -0.0007229608600027859, -0.004946632776409388, -0.003795683616772294, -0.004247603937983513, 0.006678622215986252, 0.007141673471778631, -0.010026838630437851, 0.0032124172430485487, -0.0646846815943718, -0.005191515665501356, -0.011558469384908676, 0.04448853060603142 ]
4,692
optbinning.binning.mdlp
_fit
null
def _fit(self, x, y): _check_parameters(**self.get_params()) x = check_array(x, ensure_2d=False, force_all_finite=True) y = check_array(y, ensure_2d=False, force_all_finite=True) idx = np.argsort(x) x = x[idx] y = y[idx] self._recurse(x, y, 0) self._is_fitted = True return self
(self, x, y)
[ 0.006412731949239969, -0.008347298949956894, 0.02516728639602661, 0.014097262173891068, -0.03441021591424942, -0.017697706818580627, -0.05209001153707504, -0.03833308815956116, 0.02360888384282589, 0.04005270451307297, 0.0008133466471917927, -0.05040622130036354, -0.023286456242203712, -0.005879830103367567, 0.0006454155081883073, 0.005951480939984322, -0.007532272953540087, 0.003513120114803314, -0.06606188416481018, 0.06369741261005402, 0.002176388166844845, 0.02758549526333809, -0.030827686190605164, 0.059219248592853546, -0.010828202590346336, 0.0021439213305711746, 0.0259554423391819, -0.0016815508715808392, -0.0076845306903123856, -0.02717350423336029, -0.021674316376447678, 0.019023243337869644, 0.007084456738084555, -0.019488973543047905, -0.007787528447806835, -0.042811255902051926, -0.007572576403617859, 0.008571207523345947, -0.00028212438337504864, -0.0228207278996706, -0.06401984393596649, -0.023913400247693062, 0.014562991447746754, 0.041879795491695404, 0.007223279681056738, 0.03161584213376045, -0.06685004383325577, 0.09715826064348221, -0.02729889191687107, 0.006703812628984451, -0.03449977934360504, -0.09436388313770294, 0.033048857003450394, -0.0033519063144922256, -0.001184474560432136, 0.0740867555141449, 0.03980192914605141, 0.04671621322631836, 0.06778150051832199, -0.0544186569750309, 0.021548928692936897, 0.0014262954937294126, -0.03021865524351597, -0.0004928780253976583, -0.0385122150182724, 0.0047513325698673725, -0.10389342159032822, 0.008306995965540409, -0.026403259485960007, 0.0908530056476593, 0.0010008697863668203, 0.032636865973472595, -0.002348797395825386, 0.003690007608383894, 0.019202370196580887, 0.060294009745121, -0.03973027691245079, 0.010541600175201893, 0.004556532483547926, -0.058717694133520126, 0.025256849825382233, 0.06083139032125473, -0.02801539935171604, -0.037616584450006485, -0.07068335264921188, 0.016300519928336143, 0.03609400615096092, 0.04363523796200752, 0.028230350464582443, -0.004858808591961861, -0.02733471803367138, 0.062443528324365616, 0.0435277596116066, 0.033263806253671646, 0.041843969374895096, 0.033514585345983505, -0.03136506676673889, 0.005758919753134251, -0.009529534727334976, -0.001246049301698804, -0.017017025500535965, 0.035896968096494675, 0.017437973991036415, 0.08598076552152634, -0.00776513759046793, -0.00851746927946806, 0.03294137865304947, -0.018647078424692154, -0.03227861225605011, 0.03127550333738327, -0.044602520763874054, 0.053057294338941574, 0.0007120281807146966, 0.06083139032125473, -0.06523790210485458, -0.020062178373336792, -0.041593194007873535, 0.0034974466543644667, 0.025256849825382233, 0.01913071982562542, -0.006287343334406614, 0.07594967633485794, -0.004068412818014622, -0.02156684175133705, 0.026188306510448456, -0.052555739879608154, 0.015852702781558037, 0.00046852798550389707, 0.009511621668934822, -0.11894005537033081, 0.017437973991036415, -0.020420430228114128, 0.004858808591961861, 0.06785315275192261, -0.015512362122535706, -0.0322427861392498, -0.03315633162856102, -0.0397661030292511, -0.0034638603683561087, -0.035610366612672806, 0.03261895105242729, 0.0029533496126532555, 0.041342414915561676, -0.020527906715869904, 0.05810866504907608, 0.030863510444760323, 0.015628794208168983, -0.008499556221067905, 0.02754966914653778, 0.03904959559440613, -0.047289419919252396, -0.0023846228141337633, 0.05144515633583069, -0.018862029537558556, -0.022301260381937027, -0.02219378389418125, -0.04499660059809685, -0.0034369914792478085, 0.0565323531627655, 0.04739689454436302, -0.020241305232048035, -0.03471473231911659, 0.0142316073179245, 0.020330868661403656, -0.02486276999115944, 0.01527949795126915, -0.05563671886920929, -0.013327018357813358, -0.009242932312190533, -0.00756809813901782, 0.007644227240234613, -0.05370214954018593, -0.07272539287805557, -0.049510590732097626, 0.009404146112501621, -0.029735013842582703, 0.006672465242445469, -0.0161213930696249, 0.018360475078225136, 0.04453086853027344, 0.012198520824313164, -0.01817239262163639, 0.020921984687447548, -0.040124356746673584, -0.03638061136007309, 0.03826143965125084, -0.02767505869269371, 0.009977350942790508, -0.03550288826227188, 0.0005326216924004257, -0.025722578167915344, -0.01011169608682394, 0.0020454018376767635, 0.027531756088137627, -0.01036247331649065, 0.045856405049562454, -0.009157846681773663, 0.05363050103187561, 0.006099260412156582, -0.010487861931324005, -0.021190674975514412, -0.03403405100107193, 0.08024871349334717, -0.009843005798757076, -0.051480982452631, 0.04574893042445183, 0.0023711882531642914, 0.04925981163978577, -0.007075500208884478, -0.007836787961423397, -0.004316950682550669, -0.04094833880662918, -0.07931725680828094, -0.06101051717996597, 0.006891895551234484, 0.03396240249276161, 0.04041095823049545, -0.07218801230192184, 0.024056700989603996, -0.013380756601691246, 0.07551977038383484, -0.03243982419371605, -0.034983422607183456, -0.008844375610351562, 0.0217638798058033, 0.009148890152573586, 0.04822087660431862, -0.020205479115247726, -0.0013188194716349244, -0.04295455664396286, 0.02335810661315918, -0.02548971399664879, 0.006264952477067709, -0.06419897079467773, -0.038404740393161774, -0.019560623914003372, 0.02536432445049286, -0.0019211326725780964, -0.04094833880662918, -0.018933679908514023, -0.0036004444118589163, -0.008338342420756817, -0.029824577271938324, -0.026976464316248894, -0.03722250461578369, 0.029609624296426773, 0.005270800087600946, 0.0006750833126716316, 0.020689120516180992, -0.014930200763046741, -0.028857292607426643, 0.014813768677413464, -0.010559512302279472, -0.04026765748858452, 0.010290822945535183, -0.05291399359703064, 0.027155591174960136, -0.0008905950235202909, 0.018181348219513893, 0.017742488533258438, 0.0012147021479904652, 0.0464654378592968, -0.054561957716941833, 0.05481273680925369, -0.07279704511165619, -0.0030653036665171385, -0.03915707394480705, 0.008083087392151356, -0.015512362122535706, 0.039372023195028305, -0.01791265793144703, 0.01887994259595871, 0.0368284247815609, 0.0028593081515282393, 0.015843747183680534, 0.12338239699602127, 0.032923467457294464, -0.03052316978573799, 0.08762872964143753, 0.03297720476984978, 0.05481273680925369, -0.026689860969781876, 0.017778314650058746, -0.011284975335001945, 0.03319215774536133, -0.02971710078418255, -0.046357959508895874, -0.014043524861335754, -0.03202783316373825, -0.02692272700369358, -0.036900077015161514, 0.04424426704645157, 0.07122073322534561, 0.05133768171072006, 0.026600297540426254, -0.004531902726739645, 0.007138194516301155, -0.014267432503402233, 0.06523790210485458, -0.02729889191687107, -0.012198520824313164, 0.03106055036187172, 0.013497188687324524, -0.007706921547651291, 0.049080684781074524, -0.040590085089206696, 0.01879037916660309, -0.012503036297857761, -0.01595122180879116, 0.029287196695804596, 0.019775575026869774, 0.062192752957344055, -0.007335233967751265, -0.04123494029045105, -0.023519320413470268, -0.028499040752649307, 0.02566884085536003, 0.033926576375961304, 0.011643228121101856, 0.02473738230764866, 0.040088530629873276, -0.0011855941265821457, 0.02319689281284809, -0.05753546208143234, -0.002711528679355979, 0.0573563352227211, 0.08010540902614594, 0.008539860136806965, -0.040088530629873276, -0.0037616584450006485, 0.07774093747138977, -0.012279127724468708, 0.033890750259160995, 0.02871399186551571, 0.008486121892929077, 0.037616584450006485, 0.021208588033914566, -0.017867878079414368, 0.05828779190778732, 0.007375537417829037, -0.05839526653289795, -0.010156477801501751, -0.03707920387387276, -0.027746709063649178, 0.015566100366413593, -0.03869134187698364, -0.009896744042634964, -0.03333545848727226, 0.00605895696207881, 0.06541702896356583, -0.013300148770213127, -0.007317321375012398, 0.06011488288640976, -0.051982536911964417, -0.01377483457326889, 0.04671621322631836, -0.02486276999115944, 0.00018962228205054998, 0.008907069452106953, 0.007487491238862276, 0.015843747183680534, 0.017590230330824852, -0.0933607816696167, 0.0031145636457949877, 0.0036228352691978216, -0.0009695226326584816, -0.038404740393161774, 0.008602553978562355, -0.00556635856628418, -0.003360862610861659, 0.0071337162517011166, -0.025006072595715523, -0.0765945315361023, 0.019668098539114, 0.0038534607738256454, 0.03915707394480705, -0.015449668280780315, 0.004395318683236837, 0.048507481813430786, 0.02604500576853752, 0.01615721918642521, 0.0032309957314282656, 0.016927462071180344, -0.043312810361385345, -0.03783153370022774, -0.004634900484234095, 0.00027232838328927755, -0.05144515633583069, 0.05488438531756401, -0.004437861032783985, 0.05979245528578758, -0.04911651089787483, 0.020742859691381454, 0.012189564295113087, -0.035520803183317184, -0.019865138456225395, 0.07652287930250168, 0.05380962789058685, -0.07315529882907867, -0.0008911548065952957, -0.04621465876698494, -0.025256849825382233, -0.016515471041202545, 0.03833308815956116, 0.027030201628804207, -0.008392080664634705, 0.0213518887758255, 0.0027025723829865456, -0.0137121407315135, 0.09866292774677277, -0.014634642750024796, 0.016345301643013954, 0.05445448309183121, 0.009887787513434887, -0.04847165569663048, 0.011759660206735134, -0.008535382337868214, 0.03801066055893898, 0.07304782420396805, 0.029591713100671768, 0.04449504613876343, -0.006238083355128765, -0.038368914276361465, 0.012305996380746365, 0.00820399820804596, -0.008983198553323746, -0.06187032535672188, -0.0925009697675705, 0.030845599249005318, -0.04599970951676369, -0.05388127639889717, -0.018324650824069977, -0.05409622937440872, -0.01616617478430271, -0.03634478524327278, -0.025149373337626457, 0.0011245791101828218, -0.0014363713562488556, -0.008880200795829296, -0.006703812628984451, -0.001722973887808621, -0.023411845788359642, 0.07018179446458817, -0.02335810661315918, -0.08053531497716904, -0.017446929588913918, 0.012753813527524471, 0.04370688647031784, -0.11335130780935287, 0.0045363809913396835, 0.08375959098339081, 0.00220773508772254, 0.044351741671562195, -0.003378775203600526, -0.03679260239005089, -0.03159793093800545, 0.010989416390657425, -0.06015070900321007, 0.014016655273735523, 0.017017025500535965, 0.02097572386264801, -0.018647078424692154, 0.01803804747760296, -0.025310587137937546, -0.07430171221494675, 0.007433753460645676, -0.02851695381104946, 0.004140063188970089, 0.06151207163929939, -0.021674316376447678, 0.0048767211847007275, 0.012243302538990974, -0.009986307471990585, -0.024791119620203972, 0.000727701757568866, 0.032672688364982605, 0.05606662109494209, 0.02654656022787094, 0.02692272700369358, -0.020563732832670212, -0.02172805555164814, -0.031006813049316406, 0.02466573193669319, 0.003378775203600526, 0.04016018286347389, -0.04392183944582939, -0.030970986932516098, -0.05169593170285225, -0.014500297605991364, 0.07096995413303375, 0.024504518136382103, 0.00046041130553931, -0.003940784838050604, -0.004424426704645157, -0.045354850590229034, 0.0007713638478890061, 0.017563361674547195, 0.023125242441892624, -0.01441969070583582, -0.04320533201098442, -0.00852194707840681, -0.006766506936401129, -0.04843582957983017, -0.01396291796118021, 0.0017476037610322237, 0.04445922002196312, -0.04076921194791794, -0.013318061828613281, -0.06627684086561203, 0.027872096747159958, -0.0380823127925396, -0.049546413123607635, -0.02692272700369358, 0.03256521373987198, 0.031508367508649826, 0.024773206561803818, -0.03801066055893898, 0.003571336390450597, 0.010622207075357437, -0.022247523069381714, -0.001147529692389071, 0.05058534815907478, 0.08361629396677017, -0.061261292546987534, 0.06409149616956711, 0.023250631988048553, 0.013497188687324524, -0.0017352888826280832, 0.03403405100107193, -0.0022122133523225784, 0.03645225986838341, -0.03286973014473915, 0.015449668280780315, 0.05162428319454193, 0.00438636215403676, 0.018736641854047775, 0.02796166017651558, -0.023161068558692932, -0.02833782695233822, 0.017599187791347504, -0.005969393532723188, 0.04055425897240639, 0.022426648065447807, 0.002877220744267106, -0.024397041648626328, 0.00760840205475688, -0.014401777647435665, 0.03897794708609581, -0.007281495723873377, -0.02169222943484783, -0.05194671079516411, -0.01366735901683569, 0.05714138224720955, 0.039873577654361725, -0.011670097708702087, -0.06642013788223267, -0.07025344669818878, 0.030164917930960655, -0.014554034918546677, 0.011249150149524212, -0.017652925103902817, 0.07480326294898987, 0.033138420432806015, -0.0414498932659626, -0.02273116447031498, -0.030361955985426903, -0.004388601519167423, 0.045820582658052444, -0.014285345561802387, -0.018396301195025444, -0.005499186459928751, 0.07666617631912231, -0.0824698805809021, 0.026904813945293427, 0.0041445414535701275, 0.0460355319082737, -0.018933679908514023, -0.06161954626441002, -0.12674997746944427, 0.004948372021317482, 0.0074606225825846195, -0.04589223116636276, -0.007371059153228998, -0.046286311000585556, -0.04220222309231758, -0.04316950961947441, -0.03732997924089432, -0.002233484759926796, -0.06559615582227707, 0.023555146530270576, -0.02047416940331459, 0.03256521373987198, -0.054060403257608414, -0.012323909439146519, -0.0014274150598794222, 0.01875455304980278, -0.04291873052716255, -0.04291873052716255, 0.03283390402793884, -0.07645122706890106, -0.007129238452762365, 0.03448186814785004, -0.04338445886969566, -0.0050424132496118546, 0.009368320927023888, -0.0051454114727675915, -0.0590401217341423, 0.007388971745967865, 0.006099260412156582, -0.041593194007873535, -0.002244679955765605, 0.044351741671562195, 0.04664456471800804, -0.027478018775582314, -0.04220222309231758, 0.014016655273735523, 0.007989046163856983, -0.024898596107959747, 0.044315919280052185, 0.008553294464945793, 0.02310732938349247, -0.03679260239005089, 0.012216432951390743, 0.02138771489262581, -0.03645225986838341, 0.016936419531702995, 0.015172022394835949, -0.042094748467206955, 0.019148632884025574, -0.008315951563417912, 0.03444604203104973, -0.006085825618356466, 0.005888786632567644, 0.015807921066880226, 0.05721303075551987, -0.019936788827180862, -0.007850222289562225, -0.005996262654662132, -0.007487491238862276, 0.01754544861614704, -0.04245300218462944, 0.030200742185115814, 0.03765241056680679, 0.016631903126835823, -0.02683316357433796, -0.03783153370022774, -0.03844056650996208, 0.011885048821568489, 0.05330807343125343, -0.03174123167991638, 0.0073844934813678265, -0.008544337935745716, -0.01997261494398117, -0.013783791102468967, 0.07795589417219162, -0.0051678018644452095, 0.011938787065446377, -0.01766188070178032, 0.02226543426513672, -0.016963288187980652, 0.03833308815956116, 0.04098416492342949, 0.07731103897094727, -0.02520311065018177, 0.009789268486201763, 0.03940784931182861, 0.017223021015524864, -0.05689060315489769, -0.05015544593334198, 0.030827686190605164, -0.0443875677883625, 0.02473738230764866, -0.03621939569711685, 0.012386603280901909, -0.03634478524327278, -0.007890526205301285, -0.05989992991089821, -0.03419526666402817, 0.005114064086228609, 0.023393932729959488, 0.02411043830215931, -0.0011979090049862862, 0.006869504693895578, 0.012395559810101986, 0.020062178373336792, 0.02151310257613659, -0.01887994259595871, 0.001983826979994774, -0.02226543426513672, 0.009130978025496006, 0.03854804113507271, -0.035771578550338745, 0.024343302473425865, -0.052770692855119705, -0.0025547929108142853, -0.005033457186073065, -0.01570044457912445, -0.04170066863298416, 0.02420000173151493, -0.011482014320790768, 0.010389341972768307, 0.05269904062151909, -0.0253285001963377, 0.008745855651795864, -0.033675797283649445, 0.01527949795126915, -0.06276595592498779, 0.05606662109494209, 0.002407013438642025, -0.04377853870391846, 0.03722250461578369, -0.050047967582941055, -0.028230350464582443, -0.02188926935195923, 0.04639378562569618, 0.05789371207356453, 0.023501409217715263, 0.0023040156811475754, 0.0257404912263155, 0.056926429271698, 0.03509089723229408, 0.025722578167915344, -0.008871244266629219, -0.002559271175414324, 0.03174123167991638, 0.028391564264893532, 0.05882517248392105, -0.025185197591781616, 0.03245773911476135, -0.08934834599494934, 0.036398522555828094, 0.007429275196045637, 0.00007997722423169762, -0.00013399508316069841, -0.018450038507580757, -0.010219171643257141, -0.02980666421353817, 0.013989786617457867, 0.07888735085725784, 0.02147727832198143, -0.04048261046409607, -0.003669855883345008, -0.009457883425056934, 0.004702073056250811, 0.010165434330701828, 0.008392080664634705, -0.010156477801501751, -0.014088306576013565, 0.0027809403836727142, -0.007626314647495747, 0.0013602424878627062, -0.005799223203212023, 0.03331754729151726, 0.05097942799329758, 0.018557514995336533, 0.023590970784425735, -0.04463834688067436, -0.007832310162484646, 0.03926454856991768, -0.013515100814402103, -0.002447317121550441, -0.018808292225003242, 0.036273133009672165, 0.03580740466713905, -0.02642117254436016, 0.02000843919813633, 0.08641066402196884, 0.09106795489788055 ]
4,697
optbinning.binning.mdlp
_recurse
null
def _recurse(self, x, y, id): u_x = np.unique(x) n_x = len(u_x) n_y = len(np.bincount(y)) split = self._find_split(u_x, x, y) if split is not None: self._splits.append(split) t = np.searchsorted(x, split, side="right") if not self._terminate(n_x, n_y, y, y[:t], y[t:]): self._recurse(x[:t], y[:t], id + 1) self._recurse(x[t:], y[t:], id + 2)
(self, x, y, id)
[ -0.006378046702593565, 0.008877672255039215, -0.028269780799746513, 0.07963218539953232, -0.0431252047419548, -0.006742761004716158, -0.027486979961395264, 0.05632607266306877, -0.023857630789279938, -0.0350659154355526, -0.005261666141450405, -0.02649068832397461, -0.0032490678131580353, -0.023501813411712646, -0.0338917151093483, -0.009633786045014858, -0.008050394244492054, 0.060844965279102325, -0.05529419705271721, 0.03033352829515934, 0.006057810038328171, 0.030244573950767517, 0.04686129838228226, 0.05376417934894562, -0.033998459577560425, -0.0038250491488724947, 0.03871305286884308, 0.025209741666913033, -0.042627058923244476, -0.029301654547452927, -0.03182796761393547, -0.0033380223903805017, -0.01658114232122898, 0.0016156384954228997, -0.029248282313346863, -0.02214970253407955, 0.010087454691529274, 0.0725158154964447, -0.018253490328788757, 0.0008684195927344263, -0.050028081983327866, -0.012960689142346382, 0.04006516560912132, 0.01749737560749054, -0.01003408245742321, 0.0019191961036995053, -0.015593746677041054, 0.021954001858830452, -0.03277088701725006, 0.01671457476913929, -0.025458814576268196, -0.11414658278226852, -0.020085955038666725, 0.03319786861538887, 0.0909472107887268, 0.05497395992279053, 0.015593746677041054, -0.02081538364291191, 0.11179817467927933, -0.024782760068774223, 0.018102267757058144, -0.019143035635352135, 0.004489984828978777, 0.09507470577955246, -0.03567080572247505, -0.06330011039972305, -0.06280196458101273, 0.008802060969173908, -0.07059439271688461, 0.03903328999876976, -0.003257963340729475, 0.014472917653620243, 0.07023857533931732, -0.00014260539319366217, -0.023074829950928688, 0.012782780453562737, 0.029764218255877495, 0.055756762623786926, 0.0936514362692833, -0.016767947003245354, -0.009713845327496529, 0.013503313064575195, 0.020726429298520088, -0.012791675515472889, -0.03718303516507149, 0.08141127973794937, 0.07422374188899994, 0.03319786861538887, -0.028518853709101677, -0.035955462604761124, -0.030813883990049362, 0.011804278939962387, 0.007498875260353088, 0.056183744221925735, -0.0023595215752720833, 0.03531498834490776, -0.023145994171500206, 0.036933962255716324, -0.05049064755439758, -0.005897691939026117, -0.06326453387737274, -0.023839840665459633, -0.026757553219795227, 0.03205924853682518, 0.014766468666493893, -0.0685662254691124, 0.003262411104515195, 0.012391380034387112, -0.08262106031179428, 0.013583371415734291, -0.03821490705013275, 0.0560414157807827, -0.0331089124083519, 0.003480349900200963, -0.05170043185353279, -0.003956256899982691, -0.020085955038666725, -0.02778942696750164, -0.008272780105471611, -0.006378046702593565, -0.006622672080993652, -0.04529569670557976, -0.01579834148287773, 0.03849956393241882, -0.0007622299599461257, -0.07258697599172592, 0.024711595848202705, 0.08802950382232666, -0.046505481004714966, -0.043445441871881485, 0.024213450029492378, 0.005528530105948448, -0.05248323082923889, 0.02111782878637314, 0.027807217091321945, 0.0016734589589759707, -0.022434357553720474, -0.01296958513557911, 0.000584320689085871, -0.06223265826702118, 0.010950314812362194, -0.045331280678510666, 0.01853814534842968, 0.004518894944339991, 0.03245064988732338, 0.01655445620417595, 0.010852464474737644, 0.013512208126485348, 0.022487729787826538, 0.007908066734671593, -0.06966926902532578, 0.03253960236907005, 0.07201766967773438, -0.02166934683918953, -0.04173751175403595, -0.03707629069685936, -0.029266072437167168, 0.031027374789118767, 0.03456776961684227, 0.025974752381443977, 0.025814633816480637, -0.0497790090739727, 0.012631556950509548, -0.0319347120821476, -0.0011224962072446942, 0.04006516560912132, -0.04180867597460747, 0.004941429477185011, -0.04102587327361107, 0.014099308289587498, 0.0047813113778829575, 0.001328759710304439, -0.11357726901769638, -0.017959939315915108, -0.027291279286146164, -0.03602662310004234, -0.016412129625678062, -0.008770926855504513, 0.021882839500904083, 0.06472338736057281, 0.00830836221575737, -0.0037316465750336647, 0.06885088235139847, -0.03508370742201805, -0.008401764556765556, -0.0017068169545382261, 0.0376100167632103, -0.01218678429722786, 0.054689306765794754, 0.026988834142684937, -0.07543352246284485, -0.03974492847919464, 0.03679163381457329, 0.013129702769219875, 0.029177118092775345, 0.006071153562515974, -0.01532688271254301, 0.026277197524905205, -0.038463979959487915, -0.012444752268493176, 0.010007395409047604, -0.03746768832206726, 0.04707479104399681, -0.028323153033852577, -0.0047813113778829575, 0.046932462602853775, -0.00975832249969244, 0.07294279336929321, 0.002109336666762829, 0.007392129860818386, -0.000250184879405424, -0.0536930151283741, -0.004530014470219612, 0.028678972274065018, -0.0010591160971671343, 0.022203074768185616, -0.01232911180704832, -0.012533707544207573, 0.0478220097720623, -0.053123705089092255, 0.03558185324072838, 0.00865083746612072, -0.029853172600269318, -0.02391100488603115, -0.02821640856564045, -0.03581313416361809, 0.005564112216234207, -0.02186504751443863, 0.02876792661845684, -0.048426900058984756, 0.04458405822515488, -0.07351210713386536, 0.014446231536567211, -0.0674276053905487, -0.008953283540904522, -0.047715261578559875, -0.006529269739985466, -0.033091120421886444, 0.060844965279102325, 0.0350659154355526, -0.01755964383482933, -0.020512936636805534, -0.010203096084296703, -0.025654515251517296, -0.04276938736438751, 0.028910255059599876, 0.017773134633898735, 0.025014040991663933, 0.05597025156021118, 0.009420295245945454, -0.03985167294740677, -0.04721711575984955, -0.055792342871427536, -0.050810884684324265, 0.029532937332987785, -0.06525711715221405, -0.016928065568208694, 0.00012029723438899964, 0.02198958396911621, 0.0260637067258358, -0.0055196345783770084, 0.04355218634009361, -0.014979959465563297, -0.0005331718130037189, -0.0752200335264206, 0.006689388304948807, -0.0050481753423810005, -0.01140398345887661, -0.015495896339416504, 0.01566491089761257, 0.0014065951108932495, -0.038001418113708496, -0.00498590711504221, 0.05372859537601471, -0.024124495685100555, 0.06949135661125183, 0.017684180289506912, 0.0014755348674952984, 0.029675263911485672, 0.007908066734671593, 0.018484771251678467, 0.028109662234783173, -0.015656014904379845, -0.008802060969173908, -0.04091912880539894, -0.030422482639551163, 0.019570019096136093, 0.001772420946508646, -0.035724177956581116, -0.017159348353743553, -0.06365593522787094, 0.02613486908376217, -0.024124495685100555, 0.05746468901634216, 0.021615974605083466, -0.005884348880499601, -0.005266114138066769, -0.06518594920635223, 0.005484052933752537, -0.026633016765117645, -0.05223415791988373, -0.013360985554754734, -0.030244573950767517, -0.039567019790410995, -0.013094121590256691, -0.004374343901872635, 0.029141535982489586, -0.039140038192272186, 0.022309821099042892, -0.016269801184535027, 0.008401764556765556, 0.035688597708940506, 0.0046167452819645405, -0.04764409735798836, 0.02170492894947529, -0.04437056928873062, -0.014739781618118286, 0.034656722098588943, -0.005911034997552633, 0.08411549776792526, 0.0068406108766794205, 0.024711595848202705, -0.010870255529880524, 0.007912513799965382, 0.05991983786225319, 0.039602600038051605, 0.05444023385643959, 0.011572997085750103, -0.01830686256289482, 0.005079309456050396, 0.038108162581920624, 0.015958460047841072, -0.0007210884359665215, -0.00453668599948287, 0.07386792451143265, -0.013681221753358841, 0.0227368026971817, 0.005537425633519888, 0.01566491089761257, 0.011181596666574478, 0.019587809219956398, -0.013316508382558823, -0.001770197064615786, -0.006934013217687607, 0.08454247564077377, 0.03732536360621452, 0.023733094334602356, 0.00607560109347105, 0.008383973501622677, 0.08240757137537003, 0.012435857206583023, 0.0050615184009075165, 0.0015144525095820427, -0.05532977730035782, -0.057357944548130035, 0.016696784645318985, 0.008072632364928722, -0.01707039400935173, -0.011003687977790833, 0.024836132302880287, -0.02625940553843975, -0.03672046959400177, -0.04223565757274628, 0.027166742831468582, -0.0010730151552706957, -0.0289992094039917, -0.06571967899799347, 0.014250531792640686, -0.02775384485721588, -0.026633016765117645, -0.04244915023446083, -0.0024195658043026924, 0.0023461782839149237, -0.009713845327496529, 0.003967376425862312, 0.08596575260162354, 0.007022968027740717, 0.0006232383893802762, 0.03520824387669563, 0.051202286034822464, 0.03013782761991024, 0.02085096575319767, 0.06799691915512085, 0.029568519443273544, -0.05757143720984459, 0.0067916857078671455, 0.022131912410259247, -0.011982188560068607, 0.056646306067705154, -0.005110443569719791, 0.03515486791729927, 0.019570019096136093, 0.01814674399793148, -0.02942619100213051, -0.018591517582535744, -0.06603991985321045, 0.12282855063676834, 0.00871310569345951, -0.0227368026971817, 0.0059021394699811935, -0.002590803662315011, -0.00047451735008507967, -0.04205774888396263, 0.03323344886302948, 0.019694555550813675, -0.01191102433949709, -0.0009379153489135206, -0.005933273583650589, -0.02978201024234295, -0.04646989703178406, -0.024871714413166046, -0.032112620770931244, 0.05031273886561394, -0.0036315727047622204, 0.010007395409047604, -0.05031273886561394, -0.003246844047680497, 0.11201167106628418, 0.001772420946508646, 0.00975832249969244, 0.04205774888396263, -0.009704950265586376, -0.026899879798293114, 0.0059510646387934685, -0.023217158392071724, -0.010896941646933556, -0.03515486791729927, -0.04326753318309784, 0.006137869320809841, -0.008708658628165722, -0.04799991846084595, -0.020975502207875252, -0.0051771593280136585, -0.0338917151093483, 0.031650055199861526, -0.01860930770635605, 0.006071153562515974, 0.033091120421886444, 0.051985085010528564, 0.041595183312892914, 0.006057810038328171, 0.03273530304431915, 0.0011953278444707394, -0.05280346795916557, 0.02033502794802189, -0.015442523173987865, -0.000014290074432210531, 0.031027374789118767, -0.09543052315711975, 0.014010353945195675, 0.049601100385189056, -0.024676013737916946, 0.028198616579174995, -0.018031103536486626, -0.09308212250471115, -0.05842540040612221, -0.009571517817676067, 0.013645639643073082, 0.03946027159690857, 0.040385402739048004, 0.02574346959590912, -0.0005509627517312765, 0.00522163650020957, 0.03874863684177399, -0.021313529461622238, -0.04867597296833992, -0.021936211735010147, 0.0024529239162802696, -0.0061823464930057526, -0.004338761791586876, 0.030671555548906326, -0.015335777774453163, -0.04294729605317116, -0.0017879880033433437, 0.07301396131515503, 0.03300216794013977, 0.00203150138258934, -0.009731636382639408, 0.009455877356231213, -0.028287572786211967, -0.04490429535508156, -0.012809466570615768, -0.019819092005491257, -0.0229325033724308, -0.02994212880730629, -0.08141127973794937, -0.010096350684762001, -0.0029065925627946854, -0.0001556705974508077, -0.025921378284692764, 0.0061823464930057526, -0.014455127529799938, -0.06383384019136429, 0.0193921085447073, 0.034745678305625916, -0.008686419576406479, -0.016527770087122917, -0.013227553106844425, 0.05653956159949303, -0.058140747249126434, 0.0005228864029049873, 0.02622382529079914, 0.01140398345887661, -0.05148693919181824, -0.011866547167301178, 0.09301096200942993, -0.021349111571907997, 0.026206033304333687, -0.0548672154545784, 0.02613486908376217, -0.02013932727277279, -0.07863589376211166, -0.0215626023709774, 0.02198958396911621, 0.0035715282429009676, 0.006724969949573278, -0.011697533540427685, 0.006364703644067049, -0.0011664176126942039, -0.020904337987303734, -0.005906587466597557, -0.022434357553720474, 0.05177159234881401, -0.018164535984396935, 0.07322745025157928, 0.031845755875110626, -0.05792725458741188, -0.01142177451401949, -0.03479905053973198, -0.012578184716403484, -0.033286821097135544, -0.003380275797098875, 0.025014040991663933, 0.0338917151093483, 0.00814824365079403, 0.005590798333287239, 0.0051905023865401745, -0.0470392070710659, 0.0227368026971817, 0.022896921262145042, 0.008357287384569645, 0.015780551359057426, -0.003989615011960268, -0.0016278696712106466, -0.03963818401098251, 0.06458105891942978, 0.0030845017172396183, 0.043872423470020294, -0.000800035719294101, 0.030084455385804176, 0.03323344886302948, 0.02296808548271656, 0.036542560905218124, 0.038463979959487915, -0.0025752366054803133, -0.07707028836011887, -0.0689932107925415, -0.028910255059599876, -0.03236169368028641, 0.01361895352602005, -0.018680471926927567, 0.09479004889726639, 0.03817932680249214, -0.08126895129680634, 0.01781761273741722, 0.009162326343357563, 0.03390950337052345, -0.018324652686715126, 0.0342831127345562, 0.030475856736302376, 0.01448181364685297, 0.01990804634988308, -0.0811266228556633, -0.03700512647628784, -0.03625790774822235, 0.06490129977464676, -0.008512957952916622, -0.06966926902532578, -0.06806807965040207, -0.03280646726489067, -0.024907296523451805, 0.0047457292675971985, 0.04568709805607796, 0.0005370635772123933, 0.013787967152893543, 0.0003277422219980508, 0.007058549672365189, 0.04120378568768501, -0.00007748782081762329, 0.03785908967256546, -0.027931753545999527, 0.038463979959487915, 0.012533707544207573, -0.03906887397170067, -0.02531648799777031, 0.03426532447338104, -0.028091872110962868, -0.007160847540944815, 0.03156110271811485, -0.08404432982206345, 0.02433798648416996, 0.017025915905833244, -0.009607099927961826, 0.03814374655485153, -0.01896512694656849, 0.004914743360131979, 0.009358027018606663, -0.03793025389313698, -0.04369451478123665, -0.02182946540415287, -0.007094131782650948, 0.0023395067546516657, 0.11300796270370483, -0.02958630956709385, -0.05483163148164749, 0.023839840665459633, 0.022363193333148956, 0.0022194180637598038, 0.028625600039958954, -0.04095471277832985, 0.008873224258422852, -0.027949543669819832, 0.007334309164434671, 0.0036604830529540777, -0.03736094385385513, 0.021936211735010147, 0.046576645225286484, -0.012026665732264519, 0.07127045094966888, 0.023608557879924774, -0.03664930537343025, -0.012017770670354366, 0.016999229788780212, -0.039602600038051605, 0.023252740502357483, -0.022327611222863197, 0.00985617283731699, -0.019534436985850334, -0.04995691776275635, 0.020744219422340393, -0.028091872110962868, 0.00848627183586359, -0.022203074768185616, 0.015816133469343185, -0.015042227692902088, -0.014295008964836597, 0.0051905023865401745, 0.05337277799844742, 0.01628759317100048, 0.015816133469343185, 0.009095611050724983, 0.03296658396720886, -0.07792425155639648, -0.026704179123044014, 0.030618183314800262, 0.0008050393662415445, -0.0015355793293565512, 0.033802758902311325, -0.01928536407649517, -0.005430680233985186, 0.052767883986234665, 0.053159285336732864, -0.04284054785966873, -0.010852464474737644, -0.06902879476547241, 0.02049514651298523, 0.0372186154127121, -0.025227533653378487, 0.017257198691368103, -0.014748677611351013, 0.029764218255877495, -0.0431252047419548, -0.03746768832206726, 0.030511436983942986, -0.0678190067410469, -0.048106662929058075, -0.041559603065252304, -0.024587059393525124, 0.00814379658550024, 0.03076050989329815, -0.03264635056257248, -0.029568519443273544, -0.0035581851843744516, -0.019783509895205498, 0.0489962100982666, 0.07607399672269821, -0.011706429533660412, -0.011661951430141926, 0.035492897033691406, -0.024391358718276024, 0.011599683202803135, 0.0068584019318223, 0.042342402040958405, -0.0024595954455435276, -0.008330601267516613, 0.046612225472927094, -0.022078538313508034, -0.01749737560749054, 0.07393908500671387, -0.011661951430141926, 0.023377276957035065, -0.03294879570603371, -0.008624151349067688, 0.0007939200731925666, -0.0018458085833117366, -0.018982917070388794, -0.0372186154127121, 0.04668338969349861, 0.052376486361026764, 0.003742766100913286, -0.011555206030607224, -0.029141535982489586, -0.041951004415750504, -0.02257668413221836, -0.005150473210960627, 0.04405033215880394, -0.05255439504981041, -0.017186034470796585, 0.006951804272830486, 0.00871310569345951, 0.00539065059274435, 0.055756762623786926, 0.022007375955581665, 0.005479604937136173, -0.009598204866051674, 0.032397277653217316, 0.12339786440134048, 0.01804889366030693, -0.009060028940439224, -0.032824259251356125, -0.04291171208024025, 0.01081688329577446, -0.006644910667091608, 0.05266113951802254, 0.011626370251178741, 0.008695314638316631, 0.009277967736124992, -0.002708668354898691, 0.03488800674676895, -0.018680471926927567, 0.0017190482467412949, -0.040349818766117096, -0.027059998363256454, 0.016100788488984108, -0.02939060889184475, 0.0627308040857315, 0.057215616106987, 0.019979208707809448, -0.008108214475214481, -0.053550686687231064, 0.0362401157617569, 0.0152824055403471, 0.01804889366030693, 0.028429899364709854, -0.04440614953637123, 0.06177009269595146, -0.004532238468527794, 0.004038540180772543, 0.050383903086185455, 0.004652326926589012, -0.03620453551411629, 0.010185305029153824, -0.020566310733556747, 0.0012420290149748325, 0.01355668529868126, 0.035172659903764725, 0.04440614953637123, 0.09557285159826279 ]
4,700
optbinning.binning.mdlp
_terminate
null
def _terminate(self, n_x, n_y, y, y1, y2): splittable = (n_x >= self.min_samples_split) and (n_y >= 2) n = len(y) n1 = len(y1) n2 = n - n1 ent_y = self._entropy(y) ent_y1 = self._entropy(y1) ent_y2 = self._entropy(y2) gain = ent_y - (n1 * ent_y1 + n2 * ent_y2) / n k = len(np.bincount(y)) k1 = len(np.bincount(y1)) k2 = len(np.bincount(y2)) t0 = np.log(3**k - 2) t1 = k * ent_y t2 = k1 * ent_y1 t3 = k2 * ent_y2 delta = t0 - (t1 - t2 - t3) return gain <= (np.log(n - 1) + delta) / n or not splittable
(self, n_x, n_y, y, y1, y2)
[ -0.04556670039892197, 0.02034159190952778, 0.037010930478572845, 0.030435480177402496, 0.02610952779650688, -0.027109304443001747, -0.0745217427611351, 0.008983561769127846, -0.057871636003255844, 0.010372673161327839, 0.008070304989814758, 0.026570962741971016, 0.019264910370111465, -0.01701541431248188, -0.03353093937039375, -0.04725863039493561, -0.014823597855865955, -0.027051623910665512, 0.021783575415611267, -0.02378312684595585, -0.014621720649302006, 0.027820682153105736, -0.05237286910414696, -0.03247348591685295, -0.020418496802449226, -0.006003460846841335, 0.006724453065544367, 0.010834108106791973, -0.06487006694078445, 0.02024545893073082, -0.039298877120018005, -0.02212965115904808, 0.06683116406202316, 0.045451343059539795, 0.04695100709795952, -0.03579966351389885, 0.027282342314720154, 0.024552185088396072, -0.012631782330572605, -0.013756529428064823, -0.07021501660346985, -0.029589517042040825, 0.03485756739974022, 0.04975806921720505, -0.04360560327768326, 0.01859198324382305, -0.012574102729558945, 0.061640020459890366, -0.03579966351389885, -0.0012617362663149834, -0.007272407412528992, -0.05037331581115723, 0.03235812485218048, 0.011728138662874699, 0.017563367262482643, 0.028858911246061325, 0.03347326070070267, 0.0030041339341551065, 0.0024970360100269318, -0.06406255066394806, 0.02180280163884163, 0.01628480851650238, 0.026974719017744064, -0.0017832538578659296, -0.012026148848235607, -0.027532285079360008, -0.0732143446803093, 0.05102701485157013, 0.02785913646221161, 0.049834974110126495, 0.01794789731502533, -0.0048546805046498775, 0.018736181780695915, 0.03249271214008331, -0.037414684891700745, -0.040337104350328445, -0.03212741017341614, 0.10628385096788406, 0.027301568537950516, -0.018197841942310333, -0.039298877120018005, -0.013487359508872032, 0.05514147877693176, -0.02347550354897976, 0.011160957626998425, 0.04122152179479599, -0.023110201582312584, 0.019976288080215454, 0.005647771526128054, -0.0043043228797614574, -0.019957061856985092, 0.04918127506971359, 0.023225558921694756, 0.0222450103610754, 0.07644439488649368, 0.03922197222709656, -0.03591502085328102, 0.01299708429723978, 0.013621944934129715, -0.062255267053842545, 0.01529464591294527, 0.026955492794513702, 0.01940910704433918, 0.044605378061532974, -0.028359023854136467, 0.017457623034715652, -0.004030345939099789, 0.018390106037259102, -0.0547184944152832, 0.009252732619643211, -0.05002724006772041, -0.0383952334523201, -0.018736181780695915, -0.013198962435126305, -0.08713430166244507, -0.023090973496437073, -0.04833531007170677, 0.05894831568002701, -0.021879708394408226, -0.019034191966056824, 0.0006470904336310923, -0.0321466363966465, -0.03685711696743965, -0.001563351252116263, 0.025494281202554703, -0.012093441560864449, 0.0685230940580368, 0.030243216082453728, -0.04256737604737282, -0.01341045368462801, -0.022898709401488304, 0.03191591799259186, 0.017178839072585106, 0.05906367301940918, -0.006416829768568277, -0.013448906131088734, -0.026051849126815796, 0.027166983112692833, 0.07052264362573624, -0.07083026319742203, 0.04760470613837242, 0.01049764547497034, 0.02962796948850155, 0.002062037354335189, -0.0016186273423954844, 0.03383856266736984, 0.020476175472140312, -0.05121928080916405, -0.021245233714580536, 0.020649215206503868, -0.05971737578511238, 0.040952350944280624, 0.039068158715963364, -0.10289999842643738, 0.024994393810629845, -0.0040183295495808125, -0.031781334429979324, -0.03181978687644005, 0.005013298708945513, -0.03516519069671631, -0.03537667915225029, -0.012631782330572605, 0.019957061856985092, -0.01372769009321928, -0.004955619107931852, 0.013314321637153625, -0.027916815131902695, 0.019803250208497047, 0.00788765400648117, -0.024879034608602524, -0.031454481184482574, -0.005320922005921602, 0.009949691593647003, -0.0004250849306117743, -0.07721345126628876, 0.012131894007325172, -0.006748486310243607, -0.0379914790391922, -0.029954819008708, -0.008334669284522533, 0.035953473299741745, -0.06871535629034042, -0.012593328952789307, -0.019860928878188133, 0.004104848485440016, 0.008339475840330124, -0.008916269056499004, 0.009257539175450802, -0.008916269056499004, 0.019072644412517548, -0.059025220572948456, -0.044297754764556885, 0.0054170540533959866, -0.03822219744324684, 0.061409302055835724, -0.012872112914919853, 0.05644887685775757, 0.024571411311626434, 0.01793828420341015, -0.028051400557160378, 0.013535425066947937, 0.0459512323141098, -0.01200692169368267, -0.014640946872532368, 0.04725863039493561, 0.002617201302200556, -0.021937387064099312, 0.061524659395217896, -0.02985868789255619, -0.007757875137031078, -0.005671804770827293, -0.0084019610658288, -0.001673903432674706, 0.06290896236896515, 0.040452465415000916, 0.021264461800456047, 0.05491076037287712, 0.020399270579218864, -0.034492261707782745, -0.06306277960538864, 0.04498990997672081, -0.07121479511260986, 0.030320122838020325, 0.02920498698949814, -0.01012272946536541, 0.021629763767123222, 0.027282342314720154, 0.07913609594106674, 0.05414170026779175, -0.02128368802368641, -0.03476143255829811, 0.019880156964063644, 0.01900535263121128, -0.013391227461397648, 0.039606500416994095, 0.05952510982751846, 0.009358477778732777, -0.013689236715435982, -0.009151793085038662, 0.05079629644751549, -0.03831832855939865, -0.03979876637458801, -0.059871185570955276, -0.03697247430682182, -0.014439068734645844, 0.029589517042040825, 0.08674976974725723, 0.04918127506971359, 0.055487554520368576, 0.03570352867245674, -0.017995962873101234, -0.0659082904458046, -0.030704651027917862, -0.0517960749566555, 0.04029865190386772, -0.018005575984716415, -0.029089629650115967, -0.0490274652838707, 0.0222450103610754, -0.03895280137658119, 0.01658281870186329, 0.064793162047863, -0.07382959127426147, 0.08090493083000183, -0.018399719148874283, 0.04810459539294243, 0.027513058856129646, -0.025821130722761154, 0.03664562478661537, -0.01131476927548647, -0.005907328799366951, 0.042221300303936005, -0.015448457561433315, -0.031762104481458664, -0.042951904237270355, 0.06090941280126572, 0.06794629991054535, -0.08890313655138016, 0.003696286352351308, 0.05702567100524902, 0.01963021233677864, -0.023648541420698166, 0.012814433313906193, -0.0031315090600401163, 0.013708463869988918, -0.009223892353475094, -0.039721857756376266, -0.12627936899662018, 0.048258405178785324, 0.00475133815780282, -0.04314417019486427, 0.060063451528549194, 0.05256513133645058, 0.053488001227378845, 0.035011377185583115, -0.04898901283740997, 0.007291633635759354, -0.027916815131902695, -0.019380267709493637, 0.014583267271518707, 0.03456917032599449, 0.027724551036953926, -0.0007540375809185207, -0.06898452341556549, 0.05625661090016365, -0.07179158926010132, 0.07944371551275253, -0.0018950076773762703, 0.046797193586826324, 0.00844522099941969, 0.008325055241584778, 0.04195212945342064, 0.0024021053686738014, -0.0017928670858964324, 0.004184157587587833, 0.020187780261039734, 0.0563335195183754, -0.007209921255707741, -0.029051175341010094, 0.07659820467233658, 0.02212965115904808, -0.012689461000263691, 0.0009859567508101463, 0.0019154357723891735, 0.015160061419010162, -0.05979428067803383, 0.03443458303809166, -0.01335277408361435, -0.014958183281123638, -0.03883744403719902, -0.029397252947092056, -0.033223316073417664, -0.030531613156199455, 0.008642292581498623, -0.018236294388771057, -0.022206557914614677, 0.015900280326604843, 0.009541128762066364, 0.017294198274612427, -0.005229596048593521, -0.07536771148443222, 0.020803026854991913, -0.016659725457429886, -0.027936041355133057, 0.04006793722510338, -0.022456500679254532, 0.015496524050831795, -0.059448204934597015, 0.026147980242967606, 0.03285801410675049, -0.05137309059500694, 0.026013394817709923, 0.05937129631638527, 0.021149102598428726, 0.015275419689714909, 0.004523023962974548, -0.018024802207946777, -0.012526036240160465, -0.020476175472140312, -0.040452465415000916, -0.03435767814517021, 0.026359472423791885, -0.021437499672174454, 0.03203127533197403, -0.01918800361454487, -0.0011457765940576792, 0.013939181342720985, 0.014419842511415482, -0.07913609594106674, 0.023437051102519035, -0.0889800414443016, -0.04564360901713371, -0.022994842380285263, 0.04925817996263504, 0.028628194704651833, 0.03453071415424347, -0.015102381817996502, -0.028628194704651833, 0.02628256566822529, 0.04925817996263504, 0.010334220714867115, 0.04260582849383354, -0.02860896661877632, 0.01763066090643406, -0.0766366571187973, -0.00435238890349865, -0.02097606472671032, -0.005753517150878906, 0.011074438691139221, -0.014131445437669754, 0.10674528777599335, -0.028147531673312187, 0.008680745027959347, -0.017976736649870872, -0.005205563269555569, -0.007863620296120644, 0.007017656695097685, 0.025840356945991516, -0.046066589653491974, 0.018188228830695152, -0.08305829018354416, 0.06594674289226532, -0.055987440049648285, -0.015583042986690998, -0.010709136724472046, 0.00422982033342123, 0.014217964373528957, 0.0002816375344991684, -0.03791457414627075, 0.02201429195702076, -0.020283911377191544, -0.022071972489356995, 0.005032524932175875, 0.011583940126001835, 0.03139680251479149, -0.03497292473912239, 0.005099817644804716, 0.028359023854136467, 0.032204315066337585, 0.020899157971143723, -0.0020295928698033094, -0.026263339444994926, 0.02722466178238392, -0.014910116791725159, -0.0016931298887357116, -0.03891434893012047, -0.08982600271701813, -0.0005527606117539108, 0.030762329697608948, -0.05218060314655304, -0.04956580325961113, 0.027070850133895874, -0.026128754019737244, 0.007608870044350624, -0.007334893103688955, -0.030916141346096992, 0.0013482553185895085, -0.0038428879342973232, 0.025205884128808975, -0.003934213891625404, -0.044720739126205444, 0.014756305143237114, 0.05252667888998985, 0.04895055666565895, 0.016553979367017746, -0.04568206146359444, 0.022514181211590767, -0.019803250208497047, -0.0629858747124672, -0.000873001292347908, -0.020303137600421906, 0.01816900074481964, -0.0274361539632082, -0.011084051802754402, -0.008887429721653461, -0.009531515650451183, -0.024705996736884117, -0.02868587337434292, 0.02326401323080063, 0.031454481184482574, 0.0006242590025067329, 0.052949659526348114, -0.07198385149240494, 0.02880123257637024, 0.0009583187056705356, -0.04056782275438309, 0.02807062678039074, 0.011526260524988174, 0.05356490984559059, 0.011353222653269768, -0.0280898530036211, -0.015160061419010162, -0.013833435252308846, 0.019668664783239365, 0.00292242132127285, 0.025205884128808975, 0.035549718886613846, 0.036357227712869644, 0.07006120681762695, -0.015832986682653427, -0.01743839681148529, 0.021014517173171043, -0.03270420432090759, -0.014640946872532368, 0.0038741310127079487, -0.062447529286146164, -0.06160156801342964, -0.036568719893693924, 0.0020536258816719055, 0.009108534082770348, 0.019764797762036324, -0.08098183572292328, 0.011545486748218536, 0.017380716279149055, -0.01361233089119196, -0.03754926845431328, 0.001317012240178883, -0.03685711696743965, 0.03949114307761192, -0.04187522083520889, 0.0016222322592511773, 0.03910661116242409, -0.03608806058764458, -0.04602813720703125, -0.01670779101550579, 0.05571827292442322, 0.0004244841111358255, 0.020706893876194954, -0.06198609620332718, 0.027686096727848053, 0.0032805141527205706, -0.011718525551259518, 0.0636395737528801, -0.01816900074481964, 0.03331945091485977, -0.02420610934495926, -0.023667767643928528, -0.00558528583496809, 0.060063451528549194, 0.026474829763174057, -0.02568654529750347, 0.03787611797451973, 0.018390106037259102, 0.00016522736405022442, 0.01993783563375473, -0.04479764401912689, -0.016015637665987015, -0.016034863889217377, -0.006503348704427481, 0.011728138662874699, -0.0027013171929866076, -0.01982247643172741, 0.04548979550600052, 0.023552408441901207, -0.0746755599975586, 0.015121608041226864, -0.08175089210271835, 0.016034863889217377, 0.005402634385973215, -0.012958631850779057, -0.024609863758087158, -0.0488736517727375, 0.004025539383292198, 0.0415675975382328, -0.031050726771354675, 0.08152017742395401, 0.009569969028234482, 0.016515526920557022, 0.009098920971155167, 0.09574775397777557, 0.052949659526348114, 0.018534304574131966, 0.04845067113637924, 0.0027157370932400227, 0.06398564577102661, 0.0007245970773510635, 0.025532733649015427, 0.016640497371554375, -0.009517095983028412, 0.03358861804008484, -0.047335535287857056, -0.007022463250905275, 0.059640467166900635, -0.07417567074298859, 0.00021464536257553846, 0.01691928133368492, 0.038991253823041916, 0.00311949267052114, 0.008608645759522915, 0.05018104985356331, -0.05310347303748131, 0.04533598572015762, -0.02880123257637024, 0.011756977997720242, -0.03810683637857437, 0.05948665738105774, 0.025321243330836296, -0.06836927682161331, -0.09228698909282684, -0.0015477297129109502, 0.014564041048288345, 0.01689044199883938, -0.010411126539111137, -0.04475919157266617, 0.028435928747057915, 0.05106546729803085, -0.06106322631239891, 0.0018253116868436337, 0.024917487055063248, 0.052142150700092316, -0.03362707421183586, 0.053795624524354935, -0.006988816894590855, -0.07740571349859238, -0.000942096346989274, 0.04591277986764908, 0.027378473430871964, -0.008901849389076233, 0.010978306643664837, 0.027532285079360008, 0.03183901309967041, -0.03822219744324684, 0.0036217838060110807, -0.012093441560864449, 0.009579582139849663, 0.0288204587996006, 0.00007825768989278004, -0.042413562536239624, -0.02391771227121353, -0.02503284625709057, 0.006248598452657461, 0.03235812485218048, 0.00584003608673811, -0.021937387064099312, -0.01596757210791111, 0.03478065878152847, 0.015534976497292519, -0.017467236146330833, 0.017188452184200287, 0.032723430544137955, 0.019457174465060234, 0.015304259024560452, 0.04425930231809616, 0.017044253647327423, -0.012045375071465969, -0.04145224019885063, 0.04625885561108589, -0.040260199457407, -0.0229756161570549, -0.014842824079096317, -0.03120453841984272, -0.03256961703300476, -0.03268497437238693, -0.03422309085726738, 0.01951485313475132, -0.008248149417340755, 0.025321243330836296, -0.005364181473851204, 0.02474444918334484, 0.026224886998534203, -0.03328099474310875, 0.0259749423712492, -0.01068990956991911, 0.001286970917135477, -0.029974045231938362, -0.037626177072525024, -0.023879259824752808, 0.056641142815351486, 0.02839747630059719, -0.026224886998534203, 0.04256737604737282, 0.020610760897397995, -0.02370622009038925, -0.0540647953748703, 0.0002374767791479826, -0.0071906945668160915, -0.0019190406892448664, 0.012660621665418148, 0.01898612640798092, -0.0325503908097744, 0.0461050420999527, 0.028993496671319008, -0.003030570223927498, 0.016727017238736153, 0.0036674465518444777, -0.0072531807236373425, 0.004446118138730526, -0.07083026319742203, -0.003922197036445141, -0.03276188299059868, 0.029474157840013504, -0.056295063346624374, 0.0087047778069973, 0.03330022096633911, -0.016553979367017746, -0.008219310082495213, -0.026532510295510292, 0.019687891006469727, 0.0030858463142067194, -0.008589419536292553, 0.06148620694875717, 0.008315442129969597, 0.010536097921431065, -0.08798026293516159, 0.08436568826436996, 0.05141154304146767, -0.03393469750881195, 0.0012046577176079154, -0.0022579070646315813, -0.018716955557465553, -0.04018329456448555, -0.0177364069968462, -0.045451343059539795, -0.024898260831832886, -0.006786939222365618, -0.023090973496437073, -0.0048835198394954205, 0.05206524580717087, 0.012747140601277351, -0.027378473430871964, 0.0036434135399758816, -0.038991253823041916, -0.05371871963143349, -0.00521998293697834, -0.02326401323080063, 0.06829237192869186, -0.03858749940991402, -0.027205435559153557, 0.007969366386532784, -0.017553754150867462, -0.04114461690187454, -0.013227801769971848, 0.014573654159903526, -0.023610088974237442, -0.01752491481602192, 0.08105874061584473, -0.03756849467754364, -0.012824046425521374, 0.010584164410829544, -0.007863620296120644, -0.019178390502929688, 0.033357903361320496, -0.002525875810533762, 0.006719646509736776, -0.05218060314655304, 0.01837087981402874, 0.06310123205184937, -0.037318553775548935, 0.057256389409303665, -0.05398789048194885, -0.05091165751218796, -0.0025763451121747494, -0.029301119968295097, 0.014381389133632183, -0.028147531673312187, -0.0014407825656235218, -0.03341558203101158, -0.06352420896291733, 0.07805941253900528, -0.005042138043791056, 0.029051175341010094, -0.003201205050572753, 0.062370624393224716, -0.0098631726577878, -0.004422084894031286, 0.04202903434634209, -0.022283462807536125, -0.022360369563102722, 0.012410677969455719, -0.03862595185637474, 0.03610728681087494, 0.032415807247161865, 0.03331945091485977, 0.03228121995925903, 0.0628320574760437, 0.028051400557160378, 0.025090524926781654, -0.007863620296120644, -0.0222450103610754, 0.023033294826745987, 0.02139904536306858, 0.033761657774448395, 0.03389624133706093, 0.05856378749012947, -0.06613901257514954, 0.023571636527776718, 0.06198609620332718, 0.03964495286345482 ]
4,703
optbinning.binning.mdlp
fit
Fit MDLP discretization algorithm. Parameters ---------- x : array-like, shape = (n_samples) Data samples, where n_samples is the number of samples. y : array-like, shape = (n_samples) Target vector relative to x. Returns ------- self : MDLP
def fit(self, x, y): """Fit MDLP discretization algorithm. Parameters ---------- x : array-like, shape = (n_samples) Data samples, where n_samples is the number of samples. y : array-like, shape = (n_samples) Target vector relative to x. Returns ------- self : MDLP """ return self._fit(x, y)
(self, x, y)
[ 0.02103373035788536, 0.03015470691025257, 0.04400957003235817, 0.04040279611945152, -0.009164325892925262, -0.00019765182514674962, -0.025715600699186325, -0.015744952484965324, 0.035894330590963364, 0.03147256746888161, -0.0016440730541944504, -0.01874481700360775, -0.01787780411541462, 0.07099100947380066, -0.007074824534356594, 0.009710543788969517, -0.05177800729870796, 0.02358274906873703, -0.06696806848049164, 0.02158861979842186, 0.005436170380562544, 0.07712946087121964, -0.0023972904309630394, 0.05593966692686081, -0.04993993788957596, 0.03811388462781906, 0.041061729192733765, -0.0022195528727024794, -0.06374278664588928, -0.0010978550417348742, -0.01551085989922285, 0.056113071739673615, -0.029079610481858253, 0.02698143944144249, -0.013308647088706493, 0.016689997166395187, 0.022958500310778618, 0.011843395419418812, -0.0788634866476059, -0.04522338882088661, -0.0563211552798748, 0.0028286294545978308, 0.08045879006385803, 0.04179001972079277, -0.003255633171647787, 0.004343734122812748, -0.04723485931754112, 0.0391542986035347, -0.028576742857694626, 0.0027137501165270805, -0.011461909860372543, -0.023686790838837624, 0.005570557434111834, -0.036241136491298676, 0.009710543788969517, 0.0814298465847969, 0.03038012981414795, 0.043870847672224045, 0.05715348571538925, -0.01321327593177557, 0.012736418284475803, 0.005991058889776468, -0.008765500038862228, 0.00034788891207426786, -0.05795113742351532, 0.012164190411567688, -0.046749331057071686, -0.003992594312876463, -0.01760036125779152, 0.07504863291978836, 0.0014294873690232635, -0.01067292783409357, -0.004330729134380817, 0.023461367934942245, 0.09127911180257797, 0.028039194643497467, 0.016880739480257034, -0.05046014487743378, -0.001359042595140636, -0.009112305007874966, -0.02131117507815361, 0.04307319596409798, -0.034507110714912415, -0.01704547181725502, -0.07289844006299973, -0.016100428998470306, 0.0694303885102272, 0.015190064907073975, 0.06433235108852386, 0.006745359860360622, -0.005115375854074955, 0.05205545201897621, 0.012554345652461052, 0.07421629875898361, 0.015164053998887539, -0.015007992275059223, -0.013967576436698437, 0.049870576709508896, 0.004380582366138697, 0.023392006754875183, -0.019767891615629196, 0.04508466646075249, 0.02987726218998432, 0.07615840435028076, -0.008154255338013172, -0.020548203960061073, 0.015432828105986118, 0.008184601552784443, -0.004436938092112541, 0.002297583967447281, -0.0613151490688324, 0.009745224379003048, -0.017843123525381088, 0.04938505217432976, -0.09870073944330215, 0.022629035636782646, -0.06107238307595253, -0.0021176787558943033, -0.0020949197933077812, -0.022889139130711555, -0.08371876180171967, 0.05625179409980774, -0.08649320155382156, -0.05233289301395416, 0.006064754910767078, -0.057257525622844696, 0.045327432453632355, -0.020045336335897446, 0.006446240469813347, -0.058956872671842575, -0.018900880590081215, 0.005284443031996489, 0.010768298991024494, 0.04206746071577072, -0.025784961879253387, -0.04470318183302879, 0.05202076956629753, -0.04286511614918709, 0.038252606987953186, -0.011964777484536171, 0.01874481700360775, 0.051292479038238525, 0.041027046740055084, 0.042483627796173096, 0.02328796498477459, 0.024813907220959663, 0.009493790566921234, -0.015268095768988132, -0.015294106677174568, 0.05847134441137314, -0.051569923758506775, 0.015398147515952587, 0.08836594969034195, -0.016239149495959282, -0.0033986903727054596, 0.022594355046749115, -0.03216617554426193, 0.017981845885515213, 0.03898089751601219, 0.023634769022464752, 0.002104673534631729, -0.05462180823087692, 0.030518852174282074, 0.037905801087617874, 0.016689997166395187, 0.004415262956172228, -0.03967450559139252, -0.059546440839767456, -0.006762700155377388, -0.000380401877919212, 0.012805779464542866, -0.05989324674010277, -0.044182974845170975, -0.08115240186452866, 0.0005147888441570103, -0.027900472283363342, 0.022854458540678024, -0.0020049670711159706, 0.015675591304898262, 0.03431636840105057, 0.04539679363369942, 0.004755565430969, 0.011262496933341026, -0.013742153532803059, -0.017210204154253006, 0.005176066420972347, -0.02268105559051037, 0.01962917111814022, -0.008605102077126503, 0.014695867896080017, 0.006754030007869005, -0.037073466926813126, -0.013690132647752762, 0.005089365411549807, -0.004543147049844265, -0.0033314968459308147, 0.0409923680126667, -0.005735289771109819, 0.03696942701935768, 0.0009878526907414198, 0.03504465892910957, 0.005102370399981737, 0.0036089408677071333, -0.0004719801072496921, -0.06391618400812149, 0.0358249694108963, -0.03291180729866028, 0.05906091257929802, -0.05288778245449066, 0.011123774573206902, 0.04865676164627075, -0.004720884840935469, 0.0006892752135172486, 0.0000131067954498576, 0.04005599394440651, -0.03237425908446312, 0.007798780221492052, -0.05222885310649872, 0.015233415178954601, 0.005401489790529013, -0.007079159840941429, -0.030518852174282074, -0.04550083354115486, 0.06513000279664993, -0.023738810792565346, -0.01365545205771923, 0.013282636180520058, 0.015710271894931793, -0.001351456274278462, -0.08614639192819595, 0.005158726125955582, 0.004742559976875782, 0.02044416218996048, -0.03884217515587807, 0.03244362026453018, -0.04113109037280083, -0.005956378299742937, 0.04109640792012215, -0.07303716242313385, -0.0000021378978090069722, -0.02047884277999401, 0.002579363062977791, 0.020964371040463448, 0.010759629309177399, 0.009511130861938, 0.06970783323049545, 0.00654161162674427, 0.03329329192638397, 0.05389351770281792, 0.007009798660874367, -0.007460645399987698, -0.027779091149568558, -0.004343734122812748, 0.010915691964328289, 0.03776707872748375, -0.03669198229908943, 0.025472836568951607, 0.0030020319391041994, 0.02245563268661499, 0.011409888975322247, -0.026357190683484077, 0.02040948159992695, -0.061245787888765335, 0.05541945993900299, -0.03329329192638397, -0.00683206133544445, -0.053303949534893036, 0.029166311025619507, 0.015311446972191334, 0.004007766954600811, 0.025767620652914047, 0.037628356367349625, 0.05084163323044777, -0.029079610481858253, -0.01563224196434021, 0.032565001398324966, 0.005011334083974361, 0.003641453804448247, 0.07227419316768646, 0.01992395520210266, 0.043350640684366226, -0.0358249694108963, 0.009303047321736813, 0.01988927461206913, -0.019247684627771378, -0.015571550466120243, -0.02523007243871689, -0.012745088897645473, -0.007269902620464563, 0.00011636938143055886, -0.04744294285774231, 0.04515402764081955, 0.012042808346450329, 0.05649455636739731, 0.07525671273469925, 0.01729690656065941, -0.009745224379003048, -0.02496996894478798, 0.007148520555347204, 0.016950100660324097, 0.001543282880447805, -0.004803251009434462, -0.014765228144824505, 0.03856473043560982, -0.04314255714416504, -0.023426687344908714, 0.05351203307509422, -0.038044523447752, -0.007820455357432365, 0.004820591304451227, 0.020634904503822327, 0.0908629447221756, -0.029131630435585976, 0.013967576436698437, -0.029322374612092972, -0.017149513587355614, 0.022889139130711555, 0.0482059121131897, 0.039639826864004135, 0.015372137539088726, 0.02042682282626629, -0.03294648602604866, 0.025472836568951607, 0.003936238121241331, 0.0008946488378569484, 0.04324660077691078, 0.03783643990755081, -0.006125445477664471, -0.002325761830434203, -0.010239421389997005, 0.04525807127356529, -0.006975118070840836, 0.006233822088688612, -0.030917678028345108, -0.02503933012485504, -0.0181899294257164, 0.030588213354349136, -0.07747626304626465, 0.0624249242246151, -0.010733618400990963, 0.016611965373158455, -0.017531000077724457, -0.03554752469062805, -0.02212616801261902, -0.00295217870734632, 0.0002216301509179175, 0.038495369255542755, -0.06107238307595253, 0.039882589131593704, 0.07407757639884949, 0.0013384510530158877, 0.036483898758888245, 0.02418965846300125, -0.019213004037737846, 0.025334114208817482, 0.05378947779536247, -0.057812415063381195, 0.03558220714330673, -0.07178866118192673, 0.014921290799975395, -0.028524722903966904, -0.021501917392015457, -0.04855271801352501, 0.018051207065582275, -0.040194716304540634, -0.03884217515587807, -0.05372011661529541, 0.007985188625752926, 0.023756152018904686, 0.032270219177007675, -0.04879548028111458, -0.052957143634557724, -0.07171930372714996, 0.03542614355683327, -0.009207676164805889, -0.0024774891790002584, -0.04206746071577072, 0.02328796498477459, 0.04935036972165108, 0.03974386677145958, -0.012736418284475803, -0.06325725466012955, -0.02467518486082554, -0.026912078261375427, -0.009493790566921234, 0.035391464829444885, 0.01546750869601965, -0.03551284596323967, 0.03201011195778847, -0.007902821525931358, 0.08670128136873245, -0.04355872422456741, 0.05389351770281792, 0.028229936957359314, -0.023929554969072342, -0.03492327779531479, 0.025767620652914047, 0.0014197335112839937, -0.05989324674010277, -0.035616885870695114, -0.011149784550070763, -0.009849266149103642, -0.04064556211233139, 0.026478571817278862, -0.020600225776433945, -0.029911942780017853, 0.0247445460408926, -0.0012138179736211896, -0.02897556871175766, 0.05007866024971008, 0.003934070933610201, 0.015736283734440804, 0.004387084860354662, -0.03504465892910957, 0.006545946933329105, -0.02786579169332981, 0.017262225970625877, -0.0004844434151891619, 0.06169663369655609, 0.040472157299518585, 0.04626380279660225, -0.04439105838537216, -0.013898215256631374, -0.02328796498477459, -0.031663309782743454, -0.030622893944382668, -0.03417764604091644, -0.024952629581093788, 0.0003644163371063769, -0.03119512088596821, -0.07078292965888977, 0.0063335285522043705, -0.008553081192076206, -0.014765228144824505, -0.04158193618059158, -0.023426687344908714, -0.022247549146413803, 0.015736283734440804, -0.017444297671318054, -0.04713081568479538, 0.01764371059834957, -0.003940573427826166, 0.03384818136692047, -0.06041345372796059, -0.05746560916304588, 0.0074996608309447765, -0.0016820048913359642, 0.007451975252479315, -0.0875336155295372, -0.011323187500238419, 0.04314255714416504, 0.02923567220568657, 0.09571821987628937, 0.029911942780017853, -0.047061458230018616, -0.033379994332790375, 0.003071392886340618, -0.08503662049770355, 0.025334114208817482, 0.0090949647128582, 0.017565680667757988, 0.003513569477945566, 0.007790110073983669, -0.00908629409968853, -0.03207947313785553, 0.058401983231306076, -0.024363061413168907, 0.01251966506242752, 0.0544830858707428, -0.03388286009430885, 0.004998329095542431, 0.019698532298207283, 0.02077362686395645, -0.03435104712843895, 0.012320252135396004, 0.016854729503393173, -0.02276775613427162, 0.02358274906873703, 0.04179001972079277, -0.043593406677246094, -0.0025641904212534428, -0.07282907515764236, 0.03405626490712166, 0.008687468245625496, 0.0013232782948762178, -0.07123377174139023, -0.008878211490809917, -0.02529943361878395, -0.012320252135396004, 0.027224203571677208, 0.022785097360610962, 0.03554752469062805, 0.016958771273493767, -0.044148292392492294, -0.026478571817278862, 0.03492327779531479, 0.03641453757882118, -0.03870345279574394, 0.014166989363729954, -0.03414296358823776, -0.008210611529648304, 0.005579227581620216, -0.04865676164627075, -0.035356782376766205, 0.013343327678740025, 0.07511799037456512, -0.05788177624344826, 0.035929013043642044, -0.03755899518728256, 0.05802049860358238, -0.03887685388326645, -0.05261033773422241, 0.020357461646199226, 0.039882589131593704, 0.008006863296031952, 0.03918898105621338, -0.06689871102571487, 0.07241290807723999, 0.0031429214868694544, -0.03355339542031288, 0.003448543604463339, 0.065927654504776, 0.08240090310573578, -0.0794183760881424, 0.0363798588514328, 0.031663309782743454, -0.07490991055965424, -0.04092300683259964, 0.022299569100141525, 0.03492327779531479, 0.040784284472465515, -0.022247549146413803, 0.031056400388479233, 0.03950110450387001, -0.014886610209941864, -0.004707879852503538, -0.01961182989180088, -0.012129509821534157, -0.03488859534263611, -0.023652110248804092, 0.0038863851223140955, 0.005093700252473354, 0.04921164736151695, -0.007022804114967585, 0.01905694231390953, 0.005713614635169506, -0.04057620093226433, 0.02070426568388939, 0.0022802436724305153, 0.016976110637187958, -0.01645590364933014, -0.029391735792160034, -0.03341467306017876, -0.03742027282714844, 0.06547681242227554, -0.009597832337021828, -0.008709143847227097, 0.033137232065200806, -0.0032469630241394043, -0.020877668634057045, -0.04120045155286789, 0.002429803367704153, 0.06325725466012955, -0.03100437857210636, 0.03069225512444973, -0.02755366824567318, 0.010733618400990963, -0.029391735792160034, -0.02219552919268608, -0.07074824720621109, 0.005089365411549807, 0.06159259006381035, -0.0066196429543197155, 0.08801914006471634, -0.016872068867087364, 0.0672108381986618, 0.0032729734666645527, -0.10542876273393631, -0.09814585000276566, 0.004764235578477383, -0.019958635792136192, -0.026860058307647705, 0.03690006583929062, -0.03776707872748375, -0.01983725279569626, -0.017227545380592346, -0.025958364829421043, -0.034489769488573074, -0.027120161801576614, 0.0328771248459816, -0.0005340257193893194, -0.010568886063992977, -0.05365075543522835, -0.01336066797375679, -0.010412824340164661, 0.019421087577939034, -0.058089859783649445, -0.003194942371919751, 0.07511799037456512, -0.0014869270380586386, -0.05372011661529541, 0.05351203307509422, -0.03377882018685341, 0.00807188916951418, 0.02358274906873703, -0.003108240896835923, -0.04456445947289467, -0.0227157361805439, -0.0018489048816263676, -0.08330259472131729, -0.017843123525381088, -0.006519936490803957, 0.005735289771109819, -0.01848471350967884, -0.0015270262956619263, -0.017756422981619835, 0.05174332484602928, -0.07074824720621109, 0.0309350173920393, -0.0136641226708889, 0.02240361087024212, -0.011141114868223667, 0.023149242624640465, -0.014661187306046486, 0.004599503241479397, 0.04029875621199608, -0.04005599394440651, -0.05708412453532219, 0.000006684635081910528, -0.0017936327494680882, -0.015805643051862717, 0.020114697515964508, -0.015406818129122257, 0.011973447166383266, 0.06589297205209732, 0.020947029814124107, 0.015311446972191334, -0.019663851708173752, -0.015580220147967339, 0.034819234162569046, -0.048448678106069565, 0.07740690559148788, -0.012146850116550922, -0.033674776554107666, -0.05111907795071602, 0.001196477678604424, -0.0144964549690485, 0.015996387228369713, 0.029946623370051384, -0.028992909938097, -0.05143120139837265, -0.025767620652914047, -0.028992909938097, -0.021241813898086548, 0.10709342360496521, -0.010698938742280006, -0.0022217202931642532, -0.0004906750982627273, 0.024935288354754448, -0.04574359580874443, 0.03457647189497948, 0.012615036219358444, 0.06110706552863121, -0.014921290799975395, 0.0054968614131212234, 0.0009098215959966183, 0.02588900364935398, -0.06970783323049545, -0.05888751149177551, 0.0007022803765721619, -0.04452978074550629, 0.016950100660324097, -0.037940479815006256, 0.002679069759324193, -0.03929302096366882, -0.054066918790340424, -0.035114020109176636, -0.05774305388331413, 0.020964371040463448, 0.074979268014431, 0.04085364565253258, 0.015796974301338196, 0.020634904503822327, 0.008973582647740841, -0.007378279231488705, 0.04803251102566719, -0.00838834885507822, -0.025438155978918076, -0.04140853136777878, -0.008865206502377987, 0.027935152873396873, -0.01792982593178749, 0.026565272361040115, -0.03731623291969299, 0.02132851630449295, -0.0026747346855700016, -0.035616885870695114, -0.031420543789863586, 0.016577284783124924, -0.006004063878208399, -0.029651839286088943, 0.05795113742351532, 0.01350806001573801, 0.03492327779531479, -0.052436936646699905, -0.008054548874497414, -0.05802049860358238, 0.03329329192638397, -0.024033594876527786, -0.029322374612092972, 0.03329329192638397, -0.013421358540654182, -0.00835366826504469, -0.009372408501803875, 0.07310651987791061, -0.018554074689745903, -0.033969562500715256, -0.014557145535945892, 0.035374123603105545, 0.05458712950348854, 0.033622756600379944, -0.009259697049856186, 0.025490177795290947, -0.0007131180609576404, -0.02016671933233738, 0.02099905163049698, 0.020600225776433945, 0.008912892080843449, 0.05309586599469185, -0.03984791040420532, 0.005999728571623564, 0.022351590916514397, -0.013291306793689728, -0.02013203874230385, 0.01596170663833618, -0.01221621036529541, -0.006741024553775787, 0.032963827252388, 0.06627446413040161, -0.00106696761213243, -0.07192738354206085, 0.007716414052993059, 0.014427093788981438, -0.013022532686591148, -0.02528209425508976, 0.04567423462867737, -0.0613151490688324, 0.03572092950344086, 0.008982253260910511, -0.028784826397895813, 0.03925834223628044, -0.02191808447241783, 0.014114968478679657, 0.027362924069166183, -0.011418558657169342, 0.003925400786101818, 0.014323052018880844, -0.02333998493850231, 0.037108149379491806, -0.01365545205771923, -0.03644922003149986, -0.022819777950644493, 0.0722048282623291, 0.032478298991918564, -0.05274906009435654, 0.02299318090081215, 0.03686538711190224, 0.06956911087036133 ]
4,706
sklearn.utils._metadata_requests
set_fit_request
Request metadata passed to the ``fit`` method. Note that this method is only relevant if ``enable_metadata_routing=True`` (see :func:`sklearn.set_config`). Please see :ref:`User Guide <metadata_routing>` on how the routing mechanism works. The options for each parameter are: - ``True``: metadata is requested, and passed to ``fit`` if provided. The request is ignored if metadata is not provided. - ``False``: metadata is not requested and the meta-estimator will not pass it to ``fit``. - ``None``: metadata is not requested, and the meta-estimator will raise an error if the user provides it. - ``str``: metadata should be passed to the meta-estimator with this given alias instead of the original name. The default (``sklearn.utils.metadata_routing.UNCHANGED``) retains the existing request. This allows you to change the request for some parameters and not others. .. versionadded:: 1.3 .. note:: This method is only relevant if this estimator is used as a sub-estimator of a meta-estimator, e.g. used inside a :class:`~sklearn.pipeline.Pipeline`. Otherwise it has no effect. Parameters ---------- x : str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED Metadata routing for ``x`` parameter in ``fit``. Returns ------- self : object The updated object.
def __get__(self, instance, owner): # we would want to have a method which accepts only the expected args def func(**kw): """Updates the request for provided parameters This docstring is overwritten below. See REQUESTER_DOC for expected functionality """ if not _routing_enabled(): raise RuntimeError( "This method is only available when metadata routing is enabled." " You can enable it using" " sklearn.set_config(enable_metadata_routing=True)." ) if self.validate_keys and (set(kw) - set(self.keys)): raise TypeError( f"Unexpected args: {set(kw) - set(self.keys)}. Accepted arguments" f" are: {set(self.keys)}" ) requests = instance._get_metadata_request() method_metadata_request = getattr(requests, self.name) for prop, alias in kw.items(): if alias is not UNCHANGED: method_metadata_request.add_request(param=prop, alias=alias) instance._metadata_request = requests return instance # Now we set the relevant attributes of the function so that it seems # like a normal method to the end user, with known expected arguments. func.__name__ = f"set_{self.name}_request" params = [ inspect.Parameter( name="self", kind=inspect.Parameter.POSITIONAL_OR_KEYWORD, annotation=owner, ) ] params.extend( [ inspect.Parameter( k, inspect.Parameter.KEYWORD_ONLY, default=UNCHANGED, annotation=Optional[Union[bool, None, str]], ) for k in self.keys ] ) func.__signature__ = inspect.Signature( params, return_annotation=owner, ) doc = REQUESTER_DOC.format(method=self.name) for metadata in self.keys: doc += REQUESTER_DOC_PARAM.format(metadata=metadata, method=self.name) doc += REQUESTER_DOC_RETURN func.__doc__ = doc return func
(self: optbinning.binning.mdlp.MDLP, *, x: Union[bool, NoneType, str] = '$UNCHANGED$') -> optbinning.binning.mdlp.MDLP
[ 0.04383368045091629, -0.05829270929098129, -0.019129673019051552, 0.004701561760157347, -0.002906074048951268, -0.01725570671260357, -0.011529171839356422, 0.010007168166339397, 0.05699900537729263, 0.010863294824957848, -0.02144121564924717, 0.006497049704194069, 0.05129149556159973, -0.005384084768593311, -0.01991921104490757, 0.03751736879348755, 0.029983455315232277, 0.023819344118237495, 0.030154680833220482, -0.0336933359503746, 0.019224798306822777, -0.04280633106827736, -0.02878487855195999, 0.014915627427399158, 0.00845662783831358, 0.0655222237110138, 0.03793592005968094, -0.0453176349401474, 0.08995036780834198, -0.006535099819302559, -0.025189146399497986, -0.014202188700437546, 0.014725377783179283, 0.06289676576852798, 0.028956104069948196, -0.03156253322958946, -0.01070158276706934, 0.022791992872953415, -0.06263041496276855, -0.015286616049706936, -0.03721296787261963, -0.026673099026083946, 0.04862799122929573, -0.09664718061685562, 0.059472259134054184, 0.03190498426556587, -0.005327010061591864, 0.10517039149999619, -0.019215285778045654, -0.017617182806134224, 0.01321288663893938, -0.011205745860934258, 0.015134415589272976, -0.0050749280489981174, -0.005835929419845343, 0.05737950652837753, 0.05562920495867729, 0.04406198114156723, 0.059510309249162674, 0.02802387624979019, 0.027167750522494316, 0.03475873917341232, 0.03245671093463898, -0.00842333398759365, -0.04352927953004837, -0.038715947419404984, -0.04642108455300331, -0.013869251124560833, 0.008623097091913223, 0.03167668357491493, 0.028689753264188766, -0.01791207119822502, 0.005498235113918781, 0.026711149141192436, 0.021574389189481735, -0.02638772316277027, -0.04044722393155098, -0.05243299901485443, 0.05304179713129997, -0.04170287773013115, 0.01707496866583824, -0.017236681655049324, -0.027053600177168846, -0.08104664832353592, -0.009089211001992226, -0.03213328495621681, -0.008428090251982212, -0.04923679307103157, 0.03941987454891205, 0.0029940649401396513, -0.08553656190633774, 0.05151979625225067, -0.01619981788098812, -0.0029607710894197226, 0.00950300507247448, -0.030611282214522362, 0.0018109455704689026, -0.05840685963630676, 0.002432826440781355, -0.026596998795866966, 0.0007497053011320531, 0.03590024262666702, 0.06643542647361755, 0.07571963965892792, 0.03706076741218567, -0.05056854337453842, -0.016713494434952736, -0.008656390942633152, -0.011234283447265625, -0.003809763351455331, 0.01144355908036232, -0.01094890758395195, -0.059548359364271164, 0.01904406026005745, 0.0013983401004225016, 0.0011076137889176607, -0.01969091221690178, -0.04330097883939743, -0.05087294429540634, -0.015001240186393261, -0.026787249371409416, 0.011015495285391808, -0.02536037191748619, -0.06373386830091476, 0.0007384091732092202, 0.004237826447933912, 0.009588617831468582, 0.013431674800813198, 0.04478493332862854, -0.07240928709506989, -0.03160058334469795, -0.006806206423789263, -0.03907742351293564, 0.09284216910600662, 0.04398588091135025, 0.016256893053650856, 0.04748648777604103, 0.02045191265642643, -0.011966747231781483, 0.059053707867860794, -0.0030249806586652994, 0.02010946162045002, 0.036737341433763504, -0.021346090361475945, -0.0013935838360339403, -0.05072074383497238, 0.02692042477428913, -0.0001587401347933337, 0.02574087306857109, -0.03413091227412224, 0.025950148701667786, -0.018311597406864166, 0.0027800332754850388, -0.01266116090118885, -0.0026539925020188093, 0.0019203395349904895, 0.0230393186211586, -0.004808577708899975, 0.011196233332157135, -0.018149884417653084, -0.004777661990374327, -0.0056361667811870575, -0.012156997807323933, -0.0913962721824646, 0.0352153405547142, 0.021460240706801414, -0.006097523961216211, -0.04855189099907875, -0.03827837109565735, 0.03557681664824486, -0.060918163508176804, -0.02771947719156742, -0.03375041112303734, 0.006815718952566385, 0.0354246161878109, 0.03930572420358658, 0.01710350625216961, 0.00553152896463871, 0.008551753126084805, 0.02806192636489868, 0.013812175951898098, -0.05266129598021507, -0.08546046167612076, -0.03584316745400429, 0.006344849243760109, 0.07126778364181519, 0.006359118036925793, 0.001926284865476191, -0.04368147999048233, 0.04558398574590683, 0.02939368039369583, -0.0083805276080966, 0.05365059897303581, 0.03437823802232742, -0.031201057136058807, -0.04805723950266838, -0.059091757982969284, 0.04885629191994667, 0.01378363836556673, 0.07678504288196564, 0.05833075940608978, 0.009008354507386684, 0.018834784626960754, 0.04900849238038063, 0.006116549018770456, 0.0498836413025856, 0.03649001941084862, -0.00015695653564762324, -0.05239494889974594, -0.013070199638605118, 0.013203374110162258, -0.02657797373831272, 0.01809280924499035, -0.008470896631479263, 0.0038620822597295046, -0.010882319882512093, 0.01775035820901394, -0.015552965924143791, -0.01203333493322134, -0.02284906804561615, 0.09276606887578964, 0.04813333973288536, 0.03367431089282036, 0.019786037504673004, 0.025950148701667786, -0.031105931848287582, 0.05551505461335182, -0.05190029740333557, -0.03660416975617409, -0.07914415001869202, 0.00467540230602026, 0.0007746756309643388, 0.018654046580195427, 0.04390978068113327, -0.03468263894319534, -0.01999531127512455, 0.03620464354753494, 0.03850667178630829, -0.013393624685704708, -0.0067253499291837215, -0.005973861087113619, 0.04938898980617523, 0.05007389187812805, 0.03312258794903755, -0.05505845323204994, -0.01703691855072975, -0.004592167679220438, 0.0678052231669426, 0.04288243129849434, -0.001782407984137535, 0.04273023083806038, -0.025797948241233826, -0.05186224728822708, -0.0028513772413134575, -0.031067881733179092, -0.03401676192879677, -0.04219752922654152, 0.0002815110783558339, 0.04292048141360283, -0.015286616049706936, -0.030744457617402077, 0.012156997807323933, 0.0018775331554934382, 0.04143652692437172, 0.01816890947520733, 0.011776496656239033, 0.04314877837896347, 0.013831201009452343, -0.05570530518889427, 0.004794308915734291, -0.009598130360245705, 0.04497518390417099, -0.0015065449988469481, 0.0176076702773571, -0.01824500970542431, -0.05235689878463745, -0.0000814509330666624, -0.0243710707873106, -0.04333902895450592, -0.012347247451543808, 0.05014999210834503, -0.023705193772912025, 0.04330097883939743, 0.00609276769682765, -0.014392439275979996, -0.030649332329630852, -0.0045826551504433155, 0.0536886490881443, 0.012242610566318035, -0.02087046392261982, 0.011120133101940155, 0.007681358139961958, -0.005845441948622465, -0.04250193014740944, 0.03209523484110832, -0.003469690913334489, -0.0731322392821312, 0.0012627866817638278, 0.0016967953415587544, -0.011510146781802177, 0.020927539095282555, -0.0011141536524519324, -0.03300843760371208, -0.01779792085289955, 0.05281349644064903, -0.021536339074373245, 0.08097054809331894, -0.008038077503442764, -0.011747959069907665, 0.005688485689461231, 0.003912022802978754, 0.04527958482503891, -0.03359821066260338, -0.0445566326379776, -0.0011551763163879514, -0.002606429858133197, -0.013945350423455238, 0.01821647211909294, 0.04021892324090004, 0.10410499572753906, -0.014392439275979996, 0.04744843766093254, -0.03437823802232742, -0.007362688891589642, -0.01399291306734085, -0.012252123095095158, -0.0035576815716922283, -0.004109407775104046, -0.03831642121076584, 0.0009310376481153071, -0.03127715736627579, -0.0038573259953409433, 0.02262076735496521, 0.02475157007575035, -0.08614535629749298, 0.03125813230872154, -0.004145079758018255, -0.023476893082261086, 0.014630252495408058, -0.01239481009542942, 0.03506314009428024, -0.017464982345700264, -0.0061593553982675076, -0.012746773660182953, -0.03645196929574013, -0.01121525838971138, 0.05193834751844406, -0.0022723027504980564, 0.07914415001869202, -0.023362742736935616, 0.02147926576435566, -0.038145195692777634, 0.05212859809398651, 0.04900849238038063, 0.08431895822286606, -0.006677787285298109, -0.01378363836556673, -0.04588838666677475, -0.007524401415139437, -0.07088728249073029, 0.02848047763109207, -0.04847579076886177, -0.003610000479966402, 0.0061213052831590176, 0.010920369997620583, -0.000892987591214478, -0.02543647214770317, 0.003714638063684106, 0.025835998356342316, -0.05654240399599075, 0.0034268845338374376, -0.09839748591184616, -0.05429745092988014, 0.023971544578671455, 0.019167723134160042, 0.0021593414712697268, -0.03995257243514061, -0.017921583727002144, -0.05075879395008087, 0.028803903609514236, 0.03213328495621681, 0.022145140916109085, -0.0050368779338896275, 0.011319896206259727, 0.010406694374978542, -0.04577423632144928, 0.025721848011016846, 0.01615225523710251, 0.03843057155609131, -0.01775035820901394, 0.0218978151679039, -0.05281349644064903, -0.014278288930654526, 0.010682557709515095, -0.018996497616171837, -0.06985992938280106, 0.02619747444987297, -0.010349619202315807, 0.007229513488709927, -0.0426541306078434, 0.05452575162053108, -0.05650435388088226, 0.013032149523496628, 0.024504246190190315, 0.03447336331009865, 0.00973130576312542, 0.03827837109565735, 0.027015550062060356, 0.015638578683137894, 0.0192343108355999, -0.04885629191994667, -0.04897044226527214, 0.02007141150534153, -0.02414277009665966, -0.0016361530870199203, 0.01653275638818741, 0.028651703149080276, -0.004746746271848679, 0.029374655336141586, 0.006482780911028385, 0.05616190284490585, 0.008599315769970417, 0.01946261152625084, 0.0346636138856411, 0.05171004682779312, 0.006844256538897753, -0.04508933424949646, -0.04261608049273491, -0.0025469765532761812, 0.04136042669415474, 0.008889447897672653, 0.029412705451250076, -0.04147457703948021, -0.00857553444802761, -0.03629976883530617, -0.015486379154026508, -0.05646630376577377, -0.025113046169281006, 0.013308011926710606, 0.05117734521627426, -0.05646630376577377, -0.0445566326379776, -0.017693283036351204, -0.022145140916109085, -0.04261608049273491, -0.05399305000901222, 0.010492307133972645, 0.03888717293739319, 0.05692290514707565, -0.06639737635850906, 0.05319399759173393, 0.030820557847619057, 0.00535079138353467, 0.04162677749991417, -0.023476893082261086, -0.05220469832420349, 0.03531046584248543, -0.05049244314432144, -0.006116549018770456, 0.03881107270717621, 0.0342831127345562, 0.002772898878902197, -0.06259236484766006, -0.020965589210391045, -0.027890700846910477, 0.03472068905830383, 0.016780080273747444, 0.01058743242174387, -0.06658762693405151, -0.03251378610730171, 0.030249806120991707, -0.06978382915258408, -0.028499502688646317, -0.01028303150087595, -0.02326761744916439, 0.02170756459236145, -0.013269961811602116, 0.020699238404631615, -0.0711916834115982, -0.02201196551322937, 0.016970330849289894, -0.02456132136285305, 0.04090382531285286, 0.05125344544649124, -0.017132043838500977, -0.06620712578296661, -0.013308011926710606, -0.0020333006978034973, -0.022830042988061905, -0.007543426472693682, -0.009560080245137215, 0.06502757221460342, 0.05410720035433769, 0.02809997648000717, -0.01737936958670616, 0.05319399759173393, 0.0453176349401474, 0.01549589168280363, -0.018901372328400612, -0.01444951444864273, -0.01873965933918953, -0.03298941254615784, 0.02026166208088398, 0.0418931283056736, 0.01549589168280363, -0.05007389187812805, -0.0468396358191967, -0.01577175408601761, 0.0017907314468175173, -0.007120119407773018, -0.024770595133304596, -0.004247338976711035, -0.004894190467894077, 0.060842063277959824, -0.004442345816642046, -0.01740790717303753, -0.07743189483880997, 0.00806185882538557, -0.05570530518889427, -0.014021450653672218, 0.06849012523889542, 0.012803848832845688, 0.05357449874281883, -0.05171004682779312, 0.01165283378213644, -0.0009857346303761005, 0.012917999178171158, -0.01870160922408104, -0.012984586879611015, 0.028918053954839706, -0.011158183217048645, -0.006154599133878946, -0.01016888115555048, 0.017274731770157814, 0.015790779143571854, 0.06156501546502113, -0.024275945499539375, -0.011491121724247932, 0.04657328501343727, 0.00531274126842618, 0.024770595133304596, 0.04029502347111702, -0.0651417225599289, 0.03165765851736069, -0.005997642409056425, -0.04398588091135025, 0.02349591813981533, -0.013488749973475933, 0.022791992872953415, -0.0913962721824646, -0.06270651519298553, 0.03850667178630829, 0.04174092784523964, 0.015552965924143791, -0.012328223325312138, 0.01024498138576746, 0.05365059897303581, -0.01816890947520733, 0.030249806120991707, 0.01639006845653057, -0.020090436562895775, -0.026863349601626396, 0.02547452226281166, 0.02901317924261093, -0.037878844887018204, 0.07735579460859299, 0.05338424816727638, 0.01562906615436077, -0.04664938524365425, -0.09421197324991226, -0.008637365885078907, 0.0075957453809678555, -0.0031795590184628963, 0.02752922661602497, -0.03578609228134155, 0.05833075940608978, 0.017055943608283997, -0.01813085936009884, -0.03264696151018143, -0.060157161206007004, 0.02680627442896366, -0.04657328501343727, 0.02178366482257843, -0.02208806574344635, -0.0674247220158577, 0.0030677870381623507, -0.014620739966630936, 0.04295853152871132, -0.01692276820540428, 0.007329395040869713, -0.03156253322958946, -0.07020238041877747, -0.03519631549715996, -0.03643294423818588, 0.024618396535515785, 0.04482298344373703, -0.05589555203914642, -0.0321713350713253, 0.03420701250433922, -0.02749117650091648, -0.04025697335600853, 0.020052386447787285, 0.01188113447278738, 0.009959605522453785, -0.007700383197516203, 0.0027419831603765488, -0.04600253701210022, 0.02273491770029068, 0.016627881675958633, -0.022297341376543045, -0.004133189097046852, -0.02079436369240284, 0.011862109415233135, -0.02448522113263607, 0.02699652500450611, 0.02117486484348774, -0.030934708192944527, 0.05425940081477165, 0.04980754107236862, -0.09816918522119522, -0.02022361196577549, -0.03234256058931351, 0.008627853356301785, 0.005883492063730955, -0.05692290514707565, 0.014516102150082588, 0.00898932944983244, -0.07012628018856049, -0.010530357249081135, -0.05247104912996292, 0.012156997807323933, -0.025189146399497986, 0.04284438118338585, 0.002035678829997778, 0.09230947494506836, -0.01691325567662716, 0.07069703191518784, 0.024656446650624275, -0.06575052440166473, 0.016742030158638954, 0.0021236694883555174, 0.009469711221754551, -0.021155839785933495, 0.028309252113103867, -0.06613102555274963, 0.03778371959924698, -0.003985744901001453, -0.04284438118338585, 0.08781956136226654, -0.012366272509098053, -0.03770761936903, 0.07724164426326752, -0.03713686764240265, 0.005022609140723944, 0.05886346101760864, -0.01597151719033718, -0.015105878002941608, -0.0034149938728660345, 0.030706407502293587, -0.04550788551568985, -0.02490377053618431, -0.0048299808986485004, 0.05844490975141525, -0.03190498426556587, -0.002009519375860691, 0.02155536413192749, -0.03820227086544037, -0.05452575162053108, 0.07408348470926285, 0.05600970238447189, 0.01581931672990322, 0.008680172264575958, -0.0028561335057020187, 0.015591016039252281, 0.021193889901041985, -0.018463796004652977, 0.030497131869196892, -0.04737233743071556, -0.02726287581026554, 0.0344543382525444, -0.006868037860840559, 0.04219752922654152, -0.0487421415746212, 0.05148174613714218, 0.00016721223073545843, -0.007638551760464907, 0.027129700407385826, 0.0002247332304250449, -0.01148160919547081, -0.05376474931836128, 0.00031985840178094804, -0.08211205154657364, 0.05776000767946243, 0.024618396535515785, -0.009079698473215103, 0.00029533394263125956, -0.08386235684156418, -0.07663284242153168, 0.030440056696534157, -0.007110606878995895, -0.002644479973241687, 0.01806427165865898, 0.005831173155456781, -0.01437341421842575, 0.007757458370178938, 0.007686114404350519, 0.007063044235110283, -0.020090436562895775, 0.0046587553806602955, -0.029698079451918602, 0.04097992554306984, 0.007524401415139437, 0.04132237657904625, -0.04307267814874649, 0.08020954579114914, 0.009560080245137215, -0.006554124876856804, -0.007134388200938702, 0.010178393684327602, 0.02878487855195999, 0.014401951804757118, -0.008190277963876724, 0.04040917381644249, -0.03900132328271866, -0.007001212798058987, -0.0004191453044768423, -0.022373441606760025, -0.03287526220083237, -0.0013186727883294225, -0.019376998767256737, 0.08386235684156418, 0.006658762227743864, -0.01243286021053791, -0.005108221899718046, 0.03690856695175171, -0.08135104924440384, 0.006073742639273405, -0.006026179995387793, 0.024884745478630066, 0.05007389187812805, -0.0426541306078434, 0.058977607637643814, -0.03751736879348755, 0.04383368045091629, 0.020927539095282555, 0.02216416597366333, 0.008156984113156796, 0.005740804597735405, 0.07415958493947983, -0.013507775031030178, 0.028042901307344437, 0.016019079834222794, 0.00594056723639369, 0.0036718319170176983, 0.021650489419698715, -0.05425940081477165, 0.0036504287272691727, 0.014934652484953403, 0.03375041112303734, -0.02604527398943901, -0.05125344544649124, -0.020394837483763695, 0.0023472136817872524, -0.015105878002941608, 0.021308040246367455, 0.027129700407385826, 0.020052386447787285, 0.0563521534204483 ]
4,708
optbinning.binning.multiclass_binning
MulticlassOptimalBinning
Optimal binning of a numerical variable with respect to a multiclass or multilabel target. **Note that the maximum number of classes is set to 100**. To ease visualization of the binning table, a set of 100 maximally distinct colors is generated using the library `glasbey <https://github.com/taketwo/glasbey>`_. Parameters ---------- name : str, optional (default="") The variable name. prebinning_method : str, optional (default="cart") The pre-binning method. Supported methods are "cart" for a CART decision tree, "quantile" to generate prebins with approximately same frequency and "uniform" to generate prebins with equal width. Method "cart" uses `sklearn.tree.DecistionTreeClassifier <https://scikit-learn.org/stable/modules/generated/sklearn.tree. DecisionTreeClassifier.html>`_. solver : str, optional (default="cp") The optimizer to solve the optimal binning problem. Supported solvers are "mip" to choose a mixed-integer programming solver or "cp" to choose a constrained programming solver. max_n_prebins : int (default=20) The maximum number of bins after pre-binning (prebins). min_prebin_size : float (default=0.05) The fraction of mininum number of records for each prebin. min_n_bins : int or None, optional (default=None) The minimum number of bins. If None, then ``min_n_bins`` is a value in ``[0, max_n_prebins]``. max_n_bins : int or None, optional (default=None) The maximum number of bins. If None, then ``max_n_bins`` is a value in ``[0, max_n_prebins]``. min_bin_size : float or None, optional (default=None) The fraction of minimum number of records for each bin. If None, ``min_bin_size = min_prebin_size``. max_bin_size : float or None, optional (default=None) The fraction of maximum number of records for each bin. If None, ``max_bin_size = 1.0``. monotonic_trend : str, array-like or None, optional (default="auto") The **event rate** monotonic trend. Supported trends are “auto”, "auto_heuristic" and "auto_asc_desc" to automatically determine the trend maximizing IV using a machine learning classifier, a list of monotonic trends combining "auto", "auto_heuristic", "auto_asc_desc", "ascending", "descending", "concave", "convex", "peak", "valley", "peak_heuristic", "valley_heuristic" and None, one for each class. If None, then the monotonic constraint is disabled. min_event_rate_diff : float, optional (default=0) The minimum event rate difference between consecutives bins. .. versionadded:: 0.17.0 max_pvalue : float or None, optional (default=None) The maximum p-value among bins. The Z-test is used to detect bins not satisfying the p-value constraint. max_pvalue_policy : str, optional (default="consecutive") The method to determine bins not satisfying the p-value constraint. Supported methods are "consecutive" to compare consecutive bins and "all" to compare all bins. outlier_detector : str or None, optional (default=None) The outlier detection method. Supported methods are "range" to use the interquartile range based method or "zcore" to use the modified Z-score method. outlier_params : dict or None, optional (default=None) Dictionary of parameters to pass to the outlier detection method. user_splits : array-like or None, optional (default=None) The list of pre-binning split points. user_splits_fixed : array-like or None (default=None) The list of pre-binning split points that must be fixed. special_codes : array-like, dict or None, optional (default=None) List of special codes. Use special codes to specify the data values that must be treated separately. split_digits : int or None, optional (default=None) The significant digits of the split points. If ``split_digits`` is set to 0, the split points are integers. If None, then all significant digits in the split points are considered. mip_solver : str, optional (default="bop") The mixed-integer programming solver. Supported solvers are "bop" to choose the Google OR-Tools binary optimizer or "cbc" to choose the COIN-OR Branch-and-Cut solver CBC. time_limit : int (default=100) The maximum time in seconds to run the optimization solver. verbose : bool (default=False) Enable verbose output. **prebinning_kwargs : keyword arguments The pre-binning keywrord arguments. .. versionadded:: 0.6.1 Notes ----- The parameter values ``max_n_prebins`` and ``min_prebin_size`` control complexity and memory usage. The default values generally produce quality results, however, some improvement can be achieved by increasing ``max_n_prebins`` and/or decreasing ``min_prebin_size``. The pre-binning refinement phase guarantee that no prebin has either zero counts of non-events or events by merging those pure prebins. Pure bins produce infinity WoE and event rates.
class MulticlassOptimalBinning(OptimalBinning): """Optimal binning of a numerical variable with respect to a multiclass or multilabel target. **Note that the maximum number of classes is set to 100**. To ease visualization of the binning table, a set of 100 maximally distinct colors is generated using the library `glasbey <https://github.com/taketwo/glasbey>`_. Parameters ---------- name : str, optional (default="") The variable name. prebinning_method : str, optional (default="cart") The pre-binning method. Supported methods are "cart" for a CART decision tree, "quantile" to generate prebins with approximately same frequency and "uniform" to generate prebins with equal width. Method "cart" uses `sklearn.tree.DecistionTreeClassifier <https://scikit-learn.org/stable/modules/generated/sklearn.tree. DecisionTreeClassifier.html>`_. solver : str, optional (default="cp") The optimizer to solve the optimal binning problem. Supported solvers are "mip" to choose a mixed-integer programming solver or "cp" to choose a constrained programming solver. max_n_prebins : int (default=20) The maximum number of bins after pre-binning (prebins). min_prebin_size : float (default=0.05) The fraction of mininum number of records for each prebin. min_n_bins : int or None, optional (default=None) The minimum number of bins. If None, then ``min_n_bins`` is a value in ``[0, max_n_prebins]``. max_n_bins : int or None, optional (default=None) The maximum number of bins. If None, then ``max_n_bins`` is a value in ``[0, max_n_prebins]``. min_bin_size : float or None, optional (default=None) The fraction of minimum number of records for each bin. If None, ``min_bin_size = min_prebin_size``. max_bin_size : float or None, optional (default=None) The fraction of maximum number of records for each bin. If None, ``max_bin_size = 1.0``. monotonic_trend : str, array-like or None, optional (default="auto") The **event rate** monotonic trend. Supported trends are “auto”, "auto_heuristic" and "auto_asc_desc" to automatically determine the trend maximizing IV using a machine learning classifier, a list of monotonic trends combining "auto", "auto_heuristic", "auto_asc_desc", "ascending", "descending", "concave", "convex", "peak", "valley", "peak_heuristic", "valley_heuristic" and None, one for each class. If None, then the monotonic constraint is disabled. min_event_rate_diff : float, optional (default=0) The minimum event rate difference between consecutives bins. .. versionadded:: 0.17.0 max_pvalue : float or None, optional (default=None) The maximum p-value among bins. The Z-test is used to detect bins not satisfying the p-value constraint. max_pvalue_policy : str, optional (default="consecutive") The method to determine bins not satisfying the p-value constraint. Supported methods are "consecutive" to compare consecutive bins and "all" to compare all bins. outlier_detector : str or None, optional (default=None) The outlier detection method. Supported methods are "range" to use the interquartile range based method or "zcore" to use the modified Z-score method. outlier_params : dict or None, optional (default=None) Dictionary of parameters to pass to the outlier detection method. user_splits : array-like or None, optional (default=None) The list of pre-binning split points. user_splits_fixed : array-like or None (default=None) The list of pre-binning split points that must be fixed. special_codes : array-like, dict or None, optional (default=None) List of special codes. Use special codes to specify the data values that must be treated separately. split_digits : int or None, optional (default=None) The significant digits of the split points. If ``split_digits`` is set to 0, the split points are integers. If None, then all significant digits in the split points are considered. mip_solver : str, optional (default="bop") The mixed-integer programming solver. Supported solvers are "bop" to choose the Google OR-Tools binary optimizer or "cbc" to choose the COIN-OR Branch-and-Cut solver CBC. time_limit : int (default=100) The maximum time in seconds to run the optimization solver. verbose : bool (default=False) Enable verbose output. **prebinning_kwargs : keyword arguments The pre-binning keywrord arguments. .. versionadded:: 0.6.1 Notes ----- The parameter values ``max_n_prebins`` and ``min_prebin_size`` control complexity and memory usage. The default values generally produce quality results, however, some improvement can be achieved by increasing ``max_n_prebins`` and/or decreasing ``min_prebin_size``. The pre-binning refinement phase guarantee that no prebin has either zero counts of non-events or events by merging those pure prebins. Pure bins produce infinity WoE and event rates. """ def __init__(self, name="", prebinning_method="cart", solver="cp", max_n_prebins=20, min_prebin_size=0.05, min_n_bins=None, max_n_bins=None, min_bin_size=None, max_bin_size=None, monotonic_trend="auto", min_event_rate_diff=0, max_pvalue=None, max_pvalue_policy="consecutive", outlier_detector=None, outlier_params=None, user_splits=None, user_splits_fixed=None, special_codes=None, split_digits=None, mip_solver="bop", time_limit=100, verbose=False, **prebinning_kwargs): self.name = name self.dtype = "numerical" self.prebinning_method = prebinning_method self.solver = solver self.max_n_prebins = max_n_prebins self.min_prebin_size = min_prebin_size self.min_n_bins = min_n_bins self.max_n_bins = max_n_bins self.min_bin_size = min_bin_size self.max_bin_size = max_bin_size self.monotonic_trend = monotonic_trend self.min_event_rate_diff = min_event_rate_diff self.max_pvalue = max_pvalue self.max_pvalue_policy = max_pvalue_policy self.outlier_detector = outlier_detector self.outlier_params = outlier_params self.user_splits = user_splits self.user_splits_fixed = user_splits_fixed self.special_codes = special_codes self.split_digits = split_digits self.mip_solver = mip_solver self.time_limit = time_limit self.verbose = verbose self.prebinning_kwargs = prebinning_kwargs # auxiliary self._n_event = None self._n_event_missing = None self._n_event_special = None self._problem_type = "classification" # info self._binning_table = None self._classes = None self._n_classes = None self._n_prebins = None self._n_refinements = 0 self._n_samples = None self._optimizer = None self._splits_optimal = None self._status = None # timing self._time_total = None self._time_preprocessing = None self._time_prebinning = None self._time_solver = None self._time_optimizer = None self._time_postprocessing = None self._is_fitted = False def fit(self, x, y, check_input=False): """Fit the optimal binning according to the given training data. Parameters ---------- x : array-like, shape = (n_samples,) Training vector, where n_samples is the number of samples. y : array-like, shape = (n_samples,) Target vector relative to x. check_input : bool (default=False) Whether to check input arrays. Returns ------- self : Mu
(name='', prebinning_method='cart', solver='cp', max_n_prebins=20, min_prebin_size=0.05, min_n_bins=None, max_n_bins=None, min_bin_size=None, max_bin_size=None, monotonic_trend='auto', min_event_rate_diff=0, max_pvalue=None, max_pvalue_policy='consecutive', outlier_detector=None, outlier_params=None, user_splits=None, user_splits_fixed=None, special_codes=None, split_digits=None, mip_solver='bop', time_limit=100, verbose=False, **prebinning_kwargs)
[ 0.022732455283403397, -0.040763016790151596, -0.04809478297829628, 0.019375383853912354, -0.03540365770459175, -0.055426545441150665, -0.08790148049592972, -0.030841227620840073, -0.039886392652988434, -0.07758122682571411, -0.03309255838394165, 0.026238951832056046, 0.00845244899392128, -0.028649667277932167, -0.052836522459983826, 0.033351559191942215, 0.019743964076042175, -0.009782327339053154, -0.006181195843964815, 0.03380979597568512, -0.03785422071814537, -0.0037057287991046906, 0.01462368294596672, 0.09180644154548645, 0.008477352559566498, -0.0053942264057695866, -0.0025240296963602304, -0.03257455304265022, -0.019604500383138657, 0.006893452722579241, -0.05554608628153801, -0.0365990549325943, -0.0019798753783106804, -0.03639982268214226, 0.04434920847415924, -0.04514613747596741, 0.08415590971708298, 0.06594603508710861, -0.05825565382838249, 0.012491892091929913, 0.03020368330180645, -0.10782475769519806, -0.002659756923094392, 0.008183484897017479, 0.051720816642045975, 0.019225958734750748, 0.006554757244884968, 0.038930077105760574, -0.0025327461771667004, -0.0417591817677021, -0.01529111247509718, -0.08463406562805176, 0.05526716262102127, 0.03908946365118027, -0.029227443039417267, 0.0719628632068634, 0.04948941245675087, 0.027533963322639465, 0.015311035327613354, -0.012133273296058178, -0.01925584301352501, 0.032534707337617874, 0.04622199386358261, -0.06016828492283821, -0.008253215812146664, -0.026816725730895996, -0.07283949106931686, 0.018289566040039062, -0.007097666151821613, 0.0153907286003232, 0.03669866919517517, -0.020899513736367226, 0.044747672975063324, 0.043552275747060776, -0.03731629252433777, -0.0017918493831530213, -0.03442741557955742, -0.037156905978918076, -0.007182340137660503, -0.012820626609027386, 0.06562726199626923, 0.05733918026089668, 0.01890718750655651, -0.08017124980688095, 0.015311035327613354, -0.07108624279499054, 0.019753925502300262, 0.06204107403755188, 0.06232000142335892, -0.030024373903870583, -0.027434347197413445, 0.01219304371625185, 0.055904705077409744, 0.09340030699968338, 0.018389182165265083, -0.03129946440458298, -0.02115851640701294, -0.02245352976024151, -0.023110996931791306, -0.0523185171186924, -0.01312943734228611, -0.018917148932814598, 0.02217460423707962, 0.08495283871889114, 0.008716432377696037, 0.015201457776129246, -0.022533223032951355, 0.003710709745064378, -0.034467265009880066, -0.039268773049116135, -0.03653928264975548, 0.001116325962357223, -0.03112015314400196, -0.03940823674201965, -0.041480254381895065, -0.0067141433246433735, -0.045425064861774445, 0.010310294106602669, -0.013707212172448635, 0.048891711980104446, 0.013498017564415932, -0.00419135857373476, -0.032973017543554306, 0.014534028246998787, -0.02289184182882309, -0.010858183726668358, 0.05295605957508087, 0.06881498545408249, -0.011535575613379478, -0.05777749419212341, 0.05299590900540352, -0.026557723060250282, -0.05650240555405617, 0.04064347967505455, -0.0026871515437960625, -0.03464657440781593, -0.004340783227235079, 0.05387253314256668, 0.001733324839733541, -0.03293317183852196, 0.10567304491996765, 0.0007496131584048271, 0.0032898306380957365, -0.013976176269352436, 0.03831245377659798, -0.00274194055236876, 0.05024649575352669, -0.027952352538704872, 0.0025576502084732056, -0.0145240668207407, -0.03574235364794731, -0.06953222304582596, -0.02424662373960018, -0.015251265838742256, 0.026278797537088394, 0.0055237277410924435, -0.006320658605545759, -0.04020516574382782, -0.03010406717658043, -0.014763145707547665, -0.027494117617607117, -0.03201670199632645, -0.01829952746629715, -0.06299739331007004, -0.04805493727326393, 0.032873403280973434, -0.02030181512236595, 0.004960895050317049, -0.02000296674668789, 0.022015217691659927, 0.009548229165375233, -0.051441892981529236, -0.06602572649717331, 0.07574828714132309, -0.013537864200770855, 0.0860685408115387, 0.034068796783685684, -0.03068184107542038, -0.023509463295340538, 0.045903220772743225, 0.03574235364794731, -0.029904833063483238, -0.013926368206739426, -0.0626387745141983, -0.03438756987452507, 0.007565862964838743, 0.05873380973935127, -0.03418833762407303, 0.007565862964838743, 0.020520972087979317, -0.018080370500683784, -0.05084419250488281, 0.018996842205524445, 0.0012595244916155934, 0.011276572942733765, -0.018040524795651436, 0.005439053755253553, 0.04853309318423271, 0.03145884722471237, -0.019584577530622482, 0.009538266807794571, 0.029087979346513748, 0.053832683712244034, 0.018628260120749474, -0.010619104839861393, -0.016048196703195572, 0.0047691334038972855, 0.019076533615589142, 0.048413556069135666, -0.022592991590499878, -0.00802907906472683, -0.03707721084356308, -0.003277378622442484, 0.07359657436609268, 0.044269513338804245, -0.02952629141509533, 0.040763016790151596, -0.005762807093560696, -0.025800639763474464, -0.003140405984595418, 0.022851994261145592, 0.007003030739724636, 0.013607596047222614, 0.02251329831779003, 0.00321013736538589, 0.0005787088302895427, 0.0389101542532444, 0.027713272720575333, 0.11324388533830643, -0.019614463672041893, 0.01296008937060833, -0.03833237662911415, -0.04757677763700485, 0.0035911700688302517, -0.02346961572766304, 0.027454271912574768, -0.021716367453336716, 0.010126003995537758, -0.029705600813031197, -0.012750894762575626, 0.008004175499081612, -0.0019275767263025045, -0.014862761832773685, -0.049409717321395874, -0.034028951078653336, -0.0018690520664677024, 0.06881498545408249, 0.0523185171186924, -0.0064152940176427364, 0.02020219899713993, 0.005747864488512278, -0.03962739184498787, -0.018150102347135544, -0.007600728888064623, 0.01680528186261654, -0.049409717321395874, -0.029645830392837524, 0.0057329218834638596, 0.024943938478827477, 0.03098069131374359, -0.036618977785110474, -0.01785125397145748, 0.009299187920987606, 0.06228015199303627, -0.0019400287419557571, 0.012631355784833431, -0.007366630248725414, -0.006664334796369076, -0.006604565307497978, 0.036718592047691345, -0.0314389243721962, -0.0001464671950088814, -0.022473452612757683, 0.01341832522302866, -0.038830459117889404, 0.011525614187121391, -0.008432525210082531, -0.011326381005346775, 0.010280408896505833, -0.011655115522444248, 0.042914729565382004, 0.0018429028568789363, 0.015211419202387333, -0.03779444843530655, 0.007819884456694126, -0.007471227552741766, -0.044986750930547714, -0.021576905623078346, 0.022294143214821815, -0.004831393714994192, -0.040085624903440475, -0.021297980099916458, 0.04486721381545067, 0.020162353292107582, 0.055147621780633926, -0.003190214280039072, 0.018150102347135544, -0.050286341458559036, 0.004076799843460321, -0.05343421921133995, 0.014723299071192741, -0.026916341856122017, 0.02588033303618431, -0.025621330365538597, -0.016954705119132996, 0.0023434751201421022, 0.0697314590215683, -0.046381380409002304, -0.007456284947693348, -0.007217206060886383, 0.026338567957282066, 0.023170767351984978, 0.05530700832605362, -0.030841227620840073, 0.008547084406018257, -0.06136368215084076, 0.04140056297183037, 0.004921048413962126, -0.002819143235683441, 0.05152158439159393, -0.05088404193520546, 0.016825204715132713, 0.017522519454360008, -0.020999129861593246, -0.017034398391842842, 0.015669655054807663, 0.04785570502281189, 0.016556240618228912, -0.05594455078244209, -0.06295754760503769, -0.018170025199651718, -0.027394501492381096, 0.040763016790151596, 0.048015087842941284, -0.020421355962753296, 0.006953222677111626, 0.029346982017159462, 0.006888472009450197, 0.0006089050439186394, -0.06877513974905014, 0.053115446120500565, 0.03735613822937012, -0.012262774631381035, 0.05498823523521423, -0.028968440368771553, -0.04136071726679802, 0.0037032384425401688, 0.01594858057796955, 0.027812890708446503, 0.07686398923397064, 0.03980670124292374, 0.004759171977639198, -0.003277378622442484, 0.06479048728942871, 0.06706173717975616, -0.08447468280792236, 0.017741674557328224, -0.057976726442575455, 0.048214323818683624, -0.023788388818502426, -0.02299145795404911, -0.018050486221909523, -0.024545473977923393, 0.04275534674525261, 0.03727644309401512, 0.0033346579875797033, -0.027294885367155075, 0.02530255727469921, 0.0183393731713295, -0.03438756987452507, 0.0130796292796731, -0.0905313566327095, -0.03900976851582527, 0.0016100495122373104, 0.008098810911178589, 0.028291048482060432, -0.029605984687805176, -0.0030656936578452587, 0.002009760122746229, 0.010609143413603306, 0.06686250865459442, 0.010639027692377567, -0.054948389530181885, 0.020012928172945976, 0.023768465965986252, -0.023210613057017326, 0.006978126708418131, -0.02227422036230564, 0.07965324819087982, -0.04438905417919159, 0.019883427768945694, 0.02530255727469921, 0.004791547078639269, -0.019076533615589142, -0.057498566806316376, -0.011625230312347412, 0.062718465924263, 0.03285347670316696, 0.0003334035282023251, -0.018618298694491386, -0.01785125397145748, -0.03861130401492119, 0.003165310015901923, 0.04829401522874832, -0.01224285177886486, -0.04956910386681557, 0.057976726442575455, 0.008034059777855873, 0.00840264093130827, 0.028868824243545532, -0.04438905417919159, 0.03424810618162155, -0.0008050247561186552, -0.008736355230212212, -0.06578665226697922, 0.024027468636631966, -0.033072635531425476, -0.027633581310510635, 0.03602127730846405, -0.042197491973638535, 0.04554460197687149, 0.043990589678287506, 0.046341534703969955, -0.0002639833837747574, 0.0023409847635775805, 0.000948845932725817, -0.013119475916028023, -0.03847184032201767, -0.04510629177093506, 0.03323202207684517, -0.035323962569236755, -0.03785422071814537, -0.09037196636199951, -0.028649667277932167, -0.027135498821735382, -0.017701828852295876, -0.04159979522228241, 0.02976537123322487, 0.023350076749920845, -0.029207518324255943, -0.019166188314557076, -0.0067141433246433735, 0.03351094573736191, -0.007027934771031141, 0.003304773010313511, -0.031179923564195633, -0.04713846370577812, -0.026338567957282066, -0.0523185171186924, -0.032674167305231094, 0.018827494233846664, -0.023170767351984978, 0.0191462654620409, 0.03454695641994476, -0.029167672619223595, -0.010111060924828053, -0.030562302097678185, -0.00824823509901762, 0.020600665360689163, -0.023549309000372887, -0.010888068936765194, 0.021417519077658653, -0.006275831256061792, 0.04462813213467598, -0.02890866994857788, -0.02048112452030182, 0.05164112523198128, 0.019295690581202507, 0.004497678950428963, 0.038113221526145935, -0.006066636648029089, -0.021676521748304367, 0.0025501789059489965, -0.01646658591926098, -0.0016187659930437803, 0.05502808094024658, -0.019753925502300262, 0.009966617450118065, 0.008168541826307774, -0.04279519245028496, 0.05227867141366005, -0.0017283440101891756, 0.02914774976670742, 0.008053983561694622, -0.005882346536964178, -0.024067314341664314, 0.005927173886448145, 0.01173480786383152, -0.01084822230041027, -0.012721010483801365, -0.04626183956861496, 0.013816790655255318, 0.05443038418889046, 0.07702337205410004, -0.022672684863209724, 0.04482736438512802, 0.017701828852295876, 0.009458574466407299, 0.06319662183523178, -0.034706342965364456, 0.005130243021994829, 0.04550475627183914, -0.035124730318784714, -0.0488518662750721, 0.029845064505934715, -0.031678006052970886, -0.044508595019578934, 0.034068796783685684, -0.054510075598955154, 0.019166188314557076, -0.021995294839143753, -0.07546935975551605, 0.048413556069135666, 0.016825204715132713, 0.004432928282767534, 0.018409105017781258, 0.020700281485915184, 0.009294207207858562, -0.03386956453323364, -0.001449418137781322, 0.041918568313121796, 0.04478751868009567, 0.008626777678728104, -0.06423263251781464, 0.032295625656843185, 0.037973757833242416, 0.0033246963284909725, -0.02374854125082493, 0.0348258838057518, 0.04351243004202843, 0.023768465965986252, -0.01697462983429432, 0.029227443039417267, 0.06534833461046219, 0.03410864621400833, 0.011704923585057259, 0.009563171304762363, 0.00863673910498619, 0.04929018020629883, -0.03207647055387497, 0.00039068295154720545, 0.08694516867399216, 0.05279667675495148, 0.002096924465149641, 0.019604500383138657, 0.07845785468816757, 0.01341832522302866, 0.06881498545408249, -0.00037947611417621374, -0.020501049235463142, 0.046580612659454346, 0.03626035898923874, 0.029327059164643288, 0.0019088987028226256, 0.0557054728269577, -0.04096224904060364, 0.02697611227631569, 0.025282634422183037, 0.030502531677484512, 0.04002585634589195, -0.06813759356737137, 0.004878711421042681, 0.008940569125115871, -0.04630168899893761, -0.03932854160666466, 0.033730100840330124, -0.019375383853912354, 0.037495601922273636, -0.015430575236678123, 0.007247090805321932, 0.03303278610110283, 0.010898030363023281, -0.060287825763225555, -0.013258938677608967, -0.031339310109615326, 0.014563913457095623, -0.010808375664055347, -0.025501789525151253, -0.06108475849032402, -0.04996756836771965, 0.009936733171343803, -0.009229456074535847, 0.002423168160021305, -0.0663444995880127, -0.020052775740623474, 0.04482736438512802, -0.0627981573343277, -0.01207350380718708, -0.01996312104165554, 0.018458912149071693, -0.027952352538704872, 0.020620588213205338, -0.027633581310510635, -0.05315529555082321, 0.013916406780481339, 0.0372166745364666, -0.06514910608530045, 0.0061612725257873535, 0.05905258283019066, -0.007077742833644152, 0.011814501136541367, -0.005588478408753872, -0.029327059164643288, 0.03092092089354992, 0.01680528186261654, -0.020252007991075516, -0.01635700836777687, -0.019973082467913628, 0.011814501136541367, -0.02466501295566559, -0.021796060726046562, 0.017293401062488556, 0.013239014893770218, 0.007809923030436039, -0.06307708472013474, -0.011435959488153458, -0.0266971867531538, -0.003137915628030896, 0.07965324819087982, -0.01969415508210659, -0.01574934832751751, 0.019724041223526, 0.048453401774168015, 0.03727644309401512, -0.04897140711545944, -0.06431232392787933, 0.029068056493997574, -0.06367478519678116, 0.026996035128831863, -0.012641317211091518, -0.0076754409819841385, 0.0006213571177795529, 0.055625781416893005, -0.035084884613752365, 0.016267353668808937, 0.0058076344430446625, 0.044269513338804245, 0.011934041045606136, -0.003578718053176999, -0.02428647130727768, 0.018658146262168884, -0.006061655934900045, 0.008606853894889355, 0.016755472868680954, -0.0007689138292334974, -0.03283355385065079, 0.009129839949309826, 0.016028273850679398, 0.08965472877025604, -0.0038028548005968332, -0.010888068936765194, 0.00829804316163063, -0.07495135813951492, -0.00836777500808239, -0.008168541826307774, 0.01793094538152218, 0.0031877236906439066, 0.019783809781074524, 0.005513765849173069, -0.03819291666150093, -0.06431232392787933, 0.016705665737390518, 0.02870943769812584, -0.02731480821967125, -0.028729360550642014, 0.02139759622514248, 0.012252813205122948, -0.01890718750655651, 0.01792098395526409, 0.02813166193664074, -0.013786905445158482, -0.028988363221287727, -0.06789851933717728, -0.042675651609897614, -0.007884635590016842, -0.02390792779624462, -0.047258004546165466, -0.01915622688829899, -0.045185983180999756, -0.028550051152706146, 0.07128547132015228, 0.030044296756386757, -0.04873232543468475, 0.03641974553465843, 0.09969606250524521, 0.03572243079543114, -0.054270997643470764, -0.031140075996518135, -0.012770818546414375, -0.004298446234315634, 0.007575824856758118, 0.030223606154322624, 0.04315381124615669, 0.012063542380928993, 0.0008809822611510754, 0.007914520800113678, -0.0261592585593462, -0.028530128300189972, 0.0238481592386961, -0.05614378675818443, 0.03771475702524185, -0.05271698161959648, -0.04458828642964363, 0.026318645104765892, -0.008427544496953487, 0.08479345589876175, -0.054470229893922806, -0.03394925966858864, 0.05474915727972984, -0.02169644460082054, 0.006873529404401779, 0.06136368215084076, 0.017333248630166054, -0.04255611076951027, 0.015520229935646057, 0.06554757058620453, -0.05207943543791771, 0.011675038374960423, -0.06371463090181351, 0.012053580954670906, 0.026657339185476303, 0.034746188670396805, 0.00705781951546669, -0.003767989110201597, -0.020421355962753296, -0.016446663066744804, 0.06487017869949341, -0.08630762249231339, 0.019544731825590134, 0.033411331474781036, 0.05741887539625168, 0.012491892091929913, -0.04741739109158516, -0.006594603415578604, 0.0313592329621315, -0.031618233770132065, 0.059610433876514435, -0.023449692875146866, 0.022234372794628143, 0.04163964092731476, -0.01639685407280922, -0.04506644606590271, -0.02231406606733799, -0.004051895812153816, -0.010658951476216316, 0.05482884868979454, 0.036001354455947876, 0.0016997043276205659, 0.04594307020306587, -0.06554757058620453, 0.029068056493997574, 0.018379220739006996, 0.0005684358766302466, 0.03731629252433777, 0.03422818332910538, -0.028888747096061707, 0.03938831016421318, -0.002064549131318927, -0.008766240440309048, -0.093081533908844, -0.013557787984609604, -0.013717173598706722, 0.028649667277932167, -0.014364680275321007, 0.010310294106602669, 0.03649943694472313, 0.010081176646053791, 0.009732519276440144 ]
4,710
optbinning.binning.multiclass_binning
__init__
null
def __init__(self, name="", prebinning_method="cart", solver="cp", max_n_prebins=20, min_prebin_size=0.05, min_n_bins=None, max_n_bins=None, min_bin_size=None, max_bin_size=None, monotonic_trend="auto", min_event_rate_diff=0, max_pvalue=None, max_pvalue_policy="consecutive", outlier_detector=None, outlier_params=None, user_splits=None, user_splits_fixed=None, special_codes=None, split_digits=None, mip_solver="bop", time_limit=100, verbose=False, **prebinning_kwargs): self.name = name self.dtype = "numerical" self.prebinning_method = prebinning_method self.solver = solver self.max_n_prebins = max_n_prebins self.min_prebin_size = min_prebin_size self.min_n_bins = min_n_bins self.max_n_bins = max_n_bins self.min_bin_size = min_bin_size self.max_bin_size = max_bin_size self.monotonic_trend = monotonic_trend self.min_event_rate_diff = min_event_rate_diff self.max_pvalue = max_pvalue self.max_pvalue_policy = max_pvalue_policy self.outlier_detector = outlier_detector self.outlier_params = outlier_params self.user_splits = user_splits self.user_splits_fixed = user_splits_fixed self.special_codes = special_codes self.split_digits = split_digits self.mip_solver = mip_solver self.time_limit = time_limit self.verbose = verbose self.prebinning_kwargs = prebinning_kwargs # auxiliary self._n_event = None self._n_event_missing = None self._n_event_special = None self._problem_type = "classification" # info self._binning_table = None self._classes = None self._n_classes = None self._n_prebins = None self._n_refinements = 0 self._n_samples = None self._optimizer = None self._splits_optimal = None self._status = None # timing self._time_total = None self._time_preprocessing = None self._time_prebinning = None self._time_solver = None self._time_optimizer = None self._time_postprocessing = None self._is_fitted = False
(self, name='', prebinning_method='cart', solver='cp', max_n_prebins=20, min_prebin_size=0.05, min_n_bins=None, max_n_bins=None, min_bin_size=None, max_bin_size=None, monotonic_trend='auto', min_event_rate_diff=0, max_pvalue=None, max_pvalue_policy='consecutive', outlier_detector=None, outlier_params=None, user_splits=None, user_splits_fixed=None, special_codes=None, split_digits=None, mip_solver='bop', time_limit=100, verbose=False, **prebinning_kwargs)
[ 0.015676112845540047, -0.03183918073773384, -0.03594081476330757, 0.005604632198810577, -0.045623671263456345, -0.053826943039894104, -0.08825071156024933, -0.04408789798617363, -0.03642776608467102, -0.058958668261766434, -0.022718191146850586, 0.045286551117897034, -0.007524347398430109, -0.0013730645878240466, -0.036390308290719986, 0.04817080497741699, 0.01496441476047039, -0.009125670418143272, -0.020058682188391685, -0.0021034928504377604, -0.010235359892249107, 0.003083250019699335, -0.029404418542981148, 0.08353102207183838, 0.015385814942419529, 0.028318140655755997, 0.004485578276216984, -0.03764514625072479, -0.04738419130444527, 0.012894867919385433, -0.05311524122953415, -0.007154450751841068, -0.005632725544273853, -0.014271443709731102, 0.04169059544801712, -0.05139218270778656, 0.05671119689941406, -0.00043544761138036847, -0.09514296054840088, 0.026482705026865005, 0.03547259047627449, -0.09079784899950027, -0.006419340614229441, 0.00006781920819776133, 0.011705581098794937, 0.021781744435429573, -0.015900861471891403, 0.02775627374649048, -0.0094534270465374, -0.014823947101831436, -0.045286551117897034, -0.05536271259188652, 0.05356473848223686, 0.03234485909342766, -0.04772131145000458, 0.09259582310914993, 0.04873267188668251, 0.045698586851358414, 0.0025143586099147797, 0.02118241786956787, -0.045473840087652206, 0.053826943039894104, 0.060794103890657425, -0.04847046732902527, -0.009088212624192238, -0.005014670547097921, -0.06985890865325928, -0.0027882694266736507, -0.00507553992792964, 0.020807839930057526, 0.07577724754810333, -0.021276064217090607, 0.016453364863991737, 0.048358093947172165, -0.008577849715948105, -0.01728680171072483, -0.047946058213710785, -0.04940691590309143, -0.0032822447828948498, -0.020264701917767525, 0.05322761461138725, 0.05086776986718178, 0.005314333830028772, -0.06379073113203049, 0.021894117817282677, -0.059895116835832596, 0.03412410989403725, 0.07199400663375854, 0.03442377224564552, -0.019459357485175133, -0.04700961336493492, -0.007884878665208817, 0.037963539361953735, 0.08847545832395554, 0.01975901983678341, -0.025059306994080544, -0.02391684241592884, -0.033449865877628326, 0.0009908773936331272, -0.03549132123589516, -0.020077411085367203, -0.024141589179635048, -0.009181857109069824, 0.039405666291713715, -0.006527031771838665, 0.011106254532933235, -0.00848888698965311, -0.0010154590709134936, -0.04352603107690811, -0.058546632528305054, -0.003659164533019066, 0.029217129573225975, -0.031895365566015244, -0.0215944554656744, -0.04052940383553505, 0.010741041041910648, -0.04491197317838669, -0.008353102020919323, -0.008526344783604145, 0.05105505883693695, 0.00675177900120616, 0.007290235720574856, -0.024516168981790543, 0.054651014506816864, -0.033112745732069016, -0.01723061501979828, 0.059370703995227814, 0.0516543872654438, 0.01844799518585205, -0.04345111548900604, 0.07577724754810333, -0.036596328020095825, -0.029572978615760803, 0.05112997442483902, 0.022118864580988884, -0.03453614562749863, 0.018064051866531372, 0.04011736437678337, -0.016856035217642784, -0.008545073680579662, 0.09529279172420502, -0.003003651974722743, 0.02459108456969261, -0.023017853498458862, 0.03204519674181938, 0.02453489787876606, 0.007636720780283213, -0.0378137081861496, -0.042739417403936386, -0.019590459764003754, -0.027718814089894295, -0.04832063615322113, -0.03103383630514145, -0.017408540472388268, 0.055737294256687164, -0.013438006862998009, -0.014421275816857815, -0.0347796194255352, -0.04341365769505501, -0.009589212015271187, -0.03013484738767147, -0.015601198188960552, -0.0015943000325933099, -0.05453864112496376, -0.056898485869169235, 0.031895365566015244, -0.033262576907873154, -0.038169559091329575, -0.0199650377035141, 0.03150205686688423, 0.012829316779971123, -0.06573854386806488, -0.05401423200964928, 0.051841676235198975, -0.04551129788160324, 0.07098264247179031, 0.03431139886379242, -0.011059432290494442, -0.0515420138835907, 0.04682232439517975, 0.021070044487714767, -0.015947682783007622, -0.024722186848521233, -0.044799599796533585, -0.03418029472231865, 0.009860781021416187, 0.04296416416764259, -0.02858034521341324, 0.028524158522486687, 0.0252278670668602, 0.010844049975275993, -0.020938942208886147, 0.008287550881505013, 0.011405917815864086, 0.02350480668246746, -0.03054688312113285, 0.014065425843000412, 0.05236608535051346, 0.0118273189291358, 0.01305406354367733, 0.009935696609318256, 0.045473840087652206, 0.04974403604865074, -0.0019548318814486265, -0.032363589853048325, -0.015591833740472794, -0.009476837702095509, 0.015741664916276932, 0.03758896142244339, 0.0005931803025305271, 0.007440066896378994, -0.03959295526146889, 0.01473030261695385, 0.043301284313201904, 0.03069671429693699, -0.0026618491392582655, 0.04303907975554466, 0.003090273356065154, -0.02342989109456539, 0.0037176923360675573, 0.0609813928604126, 0.003610001178458333, -0.00023089257592801005, -0.008690223097801208, 0.0005009988672100008, 0.005258146673440933, 0.031202396377921104, 0.02904856950044632, 0.07540266960859299, -0.005862154997885227, -0.013934323564171791, -0.005431389436125755, -0.03446123003959656, 0.006456798408180475, 0.005370520520955324, 0.025639904662966728, -0.02734423615038395, 0.0068688346073031425, -0.04813334718346596, -0.023692095652222633, 0.030640527606010437, 0.006667498964816332, -0.021276064217090607, -0.03491072356700897, -0.02951679192483425, -0.021294793114066124, 0.06349106878042221, 0.06188037991523743, -0.018719565123319626, 0.016603196039795876, 0.0005165087641216815, -0.03959295526146889, -0.023542264476418495, -0.0026946247089654207, 0.01487076934427023, -0.04921962693333626, -0.01708078384399414, 0.0007216490339487791, 0.04483705759048462, 0.00714040407910943, -0.01496441476047039, -0.026257958263158798, 0.01073167659342289, 0.03361842781305313, -0.01117180660367012, 0.005557809490710497, -0.005014670547097921, -0.018541639670729637, 0.013821949250996113, 0.03740167245268822, -0.028261953964829445, 0.006466162856668234, -0.025340240448713303, 0.01428080815821886, -0.033674612641334534, -0.020676737651228905, -0.019365713000297546, -0.002362186089158058, 0.02535896934568882, 0.004143775440752506, 0.06259208172559738, -0.00804875697940588, 0.03704582154750824, -0.007819327525794506, -0.027700085192918777, -0.017586464062333107, -0.04805843159556389, -0.0120988879352808, 0.03985515981912613, -0.0004840257461182773, -0.0430765375494957, 0.03129604086279869, 0.040903981775045395, 0.014056061394512653, 0.06367836147546768, -0.007758459076285362, 0.031146209686994553, -0.054651014506816864, 0.019534273073077202, -0.015338992699980736, 0.004981894977390766, -0.04116618633270264, 0.004623704124242067, -0.015161068178713322, -0.037495315074920654, 0.00810026191174984, 0.06270445138216019, -0.026351602748036385, 0.012211261317133904, 0.001107347896322608, 0.026501433923840523, 0.04034211486577988, 0.05592458322644234, 0.002483924152329564, 0.018148332834243774, -0.024179046973586082, 0.012801223434507847, -0.005941752810031176, 0.0252278670668602, 0.061693090945482254, -0.03888125717639923, 0.039330750703811646, -0.000647903885692358, -0.03846922144293785, -0.02215632237493992, 0.012323635630309582, 0.02809339389204979, 0.008816643618047237, -0.03225121647119522, -0.05584966763854027, -0.01712760515511036, -0.019056685268878937, 0.051092516630887985, 0.042477212846279144, -0.015020601451396942, 0.004265513736754656, 0.0173898097127676, -0.020695466548204422, -0.0074868896044790745, -0.0706455186009407, 0.07315519452095032, 0.02404794469475746, -0.01591959036886692, 0.060456983745098114, -0.03412410989403725, -0.06139342859387398, 0.01837307959794998, -0.03129604086279869, 0.02835559844970703, 0.08652765303850174, 0.00732769351452589, -0.007229366805404425, -0.011181171052157879, 0.1001623123884201, 0.07094518095254898, -0.0473092757165432, 0.0038534770719707012, -0.054800845682621, 0.02597702480852604, -0.04067923501133919, 0.004181233234703541, 0.004106317646801472, -0.026164313778281212, 0.07023348659276962, 0.0410163551568985, -0.007758459076285362, -0.030846545472741127, 0.016425270587205887, 0.023617180064320564, -0.00226737093180418, -0.0007912972359918058, -0.08502934128046036, -0.05112997442483902, 0.003455487312749028, -0.010263453237712383, 0.005459482781589031, -0.026332873851060867, 0.010038705542683601, -0.027999749407172203, -0.031277310103178024, 0.011630664579570293, 0.016621924936771393, -0.06330378353595734, 0.03350605443120003, 0.02078911103308201, -0.008516980335116386, -0.008456111885607243, -0.003909663762897253, 0.11844174563884735, -0.044387560337781906, 0.002371550537645817, 0.01445873361080885, -0.008727680891752243, -0.017811210826039314, -0.04532400891184807, -0.01811087504029274, 0.05884629487991333, 0.026876013725996017, -0.029572978615760803, -0.009673492051661015, -0.02425396256148815, -0.07577724754810333, 0.009289548732340336, 0.05079285427927971, -0.01700586825609207, -0.0696716159582138, 0.06663753092288971, -0.021894117817282677, 0.0126139335334301, 0.029160942882299423, 0.013241352513432503, 0.04641028493642807, -0.0047805593349039555, -0.03395554795861244, -0.09252090752124786, 0.015722936019301414, -0.049519289284944534, -0.06341615319252014, 0.056898485869169235, -0.01648145727813244, 0.03088400326669216, 0.07633911818265915, 0.038113370537757874, 0.004038425162434578, 0.026351602748036385, 0.03537894785404205, -0.00821731798350811, -0.011677486822009087, -0.05000624060630798, 0.022100135684013367, -0.04584841802716255, 0.015217254869639874, -0.09424397349357605, -0.02195030450820923, 0.010188537649810314, -0.010413284413516521, -0.036952175199985504, 0.013793855905532837, -0.0029381008353084326, -0.0064895739778876305, -0.006957797333598137, -0.024366335943341255, 0.04135347530245781, -0.009270819835364819, -0.02445998042821884, -0.05053064972162247, -0.05011861398816109, -0.028411785140633583, -0.065101757645607, -0.02972280979156494, 0.046447742730379105, -0.01919715292751789, 0.035229116678237915, 0.00019738535047508776, -0.0021011517383158207, -0.02037707529962063, -0.00824072863906622, -0.006152453366667032, 0.026669995859265327, -0.0268572848290205, -0.01458983588963747, 0.020751653239130974, 0.004574541002511978, 0.024085402488708496, -0.01056311558932066, 0.01721188612282276, 0.031052565202116966, 0.031951554119586945, -0.0032845858950167894, 0.034611061215400696, 0.004787582438439131, 0.0046541388146579266, 0.016912223771214485, -0.011050067842006683, -0.03785116598010063, 0.037907350808382034, -0.03674615919589996, 0.0107972277328372, 0.010984516702592373, -0.032307401299476624, 0.039742786437273026, -0.034479957073926926, 0.02269946224987507, 0.031895365566015244, -0.003944780677556992, -0.01828879863023758, -0.010553751140832901, -0.0013262423453852534, -0.017483456060290337, 0.017867397516965866, -0.07135722041130066, 0.026482705026865005, 0.055063050240278244, 0.08675239980220795, 0.0209951288998127, 0.06397802382707596, 0.03491072356700897, 0.015638655051589012, 0.04577350243926048, -0.01087214332073927, 0.010750405490398407, 0.031895365566015244, -0.043638404458761215, -0.053826943039894104, 0.024104131385684013, -0.050193529576063156, -0.07218129187822342, 0.026407789438962936, -0.06439005583524704, 0.026089398190379143, -0.005838743411004543, -0.05828442797064781, 0.03337495028972626, 0.01473030261695385, -0.010403919965028763, 0.0062741911970078945, -0.009523660875856876, 0.013597202487289906, -0.0767136961221695, 0.02610812708735466, 0.05352728068828583, 0.05659882351756096, 0.021688099950551987, -0.0600074902176857, 0.009308277629315853, 0.03603446111083031, 0.027100760489702225, -0.026482705026865005, 0.0557747520506382, 0.034685976803302765, 0.013456735759973526, -0.01728680171072483, 0.02618304267525673, 0.07427893579006195, 0.035584963858127594, 0.04019227996468544, 0.015722936019301414, 0.010010612197220325, 0.04232737794518471, -0.05352728068828583, -0.008413971401751041, 0.06682481616735458, 0.08899986743927002, -0.01056311558932066, 0.008947745896875858, 0.06266699731349945, -0.004214008804410696, 0.0875764712691307, -0.001673898077569902, -0.04236483573913574, 0.033112745732069016, 0.010366462171077728, 0.036952175199985504, -0.009898238815367222, 0.07154450565576553, -0.020526906475424767, 0.05083031207323074, 0.02254963107407093, 0.0474216490983963, 0.02151953987777233, -0.07206892222166061, 0.002753152512013912, 0.005309651605784893, -0.02166937105357647, -0.050193529576063156, 0.024722186848521233, 0.007744411937892437, 0.027250591665506363, -0.02829941175878048, -0.0018003182485699654, 0.03794480860233307, -0.005098951049149036, -0.051279809325933456, 0.010638032108545303, -0.0399300754070282, -0.007838056422770023, -0.01816706173121929, -0.007898925803601742, -0.07798726111650467, -0.06255462020635605, 0.019047321751713753, -0.007898925803601742, -0.019159695133566856, -0.0779123455286026, -0.031633161008358, 0.03401173651218414, -0.06528905034065247, -0.015928953886032104, -0.002049647271633148, 0.011714945547282696, -0.02125733532011509, 0.005225371103733778, -0.04251467064023018, -0.037345483899116516, -0.010834685526788235, 0.03914346173405647, -0.05326507240533829, -0.004935072734951973, 0.016856035217642784, -0.0018003182485699654, -0.02303658239543438, 0.008868147619068623, -0.010947058908641338, 0.031090022996068, 0.03155824542045593, -0.03715819492936134, -0.0419902577996254, 0.032906729727983475, 0.01493632048368454, -0.013334997929632664, 0.0005024620331823826, 0.01849481649696827, 0.019365713000297546, -0.0008041734108701348, -0.024778373539447784, -0.03026594966650009, -0.026332873851060867, -0.023879384621977806, 0.09192158281803131, -0.028655260801315308, -0.008643400855362415, 0.020601822063326836, 0.017239978536963463, 0.038918714970350266, -0.07510300725698471, -0.06588837504386902, 0.029086027294397354, -0.09694093465805054, 0.02931077405810356, -0.05944561958312988, 0.0215944554656744, -0.010469471104443073, 0.08113372325897217, -0.07308027893304825, 0.0026969658210873604, 0.01407479029148817, 0.03839430585503578, 0.04217754676938057, -0.0012876138789579272, 0.00025547429686412215, 0.052103880792856216, 0.004064177628606558, 0.0017769071273505688, -0.009252090938389301, -0.006929703522473574, -0.0504557341337204, -0.010132350958883762, 0.0005645016208291054, 0.09656635671854019, 0.012080159038305283, -0.02133225090801716, 0.01720252074301243, -0.04832063615322113, -0.005543762817978859, -0.018953675404191017, 0.016837306320667267, -0.00036872579948976636, 0.023560993373394012, 0.015020601451396942, -0.048845045268535614, -0.05348982289433479, 0.013531651347875595, 0.021163688972592354, -0.02228742465376854, -0.0006520008319057524, 0.013896865770220757, 0.007210637908428907, -0.009298913180828094, -0.006311648990958929, 0.02569609135389328, -0.025040578097105026, -0.007636720780283213, -0.03627793490886688, -0.01584467478096485, -0.006349106784909964, -0.004094612319022417, -0.035023096948862076, -0.02015232853591442, -0.004057154059410095, -0.0012302565155550838, 0.03403046354651451, 0.023130226880311966, -0.03346859663724899, 0.0018120239255949855, 0.07371706515550613, 0.026744911447167397, -0.03704582154750824, -0.012670120224356651, -0.02131352201104164, -0.02215632237493992, 0.016827942803502083, 0.047871142625808716, 0.02897365391254425, -0.015320263803005219, 0.007510300725698471, -0.02794356271624565, -0.04303907975554466, -0.05112997442483902, 0.01837307959794998, -0.03026594966650009, 0.03854413703083992, -0.029441876336932182, -0.02146335318684578, 0.009565800428390503, -0.014159070327877998, 0.06652515381574631, -0.044125355780124664, -0.02603321149945259, 0.02221250906586647, -0.005642089992761612, 0.03397427871823311, 0.08877512067556381, 0.03627793490886688, -0.03519165888428688, 0.006971844006329775, 0.07218129187822342, -0.035978272557258606, 0.0294606052339077, -0.07731302082538605, 0.004221032373607159, 0.006648769602179527, 0.023804469034075737, 0.009898238815367222, 0.019028590992093086, -0.019075414165854454, -0.006480209529399872, 0.04483705759048462, -0.06813584268093109, 0.040154822170734406, 0.02309276908636093, 0.04517417773604393, 0.02734423615038395, -0.026763640344142914, -0.010591208934783936, 0.03206392750144005, -0.04641028493642807, 0.052515916526317596, -0.023017853498458862, 0.050343360751867294, 0.04798351600766182, -0.03446123003959656, 0.002321216743439436, -0.035172928124666214, 0.0069671617820858955, -0.033524781465530396, 0.04154076427221298, 0.028130851686000824, -0.006002621725201607, 0.03758896142244339, -0.05472593009471893, 0.02131352201104164, 0.026407789438962936, 0.007154450751841068, 0.03103383630514145, 0.006063490640372038, -0.0696716159582138, 0.050343360751867294, -0.0006443922175094485, -0.008910288102924824, -0.06712447851896286, -0.03751404583454132, -0.03607191890478134, 0.011640029028058052, 0.005244100000709295, 0.011546384543180466, 0.025733549147844315, 0.02700711600482464, -0.021688099950551987 ]
4,717
optbinning.binning.multiclass_binning
_compute_prebins
null
def _compute_prebins(self, splits_prebinning, x, y): n_splits = len(splits_prebinning) if not n_splits: return splits_prebinning, np.array([]), np.array([]) indices = np.digitize(x, splits_prebinning, right=False) n_bins = n_splits + 1 n_nonevent = np.empty((n_bins, self._n_classes), dtype=np.int64) n_event = np.empty((n_bins, self._n_classes), dtype=np.int64) mask_remove = np.zeros(n_bins, dtype=bool) for idx, cl in enumerate(self._classes): y1 = (y == cl) y0 = ~y1 for i in range(n_bins): mask = (indices == i) n_nonevent[i, idx] = np.count_nonzero(y0 & mask) n_event[i, idx] = np.count_nonzero(y1 & mask) mask_remove |= (n_nonevent[:, idx] == 0) | (n_event[:, idx] == 0) if np.any(mask_remove): self._n_refinements += 1 mask_splits = np.concatenate( [mask_remove[:-2], [mask_remove[-2] | mask_remove[-1]]]) if self.user_splits_fixed is not None: user_splits_fixed = np.asarray(self.user_splits_fixed) user_splits = np.asarray(self.user_splits) fixed_remove = user_splits_fixed & mask_splits if any(fixed_remove): raise ValueError("Fixed user_splits {} are removed " "because produce pure prebins. Provide " "different splits to be fixed." .format(user_splits[fixed_remove])) # Update boolean array of fixed user splits. self.user_splits_fixed = user_splits_fixed[~mask_splits] self.user_splits = user_splits[~mask_splits] splits = splits_prebinning[~mask_splits] if self.verbose: logger.info("Pre-binning: number prebins removed: {}" .format(np.count_nonzero(mask_remove))) [splits_prebinning, n_nonevent, n_event] = self._compute_prebins( splits, x, y) return splits_prebinning, n_nonevent, n_event
(self, splits_prebinning, x, y)
[ -0.0034398697316646576, 0.006773256231099367, -0.06085282564163208, 0.01650952361524105, -0.007356598973274231, -0.05100081488490105, -0.012037229724228382, 0.023167036473751068, 0.00955570861697197, -0.02544485032558441, 0.011407589539885521, 0.019741056486964226, -0.010861285030841827, -0.055371254682540894, -0.033630166202783585, -0.007523268461227417, 0.0019004934001713991, 0.019778093323111534, 0.002738469745963812, -0.04400070384144783, -0.03051900677382946, -0.007569565437734127, -0.01948179304599762, 0.08185315877199173, 0.0025949489790946245, 0.012583534233272076, -0.021629976108670235, -0.03311163932085037, -0.016648413613438606, -0.0002709823311306536, 0.023111481219530106, -0.0033310716971755028, 0.03290793299674988, -0.06588993966579437, 0.03775986284017563, -0.03329682722687721, 0.06540845334529877, 0.08829770982265472, 0.0017268795054405928, 0.023704081773757935, -0.017648430541157722, -0.08318651467561722, -0.0036806142888963223, 0.020759591832756996, 0.04381551593542099, 0.025037437677383423, 0.033037565648555756, 0.00395839661359787, -0.02535225637257099, 0.05055636540055275, 0.002359991427510977, -0.07726049423217773, 0.07166781276464462, 0.06633439660072327, -0.012870576232671738, 0.04455626755952835, 0.04900078475475311, -0.0023623062297701836, -0.02863008715212345, -0.010176088660955429, 0.016518782824277878, 0.06311211735010147, 0.013972445391118526, -0.019981801509857178, 0.016537301242351532, -0.04496368020772934, -0.04566739499568939, 0.018157698214054108, -0.03559316322207451, 0.019500311464071274, -0.010083494707942009, 0.015463209711015224, 0.03685244172811508, 0.01161129679530859, -0.047260016202926636, 0.0012673813616856933, 0.01948179304599762, 0.029241207987070084, 0.05237120762467384, -0.019463274627923965, 0.06388991326093674, 0.053852714598178864, -0.0032639410346746445, -0.0016597487265244126, 0.06811220198869705, -0.013213174417614937, 0.011148326098918915, 0.04096361622214317, 0.01175018772482872, -0.01380577590316534, -0.02211146429181099, 0.04555628448724747, 0.05129711702466011, 0.07277894020080566, 0.03324127197265625, 0.03559316322207451, -0.03796356916427612, 0.01045387051999569, 0.012842797674238682, -0.04740816354751587, 0.04574147239327431, 0.02427816577255726, -0.03490796685218811, 0.057593513280153275, 0.03516722843050957, 0.04903782159090042, 0.01911141723394394, -0.034093137830495834, -0.05637127161026001, -0.02257443405687809, 0.01241686474531889, -0.039778415113687515, -0.08644582331180573, 0.03061160072684288, -0.028000447899103165, -0.052741583436727524, -0.023759638890624046, 0.025185588747262955, 0.0059167612344026566, 0.02161145582795143, -0.03753763809800148, -0.02396334521472454, -0.023426299914717674, 0.026852281764149666, -0.02124108001589775, -0.05577867105603218, 0.06677884608507156, 0.06803812831640244, -0.03292645141482353, -0.04629703611135483, 0.03546353057026863, -0.01227797381579876, -0.07740864157676697, -0.0076019736006855965, -0.024074459448456764, -0.03888951241970062, 0.012463162653148174, 0.06351953744888306, 0.032056067138910294, -0.08370504528284073, 0.06177876517176628, 0.0022963329683989286, -0.00021267701231408864, 0.038667283952236176, -0.014889126643538475, 0.03707466647028923, 0.07681604474782944, 0.04774150252342224, 0.03385239467024803, 0.0058102780021727085, -0.0051250820979475975, -0.01663915440440178, 0.010398314334452152, -0.04981561005115509, -0.004085713531821966, -0.027722666040062904, -0.020981816574931145, -0.012666868977248669, -0.013990964740514755, -0.0057639810256659985, 0.024963362142443657, -0.005838056094944477, 0.014046520926058292, -0.050074875354766846, -0.04770446568727493, 0.057963889092206955, -0.018342886120080948, -0.01632433570921421, -0.029518989846110344, -0.012166861444711685, 0.035704273730516434, 0.02811156027019024, -0.06566771864891052, 0.0443340428173542, -0.027352288365364075, 0.01799102872610092, 0.0017893804470077157, -0.05707498639822006, -0.062482479959726334, 0.056778684258461, 0.051593419164419174, -0.027630072087049484, 0.027389327064156532, -0.07177892327308655, -0.03388943150639534, 0.030667157843708992, 0.03775986284017563, -0.03837098553776741, 0.007319561671465635, 0.02455594763159752, -0.08511247485876083, -0.034185729920864105, -0.019000303000211716, 0.03337090462446213, 0.030130110681056976, 0.01876881904900074, -0.05429716408252716, 0.015370615758001804, -0.06355657428503036, -0.09822379052639008, -0.04926004633307457, 0.017092864960432053, 0.022333690896630287, -0.002386612119153142, -0.008814956061542034, -0.01188907865434885, -0.010611280798912048, 0.02124108001589775, 0.038667283952236176, -0.014453934505581856, 0.003437554929405451, -0.06851961463689804, 0.023981865495443344, 0.03481537103652954, 0.009953862987458706, 0.001406272524036467, 0.0646677017211914, 0.01762065291404724, -0.009342742152512074, -0.04470441862940788, -0.006384361535310745, 0.01871326193213463, 0.023667044937610626, -0.004391273949295282, -0.01975957490503788, -0.00025419966550543904, 0.018916968256235123, -0.004666741471737623, 0.06663069128990173, -0.010694615542888641, 0.004842670168727636, -0.014916905201971531, -0.06159357726573944, -0.0710752084851265, 0.025648558512330055, 0.02866712585091591, 0.006796404719352722, -0.05896390601992607, 0.04963042214512825, -0.005217676050961018, -0.0012118249433115125, -0.009458484128117561, -0.011527962051331997, -0.03524130582809448, -0.022037388756871223, 0.03196347504854202, 0.015629880130290985, 0.014509491622447968, 0.002659764839336276, 0.0058704642578959465, 0.013129839673638344, -0.02335222437977791, -0.0008970050839707255, -0.034833889454603195, 0.0678529366850853, -0.0334634967148304, -0.022907773032784462, 0.030759751796722412, -0.0004962463863193989, 0.04151918366551399, 0.0024491131771355867, 0.008115870878100395, 0.02155590057373047, -0.011500183492898941, 0.02931528352200985, 0.0059075020253658295, 0.036685772240161896, 0.04022286459803581, -0.010648318566381931, 0.031556058675050735, -0.0244633536785841, -0.01948179304599762, 0.0013240952976047993, -0.010703874751925468, -0.024018902331590652, 0.017703987658023834, -0.010046456940472126, -0.026444867253303528, 0.0604824498295784, 0.04174140840768814, 0.04955634847283363, -0.0059769474901258945, 0.023426299914717674, -0.003046344965696335, 0.06540845334529877, -0.020185507833957672, -0.016629895195364952, -0.03533389791846275, 0.006078800652176142, -0.025000398978590965, -0.030907901003956795, -0.0012720110826194286, 0.022611472755670547, -0.00022208110021892935, 0.0210003349930048, -0.0029861589428037405, -0.010203867219388485, -0.044667381793260574, -0.027018951252102852, -0.02109292894601822, -0.0014271060936152935, 0.0034699628595262766, -0.04444515332579613, -0.026148566976189613, 0.028333786875009537, -0.0007835773285478354, 0.05544533208012581, -0.02848193608224392, 0.013592809438705444, -0.034185729920864105, 0.025833746418356895, -0.009014032781124115, 0.03651910275220871, -0.06111208721995354, 0.015379875898361206, -0.04966745898127556, 0.07322338968515396, 0.03268570825457573, 0.0024884657468646765, 0.03896358609199524, 0.018472516909241676, 0.007101965602487326, -0.0056204600259661674, 0.06381583213806152, -0.02783377841114998, 0.04944523423910141, 0.03477833420038223, -0.02127811871469021, -0.09148294478654861, -0.015370615758001804, -0.014907645992934704, -0.00007139871013350785, -0.01871326193213463, 0.05055636540055275, -0.024630023166537285, -0.03444499522447586, 0.05426012724637985, -0.024778174236416817, 0.0013680774718523026, -0.055741630494594574, -0.004842670168727636, 0.0052500837482512, -0.013537253253161907, 0.041482143104076385, -0.014444675296545029, -0.007578824646770954, -0.007166781462728977, 0.04077842831611633, 0.009713117964565754, 0.08985328674316406, 0.02875971980392933, -0.027037469670176506, 0.011602037586271763, 0.03088938258588314, 0.08748287707567215, -0.08429764211177826, 0.008463098667562008, -0.05674164742231369, 0.05055636540055275, -0.020111432299017906, 0.004916745238006115, -0.013463178649544716, 0.01871326193213463, 0.02968565933406353, 0.012389087118208408, 0.00231485185213387, -0.032796818763017654, 0.02987084724009037, -0.05370456352829933, -0.0443340428173542, -0.010750171728432178, -0.04514886811375618, -0.00734271015971899, 0.02557448297739029, 0.04081546887755394, 0.031222721561789513, -0.015592841431498528, -0.0387783981859684, -0.0026250418741256, 0.033259790390729904, 0.0059075020253658295, 0.05322307348251343, -0.04255623742938042, 0.015629880130290985, -0.006120468024164438, 0.05566755682229996, -0.008564951829612255, -0.03803764656186104, 0.11222401261329651, -0.04640815034508705, 0.025185588747262955, 0.0009137877495959401, -0.005486198700964451, -0.031148646026849747, -0.0563342347741127, 0.00953718926757574, 0.048445217311382294, 0.001322937780059874, 0.04029694199562073, -0.006828812882304192, 0.006601957604289055, -0.03051900677382946, -0.010972397401928902, 0.049519311636686325, 0.01117610465735197, -0.013592809438705444, -0.014018742367625237, 0.0002796630433294922, 0.016389150172472, 0.015028017573058605, -0.049741536378860474, 0.02118552476167679, 0.04181548207998276, -0.06481584906578064, -0.014852088876068592, -0.004861189052462578, -0.02811156027019024, 0.004347291775047779, 0.03707466647028923, -0.05929724499583244, 0.013879851438105106, 0.02225961536169052, 0.012648350559175014, 0.002155127003788948, -0.0068658506497740746, 0.013194655068218708, -0.01911141723394394, -0.044111818075180054, -0.011111288331449032, 0.03422277048230171, -0.011463146656751633, -0.04888967052102089, -0.07159373909235, -0.037926532328128815, -0.06607513129711151, -0.015129871666431427, 0.016472484916448593, 0.07081595063209534, -0.019000303000211716, 0.018620667979121208, -0.04566739499568939, 0.041111767292022705, 0.07770494371652603, -0.0059075020253658295, 0.06337138265371323, 0.006259359419345856, -0.060408372431993484, 0.028037484735250473, -0.06596402078866959, -0.021167004480957985, -0.023148518055677414, -0.058371301740407944, 0.007176040671765804, 0.0026435607578605413, -0.020296620205044746, -0.04496368020772934, -0.02764859050512314, 0.02012995071709156, -0.008217724040150642, 0.00953718926757574, -0.0009155239094980061, 0.03685244172811508, -0.06137135252356529, 0.03311163932085037, 0.006097319535911083, -0.011250180192291737, 0.0019143824465572834, -0.017833618447184563, 0.00547230988740921, 0.044852569699287415, 0.04655630141496658, -0.03966730087995529, 0.025241144001483917, 0.022741103544831276, 0.018065104261040688, 0.041111767292022705, -0.017796581611037254, -0.0013021040940657258, 0.011287217028439045, -0.018666965886950493, -0.0028264340944588184, 0.04518590867519379, -0.046148885041475296, 0.006180654279887676, -0.0031944955699145794, -0.04244512319564819, -0.06666773557662964, -0.003564871847629547, 0.010574243031442165, -0.01616692543029785, -0.00997238140553236, -0.016287297010421753, 0.017981769517064095, 0.05800092592835426, -0.01641692966222763, 0.02622264064848423, 0.028611568734049797, 0.01827806979417801, 0.12666869163513184, -0.03766726702451706, -0.007583454716950655, 0.04881559684872627, -0.05803796648979187, -0.02946343459188938, -0.021204043179750443, -0.012944651767611504, -0.014129855670034885, 0.04096361622214317, -0.050667475908994675, 0.00293754693120718, -0.03329682722687721, -0.11244624108076096, 0.04040805250406265, 0.0012257139896973968, 0.001429421012289822, -0.004305624403059483, 0.01521320641040802, -0.0030324559193104506, -0.04211178421974182, 0.018731780350208282, 0.02068551629781723, 0.02312999963760376, 0.01735212840139866, -0.029056020081043243, 0.024778174236416817, 0.029944922775030136, -0.02340778149664402, -0.037278372794389725, 0.01698175258934498, -0.016611376777291298, -0.026074491441249847, -0.03892654925584793, 0.05129711702466011, 0.028704162687063217, 0.047260016202926636, 0.028889350593090057, 0.02137071266770363, -0.028833793476223946, 0.07211226224899292, 0.02050032839179039, 0.030500488355755806, 0.02640783041715622, 0.06337138265371323, 0.034870926290750504, 0.02312999963760376, 0.0586305670440197, 0.01966698095202446, 0.054926805198192596, -0.028426380828022957, 0.003303293604403734, -0.01555580459535122, -0.004819521680474281, 0.04551924765110016, 0.027481921017169952, 0.04811188206076622, -0.047667428851127625, 0.02105589210987091, 0.008601989597082138, -0.005537125747650862, 0.04066731780767441, -0.04881559684872627, -0.0011064992286264896, 0.056815724819898605, -0.03311163932085037, -0.0646677017211914, 0.023611487820744514, -0.0059769474901258945, 0.015592841431498528, 0.013361324556171894, 0.043000686913728714, 0.037704307585954666, 0.018537333235144615, -0.05596385896205902, -0.022037388756871223, -0.014111336320638657, 0.022222576662898064, -0.01871326193213463, -0.0710752084851265, -0.05959354713559151, -0.06570475548505783, 0.0017511853948235512, -0.05970465764403343, -0.011259439401328564, -0.06470473855733871, -0.054778654128313065, 0.011602037586271763, -0.08363096415996552, 0.020333658903837204, 0.005176008678972721, 0.04181548207998276, 0.0003778995596803725, 0.033537574112415314, 0.007814940065145493, 0.012611312791705132, 0.011102029122412205, -0.026444867253303528, -0.0026505053974688053, -0.01750027947127819, -0.04670444875955582, -0.029537510126829147, 0.07948274910449982, -0.011185363866388798, 0.023018887266516685, 0.04307476431131363, 0.03181532397866249, -0.05466753989458084, -0.027778221294283867, -0.0012326586293056607, 0.0016597487265244126, -0.02881527505815029, -0.00894921738654375, 0.025981897488236427, 0.020574402064085007, 0.02244480326771736, -0.006004725582897663, 0.029093056917190552, 0.0020208656787872314, -0.048408180475234985, 0.0682973861694336, -0.012102045118808746, 0.01775028370320797, -0.031093088909983635, 0.02640783041715622, 0.003882006509229541, -0.027944890782237053, -0.05040821433067322, 0.044815532863140106, -0.014602085575461388, 0.007365858647972345, -0.027370808646082878, 0.011879819445312023, -0.022704066708683968, 0.055556442588567734, -0.03563020005822182, 0.022833697497844696, 0.03642650693655014, 0.015055796131491661, -0.00013773368846159428, 0.005814907606691122, -0.08459394425153732, 0.03151902183890343, -0.040926579385995865, 0.028056003153324127, -0.026704130694270134, -0.0343894399702549, -0.0909644141793251, 0.011740928515791893, 0.010379795916378498, 0.06322323530912399, 0.03166717290878296, 0.003099586581811309, -0.020574402064085007, -0.05185268074274063, -0.010435352101922035, -0.012518718838691711, 0.03750060126185417, -0.014907645992934704, 0.02866712585091591, -0.021907757967710495, -0.05651942268013954, -0.011815004050731659, 0.020704034715890884, -0.0008871669415384531, -0.006754737813025713, -0.021296637132763863, 0.014666900970041752, 0.02613004669547081, -0.008301058784127235, 0.039593227207660675, 0.0017199348658323288, -0.016407670453190804, -0.02479669265449047, -0.05840834230184555, -0.052741583436727524, -0.005069525446742773, -0.026259679347276688, -0.05822315439581871, -0.00016218431119341403, -0.056852761656045914, -0.016722489148378372, -0.016713229939341545, -0.012398346327245235, -0.031741246581077576, -0.03092641942203045, 0.07126040011644363, -0.007148262578994036, -0.034056100994348526, -0.020759591832756996, 0.013565031811594963, 0.01507431548088789, 0.02575967088341713, 0.019611423835158348, 0.0794086754322052, -0.0012847427278757095, -0.0260930098593235, 0.02062995918095112, 0.02650042437016964, 0.031148646026849747, 0.0364820659160614, 0.0013055764138698578, 0.047260016202926636, -0.05314899608492851, -0.052111946046352386, -0.039222847670316696, -0.04740816354751587, 0.06240840628743172, -0.05207490548491478, -0.03196347504854202, -0.017537318170070648, 0.02424112893640995, -0.008176056668162346, 0.013009467162191868, -0.03524130582809448, -0.02835230529308319, -0.008129759691655636, 0.04244512319564819, -0.053297147154808044, -0.008481617085635662, -0.01045387051999569, 0.0067593674175441265, 0.021315155550837517, 0.07192707806825638, 0.00671770004555583, 0.042815499007701874, -0.046334072947502136, -0.0193891990929842, 0.09437187761068344, -0.08992736041545868, 0.004972301889210939, -0.03342645987868309, 0.048000767827034, 0.02229665219783783, -0.042815499007701874, 0.016537301242351532, 0.05018598586320877, 0.0003860015422105789, 0.06537141650915146, -0.06366768479347229, 0.03583390638232231, 0.00997238140553236, -0.007051038555800915, -0.07844569534063339, -0.034556109458208084, 0.012879835441708565, -0.05707498639822006, 0.06737145036458969, 0.026074491441249847, -0.04700075089931488, 0.03451906889677048, -0.03729689121246338, -0.022981848567724228, 0.01777806133031845, -0.0006388991023413837, -0.01338910311460495, -0.023796677589416504, 0.024815211072564125, 0.013416880741715431, -0.0067362189292907715, 0.000759271380957216, -0.02405594103038311, 0.01762991212308407, 0.02244480326771736, -0.02866712585091591, -0.008833474479615688, 0.0443340428173542, 0.0038102460093796253, 0.00018200522754341364, 0.01325021218508482 ]
4,718
optbinning.binning.multiclass_binning
_fit
null
def _fit(self, x, y, check_input): time_init = time.perf_counter() if self.verbose: logger.info("Optimal binning started.") logger.info("Options: check parameters.") _check_parameters(**self.get_params()) # Pre-processing if self.verbose: logger.info("Pre-processing started.") self._n_samples = len(x) if self.verbose: logger.info("Pre-processing: number of samples: {}" .format(self._n_samples)) time_preprocessing = time.perf_counter() [x_clean, y_clean, x_missing, y_missing, x_special, y_special, _, _, _, _, _, _, _] = split_data( self.dtype, x, y, special_codes=self.special_codes, check_input=check_input, outlier_detector=self.outlier_detector, outlier_params=self.outlier_params) # Check that x_clean is numerical if x_clean.dtype == np.dtype("object"): raise ValueError("x array after removing special codes and " "missing values must be numerical.") self._time_preprocessing = time.perf_counter() - time_preprocessing if self.verbose: n_clean = len(x_clean) n_missing = len(x_missing) n_special = len(x_special) logger.info("Pre-processing: number of clean samples: {}" .format(n_clean)) logger.info("Pre-processing: number of missing samples: {}" .format(n_missing)) logger.info("Pre-processing: number of special samples: {}" .format(n_special)) if self.outlier_detector is not None: n_outlier = self._n_samples-(n_clean + n_missing + n_special) logger.info("Pre-processing: number of outlier samples: {}" .format(n_outlier)) logger.info("Pre-processing terminated. Time: {:.4f}s" .format(self._time_preprocessing)) # Pre-binning if self.verbose: logger.info("Pre-binning started.") time_prebinning = time.perf_counter() if self.user_splits is not None: n_splits = len(self.user_splits) if self.verbose: logger.info("Pre-binning: user splits supplied: {}" .format(n_splits)) user_splits = check_array(self.user_splits, ensure_2d=False, dtype=None, force_all_finite=True) if len(set(user_splits)) != len(user_splits): raise ValueError("User splits are not unique.") sorted_idx = np.argsort(user_splits) user_splits = user_splits[sorted_idx] if self.user_splits_fixed is not None: self.user_splits_fixed = np.asarray( self.user_splits_fixed)[sorted_idx] splits, n_nonevent, n_event = self._prebinning_refinement( user_splits, x_clean, y_clean, y_missing, x_special, y_special, None) else: splits, n_nonevent, n_event = self._fit_prebinning( x_clean, y_clean, y_missing, x_special, y_special, None) self._n_prebins = len(n_nonevent) self._time_prebinning = time.perf_counter() - time_prebinning if self.verbose: logger.info("Pre-binning: number of prebins: {}" .format(self._n_prebins)) logger.info("Pre-binning: number of refinements: {}" .format(self._n_refinements)) logger.info("Pre-binning terminated. Time: {:.4f}s" .format(self._time_prebinning)) # Optimization self._fit_optimizer(splits, n_nonevent, n_event) # Post-processing if self.verbose: logger.info("Post-processing started.") logger.info("Post-processing: compute binning information.") time_postprocessing = time.perf_counter() if not len(splits): n_event = np.empty(self._n_classes, dtype=np.int64) for i, cl in enumerate(self._classes): n_event[i] = target_info(y_clean, cl)[0] self._n_event = multiclass_bin_info( self._solution, self._n_classes, n_event, self._n_event_missing, self._n_event_special) self._binning_table = MulticlassBinningTable( self.name, self.special_codes, self._splits_optimal, self._n_event, self._classes) self._time_postprocessing = time.perf_counter() - time_postprocessing if self.verbose: logger.info("Post-processing terminated. Time: {:.4f}s" .format(self._time_postprocessing)) self._time_total = time.perf_counter() - time_init if self.verbose: logger.info("Optimal binning terminated. Status: {}. Time: {:.4f}s" .format(self._status, self._time_total)) # Completed successfully self._is_fitted = True return self
(self, x, y, check_input)
[ -0.01033327542245388, -0.010031076148152351, -0.055955663323402405, 0.028036320582032204, -0.03719979152083397, -0.0630524754524231, -0.07615429162979126, -0.018658386543393135, -0.025053318589925766, -0.04113813489675522, -0.026671549305319786, 0.010001830756664276, 0.01468104962259531, -0.027958333492279053, -0.049599722027778625, 0.02464388683438301, -0.004467192105948925, 0.007769453339278698, -0.019594229757785797, -0.003029306884855032, -0.05170537158846855, -0.00336562586016953, -0.031116807833313942, 0.06757572293281555, 0.031662717461586, 0.013257787562906742, 0.005259247496724129, -0.024409925565123558, 0.002590630203485489, 0.010801197029650211, -0.013969418592751026, -0.019779449328780174, 0.04024128615856171, -0.025755202397704124, 0.01472979225218296, -0.045739367604255676, 0.046519238501787186, 0.03862305358052254, -0.012594898231327534, 0.051120467483997345, -0.007277160417288542, -0.1107415184378624, 0.010118811391294003, 0.03729727491736412, -0.002841650741174817, 0.012838607653975487, -0.018892347812652588, 0.063559390604496, -0.030648885294795036, -0.00024492788361385465, -0.04827394336462021, -0.10419061034917831, 0.04421862214803696, 0.04593433439731598, -0.009899472817778587, 0.04924878105521202, 0.05494182929396629, 0.0027514782268553972, 0.020257119089365005, -0.029050152748823166, 0.022733205929398537, 0.057632382959127426, 0.019262785091996193, -0.024078480899333954, 0.01153232529759407, -0.010070069693028927, -0.07724610716104507, 0.02208981290459633, -0.005814904812723398, 0.058451246470212936, 0.04425761476159096, 0.01503199152648449, 0.04581735283136368, 0.02930361032485962, -0.05018462613224983, -0.007160180248320103, -0.010089565999805927, -0.023454586043953896, 0.005493208300322294, -0.04605131596326828, 0.07993666082620621, 0.08562970906496048, -0.024312442168593407, -0.06714679300785065, -0.0034899176098406315, -0.034450750797986984, 0.018677882850170135, 0.05462988466024399, 0.019496746361255646, -0.022596729919314384, -0.019204294309020042, 0.03881802037358284, 0.055175792425870895, 0.09077685326337814, 0.035250116139650345, -0.005936759058386087, -0.05209530517458916, 0.0075354925356805325, -0.005824652966111898, -0.036146968603134155, -0.00395783968269825, 0.015334190800786018, 0.016620976850390434, 0.08344607800245285, 0.031194794923067093, 0.015714377164840698, 0.02296716719865799, -0.02374703623354435, -0.04917079582810402, -0.040826186537742615, -0.02214830368757248, -0.0001675501698628068, -0.07365870475769043, 0.014954004436731339, -0.04074820131063461, -0.010304030030965805, -0.040007323026657104, 0.04020228981971741, -0.054317936301231384, 0.052719201892614365, -0.0007695122039876878, 0.0023542321287095547, -0.031350769102573395, -0.008271494880318642, -0.008066779002547264, -0.022499244660139084, 0.043945666402578354, 0.08508379757404327, 0.015441423282027245, -0.05291416868567467, 0.009153722785413265, 0.010372268967330456, -0.030668381601572037, 0.03082435578107834, -0.040007323026657104, -0.021894846111536026, -0.008417719975113869, 0.0474160872399807, 0.005059405695647001, -0.06188267469406128, 0.10177301615476608, -0.016494248062372208, 0.011932008899748325, -0.020023157820105553, 0.05303115025162697, 0.027392929419875145, 0.047182127833366394, -0.01718638278543949, 0.02072504162788391, -0.006633767858147621, 0.0003116432926617563, -0.021056486293673515, 0.0025467625819146633, -0.03807714581489563, -0.023142637684941292, -0.021738871932029724, -0.025716207921504974, -0.0237860307097435, -0.01756656914949417, -0.01063547469675541, -0.013267535716295242, -0.050379592925310135, 0.028855184093117714, -0.019496746361255646, -0.05771036818623543, 0.06956438720226288, -0.0553317666053772, 0.018833857029676437, 0.012945839203894138, -0.006633767858147621, 0.04047524556517601, -0.011737041175365448, -0.07576435804367065, 0.05170537158846855, -0.027334438636898994, 0.06874553114175797, 0.01891184411942959, -0.05724244564771652, -0.03640042617917061, 0.051939330995082855, 0.01465180516242981, -0.024097979068756104, 0.007009080145508051, -0.0796247124671936, -0.0637543573975563, 0.013940173201262951, 0.03382685407996178, -0.03862305358052254, -0.009933591820299625, 0.03160422667860985, -0.04507647827267647, -0.014973500743508339, -0.003073174739256501, 0.007072444539517164, 0.010304030030965805, 0.014427592046558857, -0.01108389999717474, 0.046441249549388885, 0.01796625182032585, -0.0554487481713295, -0.016260286793112755, 0.019077565521001816, 0.03595200181007385, -0.03599099442362785, -0.04542741924524307, -0.026496078819036484, -0.028816191479563713, 0.04920978844165802, 0.01954548805952072, -0.0016949983546510339, 0.006702006328850985, -0.046324267983436584, -0.033846352249383926, 0.06480718404054642, 0.036790359765291214, 0.021738871932029724, 0.08032659441232681, -0.030434420332312584, -0.021290447562932968, -0.013443006202578545, 0.017839523032307625, -0.044686540961265564, -0.006692258175462484, 0.01468104962259531, -0.011678551323711872, 0.014525076374411583, 0.05466887727379799, 0.031370263546705246, 0.09303847700357437, -0.037843186408281326, 0.004542741924524307, -0.027997327968478203, -0.04020228981971741, -0.010830442421138287, -0.03868154436349869, 0.02146591804921627, 0.003775057615712285, -0.013735457323491573, -0.01465180516242981, -0.020062152296304703, 0.0010997382923960686, -0.03246208280324936, -0.024156467989087105, -0.08336808532476425, -0.017517827451229095, 0.0007360021700151265, 0.03466521576046944, 0.051237449049949646, 0.0023213312961161137, 0.011659054085612297, -0.002262841211631894, 0.006526535842567682, -0.01071346178650856, -0.025248287245631218, 0.007403889205306768, -0.01577286794781685, -0.003165784291923046, -0.01034302357584238, 0.014525076374411583, 0.024819357320666313, 0.012838607653975487, 0.009748373180627823, -0.0017900450620800257, 0.03392433747649193, -0.04893683269619942, 0.02522878907620907, 0.015587648376822472, -0.0011344669619575143, 0.012604646384716034, 0.02220679447054863, -0.04449157416820526, 0.019155552610754967, -0.038408588618040085, 0.0048912460915744305, -0.030765864998102188, 0.04589534178376198, 0.012107479386031628, -0.020081648603081703, 0.0555657260119915, 0.01891184411942959, 0.06827760487794876, 0.02130994386970997, 0.033007990568876266, -0.03482118993997574, -0.00672637764364481, -0.032150134444236755, -0.010001830756664276, -0.007403889205306768, 0.004004144109785557, -0.023571565747261047, -0.07209897041320801, -0.008481084369122982, 0.050379592925310135, 0.04109914228320122, 0.03010297566652298, 0.002666180022060871, -0.01302382629364729, -0.04823495075106621, 0.01076220441609621, -0.05708647146821022, -0.014963752590119839, -0.010372268967330456, -0.009918970055878162, -0.040943168103694916, 0.03392433747649193, -0.02844575233757496, 0.06449523568153381, -0.061336763203144073, 0.0076475986279547215, -0.013413761742413044, 0.03021995723247528, -0.010011578910052776, 0.08438191562891006, -0.032091643661260605, 0.023493578657507896, -0.06870653480291367, 0.04983368515968323, 0.04043625295162201, -0.009182967245578766, 0.04125511646270752, -0.007628101855516434, 0.024039488285779953, 0.042463913559913635, -0.0036410174798220396, -0.025111809372901917, 0.023513076826930046, 0.052875176072120667, 0.01154207345098257, -0.10762204229831696, -0.05369403958320618, 0.02526778355240822, -0.03337842971086502, 0.02226528339087963, 0.024175966158509254, -0.016416260972619057, 0.016045821830630302, 0.01271187886595726, -0.014232625253498554, 0.04261988773941994, -0.03987084701657295, -0.001770548289641738, 0.0315067432820797, -0.01739109680056572, 0.054278939962387085, -0.01655273698270321, -0.04215196520090103, -0.014320360496640205, 0.011600564233958721, -0.013784199953079224, 0.054395921528339386, 0.012360936962068081, 0.009509538300335407, -0.0031389761716127396, 0.0355035737156868, 0.06936942040920258, -0.07373669743537903, -0.006999331992119551, -0.044686540961265564, 0.03815513104200363, -0.0010820694733411074, -0.02696399949491024, 0.012614394538104534, -0.016806194558739662, 0.0398903414607048, 0.039968330413103104, -0.01668921485543251, -0.015607145614922047, 0.033846352249383926, -0.044764529913663864, -0.022557735443115234, -0.011122893542051315, -0.05802231654524803, -0.04940475523471832, 0.005371353588998318, 0.040865179151296616, 0.03807714581489563, -0.006643516477197409, -0.010226043872535229, -0.01621154509484768, 0.019360268488526344, 0.023201128467917442, 0.05264121666550636, -0.04304881766438484, -0.01891184411942959, -0.008154514245688915, -0.013335774652659893, 0.012204962782561779, -0.011415344662964344, 0.06956438720226288, -0.05361605063080788, 0.029576564207673073, -0.0014159511774778366, -0.01699141412973404, -0.0157338734716177, -0.04063121974468231, 0.02142692357301712, 0.09093282371759415, 0.032988496124744415, -0.021972833201289177, -0.00434290012344718, -0.03649790957570076, -0.031994160264730453, -0.012799614109098911, 0.04199599102139473, 0.001813197392039001, -0.03856456279754639, 0.01703040860593319, 0.0017973562935367227, -0.0024322192184627056, 0.03788217902183533, -0.06246757507324219, 0.021894846111536026, 0.008856397122144699, 0.00443794671446085, -0.05065254867076874, 0.026671549305319786, -0.048000987619161606, 0.0238250233232975, 0.04180102422833443, -0.020432589575648308, 0.024117475375533104, 0.02610614337027073, 0.046402256935834885, 0.019340772181749344, -0.016162803396582603, 0.024292945861816406, -0.047533068805933, -0.05888017266988754, -0.012165970169007778, -0.004801073577255011, -0.02464388683438301, -0.03862305358052254, -0.11721444129943848, 0.0015512098325416446, -0.04507647827267647, -0.019116559997200966, -0.019594229757785797, 0.03092183917760849, 0.031779695302248, -0.012497414834797382, -0.02936209924519062, 0.008627310395240784, 0.08500581234693527, -0.00948516745120287, 0.0069408416748046875, 0.002183635486289859, -0.05240725353360176, 0.011844273656606674, -0.05104248225688934, -0.014768785797059536, 0.020003661513328552, -0.016318777576088905, 0.019915927201509476, -0.010118811391294003, -0.034470248967409134, -0.019116559997200966, -0.04148907586932182, -0.0034972289577126503, 0.0319356694817543, 0.001995979342609644, -0.062194619327783585, 0.035347599536180496, -0.03096083365380764, 0.03813563659787178, -0.007233292795717716, -0.025540737435221672, -0.002605252666398883, 0.008524952456355095, 0.01309206523001194, 0.05385001376271248, -0.0076475986279547215, -0.026359600946307182, 0.024390429258346558, 0.002756352536380291, 0.03308597952127457, 0.027451418340206146, -0.011317861266434193, 0.02386401779949665, 0.03255956619977951, -0.030512407422065735, 0.03257906436920166, 0.010304030030965805, -0.0063120718114078045, 0.02210931107401848, 0.0034655467607080936, -0.01838543266057968, -0.02926461584866047, 0.019223792478442192, -0.0050399089232087135, -0.0060683623887598515, -0.02312314137816429, -0.012438924051821232, 0.044101640582084656, 0.02550174482166767, -0.04433559998869896, 0.024838855490088463, 0.028699209913611412, 0.0075403666123747826, 0.09093282371759415, -0.051198456436395645, 0.0197307076305151, 0.03261805698275566, -0.04121612012386322, -0.04620729014277458, 0.01346250344067812, -0.003938342910259962, -0.05708647146821022, -0.001552428468130529, -0.08968503028154373, 0.021036989986896515, -0.06812163442373276, -0.07432159781455994, 0.048897840082645416, 0.000561750028282404, 0.02390301041305065, -0.004294158425182104, -0.01071346178650856, 0.0019399262964725494, -0.02136843465268612, 0.017517827451229095, 0.021134473383426666, 0.05400598794221878, 0.012156221084296703, -0.04936576262116432, 0.05240725353360176, 0.021816859021782875, -0.0008018037187866867, -0.02152440883219242, 0.009061112999916077, 0.009782492183148861, -0.015382932499051094, -0.04515446349978447, 0.040085311979055405, 0.051120467483997345, 0.03195516765117645, 0.0010016453452408314, 0.05334309861063957, -0.037628721445798874, 0.042502906173467636, -0.002605252666398883, -0.011473835445940495, 0.03345641493797302, 0.05322611704468727, -0.007788950111716986, 0.013062819838523865, 0.05642358213663101, 0.015714377164840698, 0.08812529593706131, 0.003602023934945464, -0.01550966128706932, 0.014135140925645828, -0.007433134596794844, 0.047650046646595, 0.07794798910617828, 0.05361605063080788, -0.08243224024772644, 0.02858223021030426, 0.05638458952307701, 0.011288615874946117, 0.04577836021780968, -0.0712411105632782, 0.0315067432820797, -0.002756352536380291, -0.05474686250090599, -0.05080851912498474, 0.024039488285779953, -0.03183818608522415, 0.058295272290706635, 0.008968503214418888, -0.00007779659063089639, 0.021290447562932968, 0.05334309861063957, -0.06948640197515488, -0.017625058069825172, -0.010791448876261711, 0.02612563967704773, -0.024994829669594765, -0.028250785544514656, -0.08274418860673904, -0.03404131904244423, 0.037784695625305176, -0.026457084342837334, -0.011376351118087769, -0.03987084701657295, -0.028855184093117714, -0.010089565999805927, -0.06164871156215668, -0.029771531000733376, 0.0119710024446249, 0.019379766657948494, -0.012955588288605213, 0.04254189878702164, -0.014193631708621979, -0.03437276557087898, 0.02368854731321335, 0.02608664706349373, -0.040787193924188614, -0.049677710980176926, 0.001552428468130529, -0.04106014594435692, 0.04499848932027817, 0.010187050327658653, -0.020900512114167213, 0.0398903414607048, 0.009611896239221096, -0.009587525390088558, -0.0397733636200428, 0.009338941425085068, -0.01737160049378872, -0.019857436418533325, -0.01744958758354187, 0.011044906452298164, 0.03909097611904144, -0.012107479386031628, -0.007715837564319372, -0.003190155141055584, -0.0032072148751467466, -0.00286358455196023, 0.09413029253482819, -0.00969475694000721, 0.006531409919261932, -0.0025540736969560385, 0.018804611638188362, 0.04191800579428673, -0.0396173894405365, -0.07588133960962296, 0.03866204619407654, -0.04515446349978447, 0.02386401779949665, -0.039207957684993744, -0.009075735695660114, -0.021680381149053574, 0.027431922033429146, -0.02298666350543499, 0.06901848316192627, 0.036868348717689514, 0.03813563659787178, 0.013706212863326073, -0.01996466889977455, -0.029537571594119072, 0.0396173894405365, -0.011005912907421589, 0.047221120446920395, -0.0026905511040240526, -0.0027076106052845716, -0.06118078902363777, 0.005244624800980091, 0.05006764456629753, 0.08633159101009369, 0.028972165659070015, -0.02130994386970997, 0.018053987994790077, -0.06453423202037811, -0.006633767858147621, 0.0069700866006314754, 0.008929509669542313, -0.004476940259337425, 0.03341742232441902, -0.0015731437597423792, -0.04106014594435692, -0.04180102422833443, 0.05786634236574173, 0.04051423817873001, -0.04047524556517601, -0.059192121028900146, 0.0014342294307425618, 0.0031487245578318834, -0.032208625227212906, 0.014261869713664055, 0.03232560679316521, -0.024370932951569557, -0.023571565747261047, -0.06192166730761528, -0.014798030257225037, 0.0022555298637598753, -0.011473835445940495, -0.030551401898264885, -0.051198456436395645, -0.04983368515968323, -0.014417843893170357, 0.051939330995082855, -0.013179800473153591, -0.04191800579428673, -0.0037506865337491035, 0.09530009329319, 0.011113145388662815, -0.03897399455308914, -0.049482740461826324, -0.010031076148152351, 0.02947908081114292, 0.0020300988107919693, 0.018541404977440834, 0.04917079582810402, -0.023454586043953896, 0.008208130486309528, 0.005049657076597214, -0.00387741532176733, -0.004420887213200331, 0.026437588036060333, -0.03747274726629257, 0.027451418340206146, -0.047143131494522095, -0.04425761476159096, 0.015373184345662594, -0.013579484075307846, 0.0873454213142395, -0.06484618037939072, -0.0036702624056488276, 0.033573396503925323, -0.02049108035862446, 0.04378969222307205, -0.01714738830924034, -0.014320360496640205, -0.028094811365008354, 0.008895390667021275, 0.0398903414607048, -0.0359325036406517, 0.009611896239221096, -0.008724793791770935, 0.0034826062619686127, 0.029752034693956375, 0.020218126475811005, 0.010450256057083607, 0.012789865955710411, -0.03415830060839653, -0.006126852706074715, 0.054239947348833084, -0.09997931867837906, 0.07217695564031601, 0.024097979068756104, 0.04043625295162201, 0.01466155331581831, -0.05400598794221878, 0.019701462239027023, 0.03587401285767555, -0.03125328570604324, 0.044062647968530655, -0.018736373633146286, 0.04905381426215172, 0.006984709296375513, -0.0029805651865899563, -0.05813929811120033, -0.015070985071361065, -0.007057822309434414, -0.03739475831389427, 0.06496316194534302, 0.03025894984602928, -0.04893683269619942, 0.0318966768682003, -0.029771531000733376, 0.020764034241437912, 0.010206546634435654, -0.026788529008626938, 0.04230793938040733, 0.036049485206604004, 0.04043625295162201, 0.024292945861816406, 0.010274785570800304, 0.00939255766570568, -0.03630294278264046, 0.037784695625305176, -0.0006726377760060132, 0.03803815320134163, 0.005332360044121742, 0.006268203724175692, 0.018122225999832153, 0.021660884842276573, 0.028699209913611412 ]
4,719
optbinning.binning.multiclass_binning
_fit_optimizer
null
def _fit_optimizer(self, splits, n_nonevent, n_event): if self.verbose: logger.info("Optimizer started.") time_init = time.perf_counter() if not len(n_nonevent): self._status = "OPTIMAL" self._splits_optimal = splits self._solution = np.zeros(len(splits), dtype=bool) if self.verbose: logger.warning("Optimizer: no bins after pre-binning.") logger.warning("Optimizer: solver not run.") logger.info("Optimizer terminated. Time: 0s") return if self.min_bin_size is not None: min_bin_size = int(np.ceil(self.min_bin_size * self._n_samples)) else: min_bin_size = self.min_bin_size if self.max_bin_size is not None: max_bin_size = int(np.ceil(self.max_bin_size * self._n_samples)) else: max_bin_size = self.max_bin_size # Monotonic trend trend_changes = [None] * self._n_classes auto_monotonic_modes = ("auto", "auto_heuristic", "auto_asc_desc") if self.monotonic_trend in auto_monotonic_modes: monotonic = [auto_monotonic(n_nonevent[:, i], n_event[:, i], self.monotonic_trend) for i in range(len(self._classes))] if self.verbose: logger.info("Optimizer: classifier predicts {} " "monotonic trends.".format(monotonic)) elif isinstance(self.monotonic_trend, list): if len(self.monotonic_trend) != self._n_classes: raise ValueError("List of monotonic trends must be of size " "n_classes.") monotonic = [] for i, m_trend in enumerate(self.monotonic_trend): if m_trend in auto_monotonic_modes: trend = auto_monotonic(n_nonevent[:, i], n_event[:, i], m_trend) if m_trend == "auto_heuristic": if trend in ("peak", "valley"): if trend == "peak": trend = "peak_heuristic" else: trend = "valley_heuristic" event_rate = n_event[:, i] / (n_nonevent[:, i] + n_event[:, i]) trend_change = peak_valley_trend_change_heuristic( event_rate, trend) trend_changes[i] = trend_change monotonic.append(trend) if self.verbose: logger.info("Optimizer: classifier predicts {} " "monotonic trend.".format(trend)) else: monotonic.append(m_trend) elif self.monotonic_trend is None: monotonic = [None] * self._n_classes if self.verbose: logger.info("Optimizer: monotonic trend not set.") if self.solver == "cp": optimizer = MulticlassBinningCP(monotonic, self.min_n_bins, self.max_n_bins, min_bin_size, max_bin_size, self.min_event_rate_diff, self.max_pvalue, self.max_pvalue_policy, self.user_splits_fixed, self.time_limit) else: optimizer = MulticlassBinningMIP(monotonic, self.min_n_bins, self.max_n_bins, min_bin_size, max_bin_size, self.min_event_rate_diff, self.max_pvalue, self.max_pvalue_policy, self.mip_solver, self.user_splits_fixed, self.time_limit) if self.verbose: logger.info("Optimizer: build model...") optimizer.build_model(n_nonevent, n_event, trend_changes) if self.verbose: logger.info("Optimizer: solve...") status, solution = optimizer.solve() self._solution = solution self._optimizer, self._time_optimizer = solver_statistics( self.solver, optimizer.solver_) self._status = status self._splits_optimal = splits[solution[:-1]] self._time_solver = time.perf_counter() - time_init if self.verbose: logger.info("Optimizer terminated. Time: {:.4f}s" .format(self._time_solver))
(self, splits, n_nonevent, n_event)
[ -0.025850839912891388, -0.003984940238296986, -0.04536774381995201, -0.011561335064470768, -0.04387965425848961, -0.06620103865861893, -0.06017236039042473, -0.03464584797620773, -0.07051269710063934, -0.005890366621315479, -0.05093855410814285, 0.03592408075928688, 0.008451602421700954, -0.024820620194077492, -0.028979649767279625, 0.07944124937057495, -0.021253013983368874, -0.00962967611849308, -0.016760120168328285, -0.00659148721024394, -0.02043265663087368, -0.04658874496817589, -0.04929783567786217, 0.03355839475989342, 0.007984189316630363, -0.01345006749033928, -0.00455489894375205, -0.032738037407398224, -0.020661592483520508, -0.010187710635364056, -0.018610695376992226, -0.035580676048994064, 0.009710757993161678, -0.01463291049003601, 0.014203652739524841, -0.045520368963479996, 0.03697337582707405, 0.04399412125349045, -0.02388579398393631, 0.021004999056458473, -0.027052760124206543, -0.0979088619351387, 0.00297141564078629, 0.033119600266218185, -0.01379347313195467, -0.00678703747689724, -0.008704387582838535, 0.05238848924636841, -0.001298503833822906, -0.036210253834724426, -0.018687007948756218, -0.08203586935997009, 0.018105126917362213, 0.016006534919142723, -0.029857242479920387, 0.06910091638565063, 0.0599815770983696, 0.029761850833892822, 0.012190911918878555, -0.056623831391334534, -0.02926582098007202, 0.0012758485972881317, -0.0007464310619980097, 0.011151155456900597, 0.006567639298737049, -0.016769658774137497, -0.055898863822221756, 0.04063637554645538, 0.01573944091796875, 0.03506556525826454, 0.027987588196992874, -0.00873300526291132, 0.026385026052594185, 0.0003115097642876208, -0.048916272819042206, -0.02344699762761593, -0.04719924554228783, -0.030906537547707558, -0.008718696422874928, -0.003565221792086959, 0.00934827420860529, 0.022874653339385986, -0.011465944349765778, -0.08943817764520645, -0.009319656528532505, -0.03214661404490471, 0.00863761454820633, 0.012696482241153717, 0.0036200713366270065, -0.05704354867339134, -0.007450001779943705, 0.02981908619403839, 0.015157558023929596, 0.07081794738769531, -0.004824377130717039, 0.025259418413043022, -0.0382516086101532, -0.022264154627919197, -0.014089183881878853, -0.039720624685287476, 0.004480971023440361, 0.02043265663087368, -0.00452151196077466, 0.07665584236383438, 0.002568390453234315, -0.02419104427099228, -0.006300545763224363, 0.022607561200857162, -0.03136441111564636, -0.04403227940201759, -0.03325314447283745, 0.023866714909672737, -0.05219770967960358, 0.013192513026297092, -0.04220077767968178, 0.03491294011473656, -0.05460155010223389, 0.037126000970602036, -0.00830374751240015, 0.048305775970220566, 0.002065205480903387, 0.03269987925887108, -0.054410770535469055, 0.0021307864226400852, -0.013373754918575287, -0.017790338024497032, 0.04265865311026573, 0.05257927253842354, 0.022130606696009636, -0.0659339502453804, 0.02148195169866085, -0.009081180207431316, -0.0021617882885038853, 0.07219156622886658, -0.01937382109463215, 0.011408709920942783, -0.07852549850940704, 0.05338055267930031, -0.01518617570400238, -0.0664299800992012, 0.06539975851774216, -0.016817353665828705, 0.01082682702690363, -0.01444212906062603, 0.030276959761977196, 0.006119303870946169, 0.021939827129244804, -0.007454771548509598, -0.011380092240869999, 0.01076959352940321, 0.005651890300214291, -0.028216524049639702, 0.0007583548431284726, -0.03821345418691635, -0.009391199797391891, -0.021195780485868454, -0.02901780605316162, -0.012400771491229534, -0.036687206476926804, -0.02327529340982437, -0.017704486846923828, -0.029704617336392403, 0.043612558394670486, -0.02277926355600357, -0.035027410835027695, 0.026327792555093765, -0.03832792118191719, 0.03567606583237648, -0.0002457797236274928, 0.026957368478178978, 0.021577341482043266, -0.047122932970523834, -0.035885926336050034, 0.044909872114658356, -0.038919344544410706, 0.0928722396492958, 0.019106727093458176, -0.07036007195711136, -0.03968247026205063, 0.038671329617500305, 0.017618633806705475, -0.03142164647579193, -0.0006218271446414292, -0.04235340282320976, -0.051510896533727646, 0.04387965425848961, 0.019669530913233757, -0.043612558394670486, -0.03809898719191551, 0.012105060741305351, -0.0609736405313015, -0.04769527539610863, -0.01764725148677826, -0.041208717972040176, 0.007201986387372017, 0.002597007667645812, 0.011055764742195606, 0.037488486617803574, 0.025469277054071426, -0.020566202700138092, -0.0056328121572732925, 0.05826454609632492, 0.05028989911079407, 0.004266342148184776, -0.02333252876996994, 0.014203652739524841, -0.01733246259391308, 0.0148713868111372, 0.05269373953342438, 0.014642449095845222, 0.009243343956768513, -0.03691614419221878, -0.013841168954968452, 0.06631550937891006, 0.05055699124932289, 0.06024867296218872, 0.035771455615758896, 0.01999385841190815, -0.012715560384094715, -0.038175299763679504, -0.013154356740415096, -0.044528309255838394, -0.02636594884097576, 0.02838822826743126, 0.028712555766105652, -0.037316784262657166, 0.021462874487042427, 0.018000196665525436, 0.07463356852531433, -0.009863383136689663, -0.03275711461901665, -0.02703368104994297, -0.022931888699531555, -0.03661089390516281, 0.051510896533727646, 0.02068067155778408, -0.029208585619926453, 0.0000754554130253382, -0.02678566612303257, -0.0494886189699173, 0.0017885727575048804, -0.04838208854198456, -0.0759308785200119, -0.03855685889720917, -0.02327529340982437, 0.010960374027490616, 0.0434599332511425, 0.029609227553009987, -0.010264023207128048, 0.024553528055548668, 0.030467741191387177, -0.034283362329006195, -0.049717552959918976, -0.00972029659897089, 0.006085916887968779, -0.028044821694493294, 0.015634510666131973, 0.015138479880988598, 0.008027114905416965, -0.016454869881272316, -0.017790338024497032, 0.015710823237895966, -0.025221262127161026, 0.029036883264780045, -0.015481886453926563, 0.014651988632977009, 0.035389892756938934, -0.05086224153637886, 0.0025731599889695644, 0.027262618765234947, -0.015071706846356392, 0.05895135924220085, -0.057310640811920166, 0.020394500344991684, -0.03609578311443329, 0.06124073266983032, -0.0011965552112087607, -0.03777465596795082, 0.034035347402095795, 0.020833296701312065, 0.06227095052599907, 0.020222796127200127, 0.0028497925959527493, 0.0029284898191690445, -0.029475679621100426, 0.0070112054236233234, -0.03550436347723007, -0.01345006749033928, 0.06383535265922546, 0.014175035990774632, 0.032127536833286285, 0.05200692638754845, 0.10233498364686966, 0.0022345236502587795, 0.0444519966840744, 0.008360981941223145, 0.035218190401792526, -0.0066725690849125385, 0.026938291266560555, -0.03804175183176994, 0.009872921742498875, -0.03430244326591492, -0.010912679135799408, -0.07734265923500061, 0.0327189601957798, 0.0011965552112087607, 0.037374015897512436, -0.0404837504029274, 0.0899723693728447, 0.011551795527338982, 0.024343667551875114, 0.007149521727114916, 0.01839129813015461, 0.002388340886682272, 0.026060698553919792, -0.026003463193774223, 0.011818889528512955, -0.018009735271334648, 0.010407108813524246, 0.0344550684094429, -0.019974781200289726, 0.03994956240057945, 0.033234067261219025, -0.0689101368188858, -0.001345006749033928, -0.01579667441546917, 0.0504806786775589, -0.05380026996135712, -0.09516160935163498, -0.0689864456653595, 0.03426428511738777, -0.06654445081949234, 0.020203718915581703, 0.04155212268233299, -0.031936757266521454, 0.014556597918272018, 0.043536245822906494, 0.023008201271295547, 0.02678566612303257, -0.00507477717474103, 0.05620411038398743, 0.05925660952925682, -0.026957368478178978, 0.08157800137996674, 0.013612231239676476, -0.027682337909936905, 0.008484989404678345, -0.0006504443008452654, -0.02239770069718361, 0.016025612130761147, -0.02443905919790268, -0.01733246259391308, 0.02869347669184208, 0.05288451910018921, 0.07814393937587738, -0.014470746740698814, 0.028369149193167686, -0.04086531326174736, 0.04624534025788307, -0.07734265923500061, -0.08600412309169769, 0.025564666837453842, -0.00836575124412775, 0.04468093439936638, 0.04189553111791611, 0.004173336550593376, 0.0053514097817242146, -0.012209990061819553, -0.002390725538134575, -0.06814701110124588, -0.0434599332511425, -0.06646813452243805, 0.02159642055630684, 0.02987631969153881, 0.02957107126712799, 0.029609227553009987, -0.020566202700138092, -0.015205253846943378, 0.027377087622880936, 0.008876090869307518, 0.0073450724594295025, 0.038671329617500305, 0.009233805350959301, 0.01567266695201397, -0.014394434168934822, -0.007478618994355202, 0.020108327269554138, -0.010187710635364056, 0.09752729535102844, -0.04136134311556816, 0.04159028083086014, 0.018601156771183014, -0.03926274925470352, -0.022245075553655624, -0.036515504121780396, 0.0544489249587059, 0.07268759608268738, 0.06059207767248154, -0.024057496339082718, -0.03485570847988129, -0.0399877168238163, -0.04155212268233299, -0.01782849431037903, 0.0624617338180542, -0.00901440717279911, -0.04075084254145622, 0.04223893582820892, 0.02134840562939644, -0.01463291049003601, 0.028426384553313255, -0.03930090740323067, 0.02524033933877945, 0.008747313171625137, -0.0112370066344738, -0.047313712537288666, 0.017008135095238686, -0.02894149348139763, 0.026957368478178978, 0.0749388188123703, -0.02926582098007202, 0.019803078845143318, 0.0347030833363533, 0.06112626567482948, 0.009701218456029892, 0.014308582060039043, -0.022359544411301613, -0.01268694270402193, -0.04170474782586098, -0.00824174378067255, -0.0018398452084511518, -0.002718630712479353, -0.00005253932613413781, -0.0744427815079689, -0.009324425831437111, -0.02209245041012764, -0.026652120053768158, -0.006796576548367739, 0.014308582060039043, 0.00882362574338913, -0.022130606696009636, -0.015872986987233162, -0.007636013440787792, 0.058417171239852905, 0.021882591769099236, 0.010044625028967857, -0.010960374027490616, 0.01703675277531147, -0.004731371067464352, -0.10515854507684708, -0.030009867623448372, 0.0013128124410286546, 0.004328346345573664, -0.01466152723878622, 0.02277926355600357, 0.0224740132689476, -0.011513639241456985, -0.05727248638868332, 0.013287903741002083, -0.0025421581231057644, -0.005365718621760607, -0.053037144243717194, 0.026251479983329773, 0.01043572649359703, -0.005570807959884405, -0.019860312342643738, -0.006958740763366222, 0.016550259664654732, -0.022206919267773628, 0.0049936953000724316, 0.004349809139966965, 0.022206919267773628, -0.04548221454024315, 0.029647381976246834, -0.002326336922124028, -0.017437392845749855, 0.018715625628829002, 0.004645519889891148, 0.00879500899463892, 0.03277619183063507, -0.00824174378067255, 0.06486557424068451, 0.046512432396411896, -0.01672196388244629, 0.0066534909419715405, 0.017942963168025017, 0.020413577556610107, -0.04624534025788307, -0.017370618879795074, -0.008632844313979149, 0.02388579398393631, -0.031993988901376724, -0.02474430948495865, 0.06631550937891006, 0.02554558962583542, -0.002441998105496168, 0.054716020822525024, 0.032566335052251816, 0.021443795412778854, 0.0755111575126648, -0.05715801566839218, 0.016750579699873924, 0.0017110679764300585, -0.07486250251531601, -0.046130869537591934, -0.0013151972088962793, -0.02504955790936947, -0.08264636993408203, 0.04178106039762497, -0.09813779592514038, 0.033978112041950226, 0.004108947701752186, -0.05540283024311066, 0.053304240107536316, -0.0003195583412889391, 0.06471294909715652, -0.010740975849330425, -0.02524033933877945, -0.004776681773364544, -0.01925935223698616, 0.028617164120078087, 0.029666461050510406, 0.029590148478746414, 0.024667996913194656, -0.016931822523474693, 0.020699748769402504, 0.002818790730088949, 0.008828395046293736, 0.0021009768825024366, 0.06612472981214523, -0.0019757768604904413, -0.0063482411205768585, -0.04479540139436722, 0.015892066061496735, 0.10248760879039764, 0.03769834712147713, -0.01215275563299656, 0.062499888241291046, -0.01902087591588497, -0.027300775051116943, 0.005604194942861795, -0.027758650481700897, 0.02394302748143673, 0.04624534025788307, -0.013812551274895668, 0.02029910869896412, 0.059828951954841614, -0.0023525694850832224, 0.04685583710670471, -0.02054712362587452, 0.0017146451864391565, 0.02068067155778408, 0.05918029695749283, 0.05906582996249199, 0.09264330565929413, 0.05647120624780655, -0.0579974539577961, 0.015958838164806366, 0.027949431911110878, 0.02833099290728569, 0.054029207676649094, -0.0703982263803482, -0.004609748255461454, 0.001613292726688087, -0.033978112041950226, -0.002444382756948471, 0.0312308669090271, 0.00030211976263672113, 0.04166659340262413, 0.03331037983298302, 0.05448708310723305, 0.023046357557177544, 0.01572990231215954, -0.0554409883916378, -0.05013727396726608, -0.025469277054071426, 0.040712688118219376, -0.020203718915581703, -0.01876332052052021, -0.06776544451713562, -0.02876978926360607, 0.005451569799333811, -0.031078241765499115, -0.016140080988407135, -0.01999385841190815, -0.0005028870655223727, 0.02054712362587452, -0.07459540665149689, 0.005594655871391296, 0.02092868648469448, 0.01179027184844017, -0.01679827645421028, 0.03739309683442116, -0.013822090812027454, -0.005480187013745308, 0.015319722704589367, 0.022855576127767563, -0.05647120624780655, -0.024057496339082718, -0.002637548604980111, -0.008628075011074543, -0.021367482841014862, -0.0046407501213252544, -0.013383294455707073, 0.011580413207411766, 0.021329326555132866, -0.026060698553919792, -0.022931888699531555, 0.043421778827905655, 0.031135475262999535, -0.01604469120502472, -0.0014237039722502232, 0.03151703625917435, 0.053418707102537155, -0.00817496981471777, -0.016082847490906715, 0.008942863903939724, -0.009295809082686901, 0.025335729122161865, 0.05979079753160477, -0.02833099290728569, 0.049526773393154144, 0.019707687199115753, 0.024858776479959488, 0.02297004498541355, -0.07814393937587738, -0.05597517639398575, 0.060630232095718384, -0.10485329478979111, -0.017361080273985863, -0.05093855410814285, 0.00823697354644537, -0.019106727093458176, 0.011465944349765778, -0.03979693725705147, 0.022111529484391212, 0.011637646704912186, 0.062118325382471085, 0.030391428619623184, 0.008518376387655735, -0.07482434809207916, 0.02876978926360607, 0.015004933811724186, 0.054219987243413925, -0.03794636204838753, 0.0222259983420372, -0.026213323697447777, 0.005089086014777422, 0.07539669424295425, 0.06623920053243637, 0.01554865948855877, -0.019049493595957756, 0.012925419956445694, -0.07768606394529343, 0.007178138941526413, 0.018849173560738564, 0.01957414112985134, 0.005828362423926592, -0.021615497767925262, 0.021501030772924423, -0.036133941262960434, -0.013316520489752293, 0.024343667551875114, 0.04838208854198456, -0.06589578837156296, -0.010254483669996262, 0.0023811866994947195, -0.018667930737137794, -0.015424652025103569, 0.02192074805498123, 0.03512280061841011, -0.02838822826743126, -0.03092561662197113, -0.03168874233961105, 0.025164026767015457, 0.02457260526716709, -0.018171899020671844, -0.013287903741002083, -0.022760184481739998, -0.07509144395589828, -0.06578132510185242, 0.07921231538057327, 0.02234046719968319, -0.0021880208514630795, -0.07982280850410461, 0.06578132510185242, -0.00726875988766551, -0.052312176674604416, -0.018811017274856567, 0.07409937679767609, -0.017570938915014267, 0.00452151196077466, 0.0167315024882555, 0.010187710635364056, -0.002761556301265955, 0.03670628368854523, -0.042315248399972916, -0.036210253834724426, 0.00005410432640928775, 0.033291302621364594, -0.021195780485868454, 0.052502959966659546, -0.04109424725174904, -0.06738388538360596, -0.005704354960471392, -0.014547058381140232, 0.07226788252592087, -0.07005482167005539, -0.024362746626138687, 0.0014630525838583708, -0.04105609282851219, -0.01715122163295746, -0.003992094658315182, -0.013659927062690258, -0.020699748769402504, 0.025316651910543442, 0.022378623485565186, -0.020337264984846115, -0.004969847854226828, -0.018353141844272614, -0.005737741477787495, 0.014957237988710403, 0.0018100356683135033, -0.020470811054110527, 0.030143413692712784, 0.005918983835726976, -0.026766588911414146, 0.050518836826086044, -0.07013113051652908, 0.03474123775959015, 0.012066904455423355, 0.04517696425318718, -0.02043265663087368, -0.018715625628829002, -0.06066839024424553, 0.01957414112985134, 0.02295096591114998, 0.03605762869119644, -0.03418797254562378, 0.02628963626921177, 0.048114992678165436, -0.014079645276069641, -0.03918643668293953, 0.000581584230531007, -0.014613832347095013, -0.04510065168142319, 0.04067452996969223, -0.015644049271941185, -0.027434322983026505, 0.033463004976511, -0.006710725370794535, 0.01703675277531147, 0.015205253846943378, 0.06185123324394226, 0.0339590348303318, 0.04857286810874939, -0.0018458071863278747, 0.01573944091796875, 0.0095629021525383, 0.002973800292238593, -0.02586991712450981, 0.04319284111261368, -0.019707687199115753, 0.024591684341430664, 0.01672196388244629, -0.0319749116897583, -0.010073241777718067, 0.039720624685287476, -0.020108327269554138 ]
4,725
optbinning.binning.multiclass_binning
_prebinning_refinement
null
def _prebinning_refinement(self, splits_prebinning, x, y, y_missing, x_special, y_special, y_others=None, sw_clean=None, sw_missing=None, sw_special=None, sw_others=None): self._classes = np.unique(y) self._n_classes = len(self._classes) if self._n_classes > 100: raise ValueError("Maximum number of classes exceeded; got {}." .format(self._n_classes)) self._n_event_special = target_info_special_multiclass( self.special_codes, x_special, y_special, self._classes) self._n_event_missing = [target_info(y_missing, cl)[0] for cl in self._classes] n_splits = len(splits_prebinning) if not n_splits: return splits_prebinning, np.array([]), np.array([]) if self.split_digits is not None: splits_prebinning = np.round(splits_prebinning, self.split_digits) splits_prebinning, n_nonevent, n_event = self._compute_prebins( splits_prebinning, x, y) return splits_prebinning, n_nonevent, n_event
(self, splits_prebinning, x, y, y_missing, x_special, y_special, y_others=None, sw_clean=None, sw_missing=None, sw_special=None, sw_others=None)
[ 0.01967676728963852, -0.035143621265888214, -0.029890382662415504, 0.030183246359229088, -0.03470432758331299, -0.062050458043813705, 0.00428084097802639, -0.0002512505743652582, -0.01035089511424303, -0.019695071503520012, 0.011934188194572926, 0.001662229304201901, -0.005029015708714724, -0.055497635155916214, -0.04989662021398544, -0.02520456723868847, -0.0029743951745331287, 0.006342325359582901, -0.002195332432165742, -0.02655906043946743, -0.021818332374095917, 0.012638891115784645, -0.05827983841300011, 0.0761445164680481, 0.02829793654382229, 0.027272915467619896, 0.006758741103112698, -0.01982319913804531, 0.009339600801467896, -0.0018738688668236136, 0.019237471744418144, -0.016153253614902496, -0.0010290263453498483, -0.05278864875435829, 0.024893399327993393, -0.01446013618260622, 0.037779394537210464, 0.070616714656353, 0.02015267126262188, 0.008570834062993526, -0.0182765144854784, -0.0761445164680481, 0.017352163791656494, 0.0010376062709838152, 0.03375251963734627, 0.027474258095026016, 0.005482038948684931, -0.0006715268827974796, -0.028023377060890198, 0.05040913447737694, 0.016299685463309288, -0.0889572948217392, 0.0695916935801506, 0.06593090295791626, -0.0037019778974354267, 0.06538178026676178, 0.06234332174062729, 0.043233975768089294, -0.02238575555384159, -0.01799280196428299, 0.03168417140841484, 0.06311208754777908, -0.01348087377846241, -0.026595668867230415, 0.036040518432855606, -0.0482492633163929, -0.04004908725619316, 0.0014311416307464242, -0.03419181704521179, 0.02959751896560192, 0.023904984816908836, 0.01691286824643612, -0.002191900508478284, 0.004878007806837559, -0.05216631293296814, -0.0049374960362911224, 0.012025708332657814, -0.01133015751838684, 0.06677288562059402, -0.029560910537838936, 0.054033320397138596, 0.04901803284883499, -0.017068451270461082, -0.007344468031078577, 0.013105642050504684, -0.04092767834663391, -0.003665369935333729, 0.02346568927168846, 0.0464920848608017, -0.0050656236708164215, -0.05992719903588295, 0.025460822507739067, 0.04414917528629303, 0.046601906418800354, 0.05439939722418785, 0.0386945940554142, -0.03424672782421112, -0.005047319922596216, 0.026943443343043327, -0.04777336120605469, 0.008291698060929775, 0.012108076363801956, -0.04165983572602272, 0.03203194588422775, 0.021653596311807632, 0.027071570977568626, 0.034740936011075974, -0.039536576718091965, -0.06827380508184433, -0.027785426005721092, 0.016015972942113876, -0.06384424865245819, -0.10689518600702286, 0.04535723850131035, -0.028810448944568634, -0.029963599517941475, -0.04704120382666588, 0.039133887737989426, -0.0009712544269859791, 0.025039831176400185, -0.017544355243444443, -0.031189965084195137, -0.03902406245470047, 0.03399047255516052, -0.01001227181404829, -0.01280362717807293, 0.11385069042444229, 0.08419825881719589, -0.015732262283563614, -0.04477151110768318, 0.046418868005275726, -0.014130664989352226, -0.08061068505048752, 0.010790190659463406, -0.06545499712228775, -0.0015489734942093492, -0.012272811494767666, 0.04261164367198944, 0.04462507739663124, -0.10279509425163269, 0.07149530947208405, -0.021543772891163826, -0.0011851820163428783, 0.030384590849280357, -0.01458826381713152, 0.042025916278362274, 0.031446218490600586, 0.01834057830274105, 0.030659150332212448, 0.02756577916443348, 0.013032426126301289, 0.011604717001318932, -0.008959793485701084, -0.08412504196166992, -0.01658339612185955, -0.005106807686388493, -0.004614888224750757, 0.0182765144854784, -0.019713375717401505, -0.02527778223156929, 0.024142935872077942, -0.05033591762185097, 0.03431994467973709, -0.03748653084039688, 0.0009289264562539756, 0.07167834788560867, -0.043307192623615265, -0.03847494348883629, 0.010698670521378517, -0.012519915588200092, 0.0711292251944542, 0.01820329762995243, -0.03080558218061924, 0.02595502883195877, 0.004180169198662043, 0.04059820622205734, -0.009348752908408642, -0.08112319558858871, 0.0015970213571563363, 0.038401730358600616, 0.03646150976419449, -0.01859683357179165, 0.031025229021906853, -0.07149530947208405, -0.014496744610369205, -0.000011779605301853735, 0.009010129608213902, -0.05714499577879906, -0.00919774454087019, 0.039536576718091965, -0.012702954933047295, -0.01546685490757227, -0.0278952494263649, 0.05450922250747681, 0.00341369048692286, 0.0156407430768013, -0.013352746143937111, 0.02238575555384159, -0.004356344696134329, -0.03283732011914253, -0.07178816944360733, -0.007435987703502178, -0.007866131141781807, 0.023831767961382866, -0.030036814510822296, -0.0042968569323420525, -0.02655906043946743, -0.0026197556871920824, 0.0384383350610733, -0.04052498936653137, 0.032581064850091934, -0.009454000741243362, 0.0034068264067173004, 0.03578425943851471, 0.00802629068493843, 0.039390143007040024, 0.06948187202215195, -0.009884144179522991, -0.008772177621722221, -0.03755974769592285, 0.01927408017218113, -0.023300953209400177, -0.008145266212522984, -0.00028142353403382003, 0.0137554332613945, -0.004390664864331484, 0.03532666340470314, 0.0062691099010407925, 0.01820329762995243, -0.001095950254239142, -0.0386945940554142, -0.018651746213436127, -0.05103146657347679, -0.032727498561143875, 0.03457619994878769, 0.015320423059165478, 0.0013258937979117036, -0.06369781494140625, 0.035088710486888885, 0.0019665327854454517, -0.007513779681175947, 0.008040018379688263, -0.040891069918870926, -0.04484472796320915, 0.020061150193214417, -0.003264970611780882, -0.0012515339767560363, 0.05915842950344086, -0.008040018379688263, 0.012089772149920464, 0.01415812037885189, 0.002926347078755498, -0.023410776630043983, -0.019530335441231728, 0.021250909194350243, -0.005893878173083067, -0.027950162068009377, 0.01054308656603098, 0.0036539300344884396, 0.010762734338641167, 0.0037042659241706133, 0.04239199310541153, 0.020244190469384193, 0.02386837638914585, 0.008772177621722221, 0.03201364353299141, 0.03640659525990486, 0.0200977586209774, 0.013609001412987709, 0.0038072257302701473, -0.031848907470703125, 0.012519915588200092, -0.022074587643146515, 0.024655448272824287, -0.024435799568891525, 0.031519435346126556, -0.025918422266840935, -0.0336793027818203, 0.06699252873659134, -0.01439607236534357, 0.05926825478672981, -0.007971378974616528, 0.04711441695690155, -0.0138835608959198, 0.011641324497759342, -0.0028302513528615236, -0.02042723074555397, -0.045467060059309006, 0.0034068264067173004, -0.03854816034436226, -0.05007966235280037, 0.025332694873213768, 0.06669966876506805, 0.018441250547766685, 0.06022006273269653, -0.01745283603668213, -0.023172825574874878, -0.005701686721295118, 0.0156407430768013, -0.003205482615157962, 0.0059121823869645596, -0.027254611253738403, -0.0462358295917511, -0.02540590986609459, 0.006406389642506838, -0.023740248754620552, 0.07354535162448883, -0.015869541093707085, -0.03490567207336426, -0.03810886666178703, 0.03653472289443016, 0.021397341042757034, 0.04630904272198677, -0.04535723850131035, 0.027657298371195793, -0.09115377068519592, 0.041074108332395554, 0.04704120382666588, -0.023813465610146523, 0.03902406245470047, 0.023904984816908836, -0.028755536302924156, -0.016830500215291977, 0.0482492633163929, -0.05926825478672981, 0.036223556846380234, 0.007056180387735367, -0.01753520406782627, -0.10111112892627716, -0.024930007755756378, -0.00028542752261273563, -0.006424693390727043, -0.011238637380301952, 0.027584083378314972, -0.03766956925392151, -0.001220645965076983, 0.016418660059571266, -0.01773654669523239, 0.025735381990671158, -0.02621128410100937, -0.016061734408140182, 0.007797491271048784, -0.03045780584216118, 0.04993322864174843, 0.00028800152358599007, 0.00723006809130311, 0.02985377423465252, 0.012721259146928787, 0.01563159003853798, 0.04187948256731033, -0.03389895334839821, -0.030110031366348267, -0.0001585867430549115, 0.024984918534755707, 0.08390539884567261, -0.07120244204998016, -0.010360047221183777, -0.04052498936653137, 0.061098650097846985, -0.01169623713940382, 0.03563782945275307, -0.007303284015506506, 0.0016679492546245456, 0.06567464023828506, 0.01341680996119976, -0.024893399327993393, -0.04414917528629303, 0.01671152375638485, -0.08551614731550217, -0.04085446149110794, -0.006667220965027809, -0.050665389746427536, -0.03810886666178703, 0.033331528306007385, 0.007948499172925949, 0.04389292001724243, -0.01805686578154564, -0.029835470020771027, 0.03395386412739754, 0.020665181800723076, -0.027822034433484077, 0.043380409479141235, -0.03203194588422775, 0.017141668125987053, -0.004086361266672611, 0.03715705871582031, -0.003665369935333729, -0.029707342386245728, 0.08522328734397888, -0.03391725569963455, 0.010552238672971725, 0.003457162296399474, -0.02028079889714718, -0.00653909333050251, -0.03527174890041351, -0.006854836829006672, 0.08273394405841827, 0.0030727789271622896, 0.014341160655021667, -0.008557106368243694, 0.016061734408140182, -0.04462507739663124, -0.03287392854690552, 0.02729121968150139, 0.01671152375638485, -0.02628450095653534, -0.014734695665538311, 0.047626931220293045, -0.0016096053877845407, 0.022623706609010696, -0.03957318142056465, 0.02816980890929699, 0.03891424089670181, -0.03485075756907463, -0.0497501902282238, 0.0029080433305352926, -0.013032426126301289, 0.037523139268159866, 0.017754850909113884, -0.024637144058942795, 0.02075670100748539, -0.0033336104825139046, 0.015686502680182457, 0.028535889461636543, -0.033056970685720444, 0.032727498561143875, -0.03183060511946678, -0.06856667250394821, -0.0018807329470291734, 0.008007986471056938, -0.0070470282807946205, -0.05461904779076576, -0.06442997604608536, -0.030512718483805656, -0.030384590849280357, -0.019109344109892845, -0.01122033316642046, 0.06208706647157669, 0.0006640909123234451, -0.02110447734594345, -0.04901803284883499, 0.02158038131892681, 0.05447261407971382, -0.005747446324676275, 0.011238637380301952, -0.015869541093707085, -0.016345445066690445, -0.005047319922596216, -0.05926825478672981, -0.014972647652029991, -0.04912785440683365, -0.030842188745737076, 0.0028737231623381376, 0.02553403750061989, 0.01139422133564949, -0.04440543055534363, -0.006378933321684599, 0.0015432534273713827, 0.012684650719165802, 0.006054038181900978, -0.004727000370621681, 0.0049008880741894245, -0.058609310537576675, 0.06453979760408401, 0.013343594036996365, 0.0034480104222893715, -0.019841503351926804, -0.03876780718564987, -0.03580256551504135, 0.03287392854690552, 0.02196476422250271, -0.017947042360901833, 0.042831290513277054, -0.0006640909123234451, 0.004905464127659798, 0.039207104593515396, 0.01711421273648739, 0.000856854603625834, 0.035143621265888214, -0.02304469794034958, 0.012702954933047295, 0.05882895737886429, -0.04616261273622513, 0.019914718344807625, 0.00005548390981857665, -0.013856105506420135, -0.07746239751577377, 0.00283253937959671, -0.0014425816480070353, -0.0007441708003170788, -0.009216048754751682, 0.011366765014827251, 0.05077521130442619, 0.05333776772022247, -0.04912785440683365, 0.049237679690122604, 0.01995132677257061, -0.0028714353684335947, 0.11612038314342499, -0.04433221369981766, 0.019182560965418816, 0.013874408788979053, -0.0295243039727211, -0.012025708332657814, -0.02015267126262188, -0.058060191571712494, -0.019859807565808296, 0.025991637259721756, -0.06139151379466057, 0.041769661009311676, -0.010305134579539299, -0.09012874960899353, 0.06713896244764328, -0.005893878173083067, -0.00399255333468318, -0.028023377060890198, 0.046601906418800354, 0.003955945372581482, -0.01378288958221674, 0.03739501163363457, 0.04601617902517319, -0.009627887979149818, 0.015192295424640179, -0.037852611392736435, 0.012519915588200092, 0.023099610581994057, -0.009275536984205246, -0.03201364353299141, -0.00751835573464632, -0.02412463165819645, 0.0009169144905172288, -0.043783094733953476, 0.0512511171400547, 0.015393638983368874, 0.021671900525689125, 0.026925139129161835, 0.06139151379466057, 0.011998252011835575, 0.07479002326726913, -0.013874408788979053, 0.0222393237054348, 0.023502297699451447, 0.018038561567664146, 0.042025916278362274, -0.00005494766082847491, 0.03788921609520912, 0.007596147712320089, 0.016006821766495705, -0.03688250109553337, 0.02339247427880764, -0.03497888520359993, -0.00868980959057808, 0.0010198743548244238, 0.06252636015415192, 0.0590486079454422, -0.047480497509241104, 0.032782409340143204, 0.017333859577775, 0.02899348922073841, 0.05169041082262993, -0.03007342293858528, 0.02460053563117981, 0.04367327317595482, -0.055973540991544724, -0.025058135390281677, -0.003379370551556349, 0.008168146945536137, 0.05608336254954338, 0.008209330029785633, 0.024692054837942123, 0.04557688534259796, 0.05776732787489891, -0.041220538318157196, -0.005784054286777973, -0.010442415252327919, -0.018441250547766685, 0.0038232416845858097, -0.06849345564842224, -0.09759676456451416, -0.05216631293296814, 0.010625454597175121, -0.04327058419585228, -0.01556752622127533, -0.051727019250392914, -0.03774278610944748, -0.020939741283655167, -0.1070416122674942, 0.019512031227350235, 0.0014974935911595821, 0.020976349711418152, -0.008525073528289795, 0.056119970977306366, 0.0005188031354919076, -0.01751689985394478, 0.0006515069399029016, 0.0025945876259356737, -0.0011228341609239578, -0.028938576579093933, -0.03748653084039688, -0.0401955172419548, 0.07292301952838898, -0.003512074239552021, 0.015302118845283985, 0.04268485680222511, 0.055314596742391586, -0.05040913447737694, -0.02831624075770378, 0.007911890745162964, -0.019127648323774338, -0.03721196949481964, 0.019933022558689117, 0.015210598707199097, 0.040891069918870926, -0.018505314365029335, -0.04052498936653137, 0.04477151110768318, -0.02979886345565319, -0.009174864739179611, 0.06801754981279373, 0.0019631008617579937, -0.0072026122361421585, -0.05458243936300278, -0.018294818699359894, 0.0462358295917511, -0.027584083378314972, -0.03593069314956665, 0.028627408668398857, -0.04334380105137825, 0.01047902274876833, -0.03485075756907463, -0.007957651279866695, -0.005733718629926443, 0.07643737643957138, -0.04136697202920914, 0.011449133045971394, 0.037632960826158524, 0.02877384051680565, 0.015887845307588577, -0.01163217332214117, -0.07878028601408005, 0.020573662593960762, -0.02359381690621376, 0.04327058419585228, 0.001901324838399887, -0.013004970736801624, -0.08976266533136368, -0.011677932925522327, -0.0023635001853108406, 0.06845685094594955, 0.022495578974485397, -0.00608149403706193, 0.009884144179522991, -0.06384424865245819, 0.001574141439050436, -0.031189965084195137, 0.022751834243535995, -0.029030095785856247, 0.03334983438253403, 0.0229897852987051, -0.04158661887049675, -0.0424652099609375, 0.03188551589846611, 0.02419784851372242, 0.009756015613675117, -0.01860598474740982, 0.05242256820201874, 0.003251242684200406, -0.060695964843034744, 0.06322190910577774, -0.013627305626869202, -0.06369781494140625, -0.012748715467751026, -0.0204821415245533, -0.040708027780056, -0.007353619672358036, -0.04718763381242752, -0.03854816034436226, 0.015430246479809284, -0.02319112978875637, 0.0010055743623524904, 0.0013819497544318438, -0.015823781490325928, -0.04455186426639557, -0.01054308656603098, 0.06292904913425446, 0.0032672586385160685, -0.061245083808898926, -0.02447240799665451, 0.025167958810925484, 0.059634335339069366, 0.03673606738448143, 0.02176341973245144, 0.08236786723136902, -0.0004106953274458647, -0.04440543055534363, 0.013499177992343903, 0.012272811494767666, -0.024856790900230408, 0.016601700335741043, -0.029542608186602592, 0.04092767834663391, -0.06007362902164459, -0.08134283870458603, -0.02749256230890751, -0.0016519333003088832, 0.06395407021045685, -0.0351802296936512, -0.018148386850953102, -0.019530335441231728, -0.026668883860111237, -0.01927408017218113, 0.00019733967201318592, -0.04524741321802139, -0.039207104593515396, -0.023172825574874878, 0.04477151110768318, -0.007486323826014996, -0.004049753304570913, -0.008973521180450916, 0.01522890292108059, 0.006896020844578743, 0.04294111207127571, 0.0221111960709095, 0.0312814861536026, -0.04279468208551407, 0.01995132677257061, 0.10081826895475388, -0.11956153064966202, 0.01503671146929264, -0.024618839845061302, 0.07973209023475647, 0.02743765152990818, -0.04389292001724243, 0.03715705871582031, 0.049164462834596634, -0.02068348601460457, 0.0422089546918869, -0.02621128410100937, 0.04905463755130768, 0.030750669538974762, -0.007948499172925949, -0.06227010488510132, -0.003345050383359194, 0.005170871503651142, -0.04187948256731033, 0.0894698053598404, 0.01213553175330162, -0.028737232089042664, -0.005976246204227209, -0.03799904137849808, 0.0008774465532042086, 0.023648729547858238, 0.026613973081111908, 0.0036402021069079638, -0.014020840637385845, 0.025021526962518692, 0.02972564660012722, 0.013517482206225395, -0.01054308656603098, -0.03730349242687225, 0.007994258776307106, 0.013938472606241703, -0.01381949707865715, 0.01927408017218113, 0.030750669538974762, 0.015210598707199097, 0.02804168127477169, 0.040012478828430176 ]
4,730
optbinning.binning.multiclass_binning
fit
Fit the optimal binning according to the given training data. Parameters ---------- x : array-like, shape = (n_samples,) Training vector, where n_samples is the number of samples. y : array-like, shape = (n_samples,) Target vector relative to x. check_input : bool (default=False) Whether to check input arrays. Returns ------- self : MulticlassOptimalBinning Fitted optimal binning.
def fit(self, x, y, check_input=False): """Fit the optimal binning according to the given training data. Parameters ---------- x : array-like, shape = (n_samples,) Training vector, where n_samples is the number of samples. y : array-like, shape = (n_samples,) Target vector relative to x. check_input : bool (default=False) Whether to check input arrays. Returns ------- self : MulticlassOptimalBinning Fitted optimal binning. """ return self._fit(x, y, check_input)
(self, x, y, check_input=False)
[ 0.004161129705607891, -0.026777096092700958, -0.012989149428904057, -0.011009519919753075, -0.054457180202007294, -0.0538320355117321, -0.04872667416930199, 0.036848895251750946, 0.022661549970507622, -0.00025803560856729746, 0.009689765982329845, -0.023477714508771896, 0.012659210711717606, -0.024502258747816086, -0.026777096092700958, -0.009611623361706734, -0.017052600160241127, -0.02089030295610428, -0.03497345745563507, 0.06397330015897751, -0.008943064138293266, 0.054109878838062286, 0.017816666513681412, 0.09106296300888062, 0.0066942740231752396, 0.042822517454624176, 0.02042144350707531, 0.020612459629774094, -0.030389051884412766, -0.010288865305483341, -0.05608950927853584, 0.002307397313416004, 0.004278344567865133, 0.0015259645879268646, 0.032507602125406265, -0.028791457414627075, 0.07001637667417526, 0.03455669432878494, -0.04362131282687187, -0.019692106172442436, -0.019640009850263596, -0.08307498693466187, 0.01025413442403078, 0.05393622815608978, 0.043239280581474304, 0.009472701698541641, -0.03601536899805069, 0.054109878838062286, -0.03976624459028244, -0.03226448968052864, -0.06939122825860977, -0.08467258512973785, 0.06119487062096596, 0.007883788086473942, -0.007592921610921621, 0.05803440883755684, 0.03945367410778999, -0.0032559698447585106, 0.017000503838062286, 0.026065124198794365, 0.005600268021225929, 0.02689865231513977, 0.0548044852912426, -0.03278544545173645, -0.006004008464515209, 0.010158626362681389, -0.13162800669670105, 0.023338792845606804, -0.03177826479077339, 0.09863418340682983, 0.02957288920879364, 0.0026503594126552343, -0.0017050429014489055, 0.043343473225831985, -0.05202605947852135, 0.03903690725564957, -0.024866927415132523, 0.022939393296837807, -0.011339457705616951, 0.009689765982329845, 0.08140792697668076, 0.0600140355527401, 0.004506262484937906, -0.06970380246639252, -0.037404581904411316, -0.04716381058096886, 0.011643348261713982, 0.04122491925954819, 0.0345914252102375, -0.02523159608244896, -0.024849561974406242, 0.04584405571222305, 0.05226917192339897, 0.06470263749361038, 0.02418968640267849, 0.005739189684391022, -0.038932718336582184, 0.02735014632344246, -0.042162638157606125, 0.004923026543110609, -0.06313976645469666, 0.014881952665746212, 0.03165670856833458, 0.07751812785863876, -0.010332277975976467, -0.01746068149805069, -0.009689765982329845, -0.0258567426353693, -0.04848356172442436, 0.010080482810735703, -0.004788446240127087, -0.0028240112587809563, -0.029850732535123825, 0.0001747370552038774, -0.05758291482925415, 0.01529871765524149, -0.027784276753664017, -0.010558024980127811, -0.05897212773561478, 0.033132750540971756, 0.0009871015790849924, 0.0016290702624246478, -0.02427651174366474, -0.0442117303609848, 0.023390887305140495, -0.011921191588044167, 0.043274011462926865, 0.021341796964406967, -0.0011547839967533946, -0.07147505134344101, 0.026065124198794365, -0.02849624864757061, -0.0578954853117466, 0.03526866436004639, 0.0018873772351071239, -0.051296722143888474, -0.0016996163176372647, 0.011105027981102467, 0.016505597159266472, -0.028669901192188263, 0.08564503490924835, 0.008890968747437, 0.04775422438979149, -0.02309568040072918, 0.05650627240538597, 0.015784941613674164, 0.03702254965901375, -0.03387945145368576, 0.04619136080145836, 0.02684655785560608, -0.0515398345887661, -0.023946573957800865, 0.026742367073893547, -0.015342130325734615, -0.03914109990000725, 0.008387378416955471, -0.030336957424879074, -0.043204549700021744, 0.03262915834784508, 0.004182836040854454, 0.004866589792072773, -0.016644518822431564, -0.028756726533174515, -0.012225081212818623, -0.027141764760017395, 0.05483921617269516, -0.05751345306634903, 0.03618901968002319, 0.01722625084221363, -0.014300219714641571, 0.01779930293560028, -0.06626550108194351, -0.06056972220540047, 0.005435299128293991, 0.022852567955851555, 0.007471365388482809, 0.003412256482988596, -0.0161496102809906, 0.05536017194390297, 0.06807147711515427, -0.006412090267986059, 0.013770582154393196, 0.012207716703414917, -0.06612657755613327, -0.04820571839809418, 0.003410085802897811, 0.0025830694939941168, 0.035737525671720505, -0.051921866834163666, 0.00671598082408309, -0.004788446240127087, -0.03914109990000725, 0.010966106317937374, -0.011157123371958733, -0.002216230146586895, 0.02636033296585083, -0.007875106297433376, 0.07564269006252289, -0.0039093345403671265, 0.012685258872807026, 0.03209083899855614, -0.01400501187890768, 0.05706195905804634, 0.008148607797920704, -0.013275674544274807, 0.005248623434454203, 0.0073801982216537, 0.0528595857322216, -0.007757890969514847, -0.0450105294585228, 0.02530105598270893, -0.0027827690355479717, -0.07105828821659088, 0.05598531663417816, 0.03938421234488487, 0.04025246948003769, 0.011912508867681026, -0.06800201535224915, -0.04139857366681099, 0.021914847195148468, 0.005200869403779507, -0.01685290038585663, -0.009446654468774796, 0.05338054150342941, 0.0004854108556173742, -0.00260911718942225, 0.04212791100144386, -0.00994156114757061, 0.07793489843606949, -0.06904392689466476, 0.014656205661594868, -0.012511607259511948, -0.00918617658317089, 0.01744331605732441, -0.0451841801404953, 0.01774720661342144, 0.033514782786369324, -0.006507598329335451, -0.0515398345887661, -0.008608784526586533, 0.017182838171720505, -0.0000065755330069805495, -0.01993521861732006, -0.04428119212388992, -0.010662215761840343, 0.012285859324038029, 0.0041155461221933365, 0.02630823664367199, 0.033549513667821884, -0.0025201207026839256, -0.030996832996606827, 0.0008145351312123239, 0.005999667104333639, -0.04848356172442436, 0.042232099920511246, -0.004497579764574766, -0.025057943537831306, -0.040669236332178116, -0.01428285427391529, 0.03601536899805069, -0.02194957807660103, 0.060465533286333084, -0.005022876430302858, 0.05907631665468216, -0.06814093887805939, -0.00886492058634758, -0.02300885319709778, 0.0338447205722332, -0.0036553689278662205, 0.03823811188340187, 0.010002339258790016, -0.0215328149497509, 0.04188479855656624, 0.011269996874034405, -0.01693972572684288, 0.04362131282687187, 0.023998668417334557, -0.0006007264601066709, 0.02802738919854164, -0.011938556097447872, 0.04372550547122955, 0.008556689135730267, 0.011582570150494576, -0.011973286978900433, -0.010835868306457996, -0.02370346151292324, -0.02045617438852787, 0.007262983359396458, -0.02899983897805214, -0.022453168407082558, -0.04136384278535843, 0.01589781604707241, 0.038481224328279495, 0.06761997938156128, 0.022453168407082558, -0.00349691160954535, 0.003151778830215335, -0.01132209226489067, 0.04250994324684143, -0.05015061795711517, -0.015871768817305565, -0.00484054209664464, -0.0611601397395134, -0.01878911629319191, 0.02412022463977337, -0.027541164308786392, 0.046469204127788544, -0.03601536899805069, -0.011738857254385948, 0.030979467555880547, 0.05098414793610573, 0.02901720441877842, 0.053519461303949356, -0.04445484280586243, -0.04129438102245331, -0.04723326861858368, 0.07557323575019836, 0.052512284368276596, -0.028253136202692986, 0.03186509385704994, -0.0020447492133826017, 0.020074140280485153, 0.008396061137318611, -0.021237606182694435, -0.05119252949953079, 0.024398067966103554, 0.04796260595321655, 0.027610624209046364, -0.0717528909444809, -0.04459376260638237, 0.03368843346834183, -0.02311304584145546, 0.07612891495227814, -0.006012691184878349, -0.04025246948003769, 0.038377031683921814, 0.007458341773599386, 0.020317252725362778, -0.001492319512180984, -0.021324431523680687, -0.0338447205722332, 0.03730039298534393, -0.007484389469027519, 0.026516618207097054, -0.0030823182314634323, -0.02571782097220421, -0.04237102344632149, 0.011756221763789654, 0.00968108419328928, 0.06275773793458939, 0.0023681754246354103, 0.00212180707603693, 0.008031392470002174, -0.04570513591170311, 0.037369851022958755, -0.035841718316078186, 0.006685591768473387, -0.019136421382427216, 0.02898247353732586, 0.006594424601644278, -0.02627350576221943, -0.0018602440832182765, -0.045948248356580734, 0.015437638387084007, -0.002930372953414917, 0.030996832996606827, -0.008261481299996376, 0.022783106192946434, -0.009568210691213608, 0.025370517745614052, -0.0005909585161134601, -0.06581400334835052, -0.0763373002409935, 0.013154118321835995, 0.03504291921854019, 0.06939122825860977, -0.05279012396931648, 0.015107700601220131, 0.02948606386780739, 0.027020208537578583, 0.028305232524871826, -0.010992154479026794, -0.0345914252102375, -0.02688128687441349, 0.04160695523023605, 0.0006908082868903875, -0.024363337084650993, -0.013579565100371838, 0.058346979320049286, -0.008040075190365314, 0.04834464192390442, -0.013518786989152431, -0.02146335318684578, -0.04466322436928749, -0.08543664962053299, -0.021307067945599556, 0.08015763759613037, 0.038342300802469254, -0.030371686443686485, -0.04688596725463867, 0.0003863750898744911, 0.008600101806223392, -0.01832025684416294, 0.0066378372721374035, -0.04448957368731499, 0.017590919509530067, 0.0015237939078360796, 0.012051429599523544, -0.031413596123456955, -0.00670729810371995, -0.028687264770269394, 0.05015061795711517, 0.014196028932929039, 0.0345914252102375, -0.03615428879857063, 0.0345914252102375, 0.012737354263663292, 0.012172985821962357, 0.02156754396855831, -0.014300219714641571, 0.04664285480976105, -0.008278845809400082, 0.014369680546224117, -0.00997629202902317, -0.02530105598270893, -0.012746036984026432, -0.017886128276586533, -0.08557557314634323, 0.0214459877461195, -0.048136260360479355, -0.06359126418828964, -0.04254467412829399, -0.08231092244386673, -0.020074140280485153, -0.046573393046855927, -0.041745875030756, -0.021689100190997124, -0.006273168604820967, -0.0017473704647272825, -0.0296076200902462, -0.03976624459028244, -0.0549781359732151, 0.04452430456876755, 0.03368843346834183, -0.0461566299200058, -0.05358892306685448, -0.043239280581474304, -0.01342327892780304, -0.052338629961013794, -0.027732180431485176, 0.023807652294635773, -0.037508774548769, 0.05390149727463722, 0.022279515862464905, -0.012989149428904057, -0.032577063888311386, -0.04789314791560173, -0.05063684284687042, 0.07529538869857788, -0.021914847195148468, -0.0014716984005644917, -0.021359162405133247, 0.007705795578658581, 0.011469696648418903, -0.059319429099559784, -0.04837937280535698, 0.0029477381613105536, 0.004332610405981541, 0.08064386248588562, 0.005869428627192974, 0.021758561953902245, -0.012763402424752712, 0.014421775937080383, 0.0031951917335391045, 0.05063684284687042, 0.0536583848297596, 0.011339457705616951, 0.03224712610244751, 0.017686428502202034, -0.06685591489076614, 0.012459511868655682, 0.0010706714820116758, 0.026533983647823334, 0.006763734854757786, -0.019466359168291092, -0.03875906392931938, -0.041641686111688614, -0.019692106172442436, 0.01074035931378603, 0.006967775523662567, 0.03601536899805069, 0.050810497254133224, 0.0031951917335391045, -0.011712809093296528, -0.02636033296585083, 0.00888228602707386, 0.004430289845913649, 0.009229589253664017, 0.00670295674353838, -0.008057440631091595, 0.00005246860018814914, 0.050845224410295486, -0.04667758569121361, -0.0569230355322361, 0.017017869278788567, 0.027732180431485176, -0.02580464631319046, -0.0014423946850001812, -0.04410753771662712, 0.06404275447130203, -0.042197369039058685, -0.051400911062955856, -0.013466691598296165, 0.0528595857322216, 0.04143330082297325, 0.015515781939029694, -0.0155765600502491, 0.02262682095170021, 0.04580932483077049, -0.002498414134606719, 0.005717483349144459, 0.06616131216287613, 0.07293372601270676, -0.06841877847909927, 0.041745875030756, 0.005765237379819155, -0.005461346823722124, -0.03276808187365532, -0.015654703602194786, 0.07376725226640701, 0.03719620034098625, -0.008491569198668003, -0.0037356826942414045, 0.0442117303609848, -0.011009519919753075, 0.03928001970052719, -0.0007537570199929178, 0.019136421382427216, 0.04299616813659668, -0.017834031954407692, -0.0034317923709750175, 0.018615465611219406, 0.041745875030756, 0.022852567955851555, -0.007024212274700403, 0.0557769350707531, -0.032004013657569885, 0.05820805951952934, 0.012424780987203121, -0.0007439891342073679, -0.04129438102245331, 0.016279850155115128, -0.026256142184138298, 0.05417934060096741, 0.07390617579221725, -0.0706067904829979, -0.01602805405855179, 0.03544231876730919, -0.02198430895805359, 0.04233629256486893, -0.07300318777561188, 0.016210388392210007, 0.018511274829506874, -0.03757823258638382, -0.01991785317659378, -0.0125984326004982, -0.03188245743513107, 0.024363337084650993, 0.005309401545673609, -0.007440976332873106, 0.016809487715363503, 0.05799967795610428, -0.08647856116294861, 0.004892637487500906, -0.019622644409537315, 0.06279246509075165, -0.029868097975850105, -0.04560094326734543, -0.08300552517175674, -0.00779696274548769, -0.024832196533679962, -0.01450860220938921, 0.0062340968288481236, -0.027558529749512672, -0.003384038107469678, -0.03530339524149895, -0.044941067695617676, -0.07467024028301239, -0.06723795086145401, 0.06501520425081253, 0.013023879379034042, 0.02471064031124115, -0.019049594178795815, 0.005374521017074585, 0.022435802966356277, 0.007940225303173065, -0.06195893511176109, -0.024988483637571335, 0.07369779050350189, -0.05174821615219116, 0.04393388703465462, 0.04619136080145836, -0.03283754363656044, 0.02962498553097248, 0.01582835428416729, 0.003993989899754524, -0.037508774548769, -0.016531644389033318, -0.037994999438524246, -0.027749545872211456, -0.01988312229514122, 0.013023879379034042, 0.04372550547122955, 0.019136421382427216, -0.03976624459028244, 0.044906336814165115, 0.01616697572171688, -0.02479746751487255, 0.030910007655620575, 0.016731344163417816, -0.005834698211401701, -0.027124399319291115, 0.03657105565071106, 0.023547174409031868, -0.028166310861706734, -0.03813391923904419, -0.03938421234488487, -0.0071284035220742226, 0.02583937719464302, 0.02359927073121071, -0.006481550633907318, -0.011374188587069511, 0.03332376480102539, -0.016253801062703133, 0.0442117303609848, 0.017330441623926163, 0.0033992326352745295, 0.013058610260486603, 0.005743531044572592, -0.017148107290267944, -0.02899983897805214, 0.05157456174492836, 0.03695308789610863, 0.008356989361345768, 0.015871768817305565, -0.057791296392679214, -0.013501421548426151, 0.04178060591220856, 0.01562865637242794, -0.031396232545375824, -0.02575255185365677, -0.025544168427586555, -0.03921056166291237, 0.011261314153671265, 0.06956487894058228, 0.0051574562676250935, 0.010314912535250187, 0.006959092803299427, 0.0035924201365560293, -0.05004642903804779, -0.05536017194390297, 0.04987277463078499, 0.05539490282535553, 0.0011840877123177052, -0.039800975471735, 0.05654100328683853, -0.01559392549097538, -0.06352180242538452, -0.04622609168291092, -0.0007553850300610065, -0.017573554068803787, 0.025162136182188988, -0.07265588641166687, -0.0420931801199913, -0.05313742905855179, -0.053970955312252045, -0.04619136080145836, -0.052963778376579285, 0.0032950416207313538, 0.021689100190997124, 0.03830756992101669, -0.030354322865605354, -0.019084325060248375, 0.04254467412829399, 0.09481384605169296, 0.051400911062955856, -0.04139857366681099, -0.0027762569952756166, -0.03433094546198845, 0.010332277975976467, 0.0055959271267056465, 0.005378862377256155, 0.022157959640026093, -0.017356490716338158, 0.025630995631217957, 0.04153749346733093, -0.027784276753664017, -0.06067391484975815, 0.040947075933218, -0.028235770761966705, 0.018042415380477905, -0.004484555684030056, -0.05654100328683853, 0.0051835039630532265, -0.020560365170240402, -0.004080815706402063, -0.05376257374882698, 0.011999334208667278, 0.02962498553097248, 0.005882452242076397, 0.029468698427081108, 0.014881952665746212, -0.031969282776117325, -0.032490238547325134, 0.029711810871958733, 0.05272066593170166, -0.05414460971951485, -0.019205881282687187, -0.026013029739260674, 0.0363626703619957, 0.03426148742437363, 0.014126568101346493, 0.014291536994278431, -0.029798636212944984, -0.01586308516561985, -0.005022876430302858, 0.05918050929903984, -0.04337820038199425, 0.0274022426456213, 0.0034513280261307955, 0.049143437296152115, -0.01643613539636135, -0.06897446513175964, 0.031934551894664764, 0.042787786573171616, 0.019188515841960907, 0.004992487374693155, 0.005422275047749281, 0.0893959105014801, 0.01448255404829979, -0.028652535751461983, -0.026603445410728455, 0.0503937304019928, -0.00995892658829689, 0.009498749859631062, 0.0005022333352826536, 0.02099449373781681, 0.016123563051223755, 0.007931542582809925, -0.020629825070500374, 0.0075538503006100655, 0.019084325060248375, 0.02583937719464302, 0.01602805405855179, 0.07751812785863876, 0.01819870062172413, -0.022835202515125275, -0.017938222736120224, -0.0015075140399858356, -0.04070396348834038, -0.0003687386051751673, -0.009915513917803764, 0.07223911583423615, -0.02524896152317524, -0.03497345745563507, 0.01983102783560753, 0.07612891495227814, 0.045982979238033295 ]
4,731
optbinning.binning.multiclass_binning
fit_transform
Fit the optimal binning according to the given training data, then transform it. Parameters ---------- x : array-like, shape = (n_samples,) Training vector, where n_samples is the number of samples. y : array-like, shape = (n_samples,) Target vector relative to x. metric : str, optional (default="mean_woe") The metric used to transform the input vector. Supported metrics are "mean_woe" to choose the mean of Weight of Evidence (WoE), "weighted_mean_woe" to choose weighted mean of WoE using the number of records per class as weights, "indices" to assign the corresponding indices of the bins and "bins" to assign the corresponding bin interval. metric_special : float or str (default=0) The metric value to transform special codes in the input vector. Supported metrics are "empirical" to use the empirical mean WoE or weighted mean WoE, and any numerical value. metric_missing : float or str (default=0) The metric value to transform missing values in the input vector. Supported metrics are "empirical" to use the empirical mean WoE or weighted mean WoE, and any numerical value. show_digits : int, optional (default=2) The number of significant digits of the bin column. Applies when ``metric="bins"``. check_input : bool (default=False) Whether to check input arrays. Returns ------- x_new : numpy array, shape = (n_samples,) Transformed array.
def fit_transform(self, x, y, metric="mean_woe", metric_special=0, metric_missing=0, show_digits=2, check_input=False): """Fit the optimal binning according to the given training data, then transform it. Parameters ---------- x : array-like, shape = (n_samples,) Training vector, where n_samples is the number of samples. y : array-like, shape = (n_samples,) Target vector relative to x. metric : str, optional (default="mean_woe") The metric used to transform the input vector. Supported metrics are "mean_woe" to choose the mean of Weight of Evidence (WoE), "weighted_mean_woe" to choose weighted mean of WoE using the number of records per class as weights, "indices" to assign the corresponding indices of the bins and "bins" to assign the corresponding bin interval. metric_special : float or str (default=0) The metric value to transform special codes in the input vector. Supported metrics are "empirical" to use the empirical mean WoE or weighted mean WoE, and any numerical value. metric_missing : float or str (default=0) The metric value to transform missing values in the input vector. Supported metrics are "empirical" to use the empirical mean WoE or weighted mean WoE, and any numerical value. show_digits : int, optional (default=2) The number of significant digits of the bin column. Applies when ``metric="bins"``. check_input : bool (default=False) Whether to check input arrays. Returns ------- x_new : numpy array, shape = (n_samples,) Transformed array. """ return self.fit(x, y, check_input).transform( x, metric, metric_special, metric_missing, show_digits, check_input)
(self, x, y, metric='mean_woe', metric_special=0, metric_missing=0, show_digits=2, check_input=False)
[ 0.010697808116674423, -0.010770893655717373, 0.034002769738435745, 0.017138419672846794, -0.015411787666380405, -0.06603224575519562, -0.03153615444898605, 0.0067283823154866695, 0.00132123869843781, 0.011520014144480228, -0.019477136433124542, -0.01817987859249115, 0.031243812292814255, -0.029124349355697632, -0.03509904444217682, 0.039685122668743134, -0.025561459362506866, -0.019075170159339905, 0.016754722222685814, 0.041073739528656006, 0.012954305857419968, -0.047907181084156036, 0.019221339374780655, 0.04443564638495445, -0.0012709927977994084, 0.018645795062184334, -0.05006318539381027, -0.003773010103031993, -0.02254670485854149, -0.028813738375902176, -0.03654247149825096, -0.06530139595270157, 0.0574813075363636, -0.05594652518630028, 0.04940542206168175, -0.0724271759390831, 0.009007719345390797, 0.012945170514285564, 0.019312696531414986, -0.002114895498380065, -0.0011607944034039974, -0.05671391636133194, -0.006257898174226284, 0.06237799674272537, 0.039867836982011795, 0.04823606088757515, -0.019842561334371567, 0.10027254372835159, -0.015018955804407597, -0.006705543491989374, -0.04776100814342499, -0.056933172047138214, 0.06252416968345642, 0.03234008699655533, 0.005390014499425888, 0.042681604623794556, 0.008103293366730213, 0.031773678958415985, 0.053205836564302444, -0.022126466035842896, 0.013904410414397717, 0.029544588178396225, -0.011419522576034069, -0.013383680023252964, 0.020683038979768753, 0.003526348387822509, -0.052621159702539444, 0.0096746189519763, -0.01190370973199606, 0.08792118728160858, 0.025561459362506866, -0.00465231342241168, 0.025817256420850754, 0.0369444377720356, -0.051451798528432846, 0.03692616894841194, -0.033856600522994995, 0.004666016902774572, -0.020244529470801353, 0.013109611347317696, 0.08463236689567566, 0.03699925169348717, 0.004471885040402412, -0.030622590333223343, -0.051013290882110596, -0.0246296264231205, 0.0115839634090662, 0.02176104113459587, -0.003190614515915513, -0.02146870270371437, -0.006751221604645252, 0.005974694155156612, 0.05126908794045448, 0.04114682227373123, 0.019787747412919998, -0.0032636993564665318, -0.056348491460084915, 0.047578297555446625, -0.0222909078001976, -0.037255048751831055, -0.004741385579109192, 0.05002664402127266, 0.0034053015988320112, 0.09040607511997223, 0.02744339592754841, 0.00690652709454298, 0.002345569897443056, -0.026639461517333984, -0.047285959124565125, 0.020372427999973297, -0.04085448384284973, 0.00986646767705679, -0.07805471867322922, -0.017412487417459488, -0.04502032324671745, -0.0006080895545892417, 0.0065273987129330635, 0.01923961192369461, -0.036615557968616486, 0.029599402099847794, 0.03241317346692085, -0.022564975544810295, 0.0006646161782555282, -0.07133090496063232, -0.021048463881015778, -0.037638746201992035, 0.05791981518268585, 0.02603651024401188, 0.03067740425467491, -0.0014046012656763196, -0.04403367638587952, -0.03877156227827072, -0.03910044580698013, 0.058541037142276764, -0.013319730758666992, -0.056019607931375504, 0.021413888782262802, 0.034532636404037476, -0.0218523982912302, -0.002462049014866352, 0.06150097772479057, 0.021066734567284584, 0.05371743440628052, 0.009848196059465408, 0.052913498133420944, 0.010113128460943699, 0.02970902994275093, 0.03237662836909294, 0.008541802875697613, -0.02515949122607708, -0.030860116705298424, -0.00824032723903656, 0.025798983871936798, -0.0612817257642746, 0.008825006894767284, 0.03573853522539139, 0.0055864304304122925, -0.01337454468011856, 0.0078018177300691605, 0.01681867241859436, 0.02806461788713932, 0.0042343586683273315, -0.02636539377272129, 0.06424166262149811, -0.008802168071269989, 0.0721348375082016, 0.000582966604270041, 0.0480898916721344, 0.03135344013571739, -0.02026280015707016, -0.03425856679677963, -0.05700625479221344, -0.05002664402127266, 0.02768092229962349, 0.06573990732431412, 0.06234145537018776, 0.017869267612695694, -0.03358253091573715, 0.012113829143345356, 0.09712988883256912, -0.007664783392101526, 0.0011185421608388424, 0.01784186251461506, -0.07527749240398407, -0.0721348375082016, -0.039575494825839996, 0.009775111451745033, 0.03572026640176773, -0.042973946779966354, -0.03741949051618576, 0.041950758546590805, -0.00834081880748272, 0.0006452029920183122, -0.01398663129657507, -0.03201120346784592, 0.028832009062170982, -0.06354735791683197, 0.021980296820402145, 0.0039214640855789185, -0.012205185368657112, -0.01856357604265213, -0.0244834553450346, 0.06983266025781631, 0.006984179839491844, -0.022126466035842896, -0.004933233838528395, -0.017576929181814194, 0.03329019248485565, -0.02046378329396248, -0.04929579421877861, 0.10436529666185379, -0.008984880521893501, -0.08075886219739914, 0.013118747621774673, 0.03464226424694061, 0.017028791829943657, 0.008825006894767284, -0.01768655702471733, -0.01958676427602768, 0.014461683109402657, 0.01454390399158001, -0.024757524952292442, 0.001953880302608013, 0.029654216021299362, 0.058723751455545425, 0.01997045986354351, 0.08689799904823303, -0.07041734457015991, 0.07198867201805115, -0.05269424244761467, 0.0016512628644704819, -0.02287558652460575, -0.029745571315288544, 0.03160923719406128, 0.01046941801905632, -0.014077987521886826, 0.031097643077373505, -0.013328866101801395, -0.036140505224466324, 0.01609695889055729, 0.011775811202824116, -0.01624312810599804, -0.04041597247123718, -0.01739421673119068, -0.023624707013368607, 0.011666184291243553, 0.0309332013130188, 0.01982429064810276, 0.009126482531428337, -0.003903192700818181, -0.022163009271025658, 0.012588880956172943, -0.026602918282151222, -0.038661934435367584, 0.009281788021326065, -0.038077253848314285, -0.05850449576973915, -0.053936686366796494, -0.014781429432332516, 0.01823469251394272, 0.022473620250821114, 0.011647912673652172, -0.01860925368964672, 0.021706227213144302, -0.05459445342421532, -0.021870668977499008, -0.0475052110850811, 0.024739252403378487, 0.06793245673179626, 0.03544619679450989, -0.09946860373020172, -0.0186183899641037, -0.016179179772734642, 0.02815597504377365, -0.021980296820402145, 0.057225510478019714, 0.025068135932087898, 0.010579045861959457, 0.05444828048348427, -0.010725215077400208, -0.003699925262480974, 0.007180595770478249, 0.002948520705103874, -0.023040028288960457, -0.028082888573408127, -0.0321025624871254, -0.016855215653777122, 0.050538238137960434, -0.015959924086928368, -0.05682354420423508, -0.06091630086302757, 0.010460282675921917, 0.035994336009025574, -0.0004950363072566688, -0.029215706512331963, -0.005540752317756414, -0.034441277384757996, -0.05178068205714226, 0.06113555282354355, -0.037401217967271805, -0.001529074041172862, 0.040891025215387344, -0.0507209487259388, -0.015740670263767242, 0.009089939296245575, 0.01837172731757164, 0.043850965797901154, -0.0653744786977768, -0.002101192018017173, -0.0015941653400659561, 0.02941668964922428, 0.02642020583152771, 0.023880504071712494, -0.0451664961874485, -0.016608553007245064, -0.0469205342233181, 0.07074622809886932, 0.05696971341967583, 0.014735751785337925, 0.038077253848314285, 0.00696590868756175, 0.010478553362190723, 0.020335884764790535, -0.042389266192913055, -0.01574980467557907, 0.03818688169121742, 0.039429325610399246, 0.014653530903160572, -0.013822189532220364, -0.06844405084848404, 0.05364434793591499, 0.008455013856291771, 0.05126908794045448, -0.00819008145481348, -0.08996756374835968, -0.004410219378769398, -0.007148621138185263, -0.0008124990272335708, 0.007961691357195377, -0.014260699041187763, -0.051890309900045395, 0.06522831320762634, -0.006669001188129187, -0.01287208590656519, -0.0041955322958528996, -0.02932533249258995, -0.0718424990773201, -0.0014297241577878594, 0.015283888205885887, 0.028521398082375526, -0.003222589148208499, -0.03140825405716896, 0.04407022148370743, -0.02322274073958397, 0.013886138796806335, -0.02815597504377365, 0.012835542671382427, -0.02084748074412346, 0.011501742526888847, -0.023716064170002937, -0.013612070120871067, -0.03164577856659889, -0.05477716401219368, 0.015119447372853756, 0.021779313683509827, -0.00918586365878582, 0.009035126306116581, -0.001360065070912242, 0.025068135932087898, 0.010058315470814705, 0.04761483892798424, -0.05802944302558899, -0.07527749240398407, 0.028868552297353745, 0.03953895345330238, 0.000010563057912804652, -0.03601260483264923, 0.016489790752530098, -0.017860133200883865, 0.02486715093255043, 0.06552065163850784, 0.06840750575065613, -0.05594652518630028, 0.008893524296581745, 0.04600697010755539, -0.0152473459020257, 0.028320414945483208, 0.003323080949485302, 0.010021773166954517, -0.03994091972708702, -0.012369626201689243, -0.0018020005663856864, 0.01894727163016796, -0.029654216021299362, -0.01585029624402523, -0.04154878854751587, 0.02340545319020748, 0.011063233017921448, -0.026091324165463448, -0.056640829890966415, -0.028667569160461426, 0.02073785290122032, -0.01447081845253706, -0.016307078301906586, -0.04903999716043472, -0.011437793262302876, -0.031061099842190742, -0.027954990044236183, -0.02137734554708004, 0.008043911308050156, -0.021340802311897278, 0.0483822301030159, 0.02515949122607708, -0.007961691357195377, -0.041950758546590805, 0.04019671678543091, -0.0010483121732249856, 0.00790230929851532, -0.01335627306252718, 0.023478537797927856, 0.010094857774674892, -0.01657201163470745, 0.010094857774674892, -0.01958676427602768, 0.009053396992385387, -0.0674574002623558, -0.016763858497142792, -0.1173013299703598, 0.012972577475011349, -0.011510878801345825, -0.015777211636304855, -0.10268434137105942, -0.0639127790927887, -0.03217564523220062, -0.02486715093255043, -0.019330967217683792, -0.011017555370926857, 0.0025214306078851223, -0.00070287159178406, 0.031042829155921936, -0.03257761150598526, -0.06044124811887741, 0.06120863929390907, 0.013109611347317696, -0.03566545248031616, -0.02753475122153759, -0.0612817257642746, 0.027023157104849815, -0.09084458649158478, -0.010725215077400208, 0.09895700961351395, 0.009957822971045971, 0.0236064363270998, -0.023935317993164062, 0.02026280015707016, -0.02724241279065609, 0.011483471840620041, -0.05905263498425484, 0.04202384129166603, 0.027735736221075058, -0.003878069808706641, -0.021048463881015778, -0.004691139794886112, -0.0016466950764879584, -0.024501727893948555, -0.01146520022302866, -0.021980296820402145, -0.006468017585575581, 0.06409549713134766, 0.02389877662062645, 0.023149656131863594, -0.04227963835000992, 0.05236536264419556, -0.018801100552082062, 0.05316929519176483, 0.0630723088979721, -0.03745603188872337, 0.004133867099881172, 0.060075823217630386, -0.020518597215414047, 0.0055361841805279255, -0.009592399001121521, 0.06731123477220535, -0.007157756481319666, -0.008491557091474533, 0.021066734567284584, -0.010103993117809296, -0.07136745005846024, 0.007993665523827076, 0.07187904417514801, 0.02952631749212742, 0.10801954567432404, 0.030110996216535568, -0.008614887483417988, -0.05094020441174507, 0.030366793274879456, 0.018161607906222343, 0.0071623241528868675, -0.007477503269910812, 0.0026287739165127277, 0.03931969776749611, -0.025177761912345886, -0.04140261933207512, -0.04659165069460869, 0.02073785290122032, -0.012378762476146221, -0.052182648330926895, -0.0035126451402902603, -0.04527612030506134, 0.011976795271039009, -0.052328817546367645, -0.03546446934342384, 0.05517913028597832, 0.015969060361385345, 0.0049789114855229855, -0.03296130895614624, -0.03491633012890816, 0.03654247149825096, 0.029928283765912056, -0.027260683476924896, 0.011063233017921448, -0.007468367461115122, 0.04308357462286949, -0.050099726766347885, 0.0486745722591877, 0.0038369593676179647, -0.060952842235565186, -0.018042845651507378, 0.00785206351429224, 0.025524916127324104, 0.009003151208162308, -0.008286005817353725, 0.029873469844460487, 0.018061116337776184, 0.023569893091917038, 0.030750488862395287, -0.009290923364460468, -0.041366077959537506, 0.016398433595895767, -0.0126802371814847, -0.03825996816158295, 0.007582562975585461, -0.011529149487614632, 0.005266683641821146, 0.035354841500520706, 0.08470544964075089, -0.007121214177459478, 0.024921964854002, 0.002054372103884816, -0.009765975177288055, -0.06515522301197052, -0.006463449448347092, 0.02689525857567787, 0.09457191824913025, 0.035555824637413025, -0.04023326188325882, 0.0011642202734947205, 0.07114819437265396, -0.04290086030960083, 0.02451999858021736, -0.062268372625112534, 0.03579334914684296, 0.038369596004486084, -0.014964141882956028, 0.01247925404459238, 0.02336890995502472, -0.01425156369805336, 0.029215706512331963, 0.0021685673855245113, -0.03456917777657509, 0.04436255991458893, 0.03506249934434891, -0.03471534699201584, -0.014936734922230244, -0.04173150286078453, 0.07988183945417404, -0.017129283398389816, -0.04242580756545067, -0.046847447752952576, -0.025762442499399185, -0.04443564638495445, -0.011419522576034069, -0.029508044943213463, -0.009053396992385387, 0.025488372892141342, -0.05163451284170151, 0.0018739436054602265, -0.006522831041365862, -0.037784915417432785, 0.020664768293499947, -0.0025511211715638638, 0.03111591376364231, -0.011163724586367607, 0.012424440123140812, 0.03994091972708702, -0.04140261933207512, -0.039831291884183884, -0.015987331047654152, 0.07114819437265396, -0.06435129046440125, 0.05298658460378647, 0.010697808116674423, 0.030604319646954536, 0.00872908253222704, 0.019111713394522667, 0.009491906501352787, -0.0654110237956047, -0.03531830012798309, -0.027644379064440727, -0.01134643703699112, -0.031335167586803436, 0.017997168004512787, 0.04012363404035568, -0.024264201521873474, 0.004163557663559914, 0.03539138287305832, -0.025798983871936798, -0.06102592870593071, 0.018216421827673912, -0.020427241921424866, 0.028009803965687752, -0.0357750803232193, -0.01962330751121044, 0.01982429064810276, -0.03338154777884483, -0.02113981917500496, 0.027954990044236183, 0.020335884764790535, 0.001136813429184258, -0.005010886583477259, -0.048638030886650085, -0.03338154777884483, 0.05583689734339714, -0.012515796348452568, 0.04257198050618172, 0.031572695821523666, -0.02466616779565811, 0.049259252846241, -0.004928665701299906, -0.006413203664124012, 0.029508044943213463, 0.05357126146554947, 0.08390151709318161, -0.013767375610768795, 0.0060158041305840015, -0.055727269500494, 0.011099775321781635, 0.02442864142358303, -0.00523470900952816, -0.01973293535411358, 0.0041955322958528996, 0.031572695821523666, -0.04147570580244064, 0.007600834127515554, 0.06603224575519562, 0.023040028288960457, 0.026931801810860634, 0.01619745045900345, 0.03193812072277069, -0.0287406537681818, -0.03804071247577667, 0.06424166262149811, 0.041073739528656006, -0.02176104113459587, -0.023058298975229263, 0.022564975544810295, -0.0070892395451664925, -0.02486715093255043, -0.04542229324579239, -0.026785630732774734, 0.025853797793388367, -0.010268434882164001, -0.04081793874502182, -0.027352040633559227, -0.030750488862395287, -0.03149960935115814, -0.00875192228704691, -0.014662666246294975, -0.04173150286078453, 0.0018762275576591492, 0.03369215875864029, -0.014096258208155632, -0.0035514715127646923, 0.031061099842190742, 0.056348491460084915, 0.0060112364590168, -0.02578071318566799, -0.030165810137987137, -0.055288758128881454, 0.002386680105701089, 0.052474990487098694, -0.017659150063991547, -0.009601534344255924, -0.021450430154800415, 0.025616273283958435, 0.04348554089665413, -0.03670691326260567, -0.04798026382923126, 0.017531249672174454, -0.02384396269917488, 0.038223426789045334, -0.001832833280786872, -0.012725915759801865, 0.002541985595598817, 0.02099364995956421, -0.0328516811132431, -0.05269424244761467, -0.030220624059438705, 0.05565418303012848, -0.025506645441055298, 0.03847922384738922, 0.025524916127324104, -0.013210102915763855, -0.006079753860831261, 0.021194633096456528, 0.012826407328248024, -0.09303712844848633, 0.03266897052526474, 0.025945154950022697, 0.01944059506058693, 0.045933887362480164, -0.06296268105506897, 0.0159051101654768, -0.02563454397022724, -0.017704827710986137, 0.030403336510062218, 0.05192685127258301, -0.020482055842876434, -0.00197557732462883, -0.03844267874956131, 0.043120115995407104, -0.004914962220937014, -0.026310579851269722, 0.08572863787412643, 0.03736467659473419, 0.052474990487098694, -0.026931801810860634, -0.02715105563402176, 0.037638746201992035, 0.0009443945018574595, -0.0034121533390134573, 0.019513679668307304, 0.04798026382923126, -0.016498925164341927, -0.028484856709837914, 0.029453231021761894, 0.031097643077373505, 0.004385096486657858, -0.0013771944213658571, -0.016023874282836914, -0.020609954372048378, 0.019513679668307304, 0.002594515448436141, 0.010734351351857185, 0.0765199363231659, 0.05868721008300781, -0.0010032050777226686, 0.049843929708004, 0.011090639978647232, -0.003398449858650565, -0.008496124297380447, 0.009163024835288525, -0.003919180016964674, 0.005166192073374987, 0.00032802578061819077, 0.02976384200155735, 0.09917626529932022, 0.07483898103237152 ]
4,735
optbinning.binning.multiclass_binning
read_json
Read json file containing split points and set them as the new split points. Parameters ---------- path: The path of the json file.
def read_json(self, path): """ Read json file containing split points and set them as the new split points. Parameters ---------- path: The path of the json file. """ if path is None: raise ValueError('Specify the path for the json file.') self._is_fitted = True with open(path, "r") as read_file: multi_table_attr = json.load(read_file) for key in multi_table_attr.keys(): if isinstance(multi_table_attr[key], list): multi_table_attr[key] = np.array(multi_table_attr[key]) self._binning_table = MulticlassBinningTable(**multi_table_attr)
(self, path)
[ 0.015165099874138832, -0.02497035637497902, -0.04497923329472542, 0.01157979853451252, -0.051823899149894714, 0.00657757930457592, -0.012765845283865929, 0.03277472406625748, 0.013091782107949257, 0.023847686126828194, -0.009094533510506153, 0.022326648235321045, -0.047586727887392044, -0.004189641680568457, -0.045305170118808746, -0.02888159453868866, 0.06982284039258957, 0.019664835184812546, -0.04617433622479439, 0.0008929301402531564, -0.027088943868875504, -0.04642784222960472, 0.012793007306754589, 0.09828795492649078, 0.03856914862990379, -0.048202384263277054, 0.030239662155508995, 0.003465338610112667, 0.11002167314291, -0.016115747392177582, -0.06265223771333694, -0.01857837848365307, -0.04454465210437775, 0.04476194456219673, -0.001283374847844243, -0.09625990688800812, 0.01924836076796055, 0.016179123893380165, -0.0738789364695549, 0.0520411916077137, -0.01267530769109726, -0.026093026623129845, -0.05533676967024803, 0.03451305255293846, 0.009895794093608856, 0.02049778401851654, -0.01725652627646923, 0.027903784066438675, -0.013779870234429836, -0.034621696919202805, -0.07568969577550888, -0.07224925607442856, 0.0033001068513840437, 0.08068738877773285, -0.0475505106151104, 0.01482105627655983, 0.014006215147674084, 0.03163394704461098, -0.01245801616460085, 0.006573052145540714, -0.03049316816031933, -0.0225982628762722, -0.009189598262310028, -0.04302361607551575, 0.01857837848365307, -0.050592586398124695, -0.06348518282175064, 0.02216367982327938, 0.0074014742858707905, -0.0018526320345699787, -0.01797177456319332, 0.03509249538183212, 0.05591621249914169, 0.060696616768836975, -0.04628298059105873, 0.06363004446029663, -0.04816616699099541, -0.004393352195620537, 0.006862773559987545, 0.04356684163212776, -0.012213564477860928, -0.01343582570552826, 0.04150258004665375, -0.03744648024439812, -0.07004012912511826, 0.02116776444017887, 0.08220842480659485, 0.010348482988774776, -0.019900232553482056, 0.040814489126205444, -0.02806675247848034, 0.06424570083618164, -0.042299311608076096, -0.0112991314381361, 0.04751429706811905, -0.016378307715058327, 0.012313155457377434, -0.01176992803812027, -0.045015450567007065, -0.016333039849996567, -0.02803053706884384, -0.0305474903434515, 0.01108183991163969, 0.03889508545398712, -0.008478875271975994, -0.02143937721848488, 0.018849993124604225, 0.013834192417562008, -0.05077366158366203, 0.0009031156660057604, -0.05808912217617035, 0.07246654480695724, 0.02969643473625183, 0.013553525321185589, 0.03715675696730614, 0.018189067021012306, -0.00022775943216402084, -0.028718626126646996, 0.005681253969669342, 0.04972342029213905, 0.006464406847953796, 0.04454465210437775, 0.015934672206640244, 0.07253897190093994, -0.012630038894712925, 0.01141683105379343, 0.038243215531110764, 0.036106519401073456, 0.032140959054231644, -0.02207314223051071, 0.03601597994565964, -0.038243215531110764, -0.0065323105081915855, -0.004707971587777138, -0.014060537330806255, -0.03253932669758797, -0.03947452828288078, 0.01687626726925373, 0.017383279278874397, 0.00039864974678494036, 0.08329487591981888, -0.008999468758702278, 0.027849461883306503, -0.09379727393388748, 0.015635896474123, 0.02149369940161705, -0.017953667789697647, 0.0004204354190733284, -0.05341736599802971, -0.007261140272021294, -0.0407058447599411, 0.014522280544042587, -0.03402414545416832, -0.04012640193104744, 0.028229720890522003, -0.05200497433543205, -0.0275054182857275, -0.03449494391679764, 0.04179229959845543, 0.001401074230670929, -0.0007231715717352927, 0.006604740396142006, 0.02239907905459404, 0.001867344370111823, -0.07583455741405487, 0.04707971215248108, -0.04432735964655876, -0.06457164138555527, -0.058740995824337006, -0.024753065779805183, 0.048818040639162064, 0.0014995341189205647, -0.0350743867456913, 0.04751429706811905, 0.03083721175789833, -0.014151075854897499, 0.025948164984583855, 0.018406357616186142, 0.07431351393461227, 0.05131688714027405, 0.0019024278735741973, -0.009606072679162025, 0.027614062651991844, -0.0225982628762722, 0.0038795494474470615, 0.010964141227304935, 0.007464850787073374, 0.0024988462682813406, 0.035237353295087814, 0.06250737607479095, 0.020896149799227715, 0.007206817623227835, 0.00010602838301565498, 0.004834724590182304, 0.05671294778585434, 0.0003672444145195186, 0.032666079699993134, 0.006573052145540714, -0.07474809885025024, 0.04052476957440376, -0.03512870892882347, -0.051787685602903366, 0.023757148534059525, -0.010973194614052773, -0.03212285041809082, 0.0043412926606833935, -0.0027274545282125473, 0.02554979920387268, 0.02459009736776352, -0.003030756488442421, -0.00903115700930357, -0.05808912217617035, 0.03561761602759361, 0.03547275438904762, 0.0844537615776062, -0.012512339279055595, -0.054250314831733704, -0.00012257984781172127, -0.01071968860924244, -0.006066040135920048, 0.07735559344291687, -0.005817060824483633, 0.030185339972376823, 0.019411327317357063, -0.03492952510714531, -0.019320789724588394, 0.02344931848347187, -0.028012430295348167, -0.025984380394220352, 0.016514115035533905, 0.01052955910563469, -0.0003440440632402897, 0.01179709006100893, -0.06449920684099197, -0.031271792948246, 0.023702824488282204, 0.023648502305150032, -0.00819368101656437, -0.001488216919824481, 0.03411468490958214, 0.01032132189720869, -0.008460767567157745, -0.027052728459239006, -0.0739513635635376, -0.04045233875513077, 0.04392899572849274, 0.04566732421517372, -0.01953808031976223, -0.0057310499250888824, 0.011552637442946434, 0.05787183344364166, 0.05548163130879402, 0.013281911611557007, 0.06739642471075058, 0.002162724267691374, -0.08075981587171555, -0.012639092281460762, -0.03277472406625748, 0.0029130573384463787, 0.01070158090442419, -0.027125157415866852, -0.04718836024403572, 0.01977347955107689, 0.0648251473903656, -0.012829221785068512, -0.007428635843098164, 0.012123025953769684, 0.03932967036962509, 0.029225638136267662, -0.037048112601041794, -0.07779017090797424, 0.016468845307826996, 0.011353453621268272, -0.03230392560362816, 0.009859578683972359, 0.011960058473050594, 0.0005488860770128667, -0.019338898360729218, 0.016948696225881577, 0.03556329011917114, 0.06315924972295761, -0.030674245208501816, 0.013254750519990921, 0.004649121779948473, -0.026563823223114014, -0.02353985607624054, -0.015364283695816994, -0.020606428384780884, -0.031090719625353813, -0.05606107413768768, -0.016179123893380165, 0.021566130220890045, -0.03435008227825165, 0.03813456743955612, 0.025857627391815186, -0.004076469223946333, -0.001747381640598178, -0.03089153580367565, 0.03983668237924576, -0.025187646970152855, 0.03275661543011665, -0.040778275579214096, 0.0512806735932827, -0.007677614688873291, -0.03326362743973732, -0.07800746709108353, 0.008868188597261906, -0.011688444763422012, -0.03396982327103615, 0.03098207339644432, 0.024046869948506355, 0.019121607765555382, -0.03277472406625748, -0.02149369940161705, -0.014477011747658253, -0.007279247976839542, 0.007356205489486456, 0.02993183396756649, 0.022272326052188873, 0.016333039849996567, -0.0354546457529068, -0.009479319676756859, 0.002897213213145733, -0.006382922641932964, 0.015907511115074158, 0.024336591362953186, 0.09010332822799683, 0.014857271686196327, -0.0679396465420723, 0.04287875443696976, 0.05334493890404701, -0.01950186677277088, 0.04537760093808174, 0.000056621560361236334, 0.011000356636941433, 0.03480277210474014, -0.002410571789368987, 0.0032503108959645033, 0.018279604613780975, -0.010583882220089436, 0.014956862665712833, -0.04363927245140076, 0.028392689302563667, -0.009859578683972359, -0.02520575374364853, 0.015500090084969997, 0.012838276103138924, 0.020371029153466225, 0.03302823007106781, 0.07938364148139954, -0.06746885180473328, -0.0015583838103339076, 0.020769396796822548, 0.059211794286966324, -0.057364821434020996, -0.04331333562731743, -0.00023653029347769916, -0.04979585111141205, 0.023956330493092537, -0.04856453463435173, 0.03384307026863098, -0.03253932669758797, -0.045631106942892075, 0.01014930009841919, 0.04628298059105873, 0.00040232783067040145, 0.00711175287142396, 0.013118943199515343, 0.029986156150698662, 0.013028405606746674, 0.013490148819983006, -0.02745109423995018, -0.011751821264624596, 0.04642784222960472, 0.025079000741243362, 0.01296502910554409, -0.013644062913954258, 0.024137407541275024, -0.005835168529301882, 0.03358956426382065, -0.01950186677277088, -0.032666079699993134, 0.015690220519900322, -0.0020348394755274057, 0.027179481461644173, 0.0008284219074994326, 0.003954243380576372, -0.05283792316913605, -0.012014380656182766, -0.03885887190699577, 0.02882727049291134, -0.005133499391376972, -0.005477543454617262, 0.0010564642725512385, -0.02321392111480236, -0.01403337623924017, 0.06297817081212997, -0.0019737265538424253, 0.037808630615472794, 0.06250737607479095, -0.06134849041700363, -0.05743725225329399, -0.012639092281460762, 0.03337227553129196, -0.03313687443733215, -0.02931617572903633, 0.025748981162905693, 0.03947452828288078, -0.011742766946554184, -0.038532935082912445, 0.014658087864518166, 0.09372484683990479, 0.00230532162822783, 0.05910314992070198, -0.03889508545398712, 0.07224925607442856, -0.022507725283503532, -0.012005327269434929, -0.00898588728159666, 0.06507865339517593, 0.028628086671233177, 0.04211823642253876, -0.04534138739109039, -0.005328156054019928, -0.025748981162905693, 0.01070158090442419, -0.05070123076438904, -0.02091425657272339, 0.026618145406246185, 0.03291958570480347, -0.024246051907539368, -0.06812072545289993, -0.01868702471256256, -0.07029363512992859, -0.03664974495768547, -0.007636872585862875, -0.021475592628121376, -0.03159772977232933, 0.007736464496701956, -0.0057310499250888824, 0.01854216493666172, 0.013191374018788338, 0.0633765384554863, -0.03864157944917679, -0.028682410717010498, -0.03136233240365982, -0.015246584080159664, 0.03275661543011665, -0.015255638398230076, -0.07210439443588257, -0.004793982487171888, 0.026201670989394188, 0.059827450662851334, -0.047441866248846054, 0.024662526324391365, -0.006989526562392712, 0.004649121779948473, -0.028772948309779167, 0.08329487591981888, 0.05283792316913605, -0.022055035457015038, -0.0005013537011109293, 0.011353453621268272, -0.0015549886738881469, -0.0041647437028586864, -0.06018960475921631, -0.006758654955774546, 0.0320323146879673, -0.015853188931941986, 0.0020382346119731665, -0.015418605878949165, -0.0002670868416316807, -0.018515001982450485, -0.04812995344400406, 0.000573783996514976, 0.06283330917358398, 0.0617830716073513, -0.016378307715058327, 0.0012324473354965448, -0.0047804019413888454, 0.009044737555086613, -0.10169218480587006, -0.018333926796913147, -0.006799397058784962, 0.03693946823477745, 0.003173353848978877, -0.09213137626647949, -0.01910349912941456, -0.024771172553300858, -0.04838345944881439, -0.01245801616460085, -0.006944257766008377, 0.013979053124785423, 0.037953492254018784, 0.006926150061190128, 0.026292208582162857, 0.056024860590696335, 0.027034619823098183, 0.047297004610300064, 0.003983668051660061, 0.004753240384161472, 0.060696616768836975, -0.020805612206459045, 0.006369342096149921, -0.0007995629566721618, 0.048962902277708054, 0.01439552754163742, 0.002718400675803423, -0.09162436425685883, -0.041683655232191086, -0.01901296153664589, -0.00905379094183445, 0.010357537306845188, 0.05606107413768768, -0.004834724590182304, 0.0011996272951364517, 0.023268243297934532, 0.03976425155997276, -0.02268880046904087, 0.03255743160843849, 0.029823187738656998, -0.03445873036980629, 0.012113972567021847, -0.025803305208683014, -0.026527607813477516, 0.017944613471627235, 0.0225982628762722, -0.03864157944917679, 0.05808912217617035, 0.005269306246191263, 0.04827481508255005, 0.012322209775447845, 0.0047804019413888454, 0.04537760093808174, 0.01644168421626091, 0.03179691359400749, 0.0813392624258995, -0.016713298857212067, 0.06529594212770462, -0.009325404651463032, -0.00013814104022458196, -0.027107050642371178, 0.004857358988374472, 0.022181788459420204, 0.033100660890340805, 0.04009018838405609, -0.036667853593826294, 0.03022155538201332, 0.05142553523182869, 0.005776318721473217, 0.04135771840810776, -0.0008612418896518648, -0.01682194322347641, -0.03049316816031933, 0.06576673686504364, -0.06370247155427933, -0.0033748005516827106, -0.05667673423886299, -0.004640067927539349, 0.005617877468466759, -0.02593005821108818, 0.021982604637742043, 0.016523169353604317, 0.051208242774009705, -0.0027138739824295044, 0.006776762660592794, -0.0648975744843483, 0.11472964286804199, -0.05711131542921066, -0.04707971215248108, 0.05399680882692337, 0.07815232127904892, -0.03326362743973732, -0.020334815606474876, 0.0023856740444898605, -0.023413103073835373, -0.035291679203510284, -0.004257545340806246, -0.08539535850286484, 0.028609979897737503, -0.03503817319869995, 0.03654110059142113, -0.01322758849710226, 0.037627555429935455, -0.022525832056999207, 0.0305474903434515, -0.03141665458679199, 0.04266146197915077, 0.02882727049291134, 0.048347245901823044, -0.030764782801270485, 0.031851235777139664, 0.031905561685562134, -0.014467958360910416, -0.016758566722273827, 0.02207314223051071, -0.011380615644156933, -0.061094980686903, -0.018813777714967728, -0.04812995344400406, -0.051497962325811386, -0.0007939042989164591, -0.05012178793549538, 0.03083721175789833, -0.019121607765555382, -0.050158001482486725, 0.015228476375341415, 0.06460785120725632, -0.04255281761288643, -0.001605916186235845, 0.010493343695998192, 0.01816190406680107, 0.03465791419148445, -0.028609979897737503, -0.0009161304915323853, 0.008678059093654156, -0.009071898646652699, -0.027577847242355347, 0.03759134188294411, -0.04856453463435173, -0.008836500346660614, -0.04106799513101578, 0.03282904624938965, 0.042154449969530106, -0.04197337478399277, -0.06594781577587128, -0.00580348027870059, -0.04287875443696976, 0.000009955633686331566, -0.05884964391589165, -0.03098207339644432, -0.09618747979402542, 0.006808450911194086, -0.05986366793513298, 0.04476194456219673, -0.0049162087962031364, -0.026563823223114014, -0.02759595587849617, 0.03769998624920845, 0.03007669374346733, -0.025748981162905693, -0.045631106942892075, 0.011434937827289104, -0.02931617572903633, -0.008370229974389076, -0.02911699190735817, -0.03395171836018562, 0.03983668237924576, 0.10922493785619736, 0.02426416054368019, -0.030094802379608154, 0.03607030212879181, -0.06265223771333694, 0.017084503546357155, 0.04617433622479439, -0.04762294143438339, -0.0027478255797177553, -0.04432735964655876, 0.015988994389772415, -0.007573496084660292, -0.058451276272535324, 0.012883544899523258, 0.004563110880553722, 0.001457660342566669, -0.002824782859534025, -0.0081031434237957, -0.00045070904889144003, -0.007777206599712372, 0.025966273620724678, 0.06696183979511261, -0.0369756817817688, 0.002011073287576437, -0.031525298953056335, -0.03947452828288078, 0.0035649302881211042, -0.0022917408496141434, -0.008420025929808617, -0.03498384729027748, 0.03253932669758797, 0.017645839601755142, -0.0029085304122418165, 0.05486597493290901, 0.011244808323681355, 0.007976390421390533, 0.03835185989737511, 0.03856914862990379, -0.0003112240810878575, -0.0012120762839913368, -0.03976425155997276, 0.05294657126069069, -0.0027930946089327335, 0.006296911742538214, 0.012983136810362339, -0.01303745899349451, -0.015654005110263824, -0.017808808013796806, 0.02969643473625183, -0.02397443912923336, -0.0814841166138649, 0.0275054182857275, -0.020696965977549553, -0.01792650669813156, -0.04584839940071106, 0.023938223719596863, -0.011824251152575016, 0.04541381448507309, -0.03550896793603897, 0.01768205314874649, -0.020769396796822548, -0.064970001578331, 0.009642287157475948, 0.01596183329820633, 0.02602059580385685, -0.00905379094183445, 0.02549547515809536, 0.11842358857393265, -0.0648975744843483, 0.008936092257499695, -0.015382391400635242, -0.023340674117207527, 0.01781786046922207, -0.0068175047636032104, 0.004499734379351139, 0.06044311076402664, -0.027704600244760513, -0.0407058447599411, 0.02049778401851654, -0.02353985607624054, -0.01568116620182991, 0.00017272935656365007, -0.013906623236835003, 0.007559915538877249, -0.04986828193068504, 0.008062400855123997, -0.018189067021012306, -0.03784484788775444, 0.01968294195830822, 0.006174685433506966, 0.07246654480695724, 0.03121747262775898, -0.024463344365358353, -0.037482693791389465, 0.002264579525217414, -0.0016093113226816058, -0.047297004610300064, 0.022815553471446037, 0.000059592337493086234, 0.04056098312139511, -0.03433197736740112, 0.022272326052188873, 0.012729629874229431, 0.04309604689478874, -0.010520505718886852, 0.03536410629749298, 0.006989526562392712, -0.03998154029250145, 0.019411327317357063, 0.006364814937114716, -0.000148538762005046, -0.03911237791180611, -0.029533466324210167, 0.021982604637742043, 0.01629682444036007, -0.01093698013573885, 0.04266146197915077, 0.03947452828288078, 0.04794887825846672, 0.00011331385758239776 ]
4,736
sklearn.utils._metadata_requests
set_fit_request
Request metadata passed to the ``fit`` method. Note that this method is only relevant if ``enable_metadata_routing=True`` (see :func:`sklearn.set_config`). Please see :ref:`User Guide <metadata_routing>` on how the routing mechanism works. The options for each parameter are: - ``True``: metadata is requested, and passed to ``fit`` if provided. The request is ignored if metadata is not provided. - ``False``: metadata is not requested and the meta-estimator will not pass it to ``fit``. - ``None``: metadata is not requested, and the meta-estimator will raise an error if the user provides it. - ``str``: metadata should be passed to the meta-estimator with this given alias instead of the original name. The default (``sklearn.utils.metadata_routing.UNCHANGED``) retains the existing request. This allows you to change the request for some parameters and not others. .. versionadded:: 1.3 .. note:: This method is only relevant if this estimator is used as a sub-estimator of a meta-estimator, e.g. used inside a :class:`~sklearn.pipeline.Pipeline`. Otherwise it has no effect. Parameters ---------- check_input : str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED Metadata routing for ``check_input`` parameter in ``fit``. x : str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED Metadata routing for ``x`` parameter in ``fit``. Returns ------- self : object The updated object.
def __get__(self, instance, owner): # we would want to have a method which accepts only the expected args def func(**kw): """Updates the request for provided parameters This docstring is overwritten below. See REQUESTER_DOC for expected functionality """ if not _routing_enabled(): raise RuntimeError( "This method is only available when metadata routing is enabled." " You can enable it using" " sklearn.set_config(enable_metadata_routing=True)." ) if self.validate_keys and (set(kw) - set(self.keys)): raise TypeError( f"Unexpected args: {set(kw) - set(self.keys)}. Accepted arguments" f" are: {set(self.keys)}" ) requests = instance._get_metadata_request() method_metadata_request = getattr(requests, self.name) for prop, alias in kw.items(): if alias is not UNCHANGED: method_metadata_request.add_request(param=prop, alias=alias) instance._metadata_request = requests return instance # Now we set the relevant attributes of the function so that it seems # like a normal method to the end user, with known expected arguments. func.__name__ = f"set_{self.name}_request" params = [ inspect.Parameter( name="self", kind=inspect.Parameter.POSITIONAL_OR_KEYWORD, annotation=owner, ) ] params.extend( [ inspect.Parameter( k, inspect.Parameter.KEYWORD_ONLY, default=UNCHANGED, annotation=Optional[Union[bool, None, str]], ) for k in self.keys ] ) func.__signature__ = inspect.Signature( params, return_annotation=owner, ) doc = REQUESTER_DOC.format(method=self.name) for metadata in self.keys: doc += REQUESTER_DOC_PARAM.format(metadata=metadata, method=self.name) doc += REQUESTER_DOC_RETURN func.__doc__ = doc return func
(self: optbinning.binning.multiclass_binning.MulticlassOptimalBinning, *, check_input: Union[bool, NoneType, str] = '$UNCHANGED$', x: Union[bool, NoneType, str] = '$UNCHANGED$') -> optbinning.binning.multiclass_binning.MulticlassOptimalBinning
[ 0.04383368045091629, -0.05829270929098129, -0.019129673019051552, 0.004701561760157347, -0.002906074048951268, -0.01725570671260357, -0.011529171839356422, 0.010007168166339397, 0.05699900537729263, 0.010863294824957848, -0.02144121564924717, 0.006497049704194069, 0.05129149556159973, -0.005384084768593311, -0.01991921104490757, 0.03751736879348755, 0.029983455315232277, 0.023819344118237495, 0.030154680833220482, -0.0336933359503746, 0.019224798306822777, -0.04280633106827736, -0.02878487855195999, 0.014915627427399158, 0.00845662783831358, 0.0655222237110138, 0.03793592005968094, -0.0453176349401474, 0.08995036780834198, -0.006535099819302559, -0.025189146399497986, -0.014202188700437546, 0.014725377783179283, 0.06289676576852798, 0.028956104069948196, -0.03156253322958946, -0.01070158276706934, 0.022791992872953415, -0.06263041496276855, -0.015286616049706936, -0.03721296787261963, -0.026673099026083946, 0.04862799122929573, -0.09664718061685562, 0.059472259134054184, 0.03190498426556587, -0.005327010061591864, 0.10517039149999619, -0.019215285778045654, -0.017617182806134224, 0.01321288663893938, -0.011205745860934258, 0.015134415589272976, -0.0050749280489981174, -0.005835929419845343, 0.05737950652837753, 0.05562920495867729, 0.04406198114156723, 0.059510309249162674, 0.02802387624979019, 0.027167750522494316, 0.03475873917341232, 0.03245671093463898, -0.00842333398759365, -0.04352927953004837, -0.038715947419404984, -0.04642108455300331, -0.013869251124560833, 0.008623097091913223, 0.03167668357491493, 0.028689753264188766, -0.01791207119822502, 0.005498235113918781, 0.026711149141192436, 0.021574389189481735, -0.02638772316277027, -0.04044722393155098, -0.05243299901485443, 0.05304179713129997, -0.04170287773013115, 0.01707496866583824, -0.017236681655049324, -0.027053600177168846, -0.08104664832353592, -0.009089211001992226, -0.03213328495621681, -0.008428090251982212, -0.04923679307103157, 0.03941987454891205, 0.0029940649401396513, -0.08553656190633774, 0.05151979625225067, -0.01619981788098812, -0.0029607710894197226, 0.00950300507247448, -0.030611282214522362, 0.0018109455704689026, -0.05840685963630676, 0.002432826440781355, -0.026596998795866966, 0.0007497053011320531, 0.03590024262666702, 0.06643542647361755, 0.07571963965892792, 0.03706076741218567, -0.05056854337453842, -0.016713494434952736, -0.008656390942633152, -0.011234283447265625, -0.003809763351455331, 0.01144355908036232, -0.01094890758395195, -0.059548359364271164, 0.01904406026005745, 0.0013983401004225016, 0.0011076137889176607, -0.01969091221690178, -0.04330097883939743, -0.05087294429540634, -0.015001240186393261, -0.026787249371409416, 0.011015495285391808, -0.02536037191748619, -0.06373386830091476, 0.0007384091732092202, 0.004237826447933912, 0.009588617831468582, 0.013431674800813198, 0.04478493332862854, -0.07240928709506989, -0.03160058334469795, -0.006806206423789263, -0.03907742351293564, 0.09284216910600662, 0.04398588091135025, 0.016256893053650856, 0.04748648777604103, 0.02045191265642643, -0.011966747231781483, 0.059053707867860794, -0.0030249806586652994, 0.02010946162045002, 0.036737341433763504, -0.021346090361475945, -0.0013935838360339403, -0.05072074383497238, 0.02692042477428913, -0.0001587401347933337, 0.02574087306857109, -0.03413091227412224, 0.025950148701667786, -0.018311597406864166, 0.0027800332754850388, -0.01266116090118885, -0.0026539925020188093, 0.0019203395349904895, 0.0230393186211586, -0.004808577708899975, 0.011196233332157135, -0.018149884417653084, -0.004777661990374327, -0.0056361667811870575, -0.012156997807323933, -0.0913962721824646, 0.0352153405547142, 0.021460240706801414, -0.006097523961216211, -0.04855189099907875, -0.03827837109565735, 0.03557681664824486, -0.060918163508176804, -0.02771947719156742, -0.03375041112303734, 0.006815718952566385, 0.0354246161878109, 0.03930572420358658, 0.01710350625216961, 0.00553152896463871, 0.008551753126084805, 0.02806192636489868, 0.013812175951898098, -0.05266129598021507, -0.08546046167612076, -0.03584316745400429, 0.006344849243760109, 0.07126778364181519, 0.006359118036925793, 0.001926284865476191, -0.04368147999048233, 0.04558398574590683, 0.02939368039369583, -0.0083805276080966, 0.05365059897303581, 0.03437823802232742, -0.031201057136058807, -0.04805723950266838, -0.059091757982969284, 0.04885629191994667, 0.01378363836556673, 0.07678504288196564, 0.05833075940608978, 0.009008354507386684, 0.018834784626960754, 0.04900849238038063, 0.006116549018770456, 0.0498836413025856, 0.03649001941084862, -0.00015695653564762324, -0.05239494889974594, -0.013070199638605118, 0.013203374110162258, -0.02657797373831272, 0.01809280924499035, -0.008470896631479263, 0.0038620822597295046, -0.010882319882512093, 0.01775035820901394, -0.015552965924143791, -0.01203333493322134, -0.02284906804561615, 0.09276606887578964, 0.04813333973288536, 0.03367431089282036, 0.019786037504673004, 0.025950148701667786, -0.031105931848287582, 0.05551505461335182, -0.05190029740333557, -0.03660416975617409, -0.07914415001869202, 0.00467540230602026, 0.0007746756309643388, 0.018654046580195427, 0.04390978068113327, -0.03468263894319534, -0.01999531127512455, 0.03620464354753494, 0.03850667178630829, -0.013393624685704708, -0.0067253499291837215, -0.005973861087113619, 0.04938898980617523, 0.05007389187812805, 0.03312258794903755, -0.05505845323204994, -0.01703691855072975, -0.004592167679220438, 0.0678052231669426, 0.04288243129849434, -0.001782407984137535, 0.04273023083806038, -0.025797948241233826, -0.05186224728822708, -0.0028513772413134575, -0.031067881733179092, -0.03401676192879677, -0.04219752922654152, 0.0002815110783558339, 0.04292048141360283, -0.015286616049706936, -0.030744457617402077, 0.012156997807323933, 0.0018775331554934382, 0.04143652692437172, 0.01816890947520733, 0.011776496656239033, 0.04314877837896347, 0.013831201009452343, -0.05570530518889427, 0.004794308915734291, -0.009598130360245705, 0.04497518390417099, -0.0015065449988469481, 0.0176076702773571, -0.01824500970542431, -0.05235689878463745, -0.0000814509330666624, -0.0243710707873106, -0.04333902895450592, -0.012347247451543808, 0.05014999210834503, -0.023705193772912025, 0.04330097883939743, 0.00609276769682765, -0.014392439275979996, -0.030649332329630852, -0.0045826551504433155, 0.0536886490881443, 0.012242610566318035, -0.02087046392261982, 0.011120133101940155, 0.007681358139961958, -0.005845441948622465, -0.04250193014740944, 0.03209523484110832, -0.003469690913334489, -0.0731322392821312, 0.0012627866817638278, 0.0016967953415587544, -0.011510146781802177, 0.020927539095282555, -0.0011141536524519324, -0.03300843760371208, -0.01779792085289955, 0.05281349644064903, -0.021536339074373245, 0.08097054809331894, -0.008038077503442764, -0.011747959069907665, 0.005688485689461231, 0.003912022802978754, 0.04527958482503891, -0.03359821066260338, -0.0445566326379776, -0.0011551763163879514, -0.002606429858133197, -0.013945350423455238, 0.01821647211909294, 0.04021892324090004, 0.10410499572753906, -0.014392439275979996, 0.04744843766093254, -0.03437823802232742, -0.007362688891589642, -0.01399291306734085, -0.012252123095095158, -0.0035576815716922283, -0.004109407775104046, -0.03831642121076584, 0.0009310376481153071, -0.03127715736627579, -0.0038573259953409433, 0.02262076735496521, 0.02475157007575035, -0.08614535629749298, 0.03125813230872154, -0.004145079758018255, -0.023476893082261086, 0.014630252495408058, -0.01239481009542942, 0.03506314009428024, -0.017464982345700264, -0.0061593553982675076, -0.012746773660182953, -0.03645196929574013, -0.01121525838971138, 0.05193834751844406, -0.0022723027504980564, 0.07914415001869202, -0.023362742736935616, 0.02147926576435566, -0.038145195692777634, 0.05212859809398651, 0.04900849238038063, 0.08431895822286606, -0.006677787285298109, -0.01378363836556673, -0.04588838666677475, -0.007524401415139437, -0.07088728249073029, 0.02848047763109207, -0.04847579076886177, -0.003610000479966402, 0.0061213052831590176, 0.010920369997620583, -0.000892987591214478, -0.02543647214770317, 0.003714638063684106, 0.025835998356342316, -0.05654240399599075, 0.0034268845338374376, -0.09839748591184616, -0.05429745092988014, 0.023971544578671455, 0.019167723134160042, 0.0021593414712697268, -0.03995257243514061, -0.017921583727002144, -0.05075879395008087, 0.028803903609514236, 0.03213328495621681, 0.022145140916109085, -0.0050368779338896275, 0.011319896206259727, 0.010406694374978542, -0.04577423632144928, 0.025721848011016846, 0.01615225523710251, 0.03843057155609131, -0.01775035820901394, 0.0218978151679039, -0.05281349644064903, -0.014278288930654526, 0.010682557709515095, -0.018996497616171837, -0.06985992938280106, 0.02619747444987297, -0.010349619202315807, 0.007229513488709927, -0.0426541306078434, 0.05452575162053108, -0.05650435388088226, 0.013032149523496628, 0.024504246190190315, 0.03447336331009865, 0.00973130576312542, 0.03827837109565735, 0.027015550062060356, 0.015638578683137894, 0.0192343108355999, -0.04885629191994667, -0.04897044226527214, 0.02007141150534153, -0.02414277009665966, -0.0016361530870199203, 0.01653275638818741, 0.028651703149080276, -0.004746746271848679, 0.029374655336141586, 0.006482780911028385, 0.05616190284490585, 0.008599315769970417, 0.01946261152625084, 0.0346636138856411, 0.05171004682779312, 0.006844256538897753, -0.04508933424949646, -0.04261608049273491, -0.0025469765532761812, 0.04136042669415474, 0.008889447897672653, 0.029412705451250076, -0.04147457703948021, -0.00857553444802761, -0.03629976883530617, -0.015486379154026508, -0.05646630376577377, -0.025113046169281006, 0.013308011926710606, 0.05117734521627426, -0.05646630376577377, -0.0445566326379776, -0.017693283036351204, -0.022145140916109085, -0.04261608049273491, -0.05399305000901222, 0.010492307133972645, 0.03888717293739319, 0.05692290514707565, -0.06639737635850906, 0.05319399759173393, 0.030820557847619057, 0.00535079138353467, 0.04162677749991417, -0.023476893082261086, -0.05220469832420349, 0.03531046584248543, -0.05049244314432144, -0.006116549018770456, 0.03881107270717621, 0.0342831127345562, 0.002772898878902197, -0.06259236484766006, -0.020965589210391045, -0.027890700846910477, 0.03472068905830383, 0.016780080273747444, 0.01058743242174387, -0.06658762693405151, -0.03251378610730171, 0.030249806120991707, -0.06978382915258408, -0.028499502688646317, -0.01028303150087595, -0.02326761744916439, 0.02170756459236145, -0.013269961811602116, 0.020699238404631615, -0.0711916834115982, -0.02201196551322937, 0.016970330849289894, -0.02456132136285305, 0.04090382531285286, 0.05125344544649124, -0.017132043838500977, -0.06620712578296661, -0.013308011926710606, -0.0020333006978034973, -0.022830042988061905, -0.007543426472693682, -0.009560080245137215, 0.06502757221460342, 0.05410720035433769, 0.02809997648000717, -0.01737936958670616, 0.05319399759173393, 0.0453176349401474, 0.01549589168280363, -0.018901372328400612, -0.01444951444864273, -0.01873965933918953, -0.03298941254615784, 0.02026166208088398, 0.0418931283056736, 0.01549589168280363, -0.05007389187812805, -0.0468396358191967, -0.01577175408601761, 0.0017907314468175173, -0.007120119407773018, -0.024770595133304596, -0.004247338976711035, -0.004894190467894077, 0.060842063277959824, -0.004442345816642046, -0.01740790717303753, -0.07743189483880997, 0.00806185882538557, -0.05570530518889427, -0.014021450653672218, 0.06849012523889542, 0.012803848832845688, 0.05357449874281883, -0.05171004682779312, 0.01165283378213644, -0.0009857346303761005, 0.012917999178171158, -0.01870160922408104, -0.012984586879611015, 0.028918053954839706, -0.011158183217048645, -0.006154599133878946, -0.01016888115555048, 0.017274731770157814, 0.015790779143571854, 0.06156501546502113, -0.024275945499539375, -0.011491121724247932, 0.04657328501343727, 0.00531274126842618, 0.024770595133304596, 0.04029502347111702, -0.0651417225599289, 0.03165765851736069, -0.005997642409056425, -0.04398588091135025, 0.02349591813981533, -0.013488749973475933, 0.022791992872953415, -0.0913962721824646, -0.06270651519298553, 0.03850667178630829, 0.04174092784523964, 0.015552965924143791, -0.012328223325312138, 0.01024498138576746, 0.05365059897303581, -0.01816890947520733, 0.030249806120991707, 0.01639006845653057, -0.020090436562895775, -0.026863349601626396, 0.02547452226281166, 0.02901317924261093, -0.037878844887018204, 0.07735579460859299, 0.05338424816727638, 0.01562906615436077, -0.04664938524365425, -0.09421197324991226, -0.008637365885078907, 0.0075957453809678555, -0.0031795590184628963, 0.02752922661602497, -0.03578609228134155, 0.05833075940608978, 0.017055943608283997, -0.01813085936009884, -0.03264696151018143, -0.060157161206007004, 0.02680627442896366, -0.04657328501343727, 0.02178366482257843, -0.02208806574344635, -0.0674247220158577, 0.0030677870381623507, -0.014620739966630936, 0.04295853152871132, -0.01692276820540428, 0.007329395040869713, -0.03156253322958946, -0.07020238041877747, -0.03519631549715996, -0.03643294423818588, 0.024618396535515785, 0.04482298344373703, -0.05589555203914642, -0.0321713350713253, 0.03420701250433922, -0.02749117650091648, -0.04025697335600853, 0.020052386447787285, 0.01188113447278738, 0.009959605522453785, -0.007700383197516203, 0.0027419831603765488, -0.04600253701210022, 0.02273491770029068, 0.016627881675958633, -0.022297341376543045, -0.004133189097046852, -0.02079436369240284, 0.011862109415233135, -0.02448522113263607, 0.02699652500450611, 0.02117486484348774, -0.030934708192944527, 0.05425940081477165, 0.04980754107236862, -0.09816918522119522, -0.02022361196577549, -0.03234256058931351, 0.008627853356301785, 0.005883492063730955, -0.05692290514707565, 0.014516102150082588, 0.00898932944983244, -0.07012628018856049, -0.010530357249081135, -0.05247104912996292, 0.012156997807323933, -0.025189146399497986, 0.04284438118338585, 0.002035678829997778, 0.09230947494506836, -0.01691325567662716, 0.07069703191518784, 0.024656446650624275, -0.06575052440166473, 0.016742030158638954, 0.0021236694883555174, 0.009469711221754551, -0.021155839785933495, 0.028309252113103867, -0.06613102555274963, 0.03778371959924698, -0.003985744901001453, -0.04284438118338585, 0.08781956136226654, -0.012366272509098053, -0.03770761936903, 0.07724164426326752, -0.03713686764240265, 0.005022609140723944, 0.05886346101760864, -0.01597151719033718, -0.015105878002941608, -0.0034149938728660345, 0.030706407502293587, -0.04550788551568985, -0.02490377053618431, -0.0048299808986485004, 0.05844490975141525, -0.03190498426556587, -0.002009519375860691, 0.02155536413192749, -0.03820227086544037, -0.05452575162053108, 0.07408348470926285, 0.05600970238447189, 0.01581931672990322, 0.008680172264575958, -0.0028561335057020187, 0.015591016039252281, 0.021193889901041985, -0.018463796004652977, 0.030497131869196892, -0.04737233743071556, -0.02726287581026554, 0.0344543382525444, -0.006868037860840559, 0.04219752922654152, -0.0487421415746212, 0.05148174613714218, 0.00016721223073545843, -0.007638551760464907, 0.027129700407385826, 0.0002247332304250449, -0.01148160919547081, -0.05376474931836128, 0.00031985840178094804, -0.08211205154657364, 0.05776000767946243, 0.024618396535515785, -0.009079698473215103, 0.00029533394263125956, -0.08386235684156418, -0.07663284242153168, 0.030440056696534157, -0.007110606878995895, -0.002644479973241687, 0.01806427165865898, 0.005831173155456781, -0.01437341421842575, 0.007757458370178938, 0.007686114404350519, 0.007063044235110283, -0.020090436562895775, 0.0046587553806602955, -0.029698079451918602, 0.04097992554306984, 0.007524401415139437, 0.04132237657904625, -0.04307267814874649, 0.08020954579114914, 0.009560080245137215, -0.006554124876856804, -0.007134388200938702, 0.010178393684327602, 0.02878487855195999, 0.014401951804757118, -0.008190277963876724, 0.04040917381644249, -0.03900132328271866, -0.007001212798058987, -0.0004191453044768423, -0.022373441606760025, -0.03287526220083237, -0.0013186727883294225, -0.019376998767256737, 0.08386235684156418, 0.006658762227743864, -0.01243286021053791, -0.005108221899718046, 0.03690856695175171, -0.08135104924440384, 0.006073742639273405, -0.006026179995387793, 0.024884745478630066, 0.05007389187812805, -0.0426541306078434, 0.058977607637643814, -0.03751736879348755, 0.04383368045091629, 0.020927539095282555, 0.02216416597366333, 0.008156984113156796, 0.005740804597735405, 0.07415958493947983, -0.013507775031030178, 0.028042901307344437, 0.016019079834222794, 0.00594056723639369, 0.0036718319170176983, 0.021650489419698715, -0.05425940081477165, 0.0036504287272691727, 0.014934652484953403, 0.03375041112303734, -0.02604527398943901, -0.05125344544649124, -0.020394837483763695, 0.0023472136817872524, -0.015105878002941608, 0.021308040246367455, 0.027129700407385826, 0.020052386447787285, 0.0563521534204483 ]
4,739
optbinning.binning.multiclass_binning
to_json
Save optimal bins and/or splits points and transformation depending on the target type. Parameters ---------- path: The path where the json is going to be saved.
def to_json(self, path): """ Save optimal bins and/or splits points and transformation depending on the target type. Parameters ---------- path: The path where the json is going to be saved. """ if path is None: raise ValueError('Specify the path for the json file.') table = self.binning_table opt_bin_dict = dict() opt_bin_dict['name'] = table.name opt_bin_dict['special_codes'] = table.special_codes opt_bin_dict['splits'] = table.splits.tolist() opt_bin_dict['n_event'] = table.n_event.tolist() opt_bin_dict['classes'] = table.classes.tolist() with open(path, "w") as write_file: json.dump(opt_bin_dict, write_file)
(self, path)
[ 0.008118879050016403, -0.014326374046504498, -0.013145281933248043, -0.020971141755580902, -0.029878919944167137, -0.028219981119036674, -0.08532712608575821, 0.031736209988594055, -0.033485304564237595, -0.05319421365857124, 0.023531677201390266, 0.02028592862188816, -0.043493032455444336, -0.029698599129915237, -0.023603804409503937, 0.0145157091319561, 0.05910868942737579, -0.00442909449338913, -0.0034238139633089304, 0.07119008898735046, 0.01146831177175045, -0.06729518622159958, 0.037073660641908646, 0.07436370849609375, 0.029644504189491272, -0.00897990446537733, 0.02634465880692005, -0.003601879347115755, 0.029824823141098022, -0.013037090189754963, -0.060118477791547775, -0.07616689801216125, 0.009151208214461803, 0.02787737362086773, 0.009493814781308174, -0.010656874626874924, 0.03866047039628029, 0.04064398631453514, -0.05575474724173546, 0.002366691594943404, -0.021367844194173813, 0.00215932447463274, -0.09636267274618149, 0.017031164839863777, 0.053590916097164154, -0.02021380141377449, -0.06361667066812515, 0.02583976462483406, 0.024252954870462418, -0.03891291841864586, -0.039417814463377, -0.07854711264371872, 0.022089121863245964, 0.05272538214921951, -0.054528575390577316, -0.004260045010596514, 0.028111789375543594, 0.009448735043406487, 0.0030338733922690153, -0.005319421179592609, -0.02737247943878174, 0.01745491474866867, 0.042916011065244675, -0.023838220164179802, 0.031700145453214645, 0.025785669684410095, -0.11425035446882248, -0.012405971996486187, -0.012910867109894753, 0.04143739119172096, 0.03891291841864586, -0.0616331584751606, 0.059577517211437225, 0.0673673152923584, -0.031700145453214645, 0.03829983249306679, -0.06293145567178726, -0.04533229023218155, -0.02032199315726757, -0.012937914580106735, 0.02461359277367592, -0.05193197727203369, 0.018086032941937447, -0.03393610566854477, -0.01822127215564251, -0.019871193915605545, 0.06426582485437393, 0.018897470086812973, -0.027751149609684944, -0.04071611166000366, -0.01745491474866867, 0.024307049810886383, -0.025821734219789505, 0.032565679401159286, 0.042699627578258514, -0.059469327330589294, -0.0006271732854656875, -0.03229519724845886, -0.04421430826187134, -0.006671816576272249, -0.03211487829685211, 0.0022100391797721386, -0.00005078526010038331, 0.04598143696784973, 0.05164346843957901, -0.03577536344528198, 0.008335262537002563, -0.00401886785402894, -0.08345180004835129, -0.023134974762797356, -0.06422975659370422, 0.0885007455945015, 0.022197313606739044, -0.08785159885883331, 0.07230806350708008, 0.008493042550981045, 0.008136911317706108, 0.000012124011846026406, 0.01666150987148285, 0.025785669684410095, 0.02210715413093567, 0.027642959728837013, 0.016156615689396858, 0.06617720425128937, -0.00947578251361847, 0.02003348246216774, 0.02189077064394951, 0.08482223004102707, 0.02906748279929161, -0.02064656838774681, 0.018383558839559555, -0.0386965349316597, -0.04118494316935539, 0.006635752506554127, 0.03200668841600418, -0.028544556349515915, -0.058964431285858154, 0.009971660561859608, 0.02464965730905533, 0.0290314182639122, 0.06087581813335419, -0.05171559378504753, 0.0034395919647067785, -0.07897987961769104, 0.05802677199244499, 0.0223956648260355, 0.019330235198140144, 0.008163959719240665, -0.014723076485097408, -0.060551244765520096, 0.013920655474066734, 0.0031398108694702387, -0.06552805751562119, -0.06953115016222, 0.013641159981489182, -0.039417814463377, -0.008515582419931889, -0.033485304564237595, 0.0013546491973102093, -0.01695002056658268, 0.00517967389896512, 0.021205557510256767, 0.020556407049298286, -0.05034516751766205, -0.03570323437452316, 0.03238535672426224, 0.008524597622454166, 0.02544306218624115, -0.021403908729553223, -0.02645285055041313, 0.003590609412640333, -0.024252954870462418, -0.07732094079256058, 0.05809890106320381, -0.011657646857202053, 0.03898504748940468, 0.04522409662604332, 0.027859341353178024, 0.018626989796757698, 0.06642965227365494, 0.018825341016054153, -0.02225141040980816, -0.009782325476408005, 0.05763006955385208, 0.026579074561595917, -0.07234413176774979, 0.021295716986060143, -0.02755279839038849, 0.012550228275358677, 0.0734621062874794, 0.027534767985343933, 0.01945645920932293, 0.019149916246533394, -0.015191907063126564, 0.02461359277367592, -0.05860379338264465, 0.01952858828008175, -0.015877120196819305, -0.06040698662400246, 0.028436364606022835, -0.01379443146288395, -0.028869129717350006, 0.019690874963998795, 0.008019703440368176, 0.0007900242344476283, -0.042266860604286194, 0.011432248167693615, -0.043024200946092606, 0.04132919758558273, 0.009110636077821255, 0.0019598461221903563, -0.04601750150322914, -0.0051030381582677364, 0.0033561941236257553, 0.059866029769182205, -0.01898762956261635, -0.03186243027448654, 0.03974238783121109, 0.001949703204445541, 0.01402884628623724, -0.02877897024154663, 0.036857277154922485, 0.010927353985607624, 0.03887685388326645, -0.027192160487174988, -0.024703754112124443, 0.018140127882361412, -0.037578556686639786, 0.030185462906956673, -0.03985058143734932, 0.0055853924714028835, -0.026615139096975327, -0.025352902710437775, -0.05185984820127487, -0.04673878103494644, 0.06826891005039215, -0.02638072334229946, -0.05283357575535774, 0.022089121863245964, -0.013920655474066734, 0.03274599835276604, -0.013596080243587494, -0.020953109487891197, -0.07367849349975586, -0.004124805331230164, 0.010774082504212856, 0.08518286794424057, -0.02913961000740528, -0.007420141715556383, 0.00579726742580533, 0.07760945707559586, 0.002873839810490608, -0.014398501254618168, 0.04987633600831032, 0.009286447428166866, -0.08691393584012985, -0.00725785456597805, -0.02787737362086773, -0.014966507442295551, 0.009737245738506317, -0.028760939836502075, -0.037578556686639786, -0.004145091399550438, 0.0025808210484683514, 0.0014831267762929201, -0.04006696492433548, -0.003951248247176409, 0.015534513629972935, -0.0011743298964574933, 0.0066763246431946754, -0.048289526253938675, 0.015561561100184917, -0.06433794647455215, -0.03577536344528198, -0.008073799312114716, -0.003994074184447527, -0.01052163541316986, -0.015976296737790108, -0.0014526979066431522, -0.0049452586099505424, 0.0360097773373127, -0.000280481152003631, 0.03326892480254173, -0.01644512638449669, -0.029860887676477432, -0.006780008319765329, -0.018590927124023438, -0.010160996578633785, 0.02210715413093567, -0.03586552292108536, 0.008222563192248344, 0.06325603276491165, -0.037542492151260376, 0.03323286026716232, 0.055285919457674026, -0.005756695754826069, 0.02877897024154663, -0.07486860454082489, 0.07064912468194962, 0.007307442370802164, 0.023279231041669846, 0.00004293150414014235, 0.07912413775920868, 0.0008046751609072089, -0.04756825044751167, -0.0038115005008876324, -0.009791341610252857, -0.04612569510936737, -0.009196287952363491, 0.05063367635011673, -0.0023418976925313473, -0.034422967582941055, 0.048181336373090744, 0.04965995252132416, 0.01291988231241703, -0.003577085444703698, -0.017301643267273903, -0.013109218329191208, 0.005441137123852968, 0.05871198698878288, -0.07710456103086472, 0.022016994655132294, 0.018608959391713142, -0.05470889434218407, 0.048505909740924835, -0.05265325680375099, 0.03280009329319, 0.034098390489816666, 0.0028490459080785513, -0.031411632895469666, 0.01390262320637703, -0.014155070297420025, 0.10732609033584595, 0.042699627578258514, -0.00520672183483839, 0.02199896238744259, 0.04699122533202171, -0.0017783998046070337, -0.0415816456079483, 0.05167952924966812, 0.048974741250276566, -0.0018313685432076454, 0.021223589777946472, 0.03186243027448654, -0.025028327479958534, 0.037470363080501556, -0.009250383824110031, 0.013424776494503021, -0.00280847423709929, 0.03321482613682747, -0.034567221999168396, 0.0659247636795044, -0.005148117896169424, 0.08713031560182571, -0.033341050148010254, -0.05103038251399994, 0.04497164860367775, -0.0551777258515358, -0.01562467310577631, -0.024667689576745033, 0.02558731846511364, -0.012856771238148212, -0.022774336859583855, 0.019077789038419724, 0.06729518622159958, 0.020808855071663857, 0.033882010728120804, -0.003694293089210987, 0.07681605219841003, -0.029933014884591103, 0.006644768640398979, -0.05012878403067589, 0.00701442314311862, 0.03934568539261818, 0.0001928572019096464, 0.07385881245136261, -0.00553580466657877, 0.012405971996486187, -0.02762492746114731, -0.026795458048582077, -0.005576376337558031, -0.02809375710785389, -0.01999741792678833, 0.020989174023270607, 0.05593506619334221, -0.014091958291828632, 0.0415816456079483, -0.0444306917488575, -0.010422459803521633, -0.047640375792980194, -0.001870813430286944, 0.011477327905595303, 0.008808600716292858, 0.007361538242548704, 0.00431864894926548, 0.02235960215330124, 0.00258983694948256, 0.03175424039363861, -0.005143609829246998, 0.07623902708292007, -0.05586294084787369, -0.06567231565713882, 0.010350331664085388, 0.034134455025196075, -0.03844409063458443, -0.06141677498817444, 0.02250385656952858, 0.01384852733463049, 0.04590931162238121, -0.04396186023950577, -0.04951569810509682, 0.03822770714759827, -0.016237758100032806, 0.04053579270839691, -0.023026783019304276, 0.06249869242310524, -0.04518803209066391, -0.030726419761776924, -0.009358575567603111, 0.028724875301122665, 0.02838226780295372, 0.0820813775062561, 0.004246521275490522, 0.042266860604286194, 0.01225270051509142, -0.02515455149114132, -0.019618747755885124, 0.026777425780892372, -0.014218182303011417, 0.08662542700767517, 0.01927614025771618, -0.06430188566446304, -0.016823796555399895, -0.08756308257579803, 0.008610249496996403, 0.03516227751970291, 0.017590153962373734, -0.047676440328359604, 0.024415241554379463, 0.04735186696052551, 0.0349278599023819, 0.03848015144467354, -0.01384852733463049, -0.009917565621435642, 0.02189077064394951, -0.037145789712667465, -0.024090668186545372, 0.012198605574667454, 0.01843765564262867, -0.029374025762081146, 0.048001013696193695, 0.0024207874666899443, 0.048325590789318085, -0.08251414448022842, 0.014650948345661163, -0.01612055115401745, 0.02365790121257305, -0.03793919458985329, 0.031808335334062576, 0.007280394434928894, 0.02028592862188816, 0.017175419256091118, 0.0383358970284462, 0.011405199766159058, 0.017373770475387573, -0.047856759279966354, -0.0356491394340992, 0.014894379302859306, -0.0010013360297307372, 0.01157650351524353, -0.013046106323599815, 0.034170519560575485, -0.04637813940644264, -0.02634465880692005, 0.03611797094345093, 0.06480678170919418, 0.01114373654127121, 0.023315293714404106, -0.007298426236957312, -0.011910093948245049, 0.003809246700257063, -0.07544562220573425, -0.027246255427598953, 0.03665892779827118, 0.049335379153490067, 0.0404997281730175, -0.05676453560590744, -0.01112570520490408, 0.006964835338294506, -0.027859341353178024, -0.010314268060028553, -0.006329209543764591, -0.02079082280397415, 0.010458523407578468, 0.015904167667031288, 0.06801646202802658, 0.0033088603522628546, 0.03049200400710106, -0.00020243666949681938, 0.0019891480915248394, 0.0029662535525858402, 0.03289025276899338, -0.09455947577953339, 0.0030203494243323803, -0.03447706252336502, 0.02365790121257305, 0.020953109487891197, 0.018058985471725464, -0.09939203411340714, 0.01716640405356884, -0.042843881994485855, -0.009574958123266697, -0.01170272659510374, 0.04713548347353935, -0.037326108664274216, 0.03353940322995186, 0.00709556695073843, 0.021854707971215248, -0.03339514508843422, 0.02318906970322132, -0.05164346843957901, 0.026434818282723427, 0.030293652787804604, -0.03873259946703911, -0.042735688388347626, 0.03454919159412384, 0.02659710682928562, -0.014975523576140404, 0.04471920430660248, 0.024108698591589928, 0.0404997281730175, 0.02050231210887432, 0.037290044128894806, 0.06195773556828499, 0.025461094453930855, 0.03848015144467354, 0.07284902781248093, 0.0056890761479735374, 0.04973208159208298, -0.059902094304561615, 0.01313626579940319, -0.001121924608014524, -0.005973079241812229, -0.058567728847265244, 0.042519304901361465, 0.06325603276491165, 0.0019947830587625504, -0.009209811687469482, 0.06358060985803604, -0.010647858493030071, 0.015056666918098927, 0.03557701036334038, 0.04486345872282982, 0.007465221919119358, 0.025028327479958534, -0.03665892779827118, 0.006694356445223093, -0.05193197727203369, 0.03891291841864586, -0.0003538767632562667, -0.04511590674519539, 0.01622874289751053, -0.006784516386687756, 0.004733383189886808, -0.04475526511669159, 0.05030910298228264, -0.018861405551433563, 0.09268415719270706, -0.029392056167125702, -0.009511847048997879, 0.05730549618601799, 0.04645026847720146, 0.014380469918251038, -0.07558988034725189, -0.008768029510974884, -0.026615139096975327, 0.002821998205035925, 0.011783870868384838, -0.02888716198503971, -0.0191679485142231, -0.025965988636016846, 0.04984027147293091, -0.03902111202478409, 0.007036963477730751, 0.004541793838143349, 0.030870676040649414, -0.03469344601035118, 0.024487370625138283, 0.03160998597741127, 0.03200668841600418, -0.0290314182639122, 0.05802677199244499, 0.012910867109894753, -0.04417824372649193, 0.04381760582327843, 0.010377379134297371, -0.026795458048582077, -0.022521888837218285, 0.00024779824889265, -0.02558731846511364, -0.06311178207397461, -0.037578556686639786, -0.049118995666503906, 0.03494589403271675, -0.017121324315667152, -0.006865659728646278, -0.0052427854388952255, 0.03325089067220688, -0.03967026248574257, 0.006112826522439718, -0.025461094453930855, 0.007064011413604021, 0.03626222535967827, -0.04096855968236923, -0.05629570782184601, -0.004751415457576513, 0.00623454200103879, -0.02609221264719963, 0.004535031970590353, -0.02645285055041313, -0.010449507273733616, -0.014741107821464539, 0.029770728200674057, 0.0034102899953722954, -0.05020091310143471, -0.06650178134441376, -0.0029346977826207876, 0.018933532759547234, 0.01564270444214344, -0.05752187967300415, -0.0523286797106266, -0.07263264060020447, 0.037253979593515396, -0.04608963057398796, 0.0249021053314209, -0.01745491474866867, -0.033845946192741394, -0.02652497962117195, 0.02493816800415516, 0.004719859454780817, 0.004967798478901386, 0.005973079241812229, 0.004882147070020437, -0.033413179218769073, -0.02921173721551895, -0.014506692998111248, -0.01734672300517559, 0.012090413831174374, 0.01540828961879015, -0.06249869242310524, -0.02511848695576191, 0.00985445361584425, -0.05636783316731453, 0.012000253424048424, 0.03829983249306679, -0.001287029474042356, 0.005707107950001955, 0.002168340375646949, 0.022702207788825035, 0.00020891688473057002, -0.03339514508843422, 0.03543275594711304, -0.037217918783426285, -0.03840802609920502, -0.02246779389679432, -0.020664598792791367, -0.02602008543908596, -0.012667435221374035, 0.02297268807888031, 0.017626218497753143, 0.002718314528465271, -0.03215094283223152, -0.021638324484229088, -0.025316838175058365, -0.04403398931026459, -0.023026783019304276, -0.003953502047806978, 0.01458783634006977, 0.00043248472502455115, -0.03353940322995186, -0.03568520396947861, 0.022521888837218285, 0.017698345705866814, 0.023856252431869507, 0.037398237735033035, 0.06224624440073967, -0.023315293714404106, 0.024307049810886383, -0.012153524905443192, 0.020592471584677696, -0.020195769146084785, -0.017905713990330696, -0.019294172525405884, 0.015696801245212555, 0.03858834505081177, -0.01788768172264099, 0.023351358249783516, 0.009268415160477161, -0.025244710966944695, -0.00831272266805172, 0.04522409662604332, -0.049191124737262726, 0.01114373654127121, 0.01379443146288395, 0.014840283431112766, -0.012514163739979267, -0.015471401624381542, -0.027083968743681908, -0.0009252637391909957, -0.04540441557765007, -0.015525497496128082, 0.05860379338264465, 0.024252954870462418, 0.001546238549053669, -0.027895405888557434, 0.06567231565713882, -0.0666460394859314, 0.03790313005447388, -0.008231579326093197, -0.04594537615776062, -0.0027138064615428448, 0.0065185450948774815, 0.014128022827208042, -0.007618493400514126, -0.02199896238744259, -0.024234922602772713, 0.00725785456597805, -0.025352902710437775, 0.025028327479958534, -0.001734446850605309, -0.03505408391356468, -0.0249021053314209, -0.02221534587442875, -0.019258107990026474, 0.02540699951350689, 0.0027881881687790155, 0.02336939051747322, -0.024956200271844864, 0.024667689576745033, 0.04749612137675285, -0.025569286197423935, 0.0451519712805748, 0.009412670508027077, -0.00969216600060463, 0.0349278599023819, 0.009061047807335854, 0.05243687331676483, 0.03429674357175827, -0.042447179555892944, 0.00628863787278533, 0.04987633600831032, 0.05283357575535774, 0.006027174647897482, 0.04017515480518341, 0.03683924674987793, -0.03371972218155861, 0.0501648485660553, 0.03851621598005295, 0.004205949138849974, -0.028183916583657265, -0.04594537615776062, 0.005918983370065689, -0.015850072726607323, -0.05510559678077698, 0.06148890405893326, 0.04017515480518341, 0.020340025424957275, -0.06260688602924347 ]
4,740
optbinning.binning.multiclass_binning
transform
Transform given data to mean Weight of Evidence (WoE) or weighted mean WoE using bins from the fitted optimal binning. Parameters ---------- x : array-like, shape = (n_samples,) Training vector, where n_samples is the number of samples. metric : str, optional (default="mean_woe") The metric used to transform the input vector. Supported metrics are "mean_woe" to choose the mean of Weight of Evidence (WoE), "weighted_mean_woe" to choose weighted mean of WoE using the number of records per class as weights, "indices" to assign the corresponding indices of the bins and "bins" to assign the corresponding bin interval. metric_special : float or str (default=0) The metric value to transform special codes in the input vector. Supported metrics are "empirical" to use the empirical mean WoE or weighted mean WoE, and any numerical value. metric_missing : float or str (default=0) The metric value to transform missing values in the input vector. Supported metrics are "empirical" to use the empirical mean WoE or weighted mean WoE, and any numerical value. show_digits : int, optional (default=2) The number of significant digits of the bin column. Applies when ``metric="bins"``. check_input : bool (default=False) Whether to check input arrays. Returns ------- x_new : numpy array, shape = (n_samples,) Transformed array.
def transform(self, x, metric="mean_woe", metric_special=0, metric_missing=0, show_digits=2, check_input=False): """Transform given data to mean Weight of Evidence (WoE) or weighted mean WoE using bins from the fitted optimal binning. Parameters ---------- x : array-like, shape = (n_samples,) Training vector, where n_samples is the number of samples. metric : str, optional (default="mean_woe") The metric used to transform the input vector. Supported metrics are "mean_woe" to choose the mean of Weight of Evidence (WoE), "weighted_mean_woe" to choose weighted mean of WoE using the number of records per class as weights, "indices" to assign the corresponding indices of the bins and "bins" to assign the corresponding bin interval. metric_special : float or str (default=0) The metric value to transform special codes in the input vector. Supported metrics are "empirical" to use the empirical mean WoE or weighted mean WoE, and any numerical value. metric_missing : float or str (default=0) The metric value to transform missing values in the input vector. Supported metrics are "empirical" to use the empirical mean WoE or weighted mean WoE, and any numerical value. show_digits : int, optional (default=2) The number of significant digits of the bin column. Applies when ``metric="bins"``. check_input : bool (default=False) Whether to check input arrays. Returns ------- x_new : numpy array, shape = (n_samples,) Transformed array. """ self._check_is_fitted() return transform_multiclass_target(self._splits_optimal, x, self._n_event, self.special_codes, metric, metric_special, metric_missing, show_digits, check_input)
(self, x, metric='mean_woe', metric_special=0, metric_missing=0, show_digits=2, check_input=False)
[ 0.016102535650134087, -0.0044107744470238686, 0.037523675709962845, 0.019862238317728043, -0.003319543320685625, -0.08194319903850555, -0.030316049233078957, -0.006428176071494818, 0.014626163989305496, 0.017716458067297935, -0.009509298950433731, 0.003085708012804389, 0.049958206713199615, -0.04181523993611336, -0.027766786515712738, 0.04940800741314888, -0.014754544012248516, -0.0007628301391378045, 0.0570007748901844, 0.0479041263461113, 0.00089866085909307, -0.04603344574570656, 0.022796642035245895, 0.019073618575930595, 0.007042566780000925, 0.03266357257962227, -0.062392741441726685, -0.013048922643065453, -0.017010366544127464, -0.05641389638185501, -0.04346584156155586, -0.07431375235319138, 0.06598738580942154, -0.05777105689048767, 0.07031562924385071, -0.058247897773981094, -0.022649921476840973, 0.0028702127747237682, 0.0024988274089992046, 0.03537789359688759, 0.015258895233273506, -0.07299327105283737, -0.02833532728254795, 0.052672531455755234, 0.041411761194467545, 0.04772072657942772, 0.020339079201221466, 0.0991094559431076, -0.016863645985722542, -0.04262220114469528, -0.04849100857973099, -0.019275357946753502, 0.06525378674268723, 0.04236543923616409, 0.02629958465695381, 0.03402073308825493, 0.0021182720083743334, 0.010838950052857399, 0.055973734706640244, -0.03132475167512894, 0.03418579325079918, 0.05017828941345215, 0.021714581176638603, -0.04331912100315094, 0.024337204173207283, 0.001798467943444848, -0.03315875306725502, 0.011444170959293842, -0.030994629487395287, 0.0676746666431427, 0.020760899409651756, -0.026244565844535828, 0.017478037625551224, 0.035652995109558105, -0.0488944873213768, 0.02446558326482773, -0.010352940298616886, -0.002989422995597124, -0.00519939512014389, 0.026464644819498062, 0.09874265640974045, 0.035836394876241684, -0.02022903971374035, -0.018926898017525673, -0.030572809278964996, -0.030756209045648575, -0.023310162127017975, 0.015222215093672276, 0.0105271702632308, -0.01646016538143158, -0.008110872469842434, -0.00294128037057817, 0.03172823041677475, 0.041411761194467545, 0.030261028558015823, 0.0022008020896464586, -0.06015525758266449, -0.002879382809624076, -0.003982076421380043, -0.026336265727877617, -0.012407021597027779, 0.05091188848018646, -0.00462397700175643, 0.06301630288362503, 0.023035062476992607, 0.005703745409846306, -0.0028312401846051216, -0.01707455702126026, -0.04317240044474602, 0.023988742381334305, -0.05039836838841438, 0.005598290357738733, -0.08693168312311172, -0.025584325194358826, -0.02629958465695381, 0.0036702961660921574, 0.02452060393989086, 0.041154999285936356, -0.05479997396469116, 0.03935767710208893, 0.046070124953985214, -0.028115246444940567, 0.003264523111283779, -0.042512159794569016, -0.03011430986225605, -0.012113581411540508, 0.05307601019740105, -0.008908663876354694, 0.02173292078077793, 0.014259363524615765, -0.06580398231744766, -0.036496635526418686, -0.037193555384874344, 0.04863772541284561, -0.009582659229636192, -0.037266917526721954, 0.024905744940042496, 0.01817495748400688, 0.00034559471532702446, -0.01615755632519722, 0.05560693517327309, 0.02800520695745945, 0.05135205015540123, 0.018743498250842094, 0.045483242720365524, -0.02217308059334755, 0.02866544760763645, 0.059091538190841675, 0.000993226538412273, -0.05289261043071747, -0.03899087756872177, 0.0173955075442791, 0.012434531934559345, -0.06844494491815567, 0.017652267590165138, 0.04390600323677063, 0.018284996971488, -0.023365182802081108, -0.015121344476938248, -0.01336987316608429, 0.009894439950585365, 0.0004908820264972746, -0.01606585644185543, 0.05868805572390556, -0.021787941455841064, 0.05479997396469116, -0.0142501937225461, 0.05479997396469116, 0.0375603549182415, -0.023365182802081108, -0.0302793700248003, -0.031599849462509155, -0.018459228798747063, 0.05171884968876839, 0.028555408120155334, 0.08201655745506287, -0.002854165155440569, -0.027106545865535736, 0.007656957488507032, 0.060962218791246414, 0.01493794471025467, 0.022044701501727104, -0.0003877194249071181, -0.04849100857973099, -0.08076943457126617, -0.06132901832461357, 0.01866096816956997, 0.03187495097517967, -0.04933464899659157, -0.00869775377213955, 0.05340613052248955, -0.018725158646702766, -0.0029229403007775545, -0.005873390473425388, -0.009931119158864021, 0.0065978216007351875, -0.05755097419023514, 0.020247379317879677, 0.0023223047610372305, -0.005662480369210243, -0.03702849522233009, -0.022814981639385223, 0.033452194184064865, 0.036661695688962936, -0.02538258396089077, -0.03004094958305359, -0.0028289477340877056, 0.00924795400351286, -0.0404580794274807, -0.05230573192238808, 0.11106714606285095, 0.009357994422316551, -0.04841764643788338, 0.025694364681839943, 0.041668519377708435, 0.014892094768583775, 0.021457821130752563, 0.004864689894020557, -0.03154483065009117, 0.01620340533554554, -0.04739060625433922, -0.022521542385220528, 0.0027097375132143497, 0.052232369780540466, 0.06389661878347397, 0.02505246363580227, 0.060118578374385834, -0.05472661182284355, 0.06066877767443657, 0.003085708012804389, -0.001590996515005827, -0.016845306381583214, -0.019183658063411713, 0.018670137971639633, 0.01513968501240015, 0.013250662945210934, 0.011068200692534447, -0.026281245052814484, -0.029472408816218376, 0.02402542345225811, 0.015387275256216526, -0.033892352133989334, -0.03609315678477287, -0.02173292078077793, 0.0007903401274234056, -0.027803467586636543, 0.03910091891884804, 0.02749168686568737, 0.003541915910318494, -0.006905016489326954, 0.0038536961656063795, 0.007322252262383699, -0.016212575137615204, -0.03292033076286316, -0.008739018812775612, -0.010563850402832031, -0.05318605154752731, -0.03572635352611542, -0.02683144621551037, -0.001944041927345097, 0.03961443901062012, 0.030352730304002762, 0.03579971566796303, 0.012507892213761806, -0.05531349405646324, -0.010169539600610733, -0.033452194184064865, 0.03259021043777466, 0.08693168312311172, 0.03231511265039444, -0.12471212446689606, -0.017688946798443794, 0.01260876189917326, 0.004938049707561731, -0.03796383738517761, 0.027601726353168488, 0.028977228328585625, 0.016689416021108627, 0.007624862249940634, -0.008353877812623978, -0.0299492496997118, 0.03262689337134361, 0.0019612356554716825, -0.010738080367445946, -0.04163184016942978, -0.05424977093935013, -0.010646380484104156, 0.023401862010359764, 0.00029573278152383864, -0.03957775980234146, -0.05318605154752731, -0.010664720088243484, 0.009995309635996819, -0.01936705969274044, -0.0364416167140007, -0.020834259688854218, -0.033635593950748444, -0.05810117721557617, 0.06426342576742172, -0.02479570358991623, 0.01535976491868496, 0.037853796035051346, -0.0166710764169693, -0.023365182802081108, -0.019825559109449387, 0.030829569324851036, 0.04350252076983452, -0.07002218812704086, -0.004254884086549282, -0.011774291284382343, 0.022301461547613144, 0.011187410913407803, 0.02402542345225811, -0.022466521710157394, 0.013489083386957645, -0.0404580794274807, 0.08487760275602341, 0.05142540857195854, 0.016093365848064423, 0.04959140717983246, -0.011921011842787266, 0.010462979786098003, 0.030242688953876495, -0.053516171872615814, -0.019733859226107597, 0.0008218620205298066, 0.022686602547764778, -0.0036794659681618214, -0.0011227530194446445, -0.08693168312311172, 0.02809690684080124, -0.0033080806024372578, 0.04027467966079712, -0.015983326360583305, -0.10409794002771378, -0.018321678042411804, 0.0035487934947013855, 0.01878017745912075, 0.0016689415788277984, -0.009454279206693172, -0.05531349405646324, 0.06624414771795273, 0.02884884737432003, 0.029068928211927414, -0.014626163989305496, -0.054873332381248474, -0.06334642320871353, -0.008949928916990757, -0.005836710799485445, 0.0029848378617316484, 0.023200122639536858, -0.02681310661137104, 0.03763371706008911, -0.011618400923907757, 0.04130171984434128, -0.045043084770441055, 0.012342832051217556, -0.036680035293102264, -0.003296618117019534, -0.005589120555669069, -0.004160891752690077, -0.028738807886838913, -0.03112301044166088, 0.01781732775270939, 0.02165956050157547, -0.019697178155183792, 0.03495607525110245, 0.00359464343637228, 0.0069416966289281845, 0.0010539778741076589, 0.02606116607785225, -0.045813363045454025, -0.057477615773677826, 0.026097845286130905, 0.047427285462617874, 0.0101970499381423, -0.019568799063563347, 0.00712509686127305, -0.03990788012742996, 0.006120980717241764, 0.054103054106235504, 0.07746823877096176, -0.06114561855792999, 0.013489083386957645, 0.057147495448589325, -0.02257656119763851, 0.04746396467089653, 0.008445578627288342, -0.01688198558986187, -0.009931119158864021, -0.030572809278964996, 0.01523138489574194, 0.004610221832990646, -0.014103474095463753, -0.041338399052619934, -0.019825559109449387, -0.013149792328476906, -0.008097117766737938, -0.03141644969582558, -0.04001791775226593, -0.013883393257856369, 0.004060021601617336, -0.008761943317949772, -0.02318178303539753, -0.07805511355400085, -0.03402073308825493, -0.054689932614564896, -0.009041628800332546, -0.01336987316608429, 0.00630438094958663, -0.02943572774529457, 0.06727118790149689, 0.0008338976767845452, -0.007890792563557625, -0.01620340533554554, 0.029985928907990456, 0.028115246444940567, -0.00390413124114275, -0.026464644819498062, 0.030994629487395287, 0.003539623459801078, -0.0142501937225461, 0.047940805554389954, -0.007230551913380623, 0.022558221593499184, -0.08832552284002304, -0.004896784666925669, -0.10079673677682877, 0.009335068985819817, 0.013929243199527264, -0.013351532630622387, -0.08898576349020004, -0.05076516792178154, -0.05010492727160454, -0.008656488731503487, -0.009004948660731316, -0.03200333192944527, 0.008142967708408833, 0.015937475487589836, 0.024667324498295784, -0.02292502298951149, -0.035487934947013855, 0.04291564226150513, 0.013819203712046146, -0.023071741685271263, -0.03655165433883667, -0.08047600090503693, 0.018303338438272476, -0.08590464293956757, -0.022484861314296722, 0.0802559182047844, 0.0050801848992705345, 0.030829569324851036, -0.03807387873530388, 0.01798238791525364, -0.0019944768864661455, 0.007854112423956394, -0.05032500997185707, 0.05868805572390556, 0.022558221593499184, -0.006171416025608778, -0.02859208732843399, 0.014204343780875206, -0.0364416167140007, -0.013745843432843685, -0.02386036328971386, -0.027711767703294754, -0.02690480649471283, 0.06367654353380203, 0.03341551125049591, 0.043282441794872284, -0.016276765614748, 0.05017828941345215, -0.021017659455537796, 0.050545088946819305, 0.04155848175287247, -0.06848162412643433, -0.026354605332016945, 0.0880320817232132, -0.0207242202013731, 0.01781732775270939, -0.0005481945700012147, 0.07258979231119156, -0.006570311263203621, -0.009399259462952614, 0.026941485702991486, -0.003743656212463975, -0.07042566686868668, 0.01648767665028572, 0.03770707547664642, 0.007954983040690422, 0.11187411099672318, 0.0336722731590271, -0.0010849266545847058, -0.06275954097509384, 0.044969722628593445, 0.023713642731308937, -0.004179231356829405, 0.02503412403166294, 0.014947114512324333, 0.05997185781598091, -0.03770707547664642, -0.058247897773981094, -0.05234241113066673, 0.0012035636464133859, -0.002613452496007085, -0.051388729363679886, -0.006565726362168789, -0.016056684777140617, -0.003959151450544596, -0.05010492727160454, -0.014066793955862522, 0.054103054106235504, 0.01467201393097639, 0.010472150519490242, -0.06980210542678833, -0.041741881519556046, 0.05590037256479263, 0.019403738901019096, -0.023750323802232742, 0.008133797906339169, -0.03858739882707596, -0.001647162833251059, 0.0008367632981389761, 0.026776425540447235, -0.005300265271216631, -0.06598738580942154, -0.015744905918836594, -0.014351064339280128, 0.015919135883450508, -0.008638148196041584, -0.0017033291514962912, 0.037248577922582626, 0.023805342614650726, 0.01032542996108532, 0.016478506848216057, 0.004069191403687, -0.022649921476840973, 0.018514247611165047, 0.008032928220927715, -0.009912779554724693, -0.007037981878966093, -0.01831250824034214, -0.0006126711959950626, 0.04397936165332794, 0.06738122552633286, -0.01260876189917326, 0.014066793955862522, -0.017808157950639725, -0.0333421528339386, -0.05006824806332588, -0.01484624482691288, 0.01796404831111431, 0.11106714606285095, 0.06481362134218216, -0.03968779742717743, 0.04038471728563309, 0.05061844736337662, -0.03634991496801376, 0.028812168166041374, -0.062062621116638184, -0.018963579088449478, 0.027785126119852066, -0.011847651563584805, -0.012342832051217556, 0.043942682445049286, -0.014736204408109188, 0.03449757397174835, -0.032370131462812424, -0.029839208349585533, 0.04651028662919998, 0.03071952983736992, 0.0018408793257549405, -0.03326879069209099, -0.0498848482966423, 0.06202594190835953, -0.00875735841691494, -0.00924795400351286, -0.04474964365363121, -0.026923146098852158, -0.06727118790149689, -0.0035854734014719725, -0.025584325194358826, -0.014103474095463753, 0.05329609289765358, -0.04654696583747864, 0.011315790936350822, 0.00454373937100172, -0.02428218349814415, 0.03774375841021538, 0.019257018342614174, -0.0025423849001526833, -0.004103579092770815, 0.026409626007080078, 0.058578018099069595, -0.03128806874155998, -0.024263843894004822, -0.029307348653674126, 0.06752794235944748, -0.04489636421203613, 0.053259409964084625, 0.000659094366710633, 0.0411183200776577, 0.008308027870953083, 0.026079505681991577, 0.022136401385068893, -0.03402073308825493, -0.021604541689157486, -0.02114604040980339, -0.015423955395817757, -0.013168132863938808, 0.03281029313802719, 0.023236801847815514, 0.003654248546808958, 0.021512839943170547, 0.0322234109044075, -0.04948136955499649, -0.03902755677700043, 0.020504139363765717, -0.022191422060132027, 0.04152179881930351, -0.043099042028188705, -0.021806281059980392, 0.008551033213734627, -0.03163653239607811, -0.03563465550541878, 0.043429162353277206, 0.03323211148381233, -0.011810971423983574, -0.014332723803818226, -0.046730365604162216, -0.03858739882707596, 0.058834776282310486, -0.02809690684080124, -0.002989422995597124, 0.05505673214793205, -0.02098098024725914, 0.027436666190624237, -0.0022592609748244286, 0.0023543997667729855, 0.05322273075580597, 0.046730365604162216, 0.0887656882405281, -0.017147917300462723, 0.007886207662522793, -0.03279195353388786, 0.005116865038871765, 0.009729379788041115, -0.04353920370340347, -0.0122236218303442, -0.014094303362071514, 0.02657468616962433, -0.06712446361780167, 0.01962381973862648, 0.04331912100315094, 0.0495547279715538, 0.027876827865839005, -0.006258531007915735, 0.011865991167724133, -0.023200122639536858, -0.058504655957221985, 0.05234241113066673, 0.03469931334257126, -0.03174657002091408, 0.004195278976112604, 0.01936705969274044, -0.010600530542433262, 0.0027143226470798254, -0.010829780250787735, -0.029032249003648758, 0.03325045108795166, -0.0017468866426497698, -0.020027298480272293, -0.011755951680243015, 0.007675297558307648, -0.014158493839204311, 0.015405614860355854, -0.007070076651871204, -0.07060907036066055, -0.030829569324851036, 0.028812168166041374, -0.0047500645741820335, 0.023970402777194977, -0.002459854818880558, 0.05303933098912239, -0.02198968082666397, -0.03482769429683685, -0.001979575725272298, -0.06165913864970207, -0.005552440416067839, 0.0105271702632308, -0.007042566780000925, -0.007180117070674896, -0.009339653886854649, 0.026262905448675156, 0.036569993942976, -0.024759024381637573, -0.01831250824034214, 0.020430779084563255, -0.027986867353320122, 0.05094856768846512, -0.008642733097076416, -0.007010472007095814, 0.0012322199763730168, 0.04317240044474602, -0.02969248965382576, -0.03365393355488777, -0.04728056490421295, 0.06235606223344803, -0.012416192330420017, 0.021953001618385315, 0.05142540857195854, -0.015598185360431671, 0.011462511494755745, 0.012287812307476997, 0.015203874558210373, -0.09698201715946198, 0.03079289011657238, 0.027289945632219315, 0.004266346804797649, 0.026629704982042313, -0.07093919068574905, 0.000659094366710633, -0.027124885469675064, -0.054873332381248474, 0.030774550512433052, 0.02793184667825699, -0.03800051659345627, -0.002817485248669982, -0.02367696352303028, 0.01912863925099373, -0.020430779084563255, -0.018835198134183884, 0.09096648544073105, 0.04819756746292114, 0.06334642320871353, -0.03554295375943184, -0.017267126590013504, 0.01707455702126026, 0.009128743782639503, -0.006836241576820612, 0.037010155618190765, 0.023493561893701553, -0.04023800045251846, -0.0495547279715538, 0.014103474095463753, 0.045483242720365524, 0.030902929604053497, 0.0122236218303442, -0.017872346565127373, -0.004257176537066698, 0.01763392798602581, 0.00519939512014389, 0.004163184203207493, 0.07431375235319138, 0.07732151448726654, 0.00702422671020031, 0.022118061780929565, 0.0244472436606884, -0.004300734028220177, 0.0019898919854313135, 0.03601979464292526, 0.0060705458745360374, 0.028555408120155334, -0.016405146569013596, 0.031948309391736984, 0.07013222575187683, 0.055386852473020554 ]
4,741
optbinning.binning.binning
OptimalBinning
Optimal binning of a numerical or categorical variable with respect to a binary target. Parameters ---------- name : str, optional (default="") The variable name. dtype : str, optional (default="numerical") The variable data type. Supported data types are "numerical" for continuous and ordinal variables and "categorical" for categorical and nominal variables. prebinning_method : str, optional (default="cart") The pre-binning method. Supported methods are "cart" for a CART decision tree, "mdlp" for Minimum Description Length Principle (MDLP), "quantile" to generate prebins with approximately same frequency and "uniform" to generate prebins with equal width. Method "cart" uses `sklearn.tree.DecisionTreeClassifier <https://scikit-learn.org/stable/modules/generated/sklearn.tree. DecisionTreeClassifier.html>`_. solver : str, optional (default="cp") The optimizer to solve the optimal binning problem. Supported solvers are "mip" to choose a mixed-integer programming solver, "cp" to choose a constrained programming solver or "ls" to choose `LocalSolver <https://www.localsolver.com/>`_. divergence : str, optional (default="iv") The divergence measure in the objective function to be maximized. Supported divergences are "iv" (Information Value or Jeffrey's divergence), "js" (Jensen-Shannon), "hellinger" (Hellinger divergence) and "triangular" (triangular discrimination). .. versionadded:: 0.7.0 max_n_prebins : int (default=20) The maximum number of bins after pre-binning (prebins). min_prebin_size : float (default=0.05) The fraction of mininum number of records for each prebin. min_n_bins : int or None, optional (default=None) The minimum number of bins. If None, then ``min_n_bins`` is a value in ``[0, max_n_prebins]``. max_n_bins : int or None, optional (default=None) The maximum number of bins. If None, then ``max_n_bins`` is a value in ``[0, max_n_prebins]``. min_bin_size : float or None, optional (default=None) The fraction of minimum number of records for each bin. If None, ``min_bin_size = min_prebin_size``. max_bin_size : float or None, optional (default=None) The fraction of maximum number of records for each bin. If None, ``max_bin_size = 1.0``. min_bin_n_nonevent : int or None, optional (default=None) The minimum number of non-event records for each bin. If None, ``min_bin_n_nonevent = 1``. max_bin_n_nonevent : int or None, optional (default=None) The maximum number of non-event records for each bin. If None, then an unlimited number of non-event records for each bin. min_bin_n_event : int or None, optional (default=None) The minimum number of event records for each bin. If None, ``min_bin_n_event = 1``. max_bin_n_event : int or None, optional (default=None) The maximum number of event records for each bin. If None, then an unlimited number of event records for each bin. monotonic_trend : str or None, optional (default="auto") The **event rate** monotonic trend. Supported trends are “auto”, "auto_heuristic" and "auto_asc_desc" to automatically determine the trend maximizing IV using a machine learning classifier, "ascending", "descending", "concave", "convex", "peak" and "peak_heuristic" to allow a peak change point, and "valley" and "valley_heuristic" to allow a valley change point. Trends "auto_heuristic", "peak_heuristic" and "valley_heuristic" use a heuristic to determine the change point, and are significantly faster for large size instances (``max_n_prebins > 20``). Trend "auto_asc_desc" is used to automatically select the best monotonic trend between "ascending" and "descending". If None, then the monotonic constraint is disabled. min_event_rate_diff : float, optional (default=0) The minimum event rate difference between consecutives bins. For solver "ls", this option currently only applies when monotonic_trend is “ascending”, “descending”, “peak_heuristic” or “valley_heuristic”. max_pvalue : float or None, optional (default=None) The maximum p-value among bins. The Z-test is used to detect bins not satisfying the p-value constraint. Option supported by solvers "cp" and "mip". max_pvalue_policy : str, optional (default="consecutive") The method to determine bins not satisfying the p-value constraint. Supported methods are "consecutive" to compare consecutive bins and "all" to compare all bins. gamma : float, optional (default=0) Regularization strength to reduce the number of dominating bins. Larger values specify stronger regularization. Option supported by solvers "cp" and "mip". .. versionadded:: 0.3.0 outlier_detector : str or None, optional (default=None) The outlier detection method. Supported methods are "range" to use the interquartile range based method or "zcore" to use the modified Z-score method. outlier_params : dict or None, optional (default=None) Dictionary of parameters to pass to the outlier detection method. class_weight : dict, "balanced" or None, optional (default=None) Weights associated with classes in the form ``{class_label: weight}``. If None, all classes are supposed to have weight one. Check `sklearn.tree.DecisionTreeClassifier <https://scikit-learn.org/stable/modules/generated/sklearn.tree. DecisionTreeClassifier.html>`_. cat_cutoff : float or None, optional (default=None) Generate bin others with categories in which the fraction of occurrences is below the ``cat_cutoff`` value. This option is available when ``dtype`` is "categorical". cat_unknown : float, str or None (default=None) The assigned value to the unobserved categories in training but occurring during transform. If None, the assigned value to an unknown category follows this rule: - if transform metric == 'woe' then woe(mean event rate) = 0 - if transform metric == 'event_rate' then mean event rate - if transform metric == 'indices' then -1 - if transform metric == 'bins' then 'unknown' .. versionadded:: 0.17.1 user_splits : array-like or None, optional (default=None) The list of pre-binning split points when ``dtype`` is "numerical" or the list of prebins when ``dtype`` is "categorical". user_splits_fixed : array-like or None (default=None) The list of pre-binning split points that must be fixed. .. versionadded:: 0.5.0 special_codes : array-like, dict or None, optional (default=None) List of special codes. Use special codes to specify the data values that must be treated separately. split_digits : int or None, optional (default=None) The significant digits of the split points. If ``split_digits`` is set to 0, the split points are integers. If None, then all significant digits in the split points are considered. mip_solver : str, optional (default="bop") The mixed-integer programming solver. Supported solvers are "bop" to choose the Google OR-Tools binary optimizer or "cbc" to choose the COIN-OR Branch-and-Cut solver CBC. time_limit : int (default=100) The maximum time in seconds to run the optimization solver. verbose : bool (default=False) Enable verbose output. **prebinning_kwargs : keyword arguments The pre-binning keyword arguments. .. versionadded:: 0.6.1 Notes ----- The parameter values ``max_n_prebins`` and ``min_prebin_size`` control complexity and memory usage. The default values generally produce quality results, however, some improvement can be achieved by increasing ``max_n_prebins`` and/or decreasing ``min_prebin_size``. A parameter value ``max_n_prebins`` greater than 100 is only recommended if ``solver="ls"``. The pre-binning refinement phase guarantee that no prebin has either zero counts of non-events or events by merging those pure prebins. Pure bins produce infinity WoE and IV measures. The mathematical formulation when ``solver="ls"`` does **not** currently support the ``max_pvalue`` constraint.
class OptimalBinning(BaseOptimalBinning): """Optimal binning of a numerical or categorical variable with respect to a binary target. Parameters ---------- name : str, optional (default="") The variable name. dtype : str, optional (default="numerical") The variable data type. Supported data types are "numerical" for continuous and ordinal variables and "categorical" for categorical and nominal variables. prebinning_method : str, optional (default="cart") The pre-binning method. Supported methods are "cart" for a CART decision tree, "mdlp" for Minimum Description Length Principle (MDLP), "quantile" to generate prebins with approximately same frequency and "uniform" to generate prebins with equal width. Method "cart" uses `sklearn.tree.DecisionTreeClassifier <https://scikit-learn.org/stable/modules/generated/sklearn.tree. DecisionTreeClassifier.html>`_. solver : str, optional (default="cp") The optimizer to solve the optimal binning problem. Supported solvers are "mip" to choose a mixed-integer programming solver, "cp" to choose a constrained programming solver or "ls" to choose `LocalSolver <https://www.localsolver.com/>`_. divergence : str, optional (default="iv") The divergence measure in the objective function to be maximized. Supported divergences are "iv" (Information Value or Jeffrey's divergence), "js" (Jensen-Shannon), "hellinger" (Hellinger divergence) and "triangular" (triangular discrimination). .. versionadded:: 0.7.0 max_n_prebins : int (default=20) The maximum number of bins after pre-binning (prebins). min_prebin_size : float (default=0.05) The fraction of mininum number of records for each prebin. min_n_bins : int or None, optional (default=None) The minimum number of bins. If None, then ``min_n_bins`` is a value in ``[0, max_n_prebins]``. max_n_bins : int or None, optional (default=None) The maximum number of bins. If None, then ``max_n_bins`` is a value in ``[0, max_n_prebins]``. min_bin_size : float or None, optional (default=None) The fraction of minimum number of records for each bin. If None, ``min_bin_size = min_prebin_size``. max_bin_size : float or None, optional (default=None) The fraction of maximum number of records for each bin. If None, ``max_bin_size = 1.0``. min_bin_n_nonevent : int or None, optional (default=None) The minimum number of non-event records for each bin. If None, ``min_bin_n_nonevent = 1``. max_bin_n_nonevent : int or None, optional (default=None) The maximum number of non-event records for each bin. If None, then an unlimited number of non-event records for each bin. min_bin_n_event : int or None, optional (default=None) The minimum number of event records for each bin. If None, ``min_bin_n_event = 1``. max_bin_n_event : int or None, optional (default=None) The maximum number of event records for each bin. If None, then an unlimited number of event records for each bin. monotonic_trend : str or None, optional (default="auto") The **event rate** monotonic trend. Supported trends are “auto”, "auto_heuristic" and "auto_asc_desc" to automatically determine the trend maximizing IV using a machine learning classifier, "ascending", "descending", "concave", "convex", "peak" and "peak_heuristic" to allow a peak change point, and "valley" and "valley_heuristic" to allow a valley change point. Trends "auto_heuristic", "peak_heuristic" and "valley_heuristic" use a heuristic to determine the change point, and are significantly faster for large size instances (``max_n_prebins > 20``). Trend "auto_asc_desc" is used to automatically select the best monotonic trend between "ascending" and "descending". If None, then the monotonic constraint is disabled. min_event_rate_diff : float, optional (default=0) The minimum event rate difference between consecutives bins. For solver "ls", this option currently only applies when monotonic_trend is “ascending”, “descending”, “peak_heuristic” or “valley_heuristic”. max_pvalue : float or None, optional (default=None) The maximum p-value among bins. The Z-test is used to detect bins not satisfying the p-value constraint. Option supported by solvers "cp" and "mip". max_pvalue_policy : str, optional (default="consecutive") The method to determine bins not satisfying the p-value constraint. Supported methods are "consecutive" to compare consecutive bins and "all" to compare all bins. gamma : float, optional (default=0) Regularization strength to reduce the number of dominating bins. Larger values specify stronger regularization. Option supported by solvers "cp" and "mip". .. versionadded:: 0.3.0 outlier_detector : str or None, optional (default=None) The outlier detection method. Supported methods are "range" to use the interquartile range based method or "zcore" to use the modified Z-score method. outlier_params : dict or None, optional (default=None) Dictionary of parameters to pass to the outlier detection method. class_weight : dict, "balanced" or None, optional (default=None) Weights associated with classes in the form ``{class_label: weight}``. If None, all classes are supposed to have weight one. Check `sklearn.tree.DecisionTreeClassifier <https://scikit-learn.org/stable/modules/generated/sklearn.tree. DecisionTreeClassifier.html>`_. cat_cutoff : float or None, optional (default=None) Generate bin others with categories in which the fraction of occurrences is below the ``cat_cutoff`` value. This option is available when ``dtype`` is "categorical". cat_unknown : float, str or None (default=None) The assigned value to the unobserved categories in training but occurring during transform. If None, the assigned value to an unknown category follows this rule: - if transform metric == 'woe' then woe(mean event rate) = 0 - if transform metric == 'event_rate' then mean event rate - if transform metric == 'indices' then -1 - if transform metric == 'bins' then 'unknown' .. versionadded:: 0.17.1 user_splits : array-like or None, optional (default=None) The list of pre-binning split points when ``dtype`` is "numerical" or the list of prebins when ``dtype`` is "categorical". user_splits_fixed : array-like or None (default=None) The list of pre-binning split points that must be fixed. .. versionadded:: 0.5.0 special_codes : array-like, dict or None, optional (default=None) List of special codes. Use special codes to specify the data values that must be treated separately. split_digits : int or None, optional (default=None) The significant digits of the split points. If ``split_digits`` is set to 0, the split points are integers. If None, then all significant digits in the split points are considered. mip_solver : str, optional (default="bop") The mixed-integer programming solver. Supported solvers are "bop" to choose the Google OR-Tools binary optimizer or "cbc" to choose the COIN-OR Branch-and-Cut solver CBC. time_limit : int (default=100) The maximum time in seconds to run the optimization solver. verbose : bool (default=False) Enable verbose output. **prebinning_kwargs : keyword arguments The pre-binning keyword arguments. .. versionadded:: 0.6.1 Notes ----- The parameter values ``max_n_prebins`` and ``min_prebin_size`` control complexity and memory usage. The default values generally produce qualit
(name='', dtype='numerical', prebinning_method='cart', solver='cp', divergence='iv', max_n_prebins=20, min_prebin_size=0.05, min_n_bins=None, max_n_bins=None, min_bin_size=None, max_bin_size=None, min_bin_n_nonevent=None, max_bin_n_nonevent=None, min_bin_n_event=None, max_bin_n_event=None, monotonic_trend='auto', min_event_rate_diff=0, max_pvalue=None, max_pvalue_policy='consecutive', gamma=0, outlier_detector=None, outlier_params=None, class_weight=None, cat_cutoff=None, cat_unknown=None, user_splits=None, user_splits_fixed=None, special_codes=None, split_digits=None, mip_solver='bop', time_limit=100, verbose=False, **prebinning_kwargs)
[ 0.02987671084702015, -0.015236909501254559, -0.045593440532684326, 0.0059017702005803585, -0.009964235126972198, -0.03798031806945801, -0.09024856984615326, -0.04203211888670921, -0.03603971749544144, -0.09314880520105362, -0.040262121707201004, 0.045550789684057236, -0.0012668546987697482, -0.037404533475637436, -0.049090784043073654, 0.043930068612098694, -0.011782214976847172, 0.010284114629030228, 0.0074318586848676205, 0.04262922704219818, -0.03418441861867905, -0.024779969826340675, -0.014032031409442425, 0.0760459303855896, 0.008418153040111065, 0.00747984042391181, -0.010086855851113796, -0.04653175175189972, -0.02281804569065571, 0.007079991512000561, -0.06137414276599884, -0.04427127167582512, 0.006115023046731949, -0.040390074253082275, 0.026997799053788185, -0.05194837227463722, 0.09937578439712524, 0.06943509727716446, -0.04444187507033348, 0.029834061861038208, 0.014000043272972107, -0.09118688106536865, -0.02439611591398716, 0.007026678416877985, 0.0412004329264164, 0.015396849252283573, 0.011089143343269825, 0.03774573653936386, 0.01823311112821102, -0.02597418613731861, -0.012603238224983215, -0.07344424724578857, 0.04145633801817894, 0.02665659412741661, -0.028170689940452576, 0.05403824895620346, 0.037724412977695465, 0.031923938542604446, 0.02326587587594986, -0.01923539862036705, -0.029386229813098907, 0.05049825459718704, 0.05693848803639412, -0.06286691129207611, -0.018126484006643295, -0.01747606322169304, -0.050626203417778015, 0.008535441942512989, -0.023735031485557556, 0.012944442220032215, 0.030217915773391724, -0.037447184324264526, 0.05228957533836365, 0.04640379920601845, -0.027765508741140366, -0.02226358838379383, -0.030879000201821327, -0.029023701325058937, -0.0077890572138130665, -0.009537729434669018, 0.06252571195363998, 0.03859874978661537, 0.033971164375543594, -0.06444498151540756, 0.028810447081923485, -0.06192860007286072, 0.009793632663786411, 0.05327054113149643, 0.08982206135988235, -0.02819201536476612, -0.01072661392390728, -0.00013669834879692644, 0.052886683493852615, 0.07996978610754013, 0.014117333106696606, -0.01580202952027321, -0.023926960304379463, -0.011568962596356869, -0.02318057417869568, -0.060947638005018234, -0.012144744396209717, -0.011409022845327854, 0.016591064631938934, 0.085087850689888, -0.0018659615889191628, 0.01092920359224081, -0.02230623923242092, 0.014661126770079136, -0.04083790257573128, -0.03810826689004898, -0.055914875119924545, -0.013808116316795349, -0.031113578006625175, -0.042117420583963394, -0.04670235514640808, 0.003918519243597984, -0.05527511611580849, 0.01620720885694027, -0.03277694806456566, 0.03448297083377838, 0.011643600650131702, -0.004771530628204346, -0.0352933332324028, 0.002205833327025175, -0.02132527530193329, -0.014511850662529469, 0.04964524134993553, 0.06593775004148483, -0.017188172787427902, -0.03096430003643036, 0.05220427364110947, -0.03975031524896622, -0.04045404866337776, 0.02725370228290558, -0.009340470656752586, -0.038129594177007675, 0.005581891164183617, 0.04947464168071747, 0.008492791093885899, -0.04262922704219818, 0.10492035746574402, 0.0017193503445014358, -0.006242974661290646, -0.019725879654288292, 0.03241441771388054, 0.00009812958887778223, 0.04047537222504616, -0.03827887028455734, -0.01002287957817316, -0.015311548486351967, -0.04636114835739136, -0.06943509727716446, -0.03525068238377571, -0.016484437510371208, 0.045508138835430145, 0.003918519243597984, 0.0016260523116216063, -0.06811293214559555, -0.05327054113149643, -0.018702266737818718, -0.023862984031438828, -0.023649731650948524, -0.011910166591405869, -0.05177776888012886, -0.0561281256377697, 0.022882021963596344, -0.030345868319272995, -0.0028549213893711567, -0.002587022492662072, 0.032073214650154114, 0.0062802936881780624, -0.03004731424152851, -0.06453028321266174, 0.074254609644413, -0.01588733121752739, 0.08611146360635757, 0.033523332327604294, -0.03719128295779228, -0.024907922372221947, 0.04981584474444389, 0.031198877841234207, -0.01566341519355774, -0.021474553272128105, -0.04508163407444954, -0.033288754522800446, -0.007293244358152151, 0.04725681245326996, -0.035463932901620865, 0.00562454154714942, 0.014458537101745605, -0.017710641026496887, -0.04665970429778099, 0.017444076016545296, -0.006141679361462593, 0.01951262727379799, -0.024545392021536827, 0.0109718544408679, 0.04938933998346329, 0.037404533475637436, -0.027040449902415276, 0.026059487834572792, 0.03162538260221481, 0.046872954815626144, 0.021922383457422256, -0.020152386277914047, 0.004254392348229885, -0.0024644022341817617, 0.017540039494633675, 0.03416309133172035, -0.022071661427617073, -0.002287135925143957, -0.04250127449631691, 0.0020072415936738253, 0.0656391978263855, 0.03680742532014847, -0.03748983517289162, 0.01159028708934784, -0.0007863695500418544, -0.024182863533496857, -0.014543837867677212, 0.02887442335486412, 0.0032734298147261143, 0.02625141479074955, 0.0153861865401268, 0.022519491612911224, -0.0015420840354636312, 0.05344114080071449, 0.01219805795699358, 0.11618010699748993, -0.024374790489673615, 0.008450140245258808, -0.04169091582298279, -0.055829573422670364, -0.00835417676717043, 0.01453317515552044, 0.047000907361507416, -0.01951262727379799, -0.0006560854380950332, -0.016644377261400223, -0.015599438920617104, 0.004691560752689838, -0.013200345449149609, -0.002548370510339737, -0.044058021157979965, -0.042479950934648514, -0.00700535299256444, 0.06508474051952362, 0.06457293778657913, 0.004347690846771002, -0.006237643305212259, 0.02008841000497341, -0.07250593602657318, -0.01619654707610607, -0.0037745737936347723, 0.027637558057904243, -0.052844032645225525, -0.029386229813098907, 0.012752515263855457, 0.034376345574855804, 0.013786790892481804, -0.046233199536800385, 0.0013981383526697755, -0.0033080833964049816, 0.08112134784460068, -0.005816468968987465, -0.004121109377592802, -0.006083034910261631, -0.030452493578195572, -0.0150449825450778, 0.025185151025652885, -0.05032765120267868, 0.0176573283970356, -0.033203452825546265, -0.003595974761992693, -0.05011439695954323, 0.0165164265781641, 0.01362685114145279, -0.009324477054178715, -0.008706043474376202, 0.0019445986254140735, 0.024545392021536827, -0.006765443831682205, 0.023372502997517586, -0.022754069417715073, 0.003524001920595765, -0.023777682334184647, -0.06478618830442429, -0.042970430105924606, 0.008412821218371391, -0.003638625144958496, -0.04665970429778099, -0.019384676590561867, 0.029045026749372482, 0.007223937194794416, 0.03940910845994949, 0.008199568837881088, 0.011536974459886551, -0.06952039897441864, 0.01224070880562067, -0.042565248906612396, 0.023436477407813072, -0.028597194701433182, 0.04354621469974518, -0.009521735832095146, -0.013616188429296017, 0.02448141761124134, 0.08244352042675018, -0.0670040175318718, 0.008865983225405216, -0.009265832602977753, 0.008956615813076496, 0.01669769175350666, 0.06205655261874199, -0.034504298120737076, 0.01800919510424137, -0.061032939702272415, 0.051393914967775345, 0.0029375567100942135, -0.0007897016475908458, 0.057194389402866364, -0.045380186289548874, 0.025142500177025795, 0.0007797054131515324, -0.039089228957891464, -0.011888841167092323, 0.01611124537885189, 0.04245862364768982, 0.007645111531019211, -0.02891707420349121, -0.0656391978263855, -0.02955683320760727, -0.03964368626475334, 0.04465512931346893, 0.04862162843346596, -0.017124196514487267, 0.002708310028538108, 0.023607080802321434, 0.011504986323416233, 0.00631228182464838, -0.05642668157815933, 0.05173511803150177, 0.05246017873287201, -0.006616166792809963, 0.04806717112660408, -0.008935290388762951, -0.02411888726055622, 0.024545392021536827, 0.00648288382217288, 0.019214073196053505, 0.0936606153845787, 0.03032454289495945, 0.015951305627822876, -0.006258968263864517, 0.05553101748228073, 0.09246639907360077, -0.0809933990240097, 0.033736586570739746, -0.03217983990907669, 0.04648910090327263, -0.026869848370552063, -0.014842391945421696, -0.01923539862036705, -0.013957393355667591, 0.039899591356515884, 0.0457213930785656, -0.002297798404470086, -0.01842503808438778, 0.026955148205161095, 0.025995511561632156, -0.0438874177634716, 0.009889597073197365, -0.11285336315631866, -0.029343578964471817, -0.0009836283279582858, 0.02625141479074955, 0.025355752557516098, -0.034696225076913834, -0.014735765755176544, -0.004363684449344873, 0.03975031524896622, 0.0547633096575737, 0.024566717445850372, -0.04290645569562912, 0.02915165200829506, 0.01457582600414753, -0.027765508741140366, -0.019043471664190292, -0.01805184595286846, 0.06845413893461227, -0.03290490061044693, 0.023052623495459557, 0.03761778771877289, -0.001272852416150272, -0.009985560551285744, -0.03420574218034744, 0.0035613211803138256, 0.05088210850954056, 0.020973408594727516, -0.001290845568291843, -0.023649731650948524, -0.026379365473985672, -0.041925493627786636, -0.009601705707609653, 0.04947464168071747, -0.0026443342212587595, -0.05382499471306801, 0.044783078134059906, 0.0001832640846259892, -0.0023617742117494345, 0.021165335550904274, -0.035591885447502136, 0.02516382560133934, 0.010188150219619274, 0.0036466221790760756, -0.04815247282385826, 0.01859564147889614, -0.009511073119938374, -0.021282624453306198, 0.03548526018857956, -0.05830330401659012, 0.060904987156391144, 0.021474553272128105, 0.036999352276325226, 0.02806406281888485, 0.016463113948702812, 0.002972210291773081, -0.0051074037328362465, -0.029791411012411118, -0.05629872903227806, 0.03646622225642204, -0.01534353569149971, -0.033523332327604294, -0.10244662314653397, -0.029492856934666634, -0.021751781925559044, -0.00945775955915451, -0.04499633237719536, 0.02086678333580494, 0.020514914765954018, -0.011089143343269825, -0.033693935722112656, -0.0008116933167912066, 0.04892018437385559, -0.009655018337070942, 0.0062056551687419415, -0.012560587376356125, -0.034781526774168015, -0.009479084983468056, -0.07169558107852936, -0.0488775335252285, 0.03932381048798561, -0.034099116921424866, 0.011792877689003944, 0.03367261216044426, -0.03633826971054077, -0.02303129807114601, -0.039579711854457855, 0.0038332182448357344, -0.008242218755185604, -0.009788301773369312, -0.00982028990983963, 0.012699201703071594, -0.03243574500083923, 0.03198791295289993, -0.0226261168718338, 0.015834016725420952, 0.038534775376319885, 0.01877690479159355, 0.003081502392888069, 0.0452522337436676, -0.0064135766588151455, -0.018393050879240036, -0.013168358244001865, -0.00816758070141077, -0.015855342149734497, 0.04862162843346596, -0.012326009571552277, 0.0043716817162930965, 0.001458115759305656, -0.024140212684869766, 0.0538676455616951, -0.006200323812663555, 0.012027455493807793, 0.02082413248717785, -0.008818001486361027, -0.03271297365427017, -0.0007277250406332314, 0.01237932313233614, -0.02588888444006443, -0.012485949322581291, -0.032606348395347595, 0.021165335550904274, 0.05037030205130577, 0.06367727369070053, -0.0019166091224178672, 0.05774884670972824, 0.010188150219619274, 0.027765508741140366, 0.0733589455485344, -0.036551523953676224, -0.010193482041358948, 0.041477661579847336, -0.055189814418554306, -0.05049825459718704, 0.02588888444006443, -0.029791411012411118, -0.02810671366751194, 0.04738476127386093, -0.05267343297600746, 0.0012881800066679716, -0.01514094602316618, -0.07391340285539627, 0.0678996816277504, 0.014245284721255302, 0.0025936865713447332, 0.026955148205161095, 0.0129017923027277, 0.00695737125352025, -0.0479818694293499, 0.005699180066585541, 0.03092164918780327, 0.01518359687179327, 0.007191949523985386, -0.06824088096618652, 0.04665970429778099, 0.023521779105067253, -0.018041184172034264, -0.02674189582467079, 0.029300929978489876, 0.0402834452688694, 0.010811914689838886, -0.03060177154839039, 0.03467489778995514, 0.07161027938127518, 0.04529488459229469, 0.017316123470664024, 0.004222404677420855, 0.014597151428461075, 0.028853097930550575, -0.025270452722907066, -0.016217872500419617, 0.0783064141869545, 0.04883488267660141, -0.0038678718265146017, 0.036146342754364014, 0.0710558220744133, 0.025185151025652885, 0.06231245771050453, 0.006808094214648008, -0.01675100438296795, 0.042479950934648514, 0.02927960455417633, 0.047640666365623474, 0.010561343282461166, 0.05996667593717575, -0.04032609611749649, 0.03943043574690819, 0.02139991521835327, 0.02657129429280758, 0.0266992449760437, -0.06730256974697113, -0.002561698667705059, 0.013968056067824364, -0.03198791295289993, -0.034141767770051956, 0.04823777452111244, -0.023607080802321434, 0.02846924401819706, -0.022690093144774437, 0.005496589932590723, 0.04085922986268997, 0.012997755780816078, -0.0620139017701149, -0.017497388646006584, -0.033608634024858475, 0.026485992595553398, -0.006290956400334835, -0.010316101834177971, -0.0642743781208992, -0.03539995849132538, -0.003358731046319008, -0.007335894741117954, 0.0033240774646401405, -0.0583886057138443, -0.006914720870554447, 0.06725992262363434, -0.0389186292886734, 0.012464623898267746, -0.01915009692311287, 0.0235431045293808, -0.02484394609928131, 0.009527066722512245, -0.039537061005830765, -0.05233222618699074, 0.010870559141039848, 0.020749492570757866, -0.06674811244010925, -0.009724325500428677, 0.07412666082382202, -0.013893417082726955, 0.0010942532680928707, -0.03068707138299942, -0.04269320145249367, 0.02742430567741394, 0.01482106652110815, -0.0008703378261998296, -0.017678653821349144, -0.007458515465259552, 0.007325232494622469, -0.026038162410259247, -0.029770085588097572, 0.008844657801091671, 0.012549924664199352, 0.0077890572138130665, -0.04584934189915657, 0.001582068856805563, -0.013701490126550198, -0.014277271926403046, 0.07677099108695984, -0.0300899650901556, -0.0021751781459897757, 0.022754069417715073, 0.0488775335252285, 0.038854651153087616, -0.05156451836228371, -0.053611744195222855, 0.03113490343093872, -0.04806717112660408, 0.0028522557113319635, 0.0027029786724597216, -0.003388053271919489, 0.01520492136478424, 0.05169246718287468, -0.0169749204069376, -0.004544949624687433, 0.010534686036407948, 0.03859874978661537, 0.0033240774646401405, 0.010779926553368568, -0.019533952698111534, 0.042543925344944, 0.011622275225818157, 0.014501187950372696, -0.0013175022322684526, 0.008268876001238823, -0.022711418569087982, 0.022007685154676437, 0.01409600768238306, 0.08363772928714752, 0.004273052327334881, -0.0064882151782512665, 0.010742607526481152, -0.06815557926893234, -0.02266876772046089, 0.010737276636064053, 0.030516469851136208, 0.020024433732032776, 0.023500453680753708, 0.013115044683218002, -0.0334806814789772, -0.05706643685698509, 0.01896883361041546, 0.01310438197106123, -0.02665659412741661, -0.01514094602316618, 0.025099849328398705, 0.0010056199971586466, -0.02770153433084488, 0.009889597073197365, 0.03851344808936119, -0.0006694137118756771, -0.04309838265180588, -0.041477661579847336, -0.03313947841525078, 0.011078480631113052, -0.048451028764247894, -0.03424839302897453, 0.021485215052962303, -0.041435010731220245, -0.0443565733730793, 0.07395605742931366, 0.0389186292886734, -0.03000466339290142, 0.017134858295321465, 0.10099650919437408, 0.01860630325973034, -0.0651700422167778, -0.03896128013730049, -0.010444053448736668, 0.014586488716304302, 0.014981006272137165, 0.010188150219619274, 0.033693935722112656, 0.012635226361453533, -0.00031321498681791127, -0.017444076016545296, -0.03375791013240814, -0.012123418971896172, 0.02693382278084755, -0.05463535711169243, 0.061075590550899506, -0.0511380098760128, -0.03716995567083359, 0.016804317012429237, -0.014554500579833984, 0.06005197763442993, -0.061032939702272415, -0.0420960932970047, 0.059668123722076416, -0.028895748779177666, -0.0028309302870184183, 0.07502231746912003, 0.014351910911500454, -0.05412355065345764, 0.006994690280407667, 0.07178087532520294, -0.0638052225112915, 0.028938399627804756, -0.058090053498744965, -0.0011915498180314898, 0.03156140819191933, 0.02480129525065422, 0.017870580777525902, 0.01729479804635048, -0.006306950468569994, -0.010641312226653099, 0.06977630406618118, -0.08197435736656189, 0.015418174676597118, 0.02443876676261425, 0.057023786008358, 0.010827909223735332, -0.04124308377504349, -0.021293288096785545, 0.024694669991731644, -0.030217915773391724, 0.055104512721300125, -0.022796720266342163, 0.013861428946256638, 0.050711505115032196, -0.012294021435081959, -0.04874958097934723, -0.025377077981829643, -0.029727434739470482, 0.006402913946658373, 0.049133434891700745, 0.05983872339129448, -0.0013081723591312766, 0.03672212362289429, -0.049218736588954926, 0.031220203265547752, 0.014693114906549454, 0.004731545690447092, 0.035783812403678894, 0.02249816618859768, -0.0057684872299432755, 0.03072972223162651, 0.009580380283296108, -0.005475264508277178, -0.07540617883205414, -0.02503587305545807, -0.035378631204366684, 0.012677876278758049, -0.008679387159645557, 0.02746695466339588, 0.032243818044662476, 0.01461847685277462, 0.004512961488217115 ]
4,743
optbinning.binning.binning
__init__
null
def __init__(self, name="", dtype="numerical", prebinning_method="cart", solver="cp", divergence="iv", max_n_prebins=20, min_prebin_size=0.05, min_n_bins=None, max_n_bins=None, min_bin_size=None, max_bin_size=None, min_bin_n_nonevent=None, max_bin_n_nonevent=None, min_bin_n_event=None, max_bin_n_event=None, monotonic_trend="auto", min_event_rate_diff=0, max_pvalue=None, max_pvalue_policy="consecutive", gamma=0, outlier_detector=None, outlier_params=None, class_weight=None, cat_cutoff=None, cat_unknown=None, user_splits=None, user_splits_fixed=None, special_codes=None, split_digits=None, mip_solver="bop", time_limit=100, verbose=False, **prebinning_kwargs): self.name = name self.dtype = dtype self.prebinning_method = prebinning_method self.solver = solver self.divergence = divergence self.max_n_prebins = max_n_prebins self.min_prebin_size = min_prebin_size self.min_n_bins = min_n_bins self.max_n_bins = max_n_bins self.min_bin_size = min_bin_size self.max_bin_size = max_bin_size self.min_bin_n_event = min_bin_n_event self.max_bin_n_event = max_bin_n_event self.min_bin_n_nonevent = min_bin_n_nonevent self.max_bin_n_nonevent = max_bin_n_nonevent self.monotonic_trend = monotonic_trend self.min_event_rate_diff = min_event_rate_diff self.max_pvalue = max_pvalue self.max_pvalue_policy = max_pvalue_policy self.gamma = gamma self.outlier_detector = outlier_detector self.outlier_params = outlier_params self.class_weight = class_weight self.cat_cutoff = cat_cutoff self.cat_unknown = cat_unknown self.user_splits = user_splits self.user_splits_fixed = user_splits_fixed self.special_codes = special_codes self.split_digits = split_digits self.mip_solver = mip_solver self.time_limit = time_limit self.verbose = verbose self.prebinning_kwargs = prebinning_kwargs # auxiliary self._flag_min_n_event_nonevent = False self._categories = None self._cat_others = None self._n_event = None self._n_nonevent = None self._n_nonevent_missing = None self._n_event_missing = None self._n_nonevent_special = None self._n_event_special = None self._n_nonevent_cat_others = None self._n_event_cat_others = None self._problem_type = "classification" # info self._binning_table = None self._n_prebins = None self._n_refinements = 0 self._n_samples = None self._optimizer = None self._solution = None self._splits_optimal = None self._status = None # timing self._time_total = None self._time_preprocessing = None self._time_prebinning = None self._time_solver = None self._time_optimizer = None self._time_postprocessing = None self._is_fitted = False
(self, name='', dtype='numerical', prebinning_method='cart', solver='cp', divergence='iv', max_n_prebins=20, min_prebin_size=0.05, min_n_bins=None, max_n_bins=None, min_bin_size=None, max_bin_size=None, min_bin_n_nonevent=None, max_bin_n_nonevent=None, min_bin_n_event=None, max_bin_n_event=None, monotonic_trend='auto', min_event_rate_diff=0, max_pvalue=None, max_pvalue_policy='consecutive', gamma=0, outlier_detector=None, outlier_params=None, class_weight=None, cat_cutoff=None, cat_unknown=None, user_splits=None, user_splits_fixed=None, special_codes=None, split_digits=None, mip_solver='bop', time_limit=100, verbose=False, **prebinning_kwargs)
[ 0.023427613079547882, -0.02795771136879921, -0.053754620254039764, 0.017276916652917862, -0.028109345585107803, -0.06607496738433838, -0.09120848029851913, -0.04791667312383652, -0.03491396829485893, -0.07475607842206955, -0.03976628929376602, 0.04052446410059929, -0.006681418977677822, -0.009055455215275288, -0.03180544823408127, 0.049622565507888794, 0.004985001869499683, -0.005492031574249268, 0.0010709224734455347, -0.020622365176677704, -0.012386687099933624, -0.0009323185659013689, -0.03881857171654701, 0.0769926905632019, 0.023882519453763962, 0.031615905463695526, -0.005833210423588753, -0.03286689519882202, -0.027843983843922615, 0.0005393113242462277, -0.04279898852109909, -0.020811909809708595, -0.0005668544326908886, -0.021778583526611328, 0.02124786004424095, -0.05720432102680206, 0.0666436031460762, 0.004030175041407347, -0.09113266319036484, 0.032885849475860596, 0.028753794729709625, -0.08643197268247604, -0.006051186006516218, -0.002999530639499426, 0.005454123020172119, 0.024166835471987724, -0.0031582736410200596, 0.04875066503882408, -0.013040613383054733, -0.009818368591368198, -0.04814412444829941, -0.0644448921084404, 0.04848530516028404, 0.04135845601558685, -0.05151800438761711, 0.09075357019901276, 0.03389042988419533, 0.039273474365472794, -0.003850108478218317, 0.016234425827860832, -0.04605914279818535, 0.059440936893224716, 0.0642932578921318, -0.04715849831700325, -0.01111674401909113, -0.009320816025137901, -0.06277690827846527, 0.008548425510525703, -0.014727553352713585, 0.022043943405151367, 0.06357298791408539, -0.02373088337481022, 0.03527410328388214, 0.03988001495599747, -0.028791703283786774, -0.026668813079595566, -0.04920557141304016, -0.029739422723650932, 0.008908558636903763, -0.023446567356586456, 0.05849321559071541, 0.05837948992848396, 0.006373410113155842, -0.05966838821768761, 0.04723431542515755, -0.046817317605018616, 0.02795771136879921, 0.08946467190980911, 0.027104763314127922, -0.03379565849900246, -0.045869600027799606, -0.002684414153918624, 0.0402211956679821, 0.0828685462474823, 0.03091459348797798, -0.016746195033192635, -0.02655508741736412, -0.03603227809071541, 0.0074301171116530895, -0.05655987188220024, -0.020584456622600555, -0.034383244812488556, -0.003077717497944832, 0.029246607795357704, -0.013988332822918892, -0.006880439817905426, -0.02809039130806923, 0.007667046971619129, -0.04571796581149101, -0.05606705695390701, -0.0109366774559021, 0.019807327538728714, -0.02737012505531311, -0.022441986948251724, -0.03176753968000412, 0.009022285230457783, -0.045225150883197784, -0.010387000627815723, -0.01952301152050495, 0.04143427312374115, 0.0042765820398926735, -0.011988645419478416, -0.0339852049946785, 0.04950883984565735, -0.02373088337481022, -0.01305009052157402, 0.05549842491745949, 0.05538469925522804, 0.014737030491232872, -0.04135845601558685, 0.05928930267691612, -0.03345448151230812, -0.019977916032075882, 0.06361089646816254, 0.008472607471048832, -0.03667672723531723, 0.015040300786495209, 0.035293057560920715, -0.014016764238476753, -0.012993227690458298, 0.09272482991218567, -0.011581126600503922, 0.022726301103830338, -0.018120387569069862, 0.03459174558520317, 0.00816933810710907, 0.002261494519189, -0.056294508278369904, -0.045490510761737823, -0.028886474668979645, -0.014481146819889545, -0.047044772654771805, -0.03186231479048729, -0.02528514340519905, 0.04605914279818535, -0.005529940593987703, -0.01672724075615406, -0.04852321371436119, -0.05015328899025917, -0.022441986948251724, -0.036183912307024, -0.025569459423422813, 0.004913922864943743, -0.0357479602098465, -0.04628659784793854, 0.02392042800784111, -0.032885849475860596, -0.031976040452718735, -0.006880439817905426, 0.03184335678815842, 0.015125595033168793, -0.05151800438761711, -0.04458070173859596, 0.05329971760511398, -0.06023702025413513, 0.09757714718580246, 0.025531550869345665, -0.027559667825698853, -0.04757549241185188, 0.04075191915035248, 0.018328886479139328, -0.018802745267748833, -0.0287727490067482, -0.03652508929371834, -0.036923132836818695, 0.0038548470474779606, 0.05329971760511398, -0.03294271230697632, 0.03017537295818329, 0.015087686479091644, 0.004359507467597723, -0.031426362693309784, 0.014737030491232872, 0.020091643556952477, 0.01913444697856903, -0.013201725669205189, -0.0016987862763926387, 0.049319297075271606, 0.0100742531940341, 0.004335814621299505, 0.0022164778783917427, 0.0426473543047905, 0.03976628929376602, 0.003380987560376525, -0.03671463578939438, -0.018328886479139328, -0.01370401680469513, 0.018736405298113823, 0.03000478446483612, -0.013287020847201347, -0.004956570453941822, -0.03889438882470131, 0.013561858795583248, 0.05906184762716293, 0.043557167053222656, -0.00872375350445509, 0.04393625259399414, 0.01838574931025505, -0.03227930888533592, -0.00432870676741004, 0.0482957623898983, -0.00795610062777996, -0.0060132769867777824, -0.020546548068523407, 0.010927200317382812, 0.007283220533281565, 0.04207872226834297, 0.04780294746160507, 0.08180710673332214, -0.0013895930023863912, 0.007349560968577862, -0.002753123641014099, -0.014310557395219803, 0.012784729711711407, 0.019191309809684753, 0.03667672723531723, -0.03972838073968887, 0.004658038727939129, -0.037188492715358734, -0.02528514340519905, 0.03950092941522598, -0.009055455215275288, -0.014983437955379486, -0.03328389301896095, -0.023579249158501625, -0.02890542894601822, 0.06273899972438812, 0.07498352974653244, -0.02047073096036911, 0.0017165560275316238, -0.006283376831561327, -0.04321598634123802, -0.021892309188842773, -0.012291915714740753, -0.0017971121706068516, -0.06273899972438812, -0.009320816025137901, 0.008614765480160713, 0.04696895554661751, 0.003655825974419713, -0.004790719598531723, -0.010898768901824951, 0.0036108093336224556, 0.03915974870324135, -0.010102684609591961, 0.019807327538728714, 0.010548112913966179, -0.009671472012996674, 0.003530253190547228, 0.045907508581876755, -0.05614287406206131, 0.008193030953407288, -0.016414493322372437, 0.012633094564080238, -0.03857216238975525, -0.02200603485107422, -0.004087038338184357, 0.0026986298616975546, 0.01018797978758812, 0.0012509890366345644, 0.04556633159518242, 0.002480654511600733, 0.04283690080046654, 0.012026553973555565, -0.034610699862241745, -0.026801493018865585, -0.053527168929576874, -0.016945214942097664, 0.04370880126953125, 0.0019037305610254407, -0.047044772654771805, 0.01826254464685917, 0.04276107996702194, 0.012045508250594139, 0.05197291076183319, 0.002411944791674614, 0.032753169536590576, -0.05178336799144745, 0.02441324107348919, -0.026024363934993744, 0.014670690521597862, -0.033378664404153824, 0.022840028628706932, -0.022366167977452278, -0.03834471106529236, 0.019807327538728714, 0.08089729398488998, -0.02977733127772808, 0.02528514340519905, -0.01711580529808998, 0.018414180725812912, 0.028659023344516754, 0.07407371699810028, 0.015959588810801506, 0.012329824268817902, -0.023446567356586456, 0.022536758333444595, -0.0013753771781921387, 0.027294307947158813, 0.07555215805768967, -0.03857216238975525, 0.04283690080046654, 0.008936990052461624, -0.027199534699320793, -0.003215136704966426, -0.007667046971619129, 0.03961465507745743, -0.0073211295530200005, -0.03072505071759224, -0.050949372351169586, -0.023408658802509308, -0.026043318212032318, 0.03629763796925545, 0.0460970513522625, -0.03544469177722931, -0.00002574760037532542, -0.00216435338370502, -0.006662464700639248, 0.002163168741390109, -0.07885022461414337, 0.06543052196502686, 0.024526968598365784, -0.01903967559337616, 0.06812204420566559, -0.020357003435492516, -0.07566588371992111, 0.029208699241280556, -0.03673359006643295, 0.020660273730754852, 0.07528679817914963, 0.02691522054374218, -0.000250997458351776, -0.0017461723182350397, 0.11001121997833252, 0.08233782649040222, -0.04708268120884895, 0.007022597827017307, -0.05701477453112602, 0.023579249158501625, -0.022479895502328873, 0.0004990333109162748, -0.002197523368522525, -0.027161626145243645, 0.06834949553012848, 0.04113100469112396, -0.0010075437603518367, -0.02405310794711113, 0.014670690521597862, 0.018404703587293625, -0.025626322254538536, -0.0033572944812476635, -0.08006329834461212, -0.04526305943727493, 0.013097476214170456, 0.000847616174723953, 0.00005963966032140888, -0.033113300800323486, 0.01082295086234808, -0.03172963112592697, -0.02160799317061901, 0.014121012762188911, 0.03686627000570297, -0.06577169895172119, 0.044087886810302734, 0.004454279318451881, -0.009117056615650654, -0.006496613845229149, -0.014443237334489822, 0.10948050022125244, -0.030535506084561348, -0.00009114391286857426, 0.025209326297044754, -0.004797827452421188, -0.014869711361825466, -0.0402211956679821, -0.008311496116220951, 0.05883439630270004, 0.026384497061371803, -0.0304975975304842, -0.025304097682237625, -0.02395833656191826, -0.07028283923864365, -0.0005567849148064852, 0.04806830734014511, -0.009434542618691921, -0.051669638603925705, 0.06126055493950844, -0.021361585706472397, 0.005089250858873129, 0.0402211956679821, 0.003380987560376525, 0.045225150883197784, -0.02102040685713291, -0.03607018664479256, -0.08415744453668594, 0.008766400627791882, -0.0505702868103981, -0.049091845750808716, 0.061753369867801666, -0.02206289768218994, 0.031388454139232635, 0.06683314591646194, 0.042192451655864716, 0.008060350082814693, 0.016168085858225822, 0.035691097378730774, -0.013561858795583248, -0.009439281187951565, -0.04761340469121933, 0.015163504518568516, -0.04260944575071335, 0.01728639379143715, -0.0874934196472168, -0.022858982905745506, 0.0126615259796381, -0.013144862838089466, -0.040372829884290695, 0.006615078542381525, 0.007505934685468674, -0.012746820226311684, -0.00553941773250699, -0.01803509332239628, 0.04423952475190163, -0.0008950021583586931, -0.0166988093405962, -0.03413683921098709, -0.062208276242017746, -0.012500413693487644, -0.056484051048755646, -0.03127472847700119, 0.05728013813495636, -0.01173276174813509, 0.028469478711485863, 0.004880752880126238, 0.0032980621326714754, -0.02124786004424095, -0.030744004994630814, 0.0034757594112306833, 0.019636737182736397, -0.02337075024843216, -0.028469478711485863, 0.02395833656191826, -0.018565814942121506, 0.032336171716451645, -0.0033596637658774853, 0.015902724117040634, 0.027749212458729744, 0.023351795971393585, -0.011306287720799446, 0.040410738438367844, 0.005999061278998852, 0.0007184894639067352, 0.019541965797543526, -0.012642571702599525, -0.043405529111623764, 0.03205185756087303, -0.031388454139232635, 0.00012690549192484468, 0.022934800013899803, -0.030706096440553665, 0.06922139972448349, -0.0321466289460659, 0.020622365176677704, 0.025531550869345665, -0.007676524110138416, -0.007614922244101763, -0.0035610541235655546, -0.00023100650287233293, -0.013419700786471367, 0.01191282831132412, -0.08673524111509323, 0.01903967559337616, 0.05329971760511398, 0.08628033846616745, 0.02160799317061901, 0.05803831294178963, 0.024526968598365784, 0.01016902457922697, 0.042002905160188675, -0.016386061906814575, 0.009349248372018337, 0.03159695118665695, -0.03752967342734337, -0.05204872786998749, 0.028147254139184952, -0.05508142709732056, -0.06793250143527985, 0.023579249158501625, -0.05659778043627739, 0.014670690521597862, 0.0046414537355303764, -0.059478845447301865, 0.06251154839992523, 0.0025920115876942873, 0.001409732038155198, 0.004072822630405426, -0.0031179955694824457, 0.009614609181880951, -0.060426563024520874, 0.02610018104314804, 0.04791667312383652, 0.05455070734024048, 0.022119762375950813, -0.04780294746160507, 0.00935398694127798, 0.03294271230697632, 0.025076644495129585, -0.03180544823408127, 0.0391218401491642, 0.02922765351831913, -0.011742238886654377, -0.023806702345609665, 0.021304722875356674, 0.07619661092758179, 0.024887101724743843, 0.02909497357904911, 0.01028275117278099, 0.001587429316714406, 0.04916766285896301, -0.05223827064037323, -0.011495831422507763, 0.0551951564848423, 0.0874176025390625, -0.010017390362918377, 0.005624712444841862, 0.05841739848256111, 0.011268379166722298, 0.07938094437122345, -0.007425378542393446, -0.03976628929376602, 0.028033528476953506, 0.013211202807724476, 0.04621077701449394, -0.0027673395816236734, 0.07066193222999573, -0.02968255989253521, 0.05921348184347153, 0.014291602186858654, 0.04605914279818535, 0.024318469688296318, -0.07498352974653244, 0.007302174810320139, -0.00044068932766094804, -0.04124473035335541, -0.033473435789346695, 0.01903967559337616, 0.004793088883161545, 0.030895639210939407, -0.025398869067430496, 0.005946936551481485, 0.025436777621507645, 0.005672098137438297, -0.05383044108748436, -0.004719640593975782, -0.05216245353221893, -0.008913297206163406, -0.0345727875828743, -0.0024853930808603764, -0.07308808714151382, -0.05818994715809822, 0.01913444697856903, -0.01754227839410305, -0.015343571081757545, -0.08188292384147644, -0.014945528469979763, 0.04696895554661751, -0.045225150883197784, -0.00044572408660314977, 0.0016976016340777278, 0.009197613224387169, -0.021494267508387566, 0.0033833568450063467, -0.02636554278433323, -0.0322224460542202, -0.014007287099957466, 0.04992583766579628, -0.03027014434337616, 0.00039330340223386884, -0.002537517575547099, -0.00787554495036602, -0.014519055373966694, 0.010292228311300278, 0.0004700093995779753, 0.027066854760050774, 0.034743379801511765, -0.017665483057498932, -0.03561528027057648, 0.035198282450437546, 0.009008069522678852, -0.02642240561544895, -0.010225888341665268, 0.022593621164560318, 0.01036804635077715, -0.005112944170832634, -0.018110910430550575, -0.03241198882460594, -0.03328389301896095, 0.000055974654969759285, 0.09022285044193268, -0.032468851655721664, -0.012652048841118813, 0.030573414638638496, 0.014547486789524555, 0.03440219908952713, -0.07130637764930725, -0.07350508868694305, 0.027389079332351685, -0.1012922078371048, 0.02378774620592594, -0.036828361451625824, 0.028621114790439606, -0.008813786320388317, 0.0803665742278099, -0.0598200224339962, 0.007396946661174297, 0.0195609200745821, 0.03517932817339897, 0.04033492133021355, -0.0009980666218325496, 0.011590603739023209, 0.056294508278369904, 0.004136793315410614, 0.006975211668759584, -0.008311496116220951, 0.012822638265788555, -0.02678253874182701, -0.00867162924259901, -0.0007629137835465372, 0.09734969586133957, 0.012689957395195961, -0.018888039514422417, 0.020167460665106773, -0.045187242329120636, -0.02649822272360325, -0.04238199442625046, 0.020641319453716278, -0.009941572323441505, 0.014604349620640278, 0.00903176236897707, -0.04647614061832428, -0.03589959442615509, 0.026062272489070892, 0.015372002497315407, -0.016784103587269783, 0.001194125972688198, 0.00719318725168705, 0.015286707319319248, -0.016746195033192635, 0.00510820560157299, 0.045680057257413864, -0.010927200317382812, -0.016613515093922615, -0.018016139045357704, -0.0059801070019602776, -0.0019759940914809704, -0.008287802338600159, -0.018044570460915565, 0.011021971702575684, -0.005710007157176733, -0.014765461906790733, 0.038458436727523804, 0.03009955585002899, -0.04071400687098503, -0.014755984768271446, 0.07316390424966812, 0.017466461285948753, -0.03857216238975525, -0.024337423965334892, -0.01125890202820301, -0.029436152428388596, 0.02827993594110012, 0.03807935118675232, 0.0253230519592762, -0.01125890202820301, 0.00004516473563853651, -0.035065602511167526, -0.0483715794980526, -0.0425715371966362, 0.025342006236314774, -0.0357479602098465, 0.04810621589422226, -0.03017537295818329, -0.02649822272360325, 0.008425221778452396, -0.022858982905745506, 0.07316390424966812, -0.05815203860402107, -0.021589038893580437, 0.02551259659230709, -0.013002704828977585, 0.032298263162374496, 0.092194102704525, 0.031293682754039764, -0.02805248275399208, 0.013827220536768436, 0.07069984078407288, -0.025266189128160477, 0.02754071354866028, -0.07096520066261292, 0.0019345313776284456, 0.002947406144812703, 0.02900020219385624, 0.018594246357679367, 0.019636737182736397, -0.018044570460915565, -0.0034899753518402576, 0.05333762615919113, -0.06979002803564072, 0.03768130764365196, 0.014964482747018337, 0.04086564481258392, 0.020091643556952477, -0.033378664404153824, -0.011420014314353466, 0.03104727528989315, -0.05038074404001236, 0.05068401247262955, -0.024109970778226852, 0.039425112307071686, 0.035103511065244675, -0.04469442740082741, -0.006103310268372297, -0.04310226067900658, 0.006198082119226456, -0.034155793488025665, 0.03931138291954994, 0.03364402428269386, -0.006335501559078693, 0.03267735242843628, -0.05250363424420357, 0.02151322178542614, 0.029151836410164833, -0.0018681910587474704, 0.032336171716451645, 0.01643344759941101, -0.05170754715800285, 0.04768922179937363, 0.0071647558361291885, -0.0007605444989167154, -0.0655442476272583, -0.040789827704429626, -0.04765131324529648, 0.0009346878505311906, 0.014490623958408833, 0.0032269831281155348, 0.03063027746975422, 0.025152461603283882, -0.012832115404307842 ]
4,751
optbinning.binning.binning
_fit
null
def _fit(self, x, y, sample_weight, check_input): time_init = time.perf_counter() if self.verbose: logger.info("Optimal binning started.") logger.info("Options: check parameters.") _check_parameters(**self.get_params()) # Pre-processing if self.verbose: logger.info("Pre-processing started.") self._n_samples = len(x) if self.verbose: logger.info("Pre-processing: number of samples: {}" .format(self._n_samples)) time_preprocessing = time.perf_counter() [x_clean, y_clean, x_missing, y_missing, x_special, y_special, y_others, categories, cat_others, sw_clean, sw_missing, sw_special, sw_others] = split_data( self.dtype, x, y, self.special_codes, self.cat_cutoff, self.user_splits, check_input, self.outlier_detector, self.outlier_params, None, None, self.class_weight, sample_weight) self._time_preprocessing = time.perf_counter() - time_preprocessing if self.verbose: n_clean = len(x_clean) n_missing = len(x_missing) n_special = len(x_special) logger.info("Pre-processing: number of clean samples: {}" .format(n_clean)) logger.info("Pre-processing: number of missing samples: {}" .format(n_missing)) logger.info("Pre-processing: number of special samples: {}" .format(n_special)) if self.outlier_detector is not None: n_outlier = self._n_samples-(n_clean + n_missing + n_special) logger.info("Pre-processing: number of outlier samples: " "{}".format(n_outlier)) if self.dtype == "categorical": n_categories = len(categories) n_categories_others = len(cat_others) n_others = len(y_others) logger.info("Pre-processing: number of others samples: " "{}".format(n_others)) logger.info("Pre-processing: number of categories: {}" .format(n_categories)) logger.info("Pre-processing: number of categories " "others: {}".format(n_categories_others)) logger.info("Pre-processing terminated. Time: {:.4f}s" .format(self._time_preprocessing)) # Pre-binning if self.verbose: logger.info("Pre-binning started.") time_prebinning = time.perf_counter() if self.user_splits is not None: n_splits = len(self.user_splits) if self.verbose: logger.info("Pre-binning: user splits supplied: {}" .format(n_splits)) if not n_splits: splits = self.user_splits n_nonevent = np.array([]) n_event = np.array([]) else: if self.dtype == "numerical": user_splits = check_array( self.user_splits, ensure_2d=False, dtype=None, force_all_finite=True) if len(set(user_splits)) != len(user_splits): raise ValueError("User splits are not unique.") sorted_idx = np.argsort(user_splits) user_splits = user_splits[sorted_idx] else: [categories, user_splits, x_clean, y_clean, y_others, cat_others, sw_clean, sw_others, sorted_idx, ] = preprocessing_user_splits_categorical( self.user_splits, x_clean, y_clean, sw_clean) if self.user_splits_fixed is not None: self.user_splits_fixed = np.asarray( self.user_splits_fixed)[sorted_idx] splits, n_nonevent, n_event = self._prebinning_refinement( user_splits, x_clean, y_clean, y_missing, x_special, y_special, y_others, sw_clean, sw_missing, sw_special, sw_others) else: splits, n_nonevent, n_event = self._fit_prebinning( x_clean, y_clean, y_missing, x_special, y_special, y_others, self.class_weight, sw_clean, sw_missing, sw_special, sw_others) self._n_prebins = len(n_nonevent) self._categories = categories self._cat_others = cat_others self._time_prebinning = time.perf_counter() - time_prebinning if self.verbose: logger.info("Pre-binning: number of prebins: {}" .format(self._n_prebins)) logger.info("Pre-binning: number of refinements: {}" .format(self._n_refinements)) logger.info("Pre-binning terminated. Time: {:.4f}s" .format(self._time_prebinning)) # Optimization self._fit_optimizer(splits, n_nonevent, n_event) # Post-processing if self.verbose: logger.info("Post-processing started.") logger.info("Post-processing: compute binning information.") time_postprocessing = time.perf_counter() if not len(splits): t_info = target_info_samples(y_clean, sw_clean) n_nonevent = np.array([t_info[0]]) n_event = np.array([t_info[1]]) self._n_nonevent, self._n_event = bin_info( self._solution, n_nonevent, n_event, self._n_nonevent_missing, self._n_event_missing, self._n_nonevent_special, self._n_event_special, self._n_nonevent_cat_others, self._n_event_cat_others, cat_others) if self.dtype == "numerical": min_x = x_clean.min() max_x = x_clean.max() else: min_x = None max_x = None self._binning_table = BinningTable( self.name, self.dtype, self.special_codes, self._splits_optimal, self._n_nonevent, self._n_event, min_x, max_x, self._categories, self._cat_others, self.user_splits) self._time_postprocessing = time.perf_counter() - time_postprocessing if self.verbose: logger.info("Post-processing terminated. Time: {:.4f}s" .format(self._time_postprocessing)) self._time_total = time.perf_counter() - time_init if self.verbose: logger.info("Optimal binning terminated. Status: {}. Time: {:.4f}s" .format(self._status, self._time_total)) # Completed successfully self._is_fitted = True return self
(self, x, y, sample_weight, check_input)
[ -0.012733753770589828, -0.014053060673177242, -0.053944990038871765, 0.029005205258727074, -0.03664741292595863, -0.07419390976428986, -0.0758357122540474, -0.013456929475069046, -0.02478342317044735, -0.04323417320847511, -0.0379178561270237, 0.013945561833679676, 0.01704348996281624, -0.01681871898472309, -0.050114113837480545, 0.041475098580121994, -0.00766175240278244, 0.010525137186050415, -0.015538502484560013, -0.011101722717285156, -0.05238136649131775, -0.02566296048462391, -0.033871982246637344, 0.07157483696937561, 0.03322698548436165, 0.010964905843138695, -0.013701246120035648, -0.02658158913254738, -0.0022318274714052677, 0.0037160476204007864, -0.006034607067704201, -0.027910668402910233, 0.04464143514633179, -0.0364324152469635, 0.016232360154390335, -0.04276508837938309, 0.05269409343600273, 0.039559658616781235, -0.01101376861333847, 0.04968411847949028, 0.00781322829425335, -0.12360439449548721, 0.003674513893201947, 0.032992444932460785, -0.0124894380569458, 0.025447962805628777, -0.009523441083729267, 0.06094220280647278, -0.013564429245889187, -0.01612486131489277, -0.053045906126499176, -0.09084649384021759, 0.036686502397060394, 0.05644678696990013, -0.014658965170383453, 0.03434106707572937, 0.03600241616368294, 0.006655170116573572, 0.013329884968698025, -0.026562044396996498, 0.017610304057598114, 0.056954964995384216, 0.026952950283885002, -0.015499412082135677, 0.006518353242427111, -0.012987842783331871, -0.07352937012910843, 0.019222788512706757, -0.006533012259751558, 0.04858958348631859, 0.0462050586938858, 0.007217097096145153, 0.05758041515946388, 0.03522060811519623, -0.06016039103269577, -0.018245525658130646, -0.008609699085354805, -0.019662559032440186, -0.0020571413915604353, -0.05238136649131775, 0.07888477295637131, 0.0779075101017952, -0.02003391832113266, -0.07005030661821365, 0.013046478852629662, -0.035924237221479416, 0.020366188138723373, 0.06281854957342148, 0.0029195770621299744, -0.020757094025611877, -0.024646606296300888, 0.03154609352350235, 0.060668569058179855, 0.0920192077755928, 0.05234227702021599, -0.0011208000360056758, -0.05515679717063904, -0.007842546328902245, -0.002138987183570862, -0.036666955798864365, -0.006415740121155977, -0.002222054870799184, 0.012811935506761074, 0.07599207758903503, 0.021480269730091095, 0.00432439474388957, 0.013437384739518166, -0.0198971014469862, -0.05324136093258858, -0.04331235587596893, -0.0362369604408741, -0.008145498111844063, -0.054922256618738174, 0.005277227144688368, -0.03656923025846481, -0.0218711756169796, -0.03453652188181877, 0.0499577522277832, -0.061567652970552444, 0.06485126167535782, 0.0012912105303257704, -0.006684488151222467, -0.030764281749725342, -0.007837659679353237, -0.014228968881070614, -0.02202753722667694, 0.037878766655921936, 0.07517117261886597, 0.018225979059934616, -0.033011987805366516, 0.006919031497091055, -0.0044318935833871365, -0.021421633660793304, 0.03537696972489357, -0.045462336391210556, -0.025389326736330986, -0.0076422072015702724, 0.04878503456711769, 0.015284414403140545, -0.047690499573946, 0.11476992070674896, -0.015978271141648293, 0.017190080136060715, -0.018450750038027763, 0.0595349445939064, 0.02765658125281334, 0.04303872212767601, -0.016926217824220657, 0.01100399624556303, -0.014004197902977467, 0.0043219514191150665, -0.023649796843528748, -0.00980684719979763, -0.037702858448028564, -0.015567820519208908, -0.02472478710114956, -0.030099742114543915, -0.03453652188181877, -0.030060650780797005, -0.020737549290060997, -0.013877153396606445, -0.06449944525957108, 0.01849961280822754, -0.01662326604127884, -0.05261591076850891, 0.06532035022974014, -0.03991147503256798, 0.026522953063249588, 0.01626167818903923, -0.00766175240278244, 0.033852435648441315, -0.01656462997198105, -0.06508580595254898, 0.06039493530988693, -0.02861429937183857, 0.08287201821804047, 0.021714814007282257, -0.06356126815080643, -0.03899284824728966, 0.04479779675602913, 0.02298525720834732, -0.02877066098153591, 0.001368170022033155, -0.06492944061756134, -0.057775866240262985, 0.009420827962458134, 0.044367801398038864, -0.03690150007605553, -0.006826191209256649, 0.04288236051797867, -0.04479779675602913, -0.022652987390756607, -0.0027900896966457367, -0.0007500503561459482, 0.016789400950074196, 0.02278980426490307, -0.008482654578983784, 0.03797649219632149, 0.005443362519145012, -0.05171682685613632, -0.012450347654521465, 0.01566554792225361, 0.03533787652850151, -0.029962923377752304, -0.03699922561645508, -0.02484205923974514, -0.02282889559864998, 0.05156046524643898, 0.01243080198764801, -0.008184588514268398, 0.0010407865047454834, -0.04217872768640518, -0.015479867346584797, 0.07376391440629959, 0.041475098580121994, 0.004053203854709864, 0.052889544516801834, -0.02011209912598133, -0.03737058863043785, -0.02210571989417076, 0.004253542982041836, -0.036764685064554214, -0.010681498795747757, -0.00009826087625697255, 0.0076470933854579926, 0.001368170022033155, 0.05750223249197006, 0.02978701703250408, 0.09561554342508316, -0.024372972548007965, 0.00717312004417181, -0.03541605919599533, -0.027226584032177925, -0.006557443644851446, -0.027089767158031464, 0.022281626239418983, -0.014610101468861103, -0.005809836555272341, -0.014004197902977467, -0.021656177937984467, 0.007759478874504566, -0.03750740364193916, -0.022594351321458817, -0.09843005985021591, -0.02288752980530262, 0.00485944701358676, 0.05374953895807266, 0.05042684078216553, -0.009626053273677826, 0.006357104517519474, 0.0013388521037995815, 0.0011214108671993017, -0.019779829308390617, -0.03181972727179527, -0.007090052589774132, -0.03742922469973564, -0.0015953839756548405, -0.007842546328902245, 0.011385129764676094, 0.009670030325651169, 0.00689459964632988, 0.02484205923974514, -0.004966945853084326, 0.04135782644152641, -0.0403805635869503, 0.021577997133135796, 0.025096148252487183, -0.0028487255331128836, 0.0016295883106067777, 0.029904289171099663, -0.049371395260095596, 0.024685697630047798, -0.036706048995256424, 0.010896497406065464, -0.035982873290777206, 0.030177922919392586, 0.008551063016057014, -0.015792591497302055, 0.03793740272521973, 0.023337071761488914, 0.0625058263540268, 0.031077004969120026, 0.03246472030878067, -0.01483487244695425, -0.020620277151465416, -0.037683311849832535, -0.011355811730027199, -0.01674053817987442, 0.009039695374667645, -0.017825301736593246, -0.061684925109148026, -0.0012447903864085674, 0.05625133588910103, 0.03987238556146622, 0.01731712371110916, -0.0030857122037559748, 0.0023063437547534704, -0.058714039623737335, 0.008854014798998833, -0.04389871284365654, -0.0124894380569458, -0.01341783907264471, 0.010212412104010582, -0.040654197335243225, 0.03269926458597183, -0.013134432956576347, 0.07786842435598373, -0.05644678696990013, 0.015049871057271957, -0.01727803237736225, 0.023376163095235825, -0.00716334767639637, 0.08123020827770233, -0.019222788512706757, 0.018910065293312073, -0.06336581707000732, 0.04499324783682823, 0.035670146346092224, -0.0030515077523887157, 0.060590390115976334, -0.034986063838005066, 0.02286798506975174, 0.03813285380601883, -0.0017431952292099595, -0.027109311893582344, 0.01092581544071436, 0.054883163422346115, 0.0001186459994642064, -0.10226093977689743, -0.0553913414478302, 0.01590009033679962, -0.030744735151529312, 0.02106981910765171, 0.03420425206422806, -0.03524015098810196, 0.008761174976825714, 0.010525137186050415, -0.0032469606958329678, 0.035885147750377655, -0.042335089296102524, 0.01191285252571106, 0.040771469473838806, -0.01716076210141182, 0.06575034558773041, -0.004966945853084326, -0.05378862842917442, -0.0040971809066832066, 0.008277429267764091, -0.004808140452951193, 0.05285045504570007, 0.02194935642182827, 0.015948953106999397, -0.003486390458419919, 0.052146825939416885, 0.07923658937215805, -0.05750223249197006, -0.00838981382548809, -0.0397942028939724, 0.03891466557979584, -0.0004391581460367888, -0.025545690208673477, 0.004915639758110046, -0.01735621504485607, 0.052029553800821304, 0.047221411019563675, 0.002308787079527974, -0.0016320314025506377, 0.028242938220500946, -0.02978701703250408, -0.03355925530195236, -0.014004197902977467, -0.06539852917194366, -0.04362507909536362, 0.014864190481603146, 0.032914262264966965, 0.04120146483182907, -0.02306343801319599, -0.008233452215790749, -0.010554454289376736, 0.014531920664012432, 0.026992041617631912, 0.06492944061756134, -0.048433221876621246, -0.0005796399200335145, -0.0072561874985694885, -0.025272054597735405, 0.004241327289491892, -0.009420827962458134, 0.06559398025274277, -0.056876782327890396, 0.026210229843854904, 0.010456728748977184, -0.02097209170460701, -0.025057056918740273, -0.027187492698431015, 0.026073412969708443, 0.0814647525548935, 0.039559658616781235, -0.02382570505142212, -0.013886925764381886, -0.03721422702074051, -0.03721422702074051, -0.015890317037701607, 0.049058668315410614, -0.01630076952278614, -0.03744876757264137, 0.018949154764413834, 0.010271048173308372, -0.0031125869136303663, 0.039657387882471085, -0.05433589592576027, 0.03322698548436165, 0.002687476808205247, -0.005062229000031948, -0.06219310313463211, 0.012499210424721241, -0.04991866275668144, 0.03260153904557228, 0.05316317826509476, -0.026405682787299156, 0.029337475076317787, 0.0499577522277832, 0.0572676882147789, 0.01700439862906933, -0.010056049562990665, 0.012538301758468151, -0.03438016027212143, -0.04417234659194946, -0.01006582286208868, -0.0013364090118557215, -0.028985660523176193, -0.031976088881492615, -0.11344084143638611, -0.003039292059838772, -0.030021559447050095, -0.01475669164210558, -0.01622258871793747, 0.023493435233831406, 0.026132049039006233, -0.01199103333055973, -0.026132049039006233, 0.00575120048597455, 0.07419390976428986, -0.012215804308652878, 0.010056049562990665, -0.004502745345234871, -0.06090311333537102, 0.009264465421438217, -0.06485126167535782, -0.023376163095235825, 0.034771066159009933, -0.016447357833385468, 0.025174329057335854, 0.005873358808457851, -0.04030238091945648, -0.007915841415524483, -0.05042684078216553, -0.00415093032643199, 0.02583886869251728, -0.0040971809066832066, -0.05758041515946388, 0.026405682787299156, -0.038582395762205124, 0.035885147750377655, -0.00323230167850852, -0.020307552069425583, -0.003180995350703597, 0.00002481335286574904, 0.01754189468920231, 0.05926130712032318, -0.0003438748826738447, -0.034673336893320084, 0.024236155673861504, -0.007637320552021265, 0.019750511273741722, 0.022711623460054398, -0.01610531657934189, 0.01666235737502575, 0.04210054874420166, -0.028907479718327522, 0.04194418340921402, 0.011629445478320122, -0.003884625621140003, 0.02089391089975834, 0.007749706041067839, -0.014551465399563313, -0.02204708382487297, 0.017668938264250755, 0.005922222044318914, -0.002169526880607009, -0.03443879634141922, -0.00596619863063097, 0.06117674708366394, 0.0194768775254488, -0.042647816240787506, 0.02576068788766861, 0.018968701362609863, 0.009337760508060455, 0.09186284989118576, -0.03905148431658745, 0.020483460277318954, 0.02658158913254738, -0.04514961317181587, -0.05437498539686203, 0.013251704163849354, -0.010046277195215225, -0.04780777171254158, 0.0019435344729572535, -0.08443563431501389, 0.012606710195541382, -0.053124088793992996, -0.07048030197620392, 0.0649685338139534, -0.004905866924673319, 0.025096148252487183, -0.007407663390040398, -0.0038479783106595278, 0.022770259529352188, -0.028008395805954933, 0.01572418212890625, 0.030314739793539047, 0.050935015082359314, 0.01377942692488432, -0.03334425762295723, 0.04299962893128395, 0.02785203419625759, 0.003891955129802227, -0.02490069530904293, 0.022770259529352188, 0.01099422387778759, -0.02474433183670044, -0.051130469888448715, 0.03610014542937279, 0.05668133124709129, 0.033911071717739105, -0.0023649795912206173, 0.03739013150334358, -0.03725331649184227, 0.026229774579405785, -0.016828492283821106, -0.009943664073944092, 0.026132049039006233, 0.0595349445939064, -0.023278435692191124, 0.023708432912826538, 0.062466736882925034, 0.010671726427972317, 0.07653934508562088, -0.013193068094551563, -0.026307955384254456, 0.015088961459696293, -0.0023955192882567644, 0.0499577522277832, 0.07743842899799347, 0.06731396913528442, -0.07599207758903503, 0.03129200264811516, 0.05460952967405319, 0.015538502484560013, 0.0499577522277832, -0.07720388472080231, 0.006093243137001991, -0.0009925341000780463, -0.05421862378716469, -0.037702858448028564, 0.024451153352856636, -0.03815240040421486, 0.05566497519612312, -0.0027607716619968414, 0.008678107522428036, 0.013222386129200459, 0.0397942028939724, -0.0632876381278038, -0.019770057871937752, -0.021402088925242424, 0.011795580387115479, -0.023845249786973, -0.026522953063249588, -0.07556207478046417, -0.03594378009438515, 0.02200799249112606, -0.029239749535918236, -0.0026410568971186876, -0.040654197335243225, -0.01590009033679962, -0.0054384758695960045, -0.049371395260095596, -0.01593918167054653, 0.024998420849442482, 0.023591160774230957, -0.022301172837615013, 0.0326797179877758, -0.011531719006597996, -0.028184304013848305, 0.018460523337125778, 0.025330690667033195, -0.035924237221479416, -0.03754649683833122, -0.0025140123907476664, -0.02208617329597473, 0.03066655434668064, 0.005834267940372229, -0.010691272094845772, 0.03514242544770241, 0.010886725038290024, -0.0095283268019557, -0.03739013150334358, 0.013378748670220375, -0.0152062326669693, -0.014649191871285439, -0.0138966990634799, 0.00906901340931654, 0.04284326732158661, -0.0023417696356773376, -0.0033080398570746183, -0.0105153638869524, -0.006225173827260733, -0.008477767929434776, 0.0999155044555664, -0.022398898378014565, 0.004280417691916227, 0.003752694930881262, 0.0231025293469429, 0.03987238556146622, -0.05343681201338768, -0.07919750362634659, 0.04378144070506096, -0.03889511898159981, 0.026229774579405785, -0.02275071293115616, -0.0033911073114722967, -0.02943520061671734, 0.031116096302866936, -0.029102930799126625, 0.057775866240262985, 0.04096692055463791, 0.04397689551115036, 0.014307149685919285, -0.006215400993824005, -0.03357880190014839, 0.06324854493141174, 0.0005872747860848904, 0.05410135164856911, -0.014932598918676376, 0.006489035207778215, -0.04131873697042465, 0.002474921988323331, 0.03905148431658745, 0.08013567328453064, 0.03721422702074051, -0.030920643359422684, 0.00596131244674325, -0.06051220744848251, -0.01476646400988102, 0.0052430229261517525, 0.02083527483046055, -0.007436981424689293, 0.027187492698431015, 0.00956741813570261, -0.04569688066840172, -0.0499577522277832, 0.06184128671884537, 0.05285045504570007, -0.03553333133459091, -0.057697687298059464, 0.006567216478288174, -0.0034106525126844645, -0.031858816742897034, 0.014062833972275257, 0.02482251450419426, -0.03156563639640808, -0.01907620020210743, -0.04972320795059204, -0.0010688828770071268, -0.0006364433793351054, -0.012059441767632961, -0.028340665623545647, -0.042569633573293686, -0.05269409343600273, -0.03064700961112976, 0.06184128671884537, -0.0014744475483894348, -0.03797649219632149, -0.01851915940642357, 0.10038459300994873, 0.0014536806847900152, -0.05242045968770981, -0.05527406930923462, -0.0030050878413021564, 0.009816620498895645, -0.0006401081336662173, 0.017522349953651428, 0.03602196276187897, -0.009235148318111897, 0.004458768293261528, -0.013134432956576347, -0.01805984415113926, -0.003884625621140003, 0.0364324152469635, -0.025565234944224358, 0.03168290853500366, -0.04968411847949028, -0.041396915912628174, 0.0062984684482216835, -0.009987641125917435, 0.08592107892036438, -0.07333391159772873, -0.001867796410806477, 0.04765141010284424, -0.01432669535279274, 0.03613923490047455, 0.0008160157012753189, -0.02011209912598133, -0.01921301707625389, -0.0012307423166930676, 0.04198327660560608, -0.05070047453045845, 0.017835073173046112, -0.01525509636849165, -0.005096433684229851, 0.02564341574907303, 0.014649191871285439, 0.005941767245531082, 0.017971890047192574, -0.03146791085600853, -0.010808543302118778, 0.05152137577533722, -0.10116640478372574, 0.06973758339881897, 0.029337475076317787, 0.03627605363726616, 0.006821305025368929, -0.05316317826509476, 0.014375558122992516, 0.03901239112019539, -0.026425227522850037, 0.057736776769161224, -0.013310340233147144, 0.04890230670571327, 0.016036907210946083, -0.011844444088637829, -0.05089592561125755, -0.024607514962553978, -0.009655371308326721, -0.03170245513319969, 0.056915875524282455, 0.041631460189819336, -0.0533195398747921, 0.029806561768054962, -0.029454747214913368, 0.021499814465641975, 0.021558450534939766, -0.019750511273741722, 0.04120146483182907, 0.04096692055463791, 0.0341651625931263, 0.023571616038680077, 0.013251704163849354, 0.0005258903838694096, -0.037702858448028564, 0.03420425206422806, -0.024294791743159294, 0.024333881214261055, 0.012157168239355087, 0.014658965170383453, 0.021538905799388885, 0.033871982246637344, 0.02869248017668724 ]
4,752
optbinning.binning.binning
_fit_optimizer
null
def _fit_optimizer(self, splits, n_nonevent, n_event): if self.verbose: logger.info("Optimizer started.") time_init = time.perf_counter() if len(n_nonevent) <= 1: self._status = "OPTIMAL" self._splits_optimal = splits self._solution = np.zeros(len(splits), dtype=bool) if self.verbose: logger.warning("Optimizer: {} bins after pre-binning." .format(len(n_nonevent))) logger.warning("Optimizer: solver not run.") logger.info("Optimizer terminated. Time: 0s") return # Min/max number of bins if self.min_bin_size is not None: min_bin_size = int(np.ceil(self.min_bin_size * self._n_samples)) else: min_bin_size = self.min_bin_size if self.max_bin_size is not None: max_bin_size = int(np.ceil(self.max_bin_size * self._n_samples)) else: max_bin_size = self.max_bin_size # Min number of event and nonevent per bin if (self.divergence in ("hellinger", "triangular") and self._flag_min_n_event_nonevent): if self.min_bin_n_nonevent is None: min_bin_n_nonevent = 1 else: min_bin_n_nonevent = max(self.min_bin_n_nonevent, 1) if self.min_bin_n_event is None: min_bin_n_event = 1 else: min_bin_n_event = max(self.min_bin_n_event, 1) else: min_bin_n_nonevent = self.min_bin_n_nonevent min_bin_n_event = self.min_bin_n_event # Monotonic trend trend_change = None if self.dtype == "numerical": auto_monotonic_modes = ("auto", "auto_heuristic", "auto_asc_desc") if self.monotonic_trend in auto_monotonic_modes: monotonic = auto_monotonic(n_nonevent, n_event, self.monotonic_trend) if self.monotonic_trend == "auto_heuristic": if monotonic in ("peak", "valley"): if monotonic == "peak": monotonic = "peak_heuristic" else: monotonic = "valley_heuristic" event_rate = n_event / (n_nonevent + n_event) trend_change = peak_valley_trend_change_heuristic( event_rate, monotonic) if self.verbose: logger.info("Optimizer: classifier predicts {} " "monotonic trend.".format(monotonic)) else: monotonic = self.monotonic_trend if monotonic in ("peak_heuristic", "valley_heuristic"): event_rate = n_event / (n_nonevent + n_event) trend_change = peak_valley_trend_change_heuristic( event_rate, monotonic) if self.verbose: logger.info("Optimizer: trend change position {}." .format(trend_change)) else: monotonic = self.monotonic_trend if monotonic is not None: monotonic = "ascending" if self.verbose: if monotonic is None: logger.info("Optimizer: monotonic trend not set.") else: logger.info("Optimizer: monotonic trend set to {}." .format(monotonic)) if self.solver == "cp": optimizer = BinningCP(monotonic, self.min_n_bins, self.max_n_bins, min_bin_size, max_bin_size, min_bin_n_event, self.max_bin_n_event, min_bin_n_nonevent, self.max_bin_n_nonevent, self.min_event_rate_diff, self.max_pvalue, self.max_pvalue_policy, self.gamma, self.user_splits_fixed, self.time_limit) elif self.solver == "mip": optimizer = BinningMIP(monotonic, self.min_n_bins, self.max_n_bins, min_bin_size, max_bin_size, min_bin_n_event, self.max_bin_n_event, min_bin_n_nonevent, self.max_bin_n_nonevent, self.min_event_rate_diff, self.max_pvalue, self.max_pvalue_policy, self.gamma, self.user_splits_fixed, self.mip_solver, self.time_limit) elif self.solver == "ls": optimizer = BinningLS(monotonic, self.min_n_bins, self.max_n_bins, min_bin_size, max_bin_size, min_bin_n_event, self.max_bin_n_event, min_bin_n_nonevent, self.max_bin_n_nonevent, self.min_event_rate_diff, self.max_pvalue, self.max_pvalue_policy, self.user_splits_fixed, self.time_limit) if self.verbose: logger.info("Optimizer: build model...") optimizer.build_model(self.divergence, n_nonevent, n_event, trend_change) if self.verbose: logger.info("Optimizer: solve...") status, solution = optimizer.solve() self._solution = solution self._optimizer, self._time_optimizer = solver_statistics( self.solver, optimizer.solver_) self._status = status if self.dtype == "categorical" and self.user_splits is not None: self._splits_optimal = splits[solution] else: self._splits_optimal = splits[solution[:-1]] self._time_solver = time.perf_counter() - time_init if self.verbose: logger.info("Optimizer terminated. Time: {:.4f}s" .format(self._time_solver))
(self, splits, n_nonevent, n_event)
[ -0.02485661581158638, -0.0028495320584625006, -0.04929737746715546, 0.0007312853704206645, -0.040564484894275665, -0.05837051570415497, -0.06623390316963196, -0.048654697835445404, -0.08687528967857361, -0.028920624405145645, -0.049864448606967926, 0.03251207619905472, 0.007343570236116648, -0.02364686317741871, -0.03502608835697174, 0.0808265283703804, -0.027786482125520706, -0.009196002967655659, -0.013723120093345642, -0.008227256126701832, -0.032965730875730515, -0.058219294995069504, -0.04612177982926369, 0.02980903536081314, 0.006667810492217541, -0.003908064682036638, -0.016454512253403664, -0.039090100675821304, -0.03394865617156029, -0.0028377182316035032, -0.013760924339294434, -0.04555470868945122, 0.013241109438240528, -0.02081150747835636, 0.008510791696608067, -0.05111200734972954, 0.037785835564136505, 0.032568782567977905, -0.04158521071076393, 0.02963891439139843, -0.029884645715355873, -0.09042893350124359, 0.0054297056049108505, 0.036141328513622284, -0.016397805884480476, -0.01946943998336792, -0.01572677120566368, 0.05409858003258705, -0.00022387492936104536, -0.026482218876481056, -0.020017609000205994, -0.08407773822546005, 0.017087740823626518, 0.018883466720581055, -0.014857262372970581, 0.07175339013338089, 0.05848392844200134, 0.026709048077464104, 0.03576328232884407, -0.057122960686683655, -0.011899041011929512, 0.014658787287771702, -0.00149092439096421, 0.014309093356132507, 0.0023379868362098932, -0.015707869082689285, -0.05723637342453003, 0.03455353155732155, 0.007617654744535685, 0.032266344875097275, 0.025366978719830513, -0.004808289930224419, 0.03672730177640915, -0.0010679838014766574, -0.04975103586912155, -0.025839539244771004, -0.05239736661314964, -0.039127904921770096, -0.00446332199499011, -0.017409082502126694, 0.032304149121046066, 0.028750503435730934, -0.0022021259646862745, -0.07700825482606888, -0.00020393883460201323, -0.03799376264214516, 0.010093864984810352, 0.030659642070531845, 0.018807856366038322, -0.05992050841450691, -0.0025163779500871897, 0.020716996863484383, 0.01621823199093342, 0.08143140375614166, 0.0005555524257943034, 0.013704217039048672, -0.03893887996673584, -0.035082798451185226, -0.007343570236116648, -0.052435170859098434, 0.011520993895828724, 0.021794430911540985, 0.000036900230043102056, 0.0751558169722557, 0.016851462423801422, -0.02117065340280533, -0.0030999884475022554, 0.020490167662501335, -0.02198345586657524, -0.03793705627322197, -0.042265698313713074, 0.029355378821492195, -0.06056319177150726, 0.006020404398441315, -0.05950465798377991, 0.03950595110654831, -0.05481686815619469, 0.028977330774068832, -0.011738371104001999, 0.059088803827762604, 0.006582750007510185, 0.024100519716739655, -0.055686380714178085, 0.0010927931871265173, -0.0069513460621237755, -0.004593275487422943, 0.03132122382521629, 0.05379614233970642, 0.01616152562201023, -0.05356931313872337, 0.037180960178375244, -0.011662761680781841, 0.0038324552588164806, 0.06767047941684723, -0.022323697805404663, 0.0015759849920868874, -0.057425398379564285, 0.048957135528326035, -0.005009127780795097, -0.06309610605239868, 0.0638900101184845, -0.002060358179733157, 0.01073654554784298, -0.027786482125520706, 0.04321081563830376, 0.014460312202572823, 0.01602920889854431, -0.013193853199481964, -0.009550421498715878, 0.003225216642022133, 0.00241832179017365, -0.029317574575543404, -0.015348723158240318, -0.03442121297121048, 0.009952097199857235, -0.004219953902065754, -0.03168037161231041, -0.018099017441272736, -0.04222789406776428, -0.021019434556365013, -0.025518197566270828, -0.03916570916771889, 0.03194500505924225, -0.03115110471844673, -0.03181268647313118, 0.017881641164422035, -0.03292792662978172, 0.03725656867027283, -0.004099451471120119, 0.031075494363904, 0.017711520195007324, -0.04498763754963875, -0.05224614962935448, 0.04891933128237724, -0.031793784350156784, 0.10789471864700317, 0.025782831013202667, -0.05058274045586586, -0.052435170859098434, 0.037653520703315735, 0.022437112405896187, -0.036784011870622635, 0.00034733102074824274, -0.04566812515258789, -0.045781537890434265, 0.03290902450680733, 0.030697446316480637, -0.04627300053834915, -0.023363327607512474, 0.020527971908450127, -0.059958312660455704, -0.0595424622297287, -0.008227256126701832, -0.04532787948846817, 0.0029936626087874174, 0.005443882197141647, 0.007159272208809853, 0.03886327147483826, 0.03220963850617409, -0.028183432295918465, -0.0008411554154008627, 0.06279367208480835, 0.036216940730810165, 0.0024856615345925093, -0.027389531955122948, 0.0009067230275832117, -0.015925245359539986, 0.024535274133086205, 0.05557296425104141, 0.022059064358472824, -0.0028873367700725794, -0.03776693344116211, -0.0014661150053143501, 0.06770828366279602, 0.050998590886592865, 0.04181203991174698, 0.022626135498285294, 0.014989578165113926, -0.019261514768004417, -0.028221236541867256, 0.0005658896989189088, -0.04710470512509346, -0.01915755122900009, 0.008576950058341026, 0.029412085190415382, -0.030016962438821793, 0.028051115572452545, 0.02532917447388172, 0.07969238609075546, -0.005387175362557173, -0.00923380721360445, -0.019923096522688866, -0.02134077437222004, -0.032266344875097275, 0.05489248037338257, 0.02706819213926792, -0.03423219174146652, 0.008964448235929012, -0.028712699189782143, -0.04804982244968414, -0.0033740729559212923, -0.0395437553524971, -0.062566839158535, -0.03842851519584656, -0.02464868873357773, 0.013127694837749004, 0.048087626695632935, 0.04162301495671272, -0.013571901246905327, 0.030697446316480637, 0.016019757837057114, -0.04362666606903076, -0.054779063910245895, -0.003277198178693652, -0.002151325810700655, -0.03436450660228729, 0.020754801109433174, 0.026803558692336082, 0.023231010884046555, -0.013439584523439407, -0.007773599121719599, 0.01794779859483242, -0.044609591364860535, 0.03447791934013367, -0.022172478958964348, 0.0167285967618227, 0.030149279162287712, -0.057652223855257034, -0.0037993760779500008, 0.025612710043787956, -0.013174951076507568, 0.06014733761548996, -0.05137663707137108, 0.01612372137606144, -0.03442121297121048, 0.04774738475680351, 0.007575124502182007, -0.017012132331728935, 0.03447791934013367, 0.019715171307325363, 0.06362537294626236, 0.03232305124402046, 0.0020993442740291357, 0.009857585653662682, -0.0525863915681839, -0.006554396357387304, -0.037351079285144806, -0.02090601995587349, 0.058899782598018646, 0.017371276393532753, 0.012447210028767586, 0.03311695158481598, 0.09156307578086853, 0.010519168339669704, 0.06056319177150726, 0.012532270513474941, 0.043475449085235596, -0.012485014274716377, 0.02238040417432785, -0.02837245538830757, 0.024270642548799515, -0.032266344875097275, -0.0002829448494594544, -0.05935343727469444, 0.024629786610603333, 0.012314893305301666, 0.046651046723127365, -0.04891933128237724, 0.08687528967857361, -0.002953495131805539, 0.006025129929184914, 0.0021773166954517365, 0.028051115572452545, 0.00686628557741642, 0.03306024149060249, -0.019374927505850792, 0.012144772335886955, -0.014980127103626728, 0.012324344366788864, 0.038182783871889114, -0.029620012268424034, 0.047482751309871674, 0.0517168827354908, -0.07224485278129578, 0.00420341407880187, -0.01890236884355545, 0.05322907119989395, -0.04211447760462761, -0.08120457828044891, -0.07417289912700653, 0.022361502051353455, -0.07111071050167084, 0.020830411463975906, 0.039657171815633774, -0.02572612464427948, 0.008808503858745098, 0.03746449574828148, 0.018373101949691772, 0.017928896471858025, -0.025007834658026695, 0.06899365037679672, 0.06464610248804092, -0.02298528142273426, 0.08332164585590363, 0.02168101631104946, -0.0369541309773922, 0.020924922078847885, -0.012891415506601334, -0.01483835931867361, 0.015244760550558567, -0.015377077274024487, -0.003192137461155653, 0.010878313332796097, 0.058824170380830765, 0.07640337198972702, -0.012778001837432384, 0.017352374270558357, -0.04740714281797409, 0.032266344875097275, -0.06570463627576828, -0.07232046127319336, 0.03366512060165405, -0.018306944519281387, 0.05322907119989395, 0.04105594381690025, -0.0015015569515526295, -0.008449358865618706, -0.007806678302586079, 0.0010059603955596685, -0.05065834894776344, -0.04680226370692253, -0.07855824381113052, 0.018883466720581055, 0.02750294655561447, 0.024440763518214226, 0.022493818774819374, -0.01794779859483242, -0.011209105141460896, 0.01523530948907137, 0.006559121888130903, 0.01899688132107258, 0.05402297154068947, -0.018703894689679146, 0.013184402137994766, -0.004548382479697466, -0.015840185806155205, 0.01179507840424776, -0.011152397841215134, 0.10116548091173172, -0.05583759769797325, 0.03712425380945206, 0.026954777538776398, -0.01005606073886156, -0.01533927209675312, -0.032304149121046066, 0.0517168827354908, 0.06974974274635315, 0.06067660450935364, -0.029960254207253456, -0.025045638903975487, -0.04449617490172386, -0.038749855011701584, -0.02502673678100109, 0.06071440875530243, -0.0027762854006141424, -0.06320951879024506, 0.061508309096097946, 0.010717643424868584, -0.0036859619431197643, 0.03627364709973335, -0.0430217906832695, 0.0210761409252882, -0.007494789082556963, -0.0010230906773358583, -0.059126611799001694, 0.008274512365460396, -0.038787662982940674, 0.018798405304551125, 0.06922047585248947, -0.031623661518096924, 0.025348076596856117, 0.033438291400671005, 0.06067660450935364, 0.01366641279309988, 0.017437435686588287, -0.01764536090195179, -0.012466112151741982, -0.02602856233716011, -0.025064541026949883, 0.00409708870574832, -0.010197828523814678, 0.007041132543236017, -0.07337899506092072, -0.01908194087445736, -0.01652066968381405, -0.022588331252336502, -0.017673714086413383, 0.01630329340696335, 0.02221028320491314, -0.031094396486878395, 0.005004402250051498, -0.004746857564896345, 0.054514430463314056, 0.007768873590976, 0.012031357735395432, -0.008510791696608067, -0.003957683686167002, -0.004853183403611183, -0.0977630540728569, -0.04071570187807083, 0.011776176281273365, 0.006129093002527952, -0.008742345497012138, 0.03351389989256859, 0.0016350549412891269, -0.011710017919540405, -0.062037575989961624, 0.010424656793475151, -0.015140797942876816, -0.012683489359915257, -0.05632906034588814, 0.0267279502004385, 0.00018474111857358366, 0.00552894314751029, -0.009006978943943977, -0.010717643424868584, 0.02033894881606102, -0.00973471999168396, -0.00004972947499481961, 0.01560390554368496, 0.0084777120500803, -0.04298398643732071, 0.017843836918473244, -0.00696552312001586, -0.00294876960106194, 0.00986703671514988, -0.017739873379468918, 0.00646461034193635, 0.04339984059333801, -0.00917237438261509, 0.06131928414106369, 0.024497469887137413, -0.0005936525412835181, 0.02459198236465454, 0.016482865437865257, 0.009678012691438198, -0.04415593296289444, -0.010112767107784748, -0.021019434556365013, 0.023911496624350548, -0.044344957917928696, -0.02659563347697258, 0.06407903134822845, 0.01599140465259552, -0.006247233133763075, 0.05689613148570061, 0.029015136882662773, 0.016331646591424942, 0.07840702682733536, -0.04585714638233185, 0.016067013144493103, 0.006251958664506674, -0.06842657923698425, -0.03759681060910225, 0.003908064682036638, -0.02003651112318039, -0.08574114739894867, 0.03833400458097458, -0.09640207886695862, 0.0395437553524971, 0.010349047370254993, -0.052435170859098434, 0.07137534767389297, 0.003265384351834655, 0.06131928414106369, -0.006771773565560579, -0.019148100167512894, 0.006667810492217541, -0.031075494363904, 0.01492342073470354, 0.018524320796132088, 0.031226713210344315, 0.021284068003296852, -0.029979156330227852, 0.039921801537275314, 0.00199892558157444, -0.0006621736101806164, -0.009068411774933338, 0.05753881111741066, -0.004404251929372549, -0.0037875622510910034, -0.03549864888191223, 0.02351454645395279, 0.10003133863210678, 0.03893887996673584, -0.004191600251942873, 0.046046171337366104, -0.024610884487628937, -0.03633035346865654, -0.009663836099207401, -0.030829763039946556, 0.0258584413677454, 0.05670710653066635, -0.013543547131121159, 0.016435610130429268, 0.05500589311122894, 0.007272686343640089, 0.057160764932632446, -0.002495112596079707, -0.005297388881444931, 0.020017609000205994, 0.0651753693819046, 0.06982535123825073, 0.06842657923698425, 0.05167907848954201, -0.06502415239810944, 0.02181333303451538, 0.028580382466316223, 0.03145354241132736, 0.04355105757713318, -0.07651679217815399, -0.010868862271308899, -0.004309739917516708, -0.03464804217219353, -0.011464286595582962, 0.032871220260858536, 0.00032074956106953323, 0.0525863915681839, 0.02980903536081314, 0.04555470868945122, 0.022266991436481476, 0.0056754364632070065, -0.04559251293540001, -0.052737608551979065, -0.031264517456293106, 0.02445966564118862, -0.009016430005431175, -0.018505418673157692, -0.0669143870472908, -0.032266344875097275, 0.01080270390957594, -0.04358886182308197, -0.019923096522688866, -0.02324991300702095, -0.008317042142152786, 0.03897668421268463, -0.055951010435819626, 0.015830734744668007, 0.02763526327908039, 0.015632258728146553, -0.021529797464609146, 0.024006009101867676, -0.02546149119734764, -0.015509393997490406, 0.007485338021069765, 0.03428889811038971, -0.05924002453684807, -0.007716892287135124, 0.007938995026051998, -0.00490043917670846, -0.03920351341366768, -0.002490387065336108, -0.011955748312175274, 0.005311565473675728, 0.01023563276976347, -0.00904005765914917, -0.0072112539783120155, 0.03789924830198288, 0.02342003583908081, -0.01946943998336792, -0.0001860701886471361, 0.024667590856552124, 0.04177423566579819, -0.017579203471541405, -0.016237134113907814, 0.004600364249199629, -0.01092556957155466, 0.020244436338543892, 0.0721314400434494, -0.04196326062083244, 0.03893887996673584, 0.039959609508514404, 0.021756626665592194, 0.013656961731612682, -0.07886068522930145, -0.06139489263296127, 0.0812801867723465, -0.10010694712400436, -0.009564599022269249, -0.054476626217365265, -0.005656533874571323, -0.02321210876107216, 0.0033693471923470497, -0.047520555555820465, 0.026387706398963928, 0.014810006134212017, 0.060033924877643585, 0.027105996385216713, -0.0016161525854840875, -0.058294907212257385, 0.04245471954345703, 0.035479746758937836, 0.03589559718966484, -0.03398646041750908, 0.01821243204176426, -0.008449358865618706, 0.0002689157263375819, 0.0725472941994667, 0.0742863118648529, 0.01943163573741913, -0.011955748312175274, 0.027276119217276573, -0.07198022305965424, 0.0039482321590185165, 0.014214581809937954, 0.019280416890978813, 0.003941143862903118, -0.020395657047629356, 0.025310272350907326, -0.034704748541116714, -0.006025129929184914, 0.04237911105155945, 0.040488872677087784, -0.062150988727808, -0.017352374270558357, -0.007031681481748819, -0.014545372687280178, -0.015594454482197762, 0.020924922078847885, 0.044647395610809326, -0.02655782923102379, -0.04687787592411041, -0.03464804217219353, 0.03754010424017906, 0.027049290016293526, -0.01894962415099144, -0.010377400554716587, -0.02408161759376526, -0.06491073220968246, -0.0560644268989563, 0.054174188524484634, 0.031094396486878395, -0.009399202652275562, -0.07296314090490341, 0.0699387639760971, -0.004437331110239029, -0.04793640598654747, -0.01916700229048729, 0.07099729776382446, -0.006341744679957628, -0.009087313897907734, 0.014479214325547218, -0.007532594259828329, -0.0031519699841737747, 0.04105594381690025, -0.05315346270799637, -0.038749855011701584, -0.010245083831250668, 0.03672730177640915, -0.02529137022793293, 0.060600996017456055, -0.04631080478429794, -0.058294907212257385, -0.007376649416983128, -0.01990419439971447, 0.06623390316963196, -0.06804852932691574, -0.03629254922270775, 0.009446458891034126, -0.03411877527832985, -0.009035332128405571, -0.0025163779500871897, -0.012570075690746307, -0.010963373817503452, 0.02185113914310932, 0.02924196422100067, -0.03141573816537857, 0.011804529465734959, -0.017673714086413383, -0.013505742885172367, 0.0088037783280015, 0.007556221913546324, -0.021019434556365013, 0.02185113914310932, 0.005032755900174379, -0.013827082701027393, 0.05670710653066635, -0.07360582798719406, 0.026274293661117554, 0.01776822656393051, 0.03901448845863342, -0.01699323020875454, -0.008841583505272865, -0.05553516000509262, 0.025272468104958534, 0.014460312202572823, 0.036141328513622284, -0.008246158249676228, 0.022569429129362106, 0.03081086091697216, -0.0069466205313801765, -0.03243646398186684, -0.017276765778660774, -0.033173657953739166, -0.04060228914022446, 0.04071570187807083, -0.009819780476391315, -0.03290902450680733, 0.03134012594819069, -0.010821606032550335, 0.022002357989549637, 0.016652986407279968, 0.06094123795628548, 0.04457178711891174, 0.02786209248006344, -0.009385026060044765, 0.0184676144272089, 0.01925206370651722, 0.004890988115221262, -0.025518197566270828, 0.034572433680295944, -0.025782831013202667, 0.02529137022793293, 0.01986639015376568, -0.024932224303483963, -0.00862420629709959, 0.031661469489336014, -0.017607556656003 ]
4,763
optbinning.binning.binning
fit
Fit the optimal binning according to the given training data. Parameters ---------- x : array-like, shape = (n_samples,) Training vector, where n_samples is the number of samples. y : array-like, shape = (n_samples,) Target vector relative to x. sample_weight : array-like of shape (n_samples,) (default=None) Array of weights that are assigned to individual samples. If not provided, then each sample is given unit weight. Only applied if ``prebinning_method="cart"``. check_input : bool (default=False) Whether to check input arrays. Returns ------- self : OptimalBinning Fitted optimal binning.
def fit(self, x, y, sample_weight=None, check_input=False): """Fit the optimal binning according to the given training data. Parameters ---------- x : array-like, shape = (n_samples,) Training vector, where n_samples is the number of samples. y : array-like, shape = (n_samples,) Target vector relative to x. sample_weight : array-like of shape (n_samples,) (default=None) Array of weights that are assigned to individual samples. If not provided, then each sample is given unit weight. Only applied if ``prebinning_method="cart"``. check_input : bool (default=False) Whether to check input arrays. Returns ------- self : OptimalBinning Fitted optimal binning. """ return self._fit(x, y, sample_weight, check_input)
(self, x, y, sample_weight=None, check_input=False)
[ 0.02171381190419197, -0.04259871318936348, -0.0008424238185398281, -0.03077775053679943, -0.038490209728479385, -0.044148415327072144, -0.035012394189834595, 0.03130032494664192, 0.01828104630112648, 0.010343343019485474, -0.0005735352169722319, -0.028110826388001442, 0.005856422241777182, -0.007532259915024042, -0.041012976318597794, 0.010983044281601906, -0.02486727014183998, -0.02101104147732258, -0.05751907452940941, 0.056401852518320084, 0.01237056590616703, 0.016217784956097603, -0.014623035676777363, 0.10437045246362686, 0.004094990435987711, 0.04378801956772804, 0.006824984215199947, 0.020254211500287056, -0.018974807113409042, -0.012785020284354687, 0.0027525185141712427, -0.016452042385935783, 0.012559773400425911, 0.00693310284987092, 0.04858127608895302, -0.034832198172807693, 0.0718267634510994, 0.020758764818310738, -0.019245104864239693, -0.050455328077077866, -0.0002144070022040978, -0.056293733417987823, 0.04840107634663582, 0.054996307939291, 0.019136985763907433, 0.04003990814089775, -0.03052547387778759, 0.08930593729019165, -0.02421855740249157, -0.003171477932482958, -0.04634682461619377, -0.05106800049543381, 0.0490858294069767, 0.00901889055967331, 0.006937607657164335, 0.005739293992519379, 0.01833510585129261, -0.004775236360728741, 0.047860484570264816, 0.01535283587872982, 0.0075097354128956795, 0.012785020284354687, 0.044905245304107666, -0.023245491087436676, -0.025984494015574455, -0.012163338251411915, -0.10256847739219666, 0.005369888618588448, -0.010253244079649448, 0.07002478837966919, 0.05160859599709511, 0.0210470799356699, 0.005838402546942234, 0.047031573951244354, -0.06314124166965485, 0.03297616168856621, -0.0301830992102623, 0.013028287328779697, -0.016551150009036064, -0.009991956874728203, 0.07024102658033371, 0.059285011142492294, 0.008626960217952728, -0.06497925519943237, -0.020506488159298897, -0.03942723572254181, 0.014091452583670616, 0.05896065756678581, 0.062492530792951584, -0.017127782106399536, -0.017064712941646576, 0.041085053235292435, 0.06577212363481522, 0.07625962793827057, 0.053194332867860794, -0.019893815740942955, -0.025137566030025482, 0.007059241179376841, -0.02724587731063366, 0.03103002719581127, -0.08361168950796127, -0.010082055814564228, 0.04076069965958595, 0.06523153185844421, -0.014514917507767677, 0.025299744680523872, 0.010370371863245964, -0.025804297998547554, -0.046887416392564774, 0.010280273854732513, 0.023714004084467888, -0.023209452629089355, -0.022236384451389313, -0.0006892558303661644, -0.059140853583812714, 0.035589028149843216, -0.02766033262014389, 0.004775236360728741, -0.038526248186826706, 0.03566110506653786, 0.006667311303317547, 0.0007010812987573445, -0.031967055052518845, -0.03112012706696987, 0.032219331711530685, -0.04256267473101616, 0.040940895676612854, 0.007852111011743546, 0.010262253694236279, -0.020236190408468246, 0.022470641881227493, -0.008672010153532028, -0.059140853583812714, 0.01821797713637352, -0.032129231840372086, -0.016929564997553825, 0.011289380490779877, 0.006297906395047903, 0.015965508297085762, -0.014379768632352352, 0.11028093844652176, -0.017244910821318626, 0.05268977954983711, -0.025011427700519562, 0.059032734483480453, 0.01886668987572193, 0.016361942514777184, -0.02748013474047184, 0.04966245964169502, 0.026146672666072845, -0.03272388502955437, -0.012037199921905994, 0.023155393078923225, -0.019983913749456406, -0.0008976093376986682, -0.002443930134177208, -0.05124820023775101, -0.03052547387778759, 0.004698652774095535, 0.008590920828282833, 0.0304533950984478, -0.008140427060425282, -0.006617757026106119, 0.005473502445966005, -0.02185796946287155, 0.07798952609300613, -0.04256267473101616, 0.04677929729223251, 0.02430865727365017, -0.028236964717507362, 0.029534388333559036, -0.07734081149101257, -0.05398720130324364, -0.0026466522831469774, 0.03308428078889847, 0.023695984855294228, 0.013145415112376213, -0.026867462322115898, 0.02495736815035343, 0.03043537586927414, 0.005252760369330645, 0.0034890761598944664, 0.016181744635105133, -0.059465210884809494, -0.041012976318597794, -0.0038990257307887077, 0.012298486195504665, 0.028146866708993912, -0.03012903966009617, 0.023407669737935066, -0.0018143646884709597, -0.011523636989295483, 0.020506488159298897, 0.0015069025103002787, -0.04018406569957733, 0.03373299166560173, -0.004381054081022739, 0.0356430858373642, -0.011586706154048443, 0.011091162450611591, 0.03030923753976822, -0.05222126469016075, 0.041157133877277374, 0.005905976518988609, -0.025966474786400795, 0.00760433916002512, -0.0064240447245538235, 0.04966245964169502, 0.015974517911672592, -0.037769418209791183, 0.019082926213741302, 0.0033246458042412996, -0.0429951474070549, 0.02185796946287155, 0.019353222101926804, 0.041481487452983856, -0.009505423717200756, -0.050203051418066025, -0.03167873993515968, 0.01815490797162056, 0.009451364167034626, -0.017389068379998207, -0.006149243097752333, 0.04220227897167206, 0.03075973130762577, -0.023335589095950127, 0.06706954538822174, -0.011875022202730179, 0.050743646919727325, -0.06728578358888626, 0.01553303375840187, -0.0136589789763093, -0.0016566917765885592, 0.020146092399954796, -0.05258166044950485, -0.02459697239100933, 0.014100463129580021, 0.004180584568530321, -0.03288606181740761, 0.005207710899412632, 0.03090388886630535, 0.0003282975230831653, -0.0016037586610764265, -0.06169965863227844, -0.03616565838456154, 0.03290408477187157, 0.023858163505792618, 0.015578082762658596, 0.029083894565701485, -0.02475915104150772, -0.042814951390028, 0.014289670623838902, 0.005847412161529064, -0.04014802724123001, 0.014541947282850742, 0.03567912429571152, 0.013424721546471119, -0.037913575768470764, -0.035282690078020096, 0.03077775053679943, -0.03057953342795372, 0.053626809269189835, -0.012938188388943672, 0.026182712987065315, -0.041661687195301056, -0.016938574612140656, -0.019136985763907433, 0.010136115364730358, -0.0012399847619235516, 0.05503235012292862, -0.10314510762691498, -0.02438073605298996, 0.04948226362466812, 0.025930436328053474, -0.01384818647056818, 0.04476108402013779, 0.0372648648917675, 0.020452428609132767, 0.03306626155972481, -0.004401326645165682, 0.0362737774848938, 0.02189400978386402, 0.03178685903549194, 0.022542720660567284, -0.032543689012527466, -0.01836213655769825, -0.01863243244588375, 0.032489627599716187, -0.01207323931157589, -0.025822317227721214, -0.04616662859916687, 0.026074593886733055, 0.038165852427482605, 0.07474596798419952, 0.010100075975060463, -0.0029822704382240772, 0.022506680339574814, -0.019605498760938644, 0.040940895676612854, -0.037769418209791183, -0.025281723588705063, 0.008631465025246143, -0.025966474786400795, -0.006527658086270094, 0.02776845172047615, 0.0070322114042937756, 0.0426347553730011, -0.041553568094968796, -0.03409338742494583, -0.012938188388943672, 0.04634682461619377, 0.02421855740249157, 0.04951830208301544, -0.04306722804903984, -0.032561708241701126, -0.07662001997232437, 0.06919588148593903, 0.056726206094026566, -0.034796155989170074, 0.03924703970551491, -0.025101525709033012, 0.03630981594324112, 0.010280273854732513, -0.01384818647056818, -0.0675380602478981, 0.03146250173449516, 0.044004254043102264, 0.04793256148695946, -0.06472697854042053, -0.0360034815967083, 0.028110826388001442, 0.0038990257307887077, 0.06829489022493362, -0.0011515753576532006, -0.06908775866031647, 0.016947584226727486, -0.001669080345891416, 0.0028538797050714493, -0.02495736815035343, -0.005059047602117062, -0.01870451122522354, 0.044472768902778625, 0.010793836787343025, 0.02441677637398243, -0.025137566030025482, -0.047608207911252975, -0.026092613115906715, 0.005779838189482689, 0.022614799439907074, 0.04577019065618515, 0.014136502519249916, 0.019443321973085403, 0.0017681890167295933, -0.020776784047484398, 0.017668375745415688, -0.0435357429087162, -0.013190465047955513, -0.013010267168283463, 0.0310840867459774, 0.019893815740942955, -0.0366341732442379, 0.004946424160152674, -0.05009493604302406, 0.0355529859662056, 0.004054446239024401, 0.026254791766405106, 0.00004015731974504888, 0.019353222101926804, -0.008523346856236458, 0.02486727014183998, 0.011739874258637428, -0.0915403813123703, -0.09305404126644135, 0.03016507998108864, 0.032003093510866165, 0.05272581800818443, -0.04011198878288269, 0.020092032849788666, 0.05229334533214569, 0.019767677411437035, 0.03263378515839577, 0.01367699820548296, -0.032291412353515625, -0.00776201207190752, 0.016397982835769653, -0.005126622039824724, -0.029894782230257988, -0.007870130240917206, 0.03367893397808075, -0.038742486387491226, 0.01386620569974184, 0.006270876619964838, -0.009433344937860966, -0.03070567175745964, -0.0678984597325325, -0.01082086656242609, 0.07510636001825333, 0.03274190425872803, -0.05892461910843849, -0.03398526832461357, 0.016443030908703804, -0.017506197094917297, -0.04000386968255043, -0.010163145139813423, -0.05441967770457268, -0.011127201840281487, -0.010316313244402409, 0.02095698192715645, -0.01213630847632885, -0.004261673428118229, -0.016316892579197884, 0.040940895676612854, 0.017398077994585037, 0.03148052096366882, -0.06043827533721924, 0.0429951474070549, 0.006185282953083515, 0.016794417053461075, 0.012730960734188557, -0.016244813799858093, 0.05236542597413063, 0.006978152319788933, 0.019118966534733772, -0.0027367512229830027, 0.019803717732429504, -0.020236190408468246, -0.0062798867002129555, -0.10127105563879013, 0.03263378515839577, -0.03649001568555832, -0.056221652776002884, -0.04530167952179909, -0.07370082288980484, -0.010541560128331184, -0.019443321973085403, -0.03349873423576355, 0.0031962550710886717, -0.013586899265646935, 0.004128777887672186, -0.03048943541944027, -0.04367990046739578, -0.06461886316537857, 0.026885483413934708, 0.025425883010029793, -0.07834991812705994, -0.03985971212387085, -0.029876763001084328, -0.023011233657598495, -0.056005414575338364, -0.026579147204756737, 0.06692539155483246, -0.050347212702035904, 0.04663513973355293, 0.02110113948583603, -0.034778136759996414, -0.038021694868803024, -0.02733597718179226, -0.025930436328053474, 0.05564502254128456, -0.04504940286278725, 0.023389648646116257, -0.01379412692040205, 0.005815877579152584, -0.025786276906728745, -0.04580623283982277, -0.0211371798068285, -0.012154328636825085, 0.013830166310071945, 0.09658591449260712, 0.026813404634594917, 0.0136589789763093, -0.009775720536708832, -0.020938962697982788, 0.01565016247332096, 0.06299708038568497, 0.047500088810920715, -0.0013593656476587057, 0.03704862669110298, 0.006523153278976679, -0.06642083823680878, -0.01829005777835846, 0.011334429495036602, 0.014181551523506641, 0.02162371203303337, -0.002468707272782922, -0.04930206388235092, -0.03996782749891281, -0.009730670601129532, 0.02468707226216793, 0.02183995023369789, 0.032021116465330124, 0.07316023111343384, 0.025317763909697533, -0.013649968430399895, -0.029480328783392906, 0.005149146541953087, 0.0020914184860885143, -0.008856711909174919, 0.04216624051332474, 0.004950929433107376, 0.026146672666072845, 0.03400328755378723, -0.02430865727365017, -0.053266413509845734, -0.007811566349118948, 0.013424721546471119, -0.03755318000912666, -0.001789587433449924, -0.0542755201458931, 0.07063746452331543, -0.03139042481780052, -0.012343536131083965, 0.01517263799905777, 0.03594942390918732, 0.026669245213270187, 0.03629179671406746, -0.005293304566293955, 0.050383251160383224, 0.028417162597179413, -0.014532936736941338, 0.019839756190776825, 0.0678984597325325, 0.06649291515350342, -0.06670915335416794, 0.056293733417987823, 0.017037684097886086, -0.011496607214212418, -0.05820382758975029, 0.0029822704382240772, 0.06533965468406677, 0.02720983885228634, -0.025840336456894875, -0.0030340771190822124, 0.034778136759996414, 0.01194710098206997, 0.01076680701225996, -0.009023395366966724, -0.010992053896188736, 0.008388198912143707, -0.028453202918171883, -0.004928404465317726, 0.025696178898215294, 0.023173412308096886, -0.0071718646213412285, 0.005896966438740492, 0.08361168950796127, -0.010091066360473633, 0.02757023461163044, -0.03097596764564514, -0.016632238402962685, -0.03310230001807213, -0.0076538934372365475, 0.008361169137060642, 0.08101684600114822, 0.06119510531425476, -0.09168454259634018, -0.013406702317297459, 0.020074013620615005, -0.011505616828799248, 0.022885095328092575, -0.08945009112358093, 0.004973453935235739, -0.009811759926378727, -0.044112373143434525, 0.01866847276687622, -0.005333849228918552, -0.017569266259670258, 0.014902342110872269, 0.013586899265646935, -0.008843197487294674, 0.025119546800851822, 0.06620460003614426, -0.06577212363481522, 0.029750624671578407, -0.03917495906352997, 0.04667117819190025, -0.028597360476851463, -0.0675380602478981, -0.07092577964067459, -0.01877659000456333, -0.014316699467599392, -0.04544583708047867, 0.005563600920140743, -0.03070567175745964, -0.0036737786140292883, -0.044797126203775406, -0.03638189658522606, -0.06339351832866669, -0.06375391036272049, 0.04393217712640762, 0.005667214747518301, -0.014605016447603703, -0.022596780210733414, 0.004417093936353922, 0.022542720660567284, -0.0123165063560009, -0.062492530792951584, -0.022722918540239334, 0.06274480372667313, -0.04865335300564766, 0.019263124093413353, 0.04876147210597992, -0.0002931026683654636, 0.03647199645638466, 0.012821059674024582, 0.032579727470874786, -0.04659910127520561, -0.022632818669080734, -0.023750044405460358, -0.03748110309243202, -0.03288606181740761, -0.00047583429841324687, 0.044364649802446365, 0.01577630080282688, -0.057086601853370667, 0.026525087654590607, 0.025732217356562614, -0.03021913766860962, 0.041012976318597794, 0.0034169971477240324, 0.006680826190859079, -0.029894782230257988, 0.022560739889740944, 0.035516947507858276, -0.035300709307193756, -0.026164691895246506, -0.0033133835531771183, -0.011100172996520996, 0.025479940697550774, 0.006725875660777092, 0.002603855449706316, -0.02699360065162182, 0.056113533675670624, -0.019407281652092934, 0.056293733417987823, 0.032039135694503784, 0.017109762877225876, 0.010847896337509155, -0.005635680165141821, -0.022560739889740944, 0.01528976671397686, 0.03430962562561035, 0.06494321674108505, 0.01520867832005024, 0.016542140394449234, -0.020182132720947266, -0.00003086587821599096, 0.02441677637398243, 0.004392316564917564, 0.0005141263245604932, -0.025461921468377113, -0.04695949703454971, -0.04022010415792465, 0.009181068278849125, 0.08627861738204956, 0.028327064588665962, 0.02156965434551239, 0.001769315218552947, 0.019713617861270905, -0.03931911662220955, -0.04256267473101616, 0.07121409475803375, 0.03027319721877575, 0.002624127548187971, -0.03888664394617081, 0.06187985837459564, -0.01842520572245121, -0.06332144141197205, -0.03971555083990097, -0.016443030908703804, -0.019983913749456406, 0.03328249976038933, -0.0929819643497467, -0.009811759926378727, -0.03740902245044708, -0.05250958353281021, -0.06137530505657196, -0.0553567036986351, -0.014956401661038399, -0.010811856016516685, 0.03339061513543129, -0.06966439634561539, -0.0005839528748765588, 0.03285002335906029, 0.09449562430381775, 0.0499868169426918, -0.05568106099963188, -0.019785696640610695, -0.0246330127120018, -0.0065411729738116264, 0.025443902239203453, -0.003279596334323287, -0.00020919815870001912, -0.019857775419950485, 0.028309043496847153, -0.008955821394920349, -0.023263510316610336, -0.07496220618486404, 0.04054446145892143, -0.04822088032960892, 0.04324742406606674, -0.0038044219836592674, -0.019479360431432724, -0.01810985989868641, -0.011541657149791718, -0.0072259241715073586, -0.07348458468914032, 0.014226601459085941, 0.04270683228969574, 0.010289283469319344, 0.032435569912195206, 0.016262834891676903, -0.0499868169426918, -0.04360781982541084, 0.028885675594210625, 0.07287190854549408, -0.07063746452331543, -0.014118482358753681, -0.037949614226818085, 0.02711973898112774, 0.020668664947152138, 0.01788461208343506, -0.025101525709033012, -0.03730090335011482, 0.007469190750271082, -0.015974517911672592, 0.06043827533721924, -0.041229210793972015, 0.013190465047955513, 0.0039373175241053104, 0.04393217712640762, -0.03425556421279907, -0.03602150082588196, 0.01539788581430912, 0.06133926659822464, 0.03079577162861824, -0.009370275773108006, 0.010874925181269646, 0.08209802955389023, 0.022542720660567284, -0.025425883010029793, -0.005374393425881863, 0.022740937769412994, -0.007496220525354147, 0.019353222101926804, 0.017208870500326157, 0.02144351601600647, -0.01800174079835415, 0.020704705268144608, -0.044797126203775406, -0.028417162597179413, 0.02762429229915142, 0.020614605396986008, 0.026633206754922867, 0.04378801956772804, 0.0009460374130867422, -0.05838402360677719, 0.006694341078400612, 0.0018076072447001934, -0.028669439256191254, -0.026939542964100838, -0.03086785040795803, 0.0675380602478981, -0.010550569742918015, -0.03685041144490242, 0.0136589789763093, 0.09802749752998352, 0.06314124166965485 ]
4,764
optbinning.binning.binning
fit_transform
Fit the optimal binning according to the given training data, then transform it. Parameters ---------- x : array-like, shape = (n_samples,) Training vector, where n_samples is the number of samples. y : array-like, shape = (n_samples,) Target vector relative to x. sample_weight : array-like of shape (n_samples,) (default=None) Array of weights that are assigned to individual samples. If not provided, then each sample is given unit weight. Only applied if ``prebinning_method="cart"``. metric : str (default="woe") The metric used to transform the input vector. Supported metrics are "woe" to choose the Weight of Evidence, "event_rate" to choose the event rate, "indices" to assign the corresponding indices of the bins and "bins" to assign the corresponding bin interval. metric_special : float or str (default=0) The metric value to transform special codes in the input vector. Supported metrics are "empirical" to use the empirical WoE or event rate, and any numerical value. metric_missing : float or str (default=0) The metric value to transform missing values in the input vector. Supported metrics are "empirical" to use the empirical WoE or event rate and any numerical value. show_digits : int, optional (default=2) The number of significant digits of the bin column. Applies when ``metric="bins"``. check_input : bool (default=False) Whether to check input arrays. Returns ------- x_new : numpy array, shape = (n_samples,) Transformed array.
def fit_transform(self, x, y, sample_weight=None, metric="woe", metric_special=0, metric_missing=0, show_digits=2, check_input=False): """Fit the optimal binning according to the given training data, then transform it. Parameters ---------- x : array-like, shape = (n_samples,) Training vector, where n_samples is the number of samples. y : array-like, shape = (n_samples,) Target vector relative to x. sample_weight : array-like of shape (n_samples,) (default=None) Array of weights that are assigned to individual samples. If not provided, then each sample is given unit weight. Only applied if ``prebinning_method="cart"``. metric : str (default="woe") The metric used to transform the input vector. Supported metrics are "woe" to choose the Weight of Evidence, "event_rate" to choose the event rate, "indices" to assign the corresponding indices of the bins and "bins" to assign the corresponding bin interval. metric_special : float or str (default=0) The metric value to transform special codes in the input vector. Supported metrics are "empirical" to use the empirical WoE or event rate, and any numerical value. metric_missing : float or str (default=0) The metric value to transform missing values in the input vector. Supported metrics are "empirical" to use the empirical WoE or event rate and any numerical value. show_digits : int, optional (default=2) The number of significant digits of the bin column. Applies when ``metric="bins"``. check_input : bool (default=False) Whether to check input arrays. Returns ------- x_new : numpy array, shape = (n_samples,) Transformed array. """ return self.fit(x, y, sample_weight, check_input).transform( x, metric, metric_special, metric_missing, show_digits, check_input)
(self, x, y, sample_weight=None, metric='woe', metric_special=0, metric_missing=0, show_digits=2, check_input=False)
[ 0.02123788557946682, -0.020883921533823013, 0.03606714680790901, 0.00364676839672029, -0.010125255212187767, -0.060621123760938644, -0.034893471747636795, 0.014009552076458931, 0.010320867411792278, 0.009911012835800648, -0.015630338340997696, -0.018732188269495964, 0.03994212672114372, -0.02624928206205368, -0.045344747602939606, 0.03774382174015045, -0.028615256771445274, -0.019486691802740097, -0.0072190179489552975, 0.03684959560632706, 0.021480072289705276, -0.05588917061686516, 0.007060665637254715, 0.06676892936229706, -0.000024979111913125962, 0.02563450112938881, -0.047133203595876694, -0.0010089159477502108, -0.016282379627227783, -0.02416275255382061, -0.01422379445284605, -0.057901181280612946, 0.05562835559248924, -0.05041203275322914, 0.046388011425733566, -0.056969694793224335, 0.00787571631371975, -0.012845194898545742, 0.025858057662844658, -0.016440732404589653, 0.007810511626303196, -0.0437425933778286, 0.011066055856645107, 0.06244683638215065, 0.032564759254455566, 0.0573422908782959, -0.021815406158566475, 0.11125671118497849, -0.012072061188519001, 0.010237033478915691, -0.03176368027925491, -0.054957687854766846, 0.05730503052473068, 0.028596626594662666, 0.002959797391667962, 0.028317181393504143, 0.006389995571225882, 0.031540121883153915, 0.04635075479745865, -0.01835959404706955, 0.02446082793176174, 0.028298551216721535, -0.009445270523428917, -0.014913094229996204, 0.012677527032792568, -0.015211169607937336, -0.04381711035966873, 0.002135432092472911, -0.009515131823718548, 0.07448163628578186, 0.025243276730179787, -0.005127831362187862, 0.036775074899196625, 0.03684959560632706, -0.05458509176969528, 0.024814791977405548, -0.031111638993024826, 0.007675446104258299, -0.02069762349128723, 0.0015509244985878468, 0.07090473175048828, 0.036029886454343796, 0.010376756079494953, -0.02490794099867344, -0.03606714680790901, -0.0165431946516037, 0.01558376383036375, 0.028074994683265686, -0.00353266135789454, -0.012565748766064644, -0.0049275620840489864, -0.0020213250536471605, 0.06524129211902618, 0.053094714879989624, 0.03388746827840805, -0.007419287692755461, -0.0351356603205204, 0.04165606200695038, -0.006911627482622862, -0.01270547229796648, -0.014987613074481487, 0.0430719219148159, -0.001640580128878355, 0.0761583149433136, 0.029584001749753952, 0.028596626594662666, 0.008825832046568394, -0.01625443436205387, -0.04717046022415161, 0.01264958269894123, -0.01245397049933672, 0.0025313138030469418, -0.06330380588769913, -0.021163366734981537, -0.051306258887052536, 0.002591860480606556, -0.006152466405183077, 0.01987791620194912, -0.03554551303386688, 0.03157738223671913, 0.028298551216721535, -0.029565371572971344, 0.003919227980077267, -0.06468240171670914, -0.02384604699909687, -0.06389995664358139, 0.06691797077655792, 0.025802167132496834, 0.03554551303386688, 0.019803397357463837, -0.04165606200695038, -0.029211407527327538, -0.03392472863197327, 0.05104544386267662, -0.036141663789749146, -0.04333273693919182, 0.016328953206539154, 0.02321263588964939, -0.021815406158566475, 0.0009064525365829468, 0.07328933477401733, 0.013050122186541557, 0.06024852767586708, 0.018285073339939117, 0.061030976474285126, 0.002980755874887109, 0.025969834998250008, 0.03198723495006561, 0.0006037194980308414, -0.017959054559469223, -0.024106863886117935, -0.0050672851502895355, 0.0245912354439497, -0.05514398217201233, 0.021591849625110626, 0.030515488237142563, -0.01077729556709528, -0.00466441735625267, 0.005602889694273472, 0.019542580470442772, 0.03934597596526146, 0.0033347206190228462, -0.02133103460073471, 0.07440711557865143, 0.001030456623993814, 0.06598648428916931, 0.011019482277333736, 0.05074736848473549, 0.02447945810854435, -0.02740432508289814, -0.02198307402431965, -0.07030858099460602, -0.037911489605903625, 0.012472600676119328, 0.07243236899375916, 0.058832667768001556, 0.02813088335096836, -0.04385437071323395, 0.013618328608572483, 0.09240343421697617, -0.0003210716531611979, -0.007270250003784895, 0.021275144070386887, -0.06606100499629974, -0.0698242038488388, -0.03293735161423683, 0.006851081270724535, 0.035526882857084274, -0.03968131169676781, -0.028820183128118515, 0.04113443195819855, 0.00004162578989053145, 0.007312166504561901, -0.007344768848270178, -0.040314722806215286, 0.03953227400779724, -0.05406345799565315, 0.011466595344245434, -0.010115940123796463, -0.011364132165908813, -0.005668093450367451, -0.05220048874616623, 0.07179895788431168, 0.00891898013651371, -0.0270876195281744, 0.005672750994563103, -0.01804288849234581, 0.03528469800949097, -0.01861109398305416, -0.0537281259894371, 0.08644191920757294, -0.012752045877277851, -0.05823651701211929, 0.0022367313504219055, 0.020585844293236732, 0.01997106336057186, -0.004268535412847996, -0.009240343235433102, -0.02490794099867344, 0.010330181568861008, 0.019114097580313683, -0.024628495797514915, -0.0006438898271881044, 0.0245912354439497, 0.06498047709465027, 0.005132488906383514, 0.08107656240463257, -0.05607546865940094, 0.05473412945866585, -0.04892165586352348, 0.010674831457436085, -0.01794973947107792, -0.01985928602516651, 0.03073904477059841, 0.012863824144005775, -0.04452504217624664, 0.026621876284480095, -0.010833184234797955, -0.03334720432758331, 0.03176368027925491, 0.02302633970975876, -0.006497116293758154, -0.023901935666799545, -0.023603860288858414, -0.024963829666376114, 0.031502865254879, 0.05231226608157158, 0.019430803135037422, 0.01151316985487938, -0.008509126491844654, -0.02636105939745903, 0.01978476718068123, -0.02354797162115574, -0.03683096542954445, -0.0003958816232625395, -0.01933765411376953, -0.037203557789325714, -0.04318369925022125, -0.02375289797782898, 0.022877302020788193, 0.010181143879890442, 0.017130032181739807, -0.02019462175667286, 0.01406544167548418, -0.040538281202316284, -0.02615613304078579, -0.03979308903217316, 0.02919277735054493, 0.045568305999040604, 0.054324276745319366, -0.12206195294857025, -0.024200011044740677, -0.007810511626303196, 0.04024020582437515, -0.017400162294507027, 0.043668072670698166, 0.015024872496724129, 0.017195235937833786, 0.06319202482700348, -0.008807201869785786, -0.0035047167912125587, 0.005304813850671053, 0.01652456447482109, -0.014438035897910595, -0.04016568511724472, -0.02939770556986332, -0.012370136566460133, 0.054547831416130066, 0.0005350224091671407, -0.050374772399663925, -0.061776164919137955, 0.02291456051170826, 0.028801552951335907, 0.006264244671911001, -0.03215490281581879, -0.011336186900734901, -0.03167052939534187, -0.05316923186182976, 0.058832667768001556, -0.03344035521149635, -0.011597002856433392, 0.040948133915662766, -0.05942881852388382, -0.010078680701553822, 0.008378718048334122, 0.03351487219333649, 0.04214043542742729, -0.06129179149866104, -0.019281763583421707, -0.010581683367490768, 0.025038348510861397, 0.03601125627756119, 0.01987791620194912, -0.04992765933275223, -0.012509860098361969, -0.05931704118847847, 0.06811027228832245, 0.060099489986896515, 0.02153596095740795, 0.038563527166843414, -0.0020364616066217422, 0.020101472735404968, 0.014475295320153236, -0.026547357439994812, -0.03215490281581879, 0.04184236004948616, 0.04050102084875107, 0.017865905538201332, -0.02153596095740795, -0.058422815054655075, 0.04605267941951752, 0.026435578241944313, 0.04936876893043518, -0.004936876706779003, -0.10842499136924744, -0.006180411204695702, -0.01987791620194912, -0.007754622492939234, 0.0075776404701173306, -0.012677527032792568, -0.04072457551956177, 0.05995045229792595, -0.011755355633795261, -0.010795924812555313, -0.008355431258678436, -0.02365974895656109, -0.058124739676713943, 0.005202350672334433, 0.015825951471924782, 0.025019720196723938, 0.004131141118705273, -0.03021741285920143, 0.04582912102341652, -0.00988306850194931, -0.0009105277713388205, -0.03979308903217316, 0.0030040431302040815, -0.020138731226325035, 0.010423330590128899, -0.014447350986301899, -0.014279683120548725, -0.025504091754555702, -0.05514398217201233, 0.022840041667222977, 0.023268524557352066, -0.006692728493362665, 0.004983451217412949, 0.008304199203848839, 0.029248666018247604, 0.01203480176627636, 0.05834829434752464, -0.0702713206410408, -0.08621836453676224, 0.04538200795650482, 0.0353592149913311, -0.008527756668627262, -0.0311675276607275, 0.013478605076670647, -0.0021005014423280954, 0.02613750286400318, 0.05834829434752464, 0.0682220533490181, -0.05629902705550194, 0.011233723722398281, 0.043369997292757034, -0.0033673227299004793, 0.03181956708431244, 0.0052675544284284115, 0.011317557655274868, -0.05223774537444115, -0.022746892645955086, 0.007051350548863411, 0.009524446912109852, -0.04746853560209274, -0.01370216254144907, -0.042736586183309555, 0.03537784516811371, 0.01985928602516651, -0.022840041667222977, -0.046499792486429214, -0.024106863886117935, 0.008956239558756351, -0.03746437653899193, -0.022840041667222977, -0.047021422535181046, -0.013469290919601917, -0.027013100683689117, -0.028503477573394775, -0.013785995543003082, 0.0033999246079474688, -0.006813821382820606, 0.053504567593336105, 0.01826644502580166, -0.018396852537989616, -0.055591095238924026, 0.03979308903217316, -0.015145965851843357, 0.00279911607503891, -0.015155280940234661, 0.018434112891554832, 0.013143270276486874, 0.002990070730447769, 0.007158471271395683, -0.030683156102895737, 0.022448817268013954, -0.06546485424041748, -0.015388152562081814, -0.1076798066496849, 0.01114057470113039, 0.004727292340248823, -0.018750816583633423, -0.10574231296777725, -0.06363913416862488, -0.010469905100762844, -0.017595773562788963, -0.03085082396864891, -0.002980755874887109, 0.0032578730024397373, -0.012100005522370338, 0.02500109001994133, -0.042103175073862076, -0.066657155752182, 0.05398894101381302, 0.007642844226211309, -0.04594089835882187, -0.02259785495698452, -0.062297798693180084, 0.016133341938257217, -0.09486255794763565, -0.010907703079283237, 0.10909566283226013, 0.0044199018739163876, 0.03463265672326088, -0.01454981416463852, 0.017130032181739807, -0.037184927612543106, 0.009193768724799156, -0.05607546865940094, 0.03222942352294922, 0.01593772880733013, -0.005994113627821207, -0.023156747221946716, -0.010600312612950802, -0.015872525051236153, -0.022150741890072823, -0.0034767722245305777, -0.025820797309279442, 0.0015183225041255355, 0.07060665637254715, 0.035396475344896317, 0.020380917936563492, -0.03390609845519066, 0.03837723284959793, -0.007866401225328445, 0.047543056309223175, 0.057677626609802246, -0.048362765461206436, 0.005551657639443874, 0.04277384653687477, -0.015825951471924782, -0.004992765840142965, -0.0037934775464236736, 0.06147808954119682, 0.0008732682908885181, -0.004531680606305599, 0.005453851539641619, -0.005258239805698395, -0.05860911309719086, 0.01867629773914814, 0.07362467050552368, 0.012640267610549927, 0.10216540843248367, 0.05473412945866585, 0.0039029272738844156, -0.05797570198774338, 0.01374873612076044, 0.011168519966304302, 0.0006729987799189985, -0.00010908576950896531, 0.005593574605882168, 0.046238973736763, -0.007186416070908308, -0.030627265572547913, -0.041879620403051376, 0.014736112207174301, -0.017195235937833786, -0.04843728244304657, 0.00003871489388984628, -0.05708147585391998, 0.019169986248016357, -0.04813920706510544, -0.022337039932608604, 0.060509342700242996, 0.008369403891265392, 0.004678389523178339, -0.02216937206685543, -0.032564759254455566, 0.04456229880452156, 0.020231880247592926, -0.034055136144161224, 0.026938581839203835, 0.00017974773072637618, 0.046723347157239914, -0.05540480092167854, 0.05704421550035477, 0.016450045630335808, -0.05231226608157158, -0.0344463586807251, 0.014773371629416943, 0.027888696640729904, -0.006539033260196447, -0.01046059001237154, 0.02112610638141632, 0.01913272589445114, 0.015462671406567097, 0.00888637825846672, -0.0022576896008104086, -0.03789285942912102, 0.007298194337636232, -0.027273915708065033, -0.04161880537867546, 0.013106010854244232, -0.008774599991738796, -0.0019444774370640516, 0.039196938276290894, 0.09098757058382034, -0.0058264462277293205, 0.010665517300367355, -0.020790772512555122, -0.016487305983901024, -0.06878094375133514, -0.014652278274297714, 0.024665754288434982, 0.10186733305454254, 0.045046672224998474, -0.045754604041576385, 0.01303149200975895, 0.07407177984714508, -0.040426500141620636, 0.014819945208728313, -0.0711655467748642, 0.04139524698257446, 0.020995698869228363, -0.0298075582832098, 0.0299193374812603, 0.017763441428542137, -0.0171114020049572, 0.030813563615083694, 0.00978060532361269, -0.03934597596526146, 0.05626176670193672, 0.03889886289834976, -0.03439047187566757, -0.00008987386536318809, -0.045978158712387085, 0.06736508011817932, -0.014922409318387508, -0.056112729012966156, -0.04098539426922798, -0.030366450548171997, -0.0337756909430027, -0.021293774247169495, -0.02291456051170826, -0.008434607647359371, 0.021405553445219994, -0.059577856212854385, -0.00016562988457735628, -0.0038912836462259293, -0.04050102084875107, 0.006077947560697794, -0.011410705745220184, 0.018648354336619377, -0.006315476261079311, 0.01329230796545744, 0.03787422925233841, -0.05458509176969528, -0.038339972496032715, 0.003642111085355282, 0.06024852767586708, -0.06248409301042557, 0.038861606270074844, 0.015229799784719944, 0.040836356580257416, 0.011159204877912998, 0.01616128534078598, 0.0020201606675982475, -0.07194799184799194, -0.03610440716147423, -0.01636621356010437, -0.019747506827116013, -0.03724081814289093, 0.002403234364464879, 0.03345898538827896, -0.01878807693719864, 0.006301504094153643, 0.02490794099867344, -0.02310085855424404, -0.053616344928741455, 0.031502865254879, -0.024237271398305893, 0.022001704201102257, -0.03642110899090767, -0.02813088335096836, 0.02770240046083927, -0.03599262610077858, -0.004983451217412949, 0.02896922081708908, 0.007195731159299612, 0.008131874725222588, -0.0010182308033108711, -0.0339992456138134, -0.0383027121424675, 0.07396000623703003, -0.006529718171805143, 0.059577856212854385, 0.028894701972603798, -0.023380303755402565, 0.05283389613032341, -0.002871306147426367, -0.009366094134747982, 0.03178231045603752, 0.038339972496032715, 0.08755970001220703, -0.020138731226325035, 0.006222327705472708, -0.0512317419052124, 0.02114473655819893, 0.023771528154611588, 0.007796539459377527, -0.011820560321211815, 0.006660126149654388, 0.011792615056037903, -0.04281110689043999, 0.006110549438744783, 0.07727609574794769, 0.02624928206205368, 0.031148899346590042, 0.020455436781048775, 0.025504091754555702, -0.02604435384273529, -0.03340309485793114, 0.07492875307798386, 0.0385262705385685, -0.011280298233032227, -0.020008323714137077, 0.026193391531705856, -0.014298313297331333, -0.029677150771021843, -0.057379551231861115, -0.0349121019244194, 0.017083456739783287, -0.0040915533900260925, -0.059279780834913254, -0.022243890911340714, -0.02626791037619114, -0.0342228040099144, -0.00923568569123745, -0.017623718827962875, -0.04333273693919182, -0.0013425045181065798, 0.029472224414348602, -0.027963215485215187, -0.0012726429849863052, 0.03485621511936188, 0.053094714879989624, -0.004752908367663622, -0.029341815039515495, -0.04173058271408081, -0.05849733203649521, -0.00933814886957407, 0.08383376151323318, -0.017893850803375244, -0.004992765840142965, -0.02867114543914795, 0.01783796027302742, 0.03711041063070297, -0.029658520594239235, -0.03889886289834976, 0.01277067605406046, -0.031223418191075325, 0.03232257068157196, -0.006813821382820606, -0.013590383343398571, -0.010823870077729225, 0.023194005712866783, -0.030291931703686714, -0.06941435486078262, -0.02751610241830349, 0.05071010813117027, -0.02207622304558754, 0.03617892414331436, 0.014279683120548725, -0.016645658761262894, -0.005211665295064449, 0.02773965895175934, 0.025019720196723938, -0.0976942703127861, 0.036663297563791275, 0.0174560509622097, 0.019840655848383904, 0.026808172464370728, -0.05771488696336746, -0.009212398901581764, -0.02406960353255272, -0.008150503970682621, 0.015108706429600716, 0.06669440865516663, -0.02365974895656109, -0.0020224894396960735, -0.022206630557775497, 0.042736586183309555, -0.007745307870209217, -0.021480072289705276, 0.07261866331100464, 0.040538281202316284, 0.04392888769507408, -0.03375706076622009, -0.026174763217568398, 0.047766610980033875, 0.005877677816897631, -0.013078066520392895, 0.02218800224363804, 0.03690548241138458, -0.017036883160471916, -0.020101472735404968, 0.038451749831438065, 0.016971679404377937, -0.017847275361418724, 0.005151118617504835, -0.026845432817935944, -0.0317264199256897, 0.024870682507753372, -0.00972471572458744, 0.009743345901370049, 0.07101650536060333, 0.03230394050478935, -0.01046059001237154, 0.05354182794690132, 0.008490496315062046, -0.005258239805698395, -0.023492082953453064, -0.01915135607123375, -0.0032252708915621042, -0.00006705972919007763, -0.0005708264070563018, 0.02269100397825241, 0.11259805411100388, 0.0863673985004425 ]
4,773
optbinning.binning.binning
transform
Transform given data to Weight of Evidence (WoE) or event rate using bins from the fitted optimal binning. Parameters ---------- x : array-like, shape = (n_samples,) Training vector, where n_samples is the number of samples. metric : str (default="woe") The metric used to transform the input vector. Supported metrics are "woe" to choose the Weight of Evidence, "event_rate" to choose the event rate, "indices" to assign the corresponding indices of the bins and "bins" to assign the corresponding bin interval. metric_special : float or str (default=0) The metric value to transform special codes in the input vector. Supported metrics are "empirical" to use the empirical WoE or event rate and any numerical value. metric_missing : float or str (default=0) The metric value to transform missing values in the input vector. Supported metrics are "empirical" to use the empirical WoE or event rate and any numerical value. show_digits : int, optional (default=2) The number of significant digits of the bin column. Applies when ``metric="bins"``. check_input : bool (default=False) Whether to check input arrays. Returns ------- x_new : numpy array, shape = (n_samples,) Transformed array. Notes ----- Transformation of data including categories not present during training return zero WoE or event rate.
def transform(self, x, metric="woe", metric_special=0, metric_missing=0, show_digits=2, check_input=False): """Transform given data to Weight of Evidence (WoE) or event rate using bins from the fitted optimal binning. Parameters ---------- x : array-like, shape = (n_samples,) Training vector, where n_samples is the number of samples. metric : str (default="woe") The metric used to transform the input vector. Supported metrics are "woe" to choose the Weight of Evidence, "event_rate" to choose the event rate, "indices" to assign the corresponding indices of the bins and "bins" to assign the corresponding bin interval. metric_special : float or str (default=0) The metric value to transform special codes in the input vector. Supported metrics are "empirical" to use the empirical WoE or event rate and any numerical value. metric_missing : float or str (default=0) The metric value to transform missing values in the input vector. Supported metrics are "empirical" to use the empirical WoE or event rate and any numerical value. show_digits : int, optional (default=2) The number of significant digits of the bin column. Applies when ``metric="bins"``. check_input : bool (default=False) Whether to check input arrays. Returns ------- x_new : numpy array, shape = (n_samples,) Transformed array. Notes ----- Transformation of data including categories not present during training return zero WoE or event rate. """ self._check_is_fitted() return transform_binary_target(self._splits_optimal, self.dtype, x, self._n_nonevent, self._n_event, self.special_codes, self._categories, self._cat_others, self.cat_unknown, metric, metric_special, metric_missing, self.user_splits, show_digits, check_input)
(self, x, metric='woe', metric_special=0, metric_missing=0, show_digits=2, check_input=False)
[ 0.002183751203119755, -0.010687426663935184, 0.02202257700264454, 0.012149429880082607, -0.009216170758008957, -0.07698648422956467, -0.03717929124832153, -0.015600867569446564, 0.00840189028531313, 0.0038261914160102606, -0.008489795960485935, 0.010058210231363773, 0.0600716657936573, -0.0414542630314827, -0.02964719943702221, 0.0540015771985054, -0.006352310534566641, -0.0037776122335344553, 0.05429768189787865, 0.03938154876232147, 0.0010392481926828623, -0.050189267843961716, 0.006611399818211794, 0.024891063570976257, 0.0023387421388179064, 0.05067043378949165, -0.05773986503481865, -0.01612829975783825, -0.034329310059547424, -0.05340937525033951, -0.04200945422053337, -0.0740254670381546, 0.06162620335817337, -0.048671744763851166, 0.0479314923286438, -0.04604383930563927, -0.026186509057879448, -0.0035786686930805445, -0.004369815811514854, 0.043452948331832886, 0.015536095015704632, -0.0681404396891594, -0.02394723892211914, 0.055222999304533005, 0.03116472251713276, 0.04263867065310478, -0.001434243400581181, 0.09956425428390503, -0.011464694514870644, -0.04870875924825668, -0.05352041497826576, -0.03308938443660736, 0.0675482377409935, 0.04363801330327988, 0.012278974056243896, 0.03458840027451515, 0.009660323150455952, 0.021948551759123802, 0.060700882226228714, -0.01741449162364006, 0.029258565977215767, 0.05337236076593399, 0.016933325678110123, -0.04071400687098503, 0.01848786137998104, 0.0018888061167672276, -0.03242315351963043, 0.0008744258666411042, -0.026186509057879448, 0.06743720173835754, 0.022133614867925644, -0.029129020869731903, 0.02698228321969509, 0.03468093276023865, -0.05185484141111374, 0.006130233872681856, -0.01854337938129902, -0.0003371628699824214, -0.006454095710068941, 0.0194131787866354, 0.10926158726215363, 0.03849324211478233, -0.003520836355164647, -0.03046148084104061, -0.024039771407842636, -0.04437826946377754, -0.01590622216463089, 0.020560573786497116, 0.009512272663414478, 0.0013914474984630942, -0.009058866649866104, -0.031201735138893127, 0.025964433327317238, 0.041232187300920486, 0.03381113335490227, 0.0035763555206358433, -0.06740018725395203, 0.004325863439589739, 0.0009363064891658723, -0.03993673995137215, -0.011686771176755428, 0.0558152012526989, -0.016008008271455765, 0.06251450628042221, 0.01610979251563549, -0.004783895798027515, -0.011131579987704754, -0.008392637595534325, -0.03816013038158417, 0.012713873758912086, -0.0448964461684227, 0.019339153543114662, -0.07013913244009018, -0.03336697816848755, -0.04097309708595276, 0.016664983704686165, 0.009937918744981289, 0.029147528111934662, -0.06643785536289215, 0.03727182373404503, 0.040417905896902084, -0.03159036859869957, 0.005066118203103542, -0.035606250166893005, -0.026741700246930122, -0.01558236125856638, 0.051299650222063065, 0.012630595825612545, 0.017895657569169998, 0.019505711272358894, -0.051780816167593, -0.04352697357535362, -0.01448123250156641, 0.04870875924825668, 0.0003033309185411781, -0.038456231355667114, 0.0235586054623127, 0.02465048059821129, -0.0007350497762672603, -0.007897592149674892, 0.06736317276954651, 0.024465417489409447, 0.044341254979372025, 0.01458301767706871, 0.06839953362941742, -0.017257187515497208, 0.03138680011034012, 0.051706790924072266, -0.006958393845707178, -0.041491273790597916, -0.03197900205850601, 0.028277728706598282, 0.008952454663813114, -0.06421709060668945, 0.03767896443605423, 0.03703124076128006, 0.013435622677206993, -0.013139520771801472, -0.022929389029741287, -0.005898904521018267, 0.01763656735420227, 0.006824222858995199, -0.020134927704930305, 0.044785406440496445, -0.015989501029253006, 0.048486679792404175, -0.026704687625169754, 0.054334692656993866, 0.04970810189843178, -0.022577768191695213, -0.037790000438690186, -0.035624757409095764, -0.019505711272358894, 0.05289119854569435, 0.031016672030091286, 0.07780076563358307, 0.0010884057264775038, -0.026075471192598343, 0.0010190068278461695, 0.07184171676635742, 0.024891063570976257, 0.016637224704027176, -0.012584329582750797, -0.043230872601270676, -0.07965140044689178, -0.06051582098007202, 0.017136896029114723, 0.022818351164460182, -0.06336580216884613, -0.005482511129230261, 0.05048536881804466, -0.01164050493389368, -0.0005045876605436206, -0.01003970392048359, -0.0099101597443223, 0.0007321581360884011, -0.06817745417356491, 0.03297834470868111, 0.0025677583180367947, -0.020838169381022453, -0.024465417489409447, -0.009873147122561932, 0.03636500984430313, 0.03638351708650589, -0.0366055928170681, -0.023355035111308098, 0.0011537562822923064, 0.01177930273115635, -0.033829640597105026, -0.050226278603076935, 0.09393832087516785, 0.011908846907317638, -0.04656201973557472, 0.01614680513739586, 0.02940661646425724, 0.0272043589502573, -0.0027667018584907055, -0.00025518544134683907, -0.04682110995054245, 0.011733036488294601, -0.025335216894745827, -0.029684212058782578, 0.01747000962495804, 0.03982570022344589, 0.06988003849983215, 0.016276350244879723, 0.0691768005490303, -0.04522956162691116, 0.06543851643800735, 0.008651726879179478, -0.005940543953329325, -0.0067085581831634045, -0.008332491852343082, 0.01849711313843727, 0.026205016300082207, 0.015397297218441963, -0.00027759550721384585, -0.01371321827173233, -0.03458840027451515, 0.029017983004450798, 0.023595618084073067, -0.029092008247971535, -0.041491273790597916, -0.018783962354063988, -0.0021386421285569668, -0.02874038740992546, 0.046525005251169205, 0.0430828221142292, -0.01217718981206417, -0.015378790907561779, 0.007550597656518221, -0.012158683501183987, -0.01610053889453411, -0.036013390868902206, -0.015841450542211533, -0.013472635298967361, -0.05074445903301239, -0.03543969243764877, -0.019043052569031715, 0.00016323194722644985, 0.03827116638422012, 0.057369738817214966, 0.023355035111308098, 0.0215414110571146, -0.0636989176273346, -0.016045020893216133, -0.030628036707639694, 0.02787058800458908, 0.07802284508943558, 0.036476049572229385, -0.1237705796957016, -0.018025200814008713, 0.007384040392935276, -0.00032154814107343554, -0.0322565995156765, 0.02918454073369503, 0.04234256595373154, 0.012593583203852177, 0.018145492300391197, 0.003673513885587454, -0.026242028921842575, 0.03897440806031227, 0.013990813866257668, -0.0029841517098248005, -0.04774642735719681, -0.06299567222595215, -0.018349062651395798, 0.030776089057326317, 0.0018321303650736809, -0.03686468303203583, -0.057184673845767975, -0.006754823960363865, 0.016211576759815216, 0.0054131122305989265, -0.0198203194886446, -0.015804437920451164, -0.021652448922395706, -0.07802284508943558, 0.08061373233795166, -0.020338498055934906, 0.01656319759786129, 0.034551385790109634, -0.006657665595412254, -0.03308938443660736, -0.029499148949980736, 0.03181244432926178, 0.04097309708595276, -0.07143457978963852, 0.00446928758174181, -0.01350964792072773, 0.026223521679639816, 0.01677602156996727, 0.03418125957250595, -0.02159693092107773, 0.008462036028504372, -0.04423021897673607, 0.07273001968860626, 0.04918992519378662, 0.03181244432926178, 0.04622890427708626, -0.017571795731782913, 0.020116420462727547, 0.0296286940574646, -0.06943588703870773, -0.022596273571252823, -0.0020322303753346205, 0.024465417489409447, -0.006134860683232546, -0.006990780122578144, -0.09193962812423706, 0.032959841191768646, -0.006366190034896135, 0.04730227589607239, -0.009725095704197884, -0.12066151201725006, -0.02328100986778736, -0.002191847888752818, 0.03456989303231239, 0.0006847355980426073, -0.005542656872421503, -0.057147663086652756, 0.06599370390176773, 0.02117128297686577, 0.03251568600535393, -0.009512272663414478, -0.054556768387556076, -0.05374249070882797, -0.009762108325958252, 0.005177156068384647, 0.002819907618686557, 0.02026447281241417, -0.03423677757382393, 0.04115816205739975, 0.0025145525578409433, 0.04426722973585129, -0.04404515400528908, 0.016618717461824417, -0.05352041497826576, 0.005098504014313221, -0.01287117786705494, 0.0053344601765275, -0.02152290567755699, -0.03901142254471779, 0.015600867569446564, 0.03177543357014656, -0.010650414042174816, 0.03390366584062576, 0.008841416798532009, 0.01548057608306408, 0.0013255185913294554, 0.02398425154387951, -0.04615487903356552, -0.04441528022289276, 0.048486679792404175, 0.04622890427708626, 0.003456064034253359, -0.007194350007921457, 0.007166590541601181, -0.04075102135539055, 0.010613401420414448, 0.044563330709934235, 0.08772017806768417, -0.07572805136442184, 0.028037145733833313, 0.06314372271299362, -0.026408586651086807, 0.0313497856259346, 0.020357003435492516, 0.0054131122305989265, -0.01674826256930828, -0.029073502868413925, 0.01610979251563549, 0.009077372960746288, -0.01503642275929451, -0.051965877413749695, -0.021856019273400307, -0.0010675860103219748, 0.01047460362315178, -0.028462791815400124, -0.04075102135539055, -0.01720166765153408, 0.007661635987460613, -0.013370850123465061, -0.023243997246026993, -0.06366190314292908, -0.01807146705687046, -0.032164067029953, -0.01742374524474144, -0.00913289189338684, 0.0006668075220659375, -0.026501117274165154, 0.061071012169122696, -0.003671200480312109, -0.015295512042939663, -0.03164588660001755, 0.026260534301400185, 0.012926697731018066, -0.010594895109534264, -0.017803125083446503, 0.02178199402987957, 0.01327831856906414, -0.009891653433442116, 0.036920201033353806, -0.003927976358681917, 0.03394067659974098, -0.0770605131983757, 0.007425679825246334, -0.07720856368541718, 0.0036457544192671776, 0.02065310627222061, -0.025612812489271164, -0.09253183752298355, -0.0653274729847908, -0.05625935643911362, -0.01351890154182911, -0.011316643096506596, -0.03590235114097595, 0.0077217817306518555, 0.003449124051257968, 0.02415080927312374, -0.03543969243764877, -0.03440333530306816, 0.04471138119697571, 0.01090950332581997, -0.021948551759123802, -0.031719911843538284, -0.08483318984508514, 0.02115277759730816, -0.08512929081916809, -0.04141724854707718, 0.0837228074669838, 0.003666573902592063, 0.02435437962412834, -0.03284880146384239, 0.011890340596437454, -0.005829505622386932, -0.001249179826118052, -0.04326788708567619, 0.05922037363052368, 0.014508991502225399, -0.0015140521572902799, -0.025353722274303436, 0.010271033272147179, -0.04363801330327988, -0.009100506082177162, -0.019505711272358894, -0.023836201056838036, -0.03112770989537239, 0.05922037363052368, 0.037364356219768524, 0.025094633921980858, -0.0054871379397809505, 0.053298335522413254, -0.013315331190824509, 0.025372229516506195, 0.04363801330327988, -0.054556768387556076, -0.020338498055934906, 0.08061373233795166, -0.014453472569584846, 0.03131277114152908, -0.01636888086795807, 0.060441795736551285, 0.0021004725713282824, -0.012630595825612545, 0.027148840948939323, -0.011945859529078007, -0.060219720005989075, 0.002221920760348439, 0.04667305946350098, -0.0075459713116288185, 0.0900149717926979, 0.033015359193086624, -0.001068164361640811, -0.052150942385196686, 0.04071400687098503, 0.03373710811138153, -0.011048301123082638, 0.01514746155589819, 0.013861268758773804, 0.05862817168235779, -0.04134322330355644, -0.06203334406018257, -0.05248405784368515, 0.002799087902531028, -0.004295790567994118, -0.05644441768527031, -0.00528356758877635, -0.03005434013903141, -0.002145581878721714, -0.042786721140146255, -0.00807340256869793, 0.06529046595096588, 0.00587114505469799, 0.01651693321764469, -0.06225541979074478, -0.03771597519516945, 0.04049193114042282, 0.006134860683232546, -0.019746294245123863, 0.00967883039265871, -0.03157186135649681, 0.023188477382063866, -0.0013868209207430482, 0.03640202432870865, -0.005524150561541319, -0.06662292033433914, -0.0200238898396492, -0.01614680513739586, 0.009387354366481304, -0.013990813866257668, -0.007897592149674892, 0.03834519162774086, 0.04807954281568527, 0.0007980871014297009, 0.017766112461686134, 0.007300761993974447, -0.02155991829931736, 0.00914677232503891, 0.0012711561284959316, -0.018617404624819756, 0.008133548311889172, 0.0047515095211565495, -0.0016817661235108972, 0.05252106860280037, 0.06347683817148209, -0.003314953064545989, 0.01701660454273224, -0.0017962742131203413, -0.03808610513806343, -0.061552178114652634, -0.001770828035660088, 0.025594305247068405, 0.10037853568792343, 0.06873264908790588, -0.05311327427625656, 0.051928866654634476, 0.06010868027806282, -0.03181244432926178, 0.016664983704686165, -0.07920724898576736, -0.009863893501460552, 0.015091942623257637, -0.021726474165916443, -0.008864549919962883, 0.03682766854763031, -0.008013256825506687, 0.031497836112976074, -0.03114621527493, -0.02831474132835865, 0.04789447784423828, 0.017932670190930367, 0.0013104821555316448, -0.042564645409584045, -0.05666649714112282, 0.0505593940615654, -0.01221420243382454, -0.016850046813488007, -0.051706790924072266, -0.027611499652266502, -0.06506838649511337, -0.01740523800253868, -0.03586534038186073, -0.03375561162829399, 0.05485287308692932, -0.050411343574523926, 0.016498425975441933, 0.01287117786705494, -0.021689461544156075, 0.036661114543676376, 0.016590958461165428, -0.006352310534566641, -0.0020183506421744823, 0.02637157216668129, 0.05185484141111374, -0.03677215054631233, -0.02633455954492092, -0.021893031895160675, 0.05241003260016441, -0.03717929124832153, 0.04667305946350098, -0.001747695030644536, 0.033218927681446075, 0.009549285285174847, 0.015628626570105553, 0.025205671787261963, -0.03812311589717865, -0.013657698407769203, -0.021930044516921043, -0.02026447281241417, -0.014990157447755337, 0.039751674979925156, 0.02202257700264454, 0.008563821204006672, 0.03303386643528938, 0.02333652973175049, -0.04267568141222, -0.03312639519572258, 0.025168659165501595, -0.021707968786358833, 0.03721630573272705, -0.03423677757382393, -0.02224465273320675, 0.0045548793859779835, -0.05648143216967583, -0.03812311589717865, 0.04722824692726135, 0.01697959192097187, -0.0156748928129673, -0.018904253840446472, -0.03588384389877319, -0.03727182373404503, 0.052854184061288834, -0.023225490003824234, 0.005843385588377714, 0.05414963141083717, -0.014555257745087147, 0.0366055928170681, 0.012861925177276134, 0.002641783794388175, 0.060848936438560486, 0.05429768189787865, 0.0809098333120346, -0.018895000219345093, 0.007879085838794708, -0.022355690598487854, 0.004466974176466465, 0.013481887988746166, -0.02614949643611908, -0.004931946750730276, -0.0069352611899375916, 0.039751674979925156, -0.057813890278339386, 0.020560573786497116, 0.04930096119642258, 0.058702196925878525, 0.0366055928170681, -0.004374442622065544, 0.014629282988607883, -0.029980314895510674, -0.05751778930425644, 0.064513199031353, 0.03695721551775932, -0.030442973598837852, -0.005699960980564356, 0.012362252920866013, -0.01316727977246046, -0.002896246500313282, -0.029369603842496872, -0.01700735092163086, 0.03260821849107742, -0.012371506541967392, -0.022337185218930244, -0.0014643162721768022, 0.01935766078531742, -0.010918756946921349, 0.01164050493389368, 0.008406517095863819, -0.05529702454805374, -0.034736450761556625, 0.013370850123465061, -0.005926663987338543, 0.02117128297686577, -0.006939887534826994, 0.06318073719739914, -0.024706000462174416, -0.031238747760653496, -0.011918100528419018, -0.058258041739463806, -0.00916990451514721, 0.028407273814082146, -0.006477228365838528, -0.019894344732165337, -0.024076784029603004, 0.03545819967985153, 0.03140530362725258, -0.04682110995054245, -0.008346371352672577, 0.022318677976727486, -0.03827116638422012, 0.057813890278339386, -0.0200238898396492, 0.002507612807676196, -0.0016100539360195398, 0.03138680011034012, -0.02655663713812828, -0.03466242551803589, -0.05973855406045914, 0.062403470277786255, -0.024557948112487793, 0.022152122110128403, 0.04730227589607239, -0.017951175570487976, 0.004416082054376602, 0.00847591646015644, 0.02305893413722515, -0.09689933806657791, 0.03708675876259804, 0.018423087894916534, 0.01000269129872322, 0.028370261192321777, -0.06606773287057877, 0.008633220568299294, -0.024095289409160614, -0.04904187098145485, 0.026538129895925522, 0.03270075097680092, -0.03543969243764877, 0.006380070000886917, -0.02305893413722515, 0.02000538259744644, -0.01655394583940506, -0.02592742070555687, 0.07228586822748184, 0.0430828221142292, 0.05818401649594307, -0.03730883449316025, -0.021393360570073128, 0.04315684735774994, 0.005746226757764816, -0.02485405094921589, 0.04463735595345497, 0.015554601326584816, -0.04334191232919693, -0.042157504707574844, 0.01676676794886589, 0.034736450761556625, 0.028629349544644356, 0.01720166765153408, -0.024076784029603004, -0.00816593412309885, 0.013185786083340645, 0.00038689872599206865, 0.005140143446624279, 0.07291508466005325, 0.06303268671035767, 0.013685458339750767, 0.031682901084423065, 0.024761518463492393, 0.00903573352843523, -0.0029725851491093636, 0.025612812489271164, 0.003055863780900836, 0.029480643570423126, -0.01850636675953865, 0.029369603842496872, 0.07502481341362, 0.05407560616731644 ]
4,774
optbinning.binning.multidimensional.binning_2d
OptimalBinning2D
Optimal binning of two numerical variables with respect to a binary target. Parameters ---------- name_x : str, optional (default="") The name of variable x. name_y : str, optional (default="") The name of variable y. dtype_x : str, optional (default="numerical") The data type of variable x. Supported data types are "numerical" for continuous and ordinal variables and "categorical" for categorical and nominal variables. dtype_y : str, optional (default="numerical") The data type of variable y. Supported data types are "numerical" for continuous and ordinal variables and "categorical" for categorical and nominal variables. prebinning_method : str, optional (default="cart") The pre-binning method. Supported methods are "cart" for a CART decision tree, "mdlp" for Minimum Description Length Principle (MDLP), "quantile" to generate prebins with approximately same frequency and "uniform" to generate prebins with equal width. Method "cart" uses `sklearn.tree.DecistionTreeClassifier <https://scikit-learn.org/stable/modules/generated/sklearn.tree. DecisionTreeClassifier.html>`_. strategy: str, optional (default="grid") The strategy used to create the initial prebinning 2D after computing prebinning splits on the x and y axis. The strategy "grid" creates a prebinning 2D with n_prebins_x times n_prebins_y elements. The strategy "cart" (experimental) reduces the number of elements by pruning. The latter is recommended when the number of prebins is large. solver : str, optional (default="cp") The optimizer to solve the optimal binning problem. Supported solvers are "mip" to choose a mixed-integer programming solver, and "cp" to choose a constrained programming solver. divergence : str, optional (default="iv") The divergence measure in the objective function to be maximized. Supported divergences are "iv" (Information Value or Jeffrey's divergence), "js" (Jensen-Shannon), "hellinger" (Hellinger divergence) and "triangular" (triangular discrimination). max_n_prebins_x : int (default=5) The maximum number of bins on variable x after pre-binning (prebins). max_n_prebins_y : int (default=5) The maximum number of bins on variable y after pre-binning (prebins). min_prebin_size_x : float (default=0.05) The fraction of mininum number of records for each prebin on variable x. min_prebin_size_y : float (default=0.05) The fraction of mininum number of records for each prebin on variable y. min_n_bins : int or None, optional (default=None) The minimum number of bins. If None, then ``min_n_bins`` is a value in ``[0, max_n_prebins]``. max_n_bins : int or None, optional (default=None) The maximum number of bins. If None, then ``max_n_bins`` is a value in ``[0, max_n_prebins]``. min_bin_size : float or None, optional (default=None) The fraction of minimum number of records for each bin. If None, ``min_bin_size = min_prebin_size``. max_bin_size : float or None, optional (default=None) The fraction of maximum number of records for each bin. If None, ``max_bin_size = 1.0``. min_bin_n_nonevent : int or None, optional (default=None) The minimum number of non-event records for each bin. If None, ``min_bin_n_nonevent = 1``. max_bin_n_nonevent : int or None, optional (default=None) The maximum number of non-event records for each bin. If None, then an unlimited number of non-event records for each bin. min_bin_n_event : int or None, optional (default=None) The minimum number of event records for each bin. If None, ``min_bin_n_event = 1``. max_bin_n_event : int or None, optional (default=None) The maximum number of event records for each bin. If None, then an unlimited number of event records for each bin. monotonic_trend_x : str or None, optional (default=None) The **event rate** monotonic trend on the x axis. Supported trends are “ascending”, and "descending". If None, then the monotonic constraint is disabled. monotonic_trend_y : str or None, optional (default=None) The **event rate** monotonic trend on the y axis. Supported trends are “ascending”, and "descending". If None, then the monotonic constraint is disabled. min_event_rate_diff_x : float, optional (default=0) The minimum event rate difference between consecutives bins on the x axis. min_event_rate_diff_y : float, optional (default=0) The minimum event rate difference between consecutives bins on the y axis. gamma : float, optional (default=0) Regularization strength to reduce the number of dominating bins. Larger values specify stronger regularization. special_codes_x : array-like or None, optional (default=None) List of special codes for the variable x. Use special codes to specify the data values that must be treated separately. special_codes_y : array-like or None, optional (default=None) List of special codes for the variable y. Use special codes to specify the data values that must be treated separately. split_digits : int or None, optional (default=None) The significant digits of the split points. If ``split_digits`` is set to 0, the split points are integers. If None, then all significant digits in the split points are considered. n_jobs : int or None, optional (default=None) Number of cores to run in parallel while binning variables. ``None`` means 1 core. ``-1`` means using all processors. time_limit : int (default=100) The maximum time in seconds to run the optimization solver. verbose : bool (default=False) Enable verbose output.
class OptimalBinning2D(OptimalBinning): """Optimal binning of two numerical variables with respect to a binary target. Parameters ---------- name_x : str, optional (default="") The name of variable x. name_y : str, optional (default="") The name of variable y. dtype_x : str, optional (default="numerical") The data type of variable x. Supported data types are "numerical" for continuous and ordinal variables and "categorical" for categorical and nominal variables. dtype_y : str, optional (default="numerical") The data type of variable y. Supported data types are "numerical" for continuous and ordinal variables and "categorical" for categorical and nominal variables. prebinning_method : str, optional (default="cart") The pre-binning method. Supported methods are "cart" for a CART decision tree, "mdlp" for Minimum Description Length Principle (MDLP), "quantile" to generate prebins with approximately same frequency and "uniform" to generate prebins with equal width. Method "cart" uses `sklearn.tree.DecistionTreeClassifier <https://scikit-learn.org/stable/modules/generated/sklearn.tree. DecisionTreeClassifier.html>`_. strategy: str, optional (default="grid") The strategy used to create the initial prebinning 2D after computing prebinning splits on the x and y axis. The strategy "grid" creates a prebinning 2D with n_prebins_x times n_prebins_y elements. The strategy "cart" (experimental) reduces the number of elements by pruning. The latter is recommended when the number of prebins is large. solver : str, optional (default="cp") The optimizer to solve the optimal binning problem. Supported solvers are "mip" to choose a mixed-integer programming solver, and "cp" to choose a constrained programming solver. divergence : str, optional (default="iv") The divergence measure in the objective function to be maximized. Supported divergences are "iv" (Information Value or Jeffrey's divergence), "js" (Jensen-Shannon), "hellinger" (Hellinger divergence) and "triangular" (triangular discrimination). max_n_prebins_x : int (default=5) The maximum number of bins on variable x after pre-binning (prebins). max_n_prebins_y : int (default=5) The maximum number of bins on variable y after pre-binning (prebins). min_prebin_size_x : float (default=0.05) The fraction of mininum number of records for each prebin on variable x. min_prebin_size_y : float (default=0.05) The fraction of mininum number of records for each prebin on variable y. min_n_bins : int or None, optional (default=None) The minimum number of bins. If None, then ``min_n_bins`` is a value in ``[0, max_n_prebins]``. max_n_bins : int or None, optional (default=None) The maximum number of bins. If None, then ``max_n_bins`` is a value in ``[0, max_n_prebins]``. min_bin_size : float or None, optional (default=None) The fraction of minimum number of records for each bin. If None, ``min_bin_size = min_prebin_size``. max_bin_size : float or None, optional (default=None) The fraction of maximum number of records for each bin. If None, ``max_bin_size = 1.0``. min_bin_n_nonevent : int or None, optional (default=None) The minimum number of non-event records for each bin. If None, ``min_bin_n_nonevent = 1``. max_bin_n_nonevent : int or None, optional (default=None) The maximum number of non-event records for each bin. If None, then an unlimited number of non-event records for each bin. min_bin_n_event : int or None, optional (default=None) The minimum number of event records for each bin. If None, ``min_bin_n_event = 1``. max_bin_n_event : int or None, optional (default=None) The maximum number of event records for each bin. If None, then an unlimited number of event records for each bin. monotonic_trend_x : str or None, optional (default=None) The **event rate** monotonic trend on the x axis. Supported trends are “ascending”, and "descending". If None, then the monotonic constraint is disabled. monotonic_trend_y : str or None, optional (default=None) The **event rate** monotonic trend on the y axis. Supported trends are “ascending”, and "descending". If None, then the monotonic constraint is disabled. min_event_rate_diff_x : float, optional (default=0) The minimum event rate difference between consecutives bins on the x axis. min_event_rate_diff_y : float, optional (default=0) The minimum event rate difference between consecutives bins on the y axis. gamma : float, optional (default=0) Regularization strength to reduce the number of dominating bins. Larger values specify stronger regularization. special_codes_x : array-like or None, optional (default=None) List of special codes for the variable x. Use special codes to specify the data values that must be treated separately. special_codes_y : array-like or None, optional (default=None) List of special codes for the variable y. Use special codes to specify the data values that must be treated separately. split_digits : int or None, optional (default=None) The significant digits of the split points. If ``split_digits`` is set to 0, the split points are integers. If None, then all significant digits in the split points are considered. n_jobs : int or None, optional (default=None) Number of cores to run in parallel while binning variables. ``None`` means 1 core. ``-1`` means using all processors. time_limit : int (default=100) The maximum time in seconds to run the optimization solver. verbose : bool (default=False) Enable verbose output. """ def __init__(self, name_x="", name_y="", dtype_x="numerical", dtype_y="numerical", prebinning_method="cart", strategy="grid", solver="cp", divergence="iv", max_n_prebins_x=5, max_n_prebins_y=5, min_prebin_size_x=0.05, min_prebin_size_y=0.05, min_n_bins=None, max_n_bins=None, min_bin_size=None, max_bin_size=None, min_bin_n_nonevent=None, max_bin_n_nonevent=None, min_bin_n_event=None, max_bin_n_event=None, monotonic_trend_x=None, monotonic_trend_y=None, min_event_rate_diff_x=0, min_event_rate_diff_y=0, gamma=0, special_codes_x=None, special_codes_y=None, split_digits=None, n_jobs=1, time_limit=100, verbose=False): self.name_x = name_x self.name_y = name_y self.dtype_x = dtype_x self.dtype_y = dtype_y self.prebinning_method = prebinning_method self.strategy = strategy self.solver = solver self.divergence = divergence self.max_n_prebins_x = max_n_prebins_x self.max_n_prebins_y = max_n_prebins_y self.min_prebin_size_x = min_prebin_size_x self.min_prebin_size_y = min_prebin_size_y self.min_n_bins = min_n_bins self.max_n_bins = max_n_bins self.min_bin_size = min_bin_size self.max_bin_size = max_bin_size self.min_bin_n_event = min_bin_n_event self.max_bin_n_event = max_bin_n_event self.min_bin_n_nonevent = min_bin_n_nonevent self.max_bin_n_nonevent = max_bin_n_nonevent self.monotonic_trend_x = monotonic_trend_x self.monotonic_trend_y = monotonic_trend_y self.min_event_rate_diff_x = min_event_rate_diff_x self.min_event_rate_diff_y = min_event_rate_diff_y self.gamma = gamma self.special_codes_x = special_codes_x self.special_codes_y = special_codes_y self.split_digits = split_digits
(name_x='', name_y='', dtype_x='numerical', dtype_y='numerical', prebinning_method='cart', strategy='grid', solver='cp', divergence='iv', max_n_prebins_x=5, max_n_prebins_y=5, min_prebin_size_x=0.05, min_prebin_size_y=0.05, min_n_bins=None, max_n_bins=None, min_bin_size=None, max_bin_size=None, min_bin_n_nonevent=None, max_bin_n_nonevent=None, min_bin_n_event=None, max_bin_n_event=None, monotonic_trend_x=None, monotonic_trend_y=None, min_event_rate_diff_x=0, min_event_rate_diff_y=0, gamma=0, special_codes_x=None, special_codes_y=None, split_digits=None, n_jobs=1, time_limit=100, verbose=False)
[ 0.03155966475605965, -0.010035772807896137, -0.056887801736593246, 0.031881291419267654, -0.015066222287714481, -0.0465153269469738, -0.101714588701725, -0.01498581562191248, -0.053108684718608856, -0.08273858577013016, -0.02203145995736122, 0.03172047808766365, -0.00004997941505280323, -0.019770018756389618, -0.05467661842703819, 0.0380525141954422, 0.004580674227327108, -0.0011413994943723083, -0.01988057792186737, 0.03141895309090614, -0.045068006962537766, -0.04494739696383476, -0.0026031697634607553, 0.07823580503463745, 0.01353849284350872, 0.016604002565145493, 0.0032238096464425325, -0.03861536085605621, -0.027619732543826103, -0.006487822625786066, -0.03962044417858124, -0.055159058421850204, -0.007306966930627823, -0.037409257143735886, 0.03170037642121315, -0.04748021066188812, 0.0806078091263771, 0.06935085356235504, -0.06557174026966095, 0.034394003450870514, 0.020222308114171028, -0.09158333390951157, 0.015920544043183327, 0.010226738639175892, 0.037328850477933884, 0.000436583737609908, -0.006558178924024105, 0.03039376623928547, 0.0007726589683443308, -0.033770851790905, -0.015156679786741734, -0.10927283018827438, 0.04494739696383476, 0.0381128191947937, -0.023921020328998566, 0.06701906025409698, 0.04945017397403717, 0.057691872119903564, 0.02247369848191738, -0.037027325481176376, -0.01183990016579628, 0.04112807288765907, 0.02108667977154255, -0.032765768468379974, -0.034796036779880524, -0.030273156240582466, -0.05238502472639084, 0.00801555160433054, -0.015216984786093235, 0.008759314194321632, 0.02794135920703411, 0.003304216545075178, 0.06090814247727394, 0.019207172095775604, -0.0381128191947937, -0.008327128365635872, -0.041248682886362076, -0.02239328995347023, 0.0019800171721726656, -0.024845696985721588, 0.060626719146966934, 0.06416461616754532, 0.0024360744282603264, -0.048847123980522156, 0.02289583347737789, -0.04494739696383476, 0.028484104201197624, 0.09616652131080627, 0.0422939695417881, -0.04784204065799713, -0.0072918906807899475, -0.0042917123064398766, 0.05628475174307823, 0.07095899432897568, 0.024584375321865082, -0.03352963179349899, -0.021388206630945206, -0.019729815423488617, -0.018744831904768944, -0.058978378772735596, -0.019599154591560364, -0.030152546241879463, 0.007040619384497404, 0.08563323318958282, -0.004068080801516771, 0.015166730619966984, -0.01817193441092968, 0.002671013120561838, -0.04406291991472244, -0.021408308297395706, -0.050133634358644485, 0.013247018679976463, -0.025187427178025246, -0.037027325481176376, -0.0507366843521595, -0.0037213268224149942, -0.05033465102314949, 0.022956138476729393, -0.010553390718996525, 0.04010288789868355, 0.023478781804442406, 0.00046862082672305405, -0.040826547890901566, 0.028202680870890617, -0.008417585864663124, -0.005357102490961552, 0.054716821759939194, 0.08691973984241486, -0.027680037543177605, -0.058576345443725586, 0.053068481385707855, -0.030715392902493477, -0.028926342725753784, 0.05825471878051758, -0.010814713314175606, -0.045470040291547775, 0.010151357389986515, 0.031861189752817154, 0.01182984933257103, -0.05330970138311386, 0.0930306538939476, -0.008573373779654503, -0.007724076975136995, -0.02456427365541458, 0.006206398829817772, 0.011347408406436443, 0.04559065029025078, -0.032745663076639175, -0.004083157051354647, -0.006050610914826393, -0.05021404102444649, -0.04908834397792816, -0.03859525918960571, -0.04868631064891815, 0.033187903463840485, 0.0016357756685465574, -0.0021873158402740955, -0.03501715511083603, -0.01182984933257103, 0.004110797308385372, -0.043379463255405426, -0.04177132621407509, 0.0014247078215703368, -0.05286746472120285, -0.03628356382250786, 0.03931891918182373, -0.03342912346124649, -0.010513187386095524, -0.021207289770245552, 0.008598500862717628, 0.01643313840031624, -0.0137194087728858, -0.06404400616884232, 0.06259668618440628, -0.01227208599448204, 0.09881994128227234, 0.031861189752817154, -0.025911087170243263, -0.03757007047533989, 0.051339734345674515, 0.031901393085718155, -0.028584614396095276, -0.007427576929330826, -0.037007223814725876, -0.037027325481176376, 0.015186832286417484, 0.06432542949914932, -0.04522882029414177, 0.029046952724456787, 0.01856391690671444, -0.01312640868127346, -0.04860590398311615, 0.009121145121753216, -0.009754348546266556, 0.003713788464665413, -0.005032962653785944, 0.013267120346426964, 0.027760444208979607, 0.028122274205088615, -0.022051561623811722, 0.01603110320866108, 0.019347883760929108, 0.0463947169482708, 0.011538374237716198, -0.0016056230524554849, -0.01854381524026394, -0.010086026974022388, 0.02030271477997303, 0.03342912346124649, -0.0017501040128991008, -0.0065732551738619804, -0.05704861879348755, 0.004570623394101858, 0.05254583805799484, 0.046233903616666794, -0.019599154591560364, 0.017096493393182755, -0.00008464699203614146, -0.020905764773488045, -0.017408069223165512, 0.05194278433918953, 0.004960093647241592, 0.02247369848191738, -0.009256831370294094, 0.029891224578022957, -0.01290528941899538, 0.06263688951730728, 0.03168027475476265, 0.10332272201776505, -0.03972095251083374, 0.02488590218126774, -0.03716803714632988, -0.05576210841536522, -0.016141662374138832, 0.01655374839901924, 0.01122679840773344, -0.01950869709253311, 0.008332153782248497, -0.012201730161905289, -0.014272205531597137, 0.00353789865039289, -0.0004045466484967619, -0.0028670046012848616, -0.046716343611478806, -0.030333461239933968, -0.012684171088039875, 0.0758638083934784, 0.06432542949914932, -0.021709833294153214, 0.0054726870730519295, -0.016634155064821243, -0.03457491844892502, -0.020925866439938545, 0.00004487546902964823, 0.010226738639175892, -0.06525010615587234, -0.02074495144188404, 0.018383001908659935, 0.03129834309220314, 0.009276933036744595, -0.020111748948693275, -0.004668619018048048, -0.011940408498048782, 0.05419417470693588, 0.009347288869321346, 0.015860239043831825, -0.011960510164499283, -0.002480046823620796, 0.001181602943688631, 0.03728864714503288, -0.08796502649784088, 0.010186535306274891, -0.024725086987018585, 0.019669510424137115, -0.028202680870890617, 0.04136929288506508, 0.019599154591560364, -0.030293257907032967, 0.01543810311704874, 0.00342985219322145, 0.014201848767697811, -0.0010289556812494993, 0.025870883837342262, -0.018754882737994194, -0.015568764880299568, -0.03634386882185936, -0.056807395070791245, -0.040444616228342056, 0.02237318828701973, -0.01248315442353487, -0.05411376804113388, 0.0025906062219291925, 0.050897497683763504, 0.03893698751926422, 0.04599268361926079, -0.003040381707251072, 0.03843444585800171, -0.049610987305641174, -0.003655996173620224, -0.03437390178442001, 0.01948859542608261, -0.0012638942571356893, 0.057691872119903564, -0.009834755212068558, -0.010543339885771275, 0.00445503881201148, 0.08297980576753616, -0.05531987175345421, 0.025629663839936256, -0.02024240978062153, 0.02408183366060257, 0.029268071055412292, 0.057732075452804565, -0.010563441552221775, 0.01604115404188633, -0.0550786517560482, 0.032363731414079666, 0.016995985060930252, -0.003668559715151787, 0.07292895764112473, -0.03750976547598839, 0.003944958094507456, 0.03923851251602173, -0.028122274205088615, 0.0016709535848349333, 0.02573017217218876, 0.0591793954372406, 0.020222308114171028, -0.03131844475865364, -0.04703797027468681, -0.020001187920570374, -0.027700139209628105, 0.029489189386367798, 0.050897497683763504, -0.007447679061442614, -0.0381530225276947, 0.010804662480950356, -0.003826860571280122, 0.0048218946903944016, -0.07043635100126266, 0.04832448065280914, 0.024262748658657074, 0.012081120163202286, 0.04868631064891815, -0.004020339343696833, -0.05375193804502487, 0.033630140125751495, 0.0014598857378587127, 0.02627291902899742, 0.08173350244760513, 0.03242403641343117, 0.027780545875430107, -0.023498883470892906, 0.05294787138700485, 0.06211424618959427, -0.048806920647621155, 0.0004243342555128038, -0.04949037730693817, 0.042454782873392105, -0.0027564452029764652, -0.03640417382121086, 0.0011514503275975585, -0.03310749679803848, 0.04390210658311844, 0.028946444392204285, -0.002728805411607027, -0.03716803714632988, 0.029006749391555786, 0.028001664206385612, -0.047962650656700134, 0.006653661839663982, -0.0721248909831047, -0.04128888621926308, 0.006372238043695688, -0.00018248571723233908, 0.036987122148275375, -0.03417288511991501, -0.0018091527745127678, -0.006392339710146189, -0.004595750477164984, 0.06058651581406593, 0.005342026241123676, -0.05242522805929184, 0.034032173454761505, -0.0073320940136909485, -0.012704272754490376, -0.0017475913045927882, -0.02830318920314312, 0.067461296916008, -0.04575146362185478, 0.012201730161905289, 0.025629663839936256, 0.021689731627702713, -0.004354530014097691, -0.037389155477285385, -0.012071069329977036, 0.07244651764631271, 0.02830318920314312, -0.009648814797401428, -0.013035950250923634, -0.04313824325799942, -0.034052275121212006, 0.0010471728164702654, 0.057691872119903564, -0.004201254807412624, -0.07715031504631042, 0.058093905448913574, -0.0028268012683838606, 0.004960093647241592, 0.044103123247623444, -0.0337507501244545, 0.032705459743738174, 0.0030127419158816338, 0.0010578518267720938, -0.07353200763463974, 0.018795086070895195, -0.04719878360629082, -0.02826298587024212, 0.03761027753353119, -0.035680513828992844, 0.025991493836045265, 0.030172647908329964, 0.017960866913199425, 0.017609087750315666, -0.008508043363690376, 0.0029147460591048002, -0.017237205058336258, -0.016191916540265083, -0.06094834581017494, 0.03342912346124649, -0.03344922512769699, -0.02496630884706974, -0.09841790795326233, -0.04002247750759125, -0.025187427178025246, -0.013287222012877464, -0.03622325882315636, 0.012362543493509293, 0.0465957336127758, -0.01412144210189581, -0.022634511813521385, 0.01034232322126627, 0.05877736210823059, -0.04321864992380142, 0.004201254807412624, -0.014242052100598812, -0.057289838790893555, -0.02456427365541458, -0.07497932761907578, -0.0339517667889595, 0.04446495324373245, 0.005301822442561388, 0.017126645892858505, 0.01225198432803154, -0.0339517667889595, -0.030976716428995132, -0.028423799201846123, -0.004590725060552359, -0.013458086177706718, -0.027177494019269943, -0.01435261219739914, 0.01374956127256155, -0.03555990383028984, 0.031057123094797134, -0.018473459407687187, -0.02026251144707203, 0.03170037642121315, 0.01500591728836298, -0.003402212169021368, 0.05198298767209053, -0.01501596812158823, -0.02627291902899742, -0.013267120346426964, -0.03252454474568367, 0.016644205898046494, 0.04482678323984146, -0.025227630510926247, 0.00676924642175436, 0.01499586645513773, -0.048404887318611145, 0.017036188393831253, -0.013910374604165554, 0.016372831538319588, 0.029288172721862793, 0.012171577662229538, -0.01158862840384245, 0.013689256273210049, 0.0017538730753585696, -0.030755596235394478, -0.009885009378194809, -0.03646447882056236, 0.02665485069155693, 0.04619370028376579, 0.04265580326318741, 0.007507984060794115, 0.05210359767079353, 0.006638585589826107, 0.013588747009634972, 0.06589336693286896, -0.03636397048830986, 0.008593475446105003, 0.020071545615792274, -0.03875607252120972, -0.034032173454761505, 0.0137194087728858, -0.02365969866514206, -0.046676140278577805, 0.044585563242435455, -0.07759255170822144, -0.003140890272334218, -0.02498641051352024, -0.08539201319217682, 0.054797228425741196, 0.0032112461049109697, 0.015568764880299568, 0.03200190141797066, 0.017076391726732254, 0.019217222929000854, -0.04446495324373245, 0.0006297485087998211, 0.02156912162899971, 0.018503611907362938, 0.021468613296747208, -0.0631595328450203, 0.03958024084568024, 0.04482678323984146, -0.006628534756600857, -0.022956138476729393, 0.02792125754058361, 0.03336881846189499, 0.0069350856356322765, -0.020393172279000282, 0.03927871584892273, 0.06468725949525833, 0.04350007325410843, 0.030655087903141975, 0.017176900058984756, -0.012302238494157791, 0.04132908955216408, -0.017428170889616013, -0.012593713589012623, 0.07337119430303574, 0.05536007508635521, -0.014191797934472561, 0.012292187660932541, 0.07333099097013474, 0.036183055490255356, 0.058134108781814575, 0.025046715512871742, -0.018362900242209435, 0.049610987305641174, 0.04269600659608841, 0.053068481385707855, 0.005543042905628681, 0.03549959883093834, -0.05737024545669556, 0.025046715512871742, -0.012583662755787373, 0.03077569790184498, 0.02412203699350357, -0.05753105878829956, 0.0033946740441024303, 0.0017764874501153827, -0.03901739418506622, -0.05029444769024849, 0.048043057322502136, -0.00413843709975481, 0.030976716428995132, -0.023056646808981895, 0.019659459590911865, 0.03005203790962696, 0.019619256258010864, -0.058174312114715576, -0.042454782873392105, -0.03286627680063248, 0.00443493714556098, -0.009337238036096096, -0.048364683985710144, -0.0843467190861702, -0.035358887165784836, -0.0022287757601588964, -0.018362900242209435, 0.00891007762402296, -0.05692800506949425, -0.011196644976735115, 0.06380278617143631, -0.05282726138830185, 0.0025591973681002855, 0.010045823641121387, -0.013347527012228966, -0.03049427457153797, 0.022071663290262222, -0.013367628678679466, -0.05861654877662659, -0.002132036257535219, 0.03931891918182373, -0.06633560359477997, 0.009256831370294094, 0.04136929288506508, -0.04615349695086479, 0.005146034527570009, -0.030634986236691475, -0.03927871584892273, 0.03726854547858238, 0.0020076569635421038, -0.029268071055412292, 0.00842261128127575, -0.004568110685795546, -0.0009893804090097547, -0.028966546058654785, -0.013980730436742306, -0.00048620981397107244, 0.027278002351522446, -0.00827687419950962, -0.04430413991212845, -0.010794611647725105, -0.002791623119264841, 0.0008593475795350969, 0.0842663124203682, -0.023820511996746063, -0.008377382531762123, 0.03714793547987938, 0.03499705344438553, 0.032363731414079666, -0.03980135917663574, -0.050133634358644485, 0.057651668787002563, -0.06247607618570328, 0.027659935876727104, -0.018845342099666595, -0.014453120529651642, 0.015096374787390232, 0.039962172508239746, -0.052706651389598846, 0.02657444402575493, 0.003203707979992032, 0.03958024084568024, -0.0005948846228420734, 0.0047590769827365875, 0.003570564091205597, 0.07116001099348068, 0.005543042905628681, 0.005643551703542471, 0.028423799201846123, -0.014051086269319057, -0.005633500870317221, 0.020131850615143776, 0.010774509981274605, 0.09045764058828354, 0.0189659520983696, -0.007000416051596403, 0.0050128609873354435, -0.08225614577531815, -0.010483034886419773, 0.010292069055140018, 0.035278480499982834, -0.0024586888030171394, -0.0034097502939403057, 0.020051443949341774, -0.029388681054115295, -0.012593713589012623, 0.026956375688314438, 0.005673704203218222, -0.018674476072192192, -0.04860590398311615, -0.01016643363982439, 0.011246900074183941, -0.02287573181092739, 0.03622325882315636, 0.032685358077287674, -0.002645885804668069, -0.06681804358959198, -0.046676140278577805, -0.018895596265792847, 0.005538017489016056, -0.02534824050962925, -0.041570309549570084, 0.00322129693813622, -0.027298105880618095, -0.018845342099666595, 0.06476766616106033, 0.026433732360601425, -0.03310749679803848, -0.003907267469912767, 0.09077926725149155, 0.01602105237543583, -0.03604234382510185, -0.03684641048312187, 0.00022740045096725225, 0.013297272846102715, 0.01560896821320057, 0.03182098641991615, 0.047600820660591125, -0.0004221356357447803, -0.002026502275839448, -0.015367747284471989, -0.02995152957737446, -0.010121204890310764, 0.040866751223802567, -0.05584251508116722, 0.04494739696383476, -0.053108684718608856, -0.04026370123028755, 0.039459630846977234, -0.0070958989672362804, 0.05708882212638855, -0.07228570431470871, -0.02581057883799076, 0.04872651398181915, -0.015297391451895237, 0.014071187935769558, 0.05974224582314491, 0.023820511996746063, -0.038675665855407715, 0.012754526920616627, 0.06898902356624603, -0.05162115767598152, 0.04538963362574577, -0.03590163215994835, 0.014523476362228394, 0.01865437440574169, 0.03640417382121086, 0.013025899417698383, 0.024403460323810577, -0.0018204599618911743, -0.0041886912658810616, 0.07706990838050842, -0.08394468575716019, 0.013427933678030968, 0.0039700851775705814, 0.04442474991083145, 0.017166849225759506, -0.025649765506386757, 0.011749441735446453, 0.024222545325756073, -0.028866037726402283, 0.055641498416662216, -0.01649344339966774, 0.011679085902869701, 0.05584251508116722, -0.009885009378194809, -0.05294787138700485, -0.03302709013223648, -0.02701668068766594, -0.000027188330932403915, 0.06701906025409698, 0.050535667687654495, -0.013990781269967556, 0.018744831904768944, -0.0591391921043396, 0.045470040291547775, 0.025931188836693764, -0.012402746826410294, 0.04354027658700943, -0.004520369227975607, -0.023780308663845062, 0.020865561440587044, 0.020172053948044777, -0.0018518688157200813, -0.07349180430173874, -0.030715392902493477, -0.025066817179322243, -0.0018480997532606125, 0.007432602811604738, -0.002600657055154443, 0.034394003450870514, 0.018795086070895195, 0.025066817179322243 ]
4,776
optbinning.binning.multidimensional.binning_2d
__init__
null
def __init__(self, name_x="", name_y="", dtype_x="numerical", dtype_y="numerical", prebinning_method="cart", strategy="grid", solver="cp", divergence="iv", max_n_prebins_x=5, max_n_prebins_y=5, min_prebin_size_x=0.05, min_prebin_size_y=0.05, min_n_bins=None, max_n_bins=None, min_bin_size=None, max_bin_size=None, min_bin_n_nonevent=None, max_bin_n_nonevent=None, min_bin_n_event=None, max_bin_n_event=None, monotonic_trend_x=None, monotonic_trend_y=None, min_event_rate_diff_x=0, min_event_rate_diff_y=0, gamma=0, special_codes_x=None, special_codes_y=None, split_digits=None, n_jobs=1, time_limit=100, verbose=False): self.name_x = name_x self.name_y = name_y self.dtype_x = dtype_x self.dtype_y = dtype_y self.prebinning_method = prebinning_method self.strategy = strategy self.solver = solver self.divergence = divergence self.max_n_prebins_x = max_n_prebins_x self.max_n_prebins_y = max_n_prebins_y self.min_prebin_size_x = min_prebin_size_x self.min_prebin_size_y = min_prebin_size_y self.min_n_bins = min_n_bins self.max_n_bins = max_n_bins self.min_bin_size = min_bin_size self.max_bin_size = max_bin_size self.min_bin_n_event = min_bin_n_event self.max_bin_n_event = max_bin_n_event self.min_bin_n_nonevent = min_bin_n_nonevent self.max_bin_n_nonevent = max_bin_n_nonevent self.monotonic_trend_x = monotonic_trend_x self.monotonic_trend_y = monotonic_trend_y self.min_event_rate_diff_x = min_event_rate_diff_x self.min_event_rate_diff_y = min_event_rate_diff_y self.gamma = gamma self.special_codes_x = special_codes_x self.special_codes_y = special_codes_y self.split_digits = split_digits self.n_jobs = n_jobs self.time_limit = time_limit self.verbose = verbose # auxiliary self._categories_x = None self._categories_y = None self._n_event = None self._n_nonevent = None self._n_event_special = None self._n_nonevent_special = None self._n_event_missing = None self._n_nonevent_missing = None self._problem_type = "classification" # info self._binning_table = None self._n_prebins = None self._n_refinements = 0 self._n_samples = None self._optimizer = None self._solution = None self._splits_x_optimal = None self._splits_y_optimal = None self._status = None # timing self._time_total = None self._time_preprocessing = None self._time_prebinning = None self._time_solver = None self._time_optimizer = None self._time_postprocessing = None self._is_fitted = False
(self, name_x='', name_y='', dtype_x='numerical', dtype_y='numerical', prebinning_method='cart', strategy='grid', solver='cp', divergence='iv', max_n_prebins_x=5, max_n_prebins_y=5, min_prebin_size_x=0.05, min_prebin_size_y=0.05, min_n_bins=None, max_n_bins=None, min_bin_size=None, max_bin_size=None, min_bin_n_nonevent=None, max_bin_n_nonevent=None, min_bin_n_event=None, max_bin_n_event=None, monotonic_trend_x=None, monotonic_trend_y=None, min_event_rate_diff_x=0, min_event_rate_diff_y=0, gamma=0, special_codes_x=None, special_codes_y=None, split_digits=None, n_jobs=1, time_limit=100, verbose=False)
[ 0.03095758520066738, -0.014426383189857006, -0.07391076534986496, 0.037514183670282364, -0.03105071745812893, -0.06169164925813675, -0.10177631676197052, -0.027120482176542282, -0.03859453275799751, -0.06582677364349365, -0.028387099504470825, 0.025686226785182953, -0.00868935789912939, 0.003848742926493287, -0.032615359872579575, 0.026226401329040527, 0.02583524025976658, -0.01238675881177187, -0.015851326286792755, -0.024549998342990875, -0.016475321725010872, -0.01828211173415184, -0.03248497471213341, 0.059791725128889084, 0.021364830434322357, 0.024829398840665817, 0.012852426618337631, -0.02963508851826191, -0.033677082508802414, -0.007609009277075529, -0.038855306804180145, -0.00934594962745905, -0.026971468701958656, -0.016205234453082085, 0.01991194859147072, -0.05010583624243736, 0.06266023963689804, 0.016223860904574394, -0.07778511941432953, 0.02162560448050499, 0.022072646766901016, -0.07420879602432251, 0.0034226570278406143, -0.008908221498131752, 0.007185251452028751, 0.008288883604109287, -0.016801288351416588, 0.0507763996720314, -0.012060792185366154, -0.030883077532052994, -0.05304885655641556, -0.09752942621707916, 0.03688087686896324, 0.04530014842748642, -0.056997720152139664, 0.09797646850347519, 0.04418254643678665, 0.04421979933977127, -0.003762594424188137, -0.01116670947521925, -0.030100755393505096, 0.05532131344079971, 0.058376096189022064, -0.012861739844083786, -0.016615021973848343, -0.0148082310333848, -0.049658797681331635, 0.008759208023548126, -0.019949201494455338, 0.016037592664361, 0.06422488391399384, -0.007553128991276026, 0.056960463523864746, 0.009229532442986965, -0.02123444341123104, -0.02088053710758686, -0.06590128690004349, -0.035763274878263474, 0.008200407028198242, -0.021849125623703003, 0.0495842881500721, 0.05547032877802849, -0.006160782650113106, -0.06854627281427383, 0.03948861360549927, -0.04354923591017723, 0.052862588316202164, 0.09037677198648453, -0.01623317413032055, -0.03308102861046791, -0.033602576702833176, -0.007716112770140171, 0.03481331095099449, 0.05081365257501602, 0.030752690508961678, -0.013094574213027954, -0.016028279438614845, -0.031218357384204865, -0.004300440661609173, -0.07066971808671951, -0.0068313442170619965, -0.03272712230682373, -0.0030827196314930916, 0.023842182010412216, -0.034440778195858, -0.012656846083700657, -0.034329019486904144, 0.000873708922881633, -0.054837021976709366, -0.02922530099749565, -0.034329019486904144, 0.05576835572719574, -0.020433496683835983, -0.015078318305313587, -0.02613326720893383, -0.004810346756130457, -0.056252650916576385, 0.0018021337455138564, -0.009322665631771088, 0.020284481346607208, 0.0056951153092086315, 0.004472737666219473, -0.035372111946344376, 0.0507763996720314, -0.016540514305233955, -0.003762594424188137, 0.05204301327466965, 0.07994581758975983, 0.0009022310259751976, -0.06780120730400085, 0.059009402990341187, -0.0405317097902298, -0.002940691076219082, 0.0716383084654808, 0.01950216107070446, -0.041276779025793076, 0.005108374170958996, 0.025499960407614708, -0.010561342351138592, -0.012759293429553509, 0.09887055307626724, -0.02967234142124653, 0.010077047161757946, -0.023190248757600784, 0.03211244195699692, 0.015907205641269684, 0.008423927240073681, -0.05651342496275902, -0.05506053939461708, -0.01757429726421833, -0.015273898839950562, -0.03963762894272804, -0.02333926223218441, -0.05204301327466965, 0.035726021975278854, -0.012228432111442089, -0.0005020479438826442, -0.038147494196891785, -0.017313523218035698, -0.010104987770318985, -0.04708831012248993, -0.019781561568379402, 0.008312167599797249, -0.02294810116291046, -0.034980952739715576, 0.042692407965660095, -0.03181441128253937, -0.031851667910814285, -0.024326477199792862, 0.017090002074837685, 0.009350606240332127, -0.02365591563284397, -0.03403099253773689, 0.05506053939461708, -0.061132848262786865, 0.09752942621707916, 0.02022860199213028, -0.009280756115913391, -0.030026249587535858, 0.046231482177972794, 0.0004045487439725548, -0.01918550580739975, -0.02158835157752037, -0.033583950251340866, -0.046156976372003555, 0.013355347327888012, 0.06739141792058945, -0.0356142595410347, 0.03347218781709671, 0.013476421125233173, -0.004824316594749689, -0.03418000414967537, 0.008507748134434223, 0.02928118035197258, 0.014128356240689754, -0.0063936165533959866, 0.00025757242110557854, 0.038184747099876404, -0.0038929814472794533, 0.019055118784308434, 0.0005815024487674236, 0.04537465423345566, 0.04809415340423584, -0.013336720876395702, -0.016009652987122536, -0.029020406305789948, -0.026300907135009766, 0.005201507359743118, 0.02304123528301716, 0.006798747461289167, -0.013336720876395702, -0.043027687817811966, -0.002686902182176709, 0.0655287504196167, 0.048913728445768356, -0.0014831514563411474, 0.04909999668598175, 0.017462536692619324, -0.008074676617980003, -0.00891287811100483, 0.057295747101306915, 0.0017299553146585822, 0.006603166926652193, -0.03237321227788925, 0.020712897181510925, -0.00978833343833685, 0.06526797264814377, 0.05297435075044632, 0.07543815672397614, -0.04116502031683922, 0.005387774668633938, -0.02678520232439041, -0.007907036691904068, -0.00039727269904688, 0.02613326720893383, 0.01826348528265953, -0.035055458545684814, 0.015106257982552052, -0.044406063854694366, -0.015143511816859245, 0.021457964554429054, -0.005867412313818932, -0.01269409991800785, -0.03967488184571266, -0.01013292744755745, -0.03064092993736267, 0.05964270979166031, 0.08389467746019363, -0.0348319374024868, -0.003909279592335224, -0.021048177033662796, -0.02929980680346489, -0.0338447242975235, -0.015394971705973148, -0.022109899669885635, -0.08411820232868195, -0.003224748419597745, 0.008116587065160275, 0.044406063854694366, 0.008638134226202965, -0.0023329949472099543, -0.010635849088430405, -0.0002530612691771239, 0.0452628955245018, -0.011809331364929676, 0.01808653026819229, -0.009206249378621578, 0.011939718388020992, 0.009029295295476913, 0.0488019697368145, -0.04459233209490776, 0.015506732277572155, -0.02402845025062561, 0.01572093926370144, -0.031926173716783524, -0.004062950145453215, -0.008931505493819714, -0.012656846083700657, 0.008614851161837578, -0.005755651742219925, 0.0195766668766737, -0.011427483521401882, 0.040568962693214417, 0.014286682941019535, -0.04559817537665367, -0.03801710531115532, -0.06210143491625786, -0.016819914802908897, 0.0417238213121891, 0.0042212773114442825, -0.06865803897380829, 0.02583524025976658, 0.042357128113508224, 0.020992297679185867, 0.06176615506410599, -0.0066404202952980995, 0.04213360697031021, -0.042766913771629333, 0.007082804571837187, 0.0015204048249870539, 0.03475743159651756, -0.014156295917928219, 0.027344003319740295, -0.02924392744898796, -0.03790534660220146, 0.0026496488135308027, 0.07808315008878708, -0.025015665218234062, 0.04697655141353607, -0.0139700286090374, 0.038482774049043655, 0.032186947762966156, 0.07342647016048431, 0.023804929107427597, -0.0009406486060470343, -0.019315892830491066, 0.00802811048924923, -0.011185336858034134, 0.0303056500852108, 0.06340530514717102, -0.03350944444537163, 0.015925833955407143, 0.0268597099930048, -0.029821354895830154, 0.0013690628111362457, -0.005173567216843367, 0.03945136070251465, 0.011380917392671108, -0.03173990547657013, -0.03477605804800987, -0.017108628526329994, -0.026990097016096115, 0.024568624794483185, 0.04392177239060402, -0.02060113660991192, -0.027381256222724915, -0.01358818169683218, 0.0047730933874845505, 0.010877995751798153, -0.07644400000572205, 0.05636440962553024, 0.025611719116568565, -0.02020997554063797, 0.06478368490934372, -0.023972569033503532, -0.08307510614395142, 0.03339768201112747, -0.029057661071419716, 0.029746849089860916, 0.06206418201327324, 0.028349844738841057, 0.01737871579825878, -0.008293540216982365, 0.0948471873998642, 0.059046655893325806, -0.005569384898990393, 0.0026240372098982334, -0.06325629353523254, 0.026934215798974037, -0.019762935116887093, -0.013653375208377838, -0.013113200664520264, -0.040568962693214417, 0.06694437563419342, 0.02084328420460224, -0.006575226783752441, -0.031497757881879807, 0.006626450456678867, 0.03540936857461929, -0.03425450995564461, -0.007078147958964109, -0.036042675375938416, -0.05047837272286415, 0.017956143245100975, -0.014165609143674374, 0.02613326720893383, -0.028647873550653458, 0.014715096913278103, -0.028442978858947754, -0.04887647554278374, 0.03229870647192001, 0.0007951274747028947, -0.06102108582854271, 0.03926509618759155, -0.0314791314303875, -0.015069005079567432, -0.0032689867075532675, -0.02091779001057148, 0.11310135573148727, -0.03479468449950218, 0.004263187292963266, -0.010291255079209805, 0.015814073383808136, -0.005089747253805399, -0.024903904646635056, -0.018915418535470963, 0.07208535075187683, 0.03691812977194786, -0.039563123136758804, -0.014128356240689754, -0.03272712230682373, -0.04157480597496033, 0.018412498757243156, 0.045188385993242264, -0.0011403036769479513, -0.055954623967409134, 0.06660909950733185, -0.023171622306108475, 0.0006309796590358019, 0.06407586485147476, 0.016037592664361, 0.03280162811279297, -0.02056388184428215, -0.029877236112952232, -0.10714080929756165, 0.00721784820780158, -0.07312844693660736, -0.05193125456571579, 0.06359156966209412, -0.013895521871745586, -0.0032689867075532675, 0.0625857338309288, 0.016093473881483078, 0.01598171330988407, -0.011604437604546547, 0.037123024463653564, -0.013308781199157238, -0.010514775291085243, -0.03967488184571266, -0.003217763267457485, -0.0613936223089695, 0.007338922005146742, -0.08665143698453903, -0.02365591563284397, 0.0028824827168136835, -0.009983913972973824, -0.03289476037025452, 0.0013294811360538006, 0.016698841005563736, -0.006673017051070929, -0.016140040010213852, -0.01257302612066269, 0.06307002156972885, -0.009457709267735481, 0.000841112167108804, -0.01670815423130989, -0.0747675970196724, -0.026580309495329857, -0.06102108582854271, -0.011585811153054237, 0.05167048051953316, 0.02967234142124653, 0.013541614636778831, -0.009285412728786469, 0.011250530369579792, -0.024456864222884178, -0.03064092993736267, -0.0050012702122330666, 0.021029550582170486, -0.023953942582011223, -0.015059690922498703, 0.021420711651444435, -0.01912962645292282, 0.029039034619927406, -0.012507832609117031, -0.004728854633867741, 0.02086191065609455, 0.029467448592185974, -0.0033621203619986773, 0.022817714139819145, 0.004235247150063515, 0.005443654488772154, 0.010198120959103107, -0.027697911486029625, -0.046864788979291916, 0.03336042910814285, -0.02967234142124653, 0.011986284516751766, 0.046864788979291916, -0.033937856554985046, 0.053495898842811584, -0.04220811277627945, 0.0282380860298872, 0.02747439034283161, 0.005713741760700941, 0.014556770212948322, 0.014705783687531948, -0.027735164389014244, -0.015460165217518806, 0.009322665631771088, -0.07618322223424911, 0.024158837273716927, 0.041314031928777695, 0.06962662190198898, 0.027288123965263367, 0.04734908416867256, 0.0209550429135561, 0.01082211546599865, 0.021178564056754112, -0.017658116295933723, 0.03337905555963516, 0.023767676204442978, -0.027344003319740295, -0.03283888101577759, 0.03036152943968773, -0.05334688350558281, -0.04224536940455437, 0.010542714968323708, -0.0794987753033638, 0.00593260582536459, -0.0038650413043797016, -0.0708559900522232, 0.06605029851198196, -0.0054389978758990765, 0.008889595046639442, -0.0008440226083621383, -0.005355177912861109, 0.0010035138111561537, -0.03937685489654541, 0.03304377570748329, 0.02579798735678196, 0.040978752076625824, 0.04101600497961044, -0.03375159204006195, -0.004530946258455515, 0.05692321062088013, 0.0379798524081707, -0.009602067060768604, 0.03173990547657013, 0.04217085987329483, -0.010393701493740082, -0.02514605224132538, 0.011930405162274837, 0.07771061360836029, 0.0219422597438097, 0.047945138067007065, 0.010077047161757946, -0.01830073818564415, 0.05986623093485832, -0.04120227321982384, -0.017704684287309647, 0.045151133090257645, 0.09566675871610641, -0.013271527364850044, -0.0058580986224114895, 0.0515587218105793, 0.03416137769818306, 0.07480484992265701, 0.0087079843506217, -0.03410549834370613, 0.0537194199860096, 0.03693675622344017, 0.03583778068423271, -0.008051393553614616, 0.04846668615937233, -0.03378884494304657, 0.049658797681331635, -0.010021167807281017, 0.04313945025205612, 0.017937516793608665, -0.06135636940598488, 0.011231902986764908, 0.003958174958825111, -0.04041995108127594, -0.038929812610149384, 0.012321565300226212, 0.008749894797801971, 0.03580052778124809, -0.01983744092285633, 0.013271527364850044, 0.025350946933031082, 0.014864111319184303, -0.05506053939461708, -0.03211244195699692, -0.05744475871324539, -0.015692999586462975, -0.028796887025237083, -0.014100415632128716, -0.08739650249481201, -0.03734654560685158, 0.015599865466356277, -0.023190248757600784, -0.009434426203370094, -0.07562442123889923, -0.021476591005921364, 0.05755652114748955, -0.052452802658081055, -0.008964101783931255, 0.018328677862882614, -0.022817714139819145, -0.014351876452565193, 0.02438235655426979, -0.00497798714786768, -0.029430193826556206, -0.02540682628750801, 0.05751926451921463, -0.02963508851826191, -0.0033481502905488014, -0.011613750830292702, -0.03304377570748329, -0.0012980485334992409, 0.006049022544175386, -0.005108374170958996, 0.042357128113508224, 0.026747949421405792, -0.04254339635372162, -0.01780712977051735, 0.038445521146059036, 0.0050012702122330666, -0.025164678692817688, -0.003830116242170334, -0.0013818687293678522, 0.021662859246134758, -0.02440098486840725, -0.018552199006080627, -0.03242909535765648, -0.016289053484797478, 0.006589197088032961, 0.06754043698310852, -0.021811872720718384, -0.01062653586268425, 0.03937685489654541, 0.008097960613667965, 0.03276437520980835, -0.053495898842811584, -0.07286766916513443, 0.03594954311847687, -0.10758785158395767, 0.0354279950261116, -0.026412667706608772, 0.019707053899765015, -0.0008096796227619052, 0.04284142330288887, -0.07152654975652695, 0.025648973882198334, 0.01897129975259304, 0.033993735909461975, 0.04846668615937233, -0.002178160473704338, 0.010291255079209805, 0.05759377405047417, 0.014025908894836903, 0.0004432573914527893, 0.013886208645999432, -0.007008297834545374, -0.02477351762354374, -0.00444712582975626, 0.006402929779142141, 0.11272881925106049, 0.03550250083208084, -0.02086191065609455, 0.01307594683021307, -0.03518584743142128, -0.0195766668766737, -0.039190586656332016, 0.03757006302475929, -0.03688087686896324, -0.009131742641329765, 0.0230226069688797, -0.03553975373506546, -0.01851494424045086, 0.03203793242573738, -0.00035652678343467414, 0.002733469009399414, -0.02721361629664898, -0.018961986526846886, 0.021364830434322357, -0.009676573798060417, 0.008093303069472313, 0.048652954399585724, -0.015571925789117813, -0.033639829605817795, 0.0007002477068454027, -0.016717467457056046, -0.01218186505138874, 0.00032945984276011586, -0.01920413412153721, 0.013597494922578335, 0.012759293429553509, -0.009192279540002346, 0.05122343823313713, 0.024307850748300552, -0.047572605311870575, -0.021402085199952126, 0.06213868781924248, 0.018980612978339195, -0.01881297305226326, -0.03458979353308678, -0.0016030608676373959, -0.0165312010794878, 0.020489376038312912, 0.0702599361538887, 0.03203793242573738, -0.020377615466713905, -0.0007235310622490942, -0.01987469382584095, -0.05334688350558281, -0.03840826824307442, 0.04220811277627945, -0.0383710116147995, 0.03613580763339996, -0.022873593494296074, -0.03200067952275276, 0.033956483006477356, -0.010719669051468372, 0.07860469818115234, -0.06094658002257347, -0.0020605793688446283, 0.01711794175207615, -0.01796545647084713, 0.052825335413217545, 0.06869529187679291, 0.03203793242573738, -0.014687157236039639, 0.010952502489089966, 0.0690678209066391, -0.004577512852847576, 0.017406655475497246, -0.04429430514574051, 0.014910677447915077, 0.008503090590238571, 0.0240098237991333, 0.02155109867453575, 0.03695538267493248, -0.015255271457135677, 0.00906189251691103, 0.04220811277627945, -0.07644400000572205, 0.04150030016899109, -0.004852256737649441, 0.032913386821746826, 0.0356142595410347, -0.037830837070941925, 0.012451952323317528, 0.022854967042803764, -0.05789180099964142, 0.05163322761654854, -0.023059861734509468, 0.02441961131989956, 0.04179832711815834, -0.044666837900877, -0.020470749586820602, -0.0389670692384243, -0.003438955405727029, -0.022854967042803764, 0.03960037603974342, 0.027716537937521935, -0.004815003369003534, 0.02294810116291046, -0.0431021973490715, 0.0340496189892292, 0.0230226069688797, -0.00903395190834999, 0.04082973673939705, 0.01572093926370144, -0.06239946186542511, 0.0354279950261116, 0.021476591005921364, -0.003136271610856056, -0.0633680522441864, -0.03771907836198807, -0.04954703524708748, -0.015348405577242374, 0.01535771880298853, -0.01826348528265953, 0.02894590049982071, 0.03650834411382675, 0.0035670141223818064 ]
4,784
optbinning.binning.multidimensional.binning_2d
_fit
null
def _fit(self, x, y, z, check_input): time_init = time.perf_counter() if self.verbose: logger.info("Optimal binning started.") logger.info("Options: check parameters.") _check_parameters(**self.get_params()) # Pre-processing if self.verbose: logger.info("Pre-processing started.") self._n_samples = len(x) if self.verbose: logger.info("Pre-processing: number of samples: {}" .format(self._n_samples)) time_preprocessing = time.perf_counter() [x_clean, y_clean, z_clean, x_missing, y_missing, z_missing, x_special, y_special, z_special, categories_x, categories_y] = split_data_2d( self.dtype_x, self.dtype_y, x, y, z, self.special_codes_x, self.special_codes_y, check_input) self._time_preprocessing = time.perf_counter() - time_preprocessing if self.verbose: n_clean = len(x_clean) n_missing = len(x_missing) n_special = len(x_special) logger.info("Pre-processing: number of clean samples: {}" .format(n_clean)) logger.info("Pre-processing: number of missing samples: {}" .format(n_missing)) logger.info("Pre-processing: number of special samples: {}" .format(n_special)) if self.dtype_x == "categorical": logger.info("Pre-processing: number of categories in x: {}" .format(len(categories_x))) if self.dtype_y == "categorical": logger.info("Pre-processing: number of categories in y: {}" .format(len(categories_y))) if self.verbose: logger.info("Pre-processing terminated. Time: {:.4f}s" .format(self._time_preprocessing)) # Pre-binning if self.verbose: logger.info("Pre-binning started.") time_prebinning = time.perf_counter() splits_x = self._fit_prebinning(self.dtype_x, x_clean, z_clean, self.max_n_prebins_x, self.min_prebin_size_x) splits_y = self._fit_prebinning(self.dtype_y, y_clean, z_clean, self.max_n_prebins_y, self.min_prebin_size_y) NE, E = self._prebinning_matrices( splits_x, splits_y, x_clean, y_clean, z_clean, x_missing, y_missing, z_missing, x_special, y_special, z_special) if self.strategy == "cart": if self.verbose: logger.info("Prebinning: applying strategy cart...") n_splits_x = len(splits_x) n_splits_y = len(splits_y) clf_nodes = n_splits_x * n_splits_y indices_x = np.digitize(x_clean, splits_x, right=False) n_bins_x = n_splits_x + 1 indices_y = np.digitize(y_clean, splits_y, right=False) n_bins_y = n_splits_y + 1 xt = np.empty(len(x_clean), dtype=int) yt = np.empty(len(y_clean), dtype=int) for i in range(n_bins_x): xt[(indices_x == i)] = i for i in range(n_bins_y): yt[(indices_y == i)] = i xyt = np.c_[xt, yt] min_prebin_size = min(self.min_prebin_size_x, self.min_prebin_size_y) * 0.25 clf = DecisionTreeClassifier(min_samples_leaf=min_prebin_size, max_leaf_nodes=clf_nodes) clf.fit(xyt, z_clean) self._clf = clf self._categories_x = categories_x self._categories_y = categories_y self._time_prebinning = time.perf_counter() - time_prebinning self._n_prebins = E.size if self.verbose: logger.info("Pre-binning: number of prebins: {}" .format(self._n_prebins)) logger.info("Pre-binning terminated. Time: {:.4f}s" .format(self._time_prebinning)) # Optimization rows, n_nonevent, n_event = self._fit_optimizer( splits_x, splits_y, NE, E) # Post-processing if self.verbose: logger.info("Post-processing started.") logger.info("Post-processing: compute binning information.") time_postprocessing = time.perf_counter() # Refinements m, n = E.shape self._n_refinements = (m * n * (m + 1) * (n + 1)) // 4 - len(rows) # solution matrices D = np.empty(m * n, dtype=float) P = np.empty(m * n, dtype=int) selected_rows = np.array(rows, dtype=object)[self._solution] self._selected_rows = selected_rows self._m, self._n = m, n n_selected_rows = selected_rows.shape[0] + 2 opt_n_nonevent = np.empty(n_selected_rows, dtype=int) opt_n_event = np.empty(n_selected_rows, dtype=int) for i, r in enumerate(selected_rows): _n_nonevent = n_nonevent[self._solution][i] _n_event = n_event[self._solution][i] _event_rate = _n_event / (_n_event + _n_nonevent) P[r] = i D[r] = _event_rate opt_n_nonevent[i] = _n_nonevent opt_n_event[i] = _n_event opt_n_nonevent[-2] = self._n_nonevent_special opt_n_event[-2] = self._n_event_special opt_n_nonevent[-1] = self._n_nonevent_missing opt_n_event[-1] = self._n_event_missing self._n_nonevent = opt_n_nonevent self._n_event = opt_n_event D = D.reshape((m, n)) P = P.reshape((m, n)) # optimal bins splits_x_optimal, splits_y_optimal = self._splits_xy_optimal( selected_rows, splits_x, splits_y, P) self._splits_x_optimal = splits_x_optimal self._splits_y_optimal = splits_y_optimal # instatiate binning table self._binning_table = BinningTable2D( self.name_x, self.name_y, self.dtype_x, self.dtype_y, splits_x_optimal, splits_y_optimal, m, n, opt_n_nonevent, opt_n_event, D, P, self._categories_x, self._categories_y) self.name = "-".join((self.name_x, self.name_y)) self._time_postprocessing = time.perf_counter() - time_postprocessing if self.verbose: logger.info("Post-processing terminated. Time: {:.4f}s" .format(self._time_postprocessing)) self._time_total = time.perf_counter() - time_init if self.verbose: logger.info("Optimal binning terminated. Status: {}. Time: {:.4f}s" .format(self._status, self._time_total)) # Completed successfully self._is_fitted = True return self
(self, x, y, z, check_input)
[ -0.002758630784228444, -0.005427592899650335, -0.048062413930892944, 0.00405355216935277, -0.03181656077504158, -0.05856947600841522, -0.07198812812566757, -0.03609955683350563, -0.03228072449564934, -0.051522571593523026, -0.04401149973273277, 0.0206448957324028, -0.023398252204060555, -0.011414295993745327, -0.04865317419171333, 0.012163293547928333, -0.002294463338330388, 0.010812988504767418, -0.03820940852165222, -0.012205489911139011, -0.05025665834546089, -0.0193156898021698, -0.027723446488380432, 0.08127147704362869, 0.036943498998880386, 0.010981776751577854, -0.01486390270292759, -0.03143678605556488, -0.008159849792718887, 0.008618743158876896, -0.029073752462863922, 0.00422497745603323, 0.012026152573525906, -0.02601446770131588, -0.0004562553658615798, -0.03295587748289108, 0.07089100778102875, 0.035023532807826996, -0.006482518278062344, 0.03894785791635513, -0.0015243676025420427, -0.09679998457431793, 0.006034174934029579, 0.029390230774879456, 0.0015362355625256896, 0.00994267500936985, -0.019516125321388245, 0.052704088389873505, -0.011488140560686588, -0.01763835735619068, -0.0401504710316658, -0.10194802284240723, 0.057134777307510376, 0.0361628532409668, -0.015169831924140453, 0.046501126140356064, 0.053294844925403595, 0.02662632428109646, 0.03046625480055809, -0.05059423670172691, 0.013450302183628082, 0.05515151470899582, 0.0070943753235042095, -0.005153311882168055, -0.03103591315448284, -0.03356773406267166, -0.061438873410224915, 0.0038478414062410593, 0.015454661101102829, 0.03947531804442406, 0.03688020259141922, 0.00990575272589922, 0.07409798353910446, 0.011498689651489258, -0.03565648943185806, -0.030972618609666824, 0.005116389598697424, -0.032892584800720215, 0.004652222152799368, -0.03759755194187164, 0.051184993237257004, 0.06067932769656181, -0.006588011048734188, -0.06456144899129868, 0.00044405777589417994, -0.022765295580029488, 0.03723887726664543, 0.08726345002651215, 0.0050161718390882015, -0.04293547570705414, 0.008924671448767185, 0.023334955796599388, 0.048399992287158966, 0.08359231054782867, 0.036816906183958054, -0.003112030914053321, -0.038357097655534744, -0.007057453040033579, 0.029158147051930428, -0.03827270492911339, 0.0013766780029982328, 0.004420138895511627, 0.01957942172884941, 0.05662840977311134, -0.0016100803622975945, 0.009810809046030045, 0.0046100253239274025, -0.005949780810624361, -0.0626203864812851, -0.04970809817314148, -0.01300723385065794, 0.02972780540585518, -0.03856808319687843, -0.02272309921681881, -0.029959889128804207, -0.031563375145196915, -0.06063712760806084, 0.029643412679433823, -0.059708792716264725, 0.055826667696237564, 0.003581472672522068, -0.003995531238615513, -0.03571978583931923, 0.0199802927672863, -0.03846259042620659, -0.01692100800573826, 0.05316825583577156, 0.08114488422870636, -0.001228329143486917, -0.07236789911985397, 0.012374278157949448, 0.006693503353744745, -0.0007292173686437309, 0.041416384279727936, -0.05624863877892494, -0.03415849432349205, -0.002646544948220253, 0.0001738979044603184, -0.006756799295544624, -0.05603765323758125, 0.10777121037244797, -0.0019080968340858817, 0.00840248353779316, -0.013566344045102596, 0.04696529358625412, 0.01564454846084118, 0.06730426102876663, -0.045741576701402664, 0.0028667605947703123, -0.0065141660161316395, -0.006387575063854456, -0.03086712583899498, -0.026752915233373642, -0.03266049921512604, 0.0156972948461771, -0.026119960471987724, -0.01630915142595768, -0.04211263358592987, -0.035424403846263885, -0.006371751427650452, -0.03983399271965027, -0.05886485427618027, 0.0013555794721469283, 0.012606361880898476, -0.05198673903942108, 0.05261969193816185, -0.04544619843363762, -0.005981428548693657, 0.0008300946792587638, -0.007885569706559181, 0.04527740925550461, -0.005749344825744629, -0.06207182630896568, 0.04797802120447159, -0.03221743181347847, 0.0768829882144928, 0.030402958393096924, -0.05409659072756767, -0.03865247592329979, 0.03491804003715515, 0.039686303585767746, -0.02875727415084839, 0.012500869110226631, -0.030613943934440613, -0.05498272553086281, 0.012764601036906242, 0.0605105385184288, -0.051522571593523026, 0.0014254683628678322, 0.030761633068323135, -0.057556744664907455, -0.02230112999677658, 0.008861375972628593, -0.0003550484252627939, 0.012891191989183426, 0.02348264679312706, 0.0188409723341465, 0.034664858132600784, 0.045741576701402664, -0.04443347081542015, -0.028820570558309555, 0.002026776084676385, 0.04915953800082207, -0.03209083899855614, -0.037344370037317276, -0.04080452769994736, -0.01427314430475235, 0.02795553021132946, 0.01746957004070282, 0.01657288335263729, -0.021457187831401825, -0.061059098690748215, -0.010786615312099457, 0.024938443675637245, 0.04213373363018036, 0.03143678605556488, 0.04012937471270561, -0.02814541757106781, -0.021320048719644547, -0.022385522723197937, 0.00018279884534422308, -0.01695265620946884, -0.03371542692184448, 0.015001043677330017, -0.0042645372450351715, -0.006255709566175938, 0.05380120873451233, 0.05878046154975891, 0.09384618699550629, -0.025740187615156174, -0.005469789728522301, -0.02078203670680523, -0.016361897811293602, -0.026077764108777046, 0.0037792713847011328, -0.0076112886890769005, -0.0206448957324028, 0.004143220838159323, -0.019516125321388245, -0.013070529326796532, 0.003104118863120675, -0.05654401704668999, -0.011129465885460377, -0.07127077877521515, -0.019115254282951355, 0.02038116380572319, 0.05932902172207832, 0.05439196899533272, 0.012289884500205517, 0.026520831510424614, -0.013819526880979538, -0.018208017572760582, -0.02717488631606102, -0.026942802593111992, -0.0042618997395038605, -0.04713407903909683, 0.02873617596924305, 0.014188750647008419, 0.026689620688557625, 0.011983956210315228, -0.0039058623369783163, 0.00621878681704402, 0.018978113308548927, 0.024410979822278023, -0.028799472376704216, 0.025297118350863457, 0.011076719500124454, -0.005812640767544508, -0.010512334294617176, 0.03759755194187164, -0.049201734364032745, 0.024221094325184822, -0.036205049604177475, 0.02213234081864357, -0.022786395624279976, 0.06236720830202103, 0.004987161140888929, -0.028039924800395966, 0.020233474671840668, 0.012068349868059158, 0.057134777307510376, 0.019653266295790672, 0.03333565220236778, -0.01483225543051958, -0.039285432547330856, -0.035424403846263885, -0.037576451897621155, 0.002755993278697133, 0.0291159488260746, -0.02059214934706688, -0.0709754005074501, 0.01846119947731495, 0.053674619644880295, 0.03593076765537262, 0.041648466140031815, -0.026119960471987724, 0.01855614222586155, -0.06840138137340546, -0.005084741860628128, -0.02949572168290615, -0.015222577378153801, -0.03763974830508232, 0.04932832717895508, -0.02405230514705181, 0.014885001815855503, 0.019115254282951355, 0.06460364907979965, -0.03827270492911339, 0.02487514726817608, -0.028672879561781883, 0.03470705449581146, 0.024706359952688217, 0.05806310847401619, -0.00465749716386199, 0.014969395473599434, -0.04751385375857353, 0.028799472376704216, 0.03206974267959595, 0.01687881164252758, 0.051522571593523026, -0.028588486835360527, 0.02078203670680523, 0.03164777159690857, -0.02036006562411785, -0.018197467550635338, 0.004483434371650219, 0.054476361721754074, 0.003146315924823284, -0.07076441496610641, -0.06114349514245987, 0.018851522356271744, -0.02367253229022026, 0.0236936304718256, 0.0367325134575367, 0.010079815052449703, -0.015328070148825645, 0.011688577011227608, -0.013661287724971771, 0.03586747497320175, -0.040488049387931824, 0.0392010398209095, 0.05591106042265892, -0.004072013311088085, 0.050383251160383224, -0.01756451278924942, -0.05072082579135895, 0.01872493140399456, 0.0044913459569215775, -0.019305139780044556, 0.07793790847063065, 0.017691103741526604, 0.010364645160734653, 0.01775440014898777, 0.05498272553086281, 0.05223992094397545, -0.04169066250324249, -0.014294243417680264, -0.03884236514568329, 0.026162156835198402, -0.0050741927698254585, -0.008312814868986607, 0.02104576677083969, -0.02852519042789936, 0.044560059905052185, 0.046079155057668686, -0.013049431145191193, -0.026246551424264908, 0.03704899176955223, -0.026119960471987724, -0.034643758088350296, -0.005314188078045845, -0.05228211730718613, -0.05641742795705795, 0.007358106784522533, 0.029601214453577995, 0.010269701480865479, -0.03628944233059883, 0.02466416358947754, 0.012353179976344109, 0.02030731923878193, 0.027997728437185287, 0.04489763826131821, -0.05932902172207832, -0.0019028221722692251, -0.016657276079058647, -0.027048295363783836, 0.012289884500205517, 0.006925587076693773, 0.08460503816604614, -0.04485544189810753, 0.028419697657227516, 0.003549824934452772, 0.007410853169858456, -0.044349078088998795, -0.012870093807578087, 0.01551795657724142, 0.07076441496610641, 0.045741576701402664, -0.04953930899500847, 0.021900257095694542, -0.06751524657011032, -0.0259722713381052, 0.002919506747275591, 0.03955971449613571, 0.005055731162428856, -0.07291646301746368, 0.03998168557882309, -0.010269701480865479, 0.00517177302390337, 0.04481324180960655, -0.052535299211740494, 0.05363242328166962, 0.025339314714074135, 0.002798190340399742, -0.0742245689034462, 0.023989010602235794, -0.04082562401890755, -0.013830075971782207, 0.04907514154911041, -0.030719436705112457, 0.0422392264008522, 0.04468665271997452, 0.04439127445220947, 0.008766432292759418, -0.021436089649796486, 0.020465558394789696, -0.05430757626891136, -0.006408673711121082, -0.03107811138033867, 0.0009784435387700796, -0.05131158605217934, -0.04274559020996094, -0.10405787080526352, -0.006740975193679333, -0.03470705449581146, -0.005960330367088318, -0.009673669002950191, 0.008249519392848015, 0.020845331251621246, 0.0014663466718047857, -0.020465558394789696, 0.01862998865544796, 0.0582318976521492, -0.025276020169258118, -0.001546784769743681, 0.0145579744130373, -0.033314552158117294, -0.005453965626657009, -0.07760033756494522, -0.010090364143252373, 0.05515151470899582, 0.02002248913049698, 0.033103566616773605, -0.02230112999677658, -0.02270200103521347, -0.010950128547847271, -0.05548909306526184, 0.011815167963504791, -0.009188402444124222, 0.0011980000417679548, -0.031711068004369736, 0.021552132442593575, -0.02171037159860134, 0.027892235666513443, -0.01746957004070282, -0.027491362765431404, -0.020718740299344063, 0.015117085538804531, 0.009747513569891453, 0.05380120873451233, -0.016625629737973213, -0.04154297336935997, -0.018355706706643105, -0.001527004991658032, -0.01270130556076765, 0.021625977009534836, -0.01117166317999363, 0.021246204152703285, 0.031732164323329926, -0.007220966275781393, 0.04080452769994736, -0.005174410529434681, -0.013555794954299927, 0.014768959954380989, 0.010106188245117664, -0.01328151486814022, 0.008027984760701656, 0.037914030253887177, -0.0016008497914299369, -0.01359799224883318, -0.030424056574702263, -0.007537444122135639, 0.08304375410079956, 0.019463378936052322, -0.0034944412764161825, 0.03086712583899498, 0.008260068483650684, -0.007600739598274231, 0.0730852484703064, -0.06916093081235886, 0.020064687356352806, 0.020824233070015907, -0.041859451681375504, -0.05266189202666283, 0.0002785663236863911, -0.025381512939929962, -0.05050984397530556, 0.011614731512963772, -0.0749841183423996, 0.014684565365314484, -0.03420069068670273, -0.10169483721256256, 0.05506712198257446, -0.00995322410017252, 0.03964410722255707, 0.0313945896923542, 0.00784864742308855, 0.013038882054388523, -0.043167561292648315, 0.016361897811293602, 0.027132688090205193, 0.04392710700631142, 0.004702331498265266, -0.04158516973257065, 0.04540400207042694, 0.05743015557527542, 0.03721777722239494, -0.030613943934440613, 0.034095197916030884, 0.00005703192073269747, -0.03434837982058525, -0.03998168557882309, 0.0380617193877697, 0.06751524657011032, 0.02890496328473091, 0.0033151039388030767, 0.053294844925403595, -0.04975029453635216, 0.04152187705039978, -0.023166168481111526, -0.012648559175431728, 0.03468595817685127, 0.08945769816637039, -0.02622545324265957, 0.01262746099382639, 0.0717349499464035, 0.030381860211491585, 0.06781062483787537, 0.006044724024832249, -0.0064033991657197475, 0.03707008808851242, -0.0029485172126442194, 0.05050984397530556, 0.035424403846263885, 0.0820310190320015, -0.05996197834610939, 0.038336001336574554, 0.034643758088350296, 0.008049082942306995, 0.03352553769946098, -0.07426676899194717, 0.01174132339656353, 0.012564164586365223, -0.053505830466747284, -0.04276668652892113, -0.00004013662692159414, -0.030023185536265373, 0.054813940078020096, -0.009868829511106014, 0.0007839416502974927, 0.0229340847581625, 0.04865317419171333, -0.06135447695851326, -0.021151259541511536, -0.014937748201191425, -0.009489056654274464, -0.009879379533231258, -0.0582318976521492, -0.07080661505460739, -0.019663814455270767, 0.02679511345922947, -0.043969303369522095, -0.0077906264923512936, -0.050214461982250214, -0.010127286426723003, 0.0012467902852222323, -0.05738795921206474, -0.003183238208293915, 0.029390230774879456, -0.009088184684515, -0.030402958393096924, 0.0462479442358017, -0.011424845084547997, -0.062409404665231705, 0.006593285594135523, 0.02011743374168873, -0.027280379086732864, -0.024221094325184822, -0.009837182238698006, -0.05363242328166962, 0.005047819577157497, -0.0005422977264970541, -0.0393909253180027, 0.04346293956041336, -0.0068042706698179245, -0.045319609344005585, -0.01427314430475235, 0.007447775453329086, 0.00002517810935387388, -0.03344114497303963, -0.0017762311035767198, 0.018788225948810577, 0.0254026111215353, -0.035614293068647385, -0.020444460213184357, -0.02738587185740471, -0.024199996143579483, 0.012268785387277603, 0.08937330543994904, -0.008075456134974957, -0.022069046273827553, 0.027639053761959076, 0.025191625580191612, 0.031183604151010513, -0.04219702631235123, -0.06207182630896568, 0.04451786354184151, -0.05548909306526184, 0.0285462886095047, -0.015349169261753559, 0.019684912636876106, 0.004844746086746454, 0.016266955062747, -0.009024889208376408, 0.04616354778409004, 0.02137279510498047, 0.034643758088350296, 0.024537570774555206, -0.011224409565329552, -0.01514873281121254, 0.0858287513256073, -0.018809325993061066, 0.03709118813276291, -0.007025805301964283, 0.01426259521394968, -0.038357097655534744, 0.017764948308467865, 0.017838792875409126, 0.08928891271352768, 0.029643412679433823, -0.015264774672687054, -0.0016338161658495665, -0.07857086509466171, -0.012680206447839737, 0.003963883500546217, 0.010907931253314018, -0.012680206447839737, 0.04253460466861725, 0.012595812790095806, -0.038357097655534744, -0.013081078417599201, 0.05641742795705795, 0.01860888861119747, -0.04137418419122696, -0.05093181133270264, -0.008914122357964516, 0.016636177897453308, -0.03263939917087555, -0.02215343900024891, 0.05553128942847252, -0.026499733328819275, -0.04557279124855995, -0.07338063418865204, -0.012099998071789742, 0.0036342190578579903, -0.02000139094889164, -0.043589528650045395, -0.02561359666287899, -0.027702348306775093, 0.005659676156938076, 0.06257819384336472, -0.0124164754524827, -0.019378984346985817, 0.013334261253476143, 0.1105562150478363, 0.02909485064446926, -0.030719436705112457, -0.0639284998178482, -0.004821010399609804, 0.016087617725133896, 0.0051322137005627155, 0.03046625480055809, 0.045910365879535675, -0.027681250125169754, 0.005224519409239292, -0.014716213569045067, -0.010554531589150429, -0.0019239207031205297, 0.03614175319671631, -0.044138092547655106, 0.04093111678957939, -0.045319609344005585, -0.05025665834546089, 0.014346989803016186, -0.025276020169258118, 0.07869745790958405, -0.07359161972999573, 0.02078203670680523, 0.03943312168121338, -0.0032016995828598738, 0.026879506185650826, 0.02700609713792801, -0.011224409565329552, -0.018302960321307182, 0.004114210139960051, 0.058907050639390945, -0.01924184523522854, 0.024685261771082878, -0.015950476750731468, 0.007089100778102875, 0.004035090561956167, 0.023989010602235794, -0.02270200103521347, 0.022364424541592598, -0.03510792553424835, 0.010443764738738537, 0.043209757655858994, -0.09333982318639755, 0.060890309512615204, 0.016161462292075157, 0.04247130826115608, 0.018735479563474655, -0.03360993415117264, 0.0013845899375155568, 0.004594201222062111, -0.036584824323654175, 0.07055342942476273, -0.02348264679312706, 0.030909322202205658, 0.010939579457044601, -0.029242539778351784, -0.03886346146464348, -0.025508103892207146, -0.006139667704701424, -0.00281401420943439, 0.07527949661016464, 0.026098862290382385, -0.04139528423547745, 0.020338967442512512, -0.03962301090359688, 0.0371122844517231, 0.03899005427956581, -0.00990575272589922, 0.04122649505734444, 0.015349169261753559, 0.017575062811374664, 0.032744891941547394, -0.006878115702420473, -0.001255361596122384, -0.03297697752714157, 0.002194245345890522, -0.04759824648499489, 0.019516125321388245, 0.019843151792883873, -0.009357190690934658, 0.022385522723197937, 0.0373021736741066, 0.028841668739914894 ]
4,785
optbinning.binning.multidimensional.binning_2d
_fit_optimizer
null
def _fit_optimizer(self, splits_x, splits_y, NE, E): if self.verbose: logger.info("Optimizer started.") time_init = time.perf_counter() # Min/max number of bins (bin size) if self.min_bin_size is not None: min_bin_size = int(np.ceil(self.min_bin_size * self._n_samples)) else: min_bin_size = self.min_bin_size if self.max_bin_size is not None: max_bin_size = int(np.ceil(self.max_bin_size * self._n_samples)) else: max_bin_size = self.max_bin_size # Number of threads n_jobs = effective_n_jobs(self.n_jobs) if self.verbose: logger.info("Optimizer: {} jobs.".format(n_jobs)) if self.monotonic_trend_x is None: logger.info( "Optimizer: monotonic trend x not set.") else: logger.info("Optimizer: monotonic trend x set to {}." .format(self.monotonic_trend_x)) if self.monotonic_trend_y is None: logger.info( "Optimizer: monotonic trend y not set.") else: logger.info("Optimizer: monotonic trend y set to {}." .format(self.monotonic_trend_x)) if self.solver == "cp": scale = int(1e6) optimizer = Binning2DCP( self.monotonic_trend_x, self.monotonic_trend_y, self.min_n_bins, self.max_n_bins, self.min_event_rate_diff_x, self.min_event_rate_diff_y, self.gamma, n_jobs, self.time_limit) elif self.solver == "mip": scale = None optimizer = Binning2DMIP( self.monotonic_trend_x, self.monotonic_trend_y, self.min_n_bins, self.max_n_bins, self.min_event_rate_diff_x, self.min_event_rate_diff_y, self.gamma, n_jobs, self.time_limit) if self.verbose: logger.info("Optimizer: model data...") time_model_data = time.perf_counter() if self.strategy == "cart": [n_grid, n_rectangles, rows, cols, c, d_connected_x, d_connected_y, event_rate, n_event, n_nonevent, n_records] = model_data_cart( self._clf, self.divergence, NE, E, self.monotonic_trend_x, self.monotonic_trend_y, scale, min_bin_size, max_bin_size, self.min_bin_n_event, self.max_bin_n_event, self.min_bin_n_nonevent, self.max_bin_n_nonevent) else: [n_grid, n_rectangles, rows, cols, c, d_connected_x, d_connected_y, event_rate, n_event, n_nonevent, n_records] = model_data( self.divergence, NE, E, self.monotonic_trend_x, self.monotonic_trend_y, scale, min_bin_size, max_bin_size, self.min_bin_n_event, self.max_bin_n_event, self.min_bin_n_nonevent, self.max_bin_n_nonevent) self._time_model_data = time.perf_counter() - time_model_data if self.verbose: logger.info("Optimizer: model data terminated. Time {:.4f}s" .format(self._time_model_data)) if self.verbose: logger.info("Optimizer: build model...") optimizer.build_model(n_grid, n_rectangles, cols, c, d_connected_x, d_connected_y, event_rate, n_records) if self.verbose: logger.info("Optimizer: solve...") status, solution = optimizer.solve() self._solution = solution self._optimizer, self._time_optimizer = solver_statistics( self.solver, optimizer.solver_) self._status = status self._time_solver = time.perf_counter() - time_init if self.verbose: logger.info("Optimizer terminated. Time: {:.4f}s" .format(self._time_solver)) self._cols = cols self._rows = rows self._c = c return rows, n_nonevent, n_event
(self, splits_x, splits_y, NE, E)
[ 0.014642201364040375, -0.020256878808140755, -0.06269223988056183, 0.012050040997564793, -0.04319599270820618, -0.03096580319106579, -0.062171805649995804, -0.04779982939362526, -0.07350124418735504, -0.043476227670907974, -0.022778980433940887, 0.005081734620034695, -0.025501249358057976, 0.015042535029351711, -0.01607339456677437, 0.03661050647497177, -0.05380483344197273, -0.022879064083099365, -0.0015850708587095141, -0.03230692073702812, -0.04403669387102127, -0.0716196820139885, -0.037231024354696274, 0.01805504411458969, 0.004778982140123844, 0.007125937845557928, 0.0009908255888149142, -0.02796330116689205, 0.0006680566584691405, 0.0272026676684618, -0.03032526932656765, -0.0208173468708992, -0.007231025490909815, -0.037851542234420776, 0.027803167700767517, -0.032927438616752625, 0.0460783950984478, 0.038492076098918915, -0.015783151611685753, -0.008286905474960804, -0.04679899662733078, -0.10480733215808868, 0.036950789391994476, 0.033427853137254715, -0.031386151909828186, -0.017364470288157463, -0.04479732736945152, 0.032246869057416916, 0.012490407563745975, -0.029124269261956215, -0.02946455217897892, -0.10985153913497925, 0.014321934431791306, 0.03823185712099075, -0.0012923268368467689, 0.048320263624191284, 0.04864053055644035, 0.024020016193389893, 0.02040700428187847, -0.06789657473564148, -0.004193494562059641, -0.015512926504015923, -0.008952460251748562, 0.03290742263197899, -0.021437862887978554, -0.02361968159675598, -0.05820850282907486, 0.016663886606693268, 0.033748120069503784, 0.04069390892982483, 0.04575812816619873, -0.017524603754281998, 0.04900083318352699, 0.0006233319290913641, -0.03973310813307762, -0.028543785214424133, -0.05056213214993477, -0.012750624679028988, 0.008452042937278748, -0.01972643844783306, 0.02932443469762802, 0.03190658614039421, -0.025000832974910736, -0.07990658283233643, 0.0157531276345253, -0.028703918680548668, 0.023339448496699333, 0.05340450257062912, 0.014031692408025265, -0.07682401686906815, 0.01220016647130251, 0.022158464416861534, 0.03721100836992264, 0.054285235702991486, 0.01038865651935339, -0.007426188327372074, -0.043836526572704315, -0.01412176713347435, 0.029124269261956215, -0.03528940677642822, 0.030385319143533707, 0.020076729357242584, 0.0026547121815383434, 0.05516596883535385, -0.022278564050793648, -0.04239532724022865, -0.0016075895400717854, 0.009182651527225971, -0.03398832306265831, -0.06021017208695412, -0.028723934665322304, 0.04195496067404747, -0.03739115595817566, 0.021738113835453987, -0.06133110448718071, 0.0230391975492239, -0.05680733546614647, 0.034608837217092514, -0.0026622184086591005, 0.02846371755003929, -0.017524603754281998, 0.04495746269822121, -0.07698415219783783, 0.002574645448476076, -0.011139282025396824, 0.0015775645151734352, 0.0416346937417984, 0.027002500370144844, 0.001053377753123641, -0.09591992944478989, 0.04151459410786629, -0.03438865393400192, 0.02570141665637493, 0.05104253441095352, -0.005269390996545553, -0.0037806504406034946, -0.0681367740035057, 0.04227522760629654, -0.01996663771569729, -0.03412843868136406, 0.06309257447719574, 0.00719599612057209, -0.0058498745784163475, -0.020106755197048187, 0.03096580319106579, 0.03508923947811127, 0.02357964776456356, -0.018845703452825546, 0.015102584846317768, -0.003858214942738414, -0.0030225187074393034, 0.0006624269881285727, 0.001421184279024601, -0.03801167383790016, -0.01183986570686102, -0.01584320142865181, -0.030605502426624298, -0.0024145119823515415, -0.019406171515583992, -0.018135111778974533, -0.04952126368880272, -0.025961633771657944, 0.012980816885828972, -0.021778147667646408, -0.012340283021330833, 0.031886570155620575, -0.05056213214993477, 0.04159466177225113, -0.014241867698729038, 0.004536279942840338, 0.012900750152766705, -0.04099415987730026, -0.04719933122396469, 0.021918263286352158, -0.0478798970580101, 0.08847372233867645, 0.03144620358943939, -0.042155127972364426, -0.04463719576597214, 0.04311592876911163, 0.0035529606975615025, -0.022238530218601227, 0.015502918511629105, -0.03528940677642822, -0.04888072982430458, 0.04980149865150452, 0.051442865282297134, -0.07682401686906815, 0.000021345911591197364, 0.006400333251804113, -0.06825687736272812, -0.03252710402011871, -0.03995329141616821, -0.011629690416157246, -0.02307923138141632, 0.028904085978865623, 0.045277729630470276, 0.03522935509681702, 0.016603834927082062, 0.015633026137948036, -0.0068907421082258224, 0.035409506410360336, 0.049361132085323334, -0.03032526932656765, -0.0230391975492239, -0.017174310982227325, -0.023419514298439026, 0.003565471153706312, 0.029544619843363762, 0.0526038333773613, -0.02335946448147297, -0.03973310813307762, 0.012840700335800648, 0.07822518050670624, 0.09864220023155212, 0.056727271527051926, 0.03222685307264328, 0.006415345706045628, 0.005654711741954088, -0.03354795649647713, 0.022158464416861534, -0.032346952706575394, -0.06197163835167885, -0.008296913467347622, 0.021758129820227623, -0.06317263841629028, 0.03751125559210777, 0.0178348608314991, 0.059849873185157776, -0.033427853137254715, -0.018805669620633125, -0.008707256056368351, -0.01448206789791584, -0.020076729357242584, 0.04575812816619873, -0.0023657213896512985, -0.02159799635410309, 0.024560466408729553, -0.0317864865064621, -0.05168306827545166, -0.028984151780605316, -0.05368473380804062, -0.06405337154865265, -0.03222685307264328, -0.02014678716659546, -0.008912426419556141, 0.0562068372964859, 0.042475394904613495, -0.013251041993498802, 0.004708923865109682, 0.019155962392687798, -0.03424853831529617, -0.04359632730484009, -0.0206772293895483, -0.04251542687416077, -0.04984153062105179, 0.03911259025335312, 0.021998330950737, 0.02634195052087307, -0.026862384751439095, -0.018345287069678307, 0.018485402688384056, -0.044477060437202454, 0.028403667733073235, -0.007326104678213596, 0.021077563986182213, 0.01265054102987051, -0.020697247236967087, -0.009918265044689178, 0.04195496067404747, 0.0270625501871109, 0.06637530773878098, -0.04639866203069687, 0.028763968497514725, -0.024200165644288063, 0.0407339446246624, -0.014842367731034756, -0.018675561994314194, 0.04123435914516449, 0.019316095858812332, 0.04463719576597214, 0.012570474296808243, -0.029164301231503487, -0.011489573866128922, -0.06465387344360352, -0.028543785214424133, -0.0272026676684618, -0.010568806901574135, 0.04511759430170059, -0.008897414430975914, -0.03442868962883949, 0.03090575337409973, 0.08431025594472885, 0.028763968497514725, 0.06617514044046402, 0.008732276037335396, 0.042755626142024994, -0.0010615094797685742, 0.009658047929406166, -0.0016226021107286215, 0.015302751213312149, 0.0013698914553970098, -0.010738948360085487, -0.026502083986997604, 0.04431692883372307, -0.0011084235738962889, 0.047679729759693146, -0.03855212405323982, 0.0639733076095581, -0.012660549953579903, 0.009693076834082603, 0.015913261100649834, 0.052523765712976456, 0.03132610395550728, 0.009107588790357113, -0.01937614567577839, -0.01063886471092701, 0.008887405507266521, 0.0046413675881922245, 0.054245200008153915, 0.0003421601140871644, 0.038091741502285004, 0.054565466940402985, -0.044276896864175797, 0.0035504584666341543, 0.0010339865693822503, 0.05524603649973869, -0.014562134630978107, -0.07706421613693237, -0.06889741122722626, 0.031566303223371506, -0.0668957456946373, 0.02285904809832573, 0.03072560392320156, -0.005109257530421019, -0.006870725192129612, 0.034288570284843445, 0.005714762024581432, 0.022058380767703056, 0.0003875104011967778, 0.052563801407814026, 0.06373310834169388, -0.023199331015348434, 0.05548623576760292, 0.008812342770397663, -0.06777647882699966, 0.050802331417798996, -0.012840700335800648, -0.03158631920814514, 0.03611008822917938, -0.014572142623364925, 0.03050541877746582, 0.021077563986182213, 0.0752226784825325, 0.054605502635240555, 0.009963301941752434, -0.016553793102502823, -0.026602167636156082, 0.029804835096001625, -0.043836526572704315, -0.0859115868806839, 0.03272727131843567, -0.003317764727398753, 0.04856046289205551, 0.01828523725271225, -0.011079232208430767, -0.028503751382231712, 0.006780650001019239, 0.04327606037259102, -0.061531271785497665, -0.04155462607741356, -0.03621017187833786, 0.0038632191717624664, 0.027082568034529686, 0.006405337247997522, 0.034508757293224335, -0.058088403195142746, 0.002787322737276554, 0.027943285182118416, 0.004318598657846451, 0.020897412672638893, 0.027643034234642982, 0.0001707672927295789, -0.011709757149219513, 0.004155963193625212, -0.01706421934068203, 0.02946455217897892, -0.0115896575152874, 0.11001166701316833, -0.06593494117259979, 0.03316763788461685, 0.011479565873742104, -0.015733109787106514, 0.007916596718132496, -0.010648873634636402, 0.022879064083099365, 0.06909757852554321, 0.06265220791101456, -0.06061050668358803, -0.01729441061615944, -0.08703251928091049, -0.020477063953876495, 0.017234360799193382, 0.07822518050670624, -0.01598331891000271, -0.0638532042503357, 0.06133110448718071, 0.03090575337409973, -0.0033552958630025387, 0.057728104293346405, -0.052844032645225525, 0.007731442339718342, 0.027322767302393913, 0.008777313865721226, -0.0843903198838234, 0.007135946303606033, -0.009067555889487267, 0.010919098742306232, 0.08711259067058563, -0.027623018249869347, 0.0060400329530239105, 0.024380315095186234, 0.06497414410114288, -0.0008125521126203239, -0.0008701000479049981, -0.011429524049162865, -0.0455179288983345, -0.030585486441850662, -0.031025853008031845, -0.02285904809832573, -0.04323602840304375, -0.005244370084255934, -0.05952960625290871, -0.013491242192685604, -0.017584653571248055, -0.024740615859627724, 0.0009470391669310629, 0.011239365674555302, 0.0324070043861866, -0.02648206613957882, 0.01042869035154581, -0.01624353602528572, 0.0484403632581234, -0.02612176723778248, -0.02480066567659378, -0.0016914093866944313, 0.008381984196603298, -0.010468723252415657, -0.09567973017692566, 0.019356129691004753, 0.03941284120082855, 0.01787489466369152, 0.01710425317287445, 0.007501250598579645, -0.017394494265317917, -0.012640533037483692, -0.006510424893349409, -0.004388656932860613, -0.01761467754840851, -0.009557964280247688, -0.022798998281359673, 0.012530441395938396, -0.016713926568627357, -0.0009101334144361317, -0.015863219276070595, 0.02480066567659378, -0.006455379072576761, 0.016824018210172653, 0.024360299110412598, 0.004438698757439852, -0.012640533037483692, -0.012370307929813862, 0.0013874061405658722, -0.026962466537952423, -0.01211009081453085, 0.018395328894257545, -0.0203669723123312, 0.02932443469762802, 0.028763968497514725, -0.027102584019303322, 0.026542117819190025, -0.0011909924214705825, 0.008296913467347622, 0.024100081995129585, 0.02996496856212616, 0.006990825291723013, 0.0029524601995944977, -0.006295245606452227, -0.010308589786291122, 0.007561300881206989, -0.014782317914068699, -0.011499582789838314, 0.06449373811483383, 0.017054211348295212, 0.0038807338569313288, 0.045597996562719345, 0.009227689355611801, -0.01299082487821579, 0.06069057062268257, -0.05056213214993477, 0.02960466966032982, -0.011349457316100597, -0.031486235558986664, -0.043836526572704315, -0.0022493742872029543, -0.013411175459623337, -0.0764637142419815, 0.03470892086625099, -0.10592826455831528, 0.020086737349629402, -0.00950291845947504, -0.07025854289531708, 0.03344787284731865, -0.007976646535098553, 0.03805170953273773, 0.008051709271967411, 0.014782317914068699, 0.018185153603553772, -0.029764803126454353, 0.008497080765664577, 0.024860715493559837, 0.025401165708899498, 0.0321267694234848, -0.026862384751439095, 0.032607171684503555, 0.06241200491786003, 0.01441200915724039, -0.003610508516430855, 0.050442032516002655, 0.01389157585799694, -0.016133444383740425, -0.03216680511832237, 0.001612593769095838, 0.08074728399515152, 0.05140283331274986, -0.02612176723778248, 0.05340450257062912, -0.05900917202234268, 0.014722268097102642, 0.004728940315544605, -0.03352793678641319, -0.012070057913661003, 0.07710424810647964, -0.016673894599080086, -0.022298581898212433, 0.06297247111797333, 0.018135111778974533, 0.058128438889980316, -0.01737447828054428, -0.025741450488567352, 0.044196829199790955, 0.06393327564001083, 0.05452543497085571, 0.027082568034529686, 0.05308423563838005, -0.04727939888834953, -0.010778982192277908, 0.011559632606804371, 0.011559632606804371, 0.03941284120082855, -0.03769140690565109, -0.01996663771569729, -0.001837781397625804, -0.015643034130334854, 0.010859048925340176, 0.016013342887163162, 0.009613010101020336, 0.03316763788461685, 0.009082567878067493, 0.02339949831366539, 0.01011843141168356, 0.025541283190250397, -0.032286904752254486, -0.05064219981431961, -0.02544119954109192, 0.006060049869120121, -0.027402834966778755, -0.04127439484000206, -0.06709591299295425, -0.047599662095308304, 0.018315261229872704, -0.052203498780727386, -0.007446204777806997, -0.016683902591466904, -0.010063385590910912, 0.023779815062880516, -0.09047538787126541, 0.006725604180246592, 0.042075060307979584, -0.004381150938570499, 0.005454545374959707, 0.059849873185157776, -0.03404837101697922, -0.038812343031167984, -0.004023352637887001, 0.04311592876911163, -0.05924937129020691, -0.00018343410920351744, -0.006195162422955036, -0.016403669491410255, -0.055686403065919876, 0.00787656381726265, 0.010018347762525082, 0.013651375658810139, 0.014091742224991322, -0.05516596883535385, -0.01178982388228178, 0.028904085978865623, 0.031346119940280914, -0.026422016322612762, 0.01124937366694212, 0.0059649706818163395, 0.040173474699258804, -0.03607005625963211, -0.010909090749919415, -0.01706421934068203, -0.0003061926399823278, 0.016123434528708458, 0.07986655086278915, -0.023059215396642685, 0.04155462607741356, 0.022018346935510635, 0.014972476288676262, 0.017794828861951828, -0.05584653466939926, -0.011759798973798752, 0.05552626773715019, -0.09599999338388443, -0.009788156487047672, -0.04391659423708916, -0.0004119057266507298, -0.01615346036851406, 0.02031693048775196, -0.036370307207107544, 0.051482900977134705, -0.0038807338569313288, 0.05744786933064461, 0.04679899662733078, -0.01611342653632164, -0.07017847895622253, 0.073701411485672, 0.023199331015348434, 0.028944117948412895, -0.01797497831285, -0.008947455324232578, -0.029064219444990158, 0.03186655417084694, 0.054285235702991486, 0.07526271790266037, 0.05508590117096901, -0.015472893603146076, 0.0046063382178545, -0.06949791312217712, -0.0003706213319674134, 0.008542117662727833, 0.03923269361257553, -0.025601333007216454, -0.0008813594467937946, 0.05100249871611595, -0.06201167404651642, 0.01678398624062538, 0.038492076098918915, 0.03422852233052254, -0.04743953049182892, -0.0270625501871109, -0.025881566107273102, -0.00945788063108921, 0.004986655432730913, 0.04131442680954933, 0.04495746269822121, -0.027182651683688164, -0.06433361023664474, -0.03466888889670372, 0.022118430584669113, -0.003507923102006316, -0.015222684480249882, -0.021397830918431282, -0.04511759430170059, -0.05544620379805565, -0.014422017149627209, 0.03933277353644371, 0.008266888558864594, -0.011699749156832695, -0.03937280923128128, 0.07354128360748291, 0.020617179572582245, -0.028763968497514725, -0.02882401831448078, 0.06637530773878098, 0.005419516004621983, -0.00289741437882185, 0.030085070058703423, 0.019576312974095345, -0.021798163652420044, 0.02888406813144684, -0.060090072453022, -0.025361133739352226, 0.00417347764596343, 0.04583819583058357, -0.0294245183467865, 0.03576980531215668, -0.031206002458930016, -0.0496813990175724, 0.012510424479842186, 0.0019829024095088243, 0.05280400067567825, -0.09808173030614853, 0.003973310813307762, -0.0011590908979997039, -0.03941284120082855, 0.008902418427169323, -0.019836530089378357, -0.00478398660197854, -0.016483735293149948, 0.011699749156832695, 0.044557128101587296, -0.0025183483958244324, 0.018485402688384056, -0.014812342822551727, 0.01067889854311943, 0.020216846838593483, 0.007376146502792835, 0.014011675491929054, 0.00948290154337883, -0.013461217284202576, -0.008006671443581581, 0.05476563423871994, -0.0767439529299736, 0.0710592120885849, 0.007601334247738123, 0.06433361023664474, 0.007010842207819223, 0.005579649470746517, -0.004306088201701641, 0.014742284081876278, 0.0010708923218771815, 0.03552960604429245, -0.035409506410360336, 0.00719599612057209, 0.02770308405160904, 0.006590491626411676, -0.032206837087869644, -0.033467888832092285, -0.005409507546573877, -0.05196329951286316, 0.05940950661897659, 0.012770641595125198, -0.015643034130334854, 0.03100583702325821, -0.009312760084867477, 0.028323601931333542, -0.001682652160525322, 0.050442032516002655, 0.04495746269822121, -0.0009708089637570083, -0.013110925443470478, 0.013591325841844082, -0.0315062552690506, -0.02404003217816353, -0.03198665380477905, 0.06285237520933151, -0.03815178945660591, 0.00011900541721843183, 0.019706420600414276, -0.03406838700175285, -0.008822351694107056, 0.058008335530757904, 0.017534611746668816 ]