NTsphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hTwinStat documentation master file, created by sphinx-quickstart on Tue May 30 11:38:35 2023. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive.h]h TextTwinStat documentation master file, created by sphinx-quickstart on Tue May 30 11:38:35 2023. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourceHC:\Users\rpivovar\Desktop\workingfolder\projects\brainbox\docs\index.rstlineKubh section)}(hhh](h title)}(h$Welcome to TwinStat's documentation!h]h&Welcome to TwinStat’s documentation!}(hh1h&hh'Nh)Nubah}(h]h]h]h]h!]uh%h/hh,h&hh'h(h)Kubh compound)}(hhh]htoctree)}(hhh]h}(h]h]h]h]h!]hindexentries] includefiles]maxdepthKcaption Contents:globhidden includehiddennumberedK titlesonly rawentries] rawcaptionhVuh%hDh'h(h)K hhAubah}(h]h]toctree-wrapperah]h]h!]uh%h?hh,h&hh'h(h)Nubeh}(h]#welcome-to-twinstat-s-documentationah]h]$welcome to twinstat's documentation!ah]h!]uh%h*hhh&hh'h(h)Kubh+)}(hhh](h0)}(hIndices and tablesh]hIndices and tables}(hhqh&hh'Nh)Nubah}(h]h]h]h]h!]uh%h/hhnh&hh'h(h)Kubh paragraph)}(hBrowse the API:h]hBrowse the API:}(hhh&hh'Nh)Nubah}(h]h]h]h]h!]uh%hh'h(h)Khhnh&hubh bullet_list)}(hhh]h list_item)}(h:ref:`modindex` h]h)}(h:ref:`modindex`h]h pending_xref)}(hhh]h inline)}(hhh]hmodindex}(hhh&hh'Nh)Nubah}(h]h](xrefstdstd-refeh]h]h!]uh%hhhubah}(h]h]h]h]h!]refdochO refdomainhreftyperef refexplicitrefwarn reftargetmodindexuh%hh'h(h)Khhubah}(h]h]h]h]h!]uh%hh'h(h)Khhubah}(h]h]h]h]h!]uh%hhhh&hh'h(h)Nubah}(h]h]h]h]h!]bullet*uh%hh'h(h)Khhnh&hubh)}(h!Or search for something specific:h]h!Or search for something specific:}(hhh&hh'Nh)Nubah}(h]h]h]h]h!]uh%hh'h(h)Khhnh&hubh)}(hhh]h)}(h:ref:`search` h]h)}(h :ref:`search`h]h)}(hhh]h)}(hhh]hsearch}(hhh&hh'Nh)Nubah}(h]h](hstdstd-refeh]h]h!]uh%hhhubah}(h]h]h]h]h!]refdochO refdomainhreftyperef refexplicitrefwarnhsearchuh%hh'h(h)Khhubah}(h]h]h]h]h!]uh%hh'h(h)Khhubah}(h]h]h]h]h!]uh%hhhh&hh'h(h)Nubah}(h]h]h]h]h!]hhuh%hh'h(h)Khhnh&hubh)}(hXA data science python library (TwinStat) is needed as a toolbox to be used by a variety of other AWS services ranging from Twinmaker, do-pm, SimSpace Weaver, SageMaker, etc. TwinStat was designed as a toolbox for the TwinFlow Level 4 Digital Twin Framework. The leveling framework can be read about here: https://aws.amazon.com/blogs/iot/digital-twins-on-aws-unlocking-business-value-and-outcomes/h](hX2A data science python library (TwinStat) is needed as a toolbox to be used by a variety of other AWS services ranging from Twinmaker, do-pm, SimSpace Weaver, SageMaker, etc. TwinStat was designed as a toolbox for the TwinFlow Level 4 Digital Twin Framework. The leveling framework can be read about here: }(hj!h&hh'Nh)Nubh reference)}(h\https://aws.amazon.com/blogs/iot/digital-twins-on-aws-unlocking-business-value-and-outcomes/h]h\https://aws.amazon.com/blogs/iot/digital-twins-on-aws-unlocking-business-value-and-outcomes/}(hj+h&hh'Nh)Nubah}(h]h]h]h]h!]refurij-uh%j)hj!ubeh}(h]h]h]h]h!]uh%hh'h(h)Khhnh&hubeh}(h]indices-and-tablesah]h]indices and tablesah]h!]uh%h*hhh&hh'h(h)Kubh+)}(hhh](h0)}(hFeaturesh]hFeatures}(hjKh&hh'Nh)Nubah}(h]h]h]h]h!]uh%h/hjHh&hh'h(h)K!ubh)}(h(TwinStat includes the following methods:h]h(TwinStat includes the following methods:}(hjYh&hh'Nh)Nubah}(h]h]h]h]h!]uh%hh'h(h)K#hjHh&hubh)}(hhh](h)}(hBayesian Estimation and Posterior Distribution Calculation - Standard Kalman Filters - Smoothing Kalman Filters - Adaptive Kalman Filters - Unscented Kalman Filters - Particle Filtersh]h definition_list)}(hhh]h definition_list_item)}(hBayesian Estimation and Posterior Distribution Calculation - Standard Kalman Filters - Smoothing Kalman Filters - Adaptive Kalman Filters - Unscented Kalman Filters - Particle Filtersh](h term)}(h:Bayesian Estimation and Posterior Distribution Calculationh]h:Bayesian Estimation and Posterior Distribution Calculation}(hj{h&hh'Nh)Nubah}(h]h]h]h]h!]uh%jyh'h(h)K)hjuubh definition)}(hhh]h)}(hhh](h)}(hStandard Kalman Filtersh]h)}(hjh]hStandard Kalman Filters}(hjh&hh'Nh)Nubah}(h]h]h]h]h!]uh%hh'h(h)K&hjubah}(h]h]h]h]h!]uh%hhjubh)}(hSmoothing Kalman Filtersh]h)}(hjh]hSmoothing Kalman Filters}(hjh&hh'Nh)Nubah}(h]h]h]h]h!]uh%hh'h(h)K'hjubah}(h]h]h]h]h!]uh%hhjubh)}(hAdaptive Kalman Filtersh]h)}(hjh]hAdaptive Kalman Filters}(hjh&hh'Nh)Nubah}(h]h]h]h]h!]uh%hh'h(h)K(hjubah}(h]h]h]h]h!]uh%hhjubh)}(hUnscented Kalman Filtersh]h)}(hjh]hUnscented Kalman Filters}(hjh&hh'Nh)Nubah}(h]h]h]h]h!]uh%hh'h(h)K)hjubah}(h]h]h]h]h!]uh%hhjubh)}(hParticle Filtersh]h)}(hjh]hParticle Filters}(hjh&hh'Nh)Nubah}(h]h]h]h]h!]uh%hh'h(h)K*hjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]hՌ-uh%hh'h(h)K&hjubah}(h]h]h]h]h!]uh%jhjuubeh}(h]h]h]h]h!]uh%jsh'h(h)K)hjpubah}(h]h]h]h]h!]uh%jnhjjh)K&ubah}(h]h]h]h]h!]uh%hhjgh&hh'Nh)Nubh)}(h3Global Heuristic Optimization - Genetic Algorithmh]jo)}(hhh]jt)}(h1Global Heuristic Optimization - Genetic Algorithmh](jz)}(hGlobal Heuristic Optimizationh]hGlobal Heuristic Optimization}(hj.h&hh'Nh)Nubah}(h]h]h]h]h!]uh%jyh'h(h)K+hj*ubj)}(hhh]h)}(hhh]h)}(hGenetic Algorithmh]h)}(hjDh]hGenetic Algorithm}(hjFh&hh'Nh)Nubah}(h]h]h]h]h!]uh%hh'h(h)K,hjBubah}(h]h]h]h]h!]uh%hhj?ubah}(h]h]h]h]h!]hj uh%hh'h(h)K,hj<ubah}(h]h]h]h]h!]uh%jhj*ubeh}(h]h]h]h]h!]uh%jsh'h(h)K+hj'ubah}(h]h]h]h]h!]uh%jnhj#h)K,ubah}(h]h]h]h]h!]uh%hhjgh&hh'Nh)Nubh)}(h4Sensitivity Analysis - Using shapely sensitivitiesh]jo)}(hhh]jt)}(h2Sensitivity Analysis - Using shapely sensitivitiesh](jz)}(hSensitivity Analysish]hSensitivity Analysis}(hjh&hh'Nh)Nubah}(h]h]h]h]h!]uh%jyh'h(h)K-hj~ubj)}(hhh]h)}(hhh]h)}(hUsing shapely sensitivitiesh]h)}(hjh]hUsing shapely sensitivities}(hjh&hh'Nh)Nubah}(h]h]h]h]h!]uh%hh'h(h)K.hjubah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]hj uh%hh'h(h)K.hjubah}(h]h]h]h]h!]uh%jhj~ubeh}(h]h]h]h]h!]uh%jsh'h(h)K-hj{ubah}(h]h]h]h]h!]uh%jnhjwh)K.ubah}(h]h]h]h]h!]uh%hhjgh&hh'Nh)Nubh)}(hTUncertainty Propagation - polynomial chaos expansion - brute monte carloh]jo)}(hhh]jt)}(hHUncertainty Propagation - polynomial chaos expansion - brute monte carloh](jz)}(hUncertainty Propagationh]hUncertainty Propagation}(hjh&hh'Nh)Nubah}(h]h]h]h]h!]uh%jyh'h(h)K0hjubj)}(hhh]h)}(hhh](h)}(hpolynomial chaos expansionh]h)}(hjh]hpolynomial chaos expansion}(hjh&hh'Nh)Nubah}(h]h]h]h]h!]uh%hh'h(h)K0hjubah}(h]h]h]h]h!]uh%hhjubh)}(hbrute monte carloh]h)}(hjh]hbrute monte carlo}(hjh&hh'Nh)Nubah}(h]h]h]h]h!]uh%hh'h(h)K1hjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]hj uh%hh'h(h)K0hjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jsh'h(h)K0hjubah}(h]h]h]h]h!]uh%jnhjh)K0ubah}(h]h]h]h]h!]uh%hhjgh&hh'Nh)Nubh)}(hTime Series Analysis - AutoArch - Auto-regressive neural networks - feedforward architecture generation - both mean and quantilesh]jo)}(hhh]jt)}(hTime Series Analysis - AutoArch - Auto-regressive neural networks - feedforward architecture generation - both mean and quantilesh](jz)}(hTime Series Analysish]hTime Series Analysis}(hjAh&hh'Nh)Nubah}(h]h]h]h]h!]uh%jyh'h(h)K5hj=ubj)}(hhh]h)}(hhh](h)}(hAutoArchh]h)}(hjWh]hAutoArch}(hjYh&hh'Nh)Nubah}(h]h]h]h]h!]uh%hh'h(h)K3hjUubah}(h]h]h]h]h!]uh%hhjRubh)}(hkAuto-regressive neural networks - feedforward architecture generation - both mean and quantilesh]jo)}(hhh]jt)}(h_Auto-regressive neural networks - feedforward architecture generation - both mean and quantilesh](jz)}(hAuto-regressive neural networksh]hAuto-regressive neural networks}(hjwh&hh'Nh)Nubah}(h]h]h]h]h!]uh%jyh'h(h)K5hjsubj)}(hhh]h)}(hhh](h)}(h#feedforward architecture generationh]h)}(hjh]h#feedforward architecture generation}(hjh&hh'Nh)Nubah}(h]h]h]h]h!]uh%hh'h(h)K5hjubah}(h]h]h]h]h!]uh%hhjubh)}(hboth mean and quantilesh]h)}(hjh]hboth mean and quantiles}(hjh&hh'Nh)Nubah}(h]h]h]h]h!]uh%hh'h(h)K6hjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]hj uh%hh'h(h)K5hjubah}(h]h]h]h]h!]uh%jhjsubeh}(h]h]h]h]h!]uh%jsh'h(h)K5hjpubah}(h]h]h]h]h!]uh%jnhjlh)K5ubah}(h]h]h]h]h!]uh%hhjRubeh}(h]h]h]h]h!]hj uh%hh'h(h)K3hjOubah}(h]h]h]h]h!]uh%jhj=ubeh}(h]h]h]h]h!]uh%jsh'h(h)K5hj:ubah}(h]h]h]h]h!]uh%jnhj6h)K3ubah}(h]h]h]h]h!]uh%hhjgh&hh'Nh)Nubh)}(hQuantile K-Nearest Neighborh]h)}(hjh]hQuantile K-Nearest Neighbor}(hjh&hh'Nh)Nubah}(h]h]h]h]h!]uh%hh'h(h)K7hjubah}(h]h]h]h]h!]uh%hhjgh&hh'h(h)Nubh)}(hOutlier removalh]h)}(hjh]hOutlier removal}(hjh&hh'Nh)Nubah}(h]h]h]h]h!]uh%hh'h(h)K8hj ubah}(h]h]h]h]h!]uh%hhjgh&hh'h(h)Nubh)}(hLinear Regressions (CPU / GPU)h]h)}(hj%h]hLinear Regressions (CPU / GPU)}(hj'h&hh'Nh)Nubah}(h]h]h]h]h!]uh%hh'h(h)K9hj#ubah}(h]h]h]h]h!]uh%hhjgh&hh'h(h)Nubh)}(h"AutoML wrappers around (AutoGluon)h]h)}(hj<h]h"AutoML wrappers around (AutoGluon)}(hj>h&hh'Nh)Nubah}(h]h]h]h]h!]uh%hh'h(h)K:hj:ubah}(h]h]h]h]h!]uh%hhjgh&hh'h(h)Nubh)}(hProbablistic IoT deviation checks - Example: determine if incoming IoT data is no longer supported by an existing training seth]jo)}(hhh]jt)}(h~Probablistic IoT deviation checks - Example: determine if incoming IoT data is no longer supported by an existing training seth](jz)}(h!Probablistic IoT deviation checksh]h!Probablistic IoT deviation checks}(hj\h&hh'Nh)Nubah}(h]h]h]h]h!]uh%jyh'h(h)K;hjXubj)}(hhh]h)}(hhh]h)}(hZExample: determine if incoming IoT data is no longer supported by an existing training seth]h)}(hjrh]hZExample: determine if incoming IoT data is no longer supported by an existing training set}(hjth&hh'Nh)Nubah}(h]h]h]h]h!]uh%hh'h(h)Khjubah}(h]h]h]h]h!]uh%hhjubh)}(hAupdate functionality not requiring retraining for streaming data h]h)}(h@update functionality not requiring retraining for streaming datah]h@update functionality not requiring retraining for streaming data}(hjh&hh'Nh)Nubah}(h]h]h]h]h!]uh%hh'h(h)K?hjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]hj uh%hh'h(h)K>hjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jsh'h(h)K?hjubah}(h]h]h]h]h!]uh%jnhjh)K>ubah}(h]h]h]h]h!]uh%hhjgh&hh'Nh)Nubeh}(h]h]h]h]h!]hj uh%hh'h(h)K%hjHh&hubeh}(h]featuresah]h]featuresah]h!]uh%h*hhh&hh'h(h)K!ubh+)}(hhh](h0)}(h Requirements:h]h Requirements:}(hj"h&hh'Nh)Nubah}(h]h]h]h]h!]uh%h/hjh&hh'h(h)KBubh)}(hhh](h)}(h+Supported Operating Systems: Linux, Windowsh]h)}(hj5h]h+Supported Operating Systems: Linux, Windows}(hj7h&hh'Nh)Nubah}(h]h]h]h]h!]uh%hh'h(h)KDhj3ubah}(h]h]h]h]h!]uh%hhj0h&hh'h(h)Nubh)}(h Python 3.10+ h]h)}(h Python 3.10+h]h Python 3.10+}(hjNh&hh'Nh)Nubah}(h]h]h]h]h!]uh%hh'h(h)KEhjJubah}(h]h]h]h]h!]uh%hhj0h&hh'h(h)Nubeh}(h]h]h]h]h!]hj uh%hh'h(h)KDhjh&hubeh}(h] requirementsah]h] requirements:ah]h!]uh%h*hhh&hh'h(h)KBubh+)}(hhh](h0)}(h Installationh]h Installation}(hjsh&hh'Nh)Nubah}(h]h]h]h]h!]uh%h/hjph&hh'h(h)KHubh literal_block)}(hjgit clone git@ssh.gitlab.aws.dev:autonomouscomputesateam/twinstat.git cd twinstat/dist pip install ./*.whlh]hjgit clone git@ssh.gitlab.aws.dev:autonomouscomputesateam/twinstat.git cd twinstat/dist pip install ./*.whl}hjsbah}(h]h]h]h]h!]h#h$forcelanguagepythonhighlight_args}uh%jh'h(h)KJhjph&hubeh}(h] installationah]h] installationah]h!]uh%h*hhh&hh'h(h)KHubh+)}(hhh](h0)}(hAPI Documentationh]hAPI Documentation}(hjh&hh'Nh)Nubah}(h]h]h]h]h!]uh%h/hjh&hh'h(h)KSubh)}(h%Auto-documentation can be found here:h]h%Auto-documentation can be found here:}(hjh&hh'Nh)Nubah}(h]h]h]h]h!]uh%hh'h(h)KUhjh&hubh)}(hThttps://gitlab.aws.dev/autonomouscomputesateam/twinstat/-/tree/main/docs/_build/htmlh]j*)}(hjh]hThttps://gitlab.aws.dev/autonomouscomputesateam/twinstat/-/tree/main/docs/_build/html}(hjh&hh'Nh)Nubah}(h]h]h]h]h!]refurijuh%j)hjubah}(h]h]h]h]h!]uh%hh'h(h)KWhjh&hubh)}(h Users can:h]h Users can:}(hjh&hh'Nh)Nubah}(h]h]h]h]h!]uh%hh'h(h)KYhjh&hubj)}(hbgit clone git@ssh.gitlab.aws.dev:autonomouscomputesateam/twinstat.git cd twinstat/docs/_build/htmlh]hbgit clone git@ssh.gitlab.aws.dev:autonomouscomputesateam/twinstat.git cd twinstat/docs/_build/html}hjsbah}(h]h]h]h]h!]h#h$jjpythonj}uh%jh'h(h)K[hjh&hubh)}(h0View the index.html to review API documentation.h]h0View the index.html to review API documentation.}(hjh&hh'Nh)Nubah}(h]h]h]h]h!]uh%hh'h(h)K`hjh&hubeh}(h]api-documentationah]h]api documentationah]h!]uh%h*hhh&hh'h(h)KSubh+)}(hhh](h0)}(hExampleh]hExample}(hj h&hh'Nh)Nubah}(h]h]h]h]h!]uh%h/hj h&hh'h(h)Kcubh)}(h9Full tutorials to be published on AWS Samples in Q4 2023.h]h9Full tutorials to be published on AWS Samples in Q4 2023.}(hjh&hh'Nh)Nubah}(h]h]h]h]h!]uh%hh'h(h)Kehj h&hubh)}(hShort example:h]hShort example:}(hj(h&hh'Nh)Nubah}(h]h]h]h]h!]uh%hh'h(h)Kghj h&hubj)}(hXfrom twinstat.ts_forecast.AR_NN_models import AR_quantile_neural_network ANN = AR_quantile_neural_network(AR=ar, n_exog_variables= n_exo, hidden_units=16, tau=safety_bias, include_endog=False) ANN.train(var, X=X, patience=50) print("Training complete") ANN.save_model(weights_path + '/corrector_weights') print("model and figures saved") ANN.plot(save_fig=True)h]hXfrom twinstat.ts_forecast.AR_NN_models import AR_quantile_neural_network ANN = AR_quantile_neural_network(AR=ar, n_exog_variables= n_exo, hidden_units=16, tau=safety_bias, include_endog=False) ANN.train(var, X=X, patience=50) print("Training complete") ANN.save_model(weights_path + '/corrector_weights') print("model and figures saved") ANN.plot(save_fig=True)}hj6sbah}(h]h]h]h]h!]h#h$jjpythonj}uh%jh'h(h)Kihj h&hubeh}(h]exampleah]h]exampleah]h!]uh%h*hhh&hh'h(h)Kcubh+)}(hhh](h0)}(hLicenseh]hLicense}(hjQh&hh'Nh)Nubah}(h]h]h]h]h!]uh%h/hjNh&hh'h(h)Kyubh)}(hVThis repository is released under the MIT-0 License. See the LICENSE file for details.h]hVThis repository is released under the MIT-0 License. See the LICENSE file for details.}(hj_h&hh'Nh)Nubah}(h]h]h]h]h!]uh%hh'h(h)K{hjNh&hubeh}(h]licenseah]h]licenseah]h!]uh%h*hhh&hh'h(h)Kyubeh}(h]h]h]h]h!]sourceh(uh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(h/N generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh( _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(hkhhjEjBjjjmjjjjjjjKjHjrjou nametypes}(hkjEjjmjjjKjruh}(hhh,jBhnjjHjjjjjpjjjHj jojNu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNh&hub.