{"id":22504950,"url":"https://github.com/bcbi/modelsanitizer.jl","last_synced_at":"2026-02-02T09:43:14.856Z","repository":{"id":61798781,"uuid":"197992449","full_name":"bcbi/ModelSanitizer.jl","owner":"bcbi","description":"Remove potentially sensitive data from trained machine learning models","archived":false,"fork":false,"pushed_at":"2020-02-09T00:21:31.000Z","size":305,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-28T01:12:37.619Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bcbi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-20T23:50:38.000Z","updated_at":"2020-12-26T00:32:16.000Z","dependencies_parsed_at":"2022-10-21T11:15:31.886Z","dependency_job_id":null,"html_url":"https://github.com/bcbi/ModelSanitizer.jl","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/bcbi/ModelSanitizer.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcbi%2FModelSanitizer.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcbi%2FModelSanitizer.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcbi%2FModelSanitizer.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcbi%2FModelSanitizer.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bcbi","download_url":"https://codeload.github.com/bcbi/ModelSanitizer.jl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcbi%2FModelSanitizer.jl/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264353087,"owners_count":23595031,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-07T00:12:09.346Z","updated_at":"2026-02-02T09:43:14.805Z","avatar_url":"https://github.com/bcbi.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ModelSanitizer\n\n\u003cp\u003e\n\u003ca\nhref=\"https://doi.org/10.5281/zenodo.3361518\"\u003e\n\u003cimg\nsrc=\"https://zenodo.org/badge/DOI/10.5281/zenodo.3361518.svg\"\nalt=\"DOI\"\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp\u003e\n\u003ca\nhref=\"https://app.bors.tech/repositories/19368\"\u003e\n\u003cimg\nsrc=\"https://bors.tech/images/badge_small.svg\"\nalt=\"Bors enabled\"\u003e\n\u003c/a\u003e\n\u003ca\nhref=\"https://travis-ci.com/bcbi/ModelSanitizer.jl/branches\"\u003e\n\u003cimg\nsrc=\"https://travis-ci.com/bcbi/ModelSanitizer.jl.svg?branch=master\"\u003e\n\u003c/a\u003e\n\u003ca\nhref=\"https://codecov.io/gh/bcbi/ModelSanitizer.jl\"\u003e\n\u003cimg\nsrc=\"https://codecov.io/gh/bcbi/ModelSanitizer.jl/branch/master/graph/badge.svg\"\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n## Usage\n\nModelSanitizer exports the `sanitize!` function and the `Model`, `Data`, and\n`ForceSanitize` structs.\n\nIf your model is stored in `m` and your data are stored in `x1`,\n`x2`, `x3`, etc. then you can sanitize your model with:\n```julia\nsanitize!(Model(m), Data(x1), Data(x2), Data(x3), ...)\n```\n\nThis will recursively search inside the model `m` for anything that resembles\nyour data and will delete the data that it finds.\n\nIf you happen to know exactly where inside a model the data are stored, you\ncan explicitly tell ModelSanitizer to delete those data. If your model is\nstored in `m`, and you know that the fields `m.x1`, `m.x2`, `m.x3`, etc. contain\ndata that needs to be removed, you can force ModelSanitizer to delete those\ndata with:\n```julia\nsanitize!(ForceSanitize(m.x1), ForceSanitize(m.x2), ForceSanitize(m.x3), ...)\n```\n\n## Example\n\n```julia\njulia\u003e using ModelSanitizer\n\njulia\u003e using Statistics\n\njulia\u003e using Test\n\njulia\u003e mutable struct LinearModel{T}\n           X::Matrix{T}\n           y::Vector{T}\n           beta::Vector{T}\n           function LinearModel{T}()::LinearModel{T} where T\n               m::LinearModel{T} = new()\n               return m\n           end\n       end\n\njulia\u003e function fit!(m::LinearModel{T}, X::Matrix{T}, y::Vector{T})::LinearModel{T} where T\n           m.X = deepcopy(X)\n           m.y = deepcopy(y)\n           m.beta = beta = (m.X'm.X)\\(m.X'm.y)\n           return m\n       end\nfit! (generic function with 1 method)\n\njulia\u003e function predict(m::LinearModel{T}, X::Matrix{T})::Vector{T} where T\n           y_hat::Vector{T} = X * m.beta\n           return y_hat\n       end\npredict (generic function with 1 method)\n\njulia\u003e function predict(m::LinearModel{T})::Vector{T} where T\n           X::Matrix{T} = m.X\n           y_hat::Vector{T} = predict(m, X)\n           return y_hat\n       end\npredict (generic function with 2 methods)\n\njulia\u003e function mse(y::Vector{T}, y_hat::Vector{T})::T where T\n           _mse::T = mean((y .- y_hat).^2)\n           return _mse\n       end\nmse (generic function with 1 method)\n\njulia\u003e function mse(m::LinearModel{T}, X::Matrix{T}, y::Vector{T})::T where T\n           y_hat::Vector{T} = predict(m, X)\n           _mse::T = mse(y, y_hat)\n           return _mse\n       end\nmse (generic function with 2 methods)\n\njulia\u003e function mse(m::LinearModel{T})::T where T\n           X::Matrix{T} = m.X\n           y::Vector{T} = m.y\n           _mse::T = mse(m, X, y)\n           return _mse\n       end\nmse (generic function with 3 methods)\n\njulia\u003e rmse(varargs...) = sqrt(mse(varargs...))\nrmse (generic function with 1 method)\n\njulia\u003e function r2(y::Vector{T}, y_hat::Vector{T})::T where T\n           y_bar::T = mean(y)\n           SS_tot::T = sum((y .- y_bar).^2)\n           SS_res::T = sum((y .- y_hat).^2)\n           _r2::T = 1 - SS_res/SS_tot\n           return _r2\n       end\nr2 (generic function with 1 method)\n\njulia\u003e function r2(m::LinearModel{T}, X::Matrix{T}, y::Vector{T})::T where T\n           y_hat::Vector{T} = predict(m, X)\n           _r2::T = r2(y, y_hat)\n           return _r2\n       end\nr2 (generic function with 2 methods)\n\njulia\u003e function r2(m::LinearModel{T})::T where T\n           X::Matrix{T} = m.X\n           y::Vector{T} = m.y\n           _r2::T = r2(m, X, y)\n           return _r2\n       end\nr2 (generic function with 3 methods)\n\njulia\u003e X = randn(Float64, 5_000, 14)\n5000×14 Array{Float64,2}:\n  0.0956436    0.481324   -0.796437  …  -2.26483     1.57243    -1.65105\n -0.306527    -0.880146   -0.764714     -0.182449   -0.0767462  -0.939232\n -0.223116    -0.408068    0.728855      0.220045    0.785533    0.49013\n -0.336363     1.46187    -1.17633      -0.955872    0.699277    0.587961\n  0.628275     0.208697   -0.522714      0.116233    0.47314     0.435968\n -0.12303     -0.964061    0.919518  …  -0.0230613  -1.12379    -0.439892\n  1.06664      0.96542    -0.250164     -0.776266    1.70851    -1.08608\n  0.957151     0.850486    1.31718       0.497219    1.01069    -0.558217\n -0.206168    -0.608305   -0.864631      0.969031    0.209796    1.28718\n -0.658039     1.20687     1.33288       1.54847     0.546286   -1.00404\n -0.598782    -0.193289    0.673134  …  -1.59742     0.410881   -1.61342\n  0.31442      0.0199012   0.50533       1.0889     -0.0713841  -1.29933\n  0.236585    -1.09804     0.945631     -0.729247   -1.10004    -0.339332\n  0.122913     0.619345   -2.90947       1.09613    -0.662693   -1.03469\n  1.52615      0.942471    0.262139      0.223064    0.665103    1.4081\n -0.474543     1.9466     -0.408505  …   1.01626    -0.297397   -0.0953909\n  0.73664     -0.0796424  -1.84864       1.15935     0.0164378   1.32191\n  0.24588      0.271068   -0.238212      0.596475    1.52617    -0.747777\n  ⋮                                  ⋱\n -1.07141      0.194049   -0.350011     -0.666195    0.481406   -0.451329\n -0.00993413   0.33006    -0.985443     -0.0395822   2.36983    -0.793007\n  0.610014    -0.509744   -1.06447   …   1.19769     1.129       0.397217\n  0.785654    -0.361031    0.314127      0.192215    0.789262    0.725731\n  0.258588    -2.06379     0.511611      0.0963516  -1.01919    -0.540021\n  0.48671     -0.918205    0.264124      0.989929    2.45245    -1.39545\n -1.27085     -0.0617834   2.59491       0.291602    1.28642     0.236496\n  1.4044      -1.24472    -0.205029  …   1.99366    -1.58951     0.963728\n -1.07691      0.44178    -0.602841      0.584759   -0.887116    1.36514\n  1.13586      0.954756    0.44016      -2.21191    -1.14086    -0.585916\n -0.763031    -1.13348    -1.46696      -1.4121     -0.977694   -0.618883\n  0.875367    -1.30925     0.183117      0.224709    0.0752964  -0.92173\n  0.659502     0.71971    -1.05538   …  -0.912277   -0.736332    1.01404\n -0.809941     2.02362     1.29668       0.113623   -0.858281    0.0863472\n -1.6409       0.310551   -0.235102     -1.11232    -0.170224    0.404804\n -0.367908    -1.9062      0.245953     -0.751821   -0.794633    0.00894607\n  0.380897     2.30871    -0.669909      0.282513   -0.114725   -0.253537\n\njulia\u003e y = X * randn(Float64, 14) + randn(5_000)\n5000-element Array{Float64,1}:\n -4.418867382994752\n  1.0721553534178543\n  2.210545604666476\n -2.5053994409702094\n  2.24399399066432\n  0.5993702994926247\n  2.2040361967638322\n -2.4902628750358193\n  4.184644001244288\n  1.7688752332135804\n -4.831550352023476\n -1.068149084362266\n -0.746260929030723\n  0.032933800577055417\n  2.878202216460962\n  2.773804353610833\n  1.0288912118472482\n  3.7799578982964963\n  ⋮\n  3.1797791441997822\n  5.830717537973503\n -0.8191545280972992\n  4.649281267724443\n  0.9470989605451162\n  5.733118456044454\n  3.057352206232011\n  4.791267454465988\n -4.604222639675081\n -5.755448165821573\n -0.9804279159155482\n  2.2904285226467276\n  2.809999802793834\n  0.7773010780323945\n -2.5205742651574\n  3.8866539005621092\n -4.085889556008112\n\njulia\u003e m = LinearModel{Float64}()\nLinearModel{Float64}(#undef, #undef, #undef)\n\njulia\u003e testing_rows = 1:2:5_000\n1:2:4999\n\njulia\u003e training_rows = setdiff(1:5_000, testing_rows)\n2500-element Array{Int64,1}:\n    2\n    4\n    6\n    8\n   10\n   12\n   14\n   16\n   18\n   20\n   22\n   24\n   26\n   28\n   30\n   32\n   34\n   36\n    ⋮\n 4968\n 4970\n 4972\n 4974\n 4976\n 4978\n 4980\n 4982\n 4984\n 4986\n 4988\n 4990\n 4992\n 4994\n 4996\n 4998\n 5000\n\njulia\u003e fit!(m, X[training_rows, :], y[training_rows])\nLinearModel{Float64}([-0.306527 -0.880146 … -0.0767462 -0.939232; -0.336363 1.46187 … 0.699277 0.587961; … ; -1.6409 0.310551 … -0.170224 0.404804; 0.380897 2.30871 … -0.114725 -0.253537], [1.07216, -2.5054, 0.59937, -2.49026, 1.76888, -1.06815, 0.0329338, 2.7738, 3.77996, -4.06727  …  2.81088, 3.17978, -0.819155, 0.947099, 3.05735, -4.60422, -0.980428, 2.81, -2.52057, -4.08589], [-0.532213, -1.16489, -0.414974, -0.562536, -0.440432, 0.732505, -1.06754, 0.399485, -0.67281, -1.44599, 0.835625, 0.426459, 1.20088, 0.754435])\n\njulia\u003e @test m.X == X[training_rows, :]\nTest Passed\n\njulia\u003e @test m.y == y[training_rows]\nTest Passed\n\njulia\u003e @test all(m.X .== X[training_rows, :])\nTest Passed\n\njulia\u003e @test all(m.y .== y[training_rows])\nTest Passed\n\njulia\u003e @test !all(m.X .== 0)\nTest Passed\n\njulia\u003e @test !all(m.y .== 0)\nTest Passed\n\njulia\u003e # before sanitization, we can make predictions\n       predict(m, X[testing_rows, :])\n2500-element Array{Float64,1}:\n -4.513253714187381\n  2.5689035333536605\n  0.9939782906365846\n  1.2513894159362184\n  3.2007086601687353\n -5.387968774216589\n -0.1767892797746935\n  3.4408813711668165\n  0.4625821018811823\n  1.649129884116436\n -0.8620887900500149\n  0.6504970487658756\n  4.287913533796443\n -2.5014166099065136\n  1.1666979326633855\n  0.2723098985354143\n  3.2783930370766634\n  2.250636815003683\n  ⋮\n  1.1999638265752477\n  3.8377489399901084\n  4.2805489451765935\n -0.5849048693472063\n -0.6574890049656816\n  0.2606368302418087\n -4.197310605534758\n -3.5805273324146336\n -0.5244747588662737\n  5.274904154193373\n  2.7742388165636953\n  5.883741172337488\n  2.118699747786167\n -4.209943069147431\n  2.262361580682631\n -0.5044151513387216\n  4.443422779093501\n\njulia\u003e predict(m, X[training_rows, :])\n2500-element Array{Float64,1}:\n  2.943212508610099\n -0.8226863248850258\n  1.031068845178503\n -3.3178919274576053\n  0.587046578244962\n -0.032251634503744686\n  1.9123819046207888\n  3.555603804394087\n  2.1728937544760307\n -1.9319447549669504\n -0.7592148524301295\n -7.250437603426189\n  4.982277986708986\n -1.8660967909674548\n  0.29423182806971415\n  0.593840341165224\n -0.26314562641917977\n  1.4340414682799685\n  ⋮\n  1.6038174714835796\n  1.3091787016871341\n  4.936123830680592\n  1.9812183495287048\n -0.848632475032059\n  3.1553721781769157\n -5.412240178264108\n  1.406559298117795\n  3.6433312336276646\n  0.3408165307792135\n  0.2882242203753349\n  1.8120206189755343\n -3.299798877655878\n -0.8793971451160698\n  2.3158119962568886\n -2.4598360012327265\n -4.810128269819875\n\njulia\u003e @show mse(m, X[training_rows, :], y[training_rows])\nmse(m, X[training_rows, :], y[training_rows]) = 0.9856973993855034\n0.9856973993855034\n\njulia\u003e @show rmse(m, X[training_rows, :], y[training_rows])\nrmse(m, X[training_rows, :], y[training_rows]) = 0.9928229446308658\n0.9928229446308658\n\njulia\u003e @show r2(m, X[training_rows, :], y[training_rows])\nr2(m, X[training_rows, :], y[training_rows]) = 0.9044357103305194\n0.9044357103305194\n\njulia\u003e @show mse(m, X[testing_rows, :], y[testing_rows])\nmse(m, X[testing_rows, :], y[testing_rows]) = 0.9480778102674918\n0.9480778102674918\n\njulia\u003e @show rmse(m, X[testing_rows, :], y[testing_rows])\nrmse(m, X[testing_rows, :], y[testing_rows]) = 0.9736928726592856\n0.9736928726592856\n\njulia\u003e @show r2(m, X[testing_rows, :], y[testing_rows])\nr2(m, X[testing_rows, :], y[testing_rows]) = 0.9088387716983182\n0.9088387716983182\n\njulia\u003e sanitize!(Model(m), Data(X), Data(y)) # sanitize the model with ModelSanitizer\nModel{LinearModel{Float64}}(LinearModel{Float64}([0.0 0.0 … 0.0 0.0; 0.0 0.0 … 0.0 0.0; … ; 0.0 0.0 … 0.0 0.0; 0.0 0.0 … 0.0 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0  …  0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [-0.532213, -1.16489, -0.414974, -0.562536, -0.440432, 0.732505, -1.06754, 0.399485, -0.67281, -1.44599, 0.835625, 0.426459, 1.20088, 0.754435]))\n\njulia\u003e @test m.X != X[training_rows, :]\nTest Passed\n\njulia\u003e @test m.y != y[training_rows]\nTest Passed\n\njulia\u003e @test !all(m.X .== X[training_rows, :])\nTest Passed\n\njulia\u003e @test !all(m.y .== y[training_rows])\nTest Passed\n\njulia\u003e @test all(m.X .== 0)\nTest Passed\n\njulia\u003e @test all(m.y .== 0)\nTest Passed\n\njulia\u003e # after sanitization, we are still able to make predictions\n       predict(m, X[testing_rows, :])\n2500-element Array{Float64,1}:\n -4.513253714187381\n  2.5689035333536605\n  0.9939782906365846\n  1.2513894159362184\n  3.2007086601687353\n -5.387968774216589\n -0.1767892797746935\n  3.4408813711668165\n  0.4625821018811823\n  1.649129884116436\n -0.8620887900500149\n  0.6504970487658756\n  4.287913533796443\n -2.5014166099065136\n  1.1666979326633855\n  0.2723098985354143\n  3.2783930370766634\n  2.250636815003683\n  ⋮\n  1.1999638265752477\n  3.8377489399901084\n  4.2805489451765935\n -0.5849048693472063\n -0.6574890049656816\n  0.2606368302418087\n -4.197310605534758\n -3.5805273324146336\n -0.5244747588662737\n  5.274904154193373\n  2.7742388165636953\n  5.883741172337488\n  2.118699747786167\n -4.209943069147431\n  2.262361580682631\n -0.5044151513387216\n  4.443422779093501\n\njulia\u003e predict(m, X[training_rows, :])\n2500-element Array{Float64,1}:\n  2.943212508610099\n -0.8226863248850258\n  1.031068845178503\n -3.3178919274576053\n  0.587046578244962\n -0.032251634503744686\n  1.9123819046207888\n  3.555603804394087\n  2.1728937544760307\n -1.9319447549669504\n -0.7592148524301295\n -7.250437603426189\n  4.982277986708986\n -1.8660967909674548\n  0.29423182806971415\n  0.593840341165224\n -0.26314562641917977\n  1.4340414682799685\n  ⋮\n  1.6038174714835796\n  1.3091787016871341\n  4.936123830680592\n  1.9812183495287048\n -0.848632475032059\n  3.1553721781769157\n -5.412240178264108\n  1.406559298117795\n  3.6433312336276646\n  0.3408165307792135\n  0.2882242203753349\n  1.8120206189755343\n -3.299798877655878\n -0.8793971451160698\n  2.3158119962568886\n -2.4598360012327265\n -4.810128269819875\n\njulia\u003e @show mse(m, X[training_rows, :], y[training_rows])\nmse(m, X[training_rows, :], y[training_rows]) = 0.9856973993855034\n0.9856973993855034\n\njulia\u003e @show rmse(m, X[training_rows, :], y[training_rows])\nrmse(m, X[training_rows, :], y[training_rows]) = 0.9928229446308658\n0.9928229446308658\n\njulia\u003e @show r2(m, X[training_rows, :], y[training_rows])\nr2(m, X[training_rows, :], y[training_rows]) = 0.9044357103305194\n0.9044357103305194\n\njulia\u003e @show mse(m, X[testing_rows, :], y[testing_rows])\nmse(m, X[testing_rows, :], y[testing_rows]) = 0.9480778102674918\n0.9480778102674918\n\njulia\u003e @show rmse(m, X[testing_rows, :], y[testing_rows])\nrmse(m, X[testing_rows, :], y[testing_rows]) = 0.9736928726592856\n0.9736928726592856\n\njulia\u003e @show r2(m, X[testing_rows, :], y[testing_rows])\nr2(m, X[testing_rows, :], y[testing_rows]) = 0.9088387716983182\n0.9088387716983182\n\njulia\u003e # if you know exactly where the data are stored inside the model, you can\n       # directly delete them with ForceSanitize:\n       sanitize!(ForceSanitize(m.X), ForceSanitize(m.y))\n(ForceSanitize{Array{Float64,2}}([0.0 0.0 … 0.0 0.0; 0.0 0.0 … 0.0 0.0; … ; 0.0 0.0 … 0.0 0.0; 0.0 0.0 … 0.0 0.0]), ForceSanitize{Array{Float64,1}}([0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0  …  0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]))\n\njulia\u003e # we can still make predictions even after using ForceSanitize\n       predict(m, X[testing_rows, :])\n2500-element Array{Float64,1}:\n -4.513253714187381\n  2.5689035333536605\n  0.9939782906365846\n  1.2513894159362184\n  3.2007086601687353\n -5.387968774216589\n -0.1767892797746935\n  3.4408813711668165\n  0.4625821018811823\n  1.649129884116436\n -0.8620887900500149\n  0.6504970487658756\n  4.287913533796443\n -2.5014166099065136\n  1.1666979326633855\n  0.2723098985354143\n  3.2783930370766634\n  2.250636815003683\n  ⋮\n  1.1999638265752477\n  3.8377489399901084\n  4.2805489451765935\n -0.5849048693472063\n -0.6574890049656816\n  0.2606368302418087\n -4.197310605534758\n -3.5805273324146336\n -0.5244747588662737\n  5.274904154193373\n  2.7742388165636953\n  5.883741172337488\n  2.118699747786167\n -4.209943069147431\n  2.262361580682631\n -0.5044151513387216\n  4.443422779093501\n\njulia\u003e predict(m, X[training_rows, :])\n2500-element Array{Float64,1}:\n  2.943212508610099\n -0.8226863248850258\n  1.031068845178503\n -3.3178919274576053\n  0.587046578244962\n -0.032251634503744686\n  1.9123819046207888\n  3.555603804394087\n  2.1728937544760307\n -1.9319447549669504\n -0.7592148524301295\n -7.250437603426189\n  4.982277986708986\n -1.8660967909674548\n  0.29423182806971415\n  0.593840341165224\n -0.26314562641917977\n  1.4340414682799685\n  ⋮\n  1.6038174714835796\n  1.3091787016871341\n  4.936123830680592\n  1.9812183495287048\n -0.848632475032059\n  3.1553721781769157\n -5.412240178264108\n  1.406559298117795\n  3.6433312336276646\n  0.3408165307792135\n  0.2882242203753349\n  1.8120206189755343\n -3.299798877655878\n -0.8793971451160698\n  2.3158119962568886\n -2.4598360012327265\n -4.810128269819875\n\njulia\u003e @show mse(m, X[training_rows, :], y[training_rows])\nmse(m, X[training_rows, :], y[training_rows]) = 0.9856973993855034\n0.9856973993855034\n\njulia\u003e @show rmse(m, X[training_rows, :], y[training_rows])\nrmse(m, X[training_rows, :], y[training_rows]) = 0.9928229446308658\n0.9928229446308658\n\njulia\u003e @show r2(m, X[training_rows, :], y[training_rows])\nr2(m, X[training_rows, :], y[training_rows]) = 0.9044357103305194\n0.9044357103305194\n\njulia\u003e @show mse(m, X[testing_rows, :], y[testing_rows])\nmse(m, X[testing_rows, :], y[testing_rows]) = 0.9480778102674918\n0.9480778102674918\n\njulia\u003e @show rmse(m, X[testing_rows, :], y[testing_rows])\nrmse(m, X[testing_rows, :], y[testing_rows]) = 0.9736928726592856\n0.9736928726592856\n\njulia\u003e @show r2(m, X[testing_rows, :], y[testing_rows])\nr2(m, X[testing_rows, :], y[testing_rows]) = 0.9088387716983182\n0.9088387716983182\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcbi%2Fmodelsanitizer.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbcbi%2Fmodelsanitizer.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcbi%2Fmodelsanitizer.jl/lists"}