Skip to contents

Gets probability thresholds given predicted probabilities, outcomes and NMB.

Usage

get_thresholds(predicted, actual, nmb, cutpoint_methods = NULL)

Arguments

predicted

A vector of predicted probabilities.

actual

A vector of actual outcomes.

nmb

A named vector containing NMB assigned to true positives, true negatives, false positives and false negatives

cutpoint_methods

Which cutpoint method(s) to return. The default (NULL) uses all the inbuilt methods.

Value

Returns a list.

Examples

# \donttest{
# get thresholds using default (all inbuilt) cutpoint methods
get_thresholds(
  predicted = runif(1000),
  actual = sample(c(0, 1), size = 1000, replace = TRUE),
  nmb = c("TP" = -3, "TN" = 0, "FP" = -1, "FN" = -4)
)
#>              all             none value_optimising           youden 
#>        0.0000000        1.0000000        0.7610592        0.4944738 
#>  cost_minimising   prod_sens_spec            roc01   index_of_union 
#>        0.5000000        0.5039525        0.5039525        0.5173742 


# get cutpoints using user-defined functions
# These functions must take the \code{predicted} and \code{actual}
# as arguments. They can also take \code{nmb} (named vector containing NMB
# with values for TP, FP, TN, FN).
fx_roc01 <- function(predicted, actual, ...) {
  cutpointr::cutpointr(
    x = predicted, class = actual, method = cutpointr::minimize_metric,
    metric = cutpointr::roc01,
    silent = TRUE
  )[["optimal_cutpoint"]]
}

fx_sum_sens_spec <- function(predicted, actual, ...) {
  cutpointr::cutpointr(
    x = predicted, class = actual, method = cutpointr::maximize_metric,
    metric = cutpointr::sum_sens_spec,
    silent = TRUE
  )[["optimal_cutpoint"]]
}

get_thresholds(
  predicted = runif(1000),
  actual = sample(c(0, 1), size = 1000, replace = TRUE),
  cutpoint_methods = c("fx_roc01", "fx_sum_sens_spec"),
  nmb = c("TP" = -3, "TN" = 0, "FP" = -1, "FN" = -4)
)
#> Error in fx_roc01(predicted = c(0.7629457146395, 0.0453292638994753, 0.79979287320748, 0.456026542466134, 0.793425831478089, 0.418307723710313, 0.310936706140637, 0.816117940703407, 0.106073725968599, 0.353833518689498, 0.00222286302596331, 0.0109137119725347, 0.334904205519706, 0.189598541008309, 0.172400343464687, 0.612528801895678, 0.573733847821131, 0.812399548012763, 0.661331896670163, 0.495789556996897, 0.00323712849058211, 0.765106749953702, 0.831035945564508, 0.143653901526704, 0.126881664153188, 0.254946011584252, 0.923076388658956, 0.495506047736853, 0.740331389475614, 0.611120205605403, 0.661757879890501, 0.539956046966836, 0.999432602431625, 0.377226300770417, 0.197658916935325, 0.188399741891772, 0.881525943055749, 0.668109361315146, 0.227072958834469, 0.630460090469569, 0.594777771504596, 0.994255005847663, 0.0565701322630048, 0.103020153474063, 0.663958137156442, 0.370350192766637, 0.655113497050479, 0.830851732986048, 0.713855685433373, 0.910789443645626, 0.815248887054622, 0.891648071352392, 0.407827387563884, 0.182393147842959, 0.424336155876517, 0.354690151987597, 0.677113145589828, 0.806889711413532, 0.334628628334031, 0.0520782766398042, 0.114495440619066, 0.0328187779523432, 0.593038875143975, 0.469888851512223, 0.196711831027642, 0.398340239189565, 0.42552875331603, 0.0380039606243372, 0.648773291381076, 0.564574069576338, 0.558359734015539, 0.299700347939506, 0.909107741899788, 0.696958782384172, 0.725607982371002, 0.507966002682224, 0.605564928380772, 0.512607069686055, 0.715948866447434, 0.152767340419814, 0.0811947321053594, 0.817216324154288, 0.496148779522628, 0.82540269754827, 0.653210258344188, 0.680951263289899, 0.405513598350808, 0.808793870732188, 0.563485401915386, 0.256308187032118, 0.423990424256772, 0.841988403582945, 0.550120673840865, 0.916555057279766, 0.88353084702976, 0.999584958422929, 0.15232279477641, 0.15903595671989, 0.745263512246311, 0.502355300821364, 0.759452373720706, 0.24194222339429, 0.388735434040427, 0.0364383978303522, 0.831360112177208, 0.805892004165798, 0.701150186592713, 0.35621585091576, 0.28511160146445, 0.811595237348229, 0.313756860559806, 0.137075907550752, 0.0250875735655427, 0.133243176154792, 0.715027553960681, 0.742382099851966, 0.602736982051283, 0.839871246600524, 0.561383942840621, 0.996695262147114, 0.521535200066864, 0.537619885057211, 0.00307009648531675, 0.555208716774359, 0.9900191151537, 0.285376511281356, 0.522505454951897, 0.444428601767868, 0.569059374043718, 0.485129209235311, 0.3275692735333, 0.810707868542522, 0.230652610538527, 0.483267330098897, 0.132365078432485, 0.566189493052661, 0.963622950948775, 0.949380756821483, 0.223090186016634, 0.473314159549773, 0.520012422930449, 0.806729382369667, 0.143264693208039, 0.286938087083399, 0.883974170079455, 0.515256856335327, 0.56661432958208, 0.220787486992776, 0.306803166167811, 0.420038220938295, 0.122944373171777, 0.474041695939377, 0.285455366130918, 0.457175568444654, 0.687479993328452, 0.666309555293992, 0.896387292072177, 0.463680135086179, 0.00324848131276667, 0.229740612441674, 0.197869521565735, 0.722086743917316, 0.39760719309561, 0.93172566825524, 0.307854981161654, 0.0350266292225569, 0.67222729162313, 0.462235919898376, 0.135320840170607, 0.140253596939147, 0.123979316325858, 0.0490434244275093, 0.99140098085627, 0.487024876056239, 0.121783467242494, 0.947859186911955, 0.99698606133461, 0.553441355703399, 0.240362116368487, 0.210712094325572, 0.505051081534475, 0.972834099084139, 0.198998381849378, 0.0452681060414761, 0.683385467389598, 0.941892861854285, 0.672882871003821, 0.114139023469761, 0.736823117593303, 0.267464199103415, 0.760510163614526, 0.495106891030446, 0.120347311487421, 0.61127760540694, 0.116802797885612, 0.272970952559263, 0.960108134429902, 0.572579622268677, 0.89479044592008, 0.823566325707361, 0.231762653915212, 0.930149301886559, 0.469503835542127, 0.460123369237408, 0.189549144823104, 0.811132823349908, 0.2544208872132, 0.987526824465021, 0.143550396198407, 0.344746890710667, 0.762408684473485, 0.189924650127068, 0.19524177419953, 0.130087681347504, 0.50862614158541, 0.301781048299745, 0.450124029070139, 0.139723820844665, 0.211782889906317, 0.778833739925176, 0.11911889561452, 0.553710087202489, 0.387813141103834, 0.372402139706537, 0.261654200498015, 0.0396444690413773, 0.500917358789593, 0.289677646476775, 0.63724848232232, 0.00563948950730264, 0.602659935830161, 0.327264578780159, 0.950473614502698, 0.359838132746518, 0.704587089829147, 0.795367555227131, 0.836443902691826, 0.192186577478424, 0.0974777122028172, 0.900250368984416, 0.394449907820672, 0.248361828038469, 0.846408810000867, 0.327437550295144, 0.95188057096675, 0.605867977254093, 0.807714530732483, 0.28742513130419, 0.860824743751436, 0.928211705759168, 0.964299155632034, 0.770427790703252, 0.49397091078572, 0.0529084522277117, 0.548047025920823, 0.526535279117525, 0.785307176178321, 0.0157542172819376, 0.876622086390853, 0.350700860843062, 0.604263718705624, 0.664188800379634, 0.301142353797331, 0.562010675203055, 0.855848745442927, 0.0576917296275496, 0.994009126676247, 0.980602995259687, 0.568007103400305, 0.968989559914917, 0.854263377375901, 0.357786356238648, 0.911710922140628, 0.445619398262352, 0.974848685087636, 0.161389290820807, 0.819989055162296, 0.992971165804192, 0.0868239926639944, 0.715141575084999, 0.559553352883086, 0.982311859261245, 0.426478454144672, 0.911739205010235, 0.0130822595674545, 0.089891203911975, 0.669154958799481, 0.837229570606723, 0.224678222555667, 0.826780264265835, 0.189255449920893, 0.203986629610881, 0.683017789851874, 0.933970797574148, 0.223908151034266, 0.561444764025509, 0.553639094578102, 0.529812328051776, 0.840336376801133, 0.630632175598294, 0.323978104861453, 0.257929706713185, 0.876373948063701, 0.331932794069871, 0.244279621168971, 0.986973470309749, 0.757802620064467, 0.134783954592422, 0.845127888489515, 0.685839279321954, 0.212566739413887, 0.355782424099743, 0.965161268366501, 0.0961271533742547, 0.461374989245087, 0.467564979102463, 0.840566275874153, 0.0313579805660993, 0.283963230904192, 0.336761002195999, 0.277940738014877, 0.0262874867767096, 0.90766285196878, 0.595273401355371, 0.231808913638815, 0.107754247961566, 0.298773701069877, 0.76270906557329, 0.637352170422673, 0.874353000195697, 0.490022617159411, 0.437545400578529, 0.755666289012879, 0.240101882489398, 0.488980989903212, 0.914801382925361, 0.208637772593647, 0.380795393139124, 0.166715913917869, 0.148808964760974, 0.954146535834298, 0.892909250687808, 0.484793301206082, 0.0474685793742537, 0.0990498070605099, 0.800362606765702, 0.0120151198934764, 0.997138772392645, 0.0811663279309869, 0.707337609725073, 0.165562615031376, 0.120215776376426, 0.931415834231302, 0.728017975343391, 0.294887899653986, 0.507094900356606, 0.338351821526885, 0.672705463366583, 0.957202452467754, 0.180340382270515, 0.63901753956452, 0.905635655391961, 0.97897595516406, 0.387211953522637, 0.812990097794682, 0.426624583546072, 0.0817350866273046, 0.595613005105406, 0.695092687383294, 0.912350879516453, 0.588490179972723, 0.753960791276768, 0.217642889125273, 0.213049146113917, 0.564361286582425, 0.698913059197366, 0.447327109985054, 0.913645278429613, 0.919325896305963, 0.654608346754685, 0.697486986871809, 0.747716312529519, 0.92128954641521, 0.46270680334419, 0.822898348560557, 0.673545229248703, 0.6855449359864, 0.298829972743988, 0.373737976886332, 0.700943307951093, 0.108801422873512, 0.40153704979457, 0.399264508159831, 0.624080215813592, 0.346680969232693, 0.656640409491956, 0.205896085361019, 0.278901625424623, 0.236187949543819, 0.60422197310254, 0.866256392560899, 0.677444412838668, 0.271901974687353, 0.646021969616413, 0.349213150795549, 0.964512563776225, 0.472263411153108, 0.0694492044858634, 0.474895938765258, 0.57134262425825, 0.576198423514143, 0.157721085939556, 0.39249489409849, 0.208294989308342, 0.81809008680284, 0.974429602501914, 0.628297957824543, 0.435004245257005, 0.267921026563272, 0.230468078982085, 0.741272971965373, 0.521273801336065, 0.815428476314992, 0.462428711587563, 0.00173894083127379, 0.8455080895219, 0.901688210200518, 0.634167166193947, 0.664155628997833, 0.533686473034322, 0.707136067096144, 0.718074776697904, 0.210023747058585, 0.670850478112698, 0.49807684449479, 0.278040223754942, 0.663335365243256, 0.734215300064534, 0.86886811745353, 0.211309699341655, 0.778859067242593, 0.43489272496663, 0.545715175801888, 0.919309185585007, 0.537271274719387, 0.666685366537422, 0.300910400692374, 0.9464340233244, 0.308400614187121, 0.140780542511493, 0.885686204070225, 0.708935753442347, 0.448215537937358, 0.731010865420103, 0.0263200448825955, 0.0247223689220846, 0.850742053706199, 0.0723575265146792, 0.669465724844486, 0.871434226166457, 0.43907768256031, 0.804648383986205, 0.771011632168666, 0.600813889177516, 0.704807137837633, 0.920198723906651, 0.609383155591786, 0.947326520923525, 0.654515845701098, 0.649030963191763, 0.182432578410953, 0.175376697443426, 0.491251761093736, 0.0910385577008128, 0.924103009514511, 0.175704359309748, 0.655948888510466, 0.101894805440679, 0.0115916265640408, 0.879007279640064, 0.70437638531439, 0.172902843914926, 0.737673277733847, 0.436251774663106, 0.764482394093648, 0.0355216711759567, 0.891843541525304, 0.80731243500486, 0.158948737196624, 0.338343578623608, 0.842088174074888, 0.721423062728718, 0.0873743649572134, 0.0392273920588195, 0.276085118297487, 0.676367953885347, 0.0216989426407963, 0.0483122437726706, 0.117812582291663, 0.0787728833965957, 0.501488903537393, 0.500924637774006, 0.68930036155507, 0.860671693691984, 0.487598503474146, 0.97518404899165, 0.692551822867244, 0.633913893951103, 0.282775312662125, 0.768146555870771, 0.669337000465021, 0.233413249254227, 0.436649940209463, 0.254435534821823, 0.126019323244691, 0.937740332446992, 0.0708669498562813, 0.15481956792064, 0.479118817253038, 0.220669583417475, 0.730545532656834, 0.439896340714768, 0.82599676400423, 0.445670232176781, 0.0593384874518961, 0.905557621503249, 0.209199257427827, 0.157938609598204, 0.697286515962332, 0.673995234305039, 0.676718771457672, 0.560502096544951, 0.871913994895294, 0.48572661401704, 0.0480786086991429, 0.46997399139218, 0.724096043268219, 0.710688885301352, 0.948387392330915, 0.587196522392333, 0.582734756171703, 0.0510192688088864, 0.101432242197916, 0.176346556749195, 0.404966281726956, 0.373713127570227, 0.827231165952981, 0.163264148170128, 0.898487662896514, 0.444392967969179, 0.97176028881222, 0.0804111449979246, 0.32200859952718, 0.95158952777274, 0.233044629683718, 0.831864011008292, 0.152217683382332, 0.767437437083572, 0.402921940432861, 0.499186852015555, 0.107837381539866, 0.0792773147113621, 0.616341550368816, 0.370551423868164, 0.704067369224504, 0.245668513234705, 0.965915237320587, 0.722521797288209, 0.710641983430833, 0.80175773636438, 0.234445136040449, 0.666414096252993, 0.909347247332335, 0.929499564692378, 0.834492394933477, 0.719677072251216, 0.718765943776816, 0.476851547136903, 0.242705590324476, 0.823391639860347, 0.453814035281539, 0.694791781250387, 0.942569192964584, 0.913628024980426, 0.968657566932961, 0.659902620129287, 0.690610387129709, 0.975078432122245, 0.0586459855549037, 0.779512390727177, 0.986293993424624, 0.185268104076385, 0.688697170233354, 0.465147534385324, 0.741299256449565, 0.651890928857028, 0.146759724710137, 0.0443418407812715, 0.628225733526051, 0.563863185234368, 0.888846011133865, 0.533616006374359, 0.987005332950503, 0.471026276936755, 0.22280836943537, 0.179646346252412, 0.783487573964521, 0.799843565095216, 0.68267326708883, 0.0245772695634514, 0.448719351319596, 0.562689460813999, 0.491048540687189, 0.601554985623807, 0.25873880344443, 0.0636309122201055, 0.1072051897645, 0.0494749702047557, 0.186337514547631, 0.43048159359023, 0.792501756921411, 0.157995962304994, 0.451585924020037, 0.910702992230654, 0.793188978917897, 0.969202540349215, 0.549875225173309, 0.363218128448352, 0.677072098013014, 0.812696284381673, 0.710735599510372, 0.518896080320701, 0.552667457144707, 0.144882313674316, 0.161769711878151, 0.172905513085425, 0.511167047079653, 0.270167045528069, 0.843665184220299, 0.521595533005893, 0.244952043518424, 0.572660924401134, 0.839578578015789, 0.2623415668495, 0.581405156524852, 0.133118916302919, 0.201615062309429, 0.0366793519351631, 0.740432908991352, 0.934594966936857, 0.705123764462769, 0.364422528306022, 0.542741205310449, 0.346461344743147, 0.149858971359208, 0.438919979147613, 0.781068810261786, 0.633011085679755, 0.183143151225522, 0.179466301808134, 0.483549124794081, 0.416968095814809, 0.560238651698455, 0.706685627112165, 0.503487008623779, 0.557429419597611, 0.918580463388935, 0.682856429368258, 0.422124428907409, 0.0150840634014457, 0.732587536796927, 0.496014951495454, 0.391161530278623, 0.197179799433798, 0.293879818636924, 0.557863392634317, 0.0505871728528291, 0.558364624623209, 0.0684075239114463, 0.551621341146529, 0.684431499335915, 0.415488776518032, 0.781877235742286, 0.491037449333817, 0.142321016872302, 0.210673357360065, 0.368084867484868, 0.00833590235561132, 0.790586618706584, 0.371681098593399, 0.208334857830778, 0.341686966596171, 0.409934568684548, 0.979938110802323, 0.0763004429172724, 0.916504999389872, 0.917191928718239, 0.487043402390555, 0.40457105753012, 0.972659691236913, 0.22696095565334, 0.590627248864621, 0.514957591891289, 0.155029132496566, 0.937231709249318, 0.852488978998736, 0.861325617181137, 0.301707042846829, 0.7157544917427, 0.287841368932277, 0.679096939042211, 0.354131067171693, 0.75680647441186, 0.650785859441385, 0.473455080064014, 0.297565614571795, 0.335737920599058, 0.987610370619223, 0.410904867341742, 0.397204804234207, 0.784280569991097, 0.420501814922318, 0.633404309395701, 0.626533935777843, 0.907739205518737, 0.69443951616995, 0.581916294759139, 0.174075205111876, 0.176213222555816, 0.588047029217705, 0.508230743464082, 0.685031200060621, 0.62584713078104, 0.303101135184988, 0.95885656401515, 0.0664193646516651, 0.513259666971862, 0.297308447305113, 0.31886109453626, 0.622557192342356, 0.348198215477169, 0.0624617591965944, 0.067509587854147, 0.0423475948628038, 0.34681728715077, 0.584812188521028, 0.367106789955869, 0.759481149492785, 0.316691236803308, 0.148614583304152, 0.750294680241495, 0.869598404737189, 0.677562740398571, 0.87579664750956, 0.344494837801903, 0.402579436311498, 0.873540277592838, 0.135246849618852, 0.375786350341514, 0.307423899648711, 0.413378006545827, 0.246110622538254, 0.79558031517081, 0.96386847901158, 0.355368772521615, 0.557779620634392, 0.21394184534438, 0.812549958238378, 0.925995260011405, 0.976371151627973, 0.595101887127385, 0.615296983392909, 0.965010760119185, 0.342778948135674, 0.602255958132446, 0.984182068146765, 0.329179879510775, 0.304464405868202, 0.855314094340429, 0.998792175203562, 0.306331232888624, 0.521183597156778, 0.359583657002077, 0.101975977653638, 0.609864786732942, 0.839096192037687, 0.687289111083373, 0.418118116445839, 0.563581995433196, 0.573663376504555, 0.737134484574199, 0.283798729302362, 0.959638963220641, 0.255085396813229, 0.618688025977463, 0.834383938461542, 0.823835333343595, 0.448639014270157, 0.594837245997041, 0.658425809349865, 0.979438784299418, 0.678521724184975, 0.129316368605942, 0.705965026048943, 0.708029446424916, 0.0261072372086346, 0.359065635595471, 0.936967772897333, 0.0873337383382022, 0.195192379178479, 0.116093040909618, 0.953129236586392, 0.31278490438126, 0.305039997911081, 0.793490298325196, 0.27140016737394, 0.456115985754877, 0.600071262801066, 0.0132550685666502, 0.719395816558972, 0.387950698379427, 0.857880773255602, 0.200805786065757, 0.14235466835089, 0.924282593186945, 0.166145869763568, 0.264112391974777, 0.703922972781584, 0.569786008214578, 0.897468450246379, 0.396042531356215, 0.0224517653696239, 0.63611856312491, 0.328694931231439, 0.587018847465515, 0.565237911883742, 0.0591971282847226, 0.333282978506759, 0.305454396642745, 0.550048283766955, 0.0593228633515537, 0.137754290830344, 0.617205487797037, 0.369501959066838, 0.772120217327029, 0.51515259873122, 0.997529165353626, 0.871489020995796, 0.692062083864585, 0.817349280463532, 0.990296947769821, 0.319513037567958, 0.501810346730053, 0.17213519779034, 0.929552616318688, 0.218883572611958, 0.792199723888189, 0.734423428075388, 0.563241077121347, 0.324255576124415, 0.463715241290629, 0.946970650926232, 0.263113027205691, 0.619464908726513, 0.413826771313325, 0.567353566177189, 0.0705084195360541, 0.698918134439737, 0.505027215462178, 0.620841318042949, 0.164615056244656, 0.924986553611234, 0.580158019904047, 0.0803543606307358, 0.0332842180505395, 0.409180019283667, 0.0524659371003509, 0.690911948680878, 0.202486725756899, 0.0617558972444385, 0.387854133499786, 0.625608862144873, 0.732713670004159, 0.0425503107253462, 0.358532082755119, 0.852921118959785, 0.849794116336852, 0.0334797955583781, 0.281211452791467, 0.732475236523896, 0.25569326011464, 0.980525953229517, 0.070544792804867, 0.272752278018743, 0.624776724725962, 0.786609218921512, 0.0589810679666698, 0.179806156316772, 0.738566388376057, 0.874554576119408, 0.684464325197041, 0.433438015636057, 0.952691144077107, 0.966672903159633, 0.880075601162389, 0.112933958414942, 0.685825415421277, 0.69244316755794, 0.151861855527386, 0.255315980874002, 0.637119225692004, 0.565722534200177, 0.262661944841966, 0.65506100282073, 0.936028600204736, 0.748361267382279, 0.166382087394595, 0.135481909150258, 0.189023297280073, 0.450215297285467, 0.130751678720117, 0.7485030812677, 0.315527570433915, 0.137523852521554, 0.302704504225403, 0.0925205226521939, 0.120567189995199, 0.180092295398936, 0.0594137606676668, 0.606416036142036, 0.10919231036678, 0.665344901382923, 0.971555633703247, 0.0405150009319186, 0.923965230351314, 0.216355681885034, 0.931761428713799, 0.915983603801578, 0.637646399671212, 0.556280945427716, 0.158950679469854, 0.258066252106801, 0.548719513462856, 0.199132210807875, 0.505800832528621, 0.79241641308181, 0.185361951589584, 0.465708956122398, 0.62963853450492, 0.291631965432316, 0.284880606457591, 0.0417331110220402, 0.135343267116696, 0.736760649131611, 0.526532223215327, 0.39386037690565, 0.779905762523413, 0.448633818654343, 0.412868704181165, 0.307181658688933, 0.628614935325459, 0.449378507444635, 0.87677766638808, 0.0413053170777857, 0.21546263853088, 0.58817330095917, 0.464262341614813, 0.896557027008384, 0.129663951927796, 0.889237433904782, 0.402266822056845, 0.83275798917748, 0.335972534725443, 0.637937346473336, 0.785842495970428, 0.464639881392941, 0.444201959762722, 0.469758489634842, 0.509406049735844, 0.538649709895253, 0.152656968217343, 0.249816875904799, 0.63640045071952, 0.278315101983026, 0.883403018116951, 0.317675769329071, 0.379582323599607, 0.992475337116048, 0.0701625281944871, 0.0845409368630499, 0.380648273276165, 0.924732527462766, 0.172025994863361, 0.967283913865685, 0.170471992110834, 0.334370286436751, 0.49310750188306, 0.549221980152652, 0.772053560009226, 0.684868050506338), actual = c(0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 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 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0), nmb = c(TP = -3, TN = 0, FP = -1, FN = -4)): could not find function "fx_roc01"

# get a combination of cutpoints from both user-defined functions and
# inbuilt methods
get_thresholds(
  predicted = runif(1000),
  actual = sample(c(0, 1), size = 1000, replace = TRUE),
  cutpoint_methods = c(
    "fx_roc01",
    "fx_sum_sens_spec",
    "youden",
    "all",
    "none"
  ),
  nmb = c("TP" = -3, "TN" = 0, "FP" = -1, "FN" = -4)
)
#> Error in fx_roc01(predicted = c(0.0959583972580731, 0.39517926890403, 0.721762978471816, 0.123959927121177, 0.0295971867162734, 0.173418237129226, 0.910924716619775, 0.985666098538786, 0.466179587878287, 0.611467045964673, 0.980775601696223, 0.298701220192015, 0.690198199590668, 0.341559532331303, 0.477945433696732, 0.311233720974997, 0.329580182209611, 0.67469218512997, 0.459947146009654, 0.67967217322439, 0.706868201028556, 0.905109656043351, 0.705775476293638, 0.441494449507445, 0.833533722907305, 0.372510530520231, 0.663843082031235, 0.0894799414090812, 0.623071548063308, 0.250090609537438, 0.0115245431661606, 0.595868312520906, 0.856237738393247, 0.226824391167611, 0.524341735290363, 0.347739712800831, 0.509019864257425, 0.0276202049572021, 0.188616940518841, 0.343095860444009, 0.477473148843274, 0.603354729246348, 0.267892891773954, 0.66699308110401, 0.276758252875879, 0.507945976452902, 0.28331913612783, 0.220548937562853, 0.953338940162212, 0.471394631080329, 0.674006120301783, 0.71317480946891, 0.592704561073333, 0.610990135930479, 0.97921520168893, 0.892353765433654, 0.936321971472353, 0.529808699851856, 0.288394033443183, 0.367690725019202, 0.202940747607499, 0.333757648710161, 0.158067661104724, 0.408085649134591, 0.316882281331345, 0.273204069351777, 0.854371052468196, 0.256845379713923, 0.943844920722768, 0.467175702564418, 0.401869646506384, 0.193232397316024, 0.426042413571849, 0.0192460466641933, 0.189635599963367, 0.902077285340056, 0.674798173364252, 0.30760810431093, 0.1930985620711, 0.574069099035114, 0.826837054919451, 0.329129979945719, 0.965818401193246, 0.942833720007911, 0.842467098962516, 0.864966429537162, 0.201953223207965, 0.909775529755279, 0.540167448110878, 0.69169519841671, 0.628487346926704, 0.995003566378728, 0.535248090047389, 0.0572756307665259, 0.819739568280056, 0.251661572372541, 0.149320836178958, 0.205652435310185, 0.0288944428320974, 0.378031368134543, 0.674667319282889, 0.409132498083636, 0.26759198307991, 0.602721000788733, 0.265588358510286, 0.314630488865077, 0.774846934713423, 0.994402185082436, 0.16616427549161, 0.692179627716541, 0.46737439930439, 0.755042589502409, 0.575354988221079, 0.551436264300719, 0.425944093149155, 0.806845620507374, 0.529812601860613, 0.00885368604212999, 0.967145783128217, 0.179937346838415, 0.748540268279612, 0.226324319606647, 0.978662552079186, 0.532845565583557, 0.852661723736674, 0.0856489527504891, 0.826550187775865, 0.0925458441488445, 0.664725608425215, 0.211409109644592, 0.956366261001676, 0.167312236968428, 0.899378582602367, 0.328490455402061, 0.534713242202997, 0.437802805565298, 0.991329364478588, 0.719205536181107, 0.488949184073135, 0.835093718953431, 0.18287375732325, 0.355338608380407, 0.752945949323475, 0.189797571627423, 0.574958702549338, 0.891782219754532, 0.848025654442608, 0.307364531327039, 0.401758787687868, 0.934643256710842, 0.122255635680631, 0.0503048894461244, 0.0503440585453063, 0.639357930980623, 0.29989109816961, 0.824218864319846, 0.907066300045699, 0.0164799022022635, 0.973215069621801, 0.621775209903717, 0.400017286185175, 0.330110059818253, 0.443454491905868, 0.836094468133524, 0.451503061922267, 0.78207783238031, 0.644637042889372, 0.106147574260831, 0.929717737948522, 0.593010868877172, 0.418727295706049, 0.523622703971341, 0.690891030244529, 0.549520639469847, 0.776644661091268, 0.261528527364135, 0.00117619219236076, 0.57067832397297, 0.425919913221151, 0.986099693458527, 0.442764191422611, 0.0523002005647868, 0.456535198958591, 0.405548000708222, 0.308011903194711, 0.118168856948614, 0.647780477302149, 0.33989691757597, 0.666389319580048, 0.7252660789527, 0.610830778954551, 0.574024718487635, 0.553954906994477, 0.588650945341215, 0.15027181734331, 0.603468945482746, 0.933888111962005, 0.0440767265390605, 0.37641627388075, 0.944930548546836, 0.303186092991382, 0.344370568403974, 0.612642501713708, 0.864264901727438, 0.145186237990856, 0.283801093464717, 0.0480866739526391, 0.387598528992385, 0.678705947473645, 0.654957876075059, 0.717264323262498, 0.545608010143042, 0.899263459723443, 0.625591735588387, 0.645681950263679, 0.98663632501848, 0.436302366433665, 0.7369365231134, 0.723166024778038, 0.171020717127249, 0.864111456554383, 0.92460500006564, 0.1234325398691, 0.233790361788124, 0.83414197480306, 0.0919686134438962, 0.940952903591096, 0.874350858852267, 0.471241575898603, 0.644792972598225, 0.85586111433804, 0.280500012682751, 0.384575329953805, 0.412950565107167, 0.379395617637783, 0.929809329798445, 0.099076637532562, 0.203525310149416, 0.224970302311704, 0.753830205649137, 0.825147434370592, 0.337249701609835, 0.515254708938301, 0.0683469334617257, 0.954793420154601, 0.463802240556106, 0.801019422942773, 0.638736403314397, 0.966036840109155, 0.0396540369838476, 0.949080085381866, 0.568760436726734, 0.163786983583122, 0.171770674176514, 0.204285841202363, 0.623975376365706, 0.549283602507785, 0.435200691921636, 0.427552405046299, 0.105695438338444, 0.592904250836, 0.749960713321343, 0.769094888819382, 0.864435746567324, 0.799661893164739, 0.496085563208908, 0.567160995677114, 0.265940028708428, 0.672413320513442, 0.291066343896091, 0.329094374086708, 0.87177008879371, 0.660885279998183, 0.189590235007927, 0.309334098594263, 0.962518720189109, 0.0532742303330451, 0.357000454328954, 0.232060014968738, 0.48603306314908, 0.681890143081546, 0.0533802818972617, 0.257667089579627, 0.336984896101058, 0.293496940750629, 0.125048169167712, 0.0487226534169167, 0.847336690174416, 0.314652184955776, 0.0865503328386694, 0.375907547306269, 0.86785467993468, 0.302311769453809, 0.667863163398579, 0.431047363206744, 0.612086758483201, 0.721613595727831, 0.730229006614536, 0.387135579017922, 0.265130535699427, 0.227319791447371, 0.726537918671966, 0.774237704463303, 0.0467434569727629, 0.539973580045626, 0.25700463866815, 0.333122258773074, 0.506565050687641, 0.0478754860814661, 0.625139439711347, 0.812522217165679, 0.495685062604025, 0.609243309358135, 0.321520250290632, 0.368655520025641, 0.0442045144736767, 0.0483119587879628, 0.568008150206879, 0.896041447063908, 0.369426141493022, 0.517484977375716, 0.75428870646283, 0.681770635768771, 0.972394955810159, 0.650787464110181, 0.597334985621274, 0.992581320926547, 0.051853101933375, 0.15974609926343, 0.82889171759598, 0.311489216284826, 0.507900122087449, 0.615674845641479, 0.53206695895642, 0.336481346050277, 0.796069357311353, 0.438797920476645, 0.962881753221154, 0.56514481944032, 0.995739278616384, 0.90734881372191, 0.734666185453534, 0.496442157542333, 0.498287624912336, 0.743856977205724, 0.995475922944024, 0.328983666375279, 0.625299131730571, 0.508070857729763, 0.597096776589751, 0.84850321453996, 0.477580678649247, 0.289908662205562, 0.000965108396485448, 0.942142880521715, 0.435872160596773, 0.588101928122342, 0.316591304494068, 0.583386940415949, 0.181991310557351, 0.956013382645324, 0.361031332286075, 0.106627538567409, 0.792941060848534, 0.47143005230464, 0.763457676162943, 0.504842820810154, 0.982833751942962, 0.540897040162235, 0.535288241691887, 0.503291249740869, 0.956946216756478, 0.988104813266546, 0.0253650860395283, 0.788608732167631, 0.373730778926983, 0.000277070794254541, 0.840454069897532, 0.677540478296578, 0.00019722105935216, 0.844377395231277, 0.214555321959779, 0.0557915430981666, 0.318087427411228, 0.653694300446659, 0.880493397125974, 0.236858428455889, 0.604656198294833, 0.0687896080780774, 0.289338537491858, 0.0944197976496071, 0.0820984512101859, 0.248894684715196, 0.674007659079507, 0.267811705125496, 0.1220734922681, 0.889833726221696, 0.0588672456797212, 0.736964331008494, 0.490088272606954, 0.358831305522472, 0.854667082894593, 0.444544789381325, 0.569051663624123, 0.375660997349769, 0.965975109953433, 0.101253738626838, 0.0656899891328067, 0.0139448391273618, 0.225382178323343, 0.135214334120974, 0.161618928890675, 0.61673349654302, 0.432566399453208, 0.914413098013029, 0.607215375872329, 0.427062495145947, 0.145851178094745, 0.977455788990483, 0.262330856407061, 0.448624364333227, 0.86630649655126, 0.159165786346421, 0.786492109531537, 0.202074200147763, 0.505054187728092, 0.384121488546953, 0.415045578265563, 0.0164994022343308, 0.112962539773434, 0.707300242735073, 0.782443322474137, 0.440247108228505, 0.865458525251597, 0.810348512139171, 0.39588443771936, 0.115401400020346, 0.870836372952908, 0.858991794055328, 0.657692428445444, 0.699763108277693, 0.368584954179823, 0.438144158339128, 0.469228051835671, 0.994013408664614, 0.690250830259174, 0.320337031502277, 0.342199131147936, 0.809323525521904, 0.648978868033737, 0.399971304228529, 0.117575340438634, 0.401039478369057, 0.0171944848261774, 0.373070855159312, 0.112421342870221, 0.34212224977091, 0.112279103137553, 0.768491451628506, 0.723438690649346, 0.811509567080066, 0.650998124619946, 0.199840480228886, 0.652627870440483, 0.589527043281123, 0.29450833844021, 0.355700633022934, 0.146948508452624, 0.61625205213204, 0.653914594324306, 0.715160981984809, 0.716382717248052, 0.487564256880432, 0.774799233302474, 0.706596776144579, 0.498584782937542, 0.629550432786345, 0.263964282814413, 0.711775904754177, 0.927386591210961, 0.671799787785858, 0.659567840630189, 0.89109851885587, 0.232230337802321, 0.959294351749122, 0.33435051003471, 0.125995373586193, 0.65408624522388, 0.531509041786194, 0.618349925847724, 0.435396385611966, 0.777753874426708, 0.52873916272074, 0.00402966304682195, 0.853590858867392, 0.192490463610739, 0.384216427104548, 0.343890405027196, 0.411147210979834, 0.0505948683712631, 0.0995665593072772, 0.49455657042563, 0.906862762290984, 0.0982779269106686, 0.345170550746843, 0.640122565208003, 0.0096327958162874, 0.0821684030815959, 0.310002135578543, 0.601040222216398, 0.948288834653795, 0.650042573921382, 0.00902956048958004, 0.65633756085299, 0.0711934037972242, 0.188513316214085, 0.0983888241462409, 0.398599822307006, 0.805073478724808, 0.451385998865589, 0.264629109529778, 0.253642790019512, 0.249422678491101, 0.786311270203441, 0.66387308598496, 0.310492498101667, 0.491977010620758, 0.814452722901478, 0.804278032155707, 0.321629784302786, 0.877186892088503, 0.193523834226653, 0.753289281623438, 0.747011222178116, 0.144676451804116, 0.727537759812549, 0.531150531722233, 0.410198038909584, 0.430495497537777, 0.340824716258794, 0.699654776602983, 0.139939440181479, 0.91001221514307, 0.339077964425087, 0.165224986849353, 0.11099630384706, 0.464547698386014, 0.559611917939037, 0.859036388806999, 0.139382826397195, 0.346937709720805, 0.474166743457317, 0.175369791453704, 0.269995321985334, 0.0725547566544265, 0.879931485978886, 0.387623940128833, 0.517974911723286, 0.823841023724526, 0.051006501307711, 0.811988211236894, 0.686371688265353, 0.860308614559472, 0.851113589247689, 0.693164917640388, 0.870171713642776, 0.0470026426482946, 0.659576453734189, 0.0988292265683413, 0.867168903117999, 0.386044821934775, 0.821558211464435, 0.72328914492391, 0.701330262701958, 0.907012725248933, 0.862317014252767, 0.417196565773338, 0.837870250921696, 0.485469773411751, 0.835400240961462, 0.00730702490545809, 0.338149840012193, 0.770562666002661, 0.711566954851151, 0.167006828123704, 0.0421355834696442, 0.283853369299322, 0.312717441702262, 0.662643717834726, 0.632226876216009, 0.324284749804065, 0.554346566088498, 0.230780392885208, 0.840137775521725, 0.667213408043608, 0.576707963133231, 0.833977181231603, 0.463767497101799, 0.729577572084963, 0.585015311371535, 0.5982471476309, 0.928081885678694, 0.881430755835027, 0.646882314234972, 0.0768591384403408, 0.907549259020016, 0.165978912264109, 0.179666517302394, 0.777036326937377, 0.484974359394982, 0.81345266639255, 0.260475101182237, 0.627159118885174, 0.378583819372579, 0.0509964749217033, 0.760365804424509, 0.878578579984605, 0.519074485404417, 0.845145419705659, 0.494506565853953, 0.338057857006788, 0.397614203160629, 0.889176024356857, 0.995472197420895, 0.966366334818304, 0.712337425677106, 0.564437539782375, 0.37121758935973, 0.589782319497317, 0.50649627065286, 0.460847107460722, 0.750924039399251, 0.472626253264025, 0.961150976829231, 0.083687599748373, 0.0455878635402769, 0.604145011398941, 0.322655362775549, 0.630425047827885, 0.657143346732482, 0.0350742149166763, 0.669513041852042, 0.0187172412406653, 0.18745399848558, 0.551476792199537, 0.938284560572356, 0.415686746826395, 0.154051481978968, 0.526624366873875, 0.303162357537076, 0.857592941494659, 0.310702401446179, 0.497817854164168, 0.953716651536524, 0.922646724618971, 0.943662878591567, 0.377620748011395, 0.19658691692166, 0.736446339637041, 0.291585567174479, 0.59854336315766, 0.0815287525765598, 0.718839567853138, 0.496570260729641, 0.0805298506747931, 0.95755134546198, 0.58948318194598, 0.395495486212894, 0.357656208565459, 0.866575489751995, 0.448564276332036, 0.0113333999179304, 0.0705311712808907, 0.424515547696501, 0.205962525447831, 0.134233536198735, 0.669504121877253, 0.0586925453972071, 0.753145321970806, 0.0334455333650112, 0.174947855528444, 0.787543481448665, 0.545663574011996, 0.222875688690692, 0.229801843874156, 0.593059877865016, 0.423083854606375, 0.413049747468904, 0.236517328070477, 0.20379295386374, 0.0843039704486728, 0.527527184458449, 0.579306789673865, 0.907689928077161, 0.113049149047583, 0.939197335159406, 0.891773952404037, 0.379845120245591, 0.26773917931132, 0.185903299134225, 0.524741026340052, 0.35643187398091, 0.151059489464387, 0.399697951041162, 0.42241516825743, 0.828507632482797, 0.373396411538124, 0.404810486827046, 0.491441221442074, 0.462182856397703, 0.265516250627115, 0.851244427263737, 0.824341451283544, 0.332565732533112, 0.39759392477572, 0.826049525290728, 0.849286096403375, 0.55848127650097, 0.96938611404039, 0.982945733238012, 0.353239662945271, 0.94695003493689, 0.882691760547459, 0.332848434336483, 0.747656491119415, 0.398603831185028, 0.372072508791462, 0.357615027111024, 0.375089736655354, 0.990116484230384, 0.356740619521588, 0.820102730765939, 0.566147264325991, 0.233363097766414, 0.18503989232704, 0.742103589233011, 0.561256644083187, 0.3981801236514, 0.809779887087643, 0.921149003086612, 0.128975411178544, 0.477764436975121, 0.454442961374298, 0.892286093439907, 0.77931196661666, 0.74513270216994, 0.187635023379698, 0.119582134997472, 0.184086431516334, 0.0422794881742448, 0.0501570608466864, 0.146706250496209, 0.713553660782054, 0.557862977031618, 0.919813386863098, 0.608882506145164, 0.670418533263728, 0.818334541749209, 0.360217234119773, 0.526035065297037, 0.0894172370899469, 0.629794952692464, 0.869178885826841, 0.802379460772499, 0.207593951141462, 0.782920067897066, 0.565857587847859, 0.998711121967062, 0.887230408377945, 0.260147438384593, 0.480993881588802, 0.46727212285623, 0.886581681203097, 0.235162932425737, 0.187320038909093, 0.154307190561667, 0.252810060512275, 0.79492023633793, 0.512411381816491, 0.074891819851473, 0.478076710831374, 0.986986206844449, 0.0587240394670516, 0.520800260826945, 0.703889154596254, 0.0645344704389572, 0.845382733270526, 0.414164105895907, 0.478881495306268, 0.0885278759524226, 0.297831308329478, 0.793620034353808, 0.874729575123638, 0.367375118425116, 0.00877115339972079, 0.820309264818206, 0.155106351478025, 0.490709812147543, 0.400562984403223, 0.943733201827854, 0.548505899729207, 0.770033654989675, 0.332298352150247, 0.147580771474168, 0.320454343687743, 0.858581687090918, 0.114157601492479, 0.830586273223162, 0.381235292647034, 0.367987102363259, 0.0255945473909378, 0.299141861498356, 0.61809482332319, 0.359985654242337, 0.935229168972, 0.881758534815162, 0.0110019478015602, 0.523403461324051, 0.715591983869672, 0.260855366941541, 0.480939025990665, 0.774791285628453, 0.636870993999764, 0.96548099280335, 0.72606484987773, 0.69968704180792, 0.55181686906144, 0.347355302423239, 0.507938932394609, 0.623010490788147, 0.744341113604605, 0.117499718908221, 0.357626458629966, 0.0163222127594054, 0.306467598071322, 0.0684379634913057, 0.760734014445916, 0.622908184770495, 0.561800873372704, 0.455104229971766, 0.100628452608362, 0.38045140216127, 0.573408900992945, 0.367614941904321, 0.227101222379133, 0.0434772425796837, 0.810293424408883, 0.292276329360902, 0.686394919641316, 0.929060876136646, 0.451461920980364, 0.431869523832574, 0.8307540549431, 0.72893057577312, 0.0692073458340019, 0.551962676690891, 0.57928445818834, 0.713805159321055, 0.167149173328653, 0.161203901050612, 0.734424981754273, 0.870482580736279, 0.048964167246595, 0.858864960959181, 0.372780398000032, 0.627699670381844, 0.655466803815216, 0.552153049735352, 0.651195177575573, 0.728995589306578, 0.70487686409615, 0.293105750810355, 0.229433966102079, 0.448127251351252, 0.0801096197683364, 0.875799583271146, 0.0849465278442949, 0.492277648532763, 0.183480410370976, 0.208926374325529, 0.482972385361791, 0.502175831003115, 0.0804867912083864, 0.845500946743414, 0.71642429381609, 0.622042919276282, 0.267158151837066, 0.588031029095873, 0.971453659236431, 0.500543449306861, 0.398231718922034, 0.205580767942593, 0.0546051750425249, 0.800055272644386, 0.454405296128243, 0.484356940258294, 0.184208490420133, 0.554425633978099, 0.186902407556772, 0.959978125523776, 0.64096819376573, 0.925976393744349, 0.333958304021508, 0.420259952312335, 0.648958324687555, 0.933137640124187, 0.727403561817482, 0.11391710722819, 0.162401616806164, 0.717123470734805, 0.369459271198139, 0.599341901950538, 0.83039734698832, 0.503032154636458, 0.357350503792986, 0.198299368377775, 0.52573468326591, 0.427352044265717, 0.682039938401431, 0.18252361449413, 0.183316596783698, 0.239714466501027, 0.575423053931445, 0.750091460300609, 0.754666362190619, 0.904976538848132, 0.611415832536295, 0.737456417176872, 0.923243835801259, 0.302589487750083, 0.770001700380817, 0.943156791385263, 0.907468908000737, 0.0484106638468802, 0.642454159446061, 0.690055962186307, 0.252657052827999, 0.68244563206099, 0.0994940823875368, 0.166632555425167, 0.759520880877972, 0.610282004345208, 0.246965754311532, 0.648345005698502, 0.0305780407506973, 0.700131487101316, 0.722196533577517, 0.795774886384606, 0.77918880362995, 0.176485417177901, 0.803514215163887, 0.615892752073705, 0.0265008406713605, 0.663619810715318, 0.200480071594939, 0.405482360627502, 0.989511636318639, 0.0578438977245241, 0.0607077348977327, 0.56491038762033, 0.687148682307452, 0.327920053852722, 0.111121265683323, 0.247116255573928, 0.531162268249318, 0.691481009824201, 0.366586191114038, 0.0920561931561679, 0.740347045008093, 0.664352427003905, 0.663575405953452, 0.427328423364088, 0.786343216663226, 0.830453082919121, 0.410835858667269, 0.239380350569263, 0.223437521141022, 0.458511403994635, 0.0866548044141382, 0.543660779949278, 0.554655570536852, 0.922869781032205, 0.583569194190204, 0.06112802750431, 0.876963032176718, 0.861639354145154, 0.305654043797404, 0.372768182773143, 0.18464902928099, 0.629950417438522, 0.268342664465308, 0.522280488163233, 0.806705308612436, 0.528364883270115, 0.554985625203699, 0.998800752218813, 0.740810531657189, 0.0139277807902545, 0.791485140565783, 0.362044766079634), actual = c(0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0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