1&&\"string\"==typeof v&&!d.checkClone&&De.test(v))return e.each((function(i){var o=e.eq(i);y&&(t[0]=v.call(this,i,o.html())),Re(o,t,n,r)}));if(p&&(a=(i=xe(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=a),a||r)){for(u=(s=b.map(ve(i,\"script\"),Le)).length;f0&&ye(a,!u&&ve(e,\"script\")),s},cleanData:function(e){for(var t,n,r,i=b.event.special,o=0;void 0!==(n=e[o]);o++)if(X(n)){if(t=n[G.expando]){if(t.events)for(r in t.events)i[r]?b.event.remove(n,r):b.removeEvent(n,r,t.handle);n[G.expando]=void 0}n[Y.expando]&&(n[Y.expando]=void 0)}}}),b.fn.extend({detach:function(e){return Me(this,e,!0)},remove:function(e){return Me(this,e)},text:function(e){return B(this,(function(e){return void 0===e?b.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Re(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||qe(this,e).appendChild(e)}))},prepend:function(){return Re(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=qe(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Re(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Re(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(b.cleanData(ve(e,!1)),e.textContent=\"\");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return b.clone(this,e,t)}))},html:function(e){return B(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if(\"string\"==typeof e&&!Ne.test(e)&&!ge[(de.exec(e)||[\"\",\"\"])[1].toLowerCase()]){e=b.htmlPrefilter(e);try{for(;n3,ne.removeChild(t)),s}}))}();var ze=[\"Webkit\",\"Moz\",\"ms\"],Ue=v.createElement(\"div\").style,Xe={};function Ve(e){var t=b.cssProps[e]||Xe[e];return t||(e in Ue?e:Xe[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=ze.length;n--;)if((e=ze[n]+t)in Ue)return e}(e)||e)}var Ge=/^(none|table(?!-c[ea]).+)/,Ye=/^--/,Qe={position:\"absolute\",visibility:\"hidden\",display:\"block\"},Je={letterSpacing:\"0\",fontWeight:\"400\"};function Ke(e,t,n){var r=ee.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||\"px\"):t}function Ze(e,t,n,r,i,o){var a=\"width\"===t?1:0,s=0,u=0;if(n===(r?\"border\":\"content\"))return 0;for(;a<4;a+=2)\"margin\"===n&&(u+=b.css(e,n+te[a],!0,i)),r?(\"content\"===n&&(u-=b.css(e,\"padding\"+te[a],!0,i)),\"margin\"!==n&&(u-=b.css(e,\"border\"+te[a]+\"Width\",!0,i))):(u+=b.css(e,\"padding\"+te[a],!0,i),\"padding\"!==n?u+=b.css(e,\"border\"+te[a]+\"Width\",!0,i):s+=b.css(e,\"border\"+te[a]+\"Width\",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(e[\"offset\"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function et(e,t,n){var r=We(e),i=(!d.boxSizingReliable()||n)&&\"border-box\"===b.css(e,\"boxSizing\",!1,r),o=i,a=$e(e,t,r),s=\"offset\"+t[0].toUpperCase()+t.slice(1);if(Ie.test(a)){if(!n)return a;a=\"auto\"}return(!d.boxSizingReliable()&&i||!d.reliableTrDimensions()&&k(e,\"tr\")||\"auto\"===a||!parseFloat(a)&&\"inline\"===b.css(e,\"display\",!1,r))&&e.getClientRects().length&&(i=\"border-box\"===b.css(e,\"boxSizing\",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Ze(e,t,n||(i?\"border\":\"content\"),o,r,a)+\"px\"}function tt(e,t,n,r,i){return new tt.prototype.init(e,t,n,r,i)}b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=$e(e,\"opacity\");return\"\"===n?\"1\":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=U(t),u=Ye.test(t),l=e.style;if(u||(t=Ve(s)),a=b.cssHooks[t]||b.cssHooks[s],void 0===n)return a&&\"get\"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];\"string\"===(o=typeof n)&&(i=ee.exec(n))&&i[1]&&(n=ae(e,t,i),o=\"number\"),null!=n&&n==n&&(\"number\"!==o||u||(n+=i&&i[3]||(b.cssNumber[s]?\"\":\"px\")),d.clearCloneStyle||\"\"!==n||0!==t.indexOf(\"background\")||(l[t]=\"inherit\"),a&&\"set\"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=U(t);return Ye.test(t)||(t=Ve(s)),(a=b.cssHooks[t]||b.cssHooks[s])&&\"get\"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=$e(e,t,r)),\"normal\"===i&&t in Je&&(i=Je[t]),\"\"===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),b.each([\"height\",\"width\"],(function(e,t){b.cssHooks[t]={get:function(e,n,r){if(n)return!Ge.test(b.css(e,\"display\"))||e.getClientRects().length&&e.getBoundingClientRect().width?et(e,t,r):Fe(e,Qe,(function(){return et(e,t,r)}))},set:function(e,n,r){var i,o=We(e),a=!d.scrollboxSize()&&\"absolute\"===o.position,s=(a||r)&&\"border-box\"===b.css(e,\"boxSizing\",!1,o),u=r?Ze(e,t,r,s,o):0;return s&&a&&(u-=Math.ceil(e[\"offset\"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-Ze(e,t,\"border\",!1,o)-.5)),u&&(i=ee.exec(n))&&\"px\"!==(i[3]||\"px\")&&(e.style[t]=n,n=b.css(e,t)),Ke(0,n,u)}}})),b.cssHooks.marginLeft=_e(d.reliableMarginLeft,(function(e,t){if(t)return(parseFloat($e(e,\"marginLeft\"))||e.getBoundingClientRect().left-Fe(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+\"px\"})),b.each({margin:\"\",padding:\"\",border:\"Width\"},(function(e,t){b.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o=\"string\"==typeof n?n.split(\" \"):[n];r<4;r++)i[e+te[r]+t]=o[r]||o[r-2]||o[0];return i}},\"margin\"!==e&&(b.cssHooks[e+t].set=Ke)})),b.fn.extend({css:function(e,t){return B(this,(function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=We(e),i=t.length;a1)}}),b.Tween=tt,tt.prototype={constructor:tt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||b.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(b.cssNumber[n]?\"\":\"px\")},cur:function(){var e=tt.propHooks[this.prop];return e&&e.get?e.get(this):tt.propHooks._default.get(this)},run:function(e){var t,n=tt.propHooks[this.prop];return this.options.duration?this.pos=t=b.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):tt.propHooks._default.set(this),this}},tt.prototype.init.prototype=tt.prototype,tt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=b.css(e.elem,e.prop,\"\"))&&\"auto\"!==t?t:0},set:function(e){b.fx.step[e.prop]?b.fx.step[e.prop](e):1!==e.elem.nodeType||!b.cssHooks[e.prop]&&null==e.elem.style[Ve(e.prop)]?e.elem[e.prop]=e.now:b.style(e.elem,e.prop,e.now+e.unit)}}},tt.propHooks.scrollTop=tt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},b.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:\"swing\"},b.fx=tt.prototype.init,b.fx.step={};var nt,rt,it=/^(?:toggle|show|hide)$/,ot=/queueHooks$/;function at(){rt&&(!1===v.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(at):e.setTimeout(at,b.fx.interval),b.fx.tick())}function st(){return e.setTimeout((function(){nt=void 0})),nt=Date.now()}function ut(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i[\"margin\"+(n=te[r])]=i[\"padding\"+n]=e;return t&&(i.opacity=i.width=e),i}function lt(e,t,n){for(var r,i=(ct.tweeners[t]||[]).concat(ct.tweeners[\"*\"]),o=0,a=i.length;o1)},removeAttr:function(e){return this.each((function(){b.removeAttr(this,e)}))}}),b.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?b.prop(e,t,n):(1===o&&b.isXMLDoc(e)||(i=b.attrHooks[t.toLowerCase()]||(b.expr.match.bool.test(t)?ft:void 0)),void 0!==n?null===n?void b.removeAttr(e,t):i&&\"set\"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+\"\"),n):i&&\"get\"in i&&null!==(r=i.get(e,t))?r:null==(r=b.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!d.radioValue&&\"radio\"===t&&k(e,\"input\")){var n=e.value;return e.setAttribute(\"type\",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(O);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),ft={set:function(e,t,n){return!1===t?b.removeAttr(e,n):e.setAttribute(n,n),n}},b.each(b.expr.match.bool.source.match(/\\w+/g),(function(e,t){var n=pt[t]||b.find.attr;pt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=pt[a],pt[a]=i,i=null!=n(e,t,r)?a:null,pt[a]=o),i}}));var dt=/^(?:input|select|textarea|button)$/i,ht=/^(?:a|area)$/i;function gt(e){return(e.match(O)||[]).join(\" \")}function vt(e){return e.getAttribute&&e.getAttribute(\"class\")||\"\"}function yt(e){return Array.isArray(e)?e:\"string\"==typeof e&&e.match(O)||[]}b.fn.extend({prop:function(e,t){return B(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[b.propFix[e]||e]}))}}),b.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&b.isXMLDoc(e)||(t=b.propFix[t]||t,i=b.propHooks[t]),void 0!==n?i&&\"set\"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&\"get\"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=b.find.attr(e,\"tabindex\");return t?parseInt(t,10):dt.test(e.nodeName)||ht.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:\"htmlFor\",class:\"className\"}}),d.optSelected||(b.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),b.each([\"tabIndex\",\"readOnly\",\"maxLength\",\"cellSpacing\",\"cellPadding\",\"rowSpan\",\"colSpan\",\"useMap\",\"frameBorder\",\"contentEditable\"],(function(){b.propFix[this.toLowerCase()]=this})),b.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(h(e))return this.each((function(t){b(this).addClass(e.call(this,t,vt(this)))}));if((t=yt(e)).length)for(;n=this[u++];)if(i=vt(n),r=1===n.nodeType&&\" \"+gt(i)+\" \"){for(a=0;o=t[a++];)r.indexOf(\" \"+o+\" \")<0&&(r+=o+\" \");i!==(s=gt(r))&&n.setAttribute(\"class\",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(h(e))return this.each((function(t){b(this).removeClass(e.call(this,t,vt(this)))}));if(!arguments.length)return this.attr(\"class\",\"\");if((t=yt(e)).length)for(;n=this[u++];)if(i=vt(n),r=1===n.nodeType&&\" \"+gt(i)+\" \"){for(a=0;o=t[a++];)for(;r.indexOf(\" \"+o+\" \")>-1;)r=r.replace(\" \"+o+\" \",\" \");i!==(s=gt(r))&&n.setAttribute(\"class\",s)}return this},toggleClass:function(e,t){var n=typeof e,r=\"string\"===n||Array.isArray(e);return\"boolean\"==typeof t&&r?t?this.addClass(e):this.removeClass(e):h(e)?this.each((function(n){b(this).toggleClass(e.call(this,n,vt(this),t),t)})):this.each((function(){var t,i,o,a;if(r)for(i=0,o=b(this),a=yt(e);t=a[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&\"boolean\"!==n||((t=vt(this))&&G.set(this,\"__className__\",t),this.setAttribute&&this.setAttribute(\"class\",t||!1===e?\"\":G.get(this,\"__className__\")||\"\"))}))},hasClass:function(e){var t,n,r=0;for(t=\" \"+e+\" \";n=this[r++];)if(1===n.nodeType&&(\" \"+gt(vt(n))+\" \").indexOf(t)>-1)return!0;return!1}});var mt=/\\r/g;b.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=h(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,b(this).val()):e)?i=\"\":\"number\"==typeof i?i+=\"\":Array.isArray(i)&&(i=b.map(i,(function(e){return null==e?\"\":e+\"\"}))),(t=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()])&&\"set\"in t&&void 0!==t.set(this,i,\"value\")||(this.value=i))}))):i?(t=b.valHooks[i.type]||b.valHooks[i.nodeName.toLowerCase()])&&\"get\"in t&&void 0!==(n=t.get(i,\"value\"))?n:\"string\"==typeof(n=i.value)?n.replace(mt,\"\"):null==n?\"\":n:void 0}}),b.extend({valHooks:{option:{get:function(e){var t=b.find.attr(e,\"value\");return null!=t?t:gt(b.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a=\"select-one\"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),b.each([\"radio\",\"checkbox\"],(function(){b.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=b.inArray(b(e).val(),t)>-1}},d.checkOn||(b.valHooks[this].get=function(e){return null===e.getAttribute(\"value\")?\"on\":e.value})})),d.focusin=\"onfocusin\"in e;var xt=/^(?:focusinfocus|focusoutblur)$/,bt=function(e){e.stopPropagation()};b.extend(b.event,{trigger:function(t,n,r,i){var o,a,s,u,l,f,p,d,y=[r||v],m=c.call(t,\"type\")?t.type:t,x=c.call(t,\"namespace\")?t.namespace.split(\".\"):[];if(a=d=s=r=r||v,3!==r.nodeType&&8!==r.nodeType&&!xt.test(m+b.event.triggered)&&(m.indexOf(\".\")>-1&&(x=m.split(\".\"),m=x.shift(),x.sort()),l=m.indexOf(\":\")<0&&\"on\"+m,(t=t[b.expando]?t:new b.Event(m,\"object\"==typeof t&&t)).isTrigger=i?2:3,t.namespace=x.join(\".\"),t.rnamespace=t.namespace?new RegExp(\"(^|\\\\.)\"+x.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:b.makeArray(n,[t]),p=b.event.special[m]||{},i||!p.trigger||!1!==p.trigger.apply(r,n))){if(!i&&!p.noBubble&&!g(r)){for(u=p.delegateType||m,xt.test(u+m)||(a=a.parentNode);a;a=a.parentNode)y.push(a),s=a;s===(r.ownerDocument||v)&&y.push(s.defaultView||s.parentWindow||e)}for(o=0;(a=y[o++])&&!t.isPropagationStopped();)d=a,t.type=o>1?u:p.bindType||m,(f=(G.get(a,\"events\")||Object.create(null))[t.type]&&G.get(a,\"handle\"))&&f.apply(a,n),(f=l&&a[l])&&f.apply&&X(a)&&(t.result=f.apply(a,n),!1===t.result&&t.preventDefault());return t.type=m,i||t.isDefaultPrevented()||p._default&&!1!==p._default.apply(y.pop(),n)||!X(r)||l&&h(r[m])&&!g(r)&&((s=r[l])&&(r[l]=null),b.event.triggered=m,t.isPropagationStopped()&&d.addEventListener(m,bt),r[m](),t.isPropagationStopped()&&d.removeEventListener(m,bt),b.event.triggered=void 0,s&&(r[l]=s)),t.result}},simulate:function(e,t,n){var r=b.extend(new b.Event,n,{type:e,isSimulated:!0});b.event.trigger(r,null,t)}}),b.fn.extend({trigger:function(e,t){return this.each((function(){b.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return b.event.trigger(e,t,n,!0)}}),d.focusin||b.each({focus:\"focusin\",blur:\"focusout\"},(function(e,t){var n=function(e){b.event.simulate(t,e.target,b.event.fix(e))};b.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,i=G.access(r,t);i||r.addEventListener(e,n,!0),G.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=G.access(r,t)-1;i?G.access(r,t,i):(r.removeEventListener(e,n,!0),G.remove(r,t))}}}));var wt=e.location,Tt={guid:Date.now()},Ct=/\\?/;b.parseXML=function(t){var n;if(!t||\"string\"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,\"text/xml\")}catch(e){n=void 0}return n&&!n.getElementsByTagName(\"parsererror\").length||b.error(\"Invalid XML: \"+t),n};var Et=/\\[\\]$/,St=/\\r?\\n/g,kt=/^(?:submit|button|image|reset|file)$/i,At=/^(?:input|select|textarea|keygen)/i;function Nt(e,t,n,r){var i;if(Array.isArray(t))b.each(t,(function(t,i){n||Et.test(e)?r(e,i):Nt(e+\"[\"+(\"object\"==typeof i&&null!=i?t:\"\")+\"]\",i,n,r)}));else if(n||\"object\"!==x(t))r(e,t);else for(i in t)Nt(e+\"[\"+i+\"]\",t[i],n,r)}b.param=function(e,t){var n,r=[],i=function(e,t){var n=h(t)?t():t;r[r.length]=encodeURIComponent(e)+\"=\"+encodeURIComponent(null==n?\"\":n)};if(null==e)return\"\";if(Array.isArray(e)||e.jquery&&!b.isPlainObject(e))b.each(e,(function(){i(this.name,this.value)}));else for(n in e)Nt(n,e[n],t,i);return r.join(\"&\")},b.fn.extend({serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=b.prop(this,\"elements\");return e?b.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!b(this).is(\":disabled\")&&At.test(this.nodeName)&&!kt.test(e)&&(this.checked||!pe.test(e))})).map((function(e,t){var n=b(this).val();return null==n?null:Array.isArray(n)?b.map(n,(function(e){return{name:t.name,value:e.replace(St,\"\\r\\n\")}})):{name:t.name,value:n.replace(St,\"\\r\\n\")}})).get()}});var Dt=/%20/g,jt=/#.*$/,qt=/([?&])_=[^&]*/,Lt=/^(.*?):[ \\t]*([^\\r\\n]*)$/gm,Ht=/^(?:GET|HEAD)$/,Ot=/^\\/\\//,Pt={},Rt={},Mt=\"*/\".concat(\"*\"),It=v.createElement(\"a\");function Wt(e){return function(t,n){\"string\"!=typeof t&&(n=t,t=\"*\");var r,i=0,o=t.toLowerCase().match(O)||[];if(h(n))for(;r=o[i++];)\"+\"===r[0]?(r=r.slice(1)||\"*\",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Ft(e,t,n,r){var i={},o=e===Rt;function a(s){var u;return i[s]=!0,b.each(e[s]||[],(function(e,s){var l=s(t,n,r);return\"string\"!=typeof l||o||i[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)})),u}return a(t.dataTypes[0])||!i[\"*\"]&&a(\"*\")}function Bt(e,t){var n,r,i=b.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&b.extend(!0,e,r),e}It.href=wt.href,b.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:wt.href,type:\"GET\",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(wt.protocol),global:!0,processData:!0,async:!0,contentType:\"application/x-www-form-urlencoded; charset=UTF-8\",accepts:{\"*\":Mt,text:\"text/plain\",html:\"text/html\",xml:\"application/xml, text/xml\",json:\"application/json, text/javascript\"},contents:{xml:/\\bxml\\b/,html:/\\bhtml/,json:/\\bjson\\b/},responseFields:{xml:\"responseXML\",text:\"responseText\",json:\"responseJSON\"},converters:{\"* text\":String,\"text html\":!0,\"text json\":JSON.parse,\"text xml\":b.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Bt(Bt(e,b.ajaxSettings),t):Bt(b.ajaxSettings,e)},ajaxPrefilter:Wt(Pt),ajaxTransport:Wt(Rt),ajax:function(t,n){\"object\"==typeof t&&(n=t,t=void 0),n=n||{};var r,i,o,a,s,u,l,c,f,p,d=b.ajaxSetup({},n),h=d.context||d,g=d.context&&(h.nodeType||h.jquery)?b(h):b.event,y=b.Deferred(),m=b.Callbacks(\"once memory\"),x=d.statusCode||{},w={},T={},C=\"canceled\",E={readyState:0,getResponseHeader:function(e){var t;if(l){if(!a)for(a={};t=Lt.exec(o);)a[t[1].toLowerCase()+\" \"]=(a[t[1].toLowerCase()+\" \"]||[]).concat(t[2]);t=a[e.toLowerCase()+\" \"]}return null==t?null:t.join(\", \")},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(e,t){return null==l&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==l&&(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)E.always(e[E.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||C;return r&&r.abort(t),S(0,t),this}};if(y.promise(E),d.url=((t||d.url||wt.href)+\"\").replace(Ot,wt.protocol+\"//\"),d.type=n.method||n.type||d.method||d.type,d.dataTypes=(d.dataType||\"*\").toLowerCase().match(O)||[\"\"],null==d.crossDomain){u=v.createElement(\"a\");try{u.href=d.url,u.href=u.href,d.crossDomain=It.protocol+\"//\"+It.host!=u.protocol+\"//\"+u.host}catch(e){d.crossDomain=!0}}if(d.data&&d.processData&&\"string\"!=typeof d.data&&(d.data=b.param(d.data,d.traditional)),Ft(Pt,d,n,E),l)return E;for(f in(c=b.event&&d.global)&&0==b.active++&&b.event.trigger(\"ajaxStart\"),d.type=d.type.toUpperCase(),d.hasContent=!Ht.test(d.type),i=d.url.replace(jt,\"\"),d.hasContent?d.data&&d.processData&&0===(d.contentType||\"\").indexOf(\"application/x-www-form-urlencoded\")&&(d.data=d.data.replace(Dt,\"+\")):(p=d.url.slice(i.length),d.data&&(d.processData||\"string\"==typeof d.data)&&(i+=(Ct.test(i)?\"&\":\"?\")+d.data,delete d.data),!1===d.cache&&(i=i.replace(qt,\"$1\"),p=(Ct.test(i)?\"&\":\"?\")+\"_=\"+Tt.guid+++p),d.url=i+p),d.ifModified&&(b.lastModified[i]&&E.setRequestHeader(\"If-Modified-Since\",b.lastModified[i]),b.etag[i]&&E.setRequestHeader(\"If-None-Match\",b.etag[i])),(d.data&&d.hasContent&&!1!==d.contentType||n.contentType)&&E.setRequestHeader(\"Content-Type\",d.contentType),E.setRequestHeader(\"Accept\",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(\"*\"!==d.dataTypes[0]?\", \"+Mt+\"; q=0.01\":\"\"):d.accepts[\"*\"]),d.headers)E.setRequestHeader(f,d.headers[f]);if(d.beforeSend&&(!1===d.beforeSend.call(h,E,d)||l))return E.abort();if(C=\"abort\",m.add(d.complete),E.done(d.success),E.fail(d.error),r=Ft(Rt,d,n,E)){if(E.readyState=1,c&&g.trigger(\"ajaxSend\",[E,d]),l)return E;d.async&&d.timeout>0&&(s=e.setTimeout((function(){E.abort(\"timeout\")}),d.timeout));try{l=!1,r.send(w,S)}catch(e){if(l)throw e;S(-1,e)}}else S(-1,\"No Transport\");function S(t,n,a,u){var f,p,v,w,T,C=n;l||(l=!0,s&&e.clearTimeout(s),r=void 0,o=u||\"\",E.readyState=t>0?4:0,f=t>=200&&t<300||304===t,a&&(w=function(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;\"*\"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader(\"Content-Type\"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+\" \"+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(d,E,a)),!f&&b.inArray(\"script\",d.dataTypes)>-1&&(d.converters[\"text script\"]=function(){}),w=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if(\"*\"===o)o=u;else if(\"*\"!==u&&u!==o){if(!(a=l[u+\" \"+o]||l[\"* \"+o]))for(i in l)if((s=i.split(\" \"))[1]===o&&(a=l[u+\" \"+s[0]]||l[\"* \"+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:\"parsererror\",error:a?e:\"No conversion from \"+u+\" to \"+o}}}return{state:\"success\",data:t}}(d,w,E,f),f?(d.ifModified&&((T=E.getResponseHeader(\"Last-Modified\"))&&(b.lastModified[i]=T),(T=E.getResponseHeader(\"etag\"))&&(b.etag[i]=T)),204===t||\"HEAD\"===d.type?C=\"nocontent\":304===t?C=\"notmodified\":(C=w.state,p=w.data,f=!(v=w.error))):(v=C,!t&&C||(C=\"error\",t<0&&(t=0))),E.status=t,E.statusText=(n||C)+\"\",f?y.resolveWith(h,[p,C,E]):y.rejectWith(h,[E,C,v]),E.statusCode(x),x=void 0,c&&g.trigger(f?\"ajaxSuccess\":\"ajaxError\",[E,d,f?p:v]),m.fireWith(h,[E,C]),c&&(g.trigger(\"ajaxComplete\",[E,d]),--b.active||b.event.trigger(\"ajaxStop\")))}return E},getJSON:function(e,t,n){return b.get(e,t,n,\"json\")},getScript:function(e,t){return b.get(e,void 0,t,\"script\")}}),b.each([\"get\",\"post\"],(function(e,t){b[t]=function(e,n,r,i){return h(n)&&(i=i||r,r=n,n=void 0),b.ajax(b.extend({url:e,type:t,dataType:i,data:n,success:r},b.isPlainObject(e)&&e))}})),b.ajaxPrefilter((function(e){var t;for(t in e.headers)\"content-type\"===t.toLowerCase()&&(e.contentType=e.headers[t]||\"\")})),b._evalUrl=function(e,t,n){return b.ajax({url:e,type:\"GET\",dataType:\"script\",cache:!0,async:!1,global:!1,converters:{\"text script\":function(){}},dataFilter:function(e){b.globalEval(e,t,n)}})},b.fn.extend({wrapAll:function(e){var t;return this[0]&&(h(e)&&(e=e.call(this[0])),t=b(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return h(e)?this.each((function(t){b(this).wrapInner(e.call(this,t))})):this.each((function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=h(e);return this.each((function(n){b(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not(\"body\").each((function(){b(this).replaceWith(this.childNodes)})),this}}),b.expr.pseudos.hidden=function(e){return!b.expr.pseudos.visible(e)},b.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},b.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var $t={0:200,1223:204},_t=b.ajaxSettings.xhr();d.cors=!!_t&&\"withCredentials\"in _t,d.ajax=_t=!!_t,b.ajaxTransport((function(t){var n,r;if(d.cors||_t&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i[\"X-Requested-With\"]||(i[\"X-Requested-With\"]=\"XMLHttpRequest\"),i)s.setRequestHeader(a,i[a]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,\"abort\"===e?s.abort():\"error\"===e?\"number\"!=typeof s.status?o(0,\"error\"):o(s.status,s.statusText):o($t[s.status]||s.status,s.statusText,\"text\"!==(s.responseType||\"text\")||\"string\"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=s.ontimeout=n(\"error\"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout((function(){n&&r()}))},n=n(\"abort\");try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}})),b.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),b.ajaxSetup({accepts:{script:\"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript\"},contents:{script:/\\b(?:java|ecma)script\\b/},converters:{\"text script\":function(e){return b.globalEval(e),e}}}),b.ajaxPrefilter(\"script\",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type=\"GET\")})),b.ajaxTransport(\"script\",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=b(\""
],
"text/plain": [
":Scatter [repressor copy number] (fold change)"
]
},
"execution_count": 4,
"metadata": {
"application/vnd.holoviews_exec.v0+json": {
"id": "1002"
}
},
"output_type": "execute_result"
}
],
"source": [
"scatter = hv.Scatter(\n",
" data=df_simple, \n",
" kdims=[\"repressor copy number\"], \n",
" vdims=[\"fold change\"]\n",
").opts(\n",
" logx=True,\n",
")\n",
"\n",
"scatter"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We see that the level of gene expression (as metricized by fold change) decreases with the number of repressors, which jibes with what we know about gene regulations. Again, it will be faster to work with NumPy arrays throughout, so let's save those here."
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"R = df_simple[\"repressor copy number\"].values\n",
"fc = df_simple['fold change'].values"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Pairs bootstrap? No.\n",
"\n",
"With this dataset, it becomes abundantly clear that we are **not** interested in the variability of the number of repressors. Quite the opposite, the experimentalists worked hard to manipulate various cell strains to have these desired copy numbers and explicitly took 10 replicates for each strain. Doing a pairs bootstrap in this case could wreck havoc on the carefully designed experiment, since the bootstrap samples would likely incorporate data from some strains more than others. As we saw in the previous data set, let's take the approach of resampling the residuals. "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Resampling residuals? Maybe.\n",
"\n",
"Let's first set up the frame work of our MLE estimate. While I won't go into the details here, the mathematical model of fold change is\n",
"\n",
"\\begin{align}\n",
"\\text{fold change} = \\frac{1}{1 + \\frac{2R}{N_{NS}} e^{- \\Delta \\epsilon \\ / \\ k_BT }},\n",
"\\end{align}\n",
"\n",
"where $N_{NS}$ is the number of non-specific binding sites, $R$ is the number of repressors, and $\\Delta \\epsilon$ in the binding energy of the repressor to the operator in units of $k_BT$. In this case, I actually already know the binding energy, but for sake argument, let's pretend we don't and get a MLE for this parameter. "
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"N_NS = 5e6\n",
"\n",
"def theor_fold_change(N_NS, R, delta_e):\n",
" \"\"\"Compute fold change using mathematical model\"\"\"\n",
" return 1 / (1 + 2*R/N_NS * np.exp(-delta_e))\n",
"\n",
"\n",
"def log_likelihood(params, R, fc_data):\n",
" \"\"\"Log likelihood of fold change model.\"\"\"\n",
" delta_e, sigma = params\n",
"\n",
" if sigma <= 0:\n",
" return -np.inf\n",
"\n",
" fc_theory = theor_fold_change(N_NS, R, delta_e)\n",
" return np.sum(st.norm.logpdf(np.log(fc_data), np.log(fc_theory), sigma))\n",
"\n",
"\n",
"def resid(params, R, fc_data):\n",
" delta_e = params[0]\n",
" return fc_data - theor_fold_change(N_NS, R, delta_e)\n",
"\n",
"\n",
"def fc_mle(R, fc_data):\n",
" \"\"\"Compute MLE for parameters in fold-change model.\"\"\"\n",
" res = scipy.optimize.least_squares(resid, np.array([-5]), args=(R, fc_data))\n",
"\n",
" # Compute residual sum of squares from optimal params\n",
" rss_mle = np.sum(resid(res.x, R, fc_data)**2)\n",
"\n",
" # Compute MLE for sigma\n",
" sigma_mle = np.sqrt(rss_mle / len(R))\n",
"\n",
" return tuple([x for x in res.x] + [sigma_mle])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"With these in hand, we can now get our MLEs."
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Value of binding energy: -9.42 kBT\n",
"Value of sigma: 0.06\n"
]
}
],
"source": [
"mle_params = fc_mle(R, fc)\n",
"\n",
"# save these for later\n",
"mle_binding = mle_params[0]\n",
"mle_sigma = mle_params[1]\n",
"\n",
"print(f'Value of binding energy: {np.round(mle_binding, decimals=2)} kBT')\n",
"print(f'Value of sigma: {np.round(mle_sigma, decimals=2)}')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Given my insider knowledge, that binding energy seems reasonable, but let's make a predictive regression plot to check. First, we need to generate samples out of the generative model parametrized by the MLE."
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
"rg = np.random.default_rng()\n",
"\n",
"def sample_fold_change(delta_e, sigma, R, size=1):\n",
" \"\"\"Generate samples of spindle length vs droplet diameter.\"\"\"\n",
" samples = np.empty((size, len(R)))\n",
"\n",
" for i in range(size):\n",
" mu = theor_fold_change(N_NS, R, delta_e)\n",
" samples[i] = np.maximum(0, rg.normal(mu, sigma))\n",
"\n",
" return samples\n",
"\n",
"R_theor = np.logspace(1, 3, 200)\n",
"samples = sample_fold_change(*mle_params, R_theor, size=5000)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now we can make the plot."
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
" \n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"(function(root) {\n",
" function embed_document(root) {\n",
" \n",
" var docs_json = {\"d4efb6a7-c1c6-423f-9d4f-8524b57e2d0b\":{\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"1116\"}],\"center\":[{\"id\":\"1119\"},{\"id\":\"1123\"}],\"frame_height\":325,\"frame_width\":400,\"left\":[{\"id\":\"1120\"}],\"renderers\":[{\"id\":\"1141\"},{\"id\":\"1146\"},{\"id\":\"1151\"},{\"id\":\"1156\"}],\"title\":{\"id\":\"1158\"},\"toolbar\":{\"id\":\"1131\"},\"x_range\":{\"id\":\"1108\"},\"x_scale\":{\"id\":\"1112\"},\"y_range\":{\"id\":\"1110\"},\"y_scale\":{\"id\":\"1114\"}},\"id\":\"1107\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"1167\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data_source\":{\"id\":\"1143\"},\"glyph\":{\"id\":\"1144\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"1145\"},\"selection_glyph\":null,\"view\":{\"id\":\"1147\"}},\"id\":\"1146\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"orange\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"orange\"},\"size\":{\"units\":\"screen\",\"value\":2},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1155\",\"type\":\"Circle\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"1124\"},{\"id\":\"1125\"},{\"id\":\"1126\"},{\"id\":\"1127\"},{\"id\":\"1128\"},{\"id\":\"1129\"}]},\"id\":\"1131\",\"type\":\"Toolbar\"},{\"attributes\":{\"ticker\":null},\"id\":\"1161\",\"type\":\"LogTickFormatter\"},{\"attributes\":{},\"id\":\"1168\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"1143\"}},\"id\":\"1147\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1129\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1110\",\"type\":\"DataRange1d\"},{\"attributes\":{\"data_source\":{\"id\":\"1153\"},\"glyph\":{\"id\":\"1154\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"1155\"},\"selection_glyph\":null,\"view\":{\"id\":\"1157\"}},\"id\":\"1156\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"text\":\"\"},\"id\":\"1158\",\"type\":\"Title\"},{\"attributes\":{\"line_color\":\"#084594\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1149\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1169\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data_source\":{\"id\":\"1148\"},\"glyph\":{\"id\":\"1149\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"1150\"},\"selection_glyph\":null,\"view\":{\"id\":\"1152\"}},\"id\":\"1151\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data_source\":{\"id\":\"1138\"},\"glyph\":{\"id\":\"1139\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"1140\"},\"selection_glyph\":null,\"view\":{\"id\":\"1142\"}},\"id\":\"1141\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"overlay\":{\"id\":\"1130\"}},\"id\":\"1126\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1170\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1127\",\"type\":\"SaveTool\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAJEC17f/K3XckQBxcvvuJ8iRA4AvRYxVwJUAtfJo5kfAlQKYKphoPdCZAOzgSDqH6JkBqZwmHWYQnQLVqSWdLEShAMDy6AYqhKEDROBQdKTUpQLU8lvY8zClAY//LRNpmKkBxEWU6FgUrQF3fHIkGpytASx+0ZMFMLEB1EvyFXfYsQMoE9C3yoy1AR3j5KJdVLkDsawvSZAsvQJswIRZ0xS9AuKDKO+9BMECaS9IIX6MwQOl4Ac4WBzFAukpCNyRtMUDU/W5CldUxQDH+PEF4QDJArXoz29utMkDLvK0Pzx0zQCuL6TdhkDNAqN4hCaIFNEA+NLaWoX00QBvHXlRw+DRARwBuGB92NUAfax8ev/Y1QHl/9AdiejZAmZQf4hkBN0CkUf0k+Yo3QH7ynLcSGDhAArpX8nmoOEBD7HehQjw5QHOu7weB0zlAGCsg4kluOkCDXLFosgw7QDHhelPQrjtA9T9+3LlUPED5BPPChf48QOMhZU5LrD1AGP/lUSJePkDwrVAvIxQ/QEyuodpmzj9Aul6xboNGQEDKkhWtDqhAQKaEGojiC0FAfhSErwxyQUADUR0lm9pBQFoWpD6cRUJAOi/Apx6zQkCcPQZkMSNDQG+xBtHjlUNAaBVpqEULREBJ/BMCZ4NEQLzZYVZY/kRArhRjgCp8RUA9oi3A7vxFQCB6Or22gEZADzjRiJQHR0CBPoKgmpFHQCyyr/DbHkhAGKcl12uvSEAX2sElXkNJQGtUKyXH2klAOlial7t1SkAJ+LC7UBRLQOG8ZE+ctktAJ8H5krRcTEBcqQ9MsAZNQBflwMimtE1AbqbU4q9m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ZrgDiqDwP6OIFrmGl/A/Je+xToSm8D+yI20qxq/wP3WR/RPMrPA/dKZj/+Ku8D+AqFvRmLzwP0poJTi7v/A/ndxyKl3C8D+cwBiHQ9LwPzOaX+FN3fA/S3VfvP3c8D+nVYHlh93wP6aRRoUW6PA/BvIvXMv58D9y+buMxvDwPwfKcfLY+fA/cPfOVPz68D98mBtfiA3xP0CxvkASGPE/Wh684eMD8T83rTC8IRfxPxM/7OePHfE/DSe26QUg8T8hQJUPZSTxPxUaWd/UHPE/jiJAb54P8T8=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[400]}},\"selected\":{\"id\":\"1166\"},\"selection_policy\":{\"id\":\"1165\"}},\"id\":\"1138\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1163\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1112\",\"type\":\"LogScale\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAJEC17f/K3XckQBxcvvuJ8iRA4AvRYxVwJUAtfJo5kfAlQKYKphoPdCZAOzgSDqH6JkBqZwmHWYQnQLVqSWdLEShAMDy6AYqhKEDROBQdKTUpQLU8lvY8zClAY//LRNpmKkBxEWU6FgUrQF3fHIkGpytASx+0ZMFMLEB1EvyFXfYsQMoE9C3yoy1AR3j5KJdVLkDsawvSZAsvQJswIRZ0xS9AuKDKO+9BMECaS9IIX6MwQOl4Ac4WBzFAukpCNyRtMUDU/W5CldUxQDH+PEF4QDJArXoz29utMkDLvK0Pzx0zQCuL6TdhkDNAqN4hCaIFNEA+NLaWoX00QBvHXlRw+DRARwBuGB92NUAfax8ev/Y1QHl/9AdiejZAmZQf4hkBN0CkUf0k+Yo3QH7ynLcSGDhAArpX8nmoOEBD7HehQjw5QHOu7weB0zlAGCsg4kluOkCDXLFosgw7QDHhelPQrjtA9T9+3LlUPED5BPPChf48QOMhZU5LrD1AGP/lUSJePkDwrVAvIxQ/QEyuodpmzj9Aul6xboNGQEDKkh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y9IywJfK2T9L8RoBQoPZPwaIVRMgJNk/hhEa0Oeq2D+H8/Kn/UPYP+UoQMVWFNg/jpb06RCa1z+IsldoJ0bXPzS6VhdEC9c/3tvI0e7B1j/Wr2azj0HWPx855RU3F9Y/hWjvNQui1T809g0LwFDVP4jFxWv57tQ/XHRxnMXM1D8JhD6ms2nUP5DtP5FCFdQ/ojl2lDyv0z+3t5uENV7TP1FITTKLJNM/QMgfqCLJ0j94fFJPtHHSPzZZX3T1GtI/tHXNWYC20T8v0gQSTnHRPzIisM4uKtE/yD8fy+vi0D92e+As8LzQP3yQsLrFj9A/JibuejoW0D+lqNwQ5sTPP3pLUhkLXM8/+O74G1tuzj+wXSc7FSfOP6sHwL0RuM0/fOieZw8nzT+I84cVXkPMP8RKSa/Uv8s/SvXFUIKKyz8ibps3yw/LP6gQmUwYeso/7Fo3YQjNyT+wbq9CwH/JPxNAUyo56cg/Hrz3JsOfyD9j6C3gSufHP4LLspyu0cc/EnmQy3U1xz/v1jALT/jGP0r+zqoKC8Y/wh+8MkD0xT+CQ2kb3XTFPw==\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[200]}},\"selected\":{\"id\":\"1170\"},\"selection_policy\":{\"id\":\"1169\"}},\"id\":\"1148\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1171\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#084594\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1150\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1108\",\"type\":\"DataRange1d\"},{\"attributes\":{\"source\":{\"id\":\"1153\"}},\"id\":\"1157\",\"type\":\"CDSView\"},{\"attributes\":{\"axis\":{\"id\":\"1116\"},\"ticker\":null},\"id\":\"1119\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1172\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1165\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1114\",\"type\":\"LinearScale\"},{\"attributes\":{\"fill_color\":{\"value\":\"orange\"},\"line_color\":{\"value\":\"orange\"},\"size\":{\"units\":\"screen\",\"value\":2},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1154\",\"type\":\"Circle\"},{\"attributes\":{\"source\":{\"id\":\"1138\"}},\"id\":\"1142\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAJEC17f/K3XckQBxcvvuJ8iRA4AvRYxVwJUAtfJo5kfAlQKYKphoPdCZAOzgSDqH6JkBqZwmHWYQnQLVqSWdLEShAMDy6AYqhKEDROBQdKTUpQLU8lvY8zClAY//LRNpmKkBxEWU6FgUrQF3fHIkGpytASx+0ZMFMLEB1EvyFXfYsQMoE9C3yoy1AR3j5KJdVLkDsawvSZAsvQJswIRZ0xS9AuKDKO+9BMECaS9IIX6MwQOl4Ac4WBzFAukpCNyRtMUDU/W5CldUxQDH+PEF4QDJArXoz29utMkDLvK0Pzx0zQCuL6TdhkDNAqN4hCaIFNEA+NLaWoX00QBvHXlRw+DRARwBuGB92NUAfax8ev/Y1QHl/9AdiejZAmZQf4hkBN0CkUf0k+Yo3QH7ynLcSGDhAArpX8nmoOEBD7HehQjw5QHOu7weB0zlAGCsg4kluOkCDXLFosgw7QDHhelPQrjtA9T9+3LlUPED5BPPChf48QOMhZU5LrD1AGP/lUSJePkDwrVAvIxQ/QEyuodpmzj9Aul6xboNGQEDKkhWtDqhAQKaEGojiC0FAfhSErwxyQUADUR0lm9pBQFoWpD6cRUJAOi/Apx6zQkCcPQZkMSNDQG+xBtHjlUNAaBVpqEULREBJ/BMCZ4NEQLzZYVZY/kRArhRjgCp8RUA9oi3A7vxFQCB6Or22gEZADzjRiJQHR0CBPoKgmpFHQCyyr/DbHkhAGKcl12uvSEAX2sElXkNJQGtUKyXH2klAOlial7t1SkAJ+LC7UBRLQOG8ZE+ctktAJ8H5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oH+CXQjvP7qjvimNDO8/ZkZ9fSw57z+I5mPoy0/vP/eS8+whU+8/L2ceUgpV7z8uQsNVMGrvP72cE7defO8/NpB5PhGO7z/qz31Q8Z3vPzJBHEiGo+8/K23cgaCz7z8YItbULsLvP8gJmZkVz+8/20mr5CrZ7z86yvjRNtvvP2/f+6eEAPA/SNsqbawH8D+5ptz6+gDwPw9VjAOvB/A/qXBw/XUG8D/f2M4FlxjwP32k+qkEGfA/thGM2CcZ8D9Qm5HNqBrwP/KLKC+5LPA/zOhzMAox8D+fdwHDXDPwPx1hOQU6M/A/WK/z1Mct8D8=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[400]}},\"selected\":{\"id\":\"1168\"},\"selection_policy\":{\"id\":\"1167\"}},\"id\":\"1143\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":0.1,\"fill_color\":\"#6baed6\",\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"line_width\":0,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1145\",\"type\":\"Patch\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"1130\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"fill_color\":\"#9ecae1\",\"line_alpha\":0,\"line_color\":\"#1f77b4\",\"line_width\":0,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1139\",\"type\":\"Patch\"},{\"attributes\":{},\"id\":\"1166\",\"type\":\"Selection\"},{\"attributes\":{\"fill_color\":\"#6baed6\",\"line_alpha\":0,\"line_color\":\"#1f77b4\",\"line_width\":0,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1144\",\"type\":\"Patch\"},{\"attributes\":{},\"id\":\"1128\",\"type\":\"ResetTool\"},{\"attributes\":{\"axis_label\":\"repressor copy number\",\"formatter\":{\"id\":\"1161\"},\"ticker\":{\"id\":\"1117\"}},\"id\":\"1116\",\"type\":\"LogAxis\"},{\"attributes\":{\"num_minor_ticks\":10},\"id\":\"1117\",\"type\":\"LogTicker\"},{\"attributes\":{\"fill_alpha\":0.1,\"fill_color\":\"#9ecae1\",\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"line_width\":0,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1140\",\"type\":\"Patch\"},{\"attributes\":{\"axis_label\":\"fold change\",\"formatter\":{\"id\":\"1163\"},\"ticker\":{\"id\":\"1121\"}},\"id\":\"1120\",\"type\":\"LinearAxis\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAJkAAAAAAAAAmQAAAAAAAACZAAAAAAAAAJkAAAAAAAAAmQAAAAAAAACZAAAAAAAAAJkAAAAAAAAAmQAAAAAAAAD5AAAAAAAAAPkAAAAAAAAA+QAAAAAAAAD5AAAAAAAAAPkAAAAAAAAA+QAAAAAAAAD5AAAAAAAAAPkAAAAAAAABPQAAAAAAAAE9AAAAAAAAAT0AAAAAAAABPQAAAAAAAAE9AAAAAAAAAT0AAAAAAAABPQAAAAAAAAE9AAAAAAABAYEAAAAAAAEBgQAAAAAAAQGBAAAAAAABAYEAAAAAAAEBgQAAAAAAAQGBAAAAAAABAYEAAAAAAAEBgQAAAAAAAEINAAAAAAAAQg0AAAAAAABCDQAAAAAAAEINAAAAAAAAQg0AAAAAAABCDQAAAAAAAEINAAAAAAAAQg0AAAAAAADCLQAAAAAAAMItAAAAAAAAwi0AAAAAAADCLQAAAAAAAMItAAAAAAAAwi0AAAAAAADCLQAAAAAAAMItA\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[48]},\"y\":{\"__ndarray__\":\"o8gP9R1V7j/6ilWraAfvPzdxcTt4v+w/jJB5MOXy7z9SIUa0GLnvP2xAOooEzes/+o+2VhM/8D9vFgwYvd3oPygwEoSe5ek/bRxvUEka7j86zcIHy0rnP3809scqkus/mTNjZQB07T+1q/vt7IPrP1Ly6GIBKus/tiG0X8yb6z/J/2hKf8XnP6CQXZzkaOo/bPC4aIEo6j8qsxtdzBLoP319DhrYh+w/ewtpuZEZ6T+nTeGxrzjqP9t15abpyeQ/QvBGsTjl4z+YzSLPWtzlPzyE9bePPuc/g+Nr8yPm5T9+wsg47ivfP+wT7gHiV+E/U0OVIBcw4z/I5931pp/kP8aBe8EJzs8/Ai1k55WS0D8tyR9fMM/LP0A/gSB7ccc/3iEwFZDw0D+UdwZvKYvPP6dzBDESm80/CKqAYybDyj+AFToZe+LFP9O3bv1uicQ/6ISAMnk5wz8+bpHcuJbLP0sLN1tM5sc/bUVS6Hb6yT9FIJiR8RLJP8inLcbab8U/\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[48]}},\"selected\":{\"id\":\"1172\"},\"selection_policy\":{\"id\":\"1171\"}},\"id\":\"1153\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1125\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"axis\":{\"id\":\"1120\"},\"dimension\":1,\"ticker\":null},\"id\":\"1123\",\"type\":\"Grid\"},{\"attributes\":{\"source\":{\"id\":\"1148\"}},\"id\":\"1152\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1121\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1124\",\"type\":\"PanTool\"}],\"root_ids\":[\"1107\"]},\"title\":\"Bokeh Application\",\"version\":\"2.2.3\"}};\n",
" var render_items = [{\"docid\":\"d4efb6a7-c1c6-423f-9d4f-8524b57e2d0b\",\"root_ids\":[\"1107\"],\"roots\":{\"1107\":\"4bafa796-7954-48d6-adeb-3185a6a49ffa\"}}];\n",
" root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
"\n",
" }\n",
" if (root.Bokeh !== undefined) {\n",
" embed_document(root);\n",
" } else {\n",
" var attempts = 0;\n",
" var timer = setInterval(function(root) {\n",
" if (root.Bokeh !== undefined) {\n",
" clearInterval(timer);\n",
" embed_document(root);\n",
" } else {\n",
" attempts++;\n",
" if (attempts > 100) {\n",
" clearInterval(timer);\n",
" console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
" }\n",
" }\n",
" }, 10, root)\n",
" }\n",
"})(window);"
],
"application/vnd.bokehjs_exec.v0+json": ""
},
"metadata": {
"application/vnd.bokehjs_exec.v0+json": {
"id": "1107"
}
},
"output_type": "display_data"
}
],
"source": [
"p = bebi103.viz.predictive_regression(\n",
" samples=samples,\n",
" samples_x=R_theor,\n",
" data=df_simple[[\"repressor copy number\", 'fold change']].values,\n",
" x_axis_label='repressor copy number',\n",
" y_axis_label='fold change',\n",
" x_axis_type='log',\n",
")\n",
"\n",
"bokeh.io.show(p)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Interestingly, for high repressor copy numbers, the data are much closer to the median data predicted by the model. This is a hallmark of **heteroskedasticity**, which means that $\\sigma$ can differ based on the measured values and/or the explanatory variables. We will discuss the **wild bootstrap** as a way of dealing with this momentarily, but first let's get confidence intervals on the MLEs of the parameters by resampling the residuals as we did before."
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
"@numba.njit\n",
"def resampled_residuals(y_fit, residuals):\n",
" \"\"\"Produces resampled fitted response variable with the provided residuals.\"\"\"\n",
" bs_residuals = np.random.choice(residuals, size=len(residuals))\n",
" return y_fit + bs_residuals"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"To get set up, let's first get the fold change values our MLE would predict and the residuals when we compare our data to these predicited values."
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
"# get our fc predictions\n",
"MLE_fc_pred = theor_fold_change(N_NS, R, mle_params[0])\n",
"\n",
"# get our residual values\n",
"resids = fc - MLE_fc_pred"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"With these in hand, we are ready to repeatedly resample the residuals. "
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 1000/1000 [00:02<00:00, 488.96it/s]\n"
]
},
{
"data": {
"text/plain": [
"array([[-9.54963275, 0.04681566],\n",
" [-9.33394636, 0.07305054]])"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"num_trials = 1000\n",
"bs_MLEs_resampled_resids = np.zeros([2, num_trials])\n",
"\n",
"for i in tqdm.tqdm(range(num_trials)):\n",
" fc_resamp = resampled_residuals(MLE_fc_pred, resids)\n",
" mle_params = fc_mle(R, fc_resamp)\n",
" bs_MLEs_resampled_resids[:,i] = mle_params\n",
"\n",
"resampled_resids_CI = np.percentile(bs_MLEs_resampled_resids, [2.5, 97.5], axis=1)\n",
"resampled_resids_CI"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In the plot of the data, we saw that there is much more variability in the measurement of fold change when the value of fold change is higher, known as heteroskedasticity. Heteroskedasticity can be a source of problems when doing residual resampling, as we will often assign a large residual to an y-value that would realistically not yield that much variability. This issue is most clearly illustrated by showing plots of what our resampled data look like. "
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {},
"metadata": {},
"output_type": "display_data"
},
{
"data": {},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.holoviews_exec.v0+json": "",
"text/html": [
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
\n",
"
\n",
""
],
"text/plain": [
"Row\n",
" [0] Column\n",
" [0] Button(button_type='primary', name='Residual Boostrap')\n",
" [1] ParamFunction(function)\n",
" [1] Column\n",
" [0] Spacer(height=80)\n",
" [1] Checkbox(name='initial MLE estimate')"
]
},
"execution_count": 13,
"metadata": {
"application/vnd.holoviews_exec.v0+json": {
"id": "1248"
}
},
"output_type": "execute_result"
}
],
"source": [
"# make a clickable button\n",
"button_resid = pn.widgets.Button(name=\"Residual Boostrap\", button_type=\"primary\")\n",
"MLE_estimate = pn.widgets.Checkbox(name=\"initial MLE estimate\", value=False)\n",
"\n",
"# define a bootstrap and plot function\n",
"@pn.depends(button_resid.param.clicks, MLE_estimate.param.value)\n",
"def bs_and_plot(_, estimate):\n",
" fc_resamp = resampled_residuals(MLE_fc_pred, resids)\n",
" new_resids = fc_resamp - MLE_fc_pred\n",
" \n",
" r = hv.Scatter(data=(R, new_resids),\n",
" kdims=[\"repressor copy number\"],\n",
" vdims=[\"residual fc\"],\n",
" ).opts(\n",
" ylim=(resids.min()-.1,resids.max()+.1)\n",
" ) \n",
" zero = hv.Path(data=(R, 0*np.empty(len(R))),).opts(color='orange') \n",
" \n",
" p = hv.Scatter(data=(R, fc_resamp), \n",
" kdims=[\"repressor copy number\"],\n",
" vdims=[\"fold change\"]\n",
" ).opts(ylim=(0,1.1))\n",
" \n",
" R_theor = np.linspace(0,900,1000)\n",
" fc_theor = theor_fold_change(N_NS, R_theor, mle_binding)\n",
" fit = hv.Path(data=(R_theor, fc_theor)).opts(color=\"orange\", line_width=2)\n",
" if estimate == True:\n",
" return p * fit + r * zero\n",
" return p + r\n",
"\n",
"plot = pn.Column(button_resid, bs_and_plot)\n",
"pn.Row(plot, pn.Column(pn.Spacer(height=80), MLE_estimate))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We see that oftentimes, the high repressor copy number strains show much wider variability in fold change than they do in the original data, likely bringing up our estimate on $\\sigma$. A solution?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Wild bootstrap\n",
"\n",
"An approach you might see in this situation is a wild bootstrap, where rather than scrambling the residuals across all the y values, you retain the association of each residual to its original y value. Then your bootstrap samples allow the residuals to vary around their original value in a normally distributed manner, scaled by the original residual. In other words, if the residual for data point $i$ is $\\epsilon_i$, then the wild bootstrapped residual is $\\epsilon^*_i = \\epsilon_i \\cdot v_i$ where $v_i$ is drawn from a Normal distribution with location parameter zero and scale parameter one.\n",
"\n",
"This approach allows us to make bootstrap samples that retain the non-uniform variability that we see in the original data. We show this approach below for completeness and since it's a common technique you might see, but we suggest using it with caution for reasons that will be come clear. "
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
"def wild_bootstrap(y_fit, residuals):\n",
" \"\"\"Produces resampled fitted response variable with the provided residuals.\"\"\"\n",
" resampled_residuals = residuals * np.random.normal(size=len(residuals))\n",
" return y_fit + resampled_residuals"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's visually check out what happens with the wild bootstrap."
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [],
"source": [
"def residuals_plot(x, residuals):\n",
" r = hv.Scatter(data=(R, residuals),\n",
" kdims=[\"repressor copy number\"],\n",
" vdims=[\"residual fc\"],\n",
" ).opts(\n",
" ylim=(resids.min()-.1,resids.max()+.1)\n",
" ) \n",
" return r"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"data": {},
"metadata": {},
"output_type": "display_data"
},
{
"data": {},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.holoviews_exec.v0+json": "",
"text/html": [
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
\n",
"
\n",
""
],
"text/plain": [
"Row\n",
" [0] Column\n",
" [0] Button(button_type='primary', name='Wild Bootstrap')\n",
" [1] ParamFunction(function)\n",
" [1] Column\n",
" [0] Spacer(height=80)\n",
" [1] Checkbox(name='initial MLE estimate')"
]
},
"execution_count": 16,
"metadata": {
"application/vnd.holoviews_exec.v0+json": {
"id": "1639"
}
},
"output_type": "execute_result"
}
],
"source": [
"# make a clickable button\n",
"button = pn.widgets.Button(name=\"Wild Bootstrap\", button_type=\"primary\")\n",
"MLE_estimate = pn.widgets.Checkbox(name=\"initial MLE estimate\", value=False)\n",
"\n",
"# define a bootstrap and plot function\n",
"@pn.depends(button.param.clicks, MLE_estimate.param.value)\n",
"def bs_and_plot(_, estimate):\n",
" \n",
" # now doing wild boostrap\n",
" fc_resamp = wild_bootstrap(MLE_fc_pred, resids)\n",
" r = residuals_plot(R, fc_resamp - MLE_fc_pred)\n",
" zero = hv.Path(data=(R, 0*np.empty(len(R))),).opts(color='orange') \n",
" p = hv.Scatter(data=(R, fc_resamp), \n",
" kdims=[\"repressor copy number\"],\n",
" vdims=[\"fold change\"]\n",
" ).opts(ylim=(0,1))\n",
" \n",
" \n",
" R_theor = np.linspace(0,900,1000)\n",
" fc_theor = theor_fold_change(N_NS, R_theor, mle_binding)\n",
" fit = hv.Path(data=(R_theor, fc_theor)).opts(color=\"orange\", line_width=2)\n",
" \n",
" if estimate == True:\n",
" return p * fit + r * zero\n",
" return p + r\n",
"\n",
"plot = pn.Column(button, bs_and_plot)\n",
"pn.Row(plot, pn.Column(pn.Spacer(height=80), MLE_estimate))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can now see that the low repressor copy number strains retain high variability in fold change and vice versa, which better reflects what we saw in the original data. \n",
"\n",
"Now we would like to use this bootstrapping technique to get confidence intervals on our parameter estimates. But wait. What about $\\sigma$ now? By choosing to use a wild bootstrap, we have baked into our log likelihood that the residual for each data point is normally distributed about the empirical residual with a scale parameter that scales with the size of the empirical residual.\n",
"\n",
"This is a way of dealing with heteroskedasticity without seriously considering the variation in measurement in a generative way. **This is why we warn away from using the wild bootstrap.** In this case, it would be more appropriate to explicitly construct a generative model that reflects how we suspect $\\sigma$ to scale rather than taking a non-parametric approach that simulates the heteroskedasticity.\n",
"\n",
"To implement this, we do not need to estimate a $\\sigma$, since it is no longer a parameter in our generative model. Since we already did the work of finding the parameters by least squares, we can use the same MLE solver we used before, and just ignore the estimate of $\\sigma$. So, let's use wild bootstrap to get our confidence intervals on the binding energy."
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 1000/1000 [00:01<00:00, 668.40it/s]\n"
]
},
{
"data": {
"text/plain": [
"array([-9.51671551, -9.3200403 ])"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"num_trials = 1000\n",
"bs_MLEs_wild = np.zeros(num_trials)\n",
"\n",
"for i in tqdm.tqdm(range(num_trials)):\n",
" fc_resamp = wild_bootstrap(MLE_fc_pred, resids)\n",
" mle_params = fc_mle(R, fc_resamp)\n",
" bs_MLEs_wild[i] = mle_params[0]\n",
"\n",
"wild_CI = np.percentile(bs_MLEs_wild, [2.5, 97.5])\n",
"wild_CI"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The confidence interval on the binding energy seems shifted but let's visualize it!"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
" \n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"(function(root) {\n",
" function embed_document(root) {\n",
" \n",
" var docs_json = {\"29973e9a-d9c3-4d08-af9b-d3555745dc21\":{\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"2039\"}],\"center\":[{\"id\":\"2042\"},{\"id\":\"2045\"}],\"frame_height\":100,\"frame_width\":450,\"left\":[{\"id\":\"2043\"}],\"renderers\":[{\"id\":\"2063\"},{\"id\":\"2068\"},{\"id\":\"2073\"},{\"id\":\"2078\"}],\"title\":{\"id\":\"2095\"},\"toolbar\":{\"id\":\"2053\"},\"toolbar_location\":\"above\",\"x_range\":{\"id\":\"2031\"},\"x_scale\":{\"id\":\"2035\"},\"y_range\":{\"id\":\"2033\"},\"y_scale\":{\"id\":\"2037\"}},\"id\":\"2030\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"2108\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"source\":{\"id\":\"2070\"}},\"id\":\"2074\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2102\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2077\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2051\",\"type\":\"HelpTool\"},{\"attributes\":{\"line_color\":\"#1f77b4\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2076\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2109\",\"type\":\"Selection\"},{\"attributes\":{\"data\":{\"x\":[-9.420683698686542],\"y\":[\"residuals bootstrap\"]},\"selected\":{\"id\":\"2103\"},\"selection_policy\":{\"id\":\"2102\"}},\"id\":\"2060\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_color\":\"#1f77b4\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2066\",\"type\":\"Line\"},{\"attributes\":{\"data_source\":{\"id\":\"2060\"},\"glyph\":{\"id\":\"2061\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"2062\"},\"selection_glyph\":null,\"view\":{\"id\":\"2064\"}},\"id\":\"2063\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"EoamdmkZI8DOrWQE+6oiwA==\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[2]},\"y\":[\"residuals bootstrap\",\"residuals bootstrap\"]},\"selected\":{\"id\":\"2105\"},\"selection_policy\":{\"id\":\"2104\"}},\"id\":\"2065\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2047\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"text\":\"\"},\"id\":\"2095\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"2031\",\"type\":\"DataRange1d\"},{\"attributes\":{\"fill_color\":{\"value\":\"#1f77b4\"},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":5},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2071\",\"type\":\"Circle\"},{\"attributes\":{\"axis\":{\"id\":\"2043\"},\"dimension\":1,\"ticker\":null},\"id\":\"2045\",\"type\":\"Grid\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":5},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2072\",\"type\":\"Circle\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"2052\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"2105\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2098\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"overlay\":{\"id\":\"2052\"}},\"id\":\"2048\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"2106\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"factors\":[\"wild bootstrap\",\"residuals bootstrap\"]},\"id\":\"2033\",\"type\":\"FactorRange\"},{\"attributes\":{\"data_source\":{\"id\":\"2075\"},\"glyph\":{\"id\":\"2076\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"2077\"},\"selection_glyph\":null,\"view\":{\"id\":\"2079\"}},\"id\":\"2078\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data_source\":{\"id\":\"2065\"},\"glyph\":{\"id\":\"2066\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"2067\"},\"selection_glyph\":null,\"view\":{\"id\":\"2069\"}},\"id\":\"2068\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2046\",\"type\":\"PanTool\"},{\"attributes\":{\"source\":{\"id\":\"2065\"}},\"id\":\"2069\",\"type\":\"CDSView\"},{\"attributes\":{\"axis_label\":\"\\u2208\",\"formatter\":{\"id\":\"2098\"},\"ticker\":{\"id\":\"2040\"}},\"id\":\"2039\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"2040\",\"type\":\"BasicTicker\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":5},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2062\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"2035\",\"type\":\"LinearScale\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2067\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2050\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"2107\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2037\",\"type\":\"CategoricalScale\"},{\"attributes\":{},\"id\":\"2049\",\"type\":\"SaveTool\"},{\"attributes\":{\"formatter\":{\"id\":\"2100\"},\"ticker\":{\"id\":\"2044\"}},\"id\":\"2043\",\"type\":\"CategoricalAxis\"},{\"attributes\":{},\"id\":\"2100\",\"type\":\"CategoricalTickFormatter\"},{\"attributes\":{\"axis\":{\"id\":\"2039\"},\"ticker\":null},\"id\":\"2042\",\"type\":\"Grid\"},{\"attributes\":{\"data_source\":{\"id\":\"2070\"},\"glyph\":{\"id\":\"2071\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"2072\"},\"selection_glyph\":null,\"view\":{\"id\":\"2074\"}},\"id\":\"2073\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"2075\"}},\"id\":\"2079\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2103\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2104\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_color\":{\"value\":\"#1f77b4\"},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":5},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2061\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"2044\",\"type\":\"CategoricalTicker\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"d9eJ744II8BDapJS3KMiwA==\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[2]},\"y\":[\"wild bootstrap\",\"wild bootstrap\"]},\"selected\":{\"id\":\"2109\"},\"selection_policy\":{\"id\":\"2108\"}},\"id\":\"2075\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{\"x\":[-9.420683698686542],\"y\":[\"wild bootstrap\"]},\"selected\":{\"id\":\"2107\"},\"selection_policy\":{\"id\":\"2106\"}},\"id\":\"2070\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"2046\"},{\"id\":\"2047\"},{\"id\":\"2048\"},{\"id\":\"2049\"},{\"id\":\"2050\"},{\"id\":\"2051\"}]},\"id\":\"2053\",\"type\":\"Toolbar\"},{\"attributes\":{\"source\":{\"id\":\"2060\"}},\"id\":\"2064\",\"type\":\"CDSView\"}],\"root_ids\":[\"2030\"]},\"title\":\"Bokeh Application\",\"version\":\"2.2.3\"}};\n",
" var render_items = [{\"docid\":\"29973e9a-d9c3-4d08-af9b-d3555745dc21\",\"root_ids\":[\"2030\"],\"roots\":{\"2030\":\"260eb2a0-c42e-470e-8a83-94d29f6b54dd\"}}];\n",
" root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
"\n",
" }\n",
" if (root.Bokeh !== undefined) {\n",
" embed_document(root);\n",
" } else {\n",
" var attempts = 0;\n",
" var timer = setInterval(function(root) {\n",
" if (root.Bokeh !== undefined) {\n",
" clearInterval(timer);\n",
" embed_document(root);\n",
" } else {\n",
" attempts++;\n",
" if (attempts > 100) {\n",
" clearInterval(timer);\n",
" console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
" }\n",
" }\n",
" }, 10, root)\n",
" }\n",
"})(window);"
],
"application/vnd.bokehjs_exec.v0+json": ""
},
"metadata": {
"application/vnd.bokehjs_exec.v0+json": {
"id": "2030"
}
},
"output_type": "display_data"
}
],
"source": [
"summaries = [{'estimate':mle_binding,'conf_int':resampled_resids_CI.T[0],'label':'residuals bootstrap'},\n",
" {'estimate':mle_binding,'conf_int':wild_CI,'label':'wild bootstrap'},]\n",
"p=bebi103.viz.confints(summaries)\n",
"p.xaxis.axis_label='∈'\n",
"bokeh.io.show(p)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Should we use wild bootstrap?\n",
"\n",
"If we are not explicitly modeling variability off of the theoretical curve, wild bootstrap can be an effective way to handle heteroskedasticity. Recall that when we do explicitly model the residuals in a homoskedastic manner, the MLE we get for $\\sigma$ is inconsequential with respect to the parameters of the theoretical model (we derived this in the lesson on regression). So, in a sense, we can be safe in not modeling variability if we assume homoskedasticity (though we could not do generative regression plots as model checks). So, if we are feeling lazy, or ignorant, and could continue to not model variability generatively and employ wild bootstrap to handle any possible lurking heteroskedasticity.\n",
"\n",
"But, we really should *think generatively*. If we are going to model, we should model everything. A full generative model, including how we might expect the variability to change as a function of the measured and/or explanatory variables, is preferable. We will spend a lot of time next term building good generative models."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Computing environment"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CPython 3.8.5\n",
"IPython 7.19.0\n",
"\n",
"numpy 1.19.2\n",
"scipy 1.5.2\n",
"pandas 1.1.3\n",
"numba 0.51.2\n",
"tqdm 4.51.0\n",
"bebi103 0.1.1\n",
"bokeh 2.2.3\n",
"holoviews 1.13.5\n",
"panel 0.9.7\n",
"jupyter 1.0.0\n"
]
}
],
"source": [
"%load_ext watermark\n",
"%watermark -v -p numpy,scipy,pandas,numba,tqdm,bebi103,bokeh,holoviews,panel,jupyter"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.5"
}
},
"nbformat": 4,
"nbformat_minor": 4
}