diff --git a/articles/vignette_mutualinfo.html b/articles/vignette_mutualinfo.html index 7b8e3bc..1bbaa27 100644 --- a/articles/vignette_mutualinfo.html +++ b/articles/vignette_mutualinfo.html @@ -200,9 +200,9 @@

Mutual InformationSh\mathrm{Sh}), or hartleys (symbol -1\mathrm{1}), +Hart\mathrm{Hart}), or natural units (symbol -1\mathrm{1}). +nat\mathrm{nat}). These units and other properties of the mutual information are standardized by the International Organization for Standardization (ISO) and the International Electrotechnical Commission (IEC). The minimum diff --git a/pkgdown.yml b/pkgdown.yml index e92664c..88ba59e 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -4,7 +4,7 @@ pkgdown_sha: ~ articles: vignette_mutualinfo: vignette_mutualinfo.html vignette_parkinson: vignette_parkinson.html -last_built: 2025-02-01T17:26Z +last_built: 2025-02-01T17:57Z urls: reference: https://pglpm.github.io/inferno/reference article: https://pglpm.github.io/inferno/articles diff --git a/search.json b/search.json index abde19b..41f7c7e 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 3, 29 June 2007Copyright © 2007 Free Software Foundation, Inc.  Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"GNU General Public License","text":"GNU General Public License free, copyleft license software kinds works. licenses software practical works designed take away freedom share change works. contrast, GNU General Public License intended guarantee freedom share change versions program–make sure remains free software users. , Free Software Foundation, use GNU General Public License software; applies also work released way authors. can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge wish), receive source code can get want , can change software use pieces new free programs, know can things. protect rights, need prevent others denying rights asking surrender rights. Therefore, certain responsibilities distribute copies software, modify : responsibilities respect freedom others. example, distribute copies program, whether gratis fee, must pass recipients freedoms received. must make sure , , receive can get source code. must show terms know rights. Developers use GNU GPL protect rights two steps: (1) assert copyright software, (2) offer License giving legal permission copy, distribute /modify . developers’ authors’ protection, GPL clearly explains warranty free software. users’ authors’ sake, GPL requires modified versions marked changed, problems attributed erroneously authors previous versions. devices designed deny users access install run modified versions software inside , although manufacturer can . fundamentally incompatible aim protecting users’ freedom change software. systematic pattern abuse occurs area products individuals use, precisely unacceptable. Therefore, designed version GPL prohibit practice products. problems arise substantially domains, stand ready extend provision domains future versions GPL, needed protect freedom users. Finally, every program threatened constantly software patents. States allow patents restrict development use software general-purpose computers, , wish avoid special danger patents applied free program make effectively proprietary. prevent , GPL assures patents used render program non-free. precise terms conditions copying, distribution modification follow.","code":""},{"path":[]},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_0-definitions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"0. Definitions","title":"GNU General Public License","text":"“License” refers version 3 GNU General Public License. “Copyright” also means copyright-like laws apply kinds works, semiconductor masks. “Program” refers copyrightable work licensed License. licensee addressed “”. “Licensees” “recipients” may individuals organizations. “modify” work means copy adapt part work fashion requiring copyright permission, making exact copy. resulting work called “modified version” earlier work work “based ” earlier work. “covered work” means either unmodified Program work based Program. “propagate” work means anything , without permission, make directly secondarily liable infringement applicable copyright law, except executing computer modifying private copy. Propagation includes copying, distribution (without modification), making available public, countries activities well. “convey” work means kind propagation enables parties make receive copies. Mere interaction user computer network, transfer copy, conveying. interactive user interface displays “Appropriate Legal Notices” extent includes convenient prominently visible feature (1) displays appropriate copyright notice, (2) tells user warranty work (except extent warranties provided), licensees may convey work License, view copy License. interface presents list user commands options, menu, prominent item list meets criterion.","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_1-source-code","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"1. Source Code","title":"GNU General Public License","text":"“source code” work means preferred form work making modifications . “Object code” means non-source form work. “Standard Interface” means interface either official standard defined recognized standards body, , case interfaces specified particular programming language, one widely used among developers working language. “System Libraries” executable work include anything, work whole, () included normal form packaging Major Component, part Major Component, (b) serves enable use work Major Component, implement Standard Interface implementation available public source code form. “Major Component”, context, means major essential component (kernel, window system, ) specific operating system () executable work runs, compiler used produce work, object code interpreter used run . “Corresponding Source” work object code form means source code needed generate, install, (executable work) run object code modify work, including scripts control activities. However, include work’s System Libraries, general-purpose tools generally available free programs used unmodified performing activities part work. example, Corresponding Source includes interface definition files associated source files work, source code shared libraries dynamically linked subprograms work specifically designed require, intimate data communication control flow subprograms parts work. Corresponding Source need include anything users can regenerate automatically parts Corresponding Source. Corresponding Source work source code form work.","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_2-basic-permissions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"2. Basic Permissions","title":"GNU General Public License","text":"rights granted License granted term copyright Program, irrevocable provided stated conditions met. License explicitly affirms unlimited permission run unmodified Program. output running covered work covered License output, given content, constitutes covered work. License acknowledges rights fair use equivalent, provided copyright law. may make, run propagate covered works convey, without conditions long license otherwise remains force. may convey covered works others sole purpose make modifications exclusively , provide facilities running works, provided comply terms License conveying material control copyright. thus making running covered works must exclusively behalf, direction control, terms prohibit making copies copyrighted material outside relationship . Conveying circumstances permitted solely conditions stated . Sublicensing allowed; section 10 makes unnecessary.","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_3-protecting-users-legal-rights-from-anti-circumvention-law","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"3. Protecting Users’ Legal Rights From Anti-Circumvention Law","title":"GNU General Public License","text":"covered work shall deemed part effective technological measure applicable law fulfilling obligations article 11 WIPO copyright treaty adopted 20 December 1996, similar laws prohibiting restricting circumvention measures. convey covered work, waive legal power forbid circumvention technological measures extent circumvention effected exercising rights License respect covered work, disclaim intention limit operation modification work means enforcing, work’s users, third parties’ legal rights forbid circumvention technological measures.","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_4-conveying-verbatim-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"4. Conveying Verbatim Copies","title":"GNU General Public License","text":"may convey verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice; keep intact notices stating License non-permissive terms added accord section 7 apply code; keep intact notices absence warranty; give recipients copy License along Program. may charge price price copy convey, may offer support warranty protection fee.","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_5-conveying-modified-source-versions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"5. Conveying Modified Source Versions","title":"GNU General Public License","text":"may convey work based Program, modifications produce Program, form source code terms section 4, provided also meet conditions: ) work must carry prominent notices stating modified , giving relevant date. b) work must carry prominent notices stating released License conditions added section 7. requirement modifies requirement section 4 “keep intact notices”. c) must license entire work, whole, License anyone comes possession copy. License therefore apply, along applicable section 7 additional terms, whole work, parts, regardless packaged. License gives permission license work way, invalidate permission separately received . d) work interactive user interfaces, must display Appropriate Legal Notices; however, Program interactive interfaces display Appropriate Legal Notices, work need make . compilation covered work separate independent works, nature extensions covered work, combined form larger program, volume storage distribution medium, called “aggregate” compilation resulting copyright used limit access legal rights compilation’s users beyond individual works permit. Inclusion covered work aggregate cause License apply parts aggregate.","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_6-conveying-non-source-forms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"6. Conveying Non-Source Forms","title":"GNU General Public License","text":"may convey covered work object code form terms sections 4 5, provided also convey machine-readable Corresponding Source terms License, one ways: ) Convey object code , embodied , physical product (including physical distribution medium), accompanied Corresponding Source fixed durable physical medium customarily used software interchange. b) Convey object code , embodied , physical product (including physical distribution medium), accompanied written offer, valid least three years valid long offer spare parts customer support product model, give anyone possesses object code either (1) copy Corresponding Source software product covered License, durable physical medium customarily used software interchange, price reasonable cost physically performing conveying source, (2) access copy Corresponding Source network server charge. c) Convey individual copies object code copy written offer provide Corresponding Source. alternative allowed occasionally noncommercially, received object code offer, accord subsection 6b. d) Convey object code offering access designated place (gratis charge), offer equivalent access Corresponding Source way place charge. need require recipients copy Corresponding Source along object code. place copy object code network server, Corresponding Source may different server (operated third party) supports equivalent copying facilities, provided maintain clear directions next object code saying find Corresponding Source. Regardless server hosts Corresponding Source, remain obligated ensure available long needed satisfy requirements. e) Convey object code using peer--peer transmission, provided inform peers object code Corresponding Source work offered general public charge subsection 6d. separable portion object code, whose source code excluded Corresponding Source System Library, need included conveying object code work. “User Product” either (1) “consumer product”, means tangible personal property normally used personal, family, household purposes, (2) anything designed sold incorporation dwelling. determining whether product consumer product, doubtful cases shall resolved favor coverage. particular product received particular user, “normally used” refers typical common use class product, regardless status particular user way particular user actually uses, expects expected use, product. product consumer product regardless whether product substantial commercial, industrial non-consumer uses, unless uses represent significant mode use product. “Installation Information” User Product means methods, procedures, authorization keys, information required install execute modified versions covered work User Product modified version Corresponding Source. information must suffice ensure continued functioning modified object code case prevented interfered solely modification made. convey object code work section , , specifically use , User Product, conveying occurs part transaction right possession use User Product transferred recipient perpetuity fixed term (regardless transaction characterized), Corresponding Source conveyed section must accompanied Installation Information. requirement apply neither third party retains ability install modified object code User Product (example, work installed ROM). requirement provide Installation Information include requirement continue provide support service, warranty, updates work modified installed recipient, User Product modified installed. Access network may denied modification materially adversely affects operation network violates rules protocols communication across network. Corresponding Source conveyed, Installation Information provided, accord section must format publicly documented (implementation available public source code form), must require special password key unpacking, reading copying.","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_7-additional-terms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"7. Additional Terms","title":"GNU General Public License","text":"“Additional permissions” terms supplement terms License making exceptions one conditions. Additional permissions applicable entire Program shall treated though included License, extent valid applicable law. additional permissions apply part Program, part may used separately permissions, entire Program remains governed License without regard additional permissions. convey copy covered work, may option remove additional permissions copy, part . (Additional permissions may written require removal certain cases modify work.) may place additional permissions material, added covered work, can give appropriate copyright permission. Notwithstanding provision License, material add covered work, may (authorized copyright holders material) supplement terms License terms: ) Disclaiming warranty limiting liability differently terms sections 15 16 License; b) Requiring preservation specified reasonable legal notices author attributions material Appropriate Legal Notices displayed works containing ; c) Prohibiting misrepresentation origin material, requiring modified versions material marked reasonable ways different original version; d) Limiting use publicity purposes names licensors authors material; e) Declining grant rights trademark law use trade names, trademarks, service marks; f) Requiring indemnification licensors authors material anyone conveys material (modified versions ) contractual assumptions liability recipient, liability contractual assumptions directly impose licensors authors. non-permissive additional terms considered “restrictions” within meaning section 10. Program received , part , contains notice stating governed License along term restriction, may remove term. license document contains restriction permits relicensing conveying License, may add covered work material governed terms license document, provided restriction survive relicensing conveying. add terms covered work accord section, must place, relevant source files, statement additional terms apply files, notice indicating find applicable terms. Additional terms, permissive non-permissive, may stated form separately written license, stated exceptions; requirements apply either way.","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_8-termination","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"8. Termination","title":"GNU General Public License","text":"may propagate modify covered work except expressly provided License. attempt otherwise propagate modify void, automatically terminate rights License (including patent licenses granted third paragraph section 11). However, cease violation License, license particular copyright holder reinstated () provisionally, unless copyright holder explicitly finally terminates license, (b) permanently, copyright holder fails notify violation reasonable means prior 60 days cessation. Moreover, license particular copyright holder reinstated permanently copyright holder notifies violation reasonable means, first time received notice violation License (work) copyright holder, cure violation prior 30 days receipt notice. Termination rights section terminate licenses parties received copies rights License. rights terminated permanently reinstated, qualify receive new licenses material section 10.","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_9-acceptance-not-required-for-having-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"9. Acceptance Not Required for Having Copies","title":"GNU General Public License","text":"required accept License order receive run copy Program. Ancillary propagation covered work occurring solely consequence using peer--peer transmission receive copy likewise require acceptance. However, nothing License grants permission propagate modify covered work. actions infringe copyright accept License. Therefore, modifying propagating covered work, indicate acceptance License .","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_10-automatic-licensing-of-downstream-recipients","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"10. Automatic Licensing of Downstream Recipients","title":"GNU General Public License","text":"time convey covered work, recipient automatically receives license original licensors, run, modify propagate work, subject License. responsible enforcing compliance third parties License. “entity transaction” transaction transferring control organization, substantially assets one, subdividing organization, merging organizations. propagation covered work results entity transaction, party transaction receives copy work also receives whatever licenses work party’s predecessor interest give previous paragraph, plus right possession Corresponding Source work predecessor interest, predecessor can get reasonable efforts. may impose restrictions exercise rights granted affirmed License. example, may impose license fee, royalty, charge exercise rights granted License, may initiate litigation (including cross-claim counterclaim lawsuit) alleging patent claim infringed making, using, selling, offering sale, importing Program portion .","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_11-patents","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"11. Patents","title":"GNU General Public License","text":"“contributor” copyright holder authorizes use License Program work Program based. work thus licensed called contributor’s “contributor version”. contributor’s “essential patent claims” patent claims owned controlled contributor, whether already acquired hereafter acquired, infringed manner, permitted License, making, using, selling contributor version, include claims infringed consequence modification contributor version. purposes definition, “control” includes right grant patent sublicenses manner consistent requirements License. contributor grants non-exclusive, worldwide, royalty-free patent license contributor’s essential patent claims, make, use, sell, offer sale, import otherwise run, modify propagate contents contributor version. following three paragraphs, “patent license” express agreement commitment, however denominated, enforce patent (express permission practice patent covenant sue patent infringement). “grant” patent license party means make agreement commitment enforce patent party. convey covered work, knowingly relying patent license, Corresponding Source work available anyone copy, free charge terms License, publicly available network server readily accessible means, must either (1) cause Corresponding Source available, (2) arrange deprive benefit patent license particular work, (3) arrange, manner consistent requirements License, extend patent license downstream recipients. “Knowingly relying” means actual knowledge , patent license, conveying covered work country, recipient’s use covered work country, infringe one identifiable patents country reason believe valid. , pursuant connection single transaction arrangement, convey, propagate procuring conveyance , covered work, grant patent license parties receiving covered work authorizing use, propagate, modify convey specific copy covered work, patent license grant automatically extended recipients covered work works based . patent license “discriminatory” include within scope coverage, prohibits exercise , conditioned non-exercise one rights specifically granted License. may convey covered work party arrangement third party business distributing software, make payment third party based extent activity conveying work, third party grants, parties receive covered work , discriminatory patent license () connection copies covered work conveyed (copies made copies), (b) primarily connection specific products compilations contain covered work, unless entered arrangement, patent license granted, prior 28 March 2007. Nothing License shall construed excluding limiting implied license defenses infringement may otherwise available applicable patent law.","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_12-no-surrender-of-others-freedom","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"12. No Surrender of Others’ Freedom","title":"GNU General Public License","text":"conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. convey covered work satisfy simultaneously obligations License pertinent obligations, consequence may convey . example, agree terms obligate collect royalty conveying convey Program, way satisfy terms License refrain entirely conveying Program.","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_13-use-with-the-gnu-affero-general-public-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"13. Use with the GNU Affero General Public License","title":"GNU General Public License","text":"Notwithstanding provision License, permission link combine covered work work licensed version 3 GNU Affero General Public License single combined work, convey resulting work. terms License continue apply part covered work, special requirements GNU Affero General Public License, section 13, concerning interaction network apply combination .","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_14-revised-versions-of-this-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"14. Revised Versions of this License","title":"GNU General Public License","text":"Free Software Foundation may publish revised /new versions GNU General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies certain numbered version GNU General Public License “later version” applies , option following terms conditions either numbered version later version published Free Software Foundation. Program specify version number GNU General Public License, may choose version ever published Free Software Foundation. Program specifies proxy can decide future versions GNU General Public License can used, proxy’s public statement acceptance version permanently authorizes choose version Program. Later license versions may give additional different permissions. However, additional obligations imposed author copyright holder result choosing follow later version.","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_15-disclaimer-of-warranty","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"15. Disclaimer of Warranty","title":"GNU General Public License","text":"WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION.","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_16-limitation-of-liability","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"16. Limitation of Liability","title":"GNU General Public License","text":"EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MODIFIES /CONVEYS PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES.","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_17-interpretation-of-sections-15-and-16","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"17. Interpretation of Sections 15 and 16","title":"GNU General Public License","text":"disclaimer warranty limitation liability provided given local legal effect according terms, reviewing courts shall apply local law closely approximates absolute waiver civil liability connection Program, unless warranty assumption liability accompanies copy Program return fee. END TERMS CONDITIONS","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"GNU General Public License","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively state exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program terminal interaction, make output short notice like starts interactive mode: hypothetical commands show w show c show appropriate parts General Public License. course, program’s commands might different; GUI interface, use “box”. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. information , apply follow GNU GPL, see . GNU General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License. first, please read .","code":" Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details."},{"path":[]},{"path":"https://pglpm.github.io/inferno/articles/vignette_mutualinfo.html","id":"association-and-traditional-measures-for-it","dir":"Articles","previous_headings":"Brief overview of the theory behind Mutual Information","what":"Association and traditional measures for it","title":"Associations of variates with mutual information","text":"probability quantifies degree belief values variates, given know values variates. belief also reflect uncertainty: maximal belief 50%, minimal belief 0% 100%. cases wish quantify uncertainty average sense, rather specific values, given knowledge specific values. words, ask: average, uncertain set variates, given knowledge another set? average uncertainty low, say two sets variates highly correlated associated; otherwise, uncorrelated. using word ‘correlation’ general sense, specific sense “linear correlation” similar. Traditionally Pearson correlation coefficient “rr” used quantify association. extremely limited, however. essentially based assumption variates involved joint Gaussian distribution. consequence, measure linear association, rather general association. instance, graph two continuous variates XX YY semicircle, means YY function XX, therefore perfectly associated XX: know XX, can perfectly predict value YY. Yet Pearson correlation coefficient two variates 00 case, simply functional dependence YY XX linear: Similar limitations Pearson correlation coefficient demonstrated “Anscombe quartet” datasets. case two variates, limitations possibly misleading value Pearson correlation coefficient may serious problem, can visually inspect relation association variates. dealing multi-dimensional variates, visualization possible must rely numerical values measure use quantify “association”. cases Pearson correlation coefficient can highly misleading, let us conclude ’s association actually ’s strong one. Considering world highly non-linear, possibility far remote.","code":"X <- seq(-1, 1, length.out = 200) Y <- sqrt(1 - X^2) r <- cor(X, Y, method = 'pearson') plot(x = X, y = Y, type = 'p', main = paste0('Pearson correlation: ', signif(r, 2)))"},{"path":"https://pglpm.github.io/inferno/articles/vignette_mutualinfo.html","id":"mutual-information","dir":"Articles","previous_headings":"Brief overview of the theory behind Mutual Information","what":"Mutual Information","title":"Associations of variates with mutual information","text":"measure association suffer limitations discussed : mutual information XX YY. fact following important properties: association whatever XX YY, sense knowledge one never changes probabilities , mutual information zero. Vice versa, mutual information zero, association whatever XX YY. XX YY perfect association, , knowing XX gives us perfect knowledge YY vice versa, yet words YY function XX vice versa, mutual information takes maximal possible value. Vice versa, mutual information takes maximal value, one variate function . Regarding last feature, note functional dependence XX YY can kind, just linear. means case semicircle plot , mutual information XX YY maximal value. ’s also special case maximal value mutual information zero, indicates YY , technically speaking, function XX, yet knowledge XX doesn’t give us knowledge YY. ’s case YY just one value, independently XX: Mutual information measured shannons (symbol Sh\\mathrm{Sh}), hartleys (symbol 1\\mathrm{1}), natural units (symbol 1\\mathrm{1}). units properties mutual information standardized International Organization Standardization (ISO) International Electrotechnical Commission (IEC). minimum possible value mutual information always zero. maximum possible value depends instead variates XX YY.","code":""},{"path":"https://pglpm.github.io/inferno/articles/vignette_mutualinfo.html","id":"interpretation-of-the-values-of-mutual-information","dir":"Articles","previous_headings":"Brief overview of the theory behind Mutual Information","what":"Interpretation of the values of mutual information","title":"Associations of variates with mutual information","text":"value mutual information two variates operational meaning interpretation. understand must first summarize meaning Shannon information measure uncertainty acquired information. value ss shannons represents uncertainty equivalent knowing among 2s2^s possible alternatives true one. 1Sh1\\,\\mathrm{Sh} represents uncertainty two equally possible cases, like outcome coin toss. examples: 3Sh3\\,\\mathrm{Sh} represent uncertain among 8 equally possible alternatives; 1.58Sh1.58\\,\\mathrm{Sh} represent uncertain among 3 equally possible alternatives. clinician uncertain disease, among four equally possible ones, affects patient, clinician’s uncertainty 2Sh2\\,\\mathrm{Sh}. “equivalence” definition reflects fact possibilities may higher probabilities others. instance, three alternatives one 0% probability, uncertainty 1Sh1\\,\\mathrm{Sh}, two equally possible alternatives. three possibilities probabilities 11.4%, 11.4%, 77.2%, uncertainty approximately 1Sh1\\,\\mathrm{Sh}: two alternatives; one alternative much higher probability two. Back mutual information: mutual information XX YY amounts hShh\\,\\mathrm{Sh}, knowledge XX reduces, average, 2h2^h times number uncertain possibilities YY. example, suppose clinician uncertain four possible diseases diagnosis (uncertainty 2Sh2\\,\\mathrm{Sh}), particular clinical indicator associated disease. mutual information indicator disease 1Sh1\\,\\mathrm{Sh}, clinician roughly uncertain two possible diseases, rather four, upon testing clinical indicator. mutual information 2Sh2\\,\\mathrm{Sh} instead, indicator tell disease certainty. might think: “value mutual information difficult interpret”. matter getting familiar , using . Remember difficult get feeling particular value Pearson correlation rr really meant, first learned . developed intuitive understanding range values simply using . holds mutual information. discussion mutual information entropic measures association, take look Information, relevance, independence, association references given .","code":""},{"path":"https://pglpm.github.io/inferno/articles/vignette_mutualinfo.html","id":"function-for-the-calculation-of-mutual-information-between-variates","dir":"Articles","previous_headings":"","what":"Function for the calculation of mutual information between variates","title":"Associations of variates with mutual information","text":"software offers function mutualinfo() calculate mutual information set joint variates Y1Y_1 another set Y2Y_2. requires least three arguments: Y1names: vector names (strings) variates first set; Y2names: vector names variates second set; learnt: knowledge acquired dataset, calculated learn() function. may useful specify two arguments: parallel: number CPUs use computation; nsamples: number samples use computation mutual information (default 3600). output function list several entropic measures information. example can focus two outputs: $MI: vector two numbers: value value mutual information shannons; error numerical error (coming Monte Carlo calculation); $MImax: vector two numbers: value value maximal possible value mutual information, shannons; error numerical error.","code":""},{"path":"https://pglpm.github.io/inferno/articles/vignette_mutualinfo.html","id":"example","dir":"Articles","previous_headings":"Function for the calculation of mutual information between variates","what":"Example","title":"Associations of variates with mutual information","text":"example, let’s take dataset inference problem discussed vignette Example use: inferences Parkinson’s Disease. Suppose want quantify association treatment group patient effect treatment. treatment group given TreatmentGroup binary variate, effect quantified difference MDS-UPDRS-III scores first second visits, variate diff.MDS.UPRS.III. use knowledge calculated saved learnt.rds file. mutual information TreatmentGroup diff.MDS.UPRS.III result 0Sh0\\,\\mathrm{Sh} within numerical error, possible maximal value around 1Sh1\\,\\mathrm{Sh}, shows essentially association treatment group effect. Note data change conclusion, though (calculation uncertainty later implemented package). can also quantify association two sets variates within subpopulation defined specific value additional variate X (may joint variate). subpopulation specified additional argument X mutualinfo() function. instance, let’s quantify association treatment group effect within subpopulation female patients : resulting mutual information zero, within twice numerical error. ’s slightly larger – though still extremely weak – association treatment group effect within female subpopulation. (CONTINUED)","code":"mutualinfoGroupEffect <- mutualinfo( Y1names = 'diff.MDS.UPRS.III', Y2names = 'TreatmentGroup', learnt = 'learnt.rds', parallel = 12 ) mutualinfoGroupEffect$MI #> value error #> 0.002816052 0.001065887 mutualinfoGroupEffect$MImax #> value error #> 9.998692e-01 9.717656e-05 mutualinfoGroupEffectFemales <- mutualinfo( Y1names = 'diff.MDS.UPRS.III', Y2names = 'TreatmentGroup', X = data.frame(Sex = 'Female'), learnt = 'learnt.rds', parallel = 12 ) mutualinfoGroupEffectFemales$MI #> value error #> 0.002208982 0.001186844 mutualinfoGroupEffectFemales$MImax #> value error #> 1.0000029105 0.0001987814"},{"path":"https://pglpm.github.io/inferno/articles/vignette_parkinson.html","id":"purpose","dir":"Articles","previous_headings":"","what":"Purpose","title":"Example of use: inferences for Parkinson's Disease","text":"toy example showing kinds results can obtained Bayesian nonparametric exchangeable inference. example involves inferences investigations Parkinson’s Disease described paper Brakedal & al. (2022), generously professionally shares data. investigations cited paper involve 30 subjects, various data collected. Fifteen subjects belong control group, 15 treatment group, denoted NR. group received nicotinamide adenine dinucleotide (NAD) replenishment therapy, via oral intake nicotinamide riboside (NR). toy example follow reproduce paper’s investigations, use variates observed. limit 7 variates subject. list brief description : Treatment group: Binary variate values Placebo NR. Sex: Binary variate values Female Male. Age: Integer variate, continuous rounded variate. Anamnestic loss smell: Binary variate values Yes. History REM sleep behaviour disorder: Binary variate values Yes. MDS-UPDRS-III score first subject visit: MDS-UPDRS-III (Movement Disorder Society’s Unified Parkinson’s Disease Rating Scale) one set ordinal scales assess subject’s degree disability monitor time. scale III ranges 0 (disability) 132 (highest degree disability). Given operations sum average performed scales literature, scales considered interval kind rather simply ordinal. Difference MDS-UPDRS-III scores second first visit: Ordinal variate, difference previous one subject’s second first visit. range therefore -132 +132, negative values representing improvement. store name datafile values two subjects:","code":"datafile <- 'toydata.csv'"},{"path":"https://pglpm.github.io/inferno/articles/vignette_parkinson.html","id":"natural-vs-controlled-or-biased-variates","dir":"Articles","previous_headings":"Purpose","what":"“Natural” vs controlled or “biased” variates","title":"Example of use: inferences for Parkinson's Disease","text":"purpose drawing scientific inferences, extremely important mindful variates dataset “natural” statistics, instead statistics controlled observer – therefore “biased”. distinction important dataset statistics controlled variates may representative naturally-occurring ones, therefore used inference purposes. present dataset, instance, numbers Placebo NR subjects decided investigators 50%/50% proportion. Obviously naturally occurring proportion; fact, even make sense speaking naturally occurring statistics TreatmentGroup variate. Sex variate, dataset proportion around 17% Female 83% Male subjects. proportion also partly stems selection procedure investigators, infer roughly 16% Parkinson patients national population females. also possible proportions Age variate may depend selection procedure. hand, investigators choose statistics two MDS.UPDRS variates, within groups particular values variates. conditional subpopulation statistics can taken representatives naturally-occurring ones (see Lindley & Novick (1980) brilliant discussion point). (add short explanation exchangeability)","code":""},{"path":"https://pglpm.github.io/inferno/articles/vignette_parkinson.html","id":"metadata","dir":"Articles","previous_headings":"","what":"Metadata","title":"Example of use: inferences for Parkinson's Disease","text":"Let’s load package: order draw inferences, need metadata information, , information variates present data. information mainly regard kind domain variate. example metadata necessary, suppose given data 3, 7, 9. Can say whether value 5 observed new instance? 4.7, -10? Knowing whether values possible, , greatly affects precision inferences draw. Obviously researcher must know basic information data collected – otherwise wouldn’t know ’re . software requires specification metadata either data.frame object .csv file. help prepare file, software offers function metadatatemplate(), writes template thereafter modify. template filled tentative values; wild guesses data, often wrong. function explains heuristic using order pre-fill fields metadata file, gives warnings guessed values especially dubious. examine correct fields: can open temporary metadata file temp_metadata.csv edit software choice. Let’s save corrected version meta_toydata.csv: metadata follows; NA indicate empty fields: description metadata fields, see help metadata ?inferno::metadata. (written !)","code":"library(inferno) metadatatemplate(data = datafile, file = 'temp_metadata') #> #> Analyzing 7 variates for 30 datapoints. #> #> * \"TreatmentGroup\" variate: #> - 2 different values detected: #> \"NR\", \"Placebo\" #> which do not seem to refer to an ordered scale. #> Assuming variate to be NOMINAL. #> #> * \"Sex\" variate: #> - 2 different values detected: #> \"Female\", \"Male\" #> which do not seem to refer to an ordered scale. #> Assuming variate to be NOMINAL. #> #> * \"Age\" variate: #> - Numeric values between 29 and 75 #> Assuming variate to be CONTINUOUS. #> - Distance between datapoints is a multiple of 1 #> Assuming variate to be ROUNDED. #> - All values are positive #> Assuming \"domainmin\" to be 0 #> #> * \"Anamnestic.Loss.of.smell\" variate: #> - 2 different values detected: #> \"No\", \"Yes\" #> which do not seem to refer to an ordered scale. #> Assuming variate to be NOMINAL. #> #> * \"History.of.REM.Sleep.Behaviour.Disorder\" variate: #> - 2 different values detected: #> \"No\", \"Yes\" #> which do not seem to refer to an ordered scale. #> Assuming variate to be NOMINAL. #> #> * \"MDS.UPDRS..Subsection.III.V1\" variate: #> - Numeric values between 15 and 50 #> Assuming variate to be CONTINUOUS. #> - Distance between datapoints is a multiple of 1 #> Assuming variate to be ROUNDED. #> - All values are positive #> Assuming \"domainmin\" to be 0 #> #> * \"diff.MDS.UPRS.III\" variate: #> - Numeric values between -9 and 10 #> Assuming variate to be CONTINUOUS. #> - Distance between datapoints is a multiple of 1 #> Assuming variate to be ROUNDED. #> ========= #> WARNINGS - please make sure to check these variates in the metadata file: #> #> * \"Age\" variate appears to be continuous and rounded, #> but it could also be an ordinal variate #> #> * \"MDS.UPDRS..Subsection.III.V1\" variate appears to be continuous and rounded, #> but it could also be an ordinal variate #> #> * \"diff.MDS.UPRS.III\" variate appears to be continuous and rounded, #> but it could also be an ordinal variate #> ========= #> #> Saved proposal metadata file as \"temp_metadata.csv\" metadatafile <- 'meta_toydata.csv'"},{"path":"https://pglpm.github.io/inferno/articles/vignette_parkinson.html","id":"learning","dir":"Articles","previous_headings":"","what":"Learning","title":"Example of use: inferences for Parkinson's Disease","text":"inferences based data already observed, mainly take form probabilities unkonwn values various quantities YY, given observed values quantities XX: Pr(Y=y|X=x,data) \\mathrm{Pr}(Y = y \\:\\vert\\: X = x, \\mathrm{data}) notation indicates, probabilities also depend data\\mathrm{data} already observed. usually called “posterior probabilities”. need prepare software perform calculations posterior probabilities given observed data. machine learning analogous process called “learning”. reason function achieves called learn(). requires least three arguments: data, can given path csv file containing data metadata, can also given path metadata file outputdir: name directory output saved. may useful specify two arguments: seed: seed random-number generator, ensure reproducibility parallel: number CPUs use computation Alternatively can set seed set.seed(), start set parallel workers parallel::makeCluster() doParallel::registerDoParallel() commands. “learning” computation can take tens minutes, hours, even days depending number variates data inference problem. learn() function outputs various messages computation proceeding. example: end computation learn() function returns name directory results saved. code snipped , name saved variable learnt. object containing information needed make inferences learnt.rds file within directory.","code":"learnt <- learn( data = datafile, metadata = metadatafile, outputdir = 'parkinson_computations', seed = 16, parallel = 12) #> Registered doParallelSNOW with 12 workers #> #> Using 30 datapoints #> Calculating auxiliary metadata #> #> ************************** #> Saving output in directory #> parkinson_computations #> ************************** #> Starting Monte Carlo sampling of 3600 samples by 60 chains #> in a space of 703 (effectively 6657) dimensions. #> Using 12 cores: 60 samples per chain, 5 chains per core. #> Core logs are being saved in individual files. #> #> C-compiling samplers appropriate to the variates (package Nimble) #> this can take tens of minutes with many data or variates. #> Please wait..."},{"path":"https://pglpm.github.io/inferno/articles/vignette_parkinson.html","id":"drawing-inferences","dir":"Articles","previous_headings":"","what":"Drawing inferences","title":"Example of use: inferences for Parkinson's Disease","text":"finally ready use software drawing inferences, testing hypotheses, similar scientific investigations. observed data, software allows us find probability question hypothesis interest. important, though, hypothesis stated unambiguous, quantitative form.","code":""},{"path":"https://pglpm.github.io/inferno/articles/vignette_parkinson.html","id":"first-example-effect-on-treated-patient-of-female-sex","dir":"Articles","previous_headings":"Drawing inferences","what":"First example: effect on treated patient of female sex","title":"Example of use: inferences for Parkinson's Disease","text":"example, might want ask: “NAD-replenishment therapy effect females?”. first may sound like valid scientific hypothesis. carefully examine statement realize vague. First, “effect” mean exactly? can quantified? Second, can really say therapy either effect? degrees efficacy involved? Third, asking question ? next patient may see? population remaining patients? Let us make initial question quantitatively clear. First, let us translate “effect” difference MDS-UPDRS-III scores first second visits subject (visit 2 −- visit 1), represented variate diff.MDS.UPRS.III. Note choices made, difference another MDS-UPDRS score (–IV), total scores, ratio rather difference – variate altogether. Second, instead asking unrealistic dichotomous question “?”, ask strong effect , quantified value MDS-UPDRS-III decrease. Third, let us ask question possible next patient. shall see question also related population whole. can calculate probability , next patient, shall observe particular value yy MDS-UPDRS-III difference, given patient Female, given observed clinical trials: Pr(MDS-UPDRS-III difference=y|Sex=Female,Treatment group=NR,data) \\mathrm{Pr}(\\text{MDS-UPDRS-III difference} = y \\:\\vert\\: \\text{Sex} = \\text{Female}, \\text{Treatment group} = \\text{NR}, \\mathrm{data}) function Pr(Y, X, learnt), accepts three arguments: Y: variates values want probability X: variates values known learnt: knowledge acquired dataset Let us first ask specific value MDS-UPDRS-III difference, let’s say 0: output Pr() function list several objects, discuss two moment: value: value probability wanted know. case , approximately 6.4% probability next treated female patient MDS-UPDRS-III difference exactly 0. quantiles: values tell us much probability change, knowledge updated clinical trials. thus quantify uncertainty present probabilistic conclusions. future, updated probability 89% probability lying two extreme (5.5% 94.5%) quantile values, 50% probability lying middle (25% 75%) ones q(typical intervals used Bayesian literature, see instance Makowski et al.). case , many clinical trials, probability change value within around 2.9% 11%. can obviously also ask probabilities possible values MDS-UPDRS-III difference next treated female patient: probability thus obtained two accompanying quantiles related uncertainty. can visualized plot() function: Two aspects plot relevant investigation: seems slightly probability mass towards negative MDS-UPDRS-III differences – means improvement degree disability. shall quantify moment. However, also clear clinical trials lead quite different probability distribution. shown breadth quantile range. Another way graphically represent see potential variability result trials available, plot examples – say 100 – results differ. examples stored third object, samples given Pr() function: Let us ask interesting question, can quantitative counterpart initial question “NAD-replenishment therapy effect females?”. ask: next treated female patient experience MDS-UPDRS-III difference equal −1-1 less?“. therefore want probability Pr(MDS-UPDRS-III diff.≤−1|Sex=Female,Treatment=NR,data) \\mathrm{Pr}(\\text{MDS-UPDRS-III diff.} \\le -1 \\:\\vert\\: \\text{Sex} = \\text{Female}, \\text{Treatment} = \\text{NR}, \\mathrm{data}) probability can calculated function tailPr(Y, X, learnt), analogous Pr() function, calculates probability Y≤yY\\le y rather Y=yY = y. answer probability decrease disability score approximately 55%; note clearly higher 50%. clinical trials, however update probability new value 34% 75%:","code":"probability0 <- Pr( Y = data.frame(diff.MDS.UPRS.III = 0), X = data.frame(Sex = 'Female', TreatmentGroup = 'NR'), learnt = learnt ) probability0$value #> X #> Y [,1] #> [1,] 0.06420201 probability0$quantiles #> , , = 5.5% #> #> X #> Y [,1] #> [1,] 0.02893608 #> #> , , = 25% #> #> X #> Y [,1] #> [1,] 0.04481232 #> #> , , = 75% #> #> X #> Y [,1] #> [1,] 0.07756895 #> #> , , = 94.5% #> #> X #> Y [,1] #> [1,] 0.1119128 probabilities <- Pr( Y = data.frame(diff.MDS.UPRS.III = (-30):30), X = data.frame(Sex = 'Female', TreatmentGroup = 'NR'), learnt = learnt ) plot(probabilities) plot(probabilities, variability = 'samples', ylim = c(0, max(probabilities$quantiles)) # keep same y-range as before ) probDecrease <- tailPr( Y = data.frame(diff.MDS.UPRS.III = -1), X = data.frame(Sex = 'Female', TreatmentGroup = 'NR'), learnt = learnt ) probDecrease$value #> X #> Y [,1] #> [1,] 0.5497687 probDecrease$quantiles[1,1,] #> 5.5% 25% 75% 94.5% #> 0.3428941 0.4639758 0.6415482 0.7474421"},{"path":"https://pglpm.github.io/inferno/articles/vignette_parkinson.html","id":"second-example-comparison-with-non-treated-patient-of-female-sex","dir":"Articles","previous_headings":"Drawing inferences","what":"Second example: comparison with non-treated patient of female sex","title":"Example of use: inferences for Parkinson's Disease","text":"previous example found 55% probability treated female patient experience decrease MDS-UPDRS-III therapy. can decrease really correlated therapy? preliminarily answer question, can find analogous probabilities female patient received treatment. use Pr(), X argument specify Placebo value Treatment group: Let’s plot probabilities, together variability (extreme case), top ones previously obtained treated case: seem difference stands treated non-treated case. , can calculate probability decrease MDS-UPDRS-III: find probability decrease disability score non-treated female patient approximately 54%. clinical trials, however update probability value 33% 74%: Therefore see similarly probable decrease non-treated well non-treated female patient. small difference two probabilities, favour treated case; difference small compared probabilities change trials available. preliminary conclusions possible questions future research: seem difference treated non-treated female patients, regarding MDS-UPDRS-III decrease. However, slightly likely decrease . decrease correlated ?","code":"probabilitiesPlacebo <- Pr( Y = data.frame(diff.MDS.UPRS.III = (-30):30), X = data.frame(Sex = 'Female', TreatmentGroup = 'Placebo'), learnt = learnt ) plotquantiles(x = (-30):30, y = probabilities$quantiles[,1, c('5.5%', '94.5%')], ylim = c(0, NA), xlab = 'MDS-UPDRS-III difference', ylab = 'probability', col = 3) plotquantiles(x = (-30):30, y = probabilitiesPlacebo$quantiles[,1, c('5.5%', '94.5%')], col = 2, add = TRUE) flexiplot(x = (-30):30, y = probabilities$values[,1], col = 3, lwd = 2, add = TRUE) flexiplot(x = (-30):30, y = probabilitiesPlacebo$values[,1], col = 2, lty = 2, add = TRUE) ## add 0-change line abline(v = 0, lwd = 1, col = 5) legend('topright', legend = c('NR, Female', 'Placebo, Female'), bty = 'n', lty = 1:2, col = 3:2) probDecreasePlacebo <- tailPr( Y = data.frame(diff.MDS.UPRS.III = -1), X = data.frame(Sex = 'Female', TreatmentGroup = 'Placebo'), learnt = learnt ) probDecreasePlacebo$value #> X #> Y [,1] #> [1,] 0.5432515 probDecreasePlacebo$quantiles[1,1,] #> 5.5% 25% 75% 94.5% #> 0.3332187 0.4538897 0.6325576 0.7434010"},{"path":"https://pglpm.github.io/inferno/articles/vignette_parkinson.html","id":"third-example-considering-age","dir":"Articles","previous_headings":"Drawing inferences","what":"Third example: considering age","title":"Example of use: inferences for Parkinson's Disease","text":"results far indicate practically difference probabilities MDS-UPDRS-III decrease treated vs non-treated female patient. probabilities, however, disregard patient’s age. possible larger differences different age groups? can answer question calculating probabilities conditional particular Age value, , Pr(MDS-UPDRS-III diff.≤−1|Sex=Female,Treatment=NR,Age=,data) \\mathrm{Pr}(\\text{MDS-UPDRS-III diff.} \\le -1 \\:\\vert\\: \\text{Sex} = \\text{Female}, \\text{Treatment} = \\text{NR}, \\text{Age} = , \\mathrm{data}) meaningful values aa age, let’s say 25 80. can find function tailPr(). time conditioning argument X include grid Age values. First calculation treated female patient, non-treated one: can plot probabilities MDS-UPDRS-III decrease patient’s age, one plot treatment group: plot shows interesting aspects: seem large difference, treated non-treated females, probability MDS-UPDRS-III decrease. 60–65 age group, increase MDS-UPDRS-III likely decrease, treated non-treated female patient. reason increase narrow age group? notice probabilities updated different values, clinical trials available.","code":"probDecreaseAge <- tailPr( Y = data.frame(diff.MDS.UPRS.III = -1), X = data.frame(Sex = 'Female', Age = 25:80, TreatmentGroup = 'NR'), learnt = learnt ) probDecreaseAgePlacebo <- tailPr( Y = data.frame(diff.MDS.UPRS.III = -1), X = data.frame(Sex = 'Female', Age = 25:80, TreatmentGroup = 'Placebo'), learnt = learnt ) plotquantiles(x = 25:80, y = probDecreaseAge$quantiles[1,, c('5.5%', '94.5%')], ylim = c(0, NA), xlab = 'age', ylab = 'probability of MDS-UPDRS-III decr.', col = 3) plotquantiles(x = 25:80, y = probDecreaseAgePlacebo$quantiles[1,, c('5.5%', '94.5%')], col = 2, add = TRUE) flexiplot(x = 25:80, y = probDecreaseAge$values[1,], col = 3, lwd = 2, add = TRUE) flexiplot(x = 25:80, y = probDecreaseAgePlacebo$values[1,], col = 2, lwd = 2, lty = 2, add = TRUE) ## add 50%-probability line abline(h = 0.5, lwd = 1, col = 5) legend('topright', legend = c('NR, Female', 'Placebo, Female'), bty = 'n', lty = 1:2, col = 3:2)"},{"path":"https://pglpm.github.io/inferno/articles/vignette_parkinson.html","id":"fourth-example-male-patient","dir":"Articles","previous_headings":"Drawing inferences","what":"Fourth example: male patient","title":"Example of use: inferences for Parkinson's Disease","text":"can perform analysis analogous previous examples, male patient. corresponding function calls plots. considering ages separately: Finally let’s compare treated female vs male patients, per age: (CONTINUED)","code":"probabilitiesMale <- Pr( Y = data.frame(diff.MDS.UPRS.III = (-30):30), X = data.frame(Sex = 'Male', TreatmentGroup = c('NR', 'Placebo')), learnt = learnt ) plotquantiles(x = (-30):30, y = probabilitiesMale$quantiles[,1, c('5.5%', '94.5%')], ylim = c(0, NA), xlab = 'MDS-UPDRS-III difference', ylab = 'probability', col = 7) plotquantiles(x = (-30):30, y = probabilitiesMale$quantiles[,2, c('5.5%', '94.5%')], col = 6, add = TRUE) flexiplot(x = (-30):30, y = probabilitiesMale$values[,1], col = 7, lwd = 2, add = TRUE) flexiplot(x = (-30):30, y = probabilitiesMale$values[,2], col = 6, lwd = 2, lty = 2, add = TRUE) ## add 0-change line abline(v = 0, lwd = 1, col = 5) legend('topright', legend = c('NR, Male', 'Placebo, Male'), bty = 'n', lty = 1:2, col = 7:6) probMaleDecreaseAge <- tailPr( Y = data.frame(diff.MDS.UPRS.III = -1), X = data.frame(Sex = 'Male', Age = 25:80, TreatmentGroup = 'NR'), learnt = learnt ) probMaleDecreaseAgePlacebo <- tailPr( Y = data.frame(diff.MDS.UPRS.III = -1), X = data.frame(Sex = 'Male', Age = 25:80, TreatmentGroup = 'Placebo'), learnt = learnt ) plotquantiles(x = 25:80, y = probMaleDecreaseAge$quantiles[1,, c('5.5%', '94.5%')], ylim = c(0, NA), xlab = 'age', ylab = 'probability of MDS-UPDRS-III decr.', col = 7) plotquantiles(x = 25:80, y = probMaleDecreaseAgePlacebo$quantiles[1,, c('5.5%', '94.5%')], col = 6, add = TRUE) flexiplot(x = 25:80, y = probMaleDecreaseAge$values[1,], col = 7, lwd = 2, add = TRUE) flexiplot(x = 25:80, y = probMaleDecreaseAgePlacebo$values[1,], col = 6, lwd = 2, lty = 2, add = TRUE) ## add 50%-probability line abline(h = 0.5, lwd = 1, col = 5) legend('topright', legend = c('NR, Male', 'Placebo, Male'), bty = 'n', lty = 1:2, col = 7:6) plotquantiles(x = 25:80, y = probDecreaseAge$quantiles[1,, c('5.5%', '94.5%')], ylim = c(0, NA), xlab = 'age', ylab = 'probability of MDS-UPDRS-III decr.', col = 3) plotquantiles(x = 25:80, y = probMaleDecreaseAge$quantiles[1,, c('5.5%', '94.5%')], col = 7, add = TRUE) flexiplot(x = 25:80, y = probDecreaseAge$values[1,], col = 3, lwd = 2, add = TRUE) flexiplot(x = 25:80, y = probMaleDecreaseAge$values[1,], col = 7, lwd = 2, lty = 2, add = TRUE) ## add 50%-probability line abline(h = 0.5, lwd = 1, col = 5) legend('topright', legend = c('NR, Female', 'NR, Male'), bty = 'n', lty = 1:2, col = c(3, 7))"},{"path":"https://pglpm.github.io/inferno/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"PierGianLuca Porta Mana. Author, maintainer. Aurora Grefsrud. Author. Håkon Mydland. Author.","code":""},{"path":"https://pglpm.github.io/inferno/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Porta Mana P, Grefsrud , Mydland H (2025). inferno: Bayesian nonparametric exchangeable inference - model-free uncertainty-quantified prediction. R package version 0.2.1, https://pglpm.github.io/inferno/, https://github.com/pglpm/inferno/.","code":"@Manual{, title = {inferno: Bayesian nonparametric exchangeable inference - model-free uncertainty-quantified prediction}, author = {PierGianLuca {Porta Mana} and Aurora Grefsrud and Håkon Mydland}, year = {2025}, note = {R package version 0.2.1, https://pglpm.github.io/inferno/}, url = {https://github.com/pglpm/inferno/}, }"},{"path":"https://pglpm.github.io/inferno/index.html","id":"bayesian-nonparametric-inference","dir":"","previous_headings":"","what":"Bayesian nonparametric exchangeable inference - model-free uncertainty-quantified prediction","title":"Bayesian nonparametric exchangeable inference - model-free uncertainty-quantified prediction","text":"repository provides R package theoretical background Bayesian nonparametric inference exchangeability, “inference populations”. package rapid development reached stable phase. means function names arguments may still change. package name also still consideration. However, core functionalities probability calculations work. code still ‘0.X’ phase, recommend contacting developers want start using package research project. love “beta-testers”!","code":""},{"path":"https://pglpm.github.io/inferno/index.html","id":"contact","dir":"","previous_headings":"","what":"Contact","title":"Bayesian nonparametric exchangeable inference - model-free uncertainty-quantified prediction","text":"Please report bugs request features specific documentation GitHub Issues. questions feel free contact developers: * application, theory, technical implementation: PierGianLuca Porta Mana pgl@portamana.org","code":""},{"path":"https://pglpm.github.io/inferno/index.html","id":"documentation","dir":"","previous_headings":"","what":"Documentation","title":"Bayesian nonparametric exchangeable inference - model-free uncertainty-quantified prediction","text":"View documentation pglpm.github.io/inferno. code still much development phase documentation also work progress. Tutorials posted soon possible. Feel free take look draft theoretical foundation. concrete example application medicine given paper; example applications machine learning paper paper.","code":""},{"path":"https://pglpm.github.io/inferno/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Bayesian nonparametric exchangeable inference - model-free uncertainty-quantified prediction","text":"Install package R using remotes package: install tagged version: install source, first clone repo: install package R: installation automatically also install required R-dependencies.","code":"remotes::install_github('pglpm/inferno') remotes::install_github('pglpm/inferno@vx.y.z') git clone https://github.com/pglpm/inferno.git install.packages(pkgs='path/to/inferno', repos=NULL)"},{"path":"https://pglpm.github.io/inferno/index.html","id":"further-reading","dir":"","previous_headings":"","what":"Further reading","title":"Bayesian nonparametric exchangeable inference - model-free uncertainty-quantified prediction","text":"low-level course Bayesian nonparametric population inference see Foundations data science.","code":""},{"path":"https://pglpm.github.io/inferno/reference/E.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate posterior probabilities — E","title":"Calculate posterior probabilities — E","text":"function calculates probability P(Y | X, data), Y X two (non overlapping) sets joint variates. function also gives quantiles possible variability probability P(Y | X, newdata, data) learning data provided, well number samples possible values probabilities. several joint values given Y X, function create 2D grid results possible compbinations given Y X values.","code":""},{"path":"https://pglpm.github.io/inferno/reference/E.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate posterior probabilities — E","text":"","code":"E( Ynames, X = NULL, learnt, quantiles = c(5, 95)/100, nsamples = 100L, parallel = TRUE, silent = FALSE, usememory = TRUE )"},{"path":"https://pglpm.github.io/inferno/reference/E.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate posterior probabilities — E","text":"X matrix data.table NULL: set values variates want condition joint probability Y. NULL (default), conditioning made (except conditioning learning dataset prior assumptions). One variate per column, one set values per row. learnt Either string name directory full path 'learnt.rds' object, object quantiles numeric vector, 0 1, NULL: desired quantiles variability probability Y. Default c(0.05, 0.95) 5% 95% quantiles. nsamples integer NULL: desired number samples variability probability Y. Default 100. parallel logical integer: whether use pre-existing parallel workers, many create use. Default TRUE. silent logical: give warnings updates computation? Default FALSE. usememory logical: save partial results disc, avoid crashes? Default TRUE. Y1names String vector: joint variates joint probability . One variate per column, one set values per row.","code":""},{"path":"https://pglpm.github.io/inferno/reference/E.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate posterior probabilities — E","text":"list : (1) matrix probabilities P(Y|X,data,assumptions), combinations values Y (rows) X (columns); (2) array variability quantiles (3rd dimension array) probabilities; (3) array variability samples (3rd dimension array) probabilities.","code":""},{"path":"https://pglpm.github.io/inferno/reference/Pr.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate posterior probabilities — Pr","title":"Calculate posterior probabilities — Pr","text":"function calculates probability P(Y | X, data), Y X two (non overlapping) sets joint variates. function also gives quantiles possible variability probability P(Y | X, newdata, data) learning data provided, well number samples possible values probabilities. several joint values given Y X, function create 2D grid results possible compbinations given Y X values. function also allows base-rate prior-probability corrections: prior (instance, base rate) Y given, function calculate P(Y | X, data, prior) P(X | Y, data) prior means Bayes's theorem.","code":""},{"path":"https://pglpm.github.io/inferno/reference/Pr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate posterior probabilities — Pr","text":"","code":"Pr( Y, X = NULL, learnt, priorY = NULL, nsamples = 100L, quantiles = c(0.055, 0.25, 0.75, 0.945), parallel = TRUE, silent = TRUE, usememory = TRUE, keepYX = TRUE )"},{"path":"https://pglpm.github.io/inferno/reference/Pr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate posterior probabilities — Pr","text":"Y matrix data.table: set values variates want joint probability . One variate per column, one set values per row. X matrix data.table NULL: set values variates want condition joint probability Y. NULL (default), conditioning made (except conditioning learning dataset prior assumptions). One variate per column, one set values per row. learnt Either string name directory full path 'learnt.rds' object, produced learn function, object . priorY numeric vector length rows Y, TRUE, NULL (default): prior probabilities base rates Y values. TRUE, prior probabilities assumed equal. nsamples integer NULL \"\": desired number samples variability probability Y. NULL, samples reported. \"\" (Inf), samples obtained learn function used. Default 100. quantiles numeric vector, 0 1, NULL: desired quantiles variability probability Y. Default c(0.055, 0.25, 0.75, 0.945), , 5.5%, 25%, 75%, 94.5% quantiles (typical quantile values Bayesian literature: give 50% 89% credibility intervals, correspond 1 shannons 0.5 shannons uncertainty). NULL, quantiles calculated. parallel logical integer: whether use pre-existing parallel workers, many create use. Default TRUE. silent logical: give warnings updates computation? Default FALSE. usememory logical: save partial results disc, avoid crashes? Default TRUE. keepYX logical, default TRUE: keep copy Y X arguments output? used plot method.","code":""},{"path":"https://pglpm.github.io/inferno/reference/Pr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate posterior probabilities — Pr","text":"list class probability, consisting elements values, possibly elements quantiles (non-NULL argument quantiles), samples (non-NULL argument nsample), Y, X. Element values: matrix probabilities P(Y|X,data,assumptions), combinations values Y (rows) X (columns). Element quantiles: array variability quantiles (3rd dimension array) probabilities. Element samples: array variability samples (3rd dimension array) probabilities. Elements Y, X: copies Y X arguments.","code":""},{"path":"https://pglpm.github.io/inferno/reference/buildauxmetadata.html","id":null,"dir":"Reference","previous_headings":"","what":"Build preliminary metadata flie — buildauxmetadata","title":"Build preliminary metadata flie — buildauxmetadata","text":"Build preliminary metadata flie","code":""},{"path":"https://pglpm.github.io/inferno/reference/buildauxmetadata.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Build preliminary metadata flie — buildauxmetadata","text":"","code":"buildauxmetadata(data, metadata, Dthreshold = 1, tscalefactor = 1.25)"},{"path":"https://pglpm.github.io/inferno/reference/buildauxmetadata.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Build preliminary metadata flie — buildauxmetadata","text":"data data.frame object metadata data.frame object Dthreshold positive number: threshold fraction unique datapoints total datapoints, decide whether treat rounded variate continuous tscalefactor positive number: scaling factor variate conversion","code":""},{"path":"https://pglpm.github.io/inferno/reference/buildauxmetadata.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Build preliminary metadata flie — buildauxmetadata","text":"auxmetadata data.frame object","code":""},{"path":"https://pglpm.github.io/inferno/reference/createQfunction.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate and save transformation function for ordinal variates — createQfunction","title":"Calculate and save transformation function for ordinal variates — createQfunction","text":"Calculate save transformation function ordinal variates","code":""},{"path":"https://pglpm.github.io/inferno/reference/createQfunction.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate and save transformation function for ordinal variates — createQfunction","text":"","code":"createQfunction( nint = 3600, nsamples = 2^24L, mean = 0, sd = 3, shapelo = 0.5, shapehi = 0.5, rate = 1, file = paste0(\"__Qfunction\", nint, \"_\", sd), save = TRUE, plot = FALSE )"},{"path":"https://pglpm.github.io/inferno/reference/flexiplot.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot numeric or character values — flexiplot","title":"Plot numeric or character values — flexiplot","text":"Plot function modifies expands graphics package's matplot function several ways. First, either x y arguments can class character. case, axes labels corresponding unique values used (see arguments xdomain ydomain). Second, allows specification lower upper limit xlim ylim arguments. Third, uses cleaner plotting style default argument type = 'l' (line plot) rather type = 'p' (point plot).","code":""},{"path":"https://pglpm.github.io/inferno/reference/flexiplot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot numeric or character values — flexiplot","text":"","code":"flexiplot( x, y, xdomain = NULL, ydomain = NULL, xlim = NULL, ylim = NULL, type = \"l\", pch = c(1, 0, 2, 5, 6, 3, 4), grid = TRUE, add = FALSE, lwd = 1, ... )"},{"path":"https://pglpm.github.io/inferno/reference/flexiplot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot numeric or character values — flexiplot","text":"x Numeric character: vector x-coordinates. missing, numeric vector 1:... created many values rows y. y Numeric character: vector y coordinates. missing, numeric vector 1:... created many values rows x. xdomain Character numeric NULL (default): vector possible values variable represented x-axis, case x argument character vector. ordering values respected. NULL, unique(x) used. ydomain Character numeric NULL (default): like xdomain y-coordinate. xlim NULL (default) vector two values. latter case, two values finite (including NA NULL), min max x-coordinate plotted points used. ylim NULL (default) vector two values. Like argument xlim, y-coordinates. grid Logical: whether plot light grid. Default TRUE. ... parameters passed matplot.","code":""},{"path":"https://pglpm.github.io/inferno/reference/inferno-package.html","id":null,"dir":"Reference","previous_headings":"","what":"inferno: Bayesian nonparametric exchangeable inference - model-free uncertainty-quantified prediction — inferno-package","title":"inferno: Bayesian nonparametric exchangeable inference - model-free uncertainty-quantified prediction — inferno-package","text":"Offers several functions Bayesian nonparametric exchangeable inference (also called \"density\" \"population\" inference), including Monte Carlo calculation posterior densities. machine-learning perspective, offers model-free, uncertainty-quantified prediction algorithm.","code":""},{"path":[]},{"path":"https://pglpm.github.io/inferno/reference/inferno-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"inferno: Bayesian nonparametric exchangeable inference - model-free uncertainty-quantified prediction — inferno-package","text":"Maintainer: PierGianLuca Porta Mana pgl@portamana.org (ORCID) Authors: Aurora Grefsrud agre@hvl.(ORCID) Håkon Mydland haakon.mydland@gmail.com (ORCID)","code":""},{"path":"https://pglpm.github.io/inferno/reference/learn.html","id":null,"dir":"Reference","previous_headings":"","what":"Monte Carlo computation of posterior probability distribution conditional on given data — learn","title":"Monte Carlo computation of posterior probability distribution conditional on given data — learn","text":"Monte Carlo computation posterior probability distribution conditional given data","code":""},{"path":"https://pglpm.github.io/inferno/reference/learn.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Monte Carlo computation of posterior probability distribution conditional on given data — learn","text":"","code":"learn( data, metadata, auxdata = NULL, outputdir = NULL, nsamples = 3600, nchains = 60, nsamplesperchain = 60, parallel = TRUE, seed = NULL, cleanup = TRUE, appendtimestamp = TRUE, appendinfo = TRUE, output = \"directory\", subsampledata = NULL, startupMCiterations = 3600, minMCiterations = 0, maxMCiterations = +Inf, maxhours = +Inf, ncheckpoints = NULL, relerror = 0.05, prior = missing(data), thinning = NULL, plottraces = TRUE, showKtraces = FALSE, showAlphatraces = FALSE, hyperparams = list(ncomponents = 64, minalpha = -4, maxalpha = 4, byalpha = 1, Rshapelo = 0.5, Rshapehi = 0.5, Rvarm1 = 3^2, Cshapelo = 0.5, Cshapehi = 0.5, Cvarm1 = 3^2, Dshapelo = 0.5, Dshapehi = 0.5, Dvarm1 = 3^2, Lshapelo = 0.5, Lshapehi = 0.5, Lvarm1 = 3^2, Bshapelo = 1, Bshapehi = 1, Dthreshold = 1, tscalefactor = 2) )"},{"path":"https://pglpm.github.io/inferno/reference/learn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Monte Carlo computation of posterior probability distribution conditional on given data — learn","text":"data dataset, given data.frame file path csv file. metadata metadata object, given either data.frame object, file pa csv file. auxdata larger dataset, given data.frame file path csv file. dataset many use Monte Carlo sampling, can used calculate hyperparameters. outputdir Character: path folder output saved. omitted, directory created name data file suffix \"_output_\". nsamples Integer: number desired Monte Carlo samples. Default 3600. nchains Integer: number Monte Carlo chains. Default 60. nsamplesperchain Integer: number Monte Carlo samples per chain. parallel Logical: use pre-existing parallel workers package doParallel. integer: create use many parallel workers. Default TRUE. seed Integer: use seed random number generator. missing NULL (default), set seed. cleanup Logical: remove diagnostic files end computation? Default TRUE. appendtimestamp Logical: append timestamp name output directory outputdir? Default TRUE. appendinfo Logical: append information dataset Monte Carlo parameters name output directory outputdir? Default TRUE. output Character: 'directory', return output directory name VALUE; string 'learnt', return 'learnt' object containing parameters obtained Monte Carlo computation. value: VALUE NULL. subsampledata Integer: use subset many datapoints Monte Carlo computation. startupMCiterations Integer: number initial (burn-) Monte Carlo iterations. Default 3600. minMCiterations Integer: minimum number Monte Carlo iterations done. Default 0. maxMCiterations Integer: many Monte Carlo iterations. Default Inf. maxhours Numeric: approximate time limit, hours, Monte Carlo computation last. Default Inf. ncheckpoints Integer: number datapoints use checking Monte Carlo computation end. NULL (default), equal number variates + 2. Inf, use datapoints. relerror Numeric: desired maximal relative error calculated probabilities respect variability new data. prior Logical: Calculate prior distribution? thinning Integer: thin Monte Carlo samples value. NULL (default): let diagnostics decide thinning value. plottraces Logical: save plots Monte Carlo traces diagnostic values? Default TRUE. showKtraces Logical: save plots Monte Carlo traces K parameter? Default FALSE. showAlphatraces Logical: save plots Monte Carlo traces Alpha parameter? Default FALSE. hyperparams List: hyperparameters prior.","code":""},{"path":"https://pglpm.github.io/inferno/reference/learn.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Monte Carlo computation of posterior probability distribution conditional on given data — learn","text":"Name directory containing output files, learnt object, NULL, depending argument output.","code":""},{"path":"https://pglpm.github.io/inferno/reference/metadatatemplate.html","id":null,"dir":"Reference","previous_headings":"","what":"Metadata and helper function for metadata — metadatatemplate","title":"Metadata and helper function for metadata — metadatatemplate","text":"Metadata helper function create template metadata file object.","code":""},{"path":"https://pglpm.github.io/inferno/reference/metadatatemplate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Metadata and helper function for metadata — metadatatemplate","text":"","code":"metadatatemplate( data, file = NULL, includevrt = NULL, excludevrt = NULL, addsummary2metadata = FALSE, backupfiles = FALSE, verbose = TRUE )"},{"path":"https://pglpm.github.io/inferno/reference/metadatatemplate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Metadata and helper function for metadata — metadatatemplate","text":"data dataset, given data.frame file path csv file. file String: name csv file metadata saved; NULL: output metadata VALUE. includevrt Character NULL: name variates dataset included. excludevrt Character NULL: name variates dataset excluded. addsummary2metadata Logical: also output diagnostic statistics metadata? Default FALSE. backupfiles Logical: rename previous metadata file exists? Default TRUE. verbose Logical: output heuristics variate? Default TRUE.","code":""},{"path":"https://pglpm.github.io/inferno/reference/metadatatemplate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Metadata and helper function for metadata — metadatatemplate","text":"file = NULL, preliminary metadata file created VALUE NULL; otherwise VALUE data.frame containing metadata.","code":""},{"path":"https://pglpm.github.io/inferno/reference/metadatatemplate.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Metadata and helper function for metadata — metadatatemplate","text":"learn function needs metadata variates present data. metadata can provided either csv file data.frame. function buildmetadata creates template metadata csv-file, outputs metadata data.frame, trying guess metadata information dataset.guesses may incorrect (already said, metadata information contained data, algorithm can exist extracts data). user must modify correct template, using starting point prepare correct metadata information.","code":""},{"path":"https://pglpm.github.io/inferno/reference/metadatatemplate.html","id":"metadata-information-and-format","dir":"Reference","previous_headings":"","what":"Metadata information and format","title":"Metadata and helper function for metadata — metadatatemplate","text":"order correctly learn dataset, learn function needs information contained data themeselves; , needs metadata. Metadata provided either csv file data.frame. metadata file data.frame must contain one row simple variate given inference problem, following fields (columns), even may empty: name, type, domainmin, domainmax, datastep, minincluded, maxincluded, V1, V2, (possibly additional V-fields, sequentially numbered) type field three possible values: nominal, ordinal, continuous. remaining fields must filled depend type field. list requirements: nominal ordinal: require either V1, V2, ... fields domainmin, domainmax, datastep (three) fields. fields required. continuous: requires domainmin, domainmax, datastep, minincluded, maxincluded. meanings possible values fields: name: name variate. must character string appears dataset (careful upper- lower-case). type: data type variate name. Possible values nominal, ordinal, continuous. nominal (also called categorical) variate discrete, finite number possible values intrinsic ordering. Examples variate related colour, values \"red\", \"green\", \"blue\", ; variate related cat breeds, values \"Siamese\", \"Abyssinian\", \"Persian\", . possible values variate must given fields V1, V2, . important include values possible present dataset. variate two possible values (binary variate), example \"yes\" \"\", can specified nominal. ordinal variate discrete, finite number possible values intrinsic ordering. Examples Likert-scaled variate results survey, values \"dissatisfied\", \"dissatisfied\", \"satisfied\", \"satisfied\"; variate related levels quantities, values \"low\", \"medium\", \"high\"; variate numeric scale values 1 10. Whether variate nominal ordinal often depends context. possible values variate given either one () two ways: (1) fields V1, V2, ..., nominal variates; (2) fields domainmin, domainmax, datastep. Option (2) works numeric, equally spaced values: assumes first value domainmin, second domainmin+datastep, third domainmin+2*datastep, last value, domainmax. continuous variate continuum values intrinsic ordering. Examples variate related width object; age person; one coordinate object particular reference system. continuous variate requires specification fields domainmin, domainmax, datastep, minincluded, maxincluded. naturally continuous variates often rounded given precision; instance, age person might reported rounded nearest year (25 years, 26 years, ); length object might reported nearest centimetre (1 m, 1.01 m, 1.02 m, ). minimum distance rounded values must reported datastep field; 1 age example 0.01 length example . See explanation reporting rounding important. domainmin: minimum value variate (ordinal continuous) can take . Possible values real number empty value, interpreted -Inf (explicit values like -Inf, -inf, -infinity also work). continuous variates, like age distance temperature, naturally positive, therefore domainmin equal 0. contexts minimum value different. instance, given inference problem involves people age 18 , domainmin set 18. domainmax: maximum value variate (ordinal continuous) can take . Possible values real number, empty value, interpreted +Inf (explicit values like Inf, inf, infinity also work). domainmin, maximum value depends context. age-related variate theoretically domainmax equal infinity (empty value metadata file); given study categorizes people \"90 years old older\", domainmax set 90. datastep: minimum distance values variate (ordinal continuous). Possible values positive real number empty value, interpreted 0 (explicit value 0 also accepted). numeric ordinal variate, datastep step consecutive values. continuous rounded variate, datastep minimum distance different values occurs rounding; see examples given . function buildmetadata heuristics determine whether variate rounded . See details section Rounding . minincluded, maxincluded: Whether minimum (domainmin) maximum(domainmax) values continuous variate can really appear data . Possible values true (t yes) false (f, , empty field); upper- lower-case irrelevant. examples meaning fields. () continuous unrounded variate temperature 0 minimum possible value domainmin, value physically impossible can never appear data; case minincluded empty (set false ). (b) variate related unrounded length, metres, objects may take positive real value; suppose objects length 5 less grouped together value 5. possible several datapoints value 5: one datapoint originally value 3.782341...; another value 4.929673..., . case domainmin set 5, minincluded set true (yes). Similarly maximum value variate maxincluded. Note domainmin minus-infinity (empty value metadata file), minincluded automatically empty (, false), similarly maxincluded domainmax infinity.","code":""},{"path":"https://pglpm.github.io/inferno/reference/metadatatemplate.html","id":"rounded-continuous-variates","dir":"Reference","previous_headings":"","what":"Rounded continuous variates","title":"Metadata and helper function for metadata — metadatatemplate","text":"written.","code":""},{"path":"https://pglpm.github.io/inferno/reference/metadatatemplate.html","id":"necessity-of-metadata","dir":"Reference","previous_headings":"","what":"Necessity of metadata","title":"Metadata and helper function for metadata — metadatatemplate","text":"written.","code":""},{"path":"https://pglpm.github.io/inferno/reference/mutualinfo.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate mutual information between groups of joint variates — mutualinfo","title":"Calculate mutual information between groups of joint variates — mutualinfo","text":"function calculates various entropic information measures two variates (variate may consist joint variates): mutual information, conditional entropies, entropies.","code":""},{"path":"https://pglpm.github.io/inferno/reference/mutualinfo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate mutual information between groups of joint variates — mutualinfo","text":"","code":"mutualinfo( Y1names, Y2names, X = NULL, learnt, nsamples = 3600, unit = \"Sh\", parallel = TRUE, silent = TRUE )"},{"path":"https://pglpm.github.io/inferno/reference/mutualinfo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate mutual information between groups of joint variates — mutualinfo","text":"Y1names String vector: first group joint variates Y2names String vector NULL: second group joint variates X matrix data.frame NULL: values variates conditional want probabilities. learnt Either string name directory full path 'learnt.rds' object, object . nsamples numeric: number samples approximately calculate mutual information. Default 3600 unit Either one 'Sh' shannon (default), 'Hart' hartley, 'nat' natural unit, positive real indicating base logarithms used. parallel, logical numeric: whether use pre-existing parallel workers, many create use. silent logical: give warnings updates computation?","code":""},{"path":"https://pglpm.github.io/inferno/reference/mutualinfo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate mutual information between groups of joint variates — mutualinfo","text":"list consisting elements MI, CondEn12, CondEn21, En1, En2, MImax, unit, Y1names, Y1names. elements except unit, Y1names, Y2names vector value error. Element MI mutual information (joint) variates Y1names (joint) variates Y2names. ElementCondEn12 conditional entropy first variate given second, vice versa CondEn21. Elements En1 En1 (differential) entropies first second variates. Element MImax maximum possible value mutual information. Elements unit, Y1names, Y2names identical inputs.","code":""},{"path":"https://pglpm.github.io/inferno/reference/plot.probability.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot an object of class ","title":"Plot an object of class ","text":"plot method utility plot probabilities obtained Pr tailPr, well uncertainties. probabilities plotted either Y, one curve value X, vice versa.","code":""},{"path":"https://pglpm.github.io/inferno/reference/plot.probability.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot an object of class ","text":"","code":"# S3 method for class 'probability' plot( p, variability = NULL, PvsY = NULL, legend = TRUE, lwd = 3, lty = 1:5, col = palette(), xlab = NULL, ylab = NULL, ylim = c(0, NA), add = FALSE, ... )"},{"path":"https://pglpm.github.io/inferno/reference/plot.probability.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot an object of class ","text":"p Object class \"probability\", obtained Pr tailPr. variability One values \"quantiles\", \"samples\", \"none\" (equivalent NA FALSE), NULL (default), case variability available p used. argument chooses represent variability probability; see Pr. requested variability available object p, warning issued variability plotted. PvsY Logical NULL: probabilities plotted Y argument? NULL, argument Y X larger number values chosen. many probability curves plotted number values argument. legend Logical: plot legend different curves? ... parameters passed matplot.","code":""},{"path":"https://pglpm.github.io/inferno/reference/plotFsamples.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot one-dimensional posterior probabilities — plotFsamples","title":"Plot one-dimensional posterior probabilities — plotFsamples","text":"Plot one-dimensional posterior probabilities","code":""},{"path":"https://pglpm.github.io/inferno/reference/plotFsamples.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot one-dimensional posterior probabilities — plotFsamples","text":"","code":"plotFsamples( file, learnt, data, plotprobability = TRUE, plotvariability = \"samples\", nFsamples = NULL, datahistogram = !(missing(data) || is.null(data)), datascatter = !(missing(data) || is.null(data)), parallel = TRUE, silent = FALSE )"},{"path":"https://pglpm.github.io/inferno/reference/plotFsamples.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot one-dimensional posterior probabilities — plotFsamples","text":"file string: name plot output file data data.table object filepath: datapoints plotprobability logical: plot resulting probability curve plotvariability string, either 'samples' 'quantiles': plot variability probability distribution new samples nFsamples positive number: plotvariability='samples', number samples representative frequency distributions display variability; plotvariability='quantiles', quantiles (range 0 0.5) show datahistogram logical: plot data histogram? datascatter logical: plot data scatterplot along x-axis? parallel Bool numeric: whether use pre-existing parallel workers, many create use silent logical: give warnings updates computation learned Either string name directory full path 'learnt.rds' object, object ","code":""},{"path":"https://pglpm.github.io/inferno/reference/plotFsamples.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot one-dimensional posterior probabilities — plotFsamples","text":"list mutual information, error, unit","code":""},{"path":"https://pglpm.github.io/inferno/reference/plotquantiles.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot pairs of quantiles — plotquantiles","title":"Plot pairs of quantiles — plotquantiles","text":"Utility function plot pair quantiles obtained Pr tailPr.","code":""},{"path":"https://pglpm.github.io/inferno/reference/plotquantiles.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot pairs of quantiles — plotquantiles","text":"","code":"plotquantiles(x, y, xdomain = NULL, alpha.f = 0.25, col = 9, border = NA, ...)"},{"path":"https://pglpm.github.io/inferno/reference/plotquantiles.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot pairs of quantiles — plotquantiles","text":"x Numeric character: vector x-coordinates. See flexiplot. y Numeric: matrix many rows x even number columns, one column per quantile. Typically quantiles obtained Pr tailPr, $quantiles value. value three-dimensional array, one columns (corresponding possible values X argument Pr) one rows (corresponding possible values Y argument Pr) selected used y input. xdomain Character numeric NULL (default): vector possible values variable represented x-axis, x argument character vector. ordering values respected. NULL, unique(x) used. alpha.f Numeric, default 0.25: opacity quantile bands, 0 completely invisible 1 completely opaque. col Fill colour quantile bands. Can specified usual ways, see instance col2rgb. Default 9. border Fill colour quantile bands. Can specified usual ways, see instance col2rgb. NA (default), border drawn. ... parameters passed flexiplot.","code":""},{"path":"https://pglpm.github.io/inferno/reference/tailPr.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate cumulative posterior probabilities — tailPr","title":"Calculate cumulative posterior probabilities — tailPr","text":"function calculates probability P(Y <= y | X, data), Y X two (non overlapping) sets joint variates (lower.tail argument FALSE, P(Y > y | X, data) calculated). function also gives quantiles possible variability probability P(Y <= y | X, newdata, data) learning data provided, well number samples possible values probabilities. several joint values given Y X, function create 2D grid results possible compbinations given Y X values.","code":""},{"path":"https://pglpm.github.io/inferno/reference/tailPr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate cumulative posterior probabilities — tailPr","text":"","code":"tailPr( Y, X = NULL, learnt, nsamples = 100L, quantiles = c(0.055, 0.25, 0.75, 0.945), parallel = TRUE, eq = TRUE, lower.tail = TRUE, silent = TRUE, usememory = TRUE, keepYX = TRUE )"},{"path":"https://pglpm.github.io/inferno/reference/tailPr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate cumulative posterior probabilities — tailPr","text":"Y matrix data.table: set values variates want joint probability . One variate per column, one set values per row. X matrix data.table NULL: set values variates want condition joint probability Y. NULL (default), conditioning made (except conditioning learning dataset prior assumptions). One variate per column, one set values per row. learnt Either string name directory full path 'learnt.rds' object, produced learn function, object . nsamples integer NULL \"\": desired number samples variability probability Y. NULL, samples reported. \"\" (Inf), samples obtained learn function used. Default 100. quantiles numeric vector, 0 1, NULL: desired quantiles variability probability Y. Default c(0.055, 0.25, 0.75, 0.945), , 5.5%, 25%, 75%, 94.5% quantiles (typical quantile values Bayesian literature: give 50% 89% credibility intervals, correspond 1 shannons 0.5 shannons uncertainty). NULL, quantiles calculated. parallel logical integer: whether use pre-existing parallel workers, many create use. Default TRUE. eq logical: include Y = y cumulative probability? Default TRUE. lower.tail logical: calculate P(Y < y)? (TRUE, default) P(Y > y)? (FALSE). silent logical: give warnings updates computation? Default FALSE. usememory logical: save partial results disc, avoid crashes? Default TRUE. keepYX logical, default TRUE: keep copy Y X arguments output? used plot method.","code":""},{"path":"https://pglpm.github.io/inferno/reference/tailPr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate cumulative posterior probabilities — tailPr","text":"list class probability, consisting elements values, possibly elements quantiles (non-NULL argument quantiles), samples (non-NULL argument nsample), Y, X. Element values: matrix probabilities P(Y <= y |X,data,assumptions), combinations values Y (rows) X (columns). Element quantiles: array variability quantiles (3rd dimension array) probabilities. Element samples: array variability samples (3rd dimension array) probabilities. Elements Y, X: copies Y X arguments.","code":""},{"path":"https://pglpm.github.io/inferno/reference/util_Pcheckpoints.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate joint frequencies for checkpoints in learn() — util_Pcheckpoints","title":"Calculate joint frequencies for checkpoints in learn() — util_Pcheckpoints","text":"Calculate joint frequencies checkpoints learn()","code":""},{"path":"https://pglpm.github.io/inferno/reference/util_Pcheckpoints.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate joint frequencies for checkpoints in learn() — util_Pcheckpoints","text":"","code":"util_Pcheckpoints(Y, mcsamples, auxmetadata)"},{"path":"https://pglpm.github.io/inferno/reference/util_Pcheckpoints.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate joint frequencies for checkpoints in learn() — util_Pcheckpoints","text":"Y matrix data.table: values already-transformed variates want joint probability; one variate per column mcsamples object internal learn(), containing partial Monte Carlo draws auxmetadata object internal learn(), containing processed metadata information","code":""},{"path":"https://pglpm.github.io/inferno/reference/util_Pcheckpoints.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate joint frequencies for checkpoints in learn() — util_Pcheckpoints","text":"joint frequencies Y correspoinding Monte Carlo samples","code":""},{"path":"https://pglpm.github.io/inferno/reference/util_lprob.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate collection of log-probabilities for different components and samples — util_lprob","title":"Calculate collection of log-probabilities for different components and samples — util_lprob","text":"Calculate collection log-probabilities different components samples","code":""},{"path":"https://pglpm.github.io/inferno/reference/util_lprob.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate collection of log-probabilities for different components and samples — util_lprob","text":"","code":"util_lprob( x, learnt, nR, iR, tR, nC, iC, tC, Clefts, Crights, nD, iD, tD, Dsteps, Dlefts, Drights, nO, iO, tO, nN, iN, tN, nB, iB, tB )"},{"path":"https://pglpm.github.io/inferno/reference/util_lprob.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate collection of log-probabilities for different components and samples — util_lprob","text":"nR etc: Parameters containing appropriate indices X numerical matrix: transformed variates learnt: Monte-Carlo-output object","code":""},{"path":"https://pglpm.github.io/inferno/reference/util_lprob.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate collection of log-probabilities for different components and samples — util_lprob","text":"Matrix many rows components many cols samples","code":""},{"path":"https://pglpm.github.io/inferno/reference/util_ltailprob.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate collection of log-probabilities for different components and samples — util_ltailprob","title":"Calculate collection of log-probabilities for different components and samples — util_ltailprob","text":"Calculate collection log-probabilities different components samples","code":""},{"path":"https://pglpm.github.io/inferno/reference/util_ltailprob.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate collection of log-probabilities for different components and samples — util_ltailprob","text":"","code":"util_ltailprob( x, learnt, nR, iR, tR, nC, iC, tC, Clefts, Crights, nD, iD, tD, Dsteps, Dlefts, Drights, nO, iO, tO, lower.tail = TRUE )"},{"path":"https://pglpm.github.io/inferno/reference/util_ltailprob.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate collection of log-probabilities for different components and samples — util_ltailprob","text":"nR etc: Parameters containing appropriate indices X numerical matrix: transformed variates learnt: Monte-Carlo-output object","code":""},{"path":"https://pglpm.github.io/inferno/reference/util_ltailprob.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate collection of log-probabilities for different components and samples — util_ltailprob","text":"Matrix many rows components many cols samples","code":""},{"path":"https://pglpm.github.io/inferno/reference/vrtgrid.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a grid of values for a variate — vrtgrid","title":"Create a grid of values for a variate — vrtgrid","text":"function create set values variate vrt, based metadata stored learnt object created learn function). set values depends type variate (nominal continuous, rounded, , see metadata). range values chosen include, extend slightly beyond, range observed data used learn function. Variate domains always respected.","code":""},{"path":"https://pglpm.github.io/inferno/reference/vrtgrid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a grid of values for a variate — vrtgrid","text":"","code":"vrtgrid(vrt, learnt, length.out = 129)"},{"path":"https://pglpm.github.io/inferno/reference/vrtgrid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a grid of values for a variate — vrtgrid","text":"vrt character: name variate, must match one names metadata file provided learn function. learnt Either string name directory full path 'learnt.rds' object, produced learn function, object . length.numeric, positive (default 129): number values created; used continuous, non-rounded variates (see metadata).","code":""},{"path":"https://pglpm.github.io/inferno/reference/vrtgrid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a grid of values for a variate — vrtgrid","text":"numeric character vector values.","code":""},{"path":"https://pglpm.github.io/inferno/reference/vtransform.html","id":null,"dir":"Reference","previous_headings":"","what":"Transforms variates to different representations — vtransform","title":"Transforms variates to different representations — vtransform","text":"Transforms variates different representations","code":""},{"path":"https://pglpm.github.io/inferno/reference/vtransform.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Transforms variates to different representations — vtransform","text":"","code":"vtransform( x, auxmetadata, Rout = NULL, Cout = NULL, Dout = NULL, Bout = NULL, Oout = NULL, Nout = NULL, variates = NULL, logjacobianOr = NULL )"},{"path":"https://pglpm.github.io/inferno/reference/vtransform.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Transforms variates to different representations — vtransform","text":"x data.table object containing data transformed auxmetadata auxmetadata object Rout string, output R-type variate, possible values: 'normalized': internal MCMC use 'mi': use mutualinfo() 'original': original representation Cout string, output C-type variate, possible values: 'init': internal MCMC use (init input) 'left', 'right': internal MCMC use 'aux', 'lat': internal MCMC use 'boundisinf': sampling functions 'mi': use mutualinfo() 'original': original representation Dout string, output D-type variate, possible values: 'init': internal MCMC use (init input) 'left', 'right': internal MCMC use 'aux': internal MCMC use 'boundisinf': sampling functions 'mi': use mutualinfo() 'original': original representation Bout string, output B-type variate, possible values: 'numeric': internal MCMC use, values 0,1 'original': original representation Oout string, output O-type variate, possible values: 'numeric': internal MCMC use, values 1,2,... 'original': original representation Nout string, output N-type variate, possible values: 'numeric': internal MCMC use, values 1,2,... 'original': original representation variates string vector, names variates corresponding columns x (case x misses column names) logjacobianOr logical NULL: output log-Jacobian orginal transformed domain? NULL (default) means calculate log-Jacobians","code":""},{"path":"https://pglpm.github.io/inferno/reference/vtransform.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Transforms variates to different representations — vtransform","text":"data frame transformed variates, log-Jacobians","code":""}] +[{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 3, 29 June 2007Copyright © 2007 Free Software Foundation, Inc.  Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"GNU General Public License","text":"GNU General Public License free, copyleft license software kinds works. licenses software practical works designed take away freedom share change works. contrast, GNU General Public License intended guarantee freedom share change versions program–make sure remains free software users. , Free Software Foundation, use GNU General Public License software; applies also work released way authors. can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge wish), receive source code can get want , can change software use pieces new free programs, know can things. protect rights, need prevent others denying rights asking surrender rights. Therefore, certain responsibilities distribute copies software, modify : responsibilities respect freedom others. example, distribute copies program, whether gratis fee, must pass recipients freedoms received. must make sure , , receive can get source code. must show terms know rights. Developers use GNU GPL protect rights two steps: (1) assert copyright software, (2) offer License giving legal permission copy, distribute /modify . developers’ authors’ protection, GPL clearly explains warranty free software. users’ authors’ sake, GPL requires modified versions marked changed, problems attributed erroneously authors previous versions. devices designed deny users access install run modified versions software inside , although manufacturer can . fundamentally incompatible aim protecting users’ freedom change software. systematic pattern abuse occurs area products individuals use, precisely unacceptable. Therefore, designed version GPL prohibit practice products. problems arise substantially domains, stand ready extend provision domains future versions GPL, needed protect freedom users. Finally, every program threatened constantly software patents. States allow patents restrict development use software general-purpose computers, , wish avoid special danger patents applied free program make effectively proprietary. prevent , GPL assures patents used render program non-free. precise terms conditions copying, distribution modification follow.","code":""},{"path":[]},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_0-definitions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"0. Definitions","title":"GNU General Public License","text":"“License” refers version 3 GNU General Public License. “Copyright” also means copyright-like laws apply kinds works, semiconductor masks. “Program” refers copyrightable work licensed License. licensee addressed “”. “Licensees” “recipients” may individuals organizations. “modify” work means copy adapt part work fashion requiring copyright permission, making exact copy. resulting work called “modified version” earlier work work “based ” earlier work. “covered work” means either unmodified Program work based Program. “propagate” work means anything , without permission, make directly secondarily liable infringement applicable copyright law, except executing computer modifying private copy. Propagation includes copying, distribution (without modification), making available public, countries activities well. “convey” work means kind propagation enables parties make receive copies. Mere interaction user computer network, transfer copy, conveying. interactive user interface displays “Appropriate Legal Notices” extent includes convenient prominently visible feature (1) displays appropriate copyright notice, (2) tells user warranty work (except extent warranties provided), licensees may convey work License, view copy License. interface presents list user commands options, menu, prominent item list meets criterion.","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_1-source-code","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"1. Source Code","title":"GNU General Public License","text":"“source code” work means preferred form work making modifications . “Object code” means non-source form work. “Standard Interface” means interface either official standard defined recognized standards body, , case interfaces specified particular programming language, one widely used among developers working language. “System Libraries” executable work include anything, work whole, () included normal form packaging Major Component, part Major Component, (b) serves enable use work Major Component, implement Standard Interface implementation available public source code form. “Major Component”, context, means major essential component (kernel, window system, ) specific operating system () executable work runs, compiler used produce work, object code interpreter used run . “Corresponding Source” work object code form means source code needed generate, install, (executable work) run object code modify work, including scripts control activities. However, include work’s System Libraries, general-purpose tools generally available free programs used unmodified performing activities part work. example, Corresponding Source includes interface definition files associated source files work, source code shared libraries dynamically linked subprograms work specifically designed require, intimate data communication control flow subprograms parts work. Corresponding Source need include anything users can regenerate automatically parts Corresponding Source. Corresponding Source work source code form work.","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_2-basic-permissions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"2. Basic Permissions","title":"GNU General Public License","text":"rights granted License granted term copyright Program, irrevocable provided stated conditions met. License explicitly affirms unlimited permission run unmodified Program. output running covered work covered License output, given content, constitutes covered work. License acknowledges rights fair use equivalent, provided copyright law. may make, run propagate covered works convey, without conditions long license otherwise remains force. may convey covered works others sole purpose make modifications exclusively , provide facilities running works, provided comply terms License conveying material control copyright. thus making running covered works must exclusively behalf, direction control, terms prohibit making copies copyrighted material outside relationship . Conveying circumstances permitted solely conditions stated . Sublicensing allowed; section 10 makes unnecessary.","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_3-protecting-users-legal-rights-from-anti-circumvention-law","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"3. Protecting Users’ Legal Rights From Anti-Circumvention Law","title":"GNU General Public License","text":"covered work shall deemed part effective technological measure applicable law fulfilling obligations article 11 WIPO copyright treaty adopted 20 December 1996, similar laws prohibiting restricting circumvention measures. convey covered work, waive legal power forbid circumvention technological measures extent circumvention effected exercising rights License respect covered work, disclaim intention limit operation modification work means enforcing, work’s users, third parties’ legal rights forbid circumvention technological measures.","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_4-conveying-verbatim-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"4. Conveying Verbatim Copies","title":"GNU General Public License","text":"may convey verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice; keep intact notices stating License non-permissive terms added accord section 7 apply code; keep intact notices absence warranty; give recipients copy License along Program. may charge price price copy convey, may offer support warranty protection fee.","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_5-conveying-modified-source-versions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"5. Conveying Modified Source Versions","title":"GNU General Public License","text":"may convey work based Program, modifications produce Program, form source code terms section 4, provided also meet conditions: ) work must carry prominent notices stating modified , giving relevant date. b) work must carry prominent notices stating released License conditions added section 7. requirement modifies requirement section 4 “keep intact notices”. c) must license entire work, whole, License anyone comes possession copy. License therefore apply, along applicable section 7 additional terms, whole work, parts, regardless packaged. License gives permission license work way, invalidate permission separately received . d) work interactive user interfaces, must display Appropriate Legal Notices; however, Program interactive interfaces display Appropriate Legal Notices, work need make . compilation covered work separate independent works, nature extensions covered work, combined form larger program, volume storage distribution medium, called “aggregate” compilation resulting copyright used limit access legal rights compilation’s users beyond individual works permit. Inclusion covered work aggregate cause License apply parts aggregate.","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_6-conveying-non-source-forms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"6. Conveying Non-Source Forms","title":"GNU General Public License","text":"may convey covered work object code form terms sections 4 5, provided also convey machine-readable Corresponding Source terms License, one ways: ) Convey object code , embodied , physical product (including physical distribution medium), accompanied Corresponding Source fixed durable physical medium customarily used software interchange. b) Convey object code , embodied , physical product (including physical distribution medium), accompanied written offer, valid least three years valid long offer spare parts customer support product model, give anyone possesses object code either (1) copy Corresponding Source software product covered License, durable physical medium customarily used software interchange, price reasonable cost physically performing conveying source, (2) access copy Corresponding Source network server charge. c) Convey individual copies object code copy written offer provide Corresponding Source. alternative allowed occasionally noncommercially, received object code offer, accord subsection 6b. d) Convey object code offering access designated place (gratis charge), offer equivalent access Corresponding Source way place charge. need require recipients copy Corresponding Source along object code. place copy object code network server, Corresponding Source may different server (operated third party) supports equivalent copying facilities, provided maintain clear directions next object code saying find Corresponding Source. Regardless server hosts Corresponding Source, remain obligated ensure available long needed satisfy requirements. e) Convey object code using peer--peer transmission, provided inform peers object code Corresponding Source work offered general public charge subsection 6d. separable portion object code, whose source code excluded Corresponding Source System Library, need included conveying object code work. “User Product” either (1) “consumer product”, means tangible personal property normally used personal, family, household purposes, (2) anything designed sold incorporation dwelling. determining whether product consumer product, doubtful cases shall resolved favor coverage. particular product received particular user, “normally used” refers typical common use class product, regardless status particular user way particular user actually uses, expects expected use, product. product consumer product regardless whether product substantial commercial, industrial non-consumer uses, unless uses represent significant mode use product. “Installation Information” User Product means methods, procedures, authorization keys, information required install execute modified versions covered work User Product modified version Corresponding Source. information must suffice ensure continued functioning modified object code case prevented interfered solely modification made. convey object code work section , , specifically use , User Product, conveying occurs part transaction right possession use User Product transferred recipient perpetuity fixed term (regardless transaction characterized), Corresponding Source conveyed section must accompanied Installation Information. requirement apply neither third party retains ability install modified object code User Product (example, work installed ROM). requirement provide Installation Information include requirement continue provide support service, warranty, updates work modified installed recipient, User Product modified installed. Access network may denied modification materially adversely affects operation network violates rules protocols communication across network. Corresponding Source conveyed, Installation Information provided, accord section must format publicly documented (implementation available public source code form), must require special password key unpacking, reading copying.","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_7-additional-terms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"7. Additional Terms","title":"GNU General Public License","text":"“Additional permissions” terms supplement terms License making exceptions one conditions. Additional permissions applicable entire Program shall treated though included License, extent valid applicable law. additional permissions apply part Program, part may used separately permissions, entire Program remains governed License without regard additional permissions. convey copy covered work, may option remove additional permissions copy, part . (Additional permissions may written require removal certain cases modify work.) may place additional permissions material, added covered work, can give appropriate copyright permission. Notwithstanding provision License, material add covered work, may (authorized copyright holders material) supplement terms License terms: ) Disclaiming warranty limiting liability differently terms sections 15 16 License; b) Requiring preservation specified reasonable legal notices author attributions material Appropriate Legal Notices displayed works containing ; c) Prohibiting misrepresentation origin material, requiring modified versions material marked reasonable ways different original version; d) Limiting use publicity purposes names licensors authors material; e) Declining grant rights trademark law use trade names, trademarks, service marks; f) Requiring indemnification licensors authors material anyone conveys material (modified versions ) contractual assumptions liability recipient, liability contractual assumptions directly impose licensors authors. non-permissive additional terms considered “restrictions” within meaning section 10. Program received , part , contains notice stating governed License along term restriction, may remove term. license document contains restriction permits relicensing conveying License, may add covered work material governed terms license document, provided restriction survive relicensing conveying. add terms covered work accord section, must place, relevant source files, statement additional terms apply files, notice indicating find applicable terms. Additional terms, permissive non-permissive, may stated form separately written license, stated exceptions; requirements apply either way.","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_8-termination","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"8. Termination","title":"GNU General Public License","text":"may propagate modify covered work except expressly provided License. attempt otherwise propagate modify void, automatically terminate rights License (including patent licenses granted third paragraph section 11). However, cease violation License, license particular copyright holder reinstated () provisionally, unless copyright holder explicitly finally terminates license, (b) permanently, copyright holder fails notify violation reasonable means prior 60 days cessation. Moreover, license particular copyright holder reinstated permanently copyright holder notifies violation reasonable means, first time received notice violation License (work) copyright holder, cure violation prior 30 days receipt notice. Termination rights section terminate licenses parties received copies rights License. rights terminated permanently reinstated, qualify receive new licenses material section 10.","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_9-acceptance-not-required-for-having-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"9. Acceptance Not Required for Having Copies","title":"GNU General Public License","text":"required accept License order receive run copy Program. Ancillary propagation covered work occurring solely consequence using peer--peer transmission receive copy likewise require acceptance. However, nothing License grants permission propagate modify covered work. actions infringe copyright accept License. Therefore, modifying propagating covered work, indicate acceptance License .","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_10-automatic-licensing-of-downstream-recipients","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"10. Automatic Licensing of Downstream Recipients","title":"GNU General Public License","text":"time convey covered work, recipient automatically receives license original licensors, run, modify propagate work, subject License. responsible enforcing compliance third parties License. “entity transaction” transaction transferring control organization, substantially assets one, subdividing organization, merging organizations. propagation covered work results entity transaction, party transaction receives copy work also receives whatever licenses work party’s predecessor interest give previous paragraph, plus right possession Corresponding Source work predecessor interest, predecessor can get reasonable efforts. may impose restrictions exercise rights granted affirmed License. example, may impose license fee, royalty, charge exercise rights granted License, may initiate litigation (including cross-claim counterclaim lawsuit) alleging patent claim infringed making, using, selling, offering sale, importing Program portion .","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_11-patents","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"11. Patents","title":"GNU General Public License","text":"“contributor” copyright holder authorizes use License Program work Program based. work thus licensed called contributor’s “contributor version”. contributor’s “essential patent claims” patent claims owned controlled contributor, whether already acquired hereafter acquired, infringed manner, permitted License, making, using, selling contributor version, include claims infringed consequence modification contributor version. purposes definition, “control” includes right grant patent sublicenses manner consistent requirements License. contributor grants non-exclusive, worldwide, royalty-free patent license contributor’s essential patent claims, make, use, sell, offer sale, import otherwise run, modify propagate contents contributor version. following three paragraphs, “patent license” express agreement commitment, however denominated, enforce patent (express permission practice patent covenant sue patent infringement). “grant” patent license party means make agreement commitment enforce patent party. convey covered work, knowingly relying patent license, Corresponding Source work available anyone copy, free charge terms License, publicly available network server readily accessible means, must either (1) cause Corresponding Source available, (2) arrange deprive benefit patent license particular work, (3) arrange, manner consistent requirements License, extend patent license downstream recipients. “Knowingly relying” means actual knowledge , patent license, conveying covered work country, recipient’s use covered work country, infringe one identifiable patents country reason believe valid. , pursuant connection single transaction arrangement, convey, propagate procuring conveyance , covered work, grant patent license parties receiving covered work authorizing use, propagate, modify convey specific copy covered work, patent license grant automatically extended recipients covered work works based . patent license “discriminatory” include within scope coverage, prohibits exercise , conditioned non-exercise one rights specifically granted License. may convey covered work party arrangement third party business distributing software, make payment third party based extent activity conveying work, third party grants, parties receive covered work , discriminatory patent license () connection copies covered work conveyed (copies made copies), (b) primarily connection specific products compilations contain covered work, unless entered arrangement, patent license granted, prior 28 March 2007. Nothing License shall construed excluding limiting implied license defenses infringement may otherwise available applicable patent law.","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_12-no-surrender-of-others-freedom","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"12. No Surrender of Others’ Freedom","title":"GNU General Public License","text":"conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. convey covered work satisfy simultaneously obligations License pertinent obligations, consequence may convey . example, agree terms obligate collect royalty conveying convey Program, way satisfy terms License refrain entirely conveying Program.","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_13-use-with-the-gnu-affero-general-public-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"13. Use with the GNU Affero General Public License","title":"GNU General Public License","text":"Notwithstanding provision License, permission link combine covered work work licensed version 3 GNU Affero General Public License single combined work, convey resulting work. terms License continue apply part covered work, special requirements GNU Affero General Public License, section 13, concerning interaction network apply combination .","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_14-revised-versions-of-this-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"14. Revised Versions of this License","title":"GNU General Public License","text":"Free Software Foundation may publish revised /new versions GNU General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies certain numbered version GNU General Public License “later version” applies , option following terms conditions either numbered version later version published Free Software Foundation. Program specify version number GNU General Public License, may choose version ever published Free Software Foundation. Program specifies proxy can decide future versions GNU General Public License can used, proxy’s public statement acceptance version permanently authorizes choose version Program. Later license versions may give additional different permissions. However, additional obligations imposed author copyright holder result choosing follow later version.","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_15-disclaimer-of-warranty","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"15. Disclaimer of Warranty","title":"GNU General Public License","text":"WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION.","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_16-limitation-of-liability","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"16. Limitation of Liability","title":"GNU General Public License","text":"EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MODIFIES /CONVEYS PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES.","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"id_17-interpretation-of-sections-15-and-16","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"17. Interpretation of Sections 15 and 16","title":"GNU General Public License","text":"disclaimer warranty limitation liability provided given local legal effect according terms, reviewing courts shall apply local law closely approximates absolute waiver civil liability connection Program, unless warranty assumption liability accompanies copy Program return fee. END TERMS CONDITIONS","code":""},{"path":"https://pglpm.github.io/inferno/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"GNU General Public License","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively state exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program terminal interaction, make output short notice like starts interactive mode: hypothetical commands show w show c show appropriate parts General Public License. course, program’s commands might different; GUI interface, use “box”. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. information , apply follow GNU GPL, see . GNU General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License. first, please read .","code":" Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details."},{"path":[]},{"path":"https://pglpm.github.io/inferno/articles/vignette_mutualinfo.html","id":"association-and-traditional-measures-for-it","dir":"Articles","previous_headings":"Brief overview of the theory behind Mutual Information","what":"Association and traditional measures for it","title":"Associations of variates with mutual information","text":"probability quantifies degree belief values variates, given know values variates. belief also reflect uncertainty: maximal belief 50%, minimal belief 0% 100%. cases wish quantify uncertainty average sense, rather specific values, given knowledge specific values. words, ask: average, uncertain set variates, given knowledge another set? average uncertainty low, say two sets variates highly correlated associated; otherwise, uncorrelated. using word ‘correlation’ general sense, specific sense “linear correlation” similar. Traditionally Pearson correlation coefficient “rr” used quantify association. extremely limited, however. essentially based assumption variates involved joint Gaussian distribution. consequence, measure linear association, rather general association. instance, graph two continuous variates XX YY semicircle, means YY function XX, therefore perfectly associated XX: know XX, can perfectly predict value YY. Yet Pearson correlation coefficient two variates 00 case, simply functional dependence YY XX linear: Similar limitations Pearson correlation coefficient demonstrated “Anscombe quartet” datasets. case two variates, limitations possibly misleading value Pearson correlation coefficient may serious problem, can visually inspect relation association variates. dealing multi-dimensional variates, visualization possible must rely numerical values measure use quantify “association”. cases Pearson correlation coefficient can highly misleading, let us conclude ’s association actually ’s strong one. Considering world highly non-linear, possibility far remote.","code":"X <- seq(-1, 1, length.out = 200) Y <- sqrt(1 - X^2) r <- cor(X, Y, method = 'pearson') plot(x = X, y = Y, type = 'p', main = paste0('Pearson correlation: ', signif(r, 2)))"},{"path":"https://pglpm.github.io/inferno/articles/vignette_mutualinfo.html","id":"mutual-information","dir":"Articles","previous_headings":"Brief overview of the theory behind Mutual Information","what":"Mutual Information","title":"Associations of variates with mutual information","text":"measure association suffer limitations discussed : mutual information XX YY. fact following important properties: association whatever XX YY, sense knowledge one never changes probabilities , mutual information zero. Vice versa, mutual information zero, association whatever XX YY. XX YY perfect association, , knowing XX gives us perfect knowledge YY vice versa, yet words YY function XX vice versa, mutual information takes maximal possible value. Vice versa, mutual information takes maximal value, one variate function . Regarding last feature, note functional dependence XX YY can kind, just linear. means case semicircle plot , mutual information XX YY maximal value. ’s also special case maximal value mutual information zero, indicates YY , technically speaking, function XX, yet knowledge XX doesn’t give us knowledge YY. ’s case YY just one value, independently XX: Mutual information measured shannons (symbol Sh\\mathrm{Sh}), hartleys (symbol Hart\\mathrm{Hart}), natural units (symbol nat\\mathrm{nat}). units properties mutual information standardized International Organization Standardization (ISO) International Electrotechnical Commission (IEC). minimum possible value mutual information always zero. maximum possible value depends instead variates XX YY.","code":""},{"path":"https://pglpm.github.io/inferno/articles/vignette_mutualinfo.html","id":"interpretation-of-the-values-of-mutual-information","dir":"Articles","previous_headings":"Brief overview of the theory behind Mutual Information","what":"Interpretation of the values of mutual information","title":"Associations of variates with mutual information","text":"value mutual information two variates operational meaning interpretation. understand must first summarize meaning Shannon information measure uncertainty acquired information. value ss shannons represents uncertainty equivalent knowing among 2s2^s possible alternatives true one. 1Sh1\\,\\mathrm{Sh} represents uncertainty two equally possible cases, like outcome coin toss. examples: 3Sh3\\,\\mathrm{Sh} represent uncertain among 8 equally possible alternatives; 1.58Sh1.58\\,\\mathrm{Sh} represent uncertain among 3 equally possible alternatives. clinician uncertain disease, among four equally possible ones, affects patient, clinician’s uncertainty 2Sh2\\,\\mathrm{Sh}. “equivalence” definition reflects fact possibilities may higher probabilities others. instance, three alternatives one 0% probability, uncertainty 1Sh1\\,\\mathrm{Sh}, two equally possible alternatives. three possibilities probabilities 11.4%, 11.4%, 77.2%, uncertainty approximately 1Sh1\\,\\mathrm{Sh}: two alternatives; one alternative much higher probability two. Back mutual information: mutual information XX YY amounts hShh\\,\\mathrm{Sh}, knowledge XX reduces, average, 2h2^h times number uncertain possibilities YY. example, suppose clinician uncertain four possible diseases diagnosis (uncertainty 2Sh2\\,\\mathrm{Sh}), particular clinical indicator associated disease. mutual information indicator disease 1Sh1\\,\\mathrm{Sh}, clinician roughly uncertain two possible diseases, rather four, upon testing clinical indicator. mutual information 2Sh2\\,\\mathrm{Sh} instead, indicator tell disease certainty. might think: “value mutual information difficult interpret”. matter getting familiar , using . Remember difficult get feeling particular value Pearson correlation rr really meant, first learned . developed intuitive understanding range values simply using . holds mutual information. discussion mutual information entropic measures association, take look Information, relevance, independence, association references given .","code":""},{"path":"https://pglpm.github.io/inferno/articles/vignette_mutualinfo.html","id":"function-for-the-calculation-of-mutual-information-between-variates","dir":"Articles","previous_headings":"","what":"Function for the calculation of mutual information between variates","title":"Associations of variates with mutual information","text":"software offers function mutualinfo() calculate mutual information set joint variates Y1Y_1 another set Y2Y_2. requires least three arguments: Y1names: vector names (strings) variates first set; Y2names: vector names variates second set; learnt: knowledge acquired dataset, calculated learn() function. may useful specify two arguments: parallel: number CPUs use computation; nsamples: number samples use computation mutual information (default 3600). output function list several entropic measures information. example can focus two outputs: $MI: vector two numbers: value value mutual information shannons; error numerical error (coming Monte Carlo calculation); $MImax: vector two numbers: value value maximal possible value mutual information, shannons; error numerical error.","code":""},{"path":"https://pglpm.github.io/inferno/articles/vignette_mutualinfo.html","id":"example","dir":"Articles","previous_headings":"Function for the calculation of mutual information between variates","what":"Example","title":"Associations of variates with mutual information","text":"example, let’s take dataset inference problem discussed vignette Example use: inferences Parkinson’s Disease. Suppose want quantify association treatment group patient effect treatment. treatment group given TreatmentGroup binary variate, effect quantified difference MDS-UPDRS-III scores first second visits, variate diff.MDS.UPRS.III. use knowledge calculated saved learnt.rds file. mutual information TreatmentGroup diff.MDS.UPRS.III result 0Sh0\\,\\mathrm{Sh} within numerical error, possible maximal value around 1Sh1\\,\\mathrm{Sh}, shows essentially association treatment group effect. Note data change conclusion, though (calculation uncertainty later implemented package). can also quantify association two sets variates within subpopulation defined specific value additional variate X (may joint variate). subpopulation specified additional argument X mutualinfo() function. instance, let’s quantify association treatment group effect within subpopulation female patients : resulting mutual information zero, within twice numerical error. ’s slightly larger – though still extremely weak – association treatment group effect within female subpopulation. (CONTINUED)","code":"mutualinfoGroupEffect <- mutualinfo( Y1names = 'diff.MDS.UPRS.III', Y2names = 'TreatmentGroup', learnt = 'learnt.rds', parallel = 12 ) mutualinfoGroupEffect$MI #> value error #> 0.002816052 0.001065887 mutualinfoGroupEffect$MImax #> value error #> 9.998692e-01 9.717656e-05 mutualinfoGroupEffectFemales <- mutualinfo( Y1names = 'diff.MDS.UPRS.III', Y2names = 'TreatmentGroup', X = data.frame(Sex = 'Female'), learnt = 'learnt.rds', parallel = 12 ) mutualinfoGroupEffectFemales$MI #> value error #> 0.002208982 0.001186844 mutualinfoGroupEffectFemales$MImax #> value error #> 1.0000029105 0.0001987814"},{"path":"https://pglpm.github.io/inferno/articles/vignette_parkinson.html","id":"purpose","dir":"Articles","previous_headings":"","what":"Purpose","title":"Example of use: inferences for Parkinson's Disease","text":"toy example showing kinds results can obtained Bayesian nonparametric exchangeable inference. example involves inferences investigations Parkinson’s Disease described paper Brakedal & al. (2022), generously professionally shares data. investigations cited paper involve 30 subjects, various data collected. Fifteen subjects belong control group, 15 treatment group, denoted NR. group received nicotinamide adenine dinucleotide (NAD) replenishment therapy, via oral intake nicotinamide riboside (NR). toy example follow reproduce paper’s investigations, use variates observed. limit 7 variates subject. list brief description : Treatment group: Binary variate values Placebo NR. Sex: Binary variate values Female Male. Age: Integer variate, continuous rounded variate. Anamnestic loss smell: Binary variate values Yes. History REM sleep behaviour disorder: Binary variate values Yes. MDS-UPDRS-III score first subject visit: MDS-UPDRS-III (Movement Disorder Society’s Unified Parkinson’s Disease Rating Scale) one set ordinal scales assess subject’s degree disability monitor time. scale III ranges 0 (disability) 132 (highest degree disability). Given operations sum average performed scales literature, scales considered interval kind rather simply ordinal. Difference MDS-UPDRS-III scores second first visit: Ordinal variate, difference previous one subject’s second first visit. range therefore -132 +132, negative values representing improvement. store name datafile values two subjects:","code":"datafile <- 'toydata.csv'"},{"path":"https://pglpm.github.io/inferno/articles/vignette_parkinson.html","id":"natural-vs-controlled-or-biased-variates","dir":"Articles","previous_headings":"Purpose","what":"“Natural” vs controlled or “biased” variates","title":"Example of use: inferences for Parkinson's Disease","text":"purpose drawing scientific inferences, extremely important mindful variates dataset “natural” statistics, instead statistics controlled observer – therefore “biased”. distinction important dataset statistics controlled variates may representative naturally-occurring ones, therefore used inference purposes. present dataset, instance, numbers Placebo NR subjects decided investigators 50%/50% proportion. Obviously naturally occurring proportion; fact, even make sense speaking naturally occurring statistics TreatmentGroup variate. Sex variate, dataset proportion around 17% Female 83% Male subjects. proportion also partly stems selection procedure investigators, infer roughly 16% Parkinson patients national population females. also possible proportions Age variate may depend selection procedure. hand, investigators choose statistics two MDS.UPDRS variates, within groups particular values variates. conditional subpopulation statistics can taken representatives naturally-occurring ones (see Lindley & Novick (1980) brilliant discussion point). (add short explanation exchangeability)","code":""},{"path":"https://pglpm.github.io/inferno/articles/vignette_parkinson.html","id":"metadata","dir":"Articles","previous_headings":"","what":"Metadata","title":"Example of use: inferences for Parkinson's Disease","text":"Let’s load package: order draw inferences, need metadata information, , information variates present data. information mainly regard kind domain variate. example metadata necessary, suppose given data 3, 7, 9. Can say whether value 5 observed new instance? 4.7, -10? Knowing whether values possible, , greatly affects precision inferences draw. Obviously researcher must know basic information data collected – otherwise wouldn’t know ’re . software requires specification metadata either data.frame object .csv file. help prepare file, software offers function metadatatemplate(), writes template thereafter modify. template filled tentative values; wild guesses data, often wrong. function explains heuristic using order pre-fill fields metadata file, gives warnings guessed values especially dubious. examine correct fields: can open temporary metadata file temp_metadata.csv edit software choice. Let’s save corrected version meta_toydata.csv: metadata follows; NA indicate empty fields: description metadata fields, see help metadata ?inferno::metadata. (written !)","code":"library(inferno) metadatatemplate(data = datafile, file = 'temp_metadata') #> #> Analyzing 7 variates for 30 datapoints. #> #> * \"TreatmentGroup\" variate: #> - 2 different values detected: #> \"NR\", \"Placebo\" #> which do not seem to refer to an ordered scale. #> Assuming variate to be NOMINAL. #> #> * \"Sex\" variate: #> - 2 different values detected: #> \"Female\", \"Male\" #> which do not seem to refer to an ordered scale. #> Assuming variate to be NOMINAL. #> #> * \"Age\" variate: #> - Numeric values between 29 and 75 #> Assuming variate to be CONTINUOUS. #> - Distance between datapoints is a multiple of 1 #> Assuming variate to be ROUNDED. #> - All values are positive #> Assuming \"domainmin\" to be 0 #> #> * \"Anamnestic.Loss.of.smell\" variate: #> - 2 different values detected: #> \"No\", \"Yes\" #> which do not seem to refer to an ordered scale. #> Assuming variate to be NOMINAL. #> #> * \"History.of.REM.Sleep.Behaviour.Disorder\" variate: #> - 2 different values detected: #> \"No\", \"Yes\" #> which do not seem to refer to an ordered scale. #> Assuming variate to be NOMINAL. #> #> * \"MDS.UPDRS..Subsection.III.V1\" variate: #> - Numeric values between 15 and 50 #> Assuming variate to be CONTINUOUS. #> - Distance between datapoints is a multiple of 1 #> Assuming variate to be ROUNDED. #> - All values are positive #> Assuming \"domainmin\" to be 0 #> #> * \"diff.MDS.UPRS.III\" variate: #> - Numeric values between -9 and 10 #> Assuming variate to be CONTINUOUS. #> - Distance between datapoints is a multiple of 1 #> Assuming variate to be ROUNDED. #> ========= #> WARNINGS - please make sure to check these variates in the metadata file: #> #> * \"Age\" variate appears to be continuous and rounded, #> but it could also be an ordinal variate #> #> * \"MDS.UPDRS..Subsection.III.V1\" variate appears to be continuous and rounded, #> but it could also be an ordinal variate #> #> * \"diff.MDS.UPRS.III\" variate appears to be continuous and rounded, #> but it could also be an ordinal variate #> ========= #> #> Saved proposal metadata file as \"temp_metadata.csv\" metadatafile <- 'meta_toydata.csv'"},{"path":"https://pglpm.github.io/inferno/articles/vignette_parkinson.html","id":"learning","dir":"Articles","previous_headings":"","what":"Learning","title":"Example of use: inferences for Parkinson's Disease","text":"inferences based data already observed, mainly take form probabilities unkonwn values various quantities YY, given observed values quantities XX: Pr(Y=y|X=x,data) \\mathrm{Pr}(Y = y \\:\\vert\\: X = x, \\mathrm{data}) notation indicates, probabilities also depend data\\mathrm{data} already observed. usually called “posterior probabilities”. need prepare software perform calculations posterior probabilities given observed data. machine learning analogous process called “learning”. reason function achieves called learn(). requires least three arguments: data, can given path csv file containing data metadata, can also given path metadata file outputdir: name directory output saved. may useful specify two arguments: seed: seed random-number generator, ensure reproducibility parallel: number CPUs use computation Alternatively can set seed set.seed(), start set parallel workers parallel::makeCluster() doParallel::registerDoParallel() commands. “learning” computation can take tens minutes, hours, even days depending number variates data inference problem. learn() function outputs various messages computation proceeding. example: end computation learn() function returns name directory results saved. code snipped , name saved variable learnt. object containing information needed make inferences learnt.rds file within directory.","code":"learnt <- learn( data = datafile, metadata = metadatafile, outputdir = 'parkinson_computations', seed = 16, parallel = 12) #> Registered doParallelSNOW with 12 workers #> #> Using 30 datapoints #> Calculating auxiliary metadata #> #> ************************** #> Saving output in directory #> parkinson_computations #> ************************** #> Starting Monte Carlo sampling of 3600 samples by 60 chains #> in a space of 703 (effectively 6657) dimensions. #> Using 12 cores: 60 samples per chain, 5 chains per core. #> Core logs are being saved in individual files. #> #> C-compiling samplers appropriate to the variates (package Nimble) #> this can take tens of minutes with many data or variates. #> Please wait..."},{"path":"https://pglpm.github.io/inferno/articles/vignette_parkinson.html","id":"drawing-inferences","dir":"Articles","previous_headings":"","what":"Drawing inferences","title":"Example of use: inferences for Parkinson's Disease","text":"finally ready use software drawing inferences, testing hypotheses, similar scientific investigations. observed data, software allows us find probability question hypothesis interest. important, though, hypothesis stated unambiguous, quantitative form.","code":""},{"path":"https://pglpm.github.io/inferno/articles/vignette_parkinson.html","id":"first-example-effect-on-treated-patient-of-female-sex","dir":"Articles","previous_headings":"Drawing inferences","what":"First example: effect on treated patient of female sex","title":"Example of use: inferences for Parkinson's Disease","text":"example, might want ask: “NAD-replenishment therapy effect females?”. first may sound like valid scientific hypothesis. carefully examine statement realize vague. First, “effect” mean exactly? can quantified? Second, can really say therapy either effect? degrees efficacy involved? Third, asking question ? next patient may see? population remaining patients? Let us make initial question quantitatively clear. First, let us translate “effect” difference MDS-UPDRS-III scores first second visits subject (visit 2 −- visit 1), represented variate diff.MDS.UPRS.III. Note choices made, difference another MDS-UPDRS score (–IV), total scores, ratio rather difference – variate altogether. Second, instead asking unrealistic dichotomous question “?”, ask strong effect , quantified value MDS-UPDRS-III decrease. Third, let us ask question possible next patient. shall see question also related population whole. can calculate probability , next patient, shall observe particular value yy MDS-UPDRS-III difference, given patient Female, given observed clinical trials: Pr(MDS-UPDRS-III difference=y|Sex=Female,Treatment group=NR,data) \\mathrm{Pr}(\\text{MDS-UPDRS-III difference} = y \\:\\vert\\: \\text{Sex} = \\text{Female}, \\text{Treatment group} = \\text{NR}, \\mathrm{data}) function Pr(Y, X, learnt), accepts three arguments: Y: variates values want probability X: variates values known learnt: knowledge acquired dataset Let us first ask specific value MDS-UPDRS-III difference, let’s say 0: output Pr() function list several objects, discuss two moment: value: value probability wanted know. case , approximately 6.4% probability next treated female patient MDS-UPDRS-III difference exactly 0. quantiles: values tell us much probability change, knowledge updated clinical trials. thus quantify uncertainty present probabilistic conclusions. future, updated probability 89% probability lying two extreme (5.5% 94.5%) quantile values, 50% probability lying middle (25% 75%) ones q(typical intervals used Bayesian literature, see instance Makowski et al.). case , many clinical trials, probability change value within around 2.9% 11%. can obviously also ask probabilities possible values MDS-UPDRS-III difference next treated female patient: probability thus obtained two accompanying quantiles related uncertainty. can visualized plot() function: Two aspects plot relevant investigation: seems slightly probability mass towards negative MDS-UPDRS-III differences – means improvement degree disability. shall quantify moment. However, also clear clinical trials lead quite different probability distribution. shown breadth quantile range. Another way graphically represent see potential variability result trials available, plot examples – say 100 – results differ. examples stored third object, samples given Pr() function: Let us ask interesting question, can quantitative counterpart initial question “NAD-replenishment therapy effect females?”. ask: next treated female patient experience MDS-UPDRS-III difference equal −1-1 less?“. therefore want probability Pr(MDS-UPDRS-III diff.≤−1|Sex=Female,Treatment=NR,data) \\mathrm{Pr}(\\text{MDS-UPDRS-III diff.} \\le -1 \\:\\vert\\: \\text{Sex} = \\text{Female}, \\text{Treatment} = \\text{NR}, \\mathrm{data}) probability can calculated function tailPr(Y, X, learnt), analogous Pr() function, calculates probability Y≤yY\\le y rather Y=yY = y. answer probability decrease disability score approximately 55%; note clearly higher 50%. clinical trials, however update probability new value 34% 75%:","code":"probability0 <- Pr( Y = data.frame(diff.MDS.UPRS.III = 0), X = data.frame(Sex = 'Female', TreatmentGroup = 'NR'), learnt = learnt ) probability0$value #> X #> Y [,1] #> [1,] 0.06420201 probability0$quantiles #> , , = 5.5% #> #> X #> Y [,1] #> [1,] 0.02893608 #> #> , , = 25% #> #> X #> Y [,1] #> [1,] 0.04481232 #> #> , , = 75% #> #> X #> Y [,1] #> [1,] 0.07756895 #> #> , , = 94.5% #> #> X #> Y [,1] #> [1,] 0.1119128 probabilities <- Pr( Y = data.frame(diff.MDS.UPRS.III = (-30):30), X = data.frame(Sex = 'Female', TreatmentGroup = 'NR'), learnt = learnt ) plot(probabilities) plot(probabilities, variability = 'samples', ylim = c(0, max(probabilities$quantiles)) # keep same y-range as before ) probDecrease <- tailPr( Y = data.frame(diff.MDS.UPRS.III = -1), X = data.frame(Sex = 'Female', TreatmentGroup = 'NR'), learnt = learnt ) probDecrease$value #> X #> Y [,1] #> [1,] 0.5497687 probDecrease$quantiles[1,1,] #> 5.5% 25% 75% 94.5% #> 0.3428941 0.4639758 0.6415482 0.7474421"},{"path":"https://pglpm.github.io/inferno/articles/vignette_parkinson.html","id":"second-example-comparison-with-non-treated-patient-of-female-sex","dir":"Articles","previous_headings":"Drawing inferences","what":"Second example: comparison with non-treated patient of female sex","title":"Example of use: inferences for Parkinson's Disease","text":"previous example found 55% probability treated female patient experience decrease MDS-UPDRS-III therapy. can decrease really correlated therapy? preliminarily answer question, can find analogous probabilities female patient received treatment. use Pr(), X argument specify Placebo value Treatment group: Let’s plot probabilities, together variability (extreme case), top ones previously obtained treated case: seem difference stands treated non-treated case. , can calculate probability decrease MDS-UPDRS-III: find probability decrease disability score non-treated female patient approximately 54%. clinical trials, however update probability value 33% 74%: Therefore see similarly probable decrease non-treated well non-treated female patient. small difference two probabilities, favour treated case; difference small compared probabilities change trials available. preliminary conclusions possible questions future research: seem difference treated non-treated female patients, regarding MDS-UPDRS-III decrease. However, slightly likely decrease . decrease correlated ?","code":"probabilitiesPlacebo <- Pr( Y = data.frame(diff.MDS.UPRS.III = (-30):30), X = data.frame(Sex = 'Female', TreatmentGroup = 'Placebo'), learnt = learnt ) plotquantiles(x = (-30):30, y = probabilities$quantiles[,1, c('5.5%', '94.5%')], ylim = c(0, NA), xlab = 'MDS-UPDRS-III difference', ylab = 'probability', col = 3) plotquantiles(x = (-30):30, y = probabilitiesPlacebo$quantiles[,1, c('5.5%', '94.5%')], col = 2, add = TRUE) flexiplot(x = (-30):30, y = probabilities$values[,1], col = 3, lwd = 2, add = TRUE) flexiplot(x = (-30):30, y = probabilitiesPlacebo$values[,1], col = 2, lty = 2, add = TRUE) ## add 0-change line abline(v = 0, lwd = 1, col = 5) legend('topright', legend = c('NR, Female', 'Placebo, Female'), bty = 'n', lty = 1:2, col = 3:2) probDecreasePlacebo <- tailPr( Y = data.frame(diff.MDS.UPRS.III = -1), X = data.frame(Sex = 'Female', TreatmentGroup = 'Placebo'), learnt = learnt ) probDecreasePlacebo$value #> X #> Y [,1] #> [1,] 0.5432515 probDecreasePlacebo$quantiles[1,1,] #> 5.5% 25% 75% 94.5% #> 0.3332187 0.4538897 0.6325576 0.7434010"},{"path":"https://pglpm.github.io/inferno/articles/vignette_parkinson.html","id":"third-example-considering-age","dir":"Articles","previous_headings":"Drawing inferences","what":"Third example: considering age","title":"Example of use: inferences for Parkinson's Disease","text":"results far indicate practically difference probabilities MDS-UPDRS-III decrease treated vs non-treated female patient. probabilities, however, disregard patient’s age. possible larger differences different age groups? can answer question calculating probabilities conditional particular Age value, , Pr(MDS-UPDRS-III diff.≤−1|Sex=Female,Treatment=NR,Age=,data) \\mathrm{Pr}(\\text{MDS-UPDRS-III diff.} \\le -1 \\:\\vert\\: \\text{Sex} = \\text{Female}, \\text{Treatment} = \\text{NR}, \\text{Age} = , \\mathrm{data}) meaningful values aa age, let’s say 25 80. can find function tailPr(). time conditioning argument X include grid Age values. First calculation treated female patient, non-treated one: can plot probabilities MDS-UPDRS-III decrease patient’s age, one plot treatment group: plot shows interesting aspects: seem large difference, treated non-treated females, probability MDS-UPDRS-III decrease. 60–65 age group, increase MDS-UPDRS-III likely decrease, treated non-treated female patient. reason increase narrow age group? notice probabilities updated different values, clinical trials available.","code":"probDecreaseAge <- tailPr( Y = data.frame(diff.MDS.UPRS.III = -1), X = data.frame(Sex = 'Female', Age = 25:80, TreatmentGroup = 'NR'), learnt = learnt ) probDecreaseAgePlacebo <- tailPr( Y = data.frame(diff.MDS.UPRS.III = -1), X = data.frame(Sex = 'Female', Age = 25:80, TreatmentGroup = 'Placebo'), learnt = learnt ) plotquantiles(x = 25:80, y = probDecreaseAge$quantiles[1,, c('5.5%', '94.5%')], ylim = c(0, NA), xlab = 'age', ylab = 'probability of MDS-UPDRS-III decr.', col = 3) plotquantiles(x = 25:80, y = probDecreaseAgePlacebo$quantiles[1,, c('5.5%', '94.5%')], col = 2, add = TRUE) flexiplot(x = 25:80, y = probDecreaseAge$values[1,], col = 3, lwd = 2, add = TRUE) flexiplot(x = 25:80, y = probDecreaseAgePlacebo$values[1,], col = 2, lwd = 2, lty = 2, add = TRUE) ## add 50%-probability line abline(h = 0.5, lwd = 1, col = 5) legend('topright', legend = c('NR, Female', 'Placebo, Female'), bty = 'n', lty = 1:2, col = 3:2)"},{"path":"https://pglpm.github.io/inferno/articles/vignette_parkinson.html","id":"fourth-example-male-patient","dir":"Articles","previous_headings":"Drawing inferences","what":"Fourth example: male patient","title":"Example of use: inferences for Parkinson's Disease","text":"can perform analysis analogous previous examples, male patient. corresponding function calls plots. considering ages separately: Finally let’s compare treated female vs male patients, per age: (CONTINUED)","code":"probabilitiesMale <- Pr( Y = data.frame(diff.MDS.UPRS.III = (-30):30), X = data.frame(Sex = 'Male', TreatmentGroup = c('NR', 'Placebo')), learnt = learnt ) plotquantiles(x = (-30):30, y = probabilitiesMale$quantiles[,1, c('5.5%', '94.5%')], ylim = c(0, NA), xlab = 'MDS-UPDRS-III difference', ylab = 'probability', col = 7) plotquantiles(x = (-30):30, y = probabilitiesMale$quantiles[,2, c('5.5%', '94.5%')], col = 6, add = TRUE) flexiplot(x = (-30):30, y = probabilitiesMale$values[,1], col = 7, lwd = 2, add = TRUE) flexiplot(x = (-30):30, y = probabilitiesMale$values[,2], col = 6, lwd = 2, lty = 2, add = TRUE) ## add 0-change line abline(v = 0, lwd = 1, col = 5) legend('topright', legend = c('NR, Male', 'Placebo, Male'), bty = 'n', lty = 1:2, col = 7:6) probMaleDecreaseAge <- tailPr( Y = data.frame(diff.MDS.UPRS.III = -1), X = data.frame(Sex = 'Male', Age = 25:80, TreatmentGroup = 'NR'), learnt = learnt ) probMaleDecreaseAgePlacebo <- tailPr( Y = data.frame(diff.MDS.UPRS.III = -1), X = data.frame(Sex = 'Male', Age = 25:80, TreatmentGroup = 'Placebo'), learnt = learnt ) plotquantiles(x = 25:80, y = probMaleDecreaseAge$quantiles[1,, c('5.5%', '94.5%')], ylim = c(0, NA), xlab = 'age', ylab = 'probability of MDS-UPDRS-III decr.', col = 7) plotquantiles(x = 25:80, y = probMaleDecreaseAgePlacebo$quantiles[1,, c('5.5%', '94.5%')], col = 6, add = TRUE) flexiplot(x = 25:80, y = probMaleDecreaseAge$values[1,], col = 7, lwd = 2, add = TRUE) flexiplot(x = 25:80, y = probMaleDecreaseAgePlacebo$values[1,], col = 6, lwd = 2, lty = 2, add = TRUE) ## add 50%-probability line abline(h = 0.5, lwd = 1, col = 5) legend('topright', legend = c('NR, Male', 'Placebo, Male'), bty = 'n', lty = 1:2, col = 7:6) plotquantiles(x = 25:80, y = probDecreaseAge$quantiles[1,, c('5.5%', '94.5%')], ylim = c(0, NA), xlab = 'age', ylab = 'probability of MDS-UPDRS-III decr.', col = 3) plotquantiles(x = 25:80, y = probMaleDecreaseAge$quantiles[1,, c('5.5%', '94.5%')], col = 7, add = TRUE) flexiplot(x = 25:80, y = probDecreaseAge$values[1,], col = 3, lwd = 2, add = TRUE) flexiplot(x = 25:80, y = probMaleDecreaseAge$values[1,], col = 7, lwd = 2, lty = 2, add = TRUE) ## add 50%-probability line abline(h = 0.5, lwd = 1, col = 5) legend('topright', legend = c('NR, Female', 'NR, Male'), bty = 'n', lty = 1:2, col = c(3, 7))"},{"path":"https://pglpm.github.io/inferno/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"PierGianLuca Porta Mana. Author, maintainer. Aurora Grefsrud. Author. Håkon Mydland. Author.","code":""},{"path":"https://pglpm.github.io/inferno/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Porta Mana P, Grefsrud , Mydland H (2025). inferno: Bayesian nonparametric exchangeable inference - model-free uncertainty-quantified prediction. R package version 0.2.1, https://pglpm.github.io/inferno/, https://github.com/pglpm/inferno/.","code":"@Manual{, title = {inferno: Bayesian nonparametric exchangeable inference - model-free uncertainty-quantified prediction}, author = {PierGianLuca {Porta Mana} and Aurora Grefsrud and Håkon Mydland}, year = {2025}, note = {R package version 0.2.1, https://pglpm.github.io/inferno/}, url = {https://github.com/pglpm/inferno/}, }"},{"path":"https://pglpm.github.io/inferno/index.html","id":"bayesian-nonparametric-inference","dir":"","previous_headings":"","what":"Bayesian nonparametric exchangeable inference - model-free uncertainty-quantified prediction","title":"Bayesian nonparametric exchangeable inference - model-free uncertainty-quantified prediction","text":"repository provides R package theoretical background Bayesian nonparametric inference exchangeability, “inference populations”. package rapid development reached stable phase. means function names arguments may still change. package name also still consideration. However, core functionalities probability calculations work. code still ‘0.X’ phase, recommend contacting developers want start using package research project. love “beta-testers”!","code":""},{"path":"https://pglpm.github.io/inferno/index.html","id":"contact","dir":"","previous_headings":"","what":"Contact","title":"Bayesian nonparametric exchangeable inference - model-free uncertainty-quantified prediction","text":"Please report bugs request features specific documentation GitHub Issues. questions feel free contact developers: * application, theory, technical implementation: PierGianLuca Porta Mana pgl@portamana.org","code":""},{"path":"https://pglpm.github.io/inferno/index.html","id":"documentation","dir":"","previous_headings":"","what":"Documentation","title":"Bayesian nonparametric exchangeable inference - model-free uncertainty-quantified prediction","text":"View documentation pglpm.github.io/inferno. code still much development phase documentation also work progress. Tutorials posted soon possible. Feel free take look draft theoretical foundation. concrete example application medicine given paper; example applications machine learning paper paper.","code":""},{"path":"https://pglpm.github.io/inferno/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Bayesian nonparametric exchangeable inference - model-free uncertainty-quantified prediction","text":"Install package R using remotes package: install tagged version: install source, first clone repo: install package R: installation automatically also install required R-dependencies.","code":"remotes::install_github('pglpm/inferno') remotes::install_github('pglpm/inferno@vx.y.z') git clone https://github.com/pglpm/inferno.git install.packages(pkgs='path/to/inferno', repos=NULL)"},{"path":"https://pglpm.github.io/inferno/index.html","id":"further-reading","dir":"","previous_headings":"","what":"Further reading","title":"Bayesian nonparametric exchangeable inference - model-free uncertainty-quantified prediction","text":"low-level course Bayesian nonparametric population inference see Foundations data science.","code":""},{"path":"https://pglpm.github.io/inferno/reference/E.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate posterior probabilities — E","title":"Calculate posterior probabilities — E","text":"function calculates probability P(Y | X, data), Y X two (non overlapping) sets joint variates. function also gives quantiles possible variability probability P(Y | X, newdata, data) learning data provided, well number samples possible values probabilities. several joint values given Y X, function create 2D grid results possible compbinations given Y X values.","code":""},{"path":"https://pglpm.github.io/inferno/reference/E.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate posterior probabilities — E","text":"","code":"E( Ynames, X = NULL, learnt, quantiles = c(5, 95)/100, nsamples = 100L, parallel = TRUE, silent = FALSE, usememory = TRUE )"},{"path":"https://pglpm.github.io/inferno/reference/E.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate posterior probabilities — E","text":"X matrix data.table NULL: set values variates want condition joint probability Y. NULL (default), conditioning made (except conditioning learning dataset prior assumptions). One variate per column, one set values per row. learnt Either string name directory full path 'learnt.rds' object, object quantiles numeric vector, 0 1, NULL: desired quantiles variability probability Y. Default c(0.05, 0.95) 5% 95% quantiles. nsamples integer NULL: desired number samples variability probability Y. Default 100. parallel logical integer: whether use pre-existing parallel workers, many create use. Default TRUE. silent logical: give warnings updates computation? Default FALSE. usememory logical: save partial results disc, avoid crashes? Default TRUE. Y1names String vector: joint variates joint probability . One variate per column, one set values per row.","code":""},{"path":"https://pglpm.github.io/inferno/reference/E.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate posterior probabilities — E","text":"list : (1) matrix probabilities P(Y|X,data,assumptions), combinations values Y (rows) X (columns); (2) array variability quantiles (3rd dimension array) probabilities; (3) array variability samples (3rd dimension array) probabilities.","code":""},{"path":"https://pglpm.github.io/inferno/reference/Pr.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate posterior probabilities — Pr","title":"Calculate posterior probabilities — Pr","text":"function calculates probability P(Y | X, data), Y X two (non overlapping) sets joint variates. function also gives quantiles possible variability probability P(Y | X, newdata, data) learning data provided, well number samples possible values probabilities. several joint values given Y X, function create 2D grid results possible compbinations given Y X values. function also allows base-rate prior-probability corrections: prior (instance, base rate) Y given, function calculate P(Y | X, data, prior) P(X | Y, data) prior means Bayes's theorem.","code":""},{"path":"https://pglpm.github.io/inferno/reference/Pr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate posterior probabilities — Pr","text":"","code":"Pr( Y, X = NULL, learnt, priorY = NULL, nsamples = 100L, quantiles = c(0.055, 0.25, 0.75, 0.945), parallel = TRUE, silent = TRUE, usememory = TRUE, keepYX = TRUE )"},{"path":"https://pglpm.github.io/inferno/reference/Pr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate posterior probabilities — Pr","text":"Y matrix data.table: set values variates want joint probability . One variate per column, one set values per row. X matrix data.table NULL: set values variates want condition joint probability Y. NULL (default), conditioning made (except conditioning learning dataset prior assumptions). One variate per column, one set values per row. learnt Either string name directory full path 'learnt.rds' object, produced learn function, object . priorY numeric vector length rows Y, TRUE, NULL (default): prior probabilities base rates Y values. TRUE, prior probabilities assumed equal. nsamples integer NULL \"\": desired number samples variability probability Y. NULL, samples reported. \"\" (Inf), samples obtained learn function used. Default 100. quantiles numeric vector, 0 1, NULL: desired quantiles variability probability Y. Default c(0.055, 0.25, 0.75, 0.945), , 5.5%, 25%, 75%, 94.5% quantiles (typical quantile values Bayesian literature: give 50% 89% credibility intervals, correspond 1 shannons 0.5 shannons uncertainty). NULL, quantiles calculated. parallel logical integer: whether use pre-existing parallel workers, many create use. Default TRUE. silent logical: give warnings updates computation? Default FALSE. usememory logical: save partial results disc, avoid crashes? Default TRUE. keepYX logical, default TRUE: keep copy Y X arguments output? used plot method.","code":""},{"path":"https://pglpm.github.io/inferno/reference/Pr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate posterior probabilities — Pr","text":"list class probability, consisting elements values, possibly elements quantiles (non-NULL argument quantiles), samples (non-NULL argument nsample), Y, X. Element values: matrix probabilities P(Y|X,data,assumptions), combinations values Y (rows) X (columns). Element quantiles: array variability quantiles (3rd dimension array) probabilities. Element samples: array variability samples (3rd dimension array) probabilities. Elements Y, X: copies Y X arguments.","code":""},{"path":"https://pglpm.github.io/inferno/reference/buildauxmetadata.html","id":null,"dir":"Reference","previous_headings":"","what":"Build preliminary metadata flie — buildauxmetadata","title":"Build preliminary metadata flie — buildauxmetadata","text":"Build preliminary metadata flie","code":""},{"path":"https://pglpm.github.io/inferno/reference/buildauxmetadata.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Build preliminary metadata flie — buildauxmetadata","text":"","code":"buildauxmetadata(data, metadata, Dthreshold = 1, tscalefactor = 1.25)"},{"path":"https://pglpm.github.io/inferno/reference/buildauxmetadata.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Build preliminary metadata flie — buildauxmetadata","text":"data data.frame object metadata data.frame object Dthreshold positive number: threshold fraction unique datapoints total datapoints, decide whether treat rounded variate continuous tscalefactor positive number: scaling factor variate conversion","code":""},{"path":"https://pglpm.github.io/inferno/reference/buildauxmetadata.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Build preliminary metadata flie — buildauxmetadata","text":"auxmetadata data.frame object","code":""},{"path":"https://pglpm.github.io/inferno/reference/createQfunction.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate and save transformation function for ordinal variates — createQfunction","title":"Calculate and save transformation function for ordinal variates — createQfunction","text":"Calculate save transformation function ordinal variates","code":""},{"path":"https://pglpm.github.io/inferno/reference/createQfunction.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate and save transformation function for ordinal variates — createQfunction","text":"","code":"createQfunction( nint = 3600, nsamples = 2^24L, mean = 0, sd = 3, shapelo = 0.5, shapehi = 0.5, rate = 1, file = paste0(\"__Qfunction\", nint, \"_\", sd), save = TRUE, plot = FALSE )"},{"path":"https://pglpm.github.io/inferno/reference/flexiplot.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot numeric or character values — flexiplot","title":"Plot numeric or character values — flexiplot","text":"Plot function modifies expands graphics package's matplot function several ways. First, either x y arguments can class character. case, axes labels corresponding unique values used (see arguments xdomain ydomain). Second, allows specification lower upper limit xlim ylim arguments. Third, uses cleaner plotting style default argument type = 'l' (line plot) rather type = 'p' (point plot).","code":""},{"path":"https://pglpm.github.io/inferno/reference/flexiplot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot numeric or character values — flexiplot","text":"","code":"flexiplot( x, y, xdomain = NULL, ydomain = NULL, xlim = NULL, ylim = NULL, type = \"l\", pch = c(1, 0, 2, 5, 6, 3, 4), grid = TRUE, add = FALSE, lwd = 1, ... )"},{"path":"https://pglpm.github.io/inferno/reference/flexiplot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot numeric or character values — flexiplot","text":"x Numeric character: vector x-coordinates. missing, numeric vector 1:... created many values rows y. y Numeric character: vector y coordinates. missing, numeric vector 1:... created many values rows x. xdomain Character numeric NULL (default): vector possible values variable represented x-axis, case x argument character vector. ordering values respected. NULL, unique(x) used. ydomain Character numeric NULL (default): like xdomain y-coordinate. xlim NULL (default) vector two values. latter case, two values finite (including NA NULL), min max x-coordinate plotted points used. ylim NULL (default) vector two values. Like argument xlim, y-coordinates. grid Logical: whether plot light grid. Default TRUE. ... parameters passed matplot.","code":""},{"path":"https://pglpm.github.io/inferno/reference/inferno-package.html","id":null,"dir":"Reference","previous_headings":"","what":"inferno: Bayesian nonparametric exchangeable inference - model-free uncertainty-quantified prediction — inferno-package","title":"inferno: Bayesian nonparametric exchangeable inference - model-free uncertainty-quantified prediction — inferno-package","text":"Offers several functions Bayesian nonparametric exchangeable inference (also called \"density\" \"population\" inference), including Monte Carlo calculation posterior densities. machine-learning perspective, offers model-free, uncertainty-quantified prediction algorithm.","code":""},{"path":[]},{"path":"https://pglpm.github.io/inferno/reference/inferno-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"inferno: Bayesian nonparametric exchangeable inference - model-free uncertainty-quantified prediction — inferno-package","text":"Maintainer: PierGianLuca Porta Mana pgl@portamana.org (ORCID) Authors: Aurora Grefsrud agre@hvl.(ORCID) Håkon Mydland haakon.mydland@gmail.com (ORCID)","code":""},{"path":"https://pglpm.github.io/inferno/reference/learn.html","id":null,"dir":"Reference","previous_headings":"","what":"Monte Carlo computation of posterior probability distribution conditional on given data — learn","title":"Monte Carlo computation of posterior probability distribution conditional on given data — learn","text":"Monte Carlo computation posterior probability distribution conditional given data","code":""},{"path":"https://pglpm.github.io/inferno/reference/learn.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Monte Carlo computation of posterior probability distribution conditional on given data — learn","text":"","code":"learn( data, metadata, auxdata = NULL, outputdir = NULL, nsamples = 3600, nchains = 60, nsamplesperchain = 60, parallel = TRUE, seed = NULL, cleanup = TRUE, appendtimestamp = TRUE, appendinfo = TRUE, output = \"directory\", subsampledata = NULL, startupMCiterations = 3600, minMCiterations = 0, maxMCiterations = +Inf, maxhours = +Inf, ncheckpoints = NULL, relerror = 0.05, prior = missing(data), thinning = NULL, plottraces = TRUE, showKtraces = FALSE, showAlphatraces = FALSE, hyperparams = list(ncomponents = 64, minalpha = -4, maxalpha = 4, byalpha = 1, Rshapelo = 0.5, Rshapehi = 0.5, Rvarm1 = 3^2, Cshapelo = 0.5, Cshapehi = 0.5, Cvarm1 = 3^2, Dshapelo = 0.5, Dshapehi = 0.5, Dvarm1 = 3^2, Lshapelo = 0.5, Lshapehi = 0.5, Lvarm1 = 3^2, Bshapelo = 1, Bshapehi = 1, Dthreshold = 1, tscalefactor = 2) )"},{"path":"https://pglpm.github.io/inferno/reference/learn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Monte Carlo computation of posterior probability distribution conditional on given data — learn","text":"data dataset, given data.frame file path csv file. metadata metadata object, given either data.frame object, file pa csv file. auxdata larger dataset, given data.frame file path csv file. dataset many use Monte Carlo sampling, can used calculate hyperparameters. outputdir Character: path folder output saved. omitted, directory created name data file suffix \"_output_\". nsamples Integer: number desired Monte Carlo samples. Default 3600. nchains Integer: number Monte Carlo chains. Default 60. nsamplesperchain Integer: number Monte Carlo samples per chain. parallel Logical: use pre-existing parallel workers package doParallel. integer: create use many parallel workers. Default TRUE. seed Integer: use seed random number generator. missing NULL (default), set seed. cleanup Logical: remove diagnostic files end computation? Default TRUE. appendtimestamp Logical: append timestamp name output directory outputdir? Default TRUE. appendinfo Logical: append information dataset Monte Carlo parameters name output directory outputdir? Default TRUE. output Character: 'directory', return output directory name VALUE; string 'learnt', return 'learnt' object containing parameters obtained Monte Carlo computation. value: VALUE NULL. subsampledata Integer: use subset many datapoints Monte Carlo computation. startupMCiterations Integer: number initial (burn-) Monte Carlo iterations. Default 3600. minMCiterations Integer: minimum number Monte Carlo iterations done. Default 0. maxMCiterations Integer: many Monte Carlo iterations. Default Inf. maxhours Numeric: approximate time limit, hours, Monte Carlo computation last. Default Inf. ncheckpoints Integer: number datapoints use checking Monte Carlo computation end. NULL (default), equal number variates + 2. Inf, use datapoints. relerror Numeric: desired maximal relative error calculated probabilities respect variability new data. prior Logical: Calculate prior distribution? thinning Integer: thin Monte Carlo samples value. NULL (default): let diagnostics decide thinning value. plottraces Logical: save plots Monte Carlo traces diagnostic values? Default TRUE. showKtraces Logical: save plots Monte Carlo traces K parameter? Default FALSE. showAlphatraces Logical: save plots Monte Carlo traces Alpha parameter? Default FALSE. hyperparams List: hyperparameters prior.","code":""},{"path":"https://pglpm.github.io/inferno/reference/learn.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Monte Carlo computation of posterior probability distribution conditional on given data — learn","text":"Name directory containing output files, learnt object, NULL, depending argument output.","code":""},{"path":"https://pglpm.github.io/inferno/reference/metadatatemplate.html","id":null,"dir":"Reference","previous_headings":"","what":"Metadata and helper function for metadata — metadatatemplate","title":"Metadata and helper function for metadata — metadatatemplate","text":"Metadata helper function create template metadata file object.","code":""},{"path":"https://pglpm.github.io/inferno/reference/metadatatemplate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Metadata and helper function for metadata — metadatatemplate","text":"","code":"metadatatemplate( data, file = NULL, includevrt = NULL, excludevrt = NULL, addsummary2metadata = FALSE, backupfiles = FALSE, verbose = TRUE )"},{"path":"https://pglpm.github.io/inferno/reference/metadatatemplate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Metadata and helper function for metadata — metadatatemplate","text":"data dataset, given data.frame file path csv file. file String: name csv file metadata saved; NULL: output metadata VALUE. includevrt Character NULL: name variates dataset included. excludevrt Character NULL: name variates dataset excluded. addsummary2metadata Logical: also output diagnostic statistics metadata? Default FALSE. backupfiles Logical: rename previous metadata file exists? Default TRUE. verbose Logical: output heuristics variate? Default TRUE.","code":""},{"path":"https://pglpm.github.io/inferno/reference/metadatatemplate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Metadata and helper function for metadata — metadatatemplate","text":"file = NULL, preliminary metadata file created VALUE NULL; otherwise VALUE data.frame containing metadata.","code":""},{"path":"https://pglpm.github.io/inferno/reference/metadatatemplate.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Metadata and helper function for metadata — metadatatemplate","text":"learn function needs metadata variates present data. metadata can provided either csv file data.frame. function buildmetadata creates template metadata csv-file, outputs metadata data.frame, trying guess metadata information dataset.guesses may incorrect (already said, metadata information contained data, algorithm can exist extracts data). user must modify correct template, using starting point prepare correct metadata information.","code":""},{"path":"https://pglpm.github.io/inferno/reference/metadatatemplate.html","id":"metadata-information-and-format","dir":"Reference","previous_headings":"","what":"Metadata information and format","title":"Metadata and helper function for metadata — metadatatemplate","text":"order correctly learn dataset, learn function needs information contained data themeselves; , needs metadata. Metadata provided either csv file data.frame. metadata file data.frame must contain one row simple variate given inference problem, following fields (columns), even may empty: name, type, domainmin, domainmax, datastep, minincluded, maxincluded, V1, V2, (possibly additional V-fields, sequentially numbered) type field three possible values: nominal, ordinal, continuous. remaining fields must filled depend type field. list requirements: nominal ordinal: require either V1, V2, ... fields domainmin, domainmax, datastep (three) fields. fields required. continuous: requires domainmin, domainmax, datastep, minincluded, maxincluded. meanings possible values fields: name: name variate. must character string appears dataset (careful upper- lower-case). type: data type variate name. Possible values nominal, ordinal, continuous. nominal (also called categorical) variate discrete, finite number possible values intrinsic ordering. Examples variate related colour, values \"red\", \"green\", \"blue\", ; variate related cat breeds, values \"Siamese\", \"Abyssinian\", \"Persian\", . possible values variate must given fields V1, V2, . important include values possible present dataset. variate two possible values (binary variate), example \"yes\" \"\", can specified nominal. ordinal variate discrete, finite number possible values intrinsic ordering. Examples Likert-scaled variate results survey, values \"dissatisfied\", \"dissatisfied\", \"satisfied\", \"satisfied\"; variate related levels quantities, values \"low\", \"medium\", \"high\"; variate numeric scale values 1 10. Whether variate nominal ordinal often depends context. possible values variate given either one () two ways: (1) fields V1, V2, ..., nominal variates; (2) fields domainmin, domainmax, datastep. Option (2) works numeric, equally spaced values: assumes first value domainmin, second domainmin+datastep, third domainmin+2*datastep, last value, domainmax. continuous variate continuum values intrinsic ordering. Examples variate related width object; age person; one coordinate object particular reference system. continuous variate requires specification fields domainmin, domainmax, datastep, minincluded, maxincluded. naturally continuous variates often rounded given precision; instance, age person might reported rounded nearest year (25 years, 26 years, ); length object might reported nearest centimetre (1 m, 1.01 m, 1.02 m, ). minimum distance rounded values must reported datastep field; 1 age example 0.01 length example . See explanation reporting rounding important. domainmin: minimum value variate (ordinal continuous) can take . Possible values real number empty value, interpreted -Inf (explicit values like -Inf, -inf, -infinity also work). continuous variates, like age distance temperature, naturally positive, therefore domainmin equal 0. contexts minimum value different. instance, given inference problem involves people age 18 , domainmin set 18. domainmax: maximum value variate (ordinal continuous) can take . Possible values real number, empty value, interpreted +Inf (explicit values like Inf, inf, infinity also work). domainmin, maximum value depends context. age-related variate theoretically domainmax equal infinity (empty value metadata file); given study categorizes people \"90 years old older\", domainmax set 90. datastep: minimum distance values variate (ordinal continuous). Possible values positive real number empty value, interpreted 0 (explicit value 0 also accepted). numeric ordinal variate, datastep step consecutive values. continuous rounded variate, datastep minimum distance different values occurs rounding; see examples given . function buildmetadata heuristics determine whether variate rounded . See details section Rounding . minincluded, maxincluded: Whether minimum (domainmin) maximum(domainmax) values continuous variate can really appear data . Possible values true (t yes) false (f, , empty field); upper- lower-case irrelevant. examples meaning fields. () continuous unrounded variate temperature 0 minimum possible value domainmin, value physically impossible can never appear data; case minincluded empty (set false ). (b) variate related unrounded length, metres, objects may take positive real value; suppose objects length 5 less grouped together value 5. possible several datapoints value 5: one datapoint originally value 3.782341...; another value 4.929673..., . case domainmin set 5, minincluded set true (yes). Similarly maximum value variate maxincluded. Note domainmin minus-infinity (empty value metadata file), minincluded automatically empty (, false), similarly maxincluded domainmax infinity.","code":""},{"path":"https://pglpm.github.io/inferno/reference/metadatatemplate.html","id":"rounded-continuous-variates","dir":"Reference","previous_headings":"","what":"Rounded continuous variates","title":"Metadata and helper function for metadata — metadatatemplate","text":"written.","code":""},{"path":"https://pglpm.github.io/inferno/reference/metadatatemplate.html","id":"necessity-of-metadata","dir":"Reference","previous_headings":"","what":"Necessity of metadata","title":"Metadata and helper function for metadata — metadatatemplate","text":"written.","code":""},{"path":"https://pglpm.github.io/inferno/reference/mutualinfo.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate mutual information between groups of joint variates — mutualinfo","title":"Calculate mutual information between groups of joint variates — mutualinfo","text":"function calculates various entropic information measures two variates (variate may consist joint variates): mutual information, conditional entropies, entropies.","code":""},{"path":"https://pglpm.github.io/inferno/reference/mutualinfo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate mutual information between groups of joint variates — mutualinfo","text":"","code":"mutualinfo( Y1names, Y2names, X = NULL, learnt, nsamples = 3600, unit = \"Sh\", parallel = TRUE, silent = TRUE )"},{"path":"https://pglpm.github.io/inferno/reference/mutualinfo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate mutual information between groups of joint variates — mutualinfo","text":"Y1names String vector: first group joint variates Y2names String vector NULL: second group joint variates X matrix data.frame NULL: values variates conditional want probabilities. learnt Either string name directory full path 'learnt.rds' object, object . nsamples numeric: number samples approximately calculate mutual information. Default 3600 unit Either one 'Sh' shannon (default), 'Hart' hartley, 'nat' natural unit, positive real indicating base logarithms used. parallel, logical numeric: whether use pre-existing parallel workers, many create use. silent logical: give warnings updates computation?","code":""},{"path":"https://pglpm.github.io/inferno/reference/mutualinfo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate mutual information between groups of joint variates — mutualinfo","text":"list consisting elements MI, CondEn12, CondEn21, En1, En2, MImax, unit, Y1names, Y1names. elements except unit, Y1names, Y2names vector value error. Element MI mutual information (joint) variates Y1names (joint) variates Y2names. ElementCondEn12 conditional entropy first variate given second, vice versa CondEn21. Elements En1 En1 (differential) entropies first second variates. Element MImax maximum possible value mutual information. Elements unit, Y1names, Y2names identical inputs.","code":""},{"path":"https://pglpm.github.io/inferno/reference/plot.probability.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot an object of class ","title":"Plot an object of class ","text":"plot method utility plot probabilities obtained Pr tailPr, well uncertainties. probabilities plotted either Y, one curve value X, vice versa.","code":""},{"path":"https://pglpm.github.io/inferno/reference/plot.probability.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot an object of class ","text":"","code":"# S3 method for class 'probability' plot( p, variability = NULL, PvsY = NULL, legend = TRUE, lwd = 3, lty = 1:5, col = palette(), xlab = NULL, ylab = NULL, ylim = c(0, NA), add = FALSE, ... )"},{"path":"https://pglpm.github.io/inferno/reference/plot.probability.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot an object of class ","text":"p Object class \"probability\", obtained Pr tailPr. variability One values \"quantiles\", \"samples\", \"none\" (equivalent NA FALSE), NULL (default), case variability available p used. argument chooses represent variability probability; see Pr. requested variability available object p, warning issued variability plotted. PvsY Logical NULL: probabilities plotted Y argument? NULL, argument Y X larger number values chosen. many probability curves plotted number values argument. legend Logical: plot legend different curves? ... parameters passed matplot.","code":""},{"path":"https://pglpm.github.io/inferno/reference/plotFsamples.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot one-dimensional posterior probabilities — plotFsamples","title":"Plot one-dimensional posterior probabilities — plotFsamples","text":"Plot one-dimensional posterior probabilities","code":""},{"path":"https://pglpm.github.io/inferno/reference/plotFsamples.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot one-dimensional posterior probabilities — plotFsamples","text":"","code":"plotFsamples( file, learnt, data, plotprobability = TRUE, plotvariability = \"samples\", nFsamples = NULL, datahistogram = !(missing(data) || is.null(data)), datascatter = !(missing(data) || is.null(data)), parallel = TRUE, silent = FALSE )"},{"path":"https://pglpm.github.io/inferno/reference/plotFsamples.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot one-dimensional posterior probabilities — plotFsamples","text":"file string: name plot output file data data.table object filepath: datapoints plotprobability logical: plot resulting probability curve plotvariability string, either 'samples' 'quantiles': plot variability probability distribution new samples nFsamples positive number: plotvariability='samples', number samples representative frequency distributions display variability; plotvariability='quantiles', quantiles (range 0 0.5) show datahistogram logical: plot data histogram? datascatter logical: plot data scatterplot along x-axis? parallel Bool numeric: whether use pre-existing parallel workers, many create use silent logical: give warnings updates computation learned Either string name directory full path 'learnt.rds' object, object ","code":""},{"path":"https://pglpm.github.io/inferno/reference/plotFsamples.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot one-dimensional posterior probabilities — plotFsamples","text":"list mutual information, error, unit","code":""},{"path":"https://pglpm.github.io/inferno/reference/plotquantiles.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot pairs of quantiles — plotquantiles","title":"Plot pairs of quantiles — plotquantiles","text":"Utility function plot pair quantiles obtained Pr tailPr.","code":""},{"path":"https://pglpm.github.io/inferno/reference/plotquantiles.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot pairs of quantiles — plotquantiles","text":"","code":"plotquantiles(x, y, xdomain = NULL, alpha.f = 0.25, col = 9, border = NA, ...)"},{"path":"https://pglpm.github.io/inferno/reference/plotquantiles.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot pairs of quantiles — plotquantiles","text":"x Numeric character: vector x-coordinates. See flexiplot. y Numeric: matrix many rows x even number columns, one column per quantile. Typically quantiles obtained Pr tailPr, $quantiles value. value three-dimensional array, one columns (corresponding possible values X argument Pr) one rows (corresponding possible values Y argument Pr) selected used y input. xdomain Character numeric NULL (default): vector possible values variable represented x-axis, x argument character vector. ordering values respected. NULL, unique(x) used. alpha.f Numeric, default 0.25: opacity quantile bands, 0 completely invisible 1 completely opaque. col Fill colour quantile bands. Can specified usual ways, see instance col2rgb. Default 9. border Fill colour quantile bands. Can specified usual ways, see instance col2rgb. NA (default), border drawn. ... parameters passed flexiplot.","code":""},{"path":"https://pglpm.github.io/inferno/reference/tailPr.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate cumulative posterior probabilities — tailPr","title":"Calculate cumulative posterior probabilities — tailPr","text":"function calculates probability P(Y <= y | X, data), Y X two (non overlapping) sets joint variates (lower.tail argument FALSE, P(Y > y | X, data) calculated). function also gives quantiles possible variability probability P(Y <= y | X, newdata, data) learning data provided, well number samples possible values probabilities. several joint values given Y X, function create 2D grid results possible compbinations given Y X values.","code":""},{"path":"https://pglpm.github.io/inferno/reference/tailPr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate cumulative posterior probabilities — tailPr","text":"","code":"tailPr( Y, X = NULL, learnt, nsamples = 100L, quantiles = c(0.055, 0.25, 0.75, 0.945), parallel = TRUE, eq = TRUE, lower.tail = TRUE, silent = TRUE, usememory = TRUE, keepYX = TRUE )"},{"path":"https://pglpm.github.io/inferno/reference/tailPr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate cumulative posterior probabilities — tailPr","text":"Y matrix data.table: set values variates want joint probability . One variate per column, one set values per row. X matrix data.table NULL: set values variates want condition joint probability Y. NULL (default), conditioning made (except conditioning learning dataset prior assumptions). One variate per column, one set values per row. learnt Either string name directory full path 'learnt.rds' object, produced learn function, object . nsamples integer NULL \"\": desired number samples variability probability Y. NULL, samples reported. \"\" (Inf), samples obtained learn function used. Default 100. quantiles numeric vector, 0 1, NULL: desired quantiles variability probability Y. Default c(0.055, 0.25, 0.75, 0.945), , 5.5%, 25%, 75%, 94.5% quantiles (typical quantile values Bayesian literature: give 50% 89% credibility intervals, correspond 1 shannons 0.5 shannons uncertainty). NULL, quantiles calculated. parallel logical integer: whether use pre-existing parallel workers, many create use. Default TRUE. eq logical: include Y = y cumulative probability? Default TRUE. lower.tail logical: calculate P(Y < y)? (TRUE, default) P(Y > y)? (FALSE). silent logical: give warnings updates computation? Default FALSE. usememory logical: save partial results disc, avoid crashes? Default TRUE. keepYX logical, default TRUE: keep copy Y X arguments output? used plot method.","code":""},{"path":"https://pglpm.github.io/inferno/reference/tailPr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate cumulative posterior probabilities — tailPr","text":"list class probability, consisting elements values, possibly elements quantiles (non-NULL argument quantiles), samples (non-NULL argument nsample), Y, X. Element values: matrix probabilities P(Y <= y |X,data,assumptions), combinations values Y (rows) X (columns). Element quantiles: array variability quantiles (3rd dimension array) probabilities. Element samples: array variability samples (3rd dimension array) probabilities. Elements Y, X: copies Y X arguments.","code":""},{"path":"https://pglpm.github.io/inferno/reference/util_Pcheckpoints.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate joint frequencies for checkpoints in learn() — util_Pcheckpoints","title":"Calculate joint frequencies for checkpoints in learn() — util_Pcheckpoints","text":"Calculate joint frequencies checkpoints learn()","code":""},{"path":"https://pglpm.github.io/inferno/reference/util_Pcheckpoints.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate joint frequencies for checkpoints in learn() — util_Pcheckpoints","text":"","code":"util_Pcheckpoints(Y, mcsamples, auxmetadata)"},{"path":"https://pglpm.github.io/inferno/reference/util_Pcheckpoints.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate joint frequencies for checkpoints in learn() — util_Pcheckpoints","text":"Y matrix data.table: values already-transformed variates want joint probability; one variate per column mcsamples object internal learn(), containing partial Monte Carlo draws auxmetadata object internal learn(), containing processed metadata information","code":""},{"path":"https://pglpm.github.io/inferno/reference/util_Pcheckpoints.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate joint frequencies for checkpoints in learn() — util_Pcheckpoints","text":"joint frequencies Y correspoinding Monte Carlo samples","code":""},{"path":"https://pglpm.github.io/inferno/reference/util_lprob.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate collection of log-probabilities for different components and samples — util_lprob","title":"Calculate collection of log-probabilities for different components and samples — util_lprob","text":"Calculate collection log-probabilities different components samples","code":""},{"path":"https://pglpm.github.io/inferno/reference/util_lprob.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate collection of log-probabilities for different components and samples — util_lprob","text":"","code":"util_lprob( x, learnt, nR, iR, tR, nC, iC, tC, Clefts, Crights, nD, iD, tD, Dsteps, Dlefts, Drights, nO, iO, tO, nN, iN, tN, nB, iB, tB )"},{"path":"https://pglpm.github.io/inferno/reference/util_lprob.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate collection of log-probabilities for different components and samples — util_lprob","text":"nR etc: Parameters containing appropriate indices X numerical matrix: transformed variates learnt: Monte-Carlo-output object","code":""},{"path":"https://pglpm.github.io/inferno/reference/util_lprob.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate collection of log-probabilities for different components and samples — util_lprob","text":"Matrix many rows components many cols samples","code":""},{"path":"https://pglpm.github.io/inferno/reference/util_ltailprob.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate collection of log-probabilities for different components and samples — util_ltailprob","title":"Calculate collection of log-probabilities for different components and samples — util_ltailprob","text":"Calculate collection log-probabilities different components samples","code":""},{"path":"https://pglpm.github.io/inferno/reference/util_ltailprob.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate collection of log-probabilities for different components and samples — util_ltailprob","text":"","code":"util_ltailprob( x, learnt, nR, iR, tR, nC, iC, tC, Clefts, Crights, nD, iD, tD, Dsteps, Dlefts, Drights, nO, iO, tO, lower.tail = TRUE )"},{"path":"https://pglpm.github.io/inferno/reference/util_ltailprob.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate collection of log-probabilities for different components and samples — util_ltailprob","text":"nR etc: Parameters containing appropriate indices X numerical matrix: transformed variates learnt: Monte-Carlo-output object","code":""},{"path":"https://pglpm.github.io/inferno/reference/util_ltailprob.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate collection of log-probabilities for different components and samples — util_ltailprob","text":"Matrix many rows components many cols samples","code":""},{"path":"https://pglpm.github.io/inferno/reference/vrtgrid.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a grid of values for a variate — vrtgrid","title":"Create a grid of values for a variate — vrtgrid","text":"function create set values variate vrt, based metadata stored learnt object created learn function). set values depends type variate (nominal continuous, rounded, , see metadata). range values chosen include, extend slightly beyond, range observed data used learn function. Variate domains always respected.","code":""},{"path":"https://pglpm.github.io/inferno/reference/vrtgrid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a grid of values for a variate — vrtgrid","text":"","code":"vrtgrid(vrt, learnt, length.out = 129)"},{"path":"https://pglpm.github.io/inferno/reference/vrtgrid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a grid of values for a variate — vrtgrid","text":"vrt character: name variate, must match one names metadata file provided learn function. learnt Either string name directory full path 'learnt.rds' object, produced learn function, object . length.numeric, positive (default 129): number values created; used continuous, non-rounded variates (see metadata).","code":""},{"path":"https://pglpm.github.io/inferno/reference/vrtgrid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a grid of values for a variate — vrtgrid","text":"numeric character vector values.","code":""},{"path":"https://pglpm.github.io/inferno/reference/vtransform.html","id":null,"dir":"Reference","previous_headings":"","what":"Transforms variates to different representations — vtransform","title":"Transforms variates to different representations — vtransform","text":"Transforms variates different representations","code":""},{"path":"https://pglpm.github.io/inferno/reference/vtransform.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Transforms variates to different representations — vtransform","text":"","code":"vtransform( x, auxmetadata, Rout = NULL, Cout = NULL, Dout = NULL, Bout = NULL, Oout = NULL, Nout = NULL, variates = NULL, logjacobianOr = NULL )"},{"path":"https://pglpm.github.io/inferno/reference/vtransform.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Transforms variates to different representations — vtransform","text":"x data.table object containing data transformed auxmetadata auxmetadata object Rout string, output R-type variate, possible values: 'normalized': internal MCMC use 'mi': use mutualinfo() 'original': original representation Cout string, output C-type variate, possible values: 'init': internal MCMC use (init input) 'left', 'right': internal MCMC use 'aux', 'lat': internal MCMC use 'boundisinf': sampling functions 'mi': use mutualinfo() 'original': original representation Dout string, output D-type variate, possible values: 'init': internal MCMC use (init input) 'left', 'right': internal MCMC use 'aux': internal MCMC use 'boundisinf': sampling functions 'mi': use mutualinfo() 'original': original representation Bout string, output B-type variate, possible values: 'numeric': internal MCMC use, values 0,1 'original': original representation Oout string, output O-type variate, possible values: 'numeric': internal MCMC use, values 1,2,... 'original': original representation Nout string, output N-type variate, possible values: 'numeric': internal MCMC use, values 1,2,... 'original': original representation variates string vector, names variates corresponding columns x (case x misses column names) logjacobianOr logical NULL: output log-Jacobian orginal transformed domain? NULL (default) means calculate log-Jacobians","code":""},{"path":"https://pglpm.github.io/inferno/reference/vtransform.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Transforms variates to different representations — vtransform","text":"data frame transformed variates, log-Jacobians","code":""}]