{"size":{"Width":736,"Height":190},"appearance":{"background":null,"padding":14,"font":{"family":"Courier New","size":10.0,"bold":false,"italic":false,"underline":false,"strikeout":false,"color":"rgb(0,72,168)"},"border":{"on":true,"size":0.0,"style":"solid","color":"#666"},"text":{"wrap":false,"hAlign":"left","vAlign":"top"}},"outputType":"WIDGET","widgetState":null,"outputs":{"console":"<pre class='debug-source'>>library(flipMaxDiff)\n</pre>\n<pre class='debug-source'>>comparison.3 <- MaxDiffEnsemble(formModels, !formEnsemble, get0("formOutput", ifnotfound = "Comparison"))\n</pre>\r\n<div class=\"debug-summarystatistics\"><table>\r\n<tr><th>Started:</th><td class=utc-time>2018-09-10T00:19:43.987Z</td></tr>\r\n<tr><th>Finished:</th><td class=utc-time>2018-09-10T00:19:44.987Z</td></tr>\r\n<tr><th>Total time:</th><td>1.16s</td></tr>\r\n<tr><th>Time executing code:</th><td title=\"0.02s\">1.15s</td></tr>\r\n<tr><th>Other overhead on R server:</th><td>0.90s</td></tr>\r\n<tr><th>Time spent transferring data:</th><td>0.02s</td></tr>\r\n<tr><th>Data sent to R server:</th><td>2.5MB</td></tr>\r\n<tr><th>Data received from R server:</th><td>19.7KB</td></tr>\r\n</table></div>","htmlwidgets":"<div id=\"htmlwidget_container\">\n <div id=\"htmlwidget-819380cb70f054e908b0\" class=\"formattable_widget html-widget\" style=\"width:100%;height:500px;\" width=\"100%\" height=\"500\"></div>\n</div>\n<script type=\"application/json\" data-for=\"htmlwidget-819380cb70f054e908b0\">{\"x\":{\"html\":\"<table class = \\\"table table-condensed\\\"style = \\\"margin:0; border-bottom: 2px solid; border-top: 2px solid; font-size:90%;\\\">\\n<h3 class=\\\".h3\\\" style=\\\"color:#3E7DCC; text-align:left; margin-top:0px; margin-bottom:0\\\">Comparison of 3 MaxDiff models and Ensemble<\\/h3>\\n<caption style=\\\"caption-side:bottom;font-style:italic; font-size:90%;\\\"><\\/caption>\\n <thead>\\n <tr>\\n <th style=\\\"text-align:left;\\\"> <\\/th>\\n <th style=\\\"text-align:right;\\\"> In-sample accuracy <\\/th>\\n <th style=\\\"text-align:right;\\\"> Out-sample accuracy <\\/th>\\n <th style=\\\"text-align:right;\\\"> BIC <\\/th>\\n <th style=\\\"text-align:right;\\\"> Log-likelihood <\\/th>\\n <th style=\\\"text-align:right;\\\"> Classes <\\/th>\\n <th style=\\\"text-align:right;\\\"> Algorithm <\\/th>\\n <th style=\\\"text-align:right;\\\"> Time taken (s) <\\/th>\\n <\\/tr>\\n <\\/thead>\\n<tbody>\\n <tr>\\n <td style=\\\"text-align:left;\\\"> Model 1 <\\/td>\\n <td style=\\\"text-align:right;\\\"> <span style=\\\"display: inline-block; direction: rtl; border-radius: 4px; padding-right: 0px; background-color: #a2c8f7; width: 99.63%\\\">‎66.75%<\\/span> <\\/td>\\n <td style=\\\"text-align:right;\\\"> <span style=\\\"display: inline-block; direction: rtl; border-radius: 4px; padding-right: 0px; background-color: #a9ccf7; width: 97.53%\\\">‎32.92%<\\/span> <\\/td>\\n <td style=\\\"text-align:right;\\\"> <span style=\\\"display: inline-block; direction: rtl; border-radius: 4px; padding-right: 0px; background-color: #80b4f4; width: 89.97%\\\">‎4,874<\\/span> <\\/td>\\n <td style=\\\"text-align:right;\\\"> <span style=\\\"display: inline-block; direction: rtl; border-radius: 4px; padding-right: 0px; background-color: #80b4f4\\\">‎-2,308<\\/span> <\\/td>\\n <td style=\\\"text-align:right;\\\"> 1 <\\/td>\\n <td style=\\\"text-align:right;\\\"> HB-Stan <\\/td>\\n <td style=\\\"text-align:right;\\\"> <span style=\\\"display: inline-block; direction: rtl; border-radius: 4px; padding-right: 0px; background-color: #80b4f4; width: 34.82%\\\">‎46<\\/span> <\\/td>\\n <\\/tr>\\n <tr>\\n <td style=\\\"text-align:left;\\\"> Model 2 <\\/td>\\n <td style=\\\"text-align:right;\\\"> <span style=\\\"display: inline-block; direction: rtl; border-radius: 4px; padding-right: 0px; background-color: #97c1f6; width: 99.75%\\\">‎66.83%<\\/span> <\\/td>\\n <td style=\\\"text-align:right;\\\"> <span style=\\\"display: inline-block; direction: rtl; border-radius: 4px; padding-right: 0px; background-color: #a9ccf7; width: 97.53%\\\">‎32.92%<\\/span> <\\/td>\\n <td style=\\\"text-align:right;\\\"> <span style=\\\"display: inline-block; direction: rtl; border-radius: 4px; padding-right: 0px; background-color: #b5d3f8; width: 95.11%\\\">‎5,152<\\/span> <\\/td>\\n <td style=\\\"text-align:right;\\\"> <span style=\\\"display: inline-block; direction: rtl; border-radius: 4px; padding-right: 0px; background-color: #deebfc\\\">‎-2,315<\\/span> <\\/td>\\n <td style=\\\"text-align:right;\\\"> 2 <\\/td>\\n <td style=\\\"text-align:right;\\\"> HB-Stan <\\/td>\\n <td style=\\\"text-align:right;\\\"> <span style=\\\"display: inline-block; direction: rtl; border-radius: 4px; padding-right: 0px; background-color: #c9dffa; width: 81.20%\\\">‎106<\\/span> <\\/td>\\n <\\/tr>\\n <tr>\\n <td style=\\\"text-align:left;\\\"> Model 3 <\\/td>\\n <td style=\\\"text-align:right;\\\"> <span style=\\\"display: inline-block; direction: rtl; border-radius: 4px; padding-right: 0px; background-color: #e8f1fd; width: 98.88%\\\">‎66.25%<\\/span> <\\/td>\\n <td style=\\\"text-align:right;\\\"> <span style=\\\"display: inline-block; direction: rtl; border-radius: 4px; padding-right: 0px; background-color: #e8f1fd; width: 93.83%\\\">‎31.67%<\\/span> <\\/td>\\n <td style=\\\"text-align:right;\\\"> <span style=\\\"display: inline-block; direction: rtl; border-radius: 4px; padding-right: 0px; background-color: #e8f1fd; width: 100.00%\\\">‎5,417<\\/span> <\\/td>\\n <td style=\\\"text-align:right;\\\"> <span style=\\\"display: inline-block; direction: rtl; border-radius: 4px; padding-right: 0px; background-color: #e8f1fd\\\">‎-2,316<\\/span> <\\/td>\\n <td style=\\\"text-align:right;\\\"> 3 <\\/td>\\n <td style=\\\"text-align:right;\\\"> HB-Stan <\\/td>\\n <td style=\\\"text-align:right;\\\"> <span style=\\\"display: inline-block; direction: rtl; border-radius: 4px; padding-right: 0px; background-color: #e8f1fd; width: 100.00%\\\">‎131<\\/span> <\\/td>\\n <\\/tr>\\n <tr>\\n <td style=\\\"text-align:left;\\\"> Ensemble <\\/td>\\n <td style=\\\"text-align:right;\\\"> <span style=\\\"display: inline-block; direction: rtl; border-radius: 4px; padding-right: 0px; background-color: #80b4f4; width: 100.00%\\\">‎67.00%<\\/span> <\\/td>\\n <td style=\\\"text-align:right;\\\"> <span style=\\\"display: inline-block; direction: rtl; border-radius: 4px; padding-right: 0px; background-color: #80b4f4; width: 100.00%\\\">‎33.75%<\\/span> <\\/td>\\n <td style=\\\"text-align:right;\\\"> <span style=\\\"display: inline-block; direction: rtl; border-radius: 4px; padding-right: 0px\\\">‎NA<\\/span> <\\/td>\\n <td style=\\\"text-align:right;\\\"> <span style=\\\"display: inline-block; direction: rtl; border-radius: 4px; padding-right: 0px\\\">‎NA<\\/span> <\\/td>\\n <td style=\\\"text-align:right;\\\"> NA <\\/td>\\n <td style=\\\"text-align:right;\\\"> Ensemble <\\/td>\\n <td style=\\\"text-align:right;\\\"> <span style=\\\"display: inline-block; direction: rtl; border-radius: 4px; padding-right: 0px\\\">‎NA<\\/span> <\\/td>\\n <\\/tr>\\n<\\/tbody>\\n<\\/table>\"},\"evals\":[],\"jsHooks\":[]}</script>\n<script type=\"application/htmlwidget-sizing\" data-for=\"htmlwidget-819380cb70f054e908b0\">{\"viewer\":{\"width\":\"100%\",\"height\":350,\"padding\":15,\"fill\":false},\"browser\":{\"width\":\"100%\",\"height\":500,\"padding\":0,\"fill\":false}}</script>","htmlwidget-head":"{\"stylesheets\":[\"https://rserverhtmlwidgetasset.azureedge.net/bootstrap.min-63e52244789ab8f6e3a78818886e7085.css\"],\"javascript\":[\"https://rserverhtmlwidgetasset.azureedge.net/jquery.min-91a24ea414e8c447d647cecab86866c2.js\",\"https://rserverhtmlwidgetasset.azureedge.net/bootstrap.min-326d184c3c13feede563e4adcb5ff2a0.js\",\"https://rserverhtmlwidgetasset.azureedge.net/html5shiv.min-e70767555a95c48c08833356d362ccef.js\",\"https://rserverhtmlwidgetasset.azureedge.net/respond.min-4255ee1a060b15cb2432d0a497a6d510.js\",\"https://rserverhtmlwidgetasset.azureedge.net/htmlwidgets-917a66c6e5036eb1bfd1fb672a82635a.js\",\"https://rserverhtmlwidgetasset.azureedge.net/formattable_widget-d2927ec9dec4a568bd3f4a62041c0ddb.js\"],\"attachments\":[],\"widget-cannot-re-render\":true}","message":"","warning":""},"secondsTaken":1.1644611999999999,"updated":"2018-09-10T00:19:44.9871445Z","lastUpdatedMessage":null,"executedCode":"library(flipMaxDiff)\ncomparison.3 <- MaxDiffEnsemble(formModels, !formEnsemble, get0(\"formOutput\", ifnotfound = \"Comparison\"))\n","lastSavedCode":"library(flipMaxDiff)\ncomparison.3 <- MaxDiffEnsemble(formModels, !formEnsemble, get0(\"formOutput\", ifnotfound = \"Comparison\"))\n","highlightedCodeSpans":[{"start":53,"length":10,"index":4},{"start":66,"length":12,"index":4}],"tableTransformations":"<TabularTransformer>\r\n <TabularTransform type=\"Truncation\" truncationHeaderType=\"Column\" />\r\n <TabularTransform />\r\n</TabularTransformer>","tabularFilteringOptions":null,"hasGuiControls":true,"guiControls":{"Code":"var controls = [];\nvar modelsInput = form.dropBox({label: \"Input models\", types:[\"RItem:FitMaxDiff\"], name: \"formModels\",\n multi: true, required: true, min_inputs: 2,\n prompt: \"Select at least 2 MaxDiff models.\"});\ncontrols.push(modelsInput);\n\nvar ensemble = form.checkBox({label: \"Ensemble\", name: \"formEnsemble\", default_value: false});\ncontrols.push(ensemble);\n\nif (ensemble.getValue()) {\n var output = form.comboBox({label: \"Output\", \n alternatives: [\"Comparison\", \"Ensemble\"], name: \"formOutput\", default_value: \"Comparison\"});\n controls.push(output);\n}\nform.setInputControls(controls);\n\nif (ensemble.getValue())\n form.setHeading('Ensemble of MaxDiff Models');\nelse\n form.setHeading('Compare MaxDiff Models');","JSError":null,"JSErrorDetails":null,"ControlDefinitionErrors":null,"InputValidationErrors":null,"Controls":[{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":null,"Page":null,"Group":null,"Type":"Heading","Label":null,"LabelEmphasised":false,"Value":null,"Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":false,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":null,"CheckAlign":null,"Text":"Ensemble of MaxDiff Models","Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formModels","Page":null,"Group":null,"Type":"DropBox","Label":"Input models","LabelEmphasised":false,"Value":null,"Allowed":null,"Multi":true,"Prompt":"Select at least 2 MaxDiff models.","ErrorMessage":"Input models: Input models accepts only inputs which are of type Ritem (Fitmaxdiff).","Invalid":null,"Required":true,"AllowedTypes":["RItem:FitMaxDiff"],"OwnerRItemGuid":"13990980-4810-4519-a288-2ec18ea937d9","MinInputs":2,"MaxInputs":2147483647,"Height":4,"Duplicates":false,"Values":["1793ac91-1600-4210-ac9a-0be6f90e5337","fd8c3583-ef59-46b4-9e09-e77c86cc857e","851f7c5e-ff55-457b-a624-6ede282ba471"],"CheckAlign":null,"Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formEnsemble","Page":null,"Group":null,"Type":"CheckBox","Label":"Ensemble","LabelEmphasised":false,"Value":true,"Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":false,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":null,"CheckAlign":"left","Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formOutput","Page":null,"Group":null,"Type":"ComboBox","Label":"Output","LabelEmphasised":false,"Value":"Comparison","Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":true,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":["Comparison","Ensemble"],"CheckAlign":null,"Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":null,"Page":null,"Group":null,"Type":null,"Label":null,"LabelEmphasised":false,"Value":null,"Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":false,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":null,"CheckAlign":null,"Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":false}]},"calculating":"Idle","showDebug":false,"layout":"OutputOnly","vSplit":0.25,"hSplit":0.45,"updateWarnings":true,"updateMode":"Manual","warnSlow":false,"Options":{"debugconsole":false,"codeposition":"OutputOnly","splitH":0.45,"splitV":0.25,"update warnings":true,"updating":"Manual","warn slow":false}}