diff --git a/examples/nvflare/regression-quantile/QuantileRegression/input_quantile/dataset_quantile_test_site1.csv b/examples/nvflare/regression-quantile/QuantileRegression/input_quantile/dataset_quantile_test_site1.csv new file mode 100644 index 00000000..dface9b0 --- /dev/null +++ b/examples/nvflare/regression-quantile/QuantileRegression/input_quantile/dataset_quantile_test_site1.csv @@ -0,0 +1,101 @@ +X,V1,V2,V3,Y +0.4967141530112327,0.2923146289747929,3.2504511522437984,0.6342009978155856,7.458619022789533 +-0.13826430117118466,0.7896773386173205,3.392549168457764,0.6879637919606061,6.97485562437393 +0.6476885381006925,0.8286427417366152,3.758135870222694,0.9494587210246525,8.894919279351281 +1.5230298564080254,0.5988613653891905,3.737661436424432,0.922074053086693,10.085015856646251 +-0.23415337472333597,0.9193571441669954,2.035631442430036,0.7958196812071704,6.367952582888138 +-0.23413695694918055,1.2020254284072691,2.343522472059414,0.8234654766617564,6.887532464462137 +1.5792128155073915,1.9430929506052652,3.3605246870460617,1.055532979157685,8.598099105271762 +0.7674347291529088,1.0872889064159195,3.3596501656385462,0.6816857222328341,8.02309733462505 +-0.4694743859349521,1.1287751953613823,3.3605333804142337,0.9094194762340077,7.092864039120033 +0.5425600435859647,0.9627770421169164,5.696912043458305,0.7595614695132212,9.505648796394592 +-0.46341769281246226,0.040614392350479256,3.399623357485217,0.756463759354556,7.979953891240826 +-0.46572975357025687,0.9867430622753915,3.794895948126419,1.019755370397438,7.02636751483453 +0.24196227156603412,1.0301151049705133,3.6678012344452418,0.9650832697976061,7.463272713352853 +-1.913280244657798,2.231621056242643,3.455973875914059,0.9627019272001278,5.2109960647230675 +-1.7249178325130328,0.9038195176094388,2.7793115287517582,1.0610957614308658,5.8850472801242155 +-0.5622875292409727,1.1507736711668062,3.531278454345287,0.8042007683265519,6.404433523524859 +-1.0128311203344238,0.9826441151473784,2.4590223498237,0.9363905942589928,6.876355714671885 +0.3142473325952739,0.415660981190234,2.834226975281994,0.7379466486813089,7.995412116312185 +-0.9080240755212109,1.5714114072575103,2.6602455165196277,0.8648332704976884,6.302679874855643 +-1.4123037013352915,1.3759665163433872,3.057311897570426,0.7739713891264631,5.314820313066134 +1.465648768921554,1.3955159735215235,4.6202609966714565,0.8193991929985437,10.621668590662456 +-0.22577630048653566,0.5453062726026305,1.6929143651857765,0.9190314050873828,7.855013835323309 +0.06752820468792384,1.7013971554680496,3.480382133262159,0.6363558633533055,6.6083368403492235 +-1.4247481862134568,0.29907446860385956,1.8710988901672438,1.218477455137092,6.909332432495749 +-0.5443827245251827,1.2934285469001352,2.6696476939473968,0.5987965237000596,6.167102762216064 +0.11092258970986608,2.095227812904989,3.762265417877156,0.5571622774424536,7.136697899917507 +-1.1509935774223028,0.5047318374346559,3.044996013366824,1.0316221747000136,6.318302862938899 +0.37569801834567196,0.716851135198614,2.245578655449486,0.9583325387925872,8.259836849165051 +-0.600638689918805,1.0498256825438206,2.4992874035180224,0.924823963410431,7.067876898067045 +-0.2916937497932768,0.7482621729419003,3.475718424254273,0.925669101852856,6.7611854345158395 +-0.6017066122293969,0.22466828446693365,2.4887433577980045,0.7975506454306172,6.346061151178525 +1.8522781845089378,1.0342814874030137,3.1515210127073825,0.6205491257028337,8.192551300367622 +-0.013497224737933921,0.46884814313694756,3.0319002879326695,0.8151609116387453,7.620293365826467 +-1.0577109289559004,1.2367962153175909,2.543879756675928,0.6645676576975776,5.701156234629948 +0.822544912103189,0.5402878828830984,4.500760862527728,0.9950239466835503,10.546430438896326 +-1.2208436499710222,1.7749672025087697,3.4437433156226076,0.7705885236995723,5.415109953448094 +0.2088635950047554,0.6083733538318814,1.582400189339675,0.6349005606414977,7.63924661967868 +-1.9596701238797756,0.8389692418971622,3.130518020338599,0.7357228316694013,4.323874402227196 +-1.3281860488984305,1.406758608684835,2.5367494746621286,0.882586290855125,4.462625953737752 +0.19686123586912352,0.3845678417830224,3.5967033343573567,0.6872550894392051,8.07366720622531 +0.7384665799954104,1.1137299673020646,2.4452354830971097,0.6355559208867138,7.680938229944475 +0.1713682811899705,1.6535713771412142,2.9196844909731707,0.8487374422983825,7.023754591751298 +-0.11564828238824053,0.19625838271938623,3.35349109528632,0.8489933142217446,7.045226481025313 +-0.3011036955892888,1.092316929266152,3.6060286359190847,0.6986113649257741,6.9204990499346275 +-1.4785219903674274,1.1299413971242118,2.159792515060957,0.7057923388763355,4.161066678890441 +-0.7198442083947086,1.3909114358886552,2.765849134911336,0.8464099874715273,6.434038618029167 +-0.4606387709597875,0.381524644560959,2.667538282187331,0.5103831317005352,6.679848286742646 +1.0571222262189157,0.33977169345786185,2.542669537198402,0.518507245124689,7.83513868238131 +0.3436182895684614,1.2609707828084489,4.235817968196768,0.6563111557495128,7.577163158164457 +-1.763040155362734,1.1484923366165931,3.283487197672669,0.7573105696576306,4.592315921478565 +0.324083969394795,1.1252464251729384,2.1173812319654686,0.862181513119601,7.240417716720754 +-0.38508228041631654,1.173224104748488,3.642503362938343,1.0950712433899104,8.08828730820124 +-0.6769220003059587,0.6599876392107547,4.485509337908843,0.9715319246404039,7.352658983331704 +0.6116762888408679,1.1161268485805018,3.7227256823858026,0.7680122940073146,8.490520754711094 +1.030999522495951,1.1465362366493406,1.9364410238321907,0.7961967584194622,7.6154556572444685 +0.9312801191161986,0.642824290986816,2.661036148993624,0.5994941270724383,7.736346622660502 +-0.8392175232226385,1.9328872555723784,3.8868378044306358,0.796297372801522,5.929127635516013 +-0.3092123758512146,1.2369164604558938,2.5046313740668533,0.7422682722159724,5.858643050869512 +0.33126343140356396,0.4043482513986757,3.3106735997023597,0.8645437120676179,8.181637087878162 +0.9755451271223592,1.3282768043169149,3.5422438374005356,0.6345538112895355,7.549323304078214 +-0.47917423784528995,0.5126591648863392,2.351148669895342,0.9038693028482345,7.980539089778915 +-0.18565897666381712,1.393542301871226,2.95833225075674,1.1065477826005157,7.372268853071705 +-1.1063349740060282,1.579297789503702,0.7311128619516492,0.7782479703086285,3.981149417186593 +-1.1962066240806708,0.5896588408241448,2.282928651065997,0.8803423444197883,6.101963948183566 +0.812525822394198,1.4816880646221608,2.823202294024788,0.9380287983422225,8.021175254026733 +1.356240028570823,1.2063904634682492,2.1265517726246053,0.7197559056228328,8.054678561301746 +-0.07201012158033385,1.411030079997245,4.1426879127521445,0.8448184963620834,7.852828089227755 +1.0035328978920242,1.9483964913269736,1.9989010354275571,0.8025184801563591,7.628763617459 +0.36163602504763415,0.8773059419985647,2.6919688593121114,0.8195352197097664,7.4519227717286345 +-0.6451197546051243,0.6231319178212552,3.091518404100264,0.6453980432289067,6.275996928402453 +0.36139560550841393,0.5552427851872384,4.008891302346281,0.8049020348517886,8.4662043707612 +1.5380365664659692,0.5920948575172809,1.9948964941743925,0.8995996582490899,8.017654974962921 +-0.03582603910995154,0.9614491452929479,3.8142146265084715,1.0902287215590083,7.517818662106676 +1.5646436558140062,1.170575987408322,3.007163142713711,0.9918541652170414,10.11183863256335 +-2.6197451040897444,1.1383453996650095,2.3129439442664346,1.2306364915023114,5.385858367248781 +0.8219025043752238,1.4135916245180118,3.3234724319842894,0.6465304874223902,7.685688876694595 +0.08704706823817122,1.0065009459389536,3.139341786901429,0.9744641273441357,8.10613335480151 +-0.29900735046586746,1.7267670385786584,2.5798481859888436,0.8366684011476704,6.378663521139563 +0.0917607765355023,0.867671583381022,3.048861459493013,1.2379605866435346,9.95576797239898 +-1.9875689146008928,2.3600845832948094,2.730280482196768,0.6383403429289698,3.928458018516693 +-0.21967188783751193,1.312833673882503,3.0794621416758736,0.6320556315638448,6.426010333714226 +0.3571125715117464,0.5714212217918587,3.4634914721647325,0.6801214709111956,7.585616565985154 +1.477894044741516,0.46455375096944385,4.1102117713017465,0.37522085513803866,8.404154288712428 +-0.5182702182736474,1.2412362076215926,2.1335291508212055,0.6948489956638478,5.943281156646259 +-0.8084936028931876,0.8882686073370746,4.493123362259387,0.6481734676892604,6.483926034524578 +-0.5017570435845365,1.357000247046046,1.6335385403342488,0.8300787572952416,5.078091280020489 +0.9154021177020741,1.2366188122867725,2.8937504334750916,0.8683511951554319,7.9694786563402165 +0.32875110965968446,0.9635855436715636,3.4118220445392033,1.1752341678431772,8.13923825280313 +-0.5297602037670388,0.5766031409657975,3.1966943074145227,0.9900847676372101,8.32509274922488 +0.5132674331133561,0.24257638765706768,2.5641103361255846,0.6846192688675194,8.51397339388293 +0.09707754934804039,0.7767425239664895,2.8543144247499073,0.6203170657303284,7.158904063221758 +0.9686449905328892,1.4281993971617362,2.654899345738817,0.8983838343013012,8.884003881827102 +-0.7020530938773524,1.1070468720651019,2.587444670139052,0.5359533585958716,5.676211995780173 +-0.3276621465977682,0.377130610644006,3.5947214679147175,1.1662917531708707,8.004403075202442 +-0.39210815313215763,1.086590462925591,3.249910840175533,1.0358880241442574,8.118491352912047 +-1.4635149481321186,1.1926586898644185,2.514963283317542,0.7061648695790591,5.2289215130091415 +0.29612027706457605,0.5580712818994336,3.6297199128032753,0.45737309418182454,7.119870374560003 +0.26105527217988933,1.076862552972764,3.2151096646136264,1.0707744748330827,8.10571072716883 +0.00511345664246089,1.029104359223,3.569003483187272,0.7770920309494764,7.0837293373927634 +-0.23458713337514692,0.42851485108468845,3.4407401893465286,1.0475632623946924,7.499780313062555 diff --git a/examples/nvflare/regression-quantile/QuantileRegression/input_quantile/dataset_quantile_test_site2.csv b/examples/nvflare/regression-quantile/QuantileRegression/input_quantile/dataset_quantile_test_site2.csv new file mode 100644 index 00000000..d403ebc6 --- /dev/null +++ b/examples/nvflare/regression-quantile/QuantileRegression/input_quantile/dataset_quantile_test_site2.csv @@ -0,0 +1,101 @@ +X,V1,V2,V3,Y +0.3291693887576622,0.5478689081028055,3.8925069102940357,0.9153367412502954,7.751357877477397 +2.9686660850977935,1.6926976878262003,2.015344720357421,0.22155099419478963,7.238221115122672 +0.8399143293272411,0.7272304788475382,2.338784075954752,0.2849439065380844,6.774677888947043 +2.0957743739078536,2.1562869912420233,2.948407954238696,0.7424439367505918,7.126927759001262 +0.31445377874308544,2.043542617634905,2.4834613627424025,0.913567649689783,6.2275714301706095 +0.41716296904389694,2.186853940475294,2.9161418923617775,0.9217396982454231,6.173775958571493 +1.4062165820935022,2.1249592242401656,2.497513575093515,0.7551127813276062,7.023265403942617 +1.4907759782151464,1.7043645825018239,2.5902062055610258,0.45093630272589325,7.403927640481799 +0.36431694835841244,0.5861433609327166,2.458140730367213,0.46790574106039284,7.297200999608589 +-2.341405113673728,1.4968633811615681,3.3952095301164613,0.7800411382191277,4.267197745613849 +0.29954068087216046,1.7374395587363467,2.651075411410406,0.9141501867834396,5.983398890144096 +1.3224775610152806,1.4864112081831249,1.751642558830695,0.4388749069952315,6.843149112929828 +0.5282001301819154,1.131281686333227,2.702544676176246,0.49850098088356043,7.464425819209784 +1.0474415353893414,1.2941384594377812,2.3129254451523424,0.524358033018598,7.011956508126511 +0.8245913384797006,1.4325579995009152,3.9551138920315982,0.7193249575786859,6.658051001669019 +-1.2220097726397203,0.5842640507015541,3.0898610022285524,0.41991170699015334,4.490360638774061 +1.5593805754217227,1.6074857406124776,3.816574240352656,0.697669461939291,8.517387332806186 +-0.19609799672832462,1.5329462229898678,2.8888423975717847,0.7642897613801609,5.8341952748184065 +-0.10187836473952783,1.1209698444089542,3.536747667501807,0.8551385494005664,8.414583630844724 +1.2091439533490274,1.6007365684417014,3.411908843901185,0.8382573035042576,7.657551646744319 +-0.37793950054344305,1.8981838366084605,3.2464352786999404,0.3257735533879185,4.773657196335137 +0.8141065536458709,0.5899996655305094,1.4082133183733165,0.719646478178803,7.338339016471264 +-0.5269546948189792,2.0824009971544175,2.959681558872582,0.8347296704997518,3.8923691905850877 +0.2749689052362826,1.8097926750361248,3.888620998679962,0.4949341415989341,6.9299089323340795 +0.0518164526780599,1.803666234985318,2.810768287811772,0.5832215134004769,5.520533455276554 +-0.05436515999077396,1.7983994684199036,3.735993686331155,1.119999998030654,6.232509426220089 +-0.4797593250452632,1.628653189523835,2.4157451298389874,0.11009998926957232,3.9069266190800223 +0.4458520369839172,1.2003897560959678,2.5545405787423228,1.3514020442611963,8.57688467368027 +0.6455933315651825,0.7600230463734727,3.35085695181783,1.0669607163806827,8.62931634665381 +1.6111433354270022,1.507462384456618,1.6691681809158683,0.6101915855400174,5.373614996437653 +-0.18858363553595447,1.2797445397529539,4.1380149880697035,1.1893773470011437,8.036833957108117 +0.5632437320551534,0.7838085167599094,2.5797408078207322,0.4127196323213349,6.519379495319426 +3.1487727042992577,2.2557773936846996,3.8507333275034292,0.859112984056495,9.918882733202988 +0.9701862433688759,1.7043171518240228,2.3216271347654427,0.28415420266813235,5.17149181475394 +1.0792561132706229,1.0134659025688018,3.401407905049643,1.1742574130576433,9.529370736197135 +1.0200008253276396,0.2553443996914785,2.467351610058164,0.5100460782829569,8.382020059606756 +-1.5451500330628503,0.6971567645769094,1.5691439902098692,0.9623436862606602,4.933283661272682 +0.20731032038117342,1.4931551988338936,2.461291766037337,0.7665313189597482,6.248997371464351 +-2.0676445495409768,1.045362978879328,2.7091637193867992,0.5915656207822849,4.656165844223087 +1.5335871836528696,0.40951419839830894,3.183892432079932,0.5407060035979278,8.996011041663767 +2.5403412771651293,1.3601347220205717,2.1681699461888564,1.4646324275433455,9.8533528638396 +-0.13454176371908944,1.1047548785707537,3.2157295914832695,0.5023943981777734,6.084624368942186 +2.6161735009383196,0.9584282358444551,2.5925588765183587,0.8637808831696571,9.910277926527625 +-0.8459293930063785,0.45305474997431483,1.2168050124905492,0.9088127594639188,6.635100914638384 +-0.9303210001948485,1.4007990727023056,3.587646476536248,1.0502135325217585,5.981352087938222 +1.1632783013006756,0.5564712275773341,3.6624090414764168,1.0372312076146635,9.085977621409025 +-0.47917713863873646,1.0724093805678825,2.514174936563827,0.37384337015608143,5.675037998119615 +-0.09597621907390996,1.8963401459251514,2.650132305018035,0.7026597734206526,5.230377677733723 +1.8034706759681283,1.9466879203657022,2.380816859049709,0.9079106036992591,7.242319410740557 +-0.6696103320137907,1.1231507120128676,3.104349760498688,0.7986503136470947,5.424104273361939 +0.16143701850729925,-0.6476729175406402,2.3282263306842155,0.49905058698555543,8.429907933303046 +0.35934302007473484,1.6531339519102517,3.4653747791052143,0.5663323610955168,5.996366584952082 +0.9542567196329805,0.6426397345153785,2.68441406251475,0.6893502404347053,7.687290732532629 +1.3786335766139284,0.3639765382696669,1.7615702882161524,0.36610914660660554,6.514754317645872 +0.37571475845977687,1.643955724876883,3.349042112950503,0.6945473412172563,6.64876592514213 +-0.9384475361889459,0.090128918602282,3.1764608891883213,0.8827361323629035,6.642172613744732 +1.7120426915351172,1.62748262878777,1.3216846790246777,0.8687503865714394,7.174691624536875 +3.950432395849068,1.7430483874205973,2.948659494172899,0.8587542276712088,10.339679787908228 +1.484375172337893,1.5015910366871412,3.2489305065376093,0.43710352808853237,7.540448566006533 +1.1727338071214013,1.3257354338277074,2.7252259375766,0.2150146891453666,6.511686659781243 +0.04922936082706891,1.132694047890458,2.416357807759926,0.8076305384719871,6.316761652629064 +0.1974748416310258,0.9097150336161112,3.782845797845316,0.48906743585420664,6.632791593953098 +-1.167536136606137,0.5508141335799777,2.2709211464204113,0.8216004534436003,5.158118044077412 +1.2407987322246123,2.621144598654749,4.194587933163472,1.1780837104772361,8.655739032371322 +0.3370555426797027,0.933234345704298,2.2225764182092624,0.7625140213286697,6.662389147813401 +2.0454859481291354,0.6459236434457174,3.5520925249296065,0.6367721819499031,10.161875710245637 +-0.7443932768493091,1.1440500766333623,4.2436351816026345,0.4818937559756582,5.811787577133015 +2.1371985651742684,1.5465481117337057,1.7739812079600636,0.419820759551526,6.941833004293291 +0.1280520360632948,1.8124627168545129,3.182206775555085,1.0891685438616927,7.517752495131001 +-0.23334054271125637,1.0631882715663847,2.223147195833903,-0.028041000958458517,4.484980486202364 +-0.07972693318750534,1.0858271557124954,3.4413865576993947,0.6462478319552414,6.48962682742334 +-0.2307804250844785,0.719304377602471,3.948663707552609,1.0604198920606085,7.668907999881689 +-2.006002357176499,1.046340052365555,4.220022666668422,0.39831864837394576,5.440778928814211 +1.2671863977787816,1.7191761149893743,3.6212861453901537,0.6824914198276256,7.782031058607393 +1.429164743201141,1.1627192905713932,2.5347605774694197,0.6203011571089426,8.054411467325968 +2.0342832810515192,0.9797458509101197,3.3776804316176574,0.8739887971993514,10.115418364170566 +1.3463312232131317,1.302597569780293,4.9066439391252334,1.1360865882756106,10.060190258492312 +1.2871728569957797,0.7309907119279477,3.808280945540014,0.5712986447099703,7.941271404562799 +-1.5142024429017304,-0.09432342087640633,4.587198912082222,0.39983079196201127,6.622533547225454 +0.7197318410057648,0.90804825035082,3.7323236967634523,0.5069745381240358,8.410246656655108 +-0.8598689058721194,-0.5932958471264267,1.8597511506391444,1.2886776906035096,8.051479911090576 +0.16509714681124532,1.0413305680503537,2.5966822489643486,1.2940138592122565,7.774287874907411 +2.175943879016436,1.4469270699029377,3.3853305139547745,0.8286059750106926,8.811760555685739 +0.5386633316846006,1.792533635133885,2.068361479199627,0.8862251942343655,6.870831224389158 +-2.6363929259040773,1.517933996661582,3.372348377802427,0.5126570866017395,2.0803061700708803 +-0.7018931562332298,1.2217702381137545,1.2788271056068314,1.0057069059292927,5.861695105713317 +-0.181013207658708,0.5845997152056568,2.762185856639172,0.6259934026487735,7.328863849901206 +0.22921036557530794,0.5407126719376726,3.2940844495582553,0.4471680345185923,6.531056775210318 +1.6256285663637235,1.0739963451023855,1.3369229849201698,0.7764523077282964,7.586711921637442 +1.5041409511165214,0.6809829295779459,3.265249702599067,0.610664546251539,7.536014115595679 +1.4745781703840732,0.6226988864051995,3.5500842400568766,0.7656904171146843,9.040973087407526 +0.7787683677648009,1.2267917076996986,3.575322418186538,0.6921076640321056,7.288672875473288 +0.14587079219766064,0.6889700955560475,1.516736431359612,0.806534685339885,5.61599219055119 +0.0659887946220033,0.10992402585810512,1.6911523304988667,0.7393217566185868,6.980498734177196 +1.0185380895663885,1.0689969179962084,3.7491216717408884,1.2638740642363109,10.17222777156364 +1.6207502570417467,0.6302050316127362,3.7504470037486186,0.9258153149365073,10.208100788669599 +2.363160628052688,1.510538575495708,1.9951501912475815,0.6016412227271656,7.779535953449574 +0.612348088951238,1.976388892403171,1.77812385262072,0.8610217281690593,6.8938199093054395 +0.8537909965086546,1.6560005676339113,3.6163089270826108,0.5266140526808886,7.628124093612748 +2.2825169219189663,1.4618681754504324,1.278864741686384,0.6995351799354955,8.952766769997151 diff --git a/examples/nvflare/regression-quantile/QuantileRegression/model_parameters (1).joblib b/examples/nvflare/regression-quantile/QuantileRegression/model_parameters (1).joblib new file mode 100644 index 00000000..db8e0d72 Binary files /dev/null and b/examples/nvflare/regression-quantile/QuantileRegression/model_parameters (1).joblib differ diff --git a/examples/nvflare/regression-quantile/QuantileRegression/results_analize.ipynb b/examples/nvflare/regression-quantile/QuantileRegression/results_analize.ipynb new file mode 100644 index 00000000..ffcf8bfd --- /dev/null +++ b/examples/nvflare/regression-quantile/QuantileRegression/results_analize.ipynb @@ -0,0 +1,89 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "65470c2b", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Requirement already satisfied: joblib in /Users/danieldavid/.pyenv/versions/3.11.6/lib/python3.11/site-packages (1.4.2)\n" + ] + } + ], + "source": [ + "! pip install joblib" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "c21f2bf5", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Model Parameters:\n" + ] + }, + { + "ename": "AttributeError", + "evalue": "'dict' object has no attribute 'get_params'", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[2], line 9\u001b[0m\n\u001b[1;32m 7\u001b[0m \u001b[38;5;66;03m# Analyze the model parameters\u001b[39;00m\n\u001b[1;32m 8\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mModel Parameters:\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[0;32m----> 9\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m param_name, param_value \u001b[38;5;129;01min\u001b[39;00m \u001b[43mmodel\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget_params\u001b[49m()\u001b[38;5;241m.\u001b[39mitems():\n\u001b[1;32m 10\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mparam_name\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m: \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mparam_value\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m)\n", + "\u001b[0;31mAttributeError\u001b[0m: 'dict' object has no attribute 'get_params'" + ] + } + ], + "source": [ + "import joblib\n", + "\n", + "# Load the model parameters from the file\n", + "model_file = \"model_parameters (1).joblib\"\n", + "model = joblib.load(model_file)\n", + "\n", + "# Analyze the model parameters\n", + "print(\"Model Parameters:\")\n", + "for param_name, param_value in model.get_params().items():\n", + " print(f\"{param_name}: {param_value}\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "5368fb45", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.6" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/examples/rhino-sdk/README.md b/examples/rhino-sdk/README.md index 02d18951..3dea9a05 100644 --- a/examples/rhino-sdk/README.md +++ b/examples/rhino-sdk/README.md @@ -1,9 +1,13 @@ # Rhino Health Examples - Rhino SDK -This folder contains examples for interacting with Rhino Health's Federated Computing Platform (FCP) using the Python SDK + +This folder contains examples for interacting with Rhino Health's Federated Computing Platform (FCP) using the Python SDK. + +Each notebook demonstrates how to use the SDK to authenticate your user session, select a project, and perform a variety of federated analytics or compute tasks.
# Table of Contents -- `aggregate_quantile_example.ipynb` - Demonstrate the Rhino Helath SDK's ability to calculate federated percentiles with differential privacy + +- `aggregate_quantile_example.ipynb` - Demonstrates how to calculate federated percentiles with differential privacy using the Rhino Health SDK, including interactive project and dataset selection. - `cox.ipynb` - Demostrate calculation of Cox proportional hazard with federated data - `eda.ipynb` - Demonstrate usage of the Rhino Health Python SDK for performing Exploratory Data Analysis (EDA) using federated analytics - `metrics_examples.ipynb` - Examples of calculating metrics using federated analytics, including mean, odds ratio, chi square test, t-test, one way anova, and 2x2 matrix @@ -15,4 +19,5 @@ This folder contains examples for interacting with Rhino Health's Federated Comp

# Getting Help + For additional support, please reach out to [support@rhinohealth.com](mailto:support@rhinohealth.com). diff --git a/examples/rhino-sdk/aggregate_quantile_example.ipynb b/examples/rhino-sdk/aggregate_quantile_example.ipynb index e5120f5a..88ff5fb1 100644 --- a/examples/rhino-sdk/aggregate_quantile_example.ipynb +++ b/examples/rhino-sdk/aggregate_quantile_example.ipynb @@ -47,6 +47,26 @@ "print(\"Logged In\")" ] }, + { + "cell_type": "markdown", + "id": "4d2ea28e", + "metadata": {}, + "source": [ + "### Run this cell to list all of the projects in your environment:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b2c205a7", + "metadata": {}, + "outputs": [], + "source": [ + "projects = session.project.search_for_projects_by_name(name=\"\")\n", + "for p in projects:\n", + " print(p.name)" + ] + }, { "cell_type": "markdown", "id": "ef9cf810", @@ -63,7 +83,11 @@ "metadata": {}, "outputs": [], "source": [ - "project = session.project.get_project_by_name(\"PROJECT_NAME\")" + "project = session.project.get_project_by_name(\"PROJECT_NAME\")\n", + "if not project:\n", + " raise ValueError(\"Project not found.\")\n", + "\n", + "print(\"Selected project name:\", project.name)" ] }, { @@ -71,7 +95,37 @@ "id": "f3d20b5f", "metadata": {}, "source": [ - "### Load the Datasets you would like to calculate federated percentiles for by placing the Dataset names below\n", + "### List your available datasets in your project and then load those you would like to calculate federated percentiles" + ] + }, + { + "cell_type": "markdown", + "id": "3c24ea20", + "metadata": {}, + "source": [ + "Run this cell to list all of your available datasets in your project" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4e8fdf6c", + "metadata": {}, + "outputs": [], + "source": [ + "all_datasets = session.dataset.search_for_datasets_by_name(name=\"\")\n", + "project_datasets = [d for d in all_datasets if d.project and d.project.uid == project.uid]\n", + "\n", + "print(f\"\\nDatasets in project '{project.name}':\")\n", + "for d in project_datasets:\n", + " print(f\"- {d.name}\")" + ] + }, + { + "cell_type": "markdown", + "id": "5c510924", + "metadata": {}, + "source": [ "Replace `DATASET_1` & `DATASET_2` with the name of your datasets" ] }, diff --git a/examples/rhino-sdk/cox/README.md b/examples/rhino-sdk/cox/README.md new file mode 100644 index 00000000..46d27bfa --- /dev/null +++ b/examples/rhino-sdk/cox/README.md @@ -0,0 +1,22 @@ +## This folder contains a minimal working example for computing Cox proportional hazard metrics using the Rhino SDK. + +## Files + +- `cox_sampledata1.csv` – sample dataset 1 +- `cox_sampledata2.csv` – sample dataset 2 +- `cox.ipynb` – interactive notebook demonstrating the end-to-end process + +## How to Use + +1. Upload both CSV files as datasets in your Rhino project. +2. Run the cells in `cox.ipynb` to compute and visualize the Cox regression results. +3. All column names are pre-formatted and aligned with the metric's expected input schema. + +### Both sample datasets are synthetic and contain the following columns: + +| Column | Description | +| ------- | ----------------------------------- | +| `Time` | Duration until event or censoring | +| `Event` | 1 if event occurred / 0 if censored | +| `COV1` | Age | +| `COV2` | Heart rate | diff --git a/examples/rhino-sdk/cox.ipynb b/examples/rhino-sdk/cox/cox.ipynb similarity index 68% rename from examples/rhino-sdk/cox.ipynb rename to examples/rhino-sdk/cox/cox.ipynb index cc877dd0..10ee447b 100644 --- a/examples/rhino-sdk/cox.ipynb +++ b/examples/rhino-sdk/cox/cox.ipynb @@ -47,6 +47,26 @@ "print(\"Logged In\")" ] }, + { + "cell_type": "markdown", + "id": "3e356ff1", + "metadata": {}, + "source": [ + "### Run this cell to list all of the projects in your environment:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "be154d17", + "metadata": {}, + "outputs": [], + "source": [ + "projects = session.project.search_for_projects_by_name(name=\"\")\n", + "for p in projects:\n", + " print(p.name)" + ] + }, { "cell_type": "markdown", "id": "ef9cf810", @@ -63,7 +83,42 @@ "metadata": {}, "outputs": [], "source": [ - "project = session.project.get_project_by_name(\"PROJECT_NAME\")" + "project = session.project.get_project_by_name(\"PROJECT_NAME\")\n", + "if not project:\n", + " raise ValueError(\"Project not found.\")\n", + "\n", + "print(\"Selected project name:\", project.name)" + ] + }, + { + "cell_type": "markdown", + "id": "79293714", + "metadata": {}, + "source": [ + "### List your available datasets in your project and then load those you would like to calculate federated percentiles" + ] + }, + { + "cell_type": "markdown", + "id": "da386545", + "metadata": {}, + "source": [ + "Run this cell to list all of your available datasets in your project" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a2c6dc75", + "metadata": {}, + "outputs": [], + "source": [ + "all_datasets = session.dataset.search_for_datasets_by_name(name=\"\")\n", + "project_datasets = [d for d in all_datasets if d.project and d.project.uid == project.uid]\n", + "\n", + "print(f\"\\nDatasets in project '{project.name}':\")\n", + "for d in project_datasets:\n", + " print(f\"- {d.name}\")" ] }, { @@ -111,6 +166,18 @@ "})" ] }, + { + "cell_type": "markdown", + "id": "bae5e06b", + "metadata": {}, + "source": [ + "`Time`: The time-to-event or censoring,\n", + "\n", + "`Event`: The event indicator (1 if the event occurred, 0 if censored),\n", + "\n", + "`COV1` and `COV2`: are the Covariates that may influence the time-to-event." + ] + }, { "cell_type": "code", "execution_count": null, @@ -133,7 +200,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "Python 3", "language": "python", "name": "python3" }, @@ -146,7 +213,8 @@ "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3" + "pygments_lexer": "ipython3", + "version": "3.11.6" } }, "nbformat": 4, diff --git a/examples/rhino-sdk/cox/cox_sampledata1.csv b/examples/rhino-sdk/cox/cox_sampledata1.csv new file mode 100644 index 00000000..9129ec4b --- /dev/null +++ b/examples/rhino-sdk/cox/cox_sampledata1.csv @@ -0,0 +1,21 @@ +Time,Event,COV1,COV2 +56,1,76,85 +97,1,80,103 +19,0,73,93 +76,0,84,69 +65,1,81,95 +25,1,86,73 +87,1,32,90 +91,0,66,107 +79,1,80,74 +79,0,36,67 +92,0,50,73 +28,0,38,82 +7,0,68,119 +26,0,47,116 +57,1,33,99 +6,1,54,80 +92,1,89,75 +34,1,43,104 +42,1,79,77 +6,0,87,106 \ No newline at end of file diff --git a/examples/rhino-sdk/cox/cox_sampledata2.csv b/examples/rhino-sdk/cox/cox_sampledata2.csv new file mode 100644 index 00000000..5b6b8797 --- /dev/null +++ b/examples/rhino-sdk/cox/cox_sampledata2.csv @@ -0,0 +1,21 @@ +Time,Event,COV1,COV2 +67,0,83,83 +99,1,67,111 +87,1,72,98 +99,1,58,71 +81,0,61,63 +72,0,82,119 +88,1,61,90 +17,1,39,64 +37,1,35,87 +27,1,51,106 +15,1,82,60 +83,0,58,96 +45,1,47,117 +28,0,85,72 +89,0,67,81 +21,0,82,101 +69,0,86,110 +8,0,37,60 +30,1,68,60 +22,1,70,73 \ No newline at end of file diff --git a/examples/rhino-sdk/eda.ipynb b/examples/rhino-sdk/eda.ipynb index b19f0b15..d42b9734 100644 --- a/examples/rhino-sdk/eda.ipynb +++ b/examples/rhino-sdk/eda.ipynb @@ -28,7 +28,7 @@ "outputs": [], "source": [ "from getpass import getpass\n", - "import rhino_health" + "import rhino_health as rh" ] }, { @@ -44,6 +44,80 @@ "print(\"Logged In\")" ] }, + { + "cell_type": "markdown", + "id": "8081822f", + "metadata": {}, + "source": [ + "### Run this cell to list all of the projects in your environment:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3e5a1af0", + "metadata": {}, + "outputs": [], + "source": [ + "projects = session.project.search_for_projects_by_name(name=\"\")\n", + "for p in projects:\n", + " print(p.name)" + ] + }, + { + "cell_type": "markdown", + "id": "c10c0fea", + "metadata": {}, + "source": [ + "### Load the Project you would like to calculate the metric for by placing the Project's name below\n", + "Replace `PROJECT_NAME` with the name of your project" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b91bff14", + "metadata": {}, + "outputs": [], + "source": [ + "project = session.project.get_project_by_name(\"PROJECT_NAME\")\n", + "if not project:\n", + " raise ValueError(\"Project not found.\")\n", + "\n", + "print(\"Selected project name:\", project.name)" + ] + }, + { + "cell_type": "markdown", + "id": "d689f6df", + "metadata": {}, + "source": [ + "### List your available datasets in your project and then load those you would like to calculate federated percentiles" + ] + }, + { + "cell_type": "markdown", + "id": "97663b1a", + "metadata": {}, + "source": [ + "Run this cell to list all of your available datasets in your project" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d32c6d82", + "metadata": {}, + "outputs": [], + "source": [ + "all_datasets = session.dataset.search_for_datasets_by_name(name=\"\")\n", + "project_datasets = [d for d in all_datasets if d.project and d.project.uid == project.uid]\n", + "\n", + "print(f\"\\nDatasets in project '{project.name}':\")\n", + "for d in project_datasets:\n", + " print(f\"- {d.name} : {d.uid}\")" + ] + }, { "cell_type": "code", "execution_count": null, @@ -51,10 +125,10 @@ "metadata": {}, "outputs": [], "source": [ - "FIRST_TEST_DATASET_ID = \"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\" # Replace this\n", - "SECOND_TEST_DATASET_ID = \"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\" # Replace this\n", - "first_dataset = session.dataset.get_dataset(FIRST_TEST_DATASET_ID)\n", - "second_dataset = session.dataset.get_dataset(SECOND_TEST_DATASET_ID)\n", + "FIRST_TEST_DATASET_UID = \"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\" # Replace this with the ID of the first test dataset\n", + "SECOND_TEST_DATASET_UID = \"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\" # Replace this with the ID of the second test dataset\n", + "first_dataset = session.dataset.get_dataset(FIRST_TEST_DATASET_UID)\n", + "second_dataset = session.dataset.get_dataset(SECOND_TEST_DATASET_UID)\n", "all_datasets = [first_dataset.uid, second_dataset.uid]" ] }, @@ -146,8 +220,6 @@ "metadata": {}, "outputs": [], "source": [ - "print(\"Grouped Height mean per site\")\n", - "\n", "mean_verification = Mean(\n", " variable=\"Height\",\n", " group_by={\"groupings\": [\"Gender\"]},\n", @@ -166,30 +238,57 @@ "metadata": {}, "source": [ "### Calculate Aggregated Metrics Across Multiple Sites\n", - "Similarly - all calculations are performed on-prem - only aggregate data returned to the notebook" + "Similarly - all calculations are performed on-prem - only aggregate data returned to the notebook.\n", + "\n", + "This ensures data privacy is preserved at each site while enabling secure federated analysis.\n" + ] + }, + { + "cell_type": "markdown", + "id": "1523904e", + "metadata": {}, + "source": [ + "#### Aggregate Grouped Height Mean" ] }, { "cell_type": "code", "execution_count": null, - "id": "3b3a7446", + "id": "abca0901", "metadata": {}, "outputs": [], "source": [ - "print(\"Aggregate Grouped Height mean\")\n", - "grouped_results = session.project.aggregate_dataset_metric(all_datasets, mean_verification)\n", + "print(\"Aggregate Grouped Height Mean:\")\n", + "\n", + "mean_verification = Mean(\n", + " variable=\"Height\",\n", + " group_by={\"groupings\": [\"Gender\"]}\n", + ")\n", + "\n", + "grouped_results = session.project.aggregate_dataset_metric(\n", + " dataset_uids=[str(first_dataset.uid), str(second_dataset.uid)],\n", + " metric_configuration=mean_verification\n", + ")\n", "\n", "print(f\"{grouped_results.output}\")" ] }, + { + "cell_type": "markdown", + "id": "8c447e40", + "metadata": {}, + "source": [ + "#### Complex Aggregation (Filter + Grouping)" + ] + }, { "cell_type": "code", "execution_count": null, - "id": "0ff603ac", + "id": "daf5cc04", "metadata": {}, "outputs": [], "source": [ - "print(\"Complex Aggregation\")\n", + "print(\"Complex Aggregation (Filtered and Grouped):\")\n", "\n", "configuration = Mean(\n", " variable={\n", @@ -201,18 +300,30 @@ " group_by={\"groupings\": [\"Gender\"]}\n", ")\n", "\n", - "grouped_results = session.project.aggregate_dataset_metric(all_datasets, configuration)\n", - "print(f\"{grouped_results.output}\")\n" + "grouped_results = session.project.aggregate_dataset_metric(\n", + " dataset_uids=[str(first_dataset.uid), str(second_dataset.uid)],\n", + " metric_configuration=configuration\n", + ")\n", + "\n", + "print(f\"{grouped_results.output}\")" + ] + }, + { + "cell_type": "markdown", + "id": "ecff141d", + "metadata": {}, + "source": [ + "#### Complex Aggregation with Complex Filtering" ] }, { "cell_type": "code", "execution_count": null, - "id": "4178271b", + "id": "75ac907d", "metadata": {}, "outputs": [], "source": [ - "print(\"Complex Aggregation with Complex Filtering\")\n", + "print(\"Complex Aggregation with Complex Filtering:\")\n", "\n", "configuration = Mean(\n", " variable={\n", @@ -227,33 +338,45 @@ " group_by={\"groupings\": [\"Gender\"]}\n", ")\n", "\n", - "grouped_results = session.project.aggregate_dataset_metric(all_datasets, configuration)\n", + "grouped_results = session.project.aggregate_dataset_metric(\n", + " dataset_uids=[str(first_dataset.uid), str(second_dataset.uid)],\n", + " metric_configuration=configuration\n", + ")\n", + "\n", "print(f\"{grouped_results.output}\")" ] }, + { + "cell_type": "markdown", + "id": "80fef651", + "metadata": {}, + "source": [ + "#### Standard Deviation of Height (Per Site, Not Federated)" + ] + }, { "cell_type": "code", "execution_count": null, - "id": "f0b5387e", + "id": "1e9f2c18", "metadata": {}, "outputs": [], "source": [ - "print(\"Standard Deviation of Height\")\n", + "print(\"Standard Deviation of Height (per site, not aggregated):\")\n", + "\n", + "configuration = StandardDeviation(variable=\"Height\")\n", "\n", - "configuration = StandardDeviation(\n", - " variable=\"Height\"\n", - ")\n", "individual_results = {\n", " \"site1\": session.dataset.get_dataset_metric(first_dataset.uid, configuration).output,\n", " \"site2\": session.dataset.get_dataset_metric(second_dataset.uid, configuration).output,\n", "}\n", + "\n", "print(f\"{individual_results}\")" ] } ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "Python 3", "language": "python", "name": "python3" }, @@ -267,7 +390,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.4" + "version": "3.11.6" } }, "nbformat": 4, diff --git a/examples/rhino-sdk/metrics_examples.ipynb b/examples/rhino-sdk/metrics_examples/metrics_examples.ipynb similarity index 100% rename from examples/rhino-sdk/metrics_examples.ipynb rename to examples/rhino-sdk/metrics_examples/metrics_examples.ipynb diff --git a/examples/rhino-sdk/metrics_examples/metrics_sample_dataset1.csv b/examples/rhino-sdk/metrics_examples/metrics_sample_dataset1.csv new file mode 100644 index 00000000..e72c0718 --- /dev/null +++ b/examples/rhino-sdk/metrics_examples/metrics_sample_dataset1.csv @@ -0,0 +1,27 @@ +Weight,Pneumonia,Smoking,Inflammation Level,Sp02 Level +84.0,True,False,Low,0.3 +97.0,True,True,Medium,0.51 +91.0,True,False,Medium,0.12 +90.0,False,False,High,0.03 +124.0,False,True,High,0.413 +97.0,True,True,High,0.3 +84.0,True,False,Low,0.3 +97.0,True,True,Medium,0.51 +91.0,True,False,Medium,0.12 +90.0,False,False,High,0.03 +124.0,False,True,High,0.413 +97.0,True,True,High,0.3 +84.0,True,False,Low,0.3 +97.0,True,True,Medium,0.51 +91.0,True,False,Medium,0.12 +90.0,False,False,High,0.03 +124.0,False,True,High,0.413 +97.0,True,True,High,0.3 +84.0,True,False,Low,0.3 +97.0,True,True,Medium,0.51 +91.0,True,False,Medium,0.12 +90.0,False,False,High,0.03 +124.0,False,True,High,0.413 +97.0,True,True,High,0.3 +84.0,True,False,Low,0.3 +97.0,True,True,Medium,0.51 diff --git a/examples/rhino-sdk/metrics_examples/metrics_sample_dataset2.csv b/examples/rhino-sdk/metrics_examples/metrics_sample_dataset2.csv new file mode 100644 index 00000000..33e5dcc9 --- /dev/null +++ b/examples/rhino-sdk/metrics_examples/metrics_sample_dataset2.csv @@ -0,0 +1,30 @@ +Weight,Pneumonia,Smoking,Inflammation Level,Sp02 Level +84.0,True,False,Low,0.3 +97.0,True,True,Medium,0.51 +91.0,True,False,Medium,0.12 +90.0,False,False,High,0.03 +124.0,False,True,High,0.413 +97.0,True,True,High,0.3 +84.0,True,False,Low,0.3 +97.0,True,True,Medium,0.51 +91.0,True,False,Medium,0.12 +90.0,False,False,High,0.03 +124.0,False,True,High,0.413 +97.0,True,True,High,0.3 +84.0,True,False,Low,0.3 +97.0,True,True,Medium,0.51 +91.0,True,False,Medium,0.12 +90.0,False,False,High,0.03 +124.0,False,True,High,0.413 +97.0,True,True,High,0.3 +84.0,True,False,Low,0.3 +97.0,True,True,Medium,0.51 +91.0,True,False,Medium,0.12 +90.0,False,False,High,0.03 +124.0,False,True,High,0.413 +97.0,True,True,High,0.3 +84.0,True,False,Low,0.3 +97.0,True,True,Medium,0.51 +91.0,True,False,Medium,0.12 +90.0,False,False,High,0.03 +124.0,False,True,High,0.413 diff --git a/examples/rhino-sdk/sql-data-ingestion.ipynb b/examples/rhino-sdk/sql-data-ingestion.ipynb index 8dc99b49..073c4d5d 100644 --- a/examples/rhino-sdk/sql-data-ingestion.ipynb +++ b/examples/rhino-sdk/sql-data-ingestion.ipynb @@ -24,7 +24,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 7, "id": "f9e3e349", "metadata": {}, "outputs": [], @@ -39,19 +39,30 @@ " SQLServerTypes,\n", " ConnectionDetails,\n", ")\n", - "from rhino_health.lib.metrics import Count, FilterType, Mean, StandardDeviation" + "from rhino_health.lib.constants import ApiEnvironment\n", + "\n", + "from rhino_health.lib.metrics import Count, FilterType, Mean, StandardDeviation\n" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 8, "id": "3b107de9", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Logging In\n", + "Logged In\n" + ] + } + ], "source": [ "print(\"Logging In\")\n", - "my_username = \"my_email@example.com\" # Replace this with the email you use to log into Rhino Health\n", - "session = rh.login(username=my_username, password=getpass())\n", + "my_username = \"daniel.david@rhinohealth.com\" # Replace this with the email you use to log into Rhino Health\n", + "session = rh.login(username=my_username, password=getpass(),rhino_api_url= ApiEnvironment.STAGING_AWS_URL)\n", "print(\"Logged In\")" ] }, @@ -283,7 +294,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "Python 3", "language": "python", "name": "python3" }, @@ -297,7 +308,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.4" + "version": "3.11.6" } }, "nbformat": 4,