/*! For license information please see dll.PrincipalComponentAnalysis.js.LICENSE.txt */
(window.webpackJsonp_name_dll=window.webpackJsonp_name_dll||[]).push([[103],{3461:function(e,t,n){"use strict";n.r(t);var a=n(7),r=n.n(a),o=n(14),c=n.n(o),i=n(13),l=n.n(i),s=n(15),u=n.n(s),p=n(16),d=n.n(p),f=n(8),m=n.n(f),b=n(0),v=n.n(b),h=n(1),y=n.n(h),E=n(1015),g=n(3462),P=n(2309),O=n(151),w=n(1067),C=n.n(w),j=n(107),R=n(142),x=n.n(R),D=n(368);n(3464);function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){r()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function q(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 n,a=m()(e);if(t){var r=m()(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return d()(this,n)}}var F=function(e){var t,n=e.data,a=e.variables,r=e.scale,o=e.center,c=e.noComponents;try{for(var i=[],l=n[a[0]].length,s=0;s<l;s++){for(var u=[],p=!1,d=0;d<a.length;d++){var f=n[a[d]][s];if(t=f,!Object(j.isPrimitive)(t)||x()(t)){p=!0;break}u.push(f)}p||i.push(u)}var m=new g.PCA(i,{center:o,scale:r}),b=m.predict(i,{noComponents:c});return{pca:m,components:b}}catch(e){return{}}},N=function(e){u()(n,e);var t=q(n);function n(e){var a;c()(this,n),a=t.call(this,e);var r=e.data,o=e.variables,i=e.scale,l=e.center,s=e.noComponents,u=F({data:r,variables:o,scale:i,center:l,noComponents:s}),p=u.pca,d=u.components;return a.state=k({pca:p,components:d},e),p&&e.onResult(a.state.pca,a.state.components),a}return l()(n,[{key:"render",value:function(){var e=this.state.pca;if(!e)return v.a.createElement(E.default,{variant:"danger"},this.props.t("missing-attributes"));var t=e.getStandardDeviations(),n=e.getExplainedVariance(),a=e.getCumulativeVariance(),r={x:C()(0,n.length,1),y:n,type:"scatter",name:"Proportion of variance"};return v.a.createElement("div",{style:{overflowX:"auto",width:"100%"}},v.a.createElement("span",{className:"title"},"PCA Summary"),function(e,t,n){return v.a.createElement(O.default,{bordered:!0,size:"sm"},v.a.createElement("thead",null,v.a.createElement("tr",null,v.a.createElement("th",null),v.a.createElement("th",null,"Standard Deviation"),v.a.createElement("th",null,"Proportion of Variance"),v.a.createElement("th",null,"Cumulative Variance Proportion"))),v.a.createElement("tbody",null,e.map((function(e,a){return v.a.createElement("tr",{key:a},v.a.createElement("th",null," ","PC".concat(a+1)," "),v.a.createElement("td",null," ",e.toFixed(3)," "),v.a.createElement("td",null," ",t[a].toFixed(3)," "),v.a.createElement("td",null," ",n[a].toFixed(3)," "))}))))}(t,n,a),v.a.createElement(D.default,{editable:!0,data:[r],layout:{xaxis:{title:"Principal Component"},yaxis:{title:"Explained Proportion"}}}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){if(e.data!==t.data||e.variables!==t.variables){var n=e.data,a=e.variables,r=e.scale,o=e.center,c=e.noComponents,i=k(k({},F({data:n,variables:a,scale:r,center:o,noComponents:c})),e);return i.pca&&e.onResult(i.pca,i.components),i}return null}}]),n}(b.Component);N.defaultProps={center:!0,scale:!1,noComponents:0,onResult:function(){}},N.propTypes={data:y.a.object.isRequired,variables:y.a.arrayOf(y.a.string).isRequired,center:y.a.bool,scale:y.a.bool,noComponents:y.a.number,onResult:y.a.func},t.default=Object(P.withTranslation)("pca")(N)},3464:function(e,t,n){"use strict";n.r(t);var a=n(965),r=n(3465);a.default.addResources("de","pca",r.DE),a.default.addResources("en","pca",r.EN),a.default.addResources("es","pca",r.ES)},3465:function(e){e.exports=JSON.parse('{"DE":{"missing-attributes":"Modell konnte nicht geschätzt werden. Bitte überprüfen Sie, ob alle erforderlichen Attribute vorhanden sind."},"EN":{"missing-attributes":"Model could not be estimated. Please check that all required attributes are supplied."},"ES":{"missing-attributes":"El modelo no pudo ser estimado. Por favor, compruebe que se han suministrado todos los atributos necesarios."}}')}}]);