/*! For license information please see dll.247.js.LICENSE.txt */
(window.webpackJsonp_name_dll=window.webpackJsonp_name_dll||[]).push([[247],{3380:function(e,t,a){"use strict";a.r(t);var n=a(14),r=a.n(n),i=a(13),c=a.n(i),o=a(10),l=a.n(o),s=a(15),u=a.n(s),d=a(16),f=a.n(d),p=a(8),g=a.n(p),m=a(7),h=a.n(m),v=a(0),y=a.n(v),E=a(1),R=a.n(E),q=a(1122),b=a.n(q),x=a(77),C=a(88),S=a(968),_=a(69),O=a(39),w=a.n(O),A=a(203),k=a.n(A),M=a(364),P=a.n(M),T=a(204),V=a(209),G=a(200),L=a(1312),j=a(1834),D=a(966);function I(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,n=g()(e);if(t){var r=g()(this).constructor;a=Reflect.construct(n,arguments,r)}else a=n.apply(this,arguments);return f()(this,a)}}var N=function(e){u()(a,e);var t=I(a);function a(e){var n,i,c,o;return r()(this,a),n=t.call(this,e),h()(l()(n),"compute",(function(){var e=n.state,t=e.y,a=e.success,r=e.x,i=e.intercept,c=e.omitMissing,o=y.a.createElement(j.default,{data:n.props.data,x:r,y:t,success:a,intercept:i,omitMissing:c,quantitative:n.props.quantitative,onPredict:function(e,t,a,r){var i=P()(n.props.data,1),c=n.props.quantitative.slice(),o=n.props.categorical.slice(),l="probs_logis"+r;i[l]=t,k()(c,l)||c.push(l),i[l="pred_logis"+r]=e,k()(o,l)||o.push(l),l="resid_logis"+r,k()(c,l)||c.push(l),i[l]=a,n.props.onGenerate(c,o,i)}});n.props.logAction(G.DATA_EXPLORER_LOGISTIC_REGRESSION,{y:t,x:r,intercept:i}),n.props.onCreated(o)})),w()(e.categorical)&&e.categorical.length>0?(c=e.categorical[0],o=(i=Object(L.default)(e.data[c],c))[i.length-1]):(i=[],o=null),n.state={categories:i,y:c,success:o,x:e.quantitative[0],intercept:!0,omitMissing:!1},n}return c()(a,[{key:"render",value:function(){var e=this,t=this.props,a=t.categorical,n=t.quantitative,r=t.data,i=t.t,c=this.state,o=c.x,l=c.y,s=c.categories,u=c.success,d=c.intercept;return y.a.createElement(C.default,{style:{fontSize:"14px",maxWidth:500}},y.a.createElement(C.default.Header,{as:"h4"},i("Logistic Regression"),y.a.createElement(D.default,{title:i("Logistic Regression"),content:"Predict a categorical response variable using one or more explanatory variables."})),y.a.createElement(C.default.Body,null,y.a.createElement(S.default,null,y.a.createElement(_.default,{md:6},y.a.createElement(T.default,{legend:i("outcome-y"),options:a,defaultValue:l,onChange:function(t){var a=Object(L.default)(r[t],t);e.setState({categories:a,success:a[a.length-1],y:t})}})),y.a.createElement(_.default,{md:6},y.a.createElement(T.default,{legend:"".concat(i("success")," (Y = 1):"),defaultValue:u,options:s,onChange:function(t){e.setState({success:t})}}))),y.a.createElement(T.default,{legend:i("predictors-x"),multi:!0,options:b()(n.concat(a)),defaultValue:o||"",onChange:function(t){return e.setState({x:t})},closeMenuOnSelect:!1,selectAllOption:!0}),y.a.createElement(V.default,{legend:i("include-intercept"),defaultValue:d,onChange:function(t){return e.setState({intercept:t})}}),y.a.createElement(V.default,{legend:i("omit-missing"),defaultValue:!1,onChange:function(t){return e.setState({omitMissing:t})}}),y.a.createElement(x.default,{disabled:!o||0===o.length,variant:"primary",block:!0,onClick:this.compute},i("calculate"))))}}]),a}(v.Component);N.defaultProps={logAction:function(){}},N.propTypes={categorical:R.a.array.isRequired,quantitative:R.a.array.isRequired,data:R.a.object.isRequired,logAction:R.a.func,onGenerate:R.a.func.isRequired,onCreated:R.a.func.isRequired},t.default=N},966:function(e,t,a){"use strict";a.r(t);var n=a(0),r=a.n(n),i=a(1),c=a.n(i),o=a(77),l=a(974),s=a(971),u=a(970),d=a(998),f=function(e){var t=r.a.createElement(l.default,{id:"popover-positioned-right"},r.a.createElement(s.default,null,e.title),r.a.createElement(u.default,null,e.content));return r.a.createElement(d.default,{trigger:["hover","focus"],placement:"left",rootClose:!0,overlay:t},r.a.createElement(o.default,{size:"sm",variant:"outline-secondary",className:"question-button"},r.a.createElement("div",{className:"fa fa-question"})))};f.propTypes={content:c.a.oneOfType([c.a.string,c.a.node]).isRequired,title:c.a.string.isRequired},t.default=f}}]);