CINXE.COM
GitHub - bemporad/jax-sysid: A Python package for linear subspace identification, nonlinear system identification, and nonlinear regression using Jax
<!DOCTYPE html> <html lang="en" data-color-mode="auto" data-light-theme="light" data-dark-theme="dark" data-a11y-animated-images="system" data-a11y-link-underlines="true" > <head> <meta charset="utf-8"> <link rel="dns-prefetch" href="https://github.githubassets.com"> <link rel="dns-prefetch" href="https://avatars.githubusercontent.com"> <link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com"> <link rel="dns-prefetch" href="https://user-images.githubusercontent.com/"> <link rel="preconnect" href="https://github.githubassets.com" crossorigin> <link rel="preconnect" href="https://avatars.githubusercontent.com"> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/light-7aa84bb7e11e.css" /><link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/dark-f65db3e8d171.css" /><link data-color-theme="dark_dimmed" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_dimmed-a8258e3c6dda.css" /><link data-color-theme="dark_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_high_contrast-7e97d834719c.css" /><link data-color-theme="dark_colorblind" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_colorblind-01d869f460be.css" /><link data-color-theme="light_colorblind" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_colorblind-534f3e971240.css" /><link data-color-theme="light_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_high_contrast-a8cc7d138001.css" /><link data-color-theme="light_tritanopia" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_tritanopia-35e9dfdc4f9f.css" /><link data-color-theme="dark_tritanopia" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_tritanopia-cf4cc5f62dfe.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-primitives-d9abecd14f1e.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-93aded0ee8a1.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-8bed0685a4b5.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/github-a954a02d9269.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/repository-4fce88777fa8.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/code-0210be90f4d3.css" /> <script type="application/json" id="client-env">{"locale":"en","featureFlags":["bypass_copilot_indexing_quota","copilot_immersive_file_preview","copilot_new_references_ui","copilot_attach_folder_reference","copilot_personal_instructions","copilot_personal_instructions_templates","copilot_chat_repo_custom_instructions_preview","copilot_chat_retry_on_error","copilot_chat_persist_submitted_input","copilot_conversational_ux_history_refs","copilot_chat_shared_chat_input","copilot_editor_upsells","copilot_dotcom_chat_reduce_telemetry","copilot_implicit_context","copilot_no_floating_button","copilot_smell_icebreaker_ux","copilot_read_shared_conversation","dotcom_chat_client_side_skills","experimentation_azure_variant_endpoint","failbot_handle_non_errors","geojson_azure_maps","ghost_pilot_confidence_truncation_25","ghost_pilot_confidence_truncation_40","github_models_o3_mini_streaming","hovercard_accessibility","issues_react_remove_placeholders","issues_react_blur_item_picker_on_close","issues_react_include_bots_in_pickers","marketing_pages_search_explore_provider","remove_child_patch","sample_network_conn_type","swp_enterprise_contact_form","site_copilot_extensions_ga","site_copilot_vscode_link_update","site_proxima_australia_update","issues_react_create_milestone","issues_react_cache_fix_workaround","lifecycle_label_name_updates"]}</script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/wp-runtime-c6d50aae516a.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_oddbird_popover-polyfill_dist_popover_js-9da652f58479.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_arianotify-polyfill_ariaNotify-polyfill_js-node_modules_github_mi-3abb8f-d7e6bc799724.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_failbot_failbot_ts-4600dbf2d60a.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/environment-f04cb2a9fc8c.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_primer_behaviors_dist_esm_index_mjs-0dbb79f97f8f.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_selector-observer_dist_index_esm_js-f690fd9ae3d5.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_relative-time-element_dist_index_js-f6da4b3fa34c.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_auto-complete-element_dist_index_js-node_modules_github_catalyst_-8e9f78-a74b4e0a8a6b.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_text-expander-element_dist_index_js-78748950cb0c.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_filter-input-element_dist_index_js-node_modules_github_remote-inp-b5f1d7-a1760ffda83d.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_markdown-toolbar-element_dist_index_js-ceef33f593fa.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_file-attachment-element_dist_index_js-node_modules_primer_view-co-c44a69-f0c8a795d1fd.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/github-elements-44d18ad044b3.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/element-registry-682f1551aebf.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_braintree_browser-detection_dist_browser-detection_js-node_modules_githu-2906d7-2a07a295af40.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_lit-html_lit-html_js-be8cb88f481b.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_morphdom_dist_morphdom-e-7c534c-a4a1922eb55f.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_turbo_dist_turbo_es2017-esm_js-e3cbe28f1638.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_delegated-events_dist_inde-893f9f-6cf3320416b8.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_color-convert_index_js-e3180fe3bcb3.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_quote-selection_dist_index_js-node_modules_github_session-resume_-947061-205cd97df772.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_updatable-content_updatable-content_ts-a1563f62660e.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_task-list_ts-app_assets_modules_github_sso_ts-ui_packages-900dde-f48a418a99d4.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_sticky-scroll-into-view_ts-8fa27fd7fbb6.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_ajax-error_ts-app_assets_modules_github_behaviors_include-87a4ae-e2caa5390f5a.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_commenting_edit_ts-app_assets_modules_github_behaviors_ht-83c235-783fc7e142e5.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/behaviors-17d1e0503b7c.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_delegated-events_dist_index_js-node_modules_github_catalyst_lib_index_js-f6223d90c7ba.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/notifications-global-e12489347ccf.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_virtualized-list_es_index_js-node_modules_github_template-parts_lib_index_js-96453a51f920.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_delegated-events_dist_inde-70450e-eecf0d50276f.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_ref-selector_ts-0a7bffd2f129.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/codespaces-fe2c516230f3.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_filter-input-element_dist_index_js-node_modules_github_remote-inp-3eebbd-0763620ad7bf.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_mini-throttle_dist_decorators_js-node_modules_delegated-events_di-e161aa-9d41fb1b6c9e.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_file-attachment-element_dist_index_js-node_modules_github_remote--3c9c82-7238cfcdaa51.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/repositories-a4509a8583cd.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_github_catalyst_lib_inde-dbbea9-26cce2010167.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/code-menu-6a5f60eab447.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/primer-react-9a5713772ca5.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/react-core-af33445b6fc3.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/react-lib-f1bca44e0926.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/octicons-react-611691cca2f6.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_emotion_is-prop-valid_dist_emotion-is-prop-valid_esm_js-node_modules_emo-62da9f-2df2f32ec596.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_stacktrace-parser_dist_s-e7dcdd-f7cc96ebae76.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_oddbird_popover-polyfill_dist_popover-fn_js-55fea94174bf.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/notifications-subscriptions-menu-4a07d5e6bdd6.js"></script> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-react.e159a7f290fa5e4dd43e.module.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/notifications-subscriptions-menu.1bcff9205c241e99cff2.module.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-react.e159a7f290fa5e4dd43e.module.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/notifications-subscriptions-menu.1bcff9205c241e99cff2.module.css" /> <title>GitHub - bemporad/jax-sysid: A Python package for linear subspace identification, nonlinear system identification, and nonlinear regression using Jax</title> <meta name="route-pattern" content="/:user_id/:repository" data-turbo-transient> <meta name="route-controller" content="files" data-turbo-transient> <meta name="route-action" content="disambiguate" data-turbo-transient> <meta name="current-catalog-service-hash" content="f3abb0cc802f3d7b95fc8762b94bdcb13bf39634c40c357301c4aa1d67a256fb"> <meta name="request-id" content="8AC4:3BBF83:3ACA:4F12:67B67355" data-pjax-transient="true"/><meta name="html-safe-nonce" content="92f7a21dfb0dcb3ec78d30108260e5f806fb5ae832a70a5f4f6603229f973664" data-pjax-transient="true"/><meta name="visitor-payload" content="eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QUM0OjNCQkY4MzozQUNBOjRGMTI6NjdCNjczNTUiLCJ2aXNpdG9yX2lkIjoiODg1OTkxNDk0OTQ3NjM4MTUyNSIsInJlZ2lvbl9lZGdlIjoic291dGhlYXN0YXNpYSIsInJlZ2lvbl9yZW5kZXIiOiJzb3V0aGVhc3Rhc2lhIn0=" data-pjax-transient="true"/><meta name="visitor-hmac" content="546b3ee31f3ea12a5f453b6c15bf0ec110e2abfbc2d627c209577e8cab788f5f" data-pjax-transient="true"/> <meta name="hovercard-subject-tag" content="repository:768058898" data-turbo-transient> <meta name="github-keyboard-shortcuts" content="repository,copilot" data-turbo-transient="true" /> <meta name="selected-link" value="repo_source" data-turbo-transient> <link rel="assets" href="https://github.githubassets.com/"> <meta name="google-site-verification" content="Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I"> <meta name="octolytics-url" content="https://collector.github.com/github/collect" /> <meta name="analytics-location" content="/<user-name>/<repo-name>" data-turbo-transient="true" /> <meta name="user-login" content=""> <meta name="viewport" content="width=device-width"> <meta name="description" content="A Python package for linear subspace identification, nonlinear system identification, and nonlinear regression using Jax - bemporad/jax-sysid"> <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub"> <link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub"> <meta property="fb:app_id" content="1401488693436528"> <meta name="apple-itunes-app" content="app-id=1477376905, app-argument=https://github.com/bemporad/jax-sysid" /> <meta name="twitter:image" content="https://opengraph.githubassets.com/f6d7dfca2db6768f3c277682538055bd26a3f34c3ad764966421271f0e44deac/bemporad/jax-sysid" /><meta name="twitter:site" content="@github" /><meta name="twitter:card" content="summary_large_image" /><meta name="twitter:title" content="GitHub - bemporad/jax-sysid: A Python package for linear subspace identification, nonlinear system identification, and nonlinear regression using Jax" /><meta name="twitter:description" content="A Python package for linear subspace identification, nonlinear system identification, and nonlinear regression using Jax - bemporad/jax-sysid" /> <meta property="og:image" content="https://opengraph.githubassets.com/f6d7dfca2db6768f3c277682538055bd26a3f34c3ad764966421271f0e44deac/bemporad/jax-sysid" /><meta property="og:image:alt" content="A Python package for linear subspace identification, nonlinear system identification, and nonlinear regression using Jax - bemporad/jax-sysid" /><meta property="og:image:width" content="1200" /><meta property="og:image:height" content="600" /><meta property="og:site_name" content="GitHub" /><meta property="og:type" content="object" /><meta property="og:title" content="GitHub - bemporad/jax-sysid: A Python package for linear subspace identification, nonlinear system identification, and nonlinear regression using Jax" /><meta property="og:url" content="https://github.com/bemporad/jax-sysid" /><meta property="og:description" content="A Python package for linear subspace identification, nonlinear system identification, and nonlinear regression using Jax - bemporad/jax-sysid" /> <meta name="hostname" content="github.com"> <meta name="expected-hostname" content="github.com"> <meta http-equiv="x-pjax-version" content="b99cccea3e3f17ab6165db33c4f219c176f794a2c8fe67f288d694019566f099" data-turbo-track="reload"> <meta http-equiv="x-pjax-csp-version" content="ace39c3b6632770952207593607e6e0be0db363435a8b877b1f96abe6430f345" data-turbo-track="reload"> <meta http-equiv="x-pjax-css-version" content="1c71206221e00a0a8e77d94d48d954f34ddbd711c4a0ced954fd49cd786cfa61" data-turbo-track="reload"> <meta http-equiv="x-pjax-js-version" content="7e82c4220ec79a588b8ee4781df482abcc1877daea3d5e61982761c4d8d84a54" data-turbo-track="reload"> <meta name="turbo-cache-control" content="no-preview" data-turbo-transient=""> <meta data-hydrostats="publish"> <meta name="go-import" content="github.com/bemporad/jax-sysid git https://github.com/bemporad/jax-sysid.git"> <meta name="octolytics-dimension-user_id" content="24486423" /><meta name="octolytics-dimension-user_login" content="bemporad" /><meta name="octolytics-dimension-repository_id" content="768058898" /><meta name="octolytics-dimension-repository_nwo" content="bemporad/jax-sysid" /><meta name="octolytics-dimension-repository_public" content="true" /><meta name="octolytics-dimension-repository_is_fork" content="false" /><meta name="octolytics-dimension-repository_network_root_id" content="768058898" /><meta name="octolytics-dimension-repository_network_root_nwo" content="bemporad/jax-sysid" /> <link rel="canonical" href="https://github.com/bemporad/jax-sysid" data-turbo-transient> <meta name="turbo-body-classes" content="logged-out env-production page-responsive"> <meta name="browser-stats-url" content="https://api.github.com/_private/browser/stats"> <meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors"> <link rel="mask-icon" href="https://github.githubassets.com/assets/pinned-octocat-093da3e6fa40.svg" color="#000000"> <link rel="alternate icon" class="js-site-favicon" type="image/png" href="https://github.githubassets.com/favicons/favicon.png"> <link rel="icon" class="js-site-favicon" type="image/svg+xml" href="https://github.githubassets.com/favicons/favicon.svg" data-base-href="https://github.githubassets.com/favicons/favicon"> <meta name="theme-color" content="#1e2327"> <meta name="color-scheme" content="light dark" /> <link rel="manifest" href="/manifest.json" crossOrigin="use-credentials"> </head> <body class="logged-out env-production page-responsive" style="word-wrap: break-word;"> <div data-turbo-body class="logged-out env-production page-responsive" style="word-wrap: break-word;"> <div class="position-relative header-wrapper js-header-wrapper "> <a href="#start-of-content" data-skip-target-assigned="false" class="px-2 py-4 color-bg-accent-emphasis color-fg-on-emphasis show-on-focus js-skip-to-content">Skip to content</a> <span data-view-component="true" class="progress-pjax-loader Progress position-fixed width-full"> <span style="width: 0%;" data-view-component="true" class="Progress-item progress-pjax-loader-bar left-0 top-0 color-bg-accent-emphasis"></span> </span> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_ui-commands_ui-commands_ts-e571874765ef.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/keyboard-shortcuts-dialog-6540c642c6aa.js"></script> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-react.e159a7f290fa5e4dd43e.module.css" /> <react-partial partial-name="keyboard-shortcuts-dialog" data-ssr="false" data-attempted-ssr="false" > <script type="application/json" data-target="react-partial.embeddedData">{"props":{"docsUrl":"https://docs.github.com/get-started/accessibility/keyboard-shortcuts"}}</script> <div data-target="react-partial.reactRoot"></div> </react-partial> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_delegated-events_dist_inde-94fd67-73b675cf164a.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/sessions-2d195d11c56b.js"></script> <header class="HeaderMktg header-logged-out js-details-container js-header Details f4 py-3" role="banner" data-is-top="true" data-color-mode=light data-light-theme=light data-dark-theme=dark> <h2 class="sr-only">Navigation Menu</h2> <button type="button" class="HeaderMktg-backdrop d-lg-none border-0 position-fixed top-0 left-0 width-full height-full js-details-target" aria-label="Toggle navigation"> <span class="d-none">Toggle navigation</span> </button> <div class="d-flex flex-column flex-lg-row flex-items-center px-3 px-md-4 px-lg-5 height-full position-relative z-1"> <div class="d-flex flex-justify-between flex-items-center width-full width-lg-auto"> <div class="flex-1"> <button aria-label="Toggle navigation" aria-expanded="false" type="button" data-view-component="true" class="js-details-target js-nav-padding-recalculate js-header-menu-toggle Button--link Button--medium Button d-lg-none color-fg-inherit p-1"> <span class="Button-content"> <span class="Button-label"><div class="HeaderMenu-toggle-bar rounded my-1"></div> <div class="HeaderMenu-toggle-bar rounded my-1"></div> <div class="HeaderMenu-toggle-bar rounded my-1"></div></span> </span> </button> </div> <a class="mr-lg-3 color-fg-inherit flex-order-2 js-prevent-focus-on-mobile-nav" href="/" aria-label="Homepage" data-analytics-event="{"category":"Marketing nav","action":"click to go to homepage","label":"ref_page:Marketing;ref_cta:Logomark;ref_loc:Header"}"> <svg height="32" aria-hidden="true" viewBox="0 0 24 24" version="1.1" width="32" data-view-component="true" class="octicon octicon-mark-github"> <path d="M12.5.75C6.146.75 1 5.896 1 12.25c0 5.089 3.292 9.387 7.863 10.91.575.101.79-.244.79-.546 0-.273-.014-1.178-.014-2.142-2.889.532-3.636-.704-3.866-1.35-.13-.331-.69-1.352-1.18-1.625-.402-.216-.977-.748-.014-.762.906-.014 1.553.834 1.769 1.179 1.035 1.74 2.688 1.25 3.349.948.1-.747.402-1.25.733-1.538-2.559-.287-5.232-1.279-5.232-5.678 0-1.25.445-2.285 1.178-3.09-.115-.288-.517-1.467.115-3.048 0 0 .963-.302 3.163 1.179.92-.259 1.897-.388 2.875-.388.977 0 1.955.13 2.875.388 2.2-1.495 3.162-1.179 3.162-1.179.633 1.581.23 2.76.115 3.048.733.805 1.179 1.825 1.179 3.09 0 4.413-2.688 5.39-5.247 5.678.417.36.776 1.05.776 2.128 0 1.538-.014 2.774-.014 3.162 0 .302.216.662.79.547C20.709 21.637 24 17.324 24 12.25 24 5.896 18.854.75 12.5.75Z"></path> </svg> </a> <div class="flex-1 flex-order-2 text-right"> <a href="/login?return_to=https%3A%2F%2Fgithub.com%2Fbemporad%2Fjax-sysid" class="HeaderMenu-link HeaderMenu-button d-inline-flex d-lg-none flex-order-1 f5 no-underline border color-border-default rounded-2 px-2 py-1 color-fg-inherit js-prevent-focus-on-mobile-nav" data-hydro-click="{"event_type":"authentication.click","payload":{"location_in_page":"site header menu","repository_id":null,"auth_type":"SIGN_UP","originating_url":"https://github.com/bemporad/jax-sysid","user_id":null}}" data-hydro-click-hmac="3334d9cd7c1de9fe369d43492b1465b6e274260ed279f8a8f4cf84471d0ce592" data-analytics-event="{"category":"Marketing nav","action":"click to Sign in","label":"ref_page:Marketing;ref_cta:Sign in;ref_loc:Header"}" > Sign in </a> </div> </div> <div class="HeaderMenu js-header-menu height-fit position-lg-relative d-lg-flex flex-column flex-auto top-0"> <div class="HeaderMenu-wrapper d-flex flex-column flex-self-start flex-lg-row flex-auto rounded rounded-lg-0"> <nav class="HeaderMenu-nav" aria-label="Global"> <ul class="d-lg-flex list-style-none"> <li class="HeaderMenu-item position-relative flex-wrap flex-justify-between flex-items-center d-block d-lg-flex flex-lg-nowrap flex-lg-items-center js-details-container js-header-menu-item"> <button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Product <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path> </svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 pt-2 pt-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 pb-2 pb-lg-4 d-lg-flex flex-wrap dropdown-menu-wide"> <div class="HeaderMenu-column px-lg-4 border-lg-right mb-4 mb-lg-0 pr-lg-7"> <div class="border-bottom pb-3 pb-lg-0 border-lg-bottom-0"> <ul class="list-style-none f5" > <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{"location":"navbar","action":"github_copilot","context":"product","tag":"link","label":"github_copilot_link_product_navbar"}" href="https://github.com/features/copilot"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-copilot color-fg-subtle mr-3"> <path d="M23.922 16.992c-.861 1.495-5.859 5.023-11.922 5.023-6.063 0-11.061-3.528-11.922-5.023A.641.641 0 0 1 0 16.736v-2.869a.841.841 0 0 1 .053-.22c.372-.935 1.347-2.292 2.605-2.656.167-.429.414-1.055.644-1.517a10.195 10.195 0 0 1-.052-1.086c0-1.331.282-2.499 1.132-3.368.397-.406.89-.717 1.474-.952 1.399-1.136 3.392-2.093 6.122-2.093 2.731 0 4.767.957 6.166 2.093.584.235 1.077.546 1.474.952.85.869 1.132 2.037 1.132 3.368 0 .368-.014.733-.052 1.086.23.462.477 1.088.644 1.517 1.258.364 2.233 1.721 2.605 2.656a.832.832 0 0 1 .053.22v2.869a.641.641 0 0 1-.078.256ZM12.172 11h-.344a4.323 4.323 0 0 1-.355.508C10.703 12.455 9.555 13 7.965 13c-1.725 0-2.989-.359-3.782-1.259a2.005 2.005 0 0 1-.085-.104L4 11.741v6.585c1.435.779 4.514 2.179 8 2.179 3.486 0 6.565-1.4 8-2.179v-6.585l-.098-.104s-.033.045-.085.104c-.793.9-2.057 1.259-3.782 1.259-1.59 0-2.738-.545-3.508-1.492a4.323 4.323 0 0 1-.355-.508h-.016.016Zm.641-2.935c.136 1.057.403 1.913.878 2.497.442.544 1.134.938 2.344.938 1.573 0 2.292-.337 2.657-.751.384-.435.558-1.15.558-2.361 0-1.14-.243-1.847-.705-2.319-.477-.488-1.319-.862-2.824-1.025-1.487-.161-2.192.138-2.533.529-.269.307-.437.808-.438 1.578v.021c0 .265.021.562.063.893Zm-1.626 0c.042-.331.063-.628.063-.894v-.02c-.001-.77-.169-1.271-.438-1.578-.341-.391-1.046-.69-2.533-.529-1.505.163-2.347.537-2.824 1.025-.462.472-.705 1.179-.705 2.319 0 1.211.175 1.926.558 2.361.365.414 1.084.751 2.657.751 1.21 0 1.902-.394 2.344-.938.475-.584.742-1.44.878-2.497Z"></path><path d="M14.5 14.25a1 1 0 0 1 1 1v2a1 1 0 0 1-2 0v-2a1 1 0 0 1 1-1Zm-5 0a1 1 0 0 1 1 1v2a1 1 0 0 1-2 0v-2a1 1 0 0 1 1-1Z"></path> </svg> <div> <div class="color-fg-default h4">GitHub Copilot</div> Write better code with AI </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{"location":"navbar","action":"security","context":"product","tag":"link","label":"security_link_product_navbar"}" href="https://github.com/features/security"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-shield-check color-fg-subtle mr-3"> <path d="M16.53 9.78a.75.75 0 0 0-1.06-1.06L11 13.19l-1.97-1.97a.75.75 0 0 0-1.06 1.06l2.5 2.5a.75.75 0 0 0 1.06 0l5-5Z"></path><path d="m12.54.637 8.25 2.675A1.75 1.75 0 0 1 22 4.976V10c0 6.19-3.771 10.704-9.401 12.83a1.704 1.704 0 0 1-1.198 0C5.77 20.705 2 16.19 2 10V4.976c0-.758.489-1.43 1.21-1.664L11.46.637a1.748 1.748 0 0 1 1.08 0Zm-.617 1.426-8.25 2.676a.249.249 0 0 0-.173.237V10c0 5.46 3.28 9.483 8.43 11.426a.199.199 0 0 0 .14 0C17.22 19.483 20.5 15.461 20.5 10V4.976a.25.25 0 0 0-.173-.237l-8.25-2.676a.253.253 0 0 0-.154 0Z"></path> </svg> <div> <div class="color-fg-default h4">Security</div> Find and fix vulnerabilities </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{"location":"navbar","action":"actions","context":"product","tag":"link","label":"actions_link_product_navbar"}" href="https://github.com/features/actions"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-workflow color-fg-subtle mr-3"> <path d="M1 3a2 2 0 0 1 2-2h6.5a2 2 0 0 1 2 2v6.5a2 2 0 0 1-2 2H7v4.063C7 16.355 7.644 17 8.438 17H12.5v-2.5a2 2 0 0 1 2-2H21a2 2 0 0 1 2 2V21a2 2 0 0 1-2 2h-6.5a2 2 0 0 1-2-2v-2.5H8.437A2.939 2.939 0 0 1 5.5 15.562V11.5H3a2 2 0 0 1-2-2Zm2-.5a.5.5 0 0 0-.5.5v6.5a.5.5 0 0 0 .5.5h6.5a.5.5 0 0 0 .5-.5V3a.5.5 0 0 0-.5-.5ZM14.5 14a.5.5 0 0 0-.5.5V21a.5.5 0 0 0 .5.5H21a.5.5 0 0 0 .5-.5v-6.5a.5.5 0 0 0-.5-.5Z"></path> </svg> <div> <div class="color-fg-default h4">Actions</div> Automate any workflow </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{"location":"navbar","action":"codespaces","context":"product","tag":"link","label":"codespaces_link_product_navbar"}" href="https://github.com/features/codespaces"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-codespaces color-fg-subtle mr-3"> <path d="M3.5 3.75C3.5 2.784 4.284 2 5.25 2h13.5c.966 0 1.75.784 1.75 1.75v7.5A1.75 1.75 0 0 1 18.75 13H5.25a1.75 1.75 0 0 1-1.75-1.75Zm-2 12c0-.966.784-1.75 1.75-1.75h17.5c.966 0 1.75.784 1.75 1.75v4a1.75 1.75 0 0 1-1.75 1.75H3.25a1.75 1.75 0 0 1-1.75-1.75ZM5.25 3.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h13.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Zm-2 12a.25.25 0 0 0-.25.25v4c0 .138.112.25.25.25h17.5a.25.25 0 0 0 .25-.25v-4a.25.25 0 0 0-.25-.25Z"></path><path d="M10 17.75a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1-.75-.75Zm-4 0a.75.75 0 0 1 .75-.75h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1-.75-.75Z"></path> </svg> <div> <div class="color-fg-default h4">Codespaces</div> Instant dev environments </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{"location":"navbar","action":"issues","context":"product","tag":"link","label":"issues_link_product_navbar"}" href="https://github.com/features/issues"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-issue-opened color-fg-subtle mr-3"> <path d="M12 1c6.075 0 11 4.925 11 11s-4.925 11-11 11S1 18.075 1 12 5.925 1 12 1ZM2.5 12a9.5 9.5 0 0 0 9.5 9.5 9.5 9.5 0 0 0 9.5-9.5A9.5 9.5 0 0 0 12 2.5 9.5 9.5 0 0 0 2.5 12Zm9.5 2a2 2 0 1 1-.001-3.999A2 2 0 0 1 12 14Z"></path> </svg> <div> <div class="color-fg-default h4">Issues</div> Plan and track work </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{"location":"navbar","action":"code_review","context":"product","tag":"link","label":"code_review_link_product_navbar"}" href="https://github.com/features/code-review"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-code-review color-fg-subtle mr-3"> <path d="M10.3 6.74a.75.75 0 0 1-.04 1.06l-2.908 2.7 2.908 2.7a.75.75 0 1 1-1.02 1.1l-3.5-3.25a.75.75 0 0 1 0-1.1l3.5-3.25a.75.75 0 0 1 1.06.04Zm3.44 1.06a.75.75 0 1 1 1.02-1.1l3.5 3.25a.75.75 0 0 1 0 1.1l-3.5 3.25a.75.75 0 1 1-1.02-1.1l2.908-2.7-2.908-2.7Z"></path><path d="M1.5 4.25c0-.966.784-1.75 1.75-1.75h17.5c.966 0 1.75.784 1.75 1.75v12.5a1.75 1.75 0 0 1-1.75 1.75h-9.69l-3.573 3.573A1.458 1.458 0 0 1 5 21.043V18.5H3.25a1.75 1.75 0 0 1-1.75-1.75ZM3.25 4a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h2.5a.75.75 0 0 1 .75.75v3.19l3.72-3.72a.749.749 0 0 1 .53-.22h10a.25.25 0 0 0 .25-.25V4.25a.25.25 0 0 0-.25-.25Z"></path> </svg> <div> <div class="color-fg-default h4">Code Review</div> Manage code changes </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{"location":"navbar","action":"discussions","context":"product","tag":"link","label":"discussions_link_product_navbar"}" href="https://github.com/features/discussions"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-comment-discussion color-fg-subtle mr-3"> <path d="M1.75 1h12.5c.966 0 1.75.784 1.75 1.75v9.5A1.75 1.75 0 0 1 14.25 14H8.061l-2.574 2.573A1.458 1.458 0 0 1 3 15.543V14H1.75A1.75 1.75 0 0 1 0 12.25v-9.5C0 1.784.784 1 1.75 1ZM1.5 2.75v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25Z"></path><path d="M22.5 8.75a.25.25 0 0 0-.25-.25h-3.5a.75.75 0 0 1 0-1.5h3.5c.966 0 1.75.784 1.75 1.75v9.5A1.75 1.75 0 0 1 22.25 20H21v1.543a1.457 1.457 0 0 1-2.487 1.03L15.939 20H10.75A1.75 1.75 0 0 1 9 18.25v-1.465a.75.75 0 0 1 1.5 0v1.465c0 .138.112.25.25.25h5.5a.75.75 0 0 1 .53.22l2.72 2.72v-2.19a.75.75 0 0 1 .75-.75h2a.25.25 0 0 0 .25-.25v-9.5Z"></path> </svg> <div> <div class="color-fg-default h4">Discussions</div> Collaborate outside of code </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description" data-analytics-event="{"location":"navbar","action":"code_search","context":"product","tag":"link","label":"code_search_link_product_navbar"}" href="https://github.com/features/code-search"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-code-square color-fg-subtle mr-3"> <path d="M10.3 8.24a.75.75 0 0 1-.04 1.06L7.352 12l2.908 2.7a.75.75 0 1 1-1.02 1.1l-3.5-3.25a.75.75 0 0 1 0-1.1l3.5-3.25a.75.75 0 0 1 1.06.04Zm3.44 1.06a.75.75 0 1 1 1.02-1.1l3.5 3.25a.75.75 0 0 1 0 1.1l-3.5 3.25a.75.75 0 1 1-1.02-1.1l2.908-2.7-2.908-2.7Z"></path><path d="M2 3.75C2 2.784 2.784 2 3.75 2h16.5c.966 0 1.75.784 1.75 1.75v16.5A1.75 1.75 0 0 1 20.25 22H3.75A1.75 1.75 0 0 1 2 20.25Zm1.75-.25a.25.25 0 0 0-.25.25v16.5c0 .138.112.25.25.25h16.5a.25.25 0 0 0 .25-.25V3.75a.25.25 0 0 0-.25-.25Z"></path> </svg> <div> <div class="color-fg-default h4">Code Search</div> Find more, search less </div> </a></li> </ul> </div> </div> <div class="HeaderMenu-column px-lg-4"> <div class="border-bottom pb-3 pb-lg-0 border-lg-bottom-0 border-bottom-0"> <span class="d-block h4 color-fg-default my-1" id="product-explore-heading">Explore</span> <ul class="list-style-none f5" aria-labelledby="product-explore-heading"> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{"location":"navbar","action":"all_features","context":"product","tag":"link","label":"all_features_link_product_navbar"}" href="https://github.com/features"> All features </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary Link--external" target="_blank" data-analytics-event="{"location":"navbar","action":"documentation","context":"product","tag":"link","label":"documentation_link_product_navbar"}" href="https://docs.github.com"> Documentation <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path> </svg> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary Link--external" target="_blank" data-analytics-event="{"location":"navbar","action":"github_skills","context":"product","tag":"link","label":"github_skills_link_product_navbar"}" href="https://skills.github.com"> GitHub Skills <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path> </svg> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary Link--external" target="_blank" data-analytics-event="{"location":"navbar","action":"blog","context":"product","tag":"link","label":"blog_link_product_navbar"}" href="https://github.blog"> Blog <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path> </svg> </a></li> </ul> </div> </div> </div> </li> <li class="HeaderMenu-item position-relative flex-wrap flex-justify-between flex-items-center d-block d-lg-flex flex-lg-nowrap flex-lg-items-center js-details-container js-header-menu-item"> <button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Solutions <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path> </svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 pt-2 pt-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 d-lg-flex flex-wrap dropdown-menu-wide"> <div class="HeaderMenu-column px-lg-4 border-lg-right mb-4 mb-lg-0 pr-lg-7"> <div class="border-bottom pb-3 pb-lg-0 border-lg-bottom-0 pb-lg-3 mb-3 mb-lg-0"> <span class="d-block h4 color-fg-default my-1" id="solutions-by-company-size-heading">By company size</span> <ul class="list-style-none f5" aria-labelledby="solutions-by-company-size-heading"> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{"location":"navbar","action":"enterprises","context":"solutions","tag":"link","label":"enterprises_link_solutions_navbar"}" href="https://github.com/enterprise"> Enterprises </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{"location":"navbar","action":"small_and_medium_teams","context":"solutions","tag":"link","label":"small_and_medium_teams_link_solutions_navbar"}" href="https://github.com/team"> Small and medium teams </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{"location":"navbar","action":"startups","context":"solutions","tag":"link","label":"startups_link_solutions_navbar"}" href="https://github.com/enterprise/startups"> Startups </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{"location":"navbar","action":"nonprofits","context":"solutions","tag":"link","label":"nonprofits_link_solutions_navbar"}" href="/solutions/industry/nonprofits"> Nonprofits </a></li> </ul> </div> <div class="border-bottom pb-3 pb-lg-0 border-lg-bottom-0"> <span class="d-block h4 color-fg-default my-1" id="solutions-by-use-case-heading">By use case</span> <ul class="list-style-none f5" aria-labelledby="solutions-by-use-case-heading"> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{"location":"navbar","action":"devsecops","context":"solutions","tag":"link","label":"devsecops_link_solutions_navbar"}" href="/solutions/use-case/devsecops"> DevSecOps </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{"location":"navbar","action":"devops","context":"solutions","tag":"link","label":"devops_link_solutions_navbar"}" href="/solutions/use-case/devops"> DevOps </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{"location":"navbar","action":"ci_cd","context":"solutions","tag":"link","label":"ci_cd_link_solutions_navbar"}" href="/solutions/use-case/ci-cd"> CI/CD </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{"location":"navbar","action":"view_all_use_cases","context":"solutions","tag":"link","label":"view_all_use_cases_link_solutions_navbar"}" href="/solutions/use-case"> View all use cases </a></li> </ul> </div> </div> <div class="HeaderMenu-column px-lg-4"> <div class="border-bottom pb-3 pb-lg-0 border-lg-bottom-0"> <span class="d-block h4 color-fg-default my-1" id="solutions-by-industry-heading">By industry</span> <ul class="list-style-none f5" aria-labelledby="solutions-by-industry-heading"> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{"location":"navbar","action":"healthcare","context":"solutions","tag":"link","label":"healthcare_link_solutions_navbar"}" href="/solutions/industry/healthcare"> Healthcare </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{"location":"navbar","action":"financial_services","context":"solutions","tag":"link","label":"financial_services_link_solutions_navbar"}" href="/solutions/industry/financial-services"> Financial services </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{"location":"navbar","action":"manufacturing","context":"solutions","tag":"link","label":"manufacturing_link_solutions_navbar"}" href="/solutions/industry/manufacturing"> Manufacturing </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{"location":"navbar","action":"government","context":"solutions","tag":"link","label":"government_link_solutions_navbar"}" href="/solutions/industry/government"> Government </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{"location":"navbar","action":"view_all_industries","context":"solutions","tag":"link","label":"view_all_industries_link_solutions_navbar"}" href="/solutions/industry"> View all industries </a></li> </ul> </div> </div> <div class="HeaderMenu-trailing-link rounded-bottom-2 flex-shrink-0 mt-lg-4 px-lg-4 py-4 py-lg-3 f5 text-semibold"> <a href="/solutions"> View all solutions <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-right HeaderMenu-trailing-link-icon"> <path d="M6.22 3.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L9.94 8 6.22 4.28a.75.75 0 0 1 0-1.06Z"></path> </svg> </a> </div> </div> </li> <li class="HeaderMenu-item position-relative flex-wrap flex-justify-between flex-items-center d-block d-lg-flex flex-lg-nowrap flex-lg-items-center js-details-container js-header-menu-item"> <button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Resources <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path> </svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 pt-2 pt-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 pb-2 pb-lg-4 d-lg-flex flex-wrap dropdown-menu-wide"> <div class="HeaderMenu-column px-lg-4 border-lg-right mb-4 mb-lg-0 pr-lg-7"> <div class="border-bottom pb-3 pb-lg-0 border-lg-bottom-0"> <span class="d-block h4 color-fg-default my-1" id="resources-topics-heading">Topics</span> <ul class="list-style-none f5" aria-labelledby="resources-topics-heading"> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{"location":"navbar","action":"ai","context":"resources","tag":"link","label":"ai_link_resources_navbar"}" href="/resources/articles/ai"> AI </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{"location":"navbar","action":"devops","context":"resources","tag":"link","label":"devops_link_resources_navbar"}" href="/resources/articles/devops"> DevOps </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{"location":"navbar","action":"security","context":"resources","tag":"link","label":"security_link_resources_navbar"}" href="/resources/articles/security"> Security </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{"location":"navbar","action":"software_development","context":"resources","tag":"link","label":"software_development_link_resources_navbar"}" href="/resources/articles/software-development"> Software Development </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{"location":"navbar","action":"view_all","context":"resources","tag":"link","label":"view_all_link_resources_navbar"}" href="/resources/articles"> View all </a></li> </ul> </div> </div> <div class="HeaderMenu-column px-lg-4"> <div class="border-bottom pb-3 pb-lg-0 border-lg-bottom-0 border-bottom-0"> <span class="d-block h4 color-fg-default my-1" id="resources-explore-heading">Explore</span> <ul class="list-style-none f5" aria-labelledby="resources-explore-heading"> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary Link--external" target="_blank" data-analytics-event="{"location":"navbar","action":"learning_pathways","context":"resources","tag":"link","label":"learning_pathways_link_resources_navbar"}" href="https://resources.github.com/learn/pathways"> Learning Pathways <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path> </svg> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary Link--external" target="_blank" data-analytics-event="{"location":"navbar","action":"events_amp_webinars","context":"resources","tag":"link","label":"events_amp_webinars_link_resources_navbar"}" href="https://resources.github.com"> Events & Webinars <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path> </svg> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{"location":"navbar","action":"ebooks_amp_whitepapers","context":"resources","tag":"link","label":"ebooks_amp_whitepapers_link_resources_navbar"}" href="https://github.com/resources/whitepapers"> Ebooks & Whitepapers </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{"location":"navbar","action":"customer_stories","context":"resources","tag":"link","label":"customer_stories_link_resources_navbar"}" href="https://github.com/customer-stories"> Customer Stories </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary Link--external" target="_blank" data-analytics-event="{"location":"navbar","action":"partners","context":"resources","tag":"link","label":"partners_link_resources_navbar"}" href="https://partner.github.com"> Partners <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path> </svg> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{"location":"navbar","action":"executive_insights","context":"resources","tag":"link","label":"executive_insights_link_resources_navbar"}" href="https://github.com/solutions/executive-insights"> Executive Insights </a></li> </ul> </div> </div> </div> </li> <li class="HeaderMenu-item position-relative flex-wrap flex-justify-between flex-items-center d-block d-lg-flex flex-lg-nowrap flex-lg-items-center js-details-container js-header-menu-item"> <button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Open Source <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path> </svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 pt-2 pt-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 pb-2 pb-lg-4 px-lg-4"> <div class="HeaderMenu-column"> <div class="border-bottom pb-3 pb-lg-0 pb-lg-3 mb-3 mb-lg-0 mb-lg-3"> <ul class="list-style-none f5" > <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description" data-analytics-event="{"location":"navbar","action":"github_sponsors","context":"open_source","tag":"link","label":"github_sponsors_link_open_source_navbar"}" href="/sponsors"> <div> <div class="color-fg-default h4">GitHub Sponsors</div> Fund open source developers </div> </a></li> </ul> </div> <div class="border-bottom pb-3 pb-lg-0 pb-lg-3 mb-3 mb-lg-0 mb-lg-3"> <ul class="list-style-none f5" > <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description" data-analytics-event="{"location":"navbar","action":"the_readme_project","context":"open_source","tag":"link","label":"the_readme_project_link_open_source_navbar"}" href="https://github.com/readme"> <div> <div class="color-fg-default h4">The ReadME Project</div> GitHub community articles </div> </a></li> </ul> </div> <div class="border-bottom pb-3 pb-lg-0 border-bottom-0"> <span class="d-block h4 color-fg-default my-1" id="open-source-repositories-heading">Repositories</span> <ul class="list-style-none f5" aria-labelledby="open-source-repositories-heading"> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{"location":"navbar","action":"topics","context":"open_source","tag":"link","label":"topics_link_open_source_navbar"}" href="https://github.com/topics"> Topics </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{"location":"navbar","action":"trending","context":"open_source","tag":"link","label":"trending_link_open_source_navbar"}" href="https://github.com/trending"> Trending </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{"location":"navbar","action":"collections","context":"open_source","tag":"link","label":"collections_link_open_source_navbar"}" href="https://github.com/collections"> Collections </a></li> </ul> </div> </div> </div> </li> <li class="HeaderMenu-item position-relative flex-wrap flex-justify-between flex-items-center d-block d-lg-flex flex-lg-nowrap flex-lg-items-center js-details-container js-header-menu-item"> <button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Enterprise <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path> </svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 pt-2 pt-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 pb-2 pb-lg-4 px-lg-4"> <div class="HeaderMenu-column"> <div class="border-bottom pb-3 pb-lg-0 pb-lg-3 mb-3 mb-lg-0 mb-lg-3"> <ul class="list-style-none f5" > <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description" data-analytics-event="{"location":"navbar","action":"enterprise_platform","context":"enterprise","tag":"link","label":"enterprise_platform_link_enterprise_navbar"}" href="/enterprise"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-stack color-fg-subtle mr-3"> <path d="M11.063 1.456a1.749 1.749 0 0 1 1.874 0l8.383 5.316a1.751 1.751 0 0 1 0 2.956l-8.383 5.316a1.749 1.749 0 0 1-1.874 0L2.68 9.728a1.751 1.751 0 0 1 0-2.956Zm1.071 1.267a.25.25 0 0 0-.268 0L3.483 8.039a.25.25 0 0 0 0 .422l8.383 5.316a.25.25 0 0 0 .268 0l8.383-5.316a.25.25 0 0 0 0-.422Z"></path><path d="M1.867 12.324a.75.75 0 0 1 1.035-.232l8.964 5.685a.25.25 0 0 0 .268 0l8.964-5.685a.75.75 0 0 1 .804 1.267l-8.965 5.685a1.749 1.749 0 0 1-1.874 0l-8.965-5.685a.75.75 0 0 1-.231-1.035Z"></path><path d="M1.867 16.324a.75.75 0 0 1 1.035-.232l8.964 5.685a.25.25 0 0 0 .268 0l8.964-5.685a.75.75 0 0 1 .804 1.267l-8.965 5.685a1.749 1.749 0 0 1-1.874 0l-8.965-5.685a.75.75 0 0 1-.231-1.035Z"></path> </svg> <div> <div class="color-fg-default h4">Enterprise platform</div> AI-powered developer platform </div> </a></li> </ul> </div> <div class="border-bottom pb-3 pb-lg-0 border-bottom-0"> <span class="d-block h4 color-fg-default my-1" id="enterprise-available-add-ons-heading">Available add-ons</span> <ul class="list-style-none f5" aria-labelledby="enterprise-available-add-ons-heading"> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{"location":"navbar","action":"advanced_security","context":"enterprise","tag":"link","label":"advanced_security_link_enterprise_navbar"}" href="https://github.com/enterprise/advanced-security"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-shield-check color-fg-subtle mr-3"> <path d="M16.53 9.78a.75.75 0 0 0-1.06-1.06L11 13.19l-1.97-1.97a.75.75 0 0 0-1.06 1.06l2.5 2.5a.75.75 0 0 0 1.06 0l5-5Z"></path><path d="m12.54.637 8.25 2.675A1.75 1.75 0 0 1 22 4.976V10c0 6.19-3.771 10.704-9.401 12.83a1.704 1.704 0 0 1-1.198 0C5.77 20.705 2 16.19 2 10V4.976c0-.758.489-1.43 1.21-1.664L11.46.637a1.748 1.748 0 0 1 1.08 0Zm-.617 1.426-8.25 2.676a.249.249 0 0 0-.173.237V10c0 5.46 3.28 9.483 8.43 11.426a.199.199 0 0 0 .14 0C17.22 19.483 20.5 15.461 20.5 10V4.976a.25.25 0 0 0-.173-.237l-8.25-2.676a.253.253 0 0 0-.154 0Z"></path> </svg> <div> <div class="color-fg-default h4">Advanced Security</div> Enterprise-grade security features </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{"location":"navbar","action":"github_copilot","context":"enterprise","tag":"link","label":"github_copilot_link_enterprise_navbar"}" href="/features/copilot#enterprise"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-copilot color-fg-subtle mr-3"> <path d="M23.922 16.992c-.861 1.495-5.859 5.023-11.922 5.023-6.063 0-11.061-3.528-11.922-5.023A.641.641 0 0 1 0 16.736v-2.869a.841.841 0 0 1 .053-.22c.372-.935 1.347-2.292 2.605-2.656.167-.429.414-1.055.644-1.517a10.195 10.195 0 0 1-.052-1.086c0-1.331.282-2.499 1.132-3.368.397-.406.89-.717 1.474-.952 1.399-1.136 3.392-2.093 6.122-2.093 2.731 0 4.767.957 6.166 2.093.584.235 1.077.546 1.474.952.85.869 1.132 2.037 1.132 3.368 0 .368-.014.733-.052 1.086.23.462.477 1.088.644 1.517 1.258.364 2.233 1.721 2.605 2.656a.832.832 0 0 1 .053.22v2.869a.641.641 0 0 1-.078.256ZM12.172 11h-.344a4.323 4.323 0 0 1-.355.508C10.703 12.455 9.555 13 7.965 13c-1.725 0-2.989-.359-3.782-1.259a2.005 2.005 0 0 1-.085-.104L4 11.741v6.585c1.435.779 4.514 2.179 8 2.179 3.486 0 6.565-1.4 8-2.179v-6.585l-.098-.104s-.033.045-.085.104c-.793.9-2.057 1.259-3.782 1.259-1.59 0-2.738-.545-3.508-1.492a4.323 4.323 0 0 1-.355-.508h-.016.016Zm.641-2.935c.136 1.057.403 1.913.878 2.497.442.544 1.134.938 2.344.938 1.573 0 2.292-.337 2.657-.751.384-.435.558-1.15.558-2.361 0-1.14-.243-1.847-.705-2.319-.477-.488-1.319-.862-2.824-1.025-1.487-.161-2.192.138-2.533.529-.269.307-.437.808-.438 1.578v.021c0 .265.021.562.063.893Zm-1.626 0c.042-.331.063-.628.063-.894v-.02c-.001-.77-.169-1.271-.438-1.578-.341-.391-1.046-.69-2.533-.529-1.505.163-2.347.537-2.824 1.025-.462.472-.705 1.179-.705 2.319 0 1.211.175 1.926.558 2.361.365.414 1.084.751 2.657.751 1.21 0 1.902-.394 2.344-.938.475-.584.742-1.44.878-2.497Z"></path><path d="M14.5 14.25a1 1 0 0 1 1 1v2a1 1 0 0 1-2 0v-2a1 1 0 0 1 1-1Zm-5 0a1 1 0 0 1 1 1v2a1 1 0 0 1-2 0v-2a1 1 0 0 1 1-1Z"></path> </svg> <div> <div class="color-fg-default h4">GitHub Copilot</div> Enterprise-grade AI features </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description" data-analytics-event="{"location":"navbar","action":"premium_support","context":"enterprise","tag":"link","label":"premium_support_link_enterprise_navbar"}" href="/premium-support"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-comment-discussion color-fg-subtle mr-3"> <path d="M1.75 1h12.5c.966 0 1.75.784 1.75 1.75v9.5A1.75 1.75 0 0 1 14.25 14H8.061l-2.574 2.573A1.458 1.458 0 0 1 3 15.543V14H1.75A1.75 1.75 0 0 1 0 12.25v-9.5C0 1.784.784 1 1.75 1ZM1.5 2.75v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25Z"></path><path d="M22.5 8.75a.25.25 0 0 0-.25-.25h-3.5a.75.75 0 0 1 0-1.5h3.5c.966 0 1.75.784 1.75 1.75v9.5A1.75 1.75 0 0 1 22.25 20H21v1.543a1.457 1.457 0 0 1-2.487 1.03L15.939 20H10.75A1.75 1.75 0 0 1 9 18.25v-1.465a.75.75 0 0 1 1.5 0v1.465c0 .138.112.25.25.25h5.5a.75.75 0 0 1 .53.22l2.72 2.72v-2.19a.75.75 0 0 1 .75-.75h2a.25.25 0 0 0 .25-.25v-9.5Z"></path> </svg> <div> <div class="color-fg-default h4">Premium Support</div> Enterprise-grade 24/7 support </div> </a></li> </ul> </div> </div> </div> </li> <li class="HeaderMenu-item position-relative flex-wrap flex-justify-between flex-items-center d-block d-lg-flex flex-lg-nowrap flex-lg-items-center js-details-container js-header-menu-item"> <a class="HeaderMenu-link no-underline px-0 px-lg-2 py-3 py-lg-2 d-block d-lg-inline-block" data-analytics-event="{"location":"navbar","action":"pricing","context":"global","tag":"link","label":"pricing_link_global_navbar"}" href="https://github.com/pricing">Pricing</a> </li> </ul> </nav> <div class="d-flex flex-column flex-lg-row width-full flex-justify-end flex-lg-items-center text-center mt-3 mt-lg-0 text-lg-left ml-lg-3"> <qbsearch-input class="search-input" data-scope="repo:bemporad/jax-sysid" data-custom-scopes-path="/search/custom_scopes" data-delete-custom-scopes-csrf="dhefv8Ov-jZw8nqnZ3S2g2TM31mlh0G9WCbqQoV46rmeD_qYOkPKWSlpNlU5JwClQgbjEYq6GrxARyImxevIeQ" data-max-custom-scopes="10" data-header-redesign-enabled="false" data-initial-value="" data-blackbird-suggestions-path="/search/suggestions" data-jump-to-suggestions-path="/_graphql/GetSuggestedNavigationDestinations" data-current-repository="bemporad/jax-sysid" data-current-org="" data-current-owner="bemporad" data-logged-in="false" data-copilot-chat-enabled="false" data-nl-search-enabled="false" data-retain-scroll-position="true"> <div class="search-input-container search-with-dialog position-relative d-flex flex-row flex-items-center mr-4 rounded" data-action="click:qbsearch-input#searchInputContainerClicked" > <button type="button" class="header-search-button placeholder input-button form-control d-flex flex-1 flex-self-stretch flex-items-center no-wrap width-full py-0 pl-2 pr-0 text-left border-0 box-shadow-none" data-target="qbsearch-input.inputButton" aria-label="Search or jump to…" aria-haspopup="dialog" placeholder="Search or jump to..." data-hotkey=s,/ autocapitalize="off" data-analytics-event="{"location":"navbar","action":"searchbar","context":"global","tag":"input","label":"searchbar_input_global_navbar"}" data-action="click:qbsearch-input#handleExpand" > <div class="mr-2 color-fg-muted"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path> </svg> </div> <span class="flex-1" data-target="qbsearch-input.inputButtonText">Search or jump to...</span> <div class="d-flex" data-target="qbsearch-input.hotkeyIndicator"> <svg xmlns="http://www.w3.org/2000/svg" width="22" height="20" aria-hidden="true" class="mr-1"><path fill="none" stroke="#979A9C" opacity=".4" d="M3.5.5h12c1.7 0 3 1.3 3 3v13c0 1.7-1.3 3-3 3h-12c-1.7 0-3-1.3-3-3v-13c0-1.7 1.3-3 3-3z"></path><path fill="#979A9C" d="M11.8 6L8 15.1h-.9L10.8 6h1z"></path></svg> </div> </button> <input type="hidden" name="type" class="js-site-search-type-field"> <div class="Overlay--hidden " data-modal-dialog-overlay> <modal-dialog data-action="close:qbsearch-input#handleClose cancel:qbsearch-input#handleClose" data-target="qbsearch-input.searchSuggestionsDialog" role="dialog" id="search-suggestions-dialog" aria-modal="true" aria-labelledby="search-suggestions-dialog-header" data-view-component="true" class="Overlay Overlay--width-large Overlay--height-auto"> <h1 id="search-suggestions-dialog-header" class="sr-only">Search code, repositories, users, issues, pull requests...</h1> <div class="Overlay-body Overlay-body--paddingNone"> <div data-view-component="true"> <div class="search-suggestions position-fixed width-full color-shadow-large border color-fg-default color-bg-default overflow-hidden d-flex flex-column query-builder-container" style="border-radius: 12px;" data-target="qbsearch-input.queryBuilderContainer" hidden > <!-- '"` --><!-- </textarea></xmp> --></option></form><form id="query-builder-test-form" action="" accept-charset="UTF-8" method="get"> <query-builder data-target="qbsearch-input.queryBuilder" id="query-builder-query-builder-test" data-filter-key=":" data-view-component="true" class="QueryBuilder search-query-builder"> <div class="FormControl FormControl--fullWidth"> <label id="query-builder-test-label" for="query-builder-test" class="FormControl-label sr-only"> Search </label> <div class="QueryBuilder-StyledInput width-fit " data-target="query-builder.styledInput" > <span id="query-builder-test-leadingvisual-wrap" class="FormControl-input-leadingVisualWrap QueryBuilder-leadingVisualWrap"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search FormControl-input-leadingVisual"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path> </svg> </span> <div data-target="query-builder.styledInputContainer" class="QueryBuilder-StyledInputContainer"> <div aria-hidden="true" class="QueryBuilder-StyledInputContent" data-target="query-builder.styledInputContent" ></div> <div class="QueryBuilder-InputWrapper"> <div aria-hidden="true" class="QueryBuilder-Sizer" data-target="query-builder.sizer"></div> <input id="query-builder-test" name="query-builder-test" value="" autocomplete="off" type="text" role="combobox" spellcheck="false" aria-expanded="false" aria-describedby="validation-9e2b6f83-3c9e-40c5-a565-e6b440b65108" data-target="query-builder.input" data-action=" input:query-builder#inputChange blur:query-builder#inputBlur keydown:query-builder#inputKeydown focus:query-builder#inputFocus " data-view-component="true" class="FormControl-input QueryBuilder-Input FormControl-medium" /> </div> </div> <span class="sr-only" id="query-builder-test-clear">Clear</span> <button role="button" id="query-builder-test-clear-button" aria-labelledby="query-builder-test-clear query-builder-test-label" data-target="query-builder.clearButton" data-action=" click:query-builder#clear focus:query-builder#clearButtonFocus blur:query-builder#clearButtonBlur " variant="small" hidden="hidden" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium mr-1 px-2 py-0 d-flex flex-items-center rounded-1 color-fg-muted"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x-circle-fill Button-visual"> <path d="M2.343 13.657A8 8 0 1 1 13.658 2.343 8 8 0 0 1 2.343 13.657ZM6.03 4.97a.751.751 0 0 0-1.042.018.751.751 0 0 0-.018 1.042L6.94 8 4.97 9.97a.749.749 0 0 0 .326 1.275.749.749 0 0 0 .734-.215L8 9.06l1.97 1.97a.749.749 0 0 0 1.275-.326.749.749 0 0 0-.215-.734L9.06 8l1.97-1.97a.749.749 0 0 0-.326-1.275.749.749 0 0 0-.734.215L8 6.94Z"></path> </svg> </button> </div> <template id="search-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path> </svg> </template> <template id="code-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-code"> <path d="m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L.47 8.53a.75.75 0 0 1 0-1.06Z"></path> </svg> </template> <template id="file-code-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file-code"> <path d="M4 1.75C4 .784 4.784 0 5.75 0h5.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v8.586A1.75 1.75 0 0 1 14.25 15h-9a.75.75 0 0 1 0-1.5h9a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 10 4.25V1.5H5.75a.25.25 0 0 0-.25.25v2.5a.75.75 0 0 1-1.5 0Zm1.72 4.97a.75.75 0 0 1 1.06 0l2 2a.75.75 0 0 1 0 1.06l-2 2a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734l1.47-1.47-1.47-1.47a.75.75 0 0 1 0-1.06ZM3.28 7.78 1.81 9.25l1.47 1.47a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018l-2-2a.75.75 0 0 1 0-1.06l2-2a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Zm8.22-6.218V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path> </svg> </template> <template id="history-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-history"> <path d="m.427 1.927 1.215 1.215a8.002 8.002 0 1 1-1.6 5.685.75.75 0 1 1 1.493-.154 6.5 6.5 0 1 0 1.18-4.458l1.358 1.358A.25.25 0 0 1 3.896 6H.25A.25.25 0 0 1 0 5.75V2.104a.25.25 0 0 1 .427-.177ZM7.75 4a.75.75 0 0 1 .75.75v2.992l2.028.812a.75.75 0 0 1-.557 1.392l-2.5-1A.751.751 0 0 1 7 8.25v-3.5A.75.75 0 0 1 7.75 4Z"></path> </svg> </template> <template id="repo-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path> </svg> </template> <template id="bookmark-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-bookmark"> <path d="M3 2.75C3 1.784 3.784 1 4.75 1h6.5c.966 0 1.75.784 1.75 1.75v11.5a.75.75 0 0 1-1.227.579L8 11.722l-3.773 3.107A.751.751 0 0 1 3 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.91l3.023-2.489a.75.75 0 0 1 .954 0l3.023 2.49V2.75a.25.25 0 0 0-.25-.25Z"></path> </svg> </template> <template id="plus-circle-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-plus-circle"> <path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm7.25-3.25v2.5h2.5a.75.75 0 0 1 0 1.5h-2.5v2.5a.75.75 0 0 1-1.5 0v-2.5h-2.5a.75.75 0 0 1 0-1.5h2.5v-2.5a.75.75 0 0 1 1.5 0Z"></path> </svg> </template> <template id="circle-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-dot-fill"> <path d="M8 4a4 4 0 1 1 0 8 4 4 0 0 1 0-8Z"></path> </svg> </template> <template id="trash-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-trash"> <path d="M11 1.75V3h2.25a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1 0-1.5H5V1.75C5 .784 5.784 0 6.75 0h2.5C10.216 0 11 .784 11 1.75ZM4.496 6.675l.66 6.6a.25.25 0 0 0 .249.225h5.19a.25.25 0 0 0 .249-.225l.66-6.6a.75.75 0 0 1 1.492.149l-.66 6.6A1.748 1.748 0 0 1 10.595 15h-5.19a1.75 1.75 0 0 1-1.741-1.575l-.66-6.6a.75.75 0 1 1 1.492-.15ZM6.5 1.75V3h3V1.75a.25.25 0 0 0-.25-.25h-2.5a.25.25 0 0 0-.25.25Z"></path> </svg> </template> <template id="team-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-people"> <path d="M2 5.5a3.5 3.5 0 1 1 5.898 2.549 5.508 5.508 0 0 1 3.034 4.084.75.75 0 1 1-1.482.235 4 4 0 0 0-7.9 0 .75.75 0 0 1-1.482-.236A5.507 5.507 0 0 1 3.102 8.05 3.493 3.493 0 0 1 2 5.5ZM11 4a3.001 3.001 0 0 1 2.22 5.018 5.01 5.01 0 0 1 2.56 3.012.749.749 0 0 1-.885.954.752.752 0 0 1-.549-.514 3.507 3.507 0 0 0-2.522-2.372.75.75 0 0 1-.574-.73v-.352a.75.75 0 0 1 .416-.672A1.5 1.5 0 0 0 11 5.5.75.75 0 0 1 11 4Zm-5.5-.5a2 2 0 1 0-.001 3.999A2 2 0 0 0 5.5 3.5Z"></path> </svg> </template> <template id="project-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project"> <path d="M1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0ZM1.5 1.75v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25ZM11.75 3a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-1.5 0v-7.5a.75.75 0 0 1 .75-.75Zm-8.25.75a.75.75 0 0 1 1.5 0v5.5a.75.75 0 0 1-1.5 0ZM8 3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 3Z"></path> </svg> </template> <template id="pencil-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-pencil"> <path d="M11.013 1.427a1.75 1.75 0 0 1 2.474 0l1.086 1.086a1.75 1.75 0 0 1 0 2.474l-8.61 8.61c-.21.21-.47.364-.756.445l-3.251.93a.75.75 0 0 1-.927-.928l.929-3.25c.081-.286.235-.547.445-.758l8.61-8.61Zm.176 4.823L9.75 4.81l-6.286 6.287a.253.253 0 0 0-.064.108l-.558 1.953 1.953-.558a.253.253 0 0 0 .108-.064Zm1.238-3.763a.25.25 0 0 0-.354 0L10.811 3.75l1.439 1.44 1.263-1.263a.25.25 0 0 0 0-.354Z"></path> </svg> </template> <template id="copilot-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copilot"> <path d="M7.998 15.035c-4.562 0-7.873-2.914-7.998-3.749V9.338c.085-.628.677-1.686 1.588-2.065.013-.07.024-.143.036-.218.029-.183.06-.384.126-.612-.201-.508-.254-1.084-.254-1.656 0-.87.128-1.769.693-2.484.579-.733 1.494-1.124 2.724-1.261 1.206-.134 2.262.034 2.944.765.05.053.096.108.139.165.044-.057.094-.112.143-.165.682-.731 1.738-.899 2.944-.765 1.23.137 2.145.528 2.724 1.261.566.715.693 1.614.693 2.484 0 .572-.053 1.148-.254 1.656.066.228.098.429.126.612.012.076.024.148.037.218.924.385 1.522 1.471 1.591 2.095v1.872c0 .766-3.351 3.795-8.002 3.795Zm0-1.485c2.28 0 4.584-1.11 5.002-1.433V7.862l-.023-.116c-.49.21-1.075.291-1.727.291-1.146 0-2.059-.327-2.71-.991A3.222 3.222 0 0 1 8 6.303a3.24 3.24 0 0 1-.544.743c-.65.664-1.563.991-2.71.991-.652 0-1.236-.081-1.727-.291l-.023.116v4.255c.419.323 2.722 1.433 5.002 1.433ZM6.762 2.83c-.193-.206-.637-.413-1.682-.297-1.019.113-1.479.404-1.713.7-.247.312-.369.789-.369 1.554 0 .793.129 1.171.308 1.371.162.181.519.379 1.442.379.853 0 1.339-.235 1.638-.54.315-.322.527-.827.617-1.553.117-.935-.037-1.395-.241-1.614Zm4.155-.297c-1.044-.116-1.488.091-1.681.297-.204.219-.359.679-.242 1.614.091.726.303 1.231.618 1.553.299.305.784.54 1.638.54.922 0 1.28-.198 1.442-.379.179-.2.308-.578.308-1.371 0-.765-.123-1.242-.37-1.554-.233-.296-.693-.587-1.713-.7Z"></path><path d="M6.25 9.037a.75.75 0 0 1 .75.75v1.501a.75.75 0 0 1-1.5 0V9.787a.75.75 0 0 1 .75-.75Zm4.25.75v1.501a.75.75 0 0 1-1.5 0V9.787a.75.75 0 0 1 1.5 0Z"></path> </svg> </template> <template id="copilot-error-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copilot-error"> <path d="M16 11.24c0 .112-.072.274-.21.467L13 9.688V7.862l-.023-.116c-.49.21-1.075.291-1.727.291-.198 0-.388-.009-.571-.029L6.833 5.226a4.01 4.01 0 0 0 .17-.782c.117-.935-.037-1.395-.241-1.614-.193-.206-.637-.413-1.682-.297-.683.076-1.115.231-1.395.415l-1.257-.91c.579-.564 1.413-.877 2.485-.996 1.206-.134 2.262.034 2.944.765.05.053.096.108.139.165.044-.057.094-.112.143-.165.682-.731 1.738-.899 2.944-.765 1.23.137 2.145.528 2.724 1.261.566.715.693 1.614.693 2.484 0 .572-.053 1.148-.254 1.656.066.228.098.429.126.612.012.076.024.148.037.218.924.385 1.522 1.471 1.591 2.095Zm-5.083-8.707c-1.044-.116-1.488.091-1.681.297-.204.219-.359.679-.242 1.614.091.726.303 1.231.618 1.553.299.305.784.54 1.638.54.922 0 1.28-.198 1.442-.379.179-.2.308-.578.308-1.371 0-.765-.123-1.242-.37-1.554-.233-.296-.693-.587-1.713-.7Zm2.511 11.074c-1.393.776-3.272 1.428-5.43 1.428-4.562 0-7.873-2.914-7.998-3.749V9.338c.085-.628.677-1.686 1.588-2.065.013-.07.024-.143.036-.218.029-.183.06-.384.126-.612-.18-.455-.241-.963-.252-1.475L.31 4.107A.747.747 0 0 1 0 3.509V3.49a.748.748 0 0 1 .625-.73c.156-.026.306.047.435.139l14.667 10.578a.592.592 0 0 1 .227.264.752.752 0 0 1 .046.249v.022a.75.75 0 0 1-1.19.596Zm-1.367-.991L5.635 7.964a5.128 5.128 0 0 1-.889.073c-.652 0-1.236-.081-1.727-.291l-.023.116v4.255c.419.323 2.722 1.433 5.002 1.433 1.539 0 3.089-.505 4.063-.934Z"></path> </svg> </template> <template id="workflow-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-workflow"> <path d="M0 1.75C0 .784.784 0 1.75 0h3.5C6.216 0 7 .784 7 1.75v3.5A1.75 1.75 0 0 1 5.25 7H4v4a1 1 0 0 0 1 1h4v-1.25C9 9.784 9.784 9 10.75 9h3.5c.966 0 1.75.784 1.75 1.75v3.5A1.75 1.75 0 0 1 14.25 16h-3.5A1.75 1.75 0 0 1 9 14.25v-.75H5A2.5 2.5 0 0 1 2.5 11V7h-.75A1.75 1.75 0 0 1 0 5.25Zm1.75-.25a.25.25 0 0 0-.25.25v3.5c0 .138.112.25.25.25h3.5a.25.25 0 0 0 .25-.25v-3.5a.25.25 0 0 0-.25-.25Zm9 9a.25.25 0 0 0-.25.25v3.5c0 .138.112.25.25.25h3.5a.25.25 0 0 0 .25-.25v-3.5a.25.25 0 0 0-.25-.25Z"></path> </svg> </template> <template id="book-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-book"> <path d="M0 1.75A.75.75 0 0 1 .75 1h4.253c1.227 0 2.317.59 3 1.501A3.743 3.743 0 0 1 11.006 1h4.245a.75.75 0 0 1 .75.75v10.5a.75.75 0 0 1-.75.75h-4.507a2.25 2.25 0 0 0-1.591.659l-.622.621a.75.75 0 0 1-1.06 0l-.622-.621A2.25 2.25 0 0 0 5.258 13H.75a.75.75 0 0 1-.75-.75Zm7.251 10.324.004-5.073-.002-2.253A2.25 2.25 0 0 0 5.003 2.5H1.5v9h3.757a3.75 3.75 0 0 1 1.994.574ZM8.755 4.75l-.004 7.322a3.752 3.752 0 0 1 1.992-.572H14.5v-9h-3.495a2.25 2.25 0 0 0-2.25 2.25Z"></path> </svg> </template> <template id="code-review-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-code-review"> <path d="M1.75 1h12.5c.966 0 1.75.784 1.75 1.75v8.5A1.75 1.75 0 0 1 14.25 13H8.061l-2.574 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25v-8.5C0 1.784.784 1 1.75 1ZM1.5 2.75v8.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-8.5a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25Zm5.28 1.72a.75.75 0 0 1 0 1.06L5.31 7l1.47 1.47a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018l-2-2a.75.75 0 0 1 0-1.06l2-2a.75.75 0 0 1 1.06 0Zm2.44 0a.75.75 0 0 1 1.06 0l2 2a.75.75 0 0 1 0 1.06l-2 2a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L10.69 7 9.22 5.53a.75.75 0 0 1 0-1.06Z"></path> </svg> </template> <template id="codespaces-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-codespaces"> <path d="M0 11.25c0-.966.784-1.75 1.75-1.75h12.5c.966 0 1.75.784 1.75 1.75v3A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25Zm2-9.5C2 .784 2.784 0 3.75 0h8.5C13.216 0 14 .784 14 1.75v5a1.75 1.75 0 0 1-1.75 1.75h-8.5A1.75 1.75 0 0 1 2 6.75Zm1.75-.25a.25.25 0 0 0-.25.25v5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-5a.25.25 0 0 0-.25-.25Zm-2 9.5a.25.25 0 0 0-.25.25v3c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25v-3a.25.25 0 0 0-.25-.25Z"></path><path d="M7 12.75a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75Zm-4 0a.75.75 0 0 1 .75-.75h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1-.75-.75Z"></path> </svg> </template> <template id="comment-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-comment"> <path d="M1 2.75C1 1.784 1.784 1 2.75 1h10.5c.966 0 1.75.784 1.75 1.75v7.5A1.75 1.75 0 0 1 13.25 12H9.06l-2.573 2.573A1.458 1.458 0 0 1 4 13.543V12H2.75A1.75 1.75 0 0 1 1 10.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h4.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path> </svg> </template> <template id="comment-discussion-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-comment-discussion"> <path d="M1.75 1h8.5c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 10.25 10H7.061l-2.574 2.573A1.458 1.458 0 0 1 2 11.543V10h-.25A1.75 1.75 0 0 1 0 8.25v-5.5C0 1.784.784 1 1.75 1ZM1.5 2.75v5.5c0 .138.112.25.25.25h1a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h3.5a.25.25 0 0 0 .25-.25v-5.5a.25.25 0 0 0-.25-.25h-8.5a.25.25 0 0 0-.25.25Zm13 2a.25.25 0 0 0-.25-.25h-.5a.75.75 0 0 1 0-1.5h.5c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 14.25 12H14v1.543a1.458 1.458 0 0 1-2.487 1.03L9.22 12.28a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215l2.22 2.22v-2.19a.75.75 0 0 1 .75-.75h1a.25.25 0 0 0 .25-.25Z"></path> </svg> </template> <template id="organization-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-organization"> <path d="M1.75 16A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0h8.5C11.216 0 12 .784 12 1.75v12.5c0 .085-.006.168-.018.25h2.268a.25.25 0 0 0 .25-.25V8.285a.25.25 0 0 0-.111-.208l-1.055-.703a.749.749 0 1 1 .832-1.248l1.055.703c.487.325.779.871.779 1.456v5.965A1.75 1.75 0 0 1 14.25 16h-3.5a.766.766 0 0 1-.197-.026c-.099.017-.2.026-.303.026h-3a.75.75 0 0 1-.75-.75V14h-1v1.25a.75.75 0 0 1-.75.75Zm-.25-1.75c0 .138.112.25.25.25H4v-1.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 .75.75v1.25h2.25a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25h-8.5a.25.25 0 0 0-.25.25ZM3.75 6h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1 0-1.5ZM3 3.75A.75.75 0 0 1 3.75 3h.5a.75.75 0 0 1 0 1.5h-.5A.75.75 0 0 1 3 3.75Zm4 3A.75.75 0 0 1 7.75 6h.5a.75.75 0 0 1 0 1.5h-.5A.75.75 0 0 1 7 6.75ZM7.75 3h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1 0-1.5ZM3 9.75A.75.75 0 0 1 3.75 9h.5a.75.75 0 0 1 0 1.5h-.5A.75.75 0 0 1 3 9.75ZM7.75 9h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1 0-1.5Z"></path> </svg> </template> <template id="rocket-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-rocket"> <path d="M14.064 0h.186C15.216 0 16 .784 16 1.75v.186a8.752 8.752 0 0 1-2.564 6.186l-.458.459c-.314.314-.641.616-.979.904v3.207c0 .608-.315 1.172-.833 1.49l-2.774 1.707a.749.749 0 0 1-1.11-.418l-.954-3.102a1.214 1.214 0 0 1-.145-.125L3.754 9.816a1.218 1.218 0 0 1-.124-.145L.528 8.717a.749.749 0 0 1-.418-1.11l1.71-2.774A1.748 1.748 0 0 1 3.31 4h3.204c.288-.338.59-.665.904-.979l.459-.458A8.749 8.749 0 0 1 14.064 0ZM8.938 3.623h-.002l-.458.458c-.76.76-1.437 1.598-2.02 2.5l-1.5 2.317 2.143 2.143 2.317-1.5c.902-.583 1.74-1.26 2.499-2.02l.459-.458a7.25 7.25 0 0 0 2.123-5.127V1.75a.25.25 0 0 0-.25-.25h-.186a7.249 7.249 0 0 0-5.125 2.123ZM3.56 14.56c-.732.732-2.334 1.045-3.005 1.148a.234.234 0 0 1-.201-.064.234.234 0 0 1-.064-.201c.103-.671.416-2.273 1.15-3.003a1.502 1.502 0 1 1 2.12 2.12Zm6.94-3.935c-.088.06-.177.118-.266.175l-2.35 1.521.548 1.783 1.949-1.2a.25.25 0 0 0 .119-.213ZM3.678 8.116 5.2 5.766c.058-.09.117-.178.176-.266H3.309a.25.25 0 0 0-.213.119l-1.2 1.95ZM12 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path> </svg> </template> <template id="shield-check-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-shield-check"> <path d="m8.533.133 5.25 1.68A1.75 1.75 0 0 1 15 3.48V7c0 1.566-.32 3.182-1.303 4.682-.983 1.498-2.585 2.813-5.032 3.855a1.697 1.697 0 0 1-1.33 0c-2.447-1.042-4.049-2.357-5.032-3.855C1.32 10.182 1 8.566 1 7V3.48a1.75 1.75 0 0 1 1.217-1.667l5.25-1.68a1.748 1.748 0 0 1 1.066 0Zm-.61 1.429.001.001-5.25 1.68a.251.251 0 0 0-.174.237V7c0 1.36.275 2.666 1.057 3.859.784 1.194 2.121 2.342 4.366 3.298a.196.196 0 0 0 .154 0c2.245-.957 3.582-2.103 4.366-3.297C13.225 9.666 13.5 8.358 13.5 7V3.48a.25.25 0 0 0-.174-.238l-5.25-1.68a.25.25 0 0 0-.153 0ZM11.28 6.28l-3.5 3.5a.75.75 0 0 1-1.06 0l-1.5-1.5a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215l.97.97 2.97-2.97a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path> </svg> </template> <template id="heart-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-heart"> <path d="m8 14.25.345.666a.75.75 0 0 1-.69 0l-.008-.004-.018-.01a7.152 7.152 0 0 1-.31-.17 22.055 22.055 0 0 1-3.434-2.414C2.045 10.731 0 8.35 0 5.5 0 2.836 2.086 1 4.25 1 5.797 1 7.153 1.802 8 3.02 8.847 1.802 10.203 1 11.75 1 13.914 1 16 2.836 16 5.5c0 2.85-2.045 5.231-3.885 6.818a22.066 22.066 0 0 1-3.744 2.584l-.018.01-.006.003h-.002ZM4.25 2.5c-1.336 0-2.75 1.164-2.75 3 0 2.15 1.58 4.144 3.365 5.682A20.58 20.58 0 0 0 8 13.393a20.58 20.58 0 0 0 3.135-2.211C12.92 9.644 14.5 7.65 14.5 5.5c0-1.836-1.414-3-2.75-3-1.373 0-2.609.986-3.029 2.456a.749.749 0 0 1-1.442 0C6.859 3.486 5.623 2.5 4.25 2.5Z"></path> </svg> </template> <template id="server-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-server"> <path d="M1.75 1h12.5c.966 0 1.75.784 1.75 1.75v4c0 .372-.116.717-.314 1 .198.283.314.628.314 1v4a1.75 1.75 0 0 1-1.75 1.75H1.75A1.75 1.75 0 0 1 0 12.75v-4c0-.358.109-.707.314-1a1.739 1.739 0 0 1-.314-1v-4C0 1.784.784 1 1.75 1ZM1.5 2.75v4c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25v-4a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25Zm.25 5.75a.25.25 0 0 0-.25.25v4c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25v-4a.25.25 0 0 0-.25-.25ZM7 4.75A.75.75 0 0 1 7.75 4h4.5a.75.75 0 0 1 0 1.5h-4.5A.75.75 0 0 1 7 4.75ZM7.75 10h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM3 4.75A.75.75 0 0 1 3.75 4h.5a.75.75 0 0 1 0 1.5h-.5A.75.75 0 0 1 3 4.75ZM3.75 10h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1 0-1.5Z"></path> </svg> </template> <template id="globe-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-globe"> <path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM5.78 8.75a9.64 9.64 0 0 0 1.363 4.177c.255.426.542.832.857 1.215.245-.296.551-.705.857-1.215A9.64 9.64 0 0 0 10.22 8.75Zm4.44-1.5a9.64 9.64 0 0 0-1.363-4.177c-.307-.51-.612-.919-.857-1.215a9.927 9.927 0 0 0-.857 1.215A9.64 9.64 0 0 0 5.78 7.25Zm-5.944 1.5H1.543a6.507 6.507 0 0 0 4.666 5.5c-.123-.181-.24-.365-.352-.552-.715-1.192-1.437-2.874-1.581-4.948Zm-2.733-1.5h2.733c.144-2.074.866-3.756 1.58-4.948.12-.197.237-.381.353-.552a6.507 6.507 0 0 0-4.666 5.5Zm10.181 1.5c-.144 2.074-.866 3.756-1.58 4.948-.12.197-.237.381-.353.552a6.507 6.507 0 0 0 4.666-5.5Zm2.733-1.5a6.507 6.507 0 0 0-4.666-5.5c.123.181.24.365.353.552.714 1.192 1.436 2.874 1.58 4.948Z"></path> </svg> </template> <template id="issue-opened-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-issue-opened"> <path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"></path> </svg> </template> <template id="device-mobile-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-device-mobile"> <path d="M3.75 0h8.5C13.216 0 14 .784 14 1.75v12.5A1.75 1.75 0 0 1 12.25 16h-8.5A1.75 1.75 0 0 1 2 14.25V1.75C2 .784 2.784 0 3.75 0ZM3.5 1.75v12.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25h-8.5a.25.25 0 0 0-.25.25ZM8 13a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path> </svg> </template> <template id="package-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-package"> <path d="m8.878.392 5.25 3.045c.54.314.872.89.872 1.514v6.098a1.75 1.75 0 0 1-.872 1.514l-5.25 3.045a1.75 1.75 0 0 1-1.756 0l-5.25-3.045A1.75 1.75 0 0 1 1 11.049V4.951c0-.624.332-1.201.872-1.514L7.122.392a1.75 1.75 0 0 1 1.756 0ZM7.875 1.69l-4.63 2.685L8 7.133l4.755-2.758-4.63-2.685a.248.248 0 0 0-.25 0ZM2.5 5.677v5.372c0 .09.047.171.125.216l4.625 2.683V8.432Zm6.25 8.271 4.625-2.683a.25.25 0 0 0 .125-.216V5.677L8.75 8.432Z"></path> </svg> </template> <template id="credit-card-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-credit-card"> <path d="M10.75 9a.75.75 0 0 0 0 1.5h1.5a.75.75 0 0 0 0-1.5h-1.5Z"></path><path d="M0 3.75C0 2.784.784 2 1.75 2h12.5c.966 0 1.75.784 1.75 1.75v8.5A1.75 1.75 0 0 1 14.25 14H1.75A1.75 1.75 0 0 1 0 12.25ZM14.5 6.5h-13v5.75c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25Zm0-2.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25V5h13Z"></path> </svg> </template> <template id="play-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-play"> <path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"></path> </svg> </template> <template id="gift-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-gift"> <path d="M2 2.75A2.75 2.75 0 0 1 4.75 0c.983 0 1.873.42 2.57 1.232.268.318.497.668.68 1.042.183-.375.411-.725.68-1.044C9.376.42 10.266 0 11.25 0a2.75 2.75 0 0 1 2.45 4h.55c.966 0 1.75.784 1.75 1.75v2c0 .698-.409 1.301-1 1.582v4.918A1.75 1.75 0 0 1 13.25 16H2.75A1.75 1.75 0 0 1 1 14.25V9.332C.409 9.05 0 8.448 0 7.75v-2C0 4.784.784 4 1.75 4h.55c-.192-.375-.3-.8-.3-1.25ZM7.25 9.5H2.5v4.75c0 .138.112.25.25.25h4.5Zm1.5 0v5h4.5a.25.25 0 0 0 .25-.25V9.5Zm0-4V8h5.5a.25.25 0 0 0 .25-.25v-2a.25.25 0 0 0-.25-.25Zm-7 0a.25.25 0 0 0-.25.25v2c0 .138.112.25.25.25h5.5V5.5h-5.5Zm3-4a1.25 1.25 0 0 0 0 2.5h2.309c-.233-.818-.542-1.401-.878-1.793-.43-.502-.915-.707-1.431-.707ZM8.941 4h2.309a1.25 1.25 0 0 0 0-2.5c-.516 0-1 .205-1.43.707-.337.392-.646.975-.879 1.793Z"></path> </svg> </template> <template id="code-square-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-code-square"> <path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25Zm7.47 3.97a.75.75 0 0 1 1.06 0l2 2a.75.75 0 0 1 0 1.06l-2 2a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L10.69 8 9.22 6.53a.75.75 0 0 1 0-1.06ZM6.78 6.53 5.31 8l1.47 1.47a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215l-2-2a.75.75 0 0 1 0-1.06l2-2a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path> </svg> </template> <template id="device-desktop-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-device-desktop"> <path d="M14.25 1c.966 0 1.75.784 1.75 1.75v7.5A1.75 1.75 0 0 1 14.25 12h-3.727c.099 1.041.52 1.872 1.292 2.757A.752.752 0 0 1 11.25 16h-6.5a.75.75 0 0 1-.565-1.243c.772-.885 1.192-1.716 1.292-2.757H1.75A1.75 1.75 0 0 1 0 10.25v-7.5C0 1.784.784 1 1.75 1ZM1.75 2.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25ZM9.018 12H6.982a5.72 5.72 0 0 1-.765 2.5h3.566a5.72 5.72 0 0 1-.765-2.5Z"></path> </svg> </template> <div class="position-relative"> <ul role="listbox" class="ActionListWrap QueryBuilder-ListWrap" aria-label="Suggestions" data-action=" combobox-commit:query-builder#comboboxCommit mousedown:query-builder#resultsMousedown " data-target="query-builder.resultsList" data-persist-list=false id="query-builder-test-results" ></ul> </div> <div class="FormControl-inlineValidation" id="validation-9e2b6f83-3c9e-40c5-a565-e6b440b65108" hidden="hidden"> <span class="FormControl-inlineValidation--visual"> <svg aria-hidden="true" height="12" viewBox="0 0 12 12" version="1.1" width="12" data-view-component="true" class="octicon octicon-alert-fill"> <path d="M4.855.708c.5-.896 1.79-.896 2.29 0l4.675 8.351a1.312 1.312 0 0 1-1.146 1.954H1.33A1.313 1.313 0 0 1 .183 9.058ZM7 7V3H5v4Zm-1 3a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"></path> </svg> </span> <span></span> </div> </div> <div data-target="query-builder.screenReaderFeedback" aria-live="polite" aria-atomic="true" class="sr-only"></div> </query-builder></form> <div class="d-flex flex-row color-fg-muted px-3 text-small color-bg-default search-feedback-prompt"> <a target="_blank" href="https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax" data-view-component="true" class="Link color-fg-accent text-normal ml-2">Search syntax tips</a> <div class="d-flex flex-1"></div> </div> </div> </div> </div> </modal-dialog></div> </div> <div data-action="click:qbsearch-input#retract" class="dark-backdrop position-fixed" hidden data-target="qbsearch-input.darkBackdrop"></div> <div class="color-fg-default"> <dialog-helper> <dialog data-target="qbsearch-input.feedbackDialog" data-action="close:qbsearch-input#handleDialogClose cancel:qbsearch-input#handleDialogClose" id="feedback-dialog" aria-modal="true" aria-labelledby="feedback-dialog-title" aria-describedby="feedback-dialog-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="feedback-dialog-title"> Provide feedback </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="feedback-dialog" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="feedback-dialog-title"> <div data-view-component="true" class="Overlay-body"> <!-- '"` --><!-- </textarea></xmp> --></option></form><form id="code-search-feedback-form" data-turbo="false" action="/search/feedback" accept-charset="UTF-8" method="post"><input type="hidden" data-csrf="true" name="authenticity_token" value="ThJVbZaJnbl/HcAJS2VdPZH9ZZ37dByu/WyD0ejGWewZADn9/kaXZrDrJsuWzrnTgmqwyDFa6L1ZG4iFiHFCvg==" /> <p>We read every piece of feedback, and take your input very seriously.</p> <textarea name="feedback" class="form-control width-full mb-2" style="height: 120px" id="feedback"></textarea> <input name="include_email" id="include_email" aria-label="Include my email address so I can be contacted" class="form-control mr-2" type="checkbox"> <label for="include_email" style="font-weight: normal">Include my email address so I can be contacted</label> </form></div> </scrollable-region> <div data-view-component="true" class="Overlay-footer Overlay-footer--alignEnd"> <button data-close-dialog-id="feedback-dialog" type="button" data-view-component="true" class="btn"> Cancel </button> <button form="code-search-feedback-form" data-action="click:qbsearch-input#submitFeedback" type="submit" data-view-component="true" class="btn-primary btn"> Submit feedback </button> </div> </dialog></dialog-helper> <custom-scopes data-target="qbsearch-input.customScopesManager"> <dialog-helper> <dialog data-target="custom-scopes.customScopesModalDialog" data-action="close:qbsearch-input#handleDialogClose cancel:qbsearch-input#handleDialogClose" id="custom-scopes-dialog" aria-modal="true" aria-labelledby="custom-scopes-dialog-title" aria-describedby="custom-scopes-dialog-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header Overlay-header--divided"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="custom-scopes-dialog-title"> Saved searches </h1> <h2 id="custom-scopes-dialog-description" class="Overlay-description">Use saved searches to filter your results more quickly</h2> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="custom-scopes-dialog" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="custom-scopes-dialog-title"> <div data-view-component="true" class="Overlay-body"> <div data-target="custom-scopes.customScopesModalDialogFlash"></div> <div hidden class="create-custom-scope-form" data-target="custom-scopes.createCustomScopeForm"> <!-- '"` --><!-- </textarea></xmp> --></option></form><form id="custom-scopes-dialog-form" data-turbo="false" action="/search/custom_scopes" accept-charset="UTF-8" method="post"><input type="hidden" data-csrf="true" name="authenticity_token" value="bBwt/NYqotG2QpHG4fa7Lp+xEZ63Z0V9vrQoyHWNxvXOEe6USMKGhF+qvtTV//KLRFMKGKA+0lmdpL1+VPB8+Q==" /> <div data-target="custom-scopes.customScopesModalDialogFlash"></div> <input type="hidden" id="custom_scope_id" name="custom_scope_id" data-target="custom-scopes.customScopesIdField"> <div class="form-group"> <label for="custom_scope_name">Name</label> <auto-check src="/search/custom_scopes/check_name" required only-validate-on-blur="false"> <input type="text" name="custom_scope_name" id="custom_scope_name" data-target="custom-scopes.customScopesNameField" class="form-control" autocomplete="off" placeholder="github-ruby" required maxlength="50"> <input type="hidden" data-csrf="true" value="4PKGwFC8v1JPIrW+AWV15DhtCVm6v7ouG2+EsOjjAzDGbuUnc497/w7Ho42XIAtcc3CIN8aW50eKVOwEuSZitA==" /> </auto-check> </div> <div class="form-group"> <label for="custom_scope_query">Query</label> <input type="text" name="custom_scope_query" id="custom_scope_query" data-target="custom-scopes.customScopesQueryField" class="form-control" autocomplete="off" placeholder="(repo:mona/a OR repo:mona/b) AND lang:python" required maxlength="500"> </div> <p class="text-small color-fg-muted"> To see all available qualifiers, see our <a class="Link--inTextBlock" href="https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax">documentation</a>. </p> </form> </div> <div data-target="custom-scopes.manageCustomScopesForm"> <div data-target="custom-scopes.list"></div> </div> </div> </scrollable-region> <div data-view-component="true" class="Overlay-footer Overlay-footer--alignEnd Overlay-footer--divided"> <button data-action="click:custom-scopes#customScopesCancel" type="button" data-view-component="true" class="btn"> Cancel </button> <button form="custom-scopes-dialog-form" data-action="click:custom-scopes#customScopesSubmit" data-target="custom-scopes.customScopesSubmitButton" type="submit" data-view-component="true" class="btn-primary btn"> Create saved search </button> </div> </dialog></dialog-helper> </custom-scopes> </div> </qbsearch-input> <div class="position-relative HeaderMenu-link-wrap d-lg-inline-block"> <a href="/login?return_to=https%3A%2F%2Fgithub.com%2Fbemporad%2Fjax-sysid" class="HeaderMenu-link HeaderMenu-link--sign-in HeaderMenu-button flex-shrink-0 no-underline d-none d-lg-inline-flex border border-lg-0 rounded rounded-lg-0 px-2 py-1" style="margin-left: 12px;" data-hydro-click="{"event_type":"authentication.click","payload":{"location_in_page":"site header menu","repository_id":null,"auth_type":"SIGN_UP","originating_url":"https://github.com/bemporad/jax-sysid","user_id":null}}" data-hydro-click-hmac="3334d9cd7c1de9fe369d43492b1465b6e274260ed279f8a8f4cf84471d0ce592" data-analytics-event="{"category":"Marketing nav","action":"click to go to homepage","label":"ref_page:Marketing;ref_cta:Sign in;ref_loc:Header"}" > Sign in </a> </div> <a href="/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E&source=header-repo&source_repo=bemporad%2Fjax-sysid" class="HeaderMenu-link HeaderMenu-link--sign-up HeaderMenu-button flex-shrink-0 d-flex d-lg-inline-flex no-underline border color-border-default rounded px-2 py-1" data-hydro-click="{"event_type":"authentication.click","payload":{"location_in_page":"site header menu","repository_id":null,"auth_type":"SIGN_UP","originating_url":"https://github.com/bemporad/jax-sysid","user_id":null}}" data-hydro-click-hmac="3334d9cd7c1de9fe369d43492b1465b6e274260ed279f8a8f4cf84471d0ce592" data-analytics-event="{"category":"Sign up","action":"click to sign up for account","label":"ref_page:/<user-name>/<repo-name>;ref_cta:Sign up;ref_loc:header logged out"}" > Sign up </a> <button type="button" class="sr-only js-header-menu-focus-trap d-block d-lg-none">Reseting focus</button> </div> </div> </div> </div> </header> <div hidden="hidden" data-view-component="true" class="js-stale-session-flash stale-session-flash flash flash-warn flash-full"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert"> <path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path> </svg> <span class="js-stale-session-flash-signed-in" hidden>You signed in with another tab or window. <a class="Link--inTextBlock" href="">Reload</a> to refresh your session.</span> <span class="js-stale-session-flash-signed-out" hidden>You signed out in another tab or window. <a class="Link--inTextBlock" href="">Reload</a> to refresh your session.</span> <span class="js-stale-session-flash-switched" hidden>You switched accounts on another tab or window. <a class="Link--inTextBlock" href="">Reload</a> to refresh your session.</span> <button id="icon-button-097f07f2-9b81-4026-8fe5-4bd59dc5c182" aria-labelledby="tooltip-13549401-c247-4903-b9a9-2f3b6278b9b6" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium flash-close js-flash-close"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x Button-visual"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg> </button><tool-tip id="tooltip-13549401-c247-4903-b9a9-2f3b6278b9b6" for="icon-button-097f07f2-9b81-4026-8fe5-4bd59dc5c182" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Dismiss alert</tool-tip> </div> </div> <div id="start-of-content" class="show-on-focus"></div> <div id="js-flash-container" class="flash-container" data-turbo-replace> <template class="js-flash-template"> <div class="flash flash-full {{ className }}"> <div > <button autofocus class="flash-close js-flash-close" type="button" aria-label="Dismiss this message"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg> </button> <div aria-atomic="true" role="alert" class="js-flash-alert"> <div>{{ message }}</div> </div> </div> </div> </template> </div> <div class="application-main " data-commit-hovercards-enabled data-discussion-hovercards-enabled data-issue-and-pr-hovercards-enabled data-project-hovercards-enabled > <div itemscope itemtype="http://schema.org/SoftwareSourceCode" class=""> <main id="js-repo-pjax-container" > <div id="repository-container-header" class="pt-3 hide-full-screen" style="background-color: var(--page-header-bgColor, var(--color-page-header-bg));" data-turbo-replace> <div class="d-flex flex-nowrap flex-justify-end mb-3 px-3 px-lg-5" style="gap: 1rem;"> <div class="flex-auto min-width-0 width-fit"> <div class=" d-flex flex-wrap flex-items-center wb-break-word f3 text-normal"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo color-fg-muted mr-2"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path> </svg> <span class="author flex-self-stretch" itemprop="author"> <a class="url fn" rel="author" data-hovercard-type="user" data-hovercard-url="/users/bemporad/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/bemporad"> bemporad </a> </span> <span class="mx-1 flex-self-stretch color-fg-muted">/</span> <strong itemprop="name" class="mr-2 flex-self-stretch"> <a data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" href="/bemporad/jax-sysid">jax-sysid</a> </strong> <span></span><span class="Label Label--secondary v-align-middle mr-1">Public</span> </div> </div> <div id="repository-details-container" class="flex-shrink-0" data-turbo-replace style="max-width: 70%;"> <ul class="pagehead-actions flex-shrink-0 d-none d-md-inline" style="padding: 2px 0;"> <li> <a href="/login?return_to=%2Fbemporad%2Fjax-sysid" rel="nofollow" id="repository-details-watch-button" data-hydro-click="{"event_type":"authentication.click","payload":{"location_in_page":"notification subscription menu watch","repository_id":null,"auth_type":"LOG_IN","originating_url":"https://github.com/bemporad/jax-sysid","user_id":null}}" data-hydro-click-hmac="9368d57a2c6203553cc2021a2910fb35131ce21d0e3d3120bc4305ab3932bd26" aria-label="You must be signed in to change notification settings" data-view-component="true" class="btn-sm btn"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-bell mr-2"> <path d="M8 16a2 2 0 0 0 1.985-1.75c.017-.137-.097-.25-.235-.25h-3.5c-.138 0-.252.113-.235.25A2 2 0 0 0 8 16ZM3 5a5 5 0 0 1 10 0v2.947c0 .05.015.098.042.139l1.703 2.555A1.519 1.519 0 0 1 13.482 13H2.518a1.516 1.516 0 0 1-1.263-2.36l1.703-2.554A.255.255 0 0 0 3 7.947Zm5-3.5A3.5 3.5 0 0 0 4.5 5v2.947c0 .346-.102.683-.294.97l-1.703 2.556a.017.017 0 0 0-.003.01l.001.006c0 .002.002.004.004.006l.006.004.007.001h10.964l.007-.001.006-.004.004-.006.001-.007a.017.017 0 0 0-.003-.01l-1.703-2.554a1.745 1.745 0 0 1-.294-.97V5A3.5 3.5 0 0 0 8 1.5Z"></path> </svg>Notifications </a> <tool-tip id="tooltip-89c4f065-f547-4e6f-9e21-da367ec2d22f" for="repository-details-watch-button" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be signed in to change notification settings</tool-tip> </li> <li> <a icon="repo-forked" id="fork-button" href="/login?return_to=%2Fbemporad%2Fjax-sysid" rel="nofollow" data-hydro-click="{"event_type":"authentication.click","payload":{"location_in_page":"repo details fork button","repository_id":768058898,"auth_type":"LOG_IN","originating_url":"https://github.com/bemporad/jax-sysid","user_id":null}}" data-hydro-click-hmac="9b0ffc75fadc430afdd541ee6278d84cb68dc93508661b7c43d44e07aea7521e" data-view-component="true" class="btn-sm btn"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo-forked mr-2"> <path d="M5 5.372v.878c0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75v-.878a2.25 2.25 0 1 1 1.5 0v.878a2.25 2.25 0 0 1-2.25 2.25h-1.5v2.128a2.251 2.251 0 1 1-1.5 0V8.5h-1.5A2.25 2.25 0 0 1 3.5 6.25v-.878a2.25 2.25 0 1 1 1.5 0ZM5 3.25a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Zm6.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm-3 8.75a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Z"></path> </svg>Fork <span id="repo-network-counter" data-pjax-replace="true" data-turbo-replace="true" title="6" data-view-component="true" class="Counter">6</span> </a> </li> <li> <div data-view-component="true" class="BtnGroup d-flex"> <a href="/login?return_to=%2Fbemporad%2Fjax-sysid" rel="nofollow" data-hydro-click="{"event_type":"authentication.click","payload":{"location_in_page":"star button","repository_id":768058898,"auth_type":"LOG_IN","originating_url":"https://github.com/bemporad/jax-sysid","user_id":null}}" data-hydro-click-hmac="ba4ac2022b945dff53dfa9303a4d0cbd2833b870978ac43aaef058e62b545b22" aria-label="You must be signed in to star a repository" data-view-component="true" class="tooltipped tooltipped-sw btn-sm btn"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-star v-align-text-bottom d-inline-block mr-2"> <path d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694Z"></path> </svg><span data-view-component="true" class="d-inline"> Star </span> <span id="repo-stars-counter-star" aria-label="26 users starred this repository" data-singular-suffix="user starred this repository" data-plural-suffix="users starred this repository" data-turbo-replace="true" title="26" data-view-component="true" class="Counter js-social-count">26</span> </a></div> </li> </ul> </div> </div> <div id="responsive-meta-container" data-turbo-replace> <div class="d-block d-md-none mb-2 px-3 px-md-4 px-lg-5"> <p class="f4 mb-3 "> A Python package for linear subspace identification, nonlinear system identification, and nonlinear regression using Jax </p> <h3 class="sr-only">License</h3> <div class="mb-2"> <a href="/bemporad/jax-sysid/blob/main/LICENSE.txt" class="Link--muted" data-analytics-event="{"category":"Repository Overview","action":"click","label":"location:sidebar;file:license"}" > <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-law mr-2"> <path d="M8.75.75V2h.985c.304 0 .603.08.867.231l1.29.736c.038.022.08.033.124.033h2.234a.75.75 0 0 1 0 1.5h-.427l2.111 4.692a.75.75 0 0 1-.154.838l-.53-.53.529.531-.001.002-.002.002-.006.006-.006.005-.01.01-.045.04c-.21.176-.441.327-.686.45C14.556 10.78 13.88 11 13 11a4.498 4.498 0 0 1-2.023-.454 3.544 3.544 0 0 1-.686-.45l-.045-.04-.016-.015-.006-.006-.004-.004v-.001a.75.75 0 0 1-.154-.838L12.178 4.5h-.162c-.305 0-.604-.079-.868-.231l-1.29-.736a.245.245 0 0 0-.124-.033H8.75V13h2.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1 0-1.5h2.5V3.5h-.984a.245.245 0 0 0-.124.033l-1.289.737c-.265.15-.564.23-.869.23h-.162l2.112 4.692a.75.75 0 0 1-.154.838l-.53-.53.529.531-.001.002-.002.002-.006.006-.016.015-.045.04c-.21.176-.441.327-.686.45C4.556 10.78 3.88 11 3 11a4.498 4.498 0 0 1-2.023-.454 3.544 3.544 0 0 1-.686-.45l-.045-.04-.016-.015-.006-.006-.004-.004v-.001a.75.75 0 0 1-.154-.838L2.178 4.5H1.75a.75.75 0 0 1 0-1.5h2.234a.249.249 0 0 0 .125-.033l1.288-.737c.265-.15.564-.23.869-.23h.984V.75a.75.75 0 0 1 1.5 0Zm2.945 8.477c.285.135.718.273 1.305.273s1.02-.138 1.305-.273L13 6.327Zm-10 0c.285.135.718.273 1.305.273s1.02-.138 1.305-.273L3 6.327Z"></path> </svg> Apache-2.0 license </a> </div> <div class="mb-3"> <a class="Link--secondary no-underline mr-3" href="/bemporad/jax-sysid/stargazers"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-star mr-1"> <path d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694Z"></path> </svg> <span class="text-bold">26</span> stars </a> <a class="Link--secondary no-underline mr-3" href="/bemporad/jax-sysid/forks"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo-forked mr-1"> <path d="M5 5.372v.878c0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75v-.878a2.25 2.25 0 1 1 1.5 0v.878a2.25 2.25 0 0 1-2.25 2.25h-1.5v2.128a2.251 2.251 0 1 1-1.5 0V8.5h-1.5A2.25 2.25 0 0 1 3.5 6.25v-.878a2.25 2.25 0 1 1 1.5 0ZM5 3.25a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Zm6.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm-3 8.75a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Z"></path> </svg> <span class="text-bold">6</span> forks </a> <a class="Link--secondary no-underline mr-3 d-inline-block" href="/bemporad/jax-sysid/branches"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-git-branch mr-1"> <path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"></path> </svg> <span>Branches</span> </a> <a class="Link--secondary no-underline d-inline-block" href="/bemporad/jax-sysid/tags"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-tag mr-1"> <path d="M1 7.775V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 0 1 0 2.474l-5.026 5.026a1.75 1.75 0 0 1-2.474 0l-6.25-6.25A1.752 1.752 0 0 1 1 7.775Zm1.5 0c0 .066.026.13.073.177l6.25 6.25a.25.25 0 0 0 .354 0l5.025-5.025a.25.25 0 0 0 0-.354l-6.25-6.25a.25.25 0 0 0-.177-.073H2.75a.25.25 0 0 0-.25.25ZM6 5a1 1 0 1 1 0 2 1 1 0 0 1 0-2Z"></path> </svg> <span>Tags</span> </a> <a class="Link--secondary no-underline d-inline-block" href="/bemporad/jax-sysid/activity"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-pulse mr-1"> <path d="M6 2c.306 0 .582.187.696.471L10 10.731l1.304-3.26A.751.751 0 0 1 12 7h3.25a.75.75 0 0 1 0 1.5h-2.742l-1.812 4.528a.751.751 0 0 1-1.392 0L6 4.77 4.696 8.03A.75.75 0 0 1 4 8.5H.75a.75.75 0 0 1 0-1.5h2.742l1.812-4.529A.751.751 0 0 1 6 2Z"></path> </svg> <span>Activity</span> </a> </div> <div class="d-flex flex-wrap gap-2"> <div class="flex-1"> <div data-view-component="true" class="BtnGroup d-flex"> <a href="/login?return_to=%2Fbemporad%2Fjax-sysid" rel="nofollow" data-hydro-click="{"event_type":"authentication.click","payload":{"location_in_page":"star button","repository_id":768058898,"auth_type":"LOG_IN","originating_url":"https://github.com/bemporad/jax-sysid","user_id":null}}" data-hydro-click-hmac="ba4ac2022b945dff53dfa9303a4d0cbd2833b870978ac43aaef058e62b545b22" aria-label="You must be signed in to star a repository" data-view-component="true" class="tooltipped tooltipped-sw btn-sm btn btn-block"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-star v-align-text-bottom d-inline-block mr-2"> <path d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694Z"></path> </svg><span data-view-component="true" class="d-inline"> Star </span> </a></div> </div> <div class="flex-1"> <a href="/login?return_to=%2Fbemporad%2Fjax-sysid" rel="nofollow" id="files-overview-watch-button" data-hydro-click="{"event_type":"authentication.click","payload":{"location_in_page":"notification subscription menu watch","repository_id":null,"auth_type":"LOG_IN","originating_url":"https://github.com/bemporad/jax-sysid","user_id":null}}" data-hydro-click-hmac="9368d57a2c6203553cc2021a2910fb35131ce21d0e3d3120bc4305ab3932bd26" aria-label="You must be signed in to change notification settings" data-view-component="true" class="btn-sm btn btn-block"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-bell mr-2"> <path d="M8 16a2 2 0 0 0 1.985-1.75c.017-.137-.097-.25-.235-.25h-3.5c-.138 0-.252.113-.235.25A2 2 0 0 0 8 16ZM3 5a5 5 0 0 1 10 0v2.947c0 .05.015.098.042.139l1.703 2.555A1.519 1.519 0 0 1 13.482 13H2.518a1.516 1.516 0 0 1-1.263-2.36l1.703-2.554A.255.255 0 0 0 3 7.947Zm5-3.5A3.5 3.5 0 0 0 4.5 5v2.947c0 .346-.102.683-.294.97l-1.703 2.556a.017.017 0 0 0-.003.01l.001.006c0 .002.002.004.004.006l.006.004.007.001h10.964l.007-.001.006-.004.004-.006.001-.007a.017.017 0 0 0-.003-.01l-1.703-2.554a1.745 1.745 0 0 1-.294-.97V5A3.5 3.5 0 0 0 8 1.5Z"></path> </svg>Notifications </a> <tool-tip id="tooltip-3f6e3735-43e1-4490-b046-26501cd5ce29" for="files-overview-watch-button" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be signed in to change notification settings</tool-tip> </div> <span> </span> </div> </div> </div> <nav data-pjax="#js-repo-pjax-container" aria-label="Repository" data-view-component="true" class="js-repo-nav js-sidenav-container-pjax js-responsive-underlinenav overflow-hidden UnderlineNav px-3 px-md-4 px-lg-5"> <ul data-view-component="true" class="UnderlineNav-body list-style-none"> <li data-view-component="true" class="d-inline-flex"> <a id="code-tab" href="/bemporad/jax-sysid" data-tab-item="i0code-tab" data-selected-links="repo_source repo_downloads repo_commits repo_releases repo_tags repo_branches repo_packages repo_deployments repo_attestations /bemporad/jax-sysid" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-hotkey="g c" data-analytics-event="{"category":"Underline navbar","action":"Click tab","label":"Code","target":"UNDERLINE_NAV.TAB"}" aria-current="page" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item selected"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-code UnderlineNav-octicon d-none d-sm-inline"> <path d="m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L.47 8.53a.75.75 0 0 1 0-1.06Z"></path> </svg> <span data-content="Code">Code</span> <span id="code-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="Not available" data-view-component="true" class="Counter"></span> </a></li> <li data-view-component="true" class="d-inline-flex"> <a id="issues-tab" href="/bemporad/jax-sysid/issues" data-tab-item="i1issues-tab" data-selected-links="repo_issues repo_labels repo_milestones /bemporad/jax-sysid/issues" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-hotkey="g i" data-analytics-event="{"category":"Underline navbar","action":"Click tab","label":"Issues","target":"UNDERLINE_NAV.TAB"}" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-issue-opened UnderlineNav-octicon d-none d-sm-inline"> <path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"></path> </svg> <span data-content="Issues">Issues</span> <span id="issues-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="0" hidden="hidden" data-view-component="true" class="Counter">0</span> </a></li> <li data-view-component="true" class="d-inline-flex"> <a id="pull-requests-tab" href="/bemporad/jax-sysid/pulls" data-tab-item="i2pull-requests-tab" data-selected-links="repo_pulls checks /bemporad/jax-sysid/pulls" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-hotkey="g p" data-analytics-event="{"category":"Underline navbar","action":"Click tab","label":"Pull requests","target":"UNDERLINE_NAV.TAB"}" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-git-pull-request UnderlineNav-octicon d-none d-sm-inline"> <path d="M1.5 3.25a2.25 2.25 0 1 1 3 2.122v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.25 2.25 0 0 1 1.5 3.25Zm5.677-.177L9.573.677A.25.25 0 0 1 10 .854V2.5h1A2.5 2.5 0 0 1 13.5 5v5.628a2.251 2.251 0 1 1-1.5 0V5a1 1 0 0 0-1-1h-1v1.646a.25.25 0 0 1-.427.177L7.177 3.427a.25.25 0 0 1 0-.354ZM3.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm0 9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm8.25.75a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Z"></path> </svg> <span data-content="Pull requests">Pull requests</span> <span id="pull-requests-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="0" hidden="hidden" data-view-component="true" class="Counter">0</span> </a></li> <li data-view-component="true" class="d-inline-flex"> <a id="actions-tab" href="/bemporad/jax-sysid/actions" data-tab-item="i3actions-tab" data-selected-links="repo_actions /bemporad/jax-sysid/actions" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-hotkey="g a" data-analytics-event="{"category":"Underline navbar","action":"Click tab","label":"Actions","target":"UNDERLINE_NAV.TAB"}" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-play UnderlineNav-octicon d-none d-sm-inline"> <path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"></path> </svg> <span data-content="Actions">Actions</span> <span id="actions-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="Not available" data-view-component="true" class="Counter"></span> </a></li> <li data-view-component="true" class="d-inline-flex"> <a id="projects-tab" href="/bemporad/jax-sysid/projects" data-tab-item="i4projects-tab" data-selected-links="repo_projects new_repo_project repo_project /bemporad/jax-sysid/projects" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-hotkey="g b" data-analytics-event="{"category":"Underline navbar","action":"Click tab","label":"Projects","target":"UNDERLINE_NAV.TAB"}" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-table UnderlineNav-octicon d-none d-sm-inline"> <path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25ZM6.5 6.5v8h7.75a.25.25 0 0 0 .25-.25V6.5Zm8-1.5V1.75a.25.25 0 0 0-.25-.25H6.5V5Zm-13 1.5v7.75c0 .138.112.25.25.25H5v-8ZM5 5V1.5H1.75a.25.25 0 0 0-.25.25V5Z"></path> </svg> <span data-content="Projects">Projects</span> <span id="projects-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="0" hidden="hidden" data-view-component="true" class="Counter">0</span> </a></li> <li data-view-component="true" class="d-inline-flex"> <a id="security-tab" href="/bemporad/jax-sysid/security" data-tab-item="i5security-tab" data-selected-links="security overview alerts policy token_scanning code_scanning /bemporad/jax-sysid/security" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-hotkey="g s" data-analytics-event="{"category":"Underline navbar","action":"Click tab","label":"Security","target":"UNDERLINE_NAV.TAB"}" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-shield UnderlineNav-octicon d-none d-sm-inline"> <path d="M7.467.133a1.748 1.748 0 0 1 1.066 0l5.25 1.68A1.75 1.75 0 0 1 15 3.48V7c0 1.566-.32 3.182-1.303 4.682-.983 1.498-2.585 2.813-5.032 3.855a1.697 1.697 0 0 1-1.33 0c-2.447-1.042-4.049-2.357-5.032-3.855C1.32 10.182 1 8.566 1 7V3.48a1.75 1.75 0 0 1 1.217-1.667Zm.61 1.429a.25.25 0 0 0-.153 0l-5.25 1.68a.25.25 0 0 0-.174.238V7c0 1.358.275 2.666 1.057 3.86.784 1.194 2.121 2.34 4.366 3.297a.196.196 0 0 0 .154 0c2.245-.956 3.582-2.104 4.366-3.298C13.225 9.666 13.5 8.36 13.5 7V3.48a.251.251 0 0 0-.174-.237l-5.25-1.68ZM8.75 4.75v3a.75.75 0 0 1-1.5 0v-3a.75.75 0 0 1 1.5 0ZM9 10.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path> </svg> <span data-content="Security">Security</span> <include-fragment src="/bemporad/jax-sysid/security/overall-count" accept="text/fragment+html"></include-fragment> </a></li> <li data-view-component="true" class="d-inline-flex"> <a id="insights-tab" href="/bemporad/jax-sysid/pulse" data-tab-item="i6insights-tab" data-selected-links="repo_graphs repo_contributors dependency_graph dependabot_updates pulse people community /bemporad/jax-sysid/pulse" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-analytics-event="{"category":"Underline navbar","action":"Click tab","label":"Insights","target":"UNDERLINE_NAV.TAB"}" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-graph UnderlineNav-octicon d-none d-sm-inline"> <path d="M1.5 1.75V13.5h13.75a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1-.75-.75V1.75a.75.75 0 0 1 1.5 0Zm14.28 2.53-5.25 5.25a.75.75 0 0 1-1.06 0L7 7.06 4.28 9.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.25-3.25a.75.75 0 0 1 1.06 0L10 7.94l4.72-4.72a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path> </svg> <span data-content="Insights">Insights</span> <span id="insights-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="Not available" data-view-component="true" class="Counter"></span> </a></li> </ul> <div style="visibility:hidden;" data-view-component="true" class="UnderlineNav-actions js-responsive-underlinenav-overflow position-absolute pr-3 pr-md-4 pr-lg-5 right-0"> <action-menu data-select-variant="none" data-view-component="true"> <focus-group direction="vertical" mnemonics retain> <button id="action-menu-9c36c022-388f-4396-91ad-a415fec2d98c-button" popovertarget="action-menu-9c36c022-388f-4396-91ad-a415fec2d98c-overlay" aria-controls="action-menu-9c36c022-388f-4396-91ad-a415fec2d98c-list" aria-haspopup="true" aria-labelledby="tooltip-f23f14ba-b14b-494c-9c1f-1774212a6307" type="button" data-view-component="true" class="Button Button--iconOnly Button--secondary Button--medium UnderlineNav-item"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-f23f14ba-b14b-494c-9c1f-1774212a6307" for="action-menu-9c36c022-388f-4396-91ad-a415fec2d98c-button" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Additional navigation options</tool-tip> <anchored-position data-target="action-menu.overlay" id="action-menu-9c36c022-388f-4396-91ad-a415fec2d98c-overlay" anchor="action-menu-9c36c022-388f-4396-91ad-a415fec2d98c-button" align="start" side="outside-bottom" anchor-offset="normal" popover="auto" data-view-component="true"> <div data-view-component="true" class="Overlay Overlay--size-auto"> <div data-view-component="true" class="Overlay-body Overlay-body--paddingNone"> <action-list> <div data-view-component="true"> <ul aria-labelledby="action-menu-9c36c022-388f-4396-91ad-a415fec2d98c-button" id="action-menu-9c36c022-388f-4396-91ad-a415fec2d98c-list" role="menu" data-view-component="true" class="ActionListWrap--inset ActionListWrap"> <li hidden="hidden" data-menu-item="i0code-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <a tabindex="-1" id="item-74c46583-6a0b-4881-b9f1-6f127c0ab886" href="/bemporad/jax-sysid" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-code"> <path d="m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L.47 8.53a.75.75 0 0 1 0-1.06Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Code </span> </a> </li> <li hidden="hidden" data-menu-item="i1issues-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <a tabindex="-1" id="item-87cab9ca-c7c0-4f84-b8b9-4e260b9363dd" href="/bemporad/jax-sysid/issues" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-issue-opened"> <path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Issues </span> </a> </li> <li hidden="hidden" data-menu-item="i2pull-requests-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <a tabindex="-1" id="item-a0abf657-0df3-4359-a665-eb128492aa44" href="/bemporad/jax-sysid/pulls" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-git-pull-request"> <path d="M1.5 3.25a2.25 2.25 0 1 1 3 2.122v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.25 2.25 0 0 1 1.5 3.25Zm5.677-.177L9.573.677A.25.25 0 0 1 10 .854V2.5h1A2.5 2.5 0 0 1 13.5 5v5.628a2.251 2.251 0 1 1-1.5 0V5a1 1 0 0 0-1-1h-1v1.646a.25.25 0 0 1-.427.177L7.177 3.427a.25.25 0 0 1 0-.354ZM3.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm0 9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm8.25.75a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Pull requests </span> </a> </li> <li hidden="hidden" data-menu-item="i3actions-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <a tabindex="-1" id="item-59fb5fe5-2546-4a4f-9be0-177e1dc7feff" href="/bemporad/jax-sysid/actions" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-play"> <path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Actions </span> </a> </li> <li hidden="hidden" data-menu-item="i4projects-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <a tabindex="-1" id="item-0dbd4ab5-62b4-474c-9b25-9deeb5e95396" href="/bemporad/jax-sysid/projects" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-table"> <path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25ZM6.5 6.5v8h7.75a.25.25 0 0 0 .25-.25V6.5Zm8-1.5V1.75a.25.25 0 0 0-.25-.25H6.5V5Zm-13 1.5v7.75c0 .138.112.25.25.25H5v-8ZM5 5V1.5H1.75a.25.25 0 0 0-.25.25V5Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Projects </span> </a> </li> <li hidden="hidden" data-menu-item="i5security-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <a tabindex="-1" id="item-65906433-3af6-4217-9c4f-c3d3ae44bd6a" href="/bemporad/jax-sysid/security" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-shield"> <path d="M7.467.133a1.748 1.748 0 0 1 1.066 0l5.25 1.68A1.75 1.75 0 0 1 15 3.48V7c0 1.566-.32 3.182-1.303 4.682-.983 1.498-2.585 2.813-5.032 3.855a1.697 1.697 0 0 1-1.33 0c-2.447-1.042-4.049-2.357-5.032-3.855C1.32 10.182 1 8.566 1 7V3.48a1.75 1.75 0 0 1 1.217-1.667Zm.61 1.429a.25.25 0 0 0-.153 0l-5.25 1.68a.25.25 0 0 0-.174.238V7c0 1.358.275 2.666 1.057 3.86.784 1.194 2.121 2.34 4.366 3.297a.196.196 0 0 0 .154 0c2.245-.956 3.582-2.104 4.366-3.298C13.225 9.666 13.5 8.36 13.5 7V3.48a.251.251 0 0 0-.174-.237l-5.25-1.68ZM8.75 4.75v3a.75.75 0 0 1-1.5 0v-3a.75.75 0 0 1 1.5 0ZM9 10.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Security </span> </a> </li> <li hidden="hidden" data-menu-item="i6insights-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <a tabindex="-1" id="item-53836307-536b-472f-8d9a-04dac0bd48ab" href="/bemporad/jax-sysid/pulse" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-graph"> <path d="M1.5 1.75V13.5h13.75a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1-.75-.75V1.75a.75.75 0 0 1 1.5 0Zm14.28 2.53-5.25 5.25a.75.75 0 0 1-1.06 0L7 7.06 4.28 9.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.25-3.25a.75.75 0 0 1 1.06 0L10 7.94l4.72-4.72a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Insights </span> </a> </li> </ul> </div></action-list> </div> </div></anchored-position> </focus-group> </action-menu></div> </nav> </div> <turbo-frame id="repo-content-turbo-frame" target="_top" data-turbo-action="advance" class=""> <div id="repo-content-pjax-container" class="repository-content " > <h1 class='sr-only'>bemporad/jax-sysid</h1> <div class="clearfix container-xl px-md-4 px-lg-5 px-3"> <div> <div style="max-width: 100%" data-view-component="true" class="Layout Layout--flowRow-until-md react-repos-overview-margin Layout--sidebarPosition-end Layout--sidebarPosition-flowRow-end"> <div data-view-component="true" class="Layout-main"> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_dompurify_dist_purify_js-b89b98661809.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_tanstack_query-core_build_modern_queryObserver_js-node_modules_tanstack_-defd52-843b41414e0e.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_hydro-analytics-client_dist_analytics-client_js-node_modules_gith-853b24-f2006d2a5b98.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_aria-live_aria-live_ts-ui_packages_promise-with-resolvers-polyfill_promise-with-r-17c672-d6b5ea82572a.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_paths_index_ts-c47b35ea29c3.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_ref-selector_RefSelector_tsx-7496afc3784d.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_code-view-shared_hooks_use-canonical-object_ts-ui_packages_code-view-shared_hooks-a6859a-51fe787d3cdc.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/repos-overview-929073bff703.js"></script> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-react.e159a7f290fa5e4dd43e.module.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/repos-overview.32a87dc4587d56dcf1eb.module.css" /> <react-partial partial-name="repos-overview" data-ssr="true" data-attempted-ssr="true" > <script type="application/json" data-target="react-partial.embeddedData">{"props":{"initialPayload":{"allShortcutsEnabled":false,"path":"/","repo":{"id":768058898,"defaultBranch":"main","name":"jax-sysid","ownerLogin":"bemporad","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2024-03-06T11:50:42.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/24486423?v=4","public":true,"private":false,"isOrgOwned":false},"currentUser":null,"refInfo":{"name":"main","listCacheKey":"v0:1709744900.0","canEdit":false,"refType":"branch","currentOid":"721867d5c51b82fb3be8a08a3f95b1edfe456973"},"tree":{"items":[{"name":"examples","path":"examples","contentType":"directory"},{"name":"src","path":"src","contentType":"directory"},{"name":"tests","path":"tests","contentType":"directory"},{"name":".DS_Store","path":".DS_Store","contentType":"file"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":"LICENSE.txt","path":"LICENSE.txt","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"pyproject.toml","path":"pyproject.toml","contentType":"file"}],"templateDirectorySuggestionUrl":null,"readme":null,"totalCount":8,"showBranchInfobar":false},"fileTree":null,"fileTreeProcessingTime":null,"foldersToFetch":[],"treeExpanded":false,"symbolsExpanded":false,"isOverview":true,"overview":{"banners":{"shouldRecommendReadme":false,"isPersonalRepo":false,"showUseActionBanner":false,"actionSlug":null,"actionId":null,"showProtectBranchBanner":false,"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_repo","releasePath":"/bemporad/jax-sysid/releases/new?marketplace=true","showPublishActionBanner":false},"interactionLimitBanner":null,"showInvitationBanner":false,"inviterName":null,"actionsMigrationBannerInfo":{"releaseTags":[],"showImmutableActionsMigrationBanner":false,"initialMigrationStatus":null}},"codeButton":{"contactPath":"/contact","isEnterprise":false,"local":{"protocolInfo":{"httpAvailable":true,"sshAvailable":null,"httpUrl":"https://github.com/bemporad/jax-sysid.git","showCloneWarning":null,"sshUrl":null,"sshCertificatesRequired":null,"sshCertificatesAvailable":null,"ghCliUrl":"gh repo clone bemporad/jax-sysid","defaultProtocol":"http","newSshKeyUrl":"/settings/ssh/new","setProtocolPath":"/users/set_protocol"},"platformInfo":{"cloneUrl":"https://desktop.github.com","showVisualStudioCloneButton":false,"visualStudioCloneUrl":"https://windows.github.com","showXcodeCloneButton":false,"xcodeCloneUrl":"xcode://clone?repo=https%3A%2F%2Fgithub.com%2Fbemporad%2Fjax-sysid","zipballUrl":"/bemporad/jax-sysid/archive/refs/heads/main.zip"}},"newCodespacePath":"/codespaces/new?hide_repo_select=true\u0026repo=768058898"},"popovers":{"rename":null,"renamedParentRepo":null},"commitCount":"42","overviewFiles":[{"displayName":"README.md","repoName":"jax-sysid","refName":"main","path":"README.md","preferredFileType":"readme","tabName":"README","richText":"\u003carticle class=\"markdown-body entry-content container-lg\" itemprop=\"text\"\u003e\u003cp dir=\"auto\"\u003e\u003ca target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https://camo.githubusercontent.com/c58a6223c4fb4ca5f02f0918a33916e5e1e56c160b9979810a99d4ddf410912e/687474703a2f2f6373652e6c61622e696d746c756363612e69742f7e62656d706f7261642f6a61782d73797369642f696d616765732f6a61782d73797369642d6c6f676f2e706e67\"\u003e\u003cimg src=\"https://camo.githubusercontent.com/c58a6223c4fb4ca5f02f0918a33916e5e1e56c160b9979810a99d4ddf410912e/687474703a2f2f6373652e6c61622e696d746c756363612e69742f7e62656d706f7261642f6a61782d73797369642f696d616765732f6a61782d73797369642d6c6f676f2e706e67\" alt=\"jax-sysid\" width=\"40%/\" data-canonical-src=\"http://cse.lab.imtlucca.it/~bemporad/jax-sysid/images/jax-sysid-logo.png\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eA Python package based on \u003ca href=\"https://jax.readthedocs.io\" rel=\"nofollow\"\u003e JAX \u003c/a\u003e for linear and nonlinear system identification of state-space models, recurrent neural network (RNN) training, and nonlinear regression/classification.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch1 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eContents\u003c/h1\u003e\u003ca id=\"user-content-contents\" class=\"anchor\" aria-label=\"Permalink: Contents\" href=\"#contents\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003ca href=\"#contents\"\u003eContents\u003c/a\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003ca href=\"#package-description\"\u003ePackage description\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#basic-usage\"\u003eBasic usage\u003c/a\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003ca href=\"#linear-state-space-models\"\u003eLinear state-space models\u003c/a\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003ca href=\"#training-linear-models\"\u003eTraining linear models\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#l1--and-group-lasso-regularization\"\u003eL1- and group-Lasso regularization\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#multiple-experiments\"\u003eMultiple experiments\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#stability\"\u003eStability\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#static-gain\"\u003eStatic gain\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#nonlinear-system-identification-and-rnns\"\u003eNonlinear system identification and RNNs\u003c/a\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003ca href=\"#training-nonlinear-models\"\u003eTraining nonlinear models\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#parallel-training\"\u003eParallel training\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#flaxlinen-models\"\u003eflax.linen models\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#custom-output-loss\"\u003eCustom output loss\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#custom-regularization\"\u003eCustom regularization\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#static-gain-1\"\u003eStatic gain\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#upper-and-lower-bounds\"\u003eUpper and lower bounds\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#linear-parameter-varying-lpv-models\"\u003eLinear Parameter-Varying (LPV) models\u003c/a\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003ca href=\"#training-lpv-models\"\u003eTraining LPV models\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#continuous-time-models\"\u003eContinuous-time models\u003c/a\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003ca href=\"#training-continuous-time-models\"\u003eTraining continuous-time models\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#static-models\"\u003eStatic models\u003c/a\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003ca href=\"#nonlinear-regression\"\u003eNonlinear regression\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#classification\"\u003eClassification\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#contributors\"\u003eContributors\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#acknowledgments\"\u003eAcknowledgments\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#citing-jax-sysid\"\u003eCiting jax-sysid\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp dir=\"auto\"\u003e\u003ca name=\"user-content-description\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003ePackage description\u003c/h2\u003e\u003ca id=\"user-content-package-description\" class=\"anchor\" aria-label=\"Permalink: Package description\" href=\"#package-description\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003ejax-sysid\u003c/strong\u003e is a Python package based on \u003ca href=\"https://jax.readthedocs.io\" rel=\"nofollow\"\u003e JAX \u003c/a\u003e for linear and nonlinear system identification of state-space models, recurrent neural network (RNN) training, and nonlinear regression/classification. The algorithm can handle L1-regularization and group-Lasso regularization and relies on L-BFGS optimization for accurate modeling, fast convergence, and good sparsification of model coefficients.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThe package implements the approach described in the following paper:\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003ca name=\"user-content-cite-bem24\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp dir=\"auto\"\u003e[1] A. Bemporad, \"\u003ca href=\"http://arxiv.org/abs/2403.03827\" rel=\"nofollow\"\u003eLinear and nonlinear system identification under $\\ell_1$- and group-Lasso regularization via L-BFGS-B\u003c/a\u003e,\" submitted for publication. Available on arXiv at \u003ca href=\"http://arxiv.org/abs/2403.03827\" rel=\"nofollow\"\u003e\n\u003c/a\u003e\u003ca href=\"http://arxiv.org/abs/2403.03827\" rel=\"nofollow\"\u003ehttp://arxiv.org/abs/2403.03827\u003c/a\u003e, 2024. [\u003ca href=\"#ref1\"\u003ebib entry\u003c/a\u003e]\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp dir=\"auto\"\u003e\u003ca name=\"user-content-install\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eInstallation\u003c/h2\u003e\u003ca id=\"user-content-installation\" class=\"anchor\" aria-label=\"Permalink: Installation\" href=\"#installation\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"pip install jax-sysid\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003epip\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003einstall\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ejax\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e-\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003esysid\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003eNote\u003c/strong\u003e: currently, \u003ccode\u003ejax_sysid\u003c/code\u003e forces installing \u003ccode\u003ejax==0.4.31\u003c/code\u003e. This is due to the considerable slower performance of later versions of \u003ccode\u003ejax\u003c/code\u003e in training recurrent models. If you need to use later versions of \u003ccode\u003ejax\u003c/code\u003e, you must set the environment variable \u003ccode\u003eXLA_FLAGS=--xla_cpu_use_thunk_runtime=false\u003c/code\u003e to recover a similar performance.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003ca name=\"user-content-basic-usage\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eBasic usage\u003c/h2\u003e\u003ca id=\"user-content-basic-usage\" class=\"anchor\" aria-label=\"Permalink: Basic usage\" href=\"#basic-usage\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e\u003ca name=\"user-content-linear\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eLinear state-space models\u003c/h3\u003e\u003ca id=\"user-content-linear-state-space-models\" class=\"anchor\" aria-label=\"Permalink: Linear state-space models\" href=\"#linear-state-space-models\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch4 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eTraining linear models\u003c/h4\u003e\u003ca id=\"user-content-training-linear-models\" class=\"anchor\" aria-label=\"Permalink: Training linear models\" href=\"#training-linear-models\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eGiven input/output training data \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$(u_0,y_0)$\u003c/math-renderer\u003e, \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$\\ldots$\u003c/math-renderer\u003e, \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$(u_{N-1},y_{N-1})$\u003c/math-renderer\u003e, \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$u_k\\in R^{n_u}$\u003c/math-renderer\u003e, \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$y_k\\in R^{n_y}$\u003c/math-renderer\u003e, we want to identify a state-space model in the following form\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003cmath-renderer class=\"js-display-math\" style=\"display: block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$$ x_{k+1}=Ax_k+Bu_k$$\u003c/math-renderer\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003cmath-renderer class=\"js-display-math\" style=\"display: block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$$ \\hat y_k=Cx_k+Du_k $$\u003c/math-renderer\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003ewhere \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$k$\u003c/math-renderer\u003e denotes the sample instant, \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$x_k\\in R^{n_x}$\u003c/math-renderer\u003e is the vector of hidden states, and\n\u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$A,B,C,D$\u003c/math-renderer\u003e are matrices of appropriate dimensions to be learned.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThe training problem to solve is\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003cmath-renderer class=\"js-display-math\" style=\"display: block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$$\\min_{z}r(z)+\\frac{1}{N}\\sum_{k=0}^{N-1} |y_{k}-Cx_k-Du_k|_2^2$$\u003c/math-renderer\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003cmath-renderer class=\"js-display-math\" style=\"display: block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$$\\textrm{s.t.}\\ x_{k+1}=Ax_k+Bu_k, \\ k=0,\\ldots,N-2$$\u003c/math-renderer\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003ewhere \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$z=(\\theta,x_0)$\u003c/math-renderer\u003e and \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$\\theta$\u003c/math-renderer\u003e collecting the entries of \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$A,B,C,D$\u003c/math-renderer\u003e.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThe regularization term \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$r(z)$\u003c/math-renderer\u003e includes the following components:\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003cmath-renderer class=\"js-display-math\" style=\"display: block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$$\\rho_{\\theta} |\\theta|_2^2 $$\u003c/math-renderer\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003cmath-renderer class=\"js-display-math\" style=\"display: block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$$\\rho_{x_0} |x_0|_2^2$$\u003c/math-renderer\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003cmath-renderer class=\"js-display-math\" style=\"display: block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$$\\tau \\left|z\\right|_1$$\u003c/math-renderer\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003cmath-renderer class=\"js-display-math\" style=\"display: block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$$\\tau_g\\sum_{i=1}^{n_u} |I_iz|_2$$\u003c/math-renderer\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003ewith \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$\\rho_\\theta\u0026amp;gt;0$\u003c/math-renderer\u003e, \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$\\rho_{x_0}\u0026amp;gt;0$\u003c/math-renderer\u003e, \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$\\tau\\geq 0$\u003c/math-renderer\u003e, \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$\\tau_g\\geq 0$\u003c/math-renderer\u003e. See examples below.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eLet's start training a discrete-time linear model \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$(A,B,C,D)$\u003c/math-renderer\u003e on a sequence of inputs \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$U=[u_0\\ \\ldots\\ u_{N-1}]'$\u003c/math-renderer\u003e and output \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$Y=[y_0\\ \\ldots\\ y_{N-1}]'$\u003c/math-renderer\u003e, with regularization \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$\\rho_\\theta=10^{-2}$\u003c/math-renderer\u003e, \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$\\rho_{x_0}=10^{-3}$\u003c/math-renderer\u003e, running the L-BFGS solver for at most 1000 function evaluations:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"from jax_sysid.models import LinearModel\n\nmodel = LinearModel(nx, ny, nu)\nmodel.loss(rho_x0=1.e-3, rho_th=1.e-2) \nmodel.optimization(lbfgs_epochs=1000) \nmodel.fit(Y,U)\nYhat, Xhat = model.predict(model.x0, U)\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ejax_sysid\u003c/span\u003e.\u003cspan class=\"pl-s1\"\u003emodels\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eLinearModel\u003c/span\u003e\n\n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eLinearModel\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003enx\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eny\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003enu\u003c/span\u003e)\n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eloss\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003erho_x0\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1.e-3\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003erho_th\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1.e-2\u003c/span\u003e) \n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eoptimization\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003elbfgs_epochs\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1000\u003c/span\u003e) \n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003efit\u003c/span\u003e(\u003cspan class=\"pl-c1\"\u003eY\u003c/span\u003e,\u003cspan class=\"pl-c1\"\u003eU\u003c/span\u003e)\n\u003cspan class=\"pl-v\"\u003eYhat\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eXhat\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003epredict\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003ex0\u003c/span\u003e, \u003cspan class=\"pl-c1\"\u003eU\u003c/span\u003e)\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eAfter identifying the model, to retrieve the resulting state-space realization you can use the following:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"A,B,C,D = model.ssdata()\"\u003e\u003cpre\u003e\u003cspan class=\"pl-c1\"\u003eA\u003c/span\u003e,\u003cspan class=\"pl-c1\"\u003eB\u003c/span\u003e,\u003cspan class=\"pl-c1\"\u003eC\u003c/span\u003e,\u003cspan class=\"pl-c1\"\u003eD\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003essdata\u003c/span\u003e()\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eGiven a new test sequence of inputs and outputs, an initial state that is compatible with the identified model can be reconstructed by running an extended Kalman filter and Rauch–Tung–Striebel smoothing (cf.\n\u003ca href=\"#cite-Bem24\"\u003e[1]\u003c/a\u003e) and used to simulate the model:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"x0_test = model.learn_x0(U_test, Y_test)\nYhat_test, Xhat_test = model.predict(x0_test, U_test)\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003ex0_test\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003elearn_x0\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003eU_test\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eY_test\u003c/span\u003e)\n\u003cspan class=\"pl-v\"\u003eYhat_test\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eXhat_test\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003epredict\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003ex0_test\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eU_test\u003c/span\u003e)\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eR2-scores on training and test data can be computed as follows:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"from jax_sysid.utils import compute_scores\n\nR2_train, R2_test, msg = compute_scores(Y, Yhat, Y_test, Yhat_test, fit='R2')\nprint(msg)\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ejax_sysid\u003c/span\u003e.\u003cspan class=\"pl-s1\"\u003eutils\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ecompute_scores\u003c/span\u003e\n\n\u003cspan class=\"pl-v\"\u003eR2_train\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eR2_test\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003emsg\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003ecompute_scores\u003c/span\u003e(\u003cspan class=\"pl-c1\"\u003eY\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eYhat\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eY_test\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eYhat_test\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003efit\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e'R2'\u003c/span\u003e)\n\u003cspan class=\"pl-en\"\u003eprint\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003emsg\u003c/span\u003e)\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eIt is good practice to scale the input and output signals. To identify a model on scaled signals, you can use the following:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"from jax_sysid.utils import standard_scale, unscale\n\nYs, ymean, ygain = standard_scale(Y)\nUs, umean, ugain = standard_scale(U)\nmodel.fit(Ys, Us)\nYshat, Xhat = model.predict(model.x0, Us)\nYhat = unscale(Yshat, ymean, ygain)\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ejax_sysid\u003c/span\u003e.\u003cspan class=\"pl-s1\"\u003eutils\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003estandard_scale\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eunscale\u003c/span\u003e\n\n\u003cspan class=\"pl-v\"\u003eYs\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eymean\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eygain\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003estandard_scale\u003c/span\u003e(\u003cspan class=\"pl-c1\"\u003eY\u003c/span\u003e)\n\u003cspan class=\"pl-v\"\u003eUs\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eumean\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eugain\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003estandard_scale\u003c/span\u003e(\u003cspan class=\"pl-c1\"\u003eU\u003c/span\u003e)\n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003efit\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003eYs\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eUs\u003c/span\u003e)\n\u003cspan class=\"pl-v\"\u003eYshat\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eXhat\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003epredict\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003ex0\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eUs\u003c/span\u003e)\n\u003cspan class=\"pl-v\"\u003eYhat\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eunscale\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003eYshat\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eymean\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eygain\u003c/span\u003e)\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch4 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eL1- and group-Lasso regularization\u003c/h4\u003e\u003ca id=\"user-content-l1--and-group-lasso-regularization\" class=\"anchor\" aria-label=\"Permalink: L1- and group-Lasso regularization\" href=\"#l1--and-group-lasso-regularization\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eLet us now retrain the model using L1-regularization\nand check the sparsity of the resulting model:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"model.loss(rho_x0=1.e-3, rho_th=1.e-2, tau_th=0.03) \nmodel.fit(Ys, Us)\nprint(model.sparsity_analysis())\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eloss\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003erho_x0\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1.e-3\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003erho_th\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1.e-2\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003etau_th\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e0.03\u003c/span\u003e) \n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003efit\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003eYs\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eUs\u003c/span\u003e)\n\u003cspan class=\"pl-en\"\u003eprint\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003esparsity_analysis\u003c/span\u003e())\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eTo reduce the number of states in the model, you can use group-Lasso regularization as follows:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"model.loss(rho_x0=1.e-3, rho_th=1.e-2, tau_g=0.1) \nmodel.group_lasso_x()\nmodel.fit(Ys, Us)\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eloss\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003erho_x0\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1.e-3\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003erho_th\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1.e-2\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003etau_g\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e0.1\u003c/span\u003e) \n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003egroup_lasso_x\u003c/span\u003e()\n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003efit\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003eYs\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eUs\u003c/span\u003e)\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eGroups in this case are entries in \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$A,B,C,x_0$\u003c/math-renderer\u003e related to the same state.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eGroup-Lasso can be also used to try to reduce the number of inputs that are relevant in the model. You can do this as follows:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"model.loss(rho_x0=1.e-3, rho_th=1.e-2, tau_g=0.15) \nmodel.group_lasso_u()\nmodel.fit(Ys, Us)\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eloss\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003erho_x0\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1.e-3\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003erho_th\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1.e-2\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003etau_g\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e0.15\u003c/span\u003e) \n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003egroup_lasso_u\u003c/span\u003e()\n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003efit\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003eYs\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eUs\u003c/span\u003e)\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eGroups in this case are entries in \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$B,D$\u003c/math-renderer\u003e related to the same input.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch4 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eMultiple experiments\u003c/h4\u003e\u003ca id=\"user-content-multiple-experiments\" class=\"anchor\" aria-label=\"Permalink: Multiple experiments\" href=\"#multiple-experiments\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003ejax-sysid\u003c/strong\u003e also supports multiple training experiments. In this case, the sequences of training inputs and outputs are passed as a list of arrays. For example, if three experiments are available for training, use the following command:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"model.fit([Ys1, Ys2, Ys3], [Us1, Us2, Us3])\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003efit\u003c/span\u003e([\u003cspan class=\"pl-v\"\u003eYs1\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eYs2\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eYs3\u003c/span\u003e], [\u003cspan class=\"pl-v\"\u003eUs1\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eUs2\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eUs3\u003c/span\u003e])\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eIn case the initial state \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$x_0$\u003c/math-renderer\u003e is trainable, one initial state per experiment is optimized. To avoid training the initial state, add \u003ccode\u003etrain_x0=False\u003c/code\u003e when calling \u003ccode\u003emodel.loss\u003c/code\u003e.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch4 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eStability\u003c/h4\u003e\u003ca id=\"user-content-stability\" class=\"anchor\" aria-label=\"Permalink: Stability\" href=\"#stability\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eTo attempt forcing that the identified linear model is asymptotically stable, i.e., that matrix \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$A$\u003c/math-renderer\u003e has all eigenvalues inside the unit disk, you can use the following command:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"model.force_stability()\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eforce_stability\u003c/span\u003e()\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003ebefore calling the \u003ccode\u003efit\u003c/code\u003e function. This will introduce a custom regularization penalty that tries to enforce the constraint \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$|A|_2\u0026amp;lt;1$\u003c/math-renderer\u003e.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch4 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eStatic gain\u003c/h4\u003e\u003ca id=\"user-content-static-gain\" class=\"anchor\" aria-label=\"Permalink: Static gain\" href=\"#static-gain\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eTo introduce a penalty that attempts forcing the identified linear model to have a given DC-gain matrix \u003ccode\u003eM\u003c/code\u003e, you can use the following commands:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"dcgain_loss = model.dcgain_loss(DCgain = M)\nmodel.loss(rho_x0=1.e-3, rho_th=1.e-2, custom_regularization = dcgain_loss)\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003edcgain_loss\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003edcgain_loss\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003eDCgain\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003eM\u003c/span\u003e)\n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eloss\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003erho_x0\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1.e-3\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003erho_th\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1.e-2\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003ecustom_regularization\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003edcgain_loss\u003c/span\u003e)\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003ebefore calling the \u003ccode\u003efit\u003c/code\u003e function. Similarly, to fit instead the DC-gain of the model to steady-state input data \u003ccode\u003eUss\u003c/code\u003e and corresponding output data \u003ccode\u003eYss\u003c/code\u003e, you can use\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"dcgain_loss = model.dcgain_loss(Uss = Uss, Yss = Yss)\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003edcgain_loss\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003edcgain_loss\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003eUss\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eUss\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eYss\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eYss\u003c/span\u003e)\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eand use \u003ccode\u003edcgain_loss\u003c/code\u003e as the custom regularization function.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003ca name=\"user-content-nonlinear\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eNonlinear system identification and RNNs\u003c/h3\u003e\u003ca id=\"user-content-nonlinear-system-identification-and-rnns\" class=\"anchor\" aria-label=\"Permalink: Nonlinear system identification and RNNs\" href=\"#nonlinear-system-identification-and-rnns\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch4 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eTraining nonlinear models\u003c/h4\u003e\u003ca id=\"user-content-training-nonlinear-models\" class=\"anchor\" aria-label=\"Permalink: Training nonlinear models\" href=\"#training-nonlinear-models\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eGiven input/output training data \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$(u_0,y_0)$\u003c/math-renderer\u003e, \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$\\ldots$\u003c/math-renderer\u003e, \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$(u_{N-1},y_{N-1})$\u003c/math-renderer\u003e, \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$u_k\\in R^{n_u}$\u003c/math-renderer\u003e, \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$y_k\\in R^{n_y}$\u003c/math-renderer\u003e, we want to identify a nonlinear parametric state-space model in the following form\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003cmath-renderer class=\"js-display-math\" style=\"display: block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$$ x_{k+1}=f(x_k,u_k,\\theta)$$\u003c/math-renderer\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003cmath-renderer class=\"js-display-math\" style=\"display: block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$$ \\hat y_k=g(x_k,u_k,\\theta)$$\u003c/math-renderer\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003ewhere \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$k$\u003c/math-renderer\u003e denotes the sample instant, \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$x_k\\in R^{n_x}$\u003c/math-renderer\u003e is the vector of hidden states, and \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$\\theta$\u003c/math-renderer\u003e collects the trainable parameters of the model.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eAs for the linear case, the training problem to solve is\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003cmath-renderer class=\"js-display-math\" style=\"display: block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$$ \\min_{z}r(z)+\\frac{1}{N}\\sum_{k=0}^{N-1} |y_{k}-g(x_k,u_k,\\theta)|_2^2$$\u003c/math-renderer\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003cmath-renderer class=\"js-display-math\" style=\"display: block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$$\\textrm{s.t.}\\ x_{k+1}=f(x_k,u_k,\\theta),\\ k=0,\\ldots,N-2$$\u003c/math-renderer\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003ewhere \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$z=(\\theta,x_0)$\u003c/math-renderer\u003e. The regularization term \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$r(z)$\u003c/math-renderer\u003e is the same as in the linear case.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eFor example, let us consider the following residual RNN model without input/output feedthrough:\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003cmath-renderer class=\"js-display-math\" style=\"display: block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$$ x_{k+1}=Ax_k+Bu_k+f_x(x_k,u_k,\\theta_x)$$\u003c/math-renderer\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003cmath-renderer class=\"js-display-math\" style=\"display: block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$$ \\hat y_k=Cx_k+f_y(x_k,\\theta_y)$$\u003c/math-renderer\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003ewhere \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$f_x$\u003c/math-renderer\u003e, \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$f_y$\u003c/math-renderer\u003e are feedforward shallow neural networks, and let \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$z$\u003c/math-renderer\u003e collects the coefficients in \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$A,B,C,D,\\theta_x,\\theta_y$\u003c/math-renderer\u003e. We want to train \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$z$\u003c/math-renderer\u003e by running 1000 Adam iterations followed by at most 1000 L-BFGS function evaluations:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"from jax_sysid.models import Model\n\nYs, ymean, ygain = standard_scale(Y)\nUs, umean, ugain = standard_scale(U)\n\ndef sigmoid(x):\n return 1. / (1. + jnp.exp(-x)) \n@jax.jit\ndef state_fcn(x,u,params):\n A,B,C,W1,W2,W3,b1,b2,W4,W5,b3,b4=params\n return A@x+B@u+W3@sigmoid(W1@x+W2@u+b1)+b2 \n@jax.jit\ndef output_fcn(x,u,params):\n A,B,C,W1,W2,W3,b1,b2,W4,W5,b3,b4=params\n return C@x+W5@sigmoid(W4@x+b3)+b4\n\nmodel = Model(nx, ny, nu, state_fcn=state_fcn, output_fcn=output_fcn)\nnnx = 5 # number of hidden neurons in state-update function\nnny = 5 # number of hidden neurons in output function\n\n# Parameter initialization:\nA = 0.5*np.eye(nx)\nB = 0.1*np.random.randn(nx,nu)\nC = 0.1*np.random.randn(ny,nx)\nW1 = 0.1*np.random.randn(nnx,nx)\nW2 = 0.5*np.random.randn(nnx,nu)\nW3 = 0.5*np.random.randn(nx,nnx)\nb1 = np.zeros(nnx)\nb2 = np.zeros(nx)\nW4 = 0.5*np.random.randn(nny,nx)\nW5 = 0.5*np.random.randn(ny,nny)\nb3 = np.zeros(nny)\nb4 = np.zeros(ny)\nmodel.init(params=[A,B,C,W1,W2,W3,b1,b2,W4,W5,b3,b4]) \n\nmodel.loss(rho_x0=1.e-4, rho_th=1.e-4)\nmodel.optimization(adam_epochs=1000, lbfgs_epochs=1000) \nmodel.fit(Ys, Us)\nYshat, Xshat = model.predict(model.x0, Us)\nYhat = unscale(Yshat, ymean, ygain)\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ejax_sysid\u003c/span\u003e.\u003cspan class=\"pl-s1\"\u003emodels\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eModel\u003c/span\u003e\n\n\u003cspan class=\"pl-v\"\u003eYs\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eymean\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eygain\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003estandard_scale\u003c/span\u003e(\u003cspan class=\"pl-c1\"\u003eY\u003c/span\u003e)\n\u003cspan class=\"pl-v\"\u003eUs\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eumean\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eugain\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003estandard_scale\u003c/span\u003e(\u003cspan class=\"pl-c1\"\u003eU\u003c/span\u003e)\n\n\u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003esigmoid\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e):\n \u003cspan class=\"pl-k\"\u003ereturn\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e1.\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e/\u003c/span\u003e (\u003cspan class=\"pl-c1\"\u003e1.\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e+\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ejnp\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eexp\u003c/span\u003e(\u003cspan class=\"pl-c1\"\u003e-\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e)) \n\u003cspan class=\"pl-en\"\u003e@\u003cspan class=\"pl-s1\"\u003ejax\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003ejit\u003c/span\u003e\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003estate_fcn\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e,\u003cspan class=\"pl-s1\"\u003eu\u003c/span\u003e,\u003cspan class=\"pl-s1\"\u003eparams\u003c/span\u003e):\n \u003cspan class=\"pl-c1\"\u003eA\u003c/span\u003e,\u003cspan class=\"pl-c1\"\u003eB\u003c/span\u003e,\u003cspan class=\"pl-c1\"\u003eC\u003c/span\u003e,\u003cspan class=\"pl-v\"\u003eW1\u003c/span\u003e,\u003cspan class=\"pl-v\"\u003eW2\u003c/span\u003e,\u003cspan class=\"pl-v\"\u003eW3\u003c/span\u003e,\u003cspan class=\"pl-s1\"\u003eb1\u003c/span\u003e,\u003cspan class=\"pl-s1\"\u003eb2\u003c/span\u003e,\u003cspan class=\"pl-v\"\u003eW4\u003c/span\u003e,\u003cspan class=\"pl-v\"\u003eW5\u003c/span\u003e,\u003cspan class=\"pl-s1\"\u003eb3\u003c/span\u003e,\u003cspan class=\"pl-s1\"\u003eb4\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eparams\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003ereturn\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003eA\u003c/span\u003e@\u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e+\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eB\u003c/span\u003e@\u003cspan class=\"pl-s1\"\u003eu\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e+\u003c/span\u003e\u003cspan class=\"pl-v\"\u003eW3\u003c/span\u003e@\u003cspan class=\"pl-en\"\u003esigmoid\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003eW1\u003c/span\u003e@\u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e+\u003c/span\u003e\u003cspan class=\"pl-v\"\u003eW2\u003c/span\u003e@\u003cspan class=\"pl-s1\"\u003eu\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e+\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eb1\u003c/span\u003e)\u003cspan class=\"pl-c1\"\u003e+\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eb2\u003c/span\u003e \n\u003cspan class=\"pl-en\"\u003e@\u003cspan class=\"pl-s1\"\u003ejax\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003ejit\u003c/span\u003e\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eoutput_fcn\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e,\u003cspan class=\"pl-s1\"\u003eu\u003c/span\u003e,\u003cspan class=\"pl-s1\"\u003eparams\u003c/span\u003e):\n \u003cspan class=\"pl-c1\"\u003eA\u003c/span\u003e,\u003cspan class=\"pl-c1\"\u003eB\u003c/span\u003e,\u003cspan class=\"pl-c1\"\u003eC\u003c/span\u003e,\u003cspan class=\"pl-v\"\u003eW1\u003c/span\u003e,\u003cspan class=\"pl-v\"\u003eW2\u003c/span\u003e,\u003cspan class=\"pl-v\"\u003eW3\u003c/span\u003e,\u003cspan class=\"pl-s1\"\u003eb1\u003c/span\u003e,\u003cspan class=\"pl-s1\"\u003eb2\u003c/span\u003e,\u003cspan class=\"pl-v\"\u003eW4\u003c/span\u003e,\u003cspan class=\"pl-v\"\u003eW5\u003c/span\u003e,\u003cspan class=\"pl-s1\"\u003eb3\u003c/span\u003e,\u003cspan class=\"pl-s1\"\u003eb4\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eparams\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003ereturn\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003eC\u003c/span\u003e@\u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e+\u003c/span\u003e\u003cspan class=\"pl-v\"\u003eW5\u003c/span\u003e@\u003cspan class=\"pl-en\"\u003esigmoid\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003eW4\u003c/span\u003e@\u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e+\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eb3\u003c/span\u003e)\u003cspan class=\"pl-c1\"\u003e+\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eb4\u003c/span\u003e\n\n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eModel\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003enx\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eny\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003enu\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003estate_fcn\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003estate_fcn\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eoutput_fcn\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eoutput_fcn\u003c/span\u003e)\n\u003cspan class=\"pl-s1\"\u003ennx\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e5\u003c/span\u003e \u003cspan class=\"pl-c\"\u003e# number of hidden neurons in state-update function\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003enny\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e5\u003c/span\u003e \u003cspan class=\"pl-c\"\u003e# number of hidden neurons in output function\u003c/span\u003e\n\n\u003cspan class=\"pl-c\"\u003e# Parameter initialization:\u003c/span\u003e\n\u003cspan class=\"pl-c1\"\u003eA\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e0.5\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003enp\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eeye\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003enx\u003c/span\u003e)\n\u003cspan class=\"pl-c1\"\u003eB\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e0.1\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003enp\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erandom\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erandn\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003enx\u003c/span\u003e,\u003cspan class=\"pl-s1\"\u003enu\u003c/span\u003e)\n\u003cspan class=\"pl-c1\"\u003eC\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e0.1\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003enp\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erandom\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erandn\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eny\u003c/span\u003e,\u003cspan class=\"pl-s1\"\u003enx\u003c/span\u003e)\n\u003cspan class=\"pl-v\"\u003eW1\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e0.1\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003enp\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erandom\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erandn\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003ennx\u003c/span\u003e,\u003cspan class=\"pl-s1\"\u003enx\u003c/span\u003e)\n\u003cspan class=\"pl-v\"\u003eW2\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e0.5\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003enp\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erandom\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erandn\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003ennx\u003c/span\u003e,\u003cspan class=\"pl-s1\"\u003enu\u003c/span\u003e)\n\u003cspan class=\"pl-v\"\u003eW3\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e0.5\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003enp\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erandom\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erandn\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003enx\u003c/span\u003e,\u003cspan class=\"pl-s1\"\u003ennx\u003c/span\u003e)\n\u003cspan class=\"pl-s1\"\u003eb1\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003enp\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003ezeros\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003ennx\u003c/span\u003e)\n\u003cspan class=\"pl-s1\"\u003eb2\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003enp\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003ezeros\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003enx\u003c/span\u003e)\n\u003cspan class=\"pl-v\"\u003eW4\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e0.5\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003enp\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erandom\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erandn\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003enny\u003c/span\u003e,\u003cspan class=\"pl-s1\"\u003enx\u003c/span\u003e)\n\u003cspan class=\"pl-v\"\u003eW5\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e0.5\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003enp\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erandom\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erandn\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eny\u003c/span\u003e,\u003cspan class=\"pl-s1\"\u003enny\u003c/span\u003e)\n\u003cspan class=\"pl-s1\"\u003eb3\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003enp\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003ezeros\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003enny\u003c/span\u003e)\n\u003cspan class=\"pl-s1\"\u003eb4\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003enp\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003ezeros\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eny\u003c/span\u003e)\n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003einit\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eparams\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e[\u003cspan class=\"pl-c1\"\u003eA\u003c/span\u003e,\u003cspan class=\"pl-c1\"\u003eB\u003c/span\u003e,\u003cspan class=\"pl-c1\"\u003eC\u003c/span\u003e,\u003cspan class=\"pl-v\"\u003eW1\u003c/span\u003e,\u003cspan class=\"pl-v\"\u003eW2\u003c/span\u003e,\u003cspan class=\"pl-v\"\u003eW3\u003c/span\u003e,\u003cspan class=\"pl-s1\"\u003eb1\u003c/span\u003e,\u003cspan class=\"pl-s1\"\u003eb2\u003c/span\u003e,\u003cspan class=\"pl-v\"\u003eW4\u003c/span\u003e,\u003cspan class=\"pl-v\"\u003eW5\u003c/span\u003e,\u003cspan class=\"pl-s1\"\u003eb3\u003c/span\u003e,\u003cspan class=\"pl-s1\"\u003eb4\u003c/span\u003e]) \n\n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eloss\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003erho_x0\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1.e-4\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003erho_th\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1.e-4\u003c/span\u003e)\n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eoptimization\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eadam_epochs\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1000\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003elbfgs_epochs\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1000\u003c/span\u003e) \n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003efit\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003eYs\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eUs\u003c/span\u003e)\n\u003cspan class=\"pl-v\"\u003eYshat\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eXshat\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003epredict\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003ex0\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eUs\u003c/span\u003e)\n\u003cspan class=\"pl-v\"\u003eYhat\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eunscale\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003eYshat\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eymean\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eygain\u003c/span\u003e)\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch4 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eParallel training\u003c/h4\u003e\u003ca id=\"user-content-parallel-training\" class=\"anchor\" aria-label=\"Permalink: Parallel training\" href=\"#parallel-training\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eAs the training problem, in general, is a nonconvex optimization problem, the obtained model often depends on the initial value of the parameters. The \u003cstrong\u003ejax-sysid\u003c/strong\u003e library supports training models in parallel (including static models) using the \u003ccode\u003ejoblib\u003c/code\u003e library. In the example above, we can train 10 different models using 10 jobs in \u003ccode\u003ejoblib\u003c/code\u003e as follows:\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"def init_fcn(seed):\n np.random.seed(seed)\n A = 0.5*np.eye(nx)\n B = 0.1*np.random.randn(nx,nu)\n C = 0.1*np.random.randn(ny,nx)\n W1 = 0.1*np.random.randn(nnx,nx)\n W2 = 0.5*np.random.randn(nnx,nu)\n W3 = 0.5*np.random.randn(nx,nnx)\n b1 = np.zeros(nnx)\n b2 = np.zeros(nx)\n W4 = 0.5*np.random.randn(nny,nx)\n W5 = 0.5*np.random.randn(ny,nny)\n b3 = np.zeros(nny)\n b4 = np.zeros(ny)\n return [A,B,C,W1,W2,W3,b1,b2,W4,W5,b3,b4]\n\nmodels = model.parallel_fit(Ys, Us, init_fcn=init_fcn, seeds=range(10), n_jobs=10)\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003edef init_fcn(seed):\n np.random.seed(seed)\n A = 0.5*np.eye(nx)\n B = 0.1*np.random.randn(nx,nu)\n C = 0.1*np.random.randn(ny,nx)\n W1 = 0.1*np.random.randn(nnx,nx)\n W2 = 0.5*np.random.randn(nnx,nu)\n W3 = 0.5*np.random.randn(nx,nnx)\n b1 = np.zeros(nnx)\n b2 = np.zeros(nx)\n W4 = 0.5*np.random.randn(nny,nx)\n W5 = 0.5*np.random.randn(ny,nny)\n b3 = np.zeros(nny)\n b4 = np.zeros(ny)\n return [A,B,C,W1,W2,W3,b1,b2,W4,W5,b3,b4]\n\nmodels = model.parallel_fit(Ys, Us, init_fcn=init_fcn, seeds=range(10), n_jobs=10)\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eBy default, \u003ccode\u003en_jobs\u003c/code\u003e is equal to the number of all available CPUs.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eTo select the best model on a dataset \u003ccode\u003eUs_test\u003c/code\u003e, \u003ccode\u003eYs_test\u003c/code\u003e in accordance with a given fit criterion, you can use \u003ccode\u003efind_best_model\u003c/code\u003e:\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"from jax_sysid.models import find_best_model\n\nbest_model, best_R2 = find_best_model(models, Ys_test, Us_test, fit='R2')\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003efrom jax_sysid.models import find_best_model\n\nbest_model, best_R2 = find_best_model(models, Ys_test, Us_test, fit='R2')\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch4 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eflax.linen models\u003c/h4\u003e\u003ca id=\"user-content-flaxlinen-models\" class=\"anchor\" aria-label=\"Permalink: flax.linen models\" href=\"#flaxlinen-models\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003ejax-sysid\u003c/strong\u003e also supports recurrent neural networks defined via the \u003cstrong\u003eflax.linen\u003c/strong\u003e library (the \u003ccode\u003eflax\u003c/code\u003e package can be installed via \u003ccode\u003epip install flax\u003c/code\u003e):\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"from jax_sysid.models import RNN\n\n# state-update function\nclass FX(nn.Module):\n @nn.compact\n def __call__(self, x):\n x = nn.Dense(features=5)(x)\n x = nn.swish(x)\n x = nn.Dense(features=5)(x)\n x = nn.swish(x)\n x = nn.Dense(features=nx)(x)\n return x\n\n# output function\nclass FY(nn.Module):\n @nn.compact\n def __call__(self, x):\n x = nn.Dense(features=5)(x)\n x = nn.tanh(x)\n x = nn.Dense(features=ny)(x)\n return x\n \nmodel = RNN(nx, ny, nu, FX=FX, FY=FY, x_scaling=0.1)\nmodel.loss(rho_x0=1.e-4, rho_th=1.e-4, tau_th=0.0001)\nmodel.optimization(adam_epochs=0, lbfgs_epochs=2000) \nmodel.fit(Ys, Us)\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ejax_sysid\u003c/span\u003e.\u003cspan class=\"pl-s1\"\u003emodels\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003eRNN\u003c/span\u003e\n\n\u003cspan class=\"pl-c\"\u003e# state-update function\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003eclass\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003eFX\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003enn\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eModule\u003c/span\u003e):\n \u003cspan class=\"pl-en\"\u003e@\u003cspan class=\"pl-s1\"\u003enn\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003ecompact\u003c/span\u003e\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003e__call__\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eself\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e):\n \u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003enn\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eDense\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003efeatures\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e5\u003c/span\u003e)(\u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e)\n \u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003enn\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eswish\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e)\n \u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003enn\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eDense\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003efeatures\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e5\u003c/span\u003e)(\u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e)\n \u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003enn\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eswish\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e)\n \u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003enn\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eDense\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003efeatures\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003enx\u003c/span\u003e)(\u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e)\n \u003cspan class=\"pl-k\"\u003ereturn\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e\n\n\u003cspan class=\"pl-c\"\u003e# output function\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003eclass\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003eFY\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003enn\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eModule\u003c/span\u003e):\n \u003cspan class=\"pl-en\"\u003e@\u003cspan class=\"pl-s1\"\u003enn\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003ecompact\u003c/span\u003e\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003e__call__\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eself\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e):\n \u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003enn\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eDense\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003efeatures\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e5\u003c/span\u003e)(\u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e)\n \u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003enn\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003etanh\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e)\n \u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003enn\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eDense\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003efeatures\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eny\u003c/span\u003e)(\u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e)\n \u003cspan class=\"pl-k\"\u003ereturn\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e\n \n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eRNN\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003enx\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eny\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003enu\u003c/span\u003e, \u003cspan class=\"pl-c1\"\u003eFX\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eFX\u003c/span\u003e, \u003cspan class=\"pl-c1\"\u003eFY\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eFY\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003ex_scaling\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e0.1\u003c/span\u003e)\n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eloss\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003erho_x0\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1.e-4\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003erho_th\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1.e-4\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003etau_th\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e0.0001\u003c/span\u003e)\n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eoptimization\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eadam_epochs\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e0\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003elbfgs_epochs\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e2000\u003c/span\u003e) \n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003efit\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003eYs\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eUs\u003c/span\u003e)\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003ewhere the extra parameter \u003ccode\u003ex_scaling\u003c/code\u003e is used to scale down (when \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$0\\leq$\u003c/math-renderer\u003e \u003ccode\u003ex_scaling\u003c/code\u003e \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$\u0026amp;lt;1$\u003c/math-renderer\u003e) the default initialization of the network weights instantiated by \u003cstrong\u003eflax\u003c/strong\u003e.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch4 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eCustom output loss\u003c/h4\u003e\u003ca id=\"user-content-custom-output-loss\" class=\"anchor\" aria-label=\"Permalink: Custom output loss\" href=\"#custom-output-loss\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003ejax-sysid\u003c/strong\u003e also supports custom loss functions penalizing the deviations of \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$\\hat y$\u003c/math-renderer\u003e from \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$y$\u003c/math-renderer\u003e. For example, to identify a system with a binary output, we can use the (modified) cross-entropy loss\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003cmath-renderer class=\"js-display-math\" style=\"display: block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$$\n{\\mathcal L}(\\hat Y,Y)=\\frac{1}{N}\\sum_{k=0}^{N-1}\n-y_k\\log(\\epsilon+\\hat y_k)-(1-y_k)\\log(\\epsilon+1-\\hat y_k)\n$$\u003c/math-renderer\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003ewhere \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$\\hat Y=(\\hat y_0,\\ldots,\\hat y_{N-1})$\u003c/math-renderer\u003e and \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$Y=(y_0,\\ldots, y_{N-1})$\u003c/math-renderer\u003e are the sequences of predicted and measured outputs, respectively, and \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$\\epsilon\u0026amp;gt;0$\u003c/math-renderer\u003e is a tolerance used to prevent numerical issues in case \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$\\hat y_k\\approx 0$\u003c/math-renderer\u003e or \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$\\hat y_k\\approx 1$\u003c/math-renderer\u003e:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"epsil=1.e-4\n@jax.jit\ndef cross_entropy_loss(Yhat,Y):\n loss=jnp.sum(-Y*jnp.log(epsil+Yhat)-(1.-Y)*jnp.log(epsil+1.-Yhat))/Y.shape[0]\n return loss\nmodel.loss(rho_x0=0.01, rho_th=0.001, output_loss=cross_entropy_loss)\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003eepsil\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1.e-4\u003c/span\u003e\n\u003cspan class=\"pl-en\"\u003e@\u003cspan class=\"pl-s1\"\u003ejax\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003ejit\u003c/span\u003e\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003ecross_entropy_loss\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003eYhat\u003c/span\u003e,\u003cspan class=\"pl-c1\"\u003eY\u003c/span\u003e):\n \u003cspan class=\"pl-s1\"\u003eloss\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ejnp\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003esum\u003c/span\u003e(\u003cspan class=\"pl-c1\"\u003e-\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eY\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ejnp\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003elog\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eepsil\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e+\u003c/span\u003e\u003cspan class=\"pl-v\"\u003eYhat\u003c/span\u003e)\u003cspan class=\"pl-c1\"\u003e-\u003c/span\u003e(\u003cspan class=\"pl-c1\"\u003e1.\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e-\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eY\u003c/span\u003e)\u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ejnp\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003elog\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eepsil\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e+\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1.\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e-\u003c/span\u003e\u003cspan class=\"pl-v\"\u003eYhat\u003c/span\u003e))\u003cspan class=\"pl-c1\"\u003e/\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eY\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eshape\u003c/span\u003e[\u003cspan class=\"pl-c1\"\u003e0\u003c/span\u003e]\n \u003cspan class=\"pl-k\"\u003ereturn\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eloss\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eloss\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003erho_x0\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e0.01\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003erho_th\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e0.001\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eoutput_loss\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecross_entropy_loss\u003c/span\u003e)\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eBy default, \u003cstrong\u003ejax-sysid\u003c/strong\u003e minimizes the classical mean squared error\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003cmath-renderer class=\"js-display-math\" style=\"display: block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$$\n{\\mathcal L}(\\hat Y,Y)=\\frac{1}{N}\\sum_{k=0}^{N-1}\n|y_k-\\hat y_k|_2^2\n$$\u003c/math-renderer\u003e\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch4 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eCustom regularization\u003c/h4\u003e\u003ca id=\"user-content-custom-regularization\" class=\"anchor\" aria-label=\"Permalink: Custom regularization\" href=\"#custom-regularization\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003ejax-sysid\u003c/strong\u003e also supports custom regularization terms \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$r_c(z)$\u003c/math-renderer\u003e, where \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$z=(\\theta,x_0)$\u003c/math-renderer\u003e. You can specify such a custom regularization function when defining the overall loss. For example, say for some reason you want to impose \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$|\\theta|_2^2\\leq 1$\u003c/math-renderer\u003e as a soft constraint, you can penalize\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e$$\\frac{1}{2} \\rho_{\\theta} |\\theta|\u003cem\u003e2^2 + \\rho\u003c/em\u003e{x_0} |x_0|_2^2 + \\rho_c\\max{|\\theta|_2^2-1,0}^2$$\u003c/p\u003e\n\u003cp dir=\"auto\"\u003ewith \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$\\rho_c\\gg\\rho_\\theta$\u003c/math-renderer\u003e, \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$\\rho_c\\gg\\rho_{x_0}$\u003c/math-renderer\u003e, for instance \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$\\rho_c=1000$\u003c/math-renderer\u003e, \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$\\rho_\\theta=0.001$\u003c/math-renderer\u003e, \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$\\rho_{x0}=0.01$\u003c/math-renderer\u003e. In Python:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"@jax.jit\ndef custom_reg_fcn(th,x0):\n return 1000.*jnp.maximum(jnp.sum(th**2)-1.,0.)**2\nmodel.loss(rho_x0=0.01, rho_th=0.001, custom_regularization= custom_reg_fcn)\"\u003e\u003cpre\u003e\u003cspan class=\"pl-en\"\u003e@\u003cspan class=\"pl-s1\"\u003ejax\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003ejit\u003c/span\u003e\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003ecustom_reg_fcn\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eth\u003c/span\u003e,\u003cspan class=\"pl-s1\"\u003ex0\u003c/span\u003e):\n \u003cspan class=\"pl-k\"\u003ereturn\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e1000.\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ejnp\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003emaximum\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003ejnp\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003esum\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eth\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e**\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e2\u003c/span\u003e)\u003cspan class=\"pl-c1\"\u003e-\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1.\u003c/span\u003e,\u003cspan class=\"pl-c1\"\u003e0.\u003c/span\u003e)\u003cspan class=\"pl-c1\"\u003e**\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e2\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eloss\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003erho_x0\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e0.01\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003erho_th\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e0.001\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003ecustom_regularization\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ecustom_reg_fcn\u003c/span\u003e)\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch4 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eStatic gain\u003c/h4\u003e\u003ca id=\"user-content-static-gain-1\" class=\"anchor\" aria-label=\"Permalink: Static gain\" href=\"#static-gain-1\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eAs for linear systems, a special case of custom regularization function to fit the DC-gain of the model to steady-state input data \u003ccode\u003eUss\u003c/code\u003e and corresponding output data \u003ccode\u003eYss\u003c/code\u003e is obtained using the following commands:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"dcgain_loss = model.dcgain_loss(Uss = Uss, Yss = Yss)\nmodel.loss(rho_x0=1.e-3, rho_th=1.e-2, custom_regularization = dcgain_loss)\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003edcgain_loss\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003edcgain_loss\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003eUss\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eUss\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eYss\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eYss\u003c/span\u003e)\n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eloss\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003erho_x0\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1.e-3\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003erho_th\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1.e-2\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003ecustom_regularization\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003edcgain_loss\u003c/span\u003e)\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003ebefore calling the \u003ccode\u003efit\u003c/code\u003e function. Note that this penalty involves solving a system of nonlinear equations for every input/output steady-state pair to evaluate the loss function, so it can be slow if many steady-state data pairs are given.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch4 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eUpper and lower bounds\u003c/h4\u003e\u003ca id=\"user-content-upper-and-lower-bounds\" class=\"anchor\" aria-label=\"Permalink: Upper and lower bounds\" href=\"#upper-and-lower-bounds\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eTo include lower and upper bounds on the parameters of the model and/or the initial state, use the following additional arguments when specifying the optimization problem:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"model.optimization(params_min=lb, params_max=ub, x0_min=xmin, x0_max=xmax, ...)\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eoptimization\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eparams_min\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003elb\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eparams_max\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eub\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003ex0_min\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003exmin\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003ex0_max\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003exmax\u003c/span\u003e, ...)\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003ewhere \u003ccode\u003elb\u003c/code\u003e and \u003ccode\u003eub\u003c/code\u003e are lists of arrays with the same structure as \u003ccode\u003emodel.params\u003c/code\u003e, while \u003ccode\u003exmin\u003c/code\u003e and \u003ccode\u003exmax\u003c/code\u003e are arrays of the same dimension \u003ccode\u003emodel.nx\u003c/code\u003e of the state vector. By default, each value is set equal to \u003ccode\u003eNone\u003c/code\u003e, i.e., the corresponding constraint is not enforced. See \u003ccode\u003eexample_linear_positive.py\u003c/code\u003e for examples of how to use nonnegative constraints to fit a positive linear system.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003ca name=\"user-content-quasilpv\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eLinear Parameter-Varying (LPV) models\u003c/h3\u003e\u003ca id=\"user-content-linear-parameter-varying-lpv-models\" class=\"anchor\" aria-label=\"Permalink: Linear Parameter-Varying (LPV) models\" href=\"#linear-parameter-varying-lpv-models\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch4 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eTraining LPV models\u003c/h4\u003e\u003ca id=\"user-content-training-lpv-models\" class=\"anchor\" aria-label=\"Permalink: Training LPV models\" href=\"#training-lpv-models\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eAs a special case of nonlinear dynamical models, \u003cstrong\u003ejax-sysid\u003c/strong\u003e supports the identification of quasi-LPV models of the form\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003cmath-renderer class=\"js-display-math\" style=\"display: block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$$x_{k+1} = A(p_k)x_k + B(p_k)u_k$$\u003c/math-renderer\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003cmath-renderer class=\"js-display-math\" style=\"display: block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$$y_k = C(p_k) x_k+D(p_k)u_k$$\u003c/math-renderer\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e(a.k.a. \u003cem\u003eself-scheduled\u003c/em\u003e LPV models) where the scheduling vector \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$p_k$\u003c/math-renderer\u003e is an arbitrary parametric nonlinear function (to be trained) of \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$x_k$\u003c/math-renderer\u003e and \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$u_k$\u003c/math-renderer\u003e\nwith \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$n_p$\u003c/math-renderer\u003e entries\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003cmath-renderer class=\"js-display-math\" style=\"display: block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$$p_k = f(x_k,u_k,\\theta_p)$$\u003c/math-renderer\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eand\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003cmath-renderer class=\"js-display-math\" style=\"display: block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$$A(p_k) = A_{\\rm lin}+\\sum_{i=1}^{n_p} A_i p_{ki},~~B(p_k) = B_{\\rm lin}+\\sum_{i=1}^{n_p} B_i p_{ki}$$\u003c/math-renderer\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003cmath-renderer class=\"js-display-math\" style=\"display: block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$$C(p_k) = C_{\\rm lin}+\\sum_{i=1}^{n_p} C_i p_{ki},~~D(p_k) = D_{\\rm lin}+\\sum_{i=1}^{n_p} D_i p_{ki}$$\u003c/math-renderer\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eFor both LTI and qLPV models, \u003cstrong\u003ejax-sysid\u003c/strong\u003e must enable the feedthrough term \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$D(p_k)=0$\u003c/math-renderer\u003e by specifying the flag \u003ccode\u003efeedthrough=True\u003c/code\u003e when defining the model (by default, no feedthrough is in place). Moreover, for all linear, nonlinear, and qLPV models, one can force \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$y_k=[I\\ 0]x_k$\u003c/math-renderer\u003e by specifying \u003ccode\u003ey_in_x=True\u003c/code\u003e in the object constructor.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eLet's train a quasi-LPV model on a sequence of inputs \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$U=[u_0\\ \\ldots\\ u_{N-1}]'$\u003c/math-renderer\u003e and output \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$Y=[y_0\\ \\ldots\\ y_{N-1}]'$\u003c/math-renderer\u003e, with scheduling parameter function \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$f(x,u,\\theta_p)$\u003c/math-renderer\u003e = \u003ccode\u003eqlpv_fcn\u003c/code\u003e, initial parameters \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$\\theta_p$\u003c/math-renderer\u003e = \u003ccode\u003eqlpv_params_init\u003c/code\u003e, regularization \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$\\rho_\\theta=10^{-2}$\u003c/math-renderer\u003e, \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$\\rho_{x_0}=10^{-3}$\u003c/math-renderer\u003e, running the L-BFGS solver for at most 1000 function evaluations:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"from jax_sysid.models import qLPVModel\n\nmodel = qLPVModel(nx, ny, nu, npar, qlpv_fcn, qlpv_params_init)\n\nmodel.loss(rho_x0=1.e-3, rho_th=1.e-2) \nmodel.optimization(lbfgs_epochs=1000) \nmodel.fit(Ys, Us, LTI_training=True)\nYhat, Xhat = model.predict(model.x0, U)\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ejax_sysid\u003c/span\u003e.\u003cspan class=\"pl-s1\"\u003emodels\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eqLPVModel\u003c/span\u003e\n\n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eqLPVModel\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003enx\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eny\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003enu\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003enpar\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eqlpv_fcn\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eqlpv_params_init\u003c/span\u003e)\n\n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eloss\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003erho_x0\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1.e-3\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003erho_th\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1.e-2\u003c/span\u003e) \n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eoptimization\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003elbfgs_epochs\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1000\u003c/span\u003e) \n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003efit\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003eYs\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eUs\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eLTI_training\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e)\n\u003cspan class=\"pl-v\"\u003eYhat\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eXhat\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003epredict\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003ex0\u003c/span\u003e, \u003cspan class=\"pl-c1\"\u003eU\u003c/span\u003e)\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003ewhere \u003ccode\u003eUs\u003c/code\u003e, \u003ccode\u003eYs\u003c/code\u003e are the scaled input and output signals. The flag \u003ccode\u003eLTI_training=True\u003c/code\u003e forces the training algorithm to initialize \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$A_{\\rm lin},B_{\\rm lin},C_{\\rm lin},D_{\\rm lin}$\u003c/math-renderer\u003e\nby first fitting an LTI model.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eAfter identifying the model, to retrieve the resulting matrices \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$A_{\\rm lin}$\u003c/math-renderer\u003e, \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$B_{\\rm lin}$\u003c/math-renderer\u003e, \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$C_{\\rm lin}$\u003c/math-renderer\u003e, \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$D_{\\rm lin}$\u003c/math-renderer\u003e, \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e${A_i}$\u003c/math-renderer\u003e, \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e${B_i}$\u003c/math-renderer\u003e, \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e${C_i}$\u003c/math-renderer\u003e, \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e${D_i}$\u003c/math-renderer\u003e, \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$i=1,\\ldots,n_p$\u003c/math-renderer\u003e, you can use the following:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"A, B, C, D, Ap, Bp, Cp, Dp = model.ssdata()\"\u003e\u003cpre\u003e\u003cspan class=\"pl-c1\"\u003eA\u003c/span\u003e, \u003cspan class=\"pl-c1\"\u003eB\u003c/span\u003e, \u003cspan class=\"pl-c1\"\u003eC\u003c/span\u003e, \u003cspan class=\"pl-c1\"\u003eD\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eAp\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eBp\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eCp\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eDp\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003essdata\u003c/span\u003e()\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003ewhere \u003ccode\u003eAp\u003c/code\u003e, \u003ccode\u003eBp\u003c/code\u003e, \u003ccode\u003eCp\u003c/code\u003e, \u003ccode\u003eDp\u003c/code\u003e are tensors (3D matrices) containing the corresponding linear matrices, i.e., \u003ccode\u003eAp[i,:,:]\u003c/code\u003e=$A_i$,\n\u003ccode\u003eBp[i,:,:]\u003c/code\u003e=$B_i$, \u003ccode\u003eCp[i,:,:]\u003c/code\u003e=$C_i$, \u003ccode\u003eDp[i,:,:]\u003c/code\u003e=$D_i$.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eTo attempt to reduce the number of scheduling variables in the model, you can use group-Lasso regularization as follows:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"model.loss(rho_x0=1.e-3, rho_th=1.e-2, tau_g=0.1) \nmodel.group_lasso_p()\nmodel.fit(Ys, Us)\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eloss\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003erho_x0\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1.e-3\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003erho_th\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1.e-2\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003etau_g\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e0.1\u003c/span\u003e) \n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003egroup_lasso_p\u003c/span\u003e()\n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003efit\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003eYs\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eUs\u003c/span\u003e)\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eEach group \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$i=1,\\ldots,n_p$\u003c/math-renderer\u003e collects the entries of \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$(A_i, B_i, C_i, D_i)$\u003c/math-renderer\u003e and \u003ccode\u003etau_g\u003c/code\u003e is the weight associated with the corresponding group-Lasso penalty.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eParallel training from different initial guesses is also supported for qLPV models. To this end, you must define a function \u003ccode\u003eqlpv_param_init_fcn(seed)\u003c/code\u003e that initializes the parameter vector \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$\\theta_p$\u003c/math-renderer\u003e of the scheduling function for a given \u003ccode\u003eseed\u003c/code\u003e. For example,\nyou can train the model for 10 different random seeds on 10 jobs by running:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"models = model.parallel_fit(Y, U, qlpv_param_init_fcn=qlpv_param_init_fcn, seeds=range(10), n_jobs=10)\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003emodels\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eparallel_fit\u003c/span\u003e(\u003cspan class=\"pl-c1\"\u003eY\u003c/span\u003e, \u003cspan class=\"pl-c1\"\u003eU\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eqlpv_param_init_fcn\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eqlpv_param_init_fcn\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eseeds\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-en\"\u003erange\u003c/span\u003e(\u003cspan class=\"pl-c1\"\u003e10\u003c/span\u003e), \u003cspan class=\"pl-s1\"\u003en_jobs\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e10\u003c/span\u003e)\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e\u003cem\u003eExternally scheduled\u003c/em\u003e LPV models, in which \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$p_k$\u003c/math-renderer\u003e is an exogenous signal,\ncan be modeled by simply extending the input signal to also include \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$p_k$\u003c/math-renderer\u003e\nand defining \u003ccode\u003eqlpv_fcn\u003c/code\u003e as \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$f(x,[u\\ p],\\theta_p)=p$\u003c/math-renderer\u003e. In this case, \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$\\theta_p$\u003c/math-renderer\u003e is empty,\nas there is no parameter to tune in the scheduling parameter function.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003ca name=\"user-content-continuous-time\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eContinuous-time models\u003c/h3\u003e\u003ca id=\"user-content-continuous-time-models\" class=\"anchor\" aria-label=\"Permalink: Continuous-time models\" href=\"#continuous-time-models\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch4 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eTraining continuous-time models\u003c/h4\u003e\u003ca id=\"user-content-training-continuous-time-models\" class=\"anchor\" aria-label=\"Permalink: Training continuous-time models\" href=\"#training-continuous-time-models\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003ejax-sysid\u003c/strong\u003e supports the identification of general parametric nonlinear continuous-time models\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003cmath-renderer class=\"js-display-math\" style=\"display: block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$$\\frac{dx(t)}{dt} = f_x(x(t),u(t),t,\\theta)$$\u003c/math-renderer\u003e\n\u003cmath-renderer class=\"js-display-math\" style=\"display: block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$$y_k = f_y(x(t),u(t),t,\\theta)$$\u003c/math-renderer\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eby using the package \u003ccode\u003ediffrax\u003c/code\u003e (Kidger, 2021) for the integration of ordinary differential equations.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThe default loss function is\n\u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$$\\frac{1}{t_{end}-t_{init}}\\int_{t_{init}}^{t_{end}}(\\hat y(t)-y(t))^2 dt$$\u003c/math-renderer\u003e\nwhere \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$t_{init}$\u003c/math-renderer\u003e and \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$t_{end}$\u003c/math-renderer\u003e are the initial and final time over which the training dataset is defined.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eLinear time-invariant continuous-time models are a special case in which\n\u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$$f_x(x(t),u(t),t,\\theta)=Ax(t)+Bu(t)$$\u003c/math-renderer\u003e\n\u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$$f_y(x(t),u(t),t,\\theta)=Cx(t)+Du(t)$$\u003c/math-renderer\u003e\nwith \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$\\theta=(A,B,C,D)$\u003c/math-renderer\u003e.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eYou can train a continuous time model with \u003ccode\u003enx\u003c/code\u003e states, \u003ccode\u003eny\u003c/code\u003e outputs, and \u003ccode\u003enu\u003c/code\u003e inputs as follows:\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"from jax_sysid import CTModel\nmodel = CTModel(nx, ny, nu, state_fcn=state_fcn, output_fcn=output_fcn)\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003efrom jax_sysid import CTModel\nmodel = CTModel(nx, ny, nu, state_fcn=state_fcn, output_fcn=output_fcn)\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003ewhere \u003ccode\u003estate_fcn(x, u, t, params)\u003c/code\u003e defines the state update \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$\\frac{dx(t)}{dt}$\u003c/math-renderer\u003e and\n\u003ccode\u003eoutput_fcn(x, u, t, params)\u003c/code\u003e the output \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$y(t)$\u003c/math-renderer\u003e.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThen, run\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"model.init(params) # initial values of the parameters\nmodel.fit(Y, U, T)\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003emodel.init(params) # initial values of the parameters\nmodel.fit(Y, U, T)\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eBy default, the integration method \u003ccode\u003ediffrax.Heun()\u003c/code\u003e is employed, with an integration step equal to (\u003ccode\u003eT[1]-T[0]\u003c/code\u003e)/10\nand the input signal \u003ccode\u003eU\u003c/code\u003e is modeled in continuous-time by assuming that a zero-order hold (ZOH) keeps the\nsamples \u003ccode\u003eU[k]\u003c/code\u003e constant over each time interval in \u003ccode\u003eT\u003c/code\u003e.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eTo change integration options, such as to use a different integration solver like \u003ccode\u003ediffrax.Euler()\u003c/code\u003e, \u003ccode\u003ediffrax.Dopri5()\u003c/code\u003e, etc., you must call\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"model.integration_options(ode_solver=diffrax.Dopri5())\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003emodel.integration_options(ode_solver=diffrax.Dopri5())\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eAfter training, predictions can be obtained by running\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"Y, X = model.predict(model.x0, U, T)\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003eY, X = model.predict(model.x0, U, T)\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eYou can reconstruct an initial state on test data by running\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"x0_test = model.learn_x0(U_test, Y_test, T_test)\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003ex0_test = model.learn_x0(U_test, Y_test, T_test)\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eTo specify that the input signal is sampled at different time instants, you must use an extra input argument to specify the array of time instants at which the input is sampled:\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"model.fit(Y, U, T, Tu)\nx0_test = model.learn_x0(U_test, Y_test, T_test, Tu_test)\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003emodel.fit(Y, U, T, Tu)\nx0_test = model.learn_x0(U_test, Y_test, T_test, Tu_test)\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e\u003ca name=\"user-content-static\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eStatic models\u003c/h3\u003e\u003ca id=\"user-content-static-models\" class=\"anchor\" aria-label=\"Permalink: Static models\" href=\"#static-models\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch4 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eNonlinear regression\u003c/h4\u003e\u003ca id=\"user-content-nonlinear-regression\" class=\"anchor\" aria-label=\"Permalink: Nonlinear regression\" href=\"#nonlinear-regression\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe same optimization algorithms used to train dynamical models can be used to train static models, i.e., to solve the nonlinear regression problem:\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003cmath-renderer class=\"js-display-math\" style=\"display: block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$$ \\min_{z}r(z)+\\frac{1}{N}\\sum_{k=0}^{N-1} |y_{k}-f(u_k,\\theta)|_2^2$$\u003c/math-renderer\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003ewhere \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$z=\\theta$\u003c/math-renderer\u003e is the vector of model parameters to train and \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$r(z)$\u003c/math-renderer\u003e admits the same\nregularization terms as in the case of dynamical models.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eFor example, if the model is a shallow neural network you can use the following code:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"from jax_sysid.models import StaticModel\nfrom jax_sysid.utils import standard_scale, unscale\n\n@jax.jit\ndef output_fcn(u, params):\n W1,b1,W2,b2=params\n y = W1@u.T+b1\n y = W2@jnp.arctan(y)+b2\n return y.T\nmodel = StaticModel(ny, nu, output_fcn)\nnn=10 # number of neurons\nmodel.init(params=[np.random.randn(nn,nu), np.random.randn(nn,1), np.random.randn(1,nn), np.random.randn(1,1)])\nmodel.loss(rho_th=1.e-4, tau_th=tau_th) \nmodel.optimization(lbfgs_epochs=500) \nmodel.fit(Ys, Us)\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ejax_sysid\u003c/span\u003e.\u003cspan class=\"pl-s1\"\u003emodels\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eStaticModel\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ejax_sysid\u003c/span\u003e.\u003cspan class=\"pl-s1\"\u003eutils\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003estandard_scale\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eunscale\u003c/span\u003e\n\n\u003cspan class=\"pl-en\"\u003e@\u003cspan class=\"pl-s1\"\u003ejax\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003ejit\u003c/span\u003e\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eoutput_fcn\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eu\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eparams\u003c/span\u003e):\n \u003cspan class=\"pl-v\"\u003eW1\u003c/span\u003e,\u003cspan class=\"pl-s1\"\u003eb1\u003c/span\u003e,\u003cspan class=\"pl-v\"\u003eW2\u003c/span\u003e,\u003cspan class=\"pl-s1\"\u003eb2\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eparams\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003ey\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eW1\u003c/span\u003e@\u003cspan class=\"pl-s1\"\u003eu\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eT\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e+\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eb1\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003ey\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eW2\u003c/span\u003e@\u003cspan class=\"pl-s1\"\u003ejnp\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003earctan\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003ey\u003c/span\u003e)\u003cspan class=\"pl-c1\"\u003e+\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eb2\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003ereturn\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ey\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eT\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eStaticModel\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eny\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003enu\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eoutput_fcn\u003c/span\u003e)\n\u003cspan class=\"pl-s1\"\u003enn\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e10\u003c/span\u003e \u003cspan class=\"pl-c\"\u003e# number of neurons\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003einit\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eparams\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e[\u003cspan class=\"pl-s1\"\u003enp\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erandom\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erandn\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003enn\u003c/span\u003e,\u003cspan class=\"pl-s1\"\u003enu\u003c/span\u003e), \u003cspan class=\"pl-s1\"\u003enp\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erandom\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erandn\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003enn\u003c/span\u003e,\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e), \u003cspan class=\"pl-s1\"\u003enp\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erandom\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erandn\u003c/span\u003e(\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\u003cspan class=\"pl-s1\"\u003enn\u003c/span\u003e), \u003cspan class=\"pl-s1\"\u003enp\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erandom\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erandn\u003c/span\u003e(\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e)])\n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eloss\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003erho_th\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1.e-4\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003etau_th\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003etau_th\u003c/span\u003e) \n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eoptimization\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003elbfgs_epochs\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e500\u003c/span\u003e) \n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003efit\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003eYs\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eUs\u003c/span\u003e)\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003ejax-sysid\u003c/strong\u003e also supports feedforward neural networks defined via the \u003cstrong\u003eflax.linen\u003c/strong\u003e library:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"from jax_sysid.models import FNN\nfrom flax import linen as nn \n\n# output function\nclass FY(nn.Module):\n @nn.compact\n def __call__(self, x):\n x = nn.Dense(features=20)(x)\n x = nn.tanh(x)\n x = nn.Dense(features=20)(x)\n x = nn.tanh(x)\n x = nn.Dense(features=ny)(x)\n return x\n \nmodel = FNN(ny, nu, FY)\nmodel.loss(rho_th=1.e-4, tau_th=tau_th)\nmodel.optimization(lbfgs_epochs=500)\nmodel.fit(Ys, Us)\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ejax_sysid\u003c/span\u003e.\u003cspan class=\"pl-s1\"\u003emodels\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003eFNN\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eflax\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003elinen\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eas\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003enn\u003c/span\u003e \n\n\u003cspan class=\"pl-c\"\u003e# output function\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003eclass\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003eFY\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003enn\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eModule\u003c/span\u003e):\n \u003cspan class=\"pl-en\"\u003e@\u003cspan class=\"pl-s1\"\u003enn\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003ecompact\u003c/span\u003e\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003e__call__\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eself\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e):\n \u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003enn\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eDense\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003efeatures\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e20\u003c/span\u003e)(\u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e)\n \u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003enn\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003etanh\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e)\n \u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003enn\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eDense\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003efeatures\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e20\u003c/span\u003e)(\u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e)\n \u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003enn\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003etanh\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e)\n \u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003enn\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eDense\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003efeatures\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eny\u003c/span\u003e)(\u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e)\n \u003cspan class=\"pl-k\"\u003ereturn\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e\n \n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eFNN\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eny\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003enu\u003c/span\u003e, \u003cspan class=\"pl-c1\"\u003eFY\u003c/span\u003e)\n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eloss\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003erho_th\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1.e-4\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003etau_th\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003etau_th\u003c/span\u003e)\n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eoptimization\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003elbfgs_epochs\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e500\u003c/span\u003e)\n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003efit\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003eYs\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eUs\u003c/span\u003e)\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eTo include lower and upper bounds on the parameters of the model, use the following additional arguments when specifying the optimization problem:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"model.optimization(lbfgs_epochs=500, params_min=lb, params_max=ub)\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eoptimization\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003elbfgs_epochs\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e500\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eparams_min\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003elb\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eparams_max\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eub\u003c/span\u003e)\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003ewhere \u003ccode\u003elb\u003c/code\u003e and \u003ccode\u003eub\u003c/code\u003e are lists of arrays with the same structure as \u003ccode\u003emodel.params\u003c/code\u003e. See \u003ccode\u003eexample_static_convex.py\u003c/code\u003e for examples of how to use nonnegative constraints to fit input-convex neural networks.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch4 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eClassification\u003c/h4\u003e\u003ca id=\"user-content-classification\" class=\"anchor\" aria-label=\"Permalink: Classification\" href=\"#classification\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eTo solve classification problems, you need to define a custom loss function to change the default Mean-Squared-Error loss. For example, to train a classifier for a multi-category classification problem with \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$K$\u003c/math-renderer\u003e classes, you can specify a neural network with a linear output layer generating output predictions \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$\\hat y\\in R^K$\u003c/math-renderer\u003e and define the associated cross-entropy \u003cmath-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"2d8119db95bbf41c1968ed8468bfd33a\"\u003e$\\ell(\\hat y,y) = -\\sum_{k=1}^Ky_k\\log\\left(\\frac{e^{\\hat y_k}}{\\sum_{j=1}^Ke^{\\hat y_j}}\\right)$\u003c/math-renderer\u003e function as follows:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"def cross_entropy(Yhat,Y):\n return -jax.numpy.sum(jax.nn.log_softmax(Yhat, axis=1)*Y)/Y.shape[0] \nmodel.loss(rho_th=1.e-4, output_loss=cross_entropy)\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003ecross_entropy\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003eYhat\u003c/span\u003e,\u003cspan class=\"pl-c1\"\u003eY\u003c/span\u003e):\n \u003cspan class=\"pl-k\"\u003ereturn\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e-\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ejax\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003enumpy\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003esum\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003ejax\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003enn\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003elog_softmax\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003eYhat\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eaxis\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e)\u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eY\u003c/span\u003e)\u003cspan class=\"pl-c1\"\u003e/\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eY\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eshape\u003c/span\u003e[\u003cspan class=\"pl-c1\"\u003e0\u003c/span\u003e] \n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eloss\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003erho_th\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1.e-4\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eoutput_loss\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecross_entropy\u003c/span\u003e)\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eSee \u003ccode\u003eexample_static_fashion_mist.py\u003c/code\u003e for an example using \u003cstrong\u003eKeras\u003c/strong\u003e with JAX backend to define the neural network model.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003ca name=\"user-content-contributors\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eContributors\u003c/h2\u003e\u003ca id=\"user-content-contributors\" class=\"anchor\" aria-label=\"Permalink: Contributors\" href=\"#contributors\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThis package was coded by Alberto Bemporad.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThis software is distributed without any warranty. Please cite the paper below if you use this software.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003ca name=\"user-content-acknowledgments\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eAcknowledgments\u003c/h2\u003e\u003ca id=\"user-content-acknowledgments\" class=\"anchor\" aria-label=\"Permalink: Acknowledgments\" href=\"#acknowledgments\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eWe thank Roland Toth for suggesting the use of Kung's method for initializing linear state-space models and Kui Xie for feedback on the reconstruction of the initial state via EKF + RTS smoothing.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003ca name=\"user-content-bibliography\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eCiting jax-sysid\u003c/h2\u003e\u003ca id=\"user-content-citing-jax-sysid\" class=\"anchor\" aria-label=\"Permalink: Citing jax-sysid\" href=\"#citing-jax-sysid\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e\u003ca name=\"user-content-ref1\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"@article{Bem25,\n author={A. Bemporad},\n title={An {L-BFGS-B} approach for linear and nonlinear system identification under $\\ell_1$ and group-Lasso regularization},\n journal = {IEEE Transactions on Automatic Control},\n note = {in press. Also available on arXiv at \\url{http://arxiv.org/abs/2403.03827}},\n year=2025\n}\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003e@article{Bem25,\n author={A. Bemporad},\n title={An {L-BFGS-B} approach for linear and nonlinear system identification under $\\ell_1$ and group-Lasso regularization},\n journal = {IEEE Transactions on Automatic Control},\n note = {in press. Also available on arXiv at \\url{http://arxiv.org/abs/2403.03827}},\n year=2025\n}\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e\u003ca name=\"user-content-license\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eLicense\u003c/h2\u003e\u003ca id=\"user-content-license\" class=\"anchor\" aria-label=\"Permalink: License\" href=\"#license\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eApache 2.0\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e(C) 2024 A. Bemporad\u003c/p\u003e\n\u003c/article\u003e","loaded":true,"timedOut":false,"errorMessage":null,"headerInfo":{"toc":[{"level":1,"text":"Contents","anchor":"contents","htmlText":"Contents"},{"level":2,"text":"Package description","anchor":"package-description","htmlText":"Package description"},{"level":2,"text":"Installation","anchor":"installation","htmlText":"Installation"},{"level":2,"text":"Basic usage","anchor":"basic-usage","htmlText":"Basic usage"},{"level":3,"text":"Linear state-space models","anchor":"linear-state-space-models","htmlText":"Linear state-space models"},{"level":4,"text":"Training linear models","anchor":"training-linear-models","htmlText":"Training linear models"},{"level":4,"text":"L1- and group-Lasso regularization","anchor":"l1--and-group-lasso-regularization","htmlText":"L1- and group-Lasso regularization"},{"level":4,"text":"Multiple experiments","anchor":"multiple-experiments","htmlText":"Multiple experiments"},{"level":4,"text":"Stability","anchor":"stability","htmlText":"Stability"},{"level":4,"text":"Static gain","anchor":"static-gain","htmlText":"Static gain"},{"level":3,"text":"Nonlinear system identification and RNNs","anchor":"nonlinear-system-identification-and-rnns","htmlText":"Nonlinear system identification and RNNs"},{"level":4,"text":"Training nonlinear models","anchor":"training-nonlinear-models","htmlText":"Training nonlinear models"},{"level":4,"text":"Parallel training","anchor":"parallel-training","htmlText":"Parallel training"},{"level":4,"text":"flax.linen models","anchor":"flaxlinen-models","htmlText":"flax.linen models"},{"level":4,"text":"Custom output loss","anchor":"custom-output-loss","htmlText":"Custom output loss"},{"level":4,"text":"Custom regularization","anchor":"custom-regularization","htmlText":"Custom regularization"},{"level":4,"text":"Static gain","anchor":"static-gain-1","htmlText":"Static gain"},{"level":4,"text":"Upper and lower bounds","anchor":"upper-and-lower-bounds","htmlText":"Upper and lower bounds"},{"level":3,"text":"Linear Parameter-Varying (LPV) models","anchor":"linear-parameter-varying-lpv-models","htmlText":"Linear Parameter-Varying (LPV) models"},{"level":4,"text":"Training LPV models","anchor":"training-lpv-models","htmlText":"Training LPV models"},{"level":3,"text":"Continuous-time models","anchor":"continuous-time-models","htmlText":"Continuous-time models"},{"level":4,"text":"Training continuous-time models","anchor":"training-continuous-time-models","htmlText":"Training continuous-time models"},{"level":3,"text":"Static models","anchor":"static-models","htmlText":"Static models"},{"level":4,"text":"Nonlinear regression","anchor":"nonlinear-regression","htmlText":"Nonlinear regression"},{"level":4,"text":"Classification","anchor":"classification","htmlText":"Classification"},{"level":2,"text":"Contributors","anchor":"contributors","htmlText":"Contributors"},{"level":2,"text":"Acknowledgments","anchor":"acknowledgments","htmlText":"Acknowledgments"},{"level":2,"text":"Citing jax-sysid","anchor":"citing-jax-sysid","htmlText":"Citing jax-sysid"},{"level":2,"text":"License","anchor":"license","htmlText":"License"}],"siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fbemporad%2Fjax-sysid"}},{"displayName":"LICENSE.txt","repoName":"jax-sysid","refName":"main","path":"LICENSE.txt","preferredFileType":"license","tabName":"Apache-2.0","richText":null,"loaded":false,"timedOut":false,"errorMessage":null,"headerInfo":{"toc":null,"siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fbemporad%2Fjax-sysid"}}],"overviewFilesProcessingTime":0}},"appPayload":{"helpUrl":"https://docs.github.com","findFileWorkerPath":"/assets-cdn/worker/find-file-worker-9f8a877aa99f.js","findInFileWorkerPath":"/assets-cdn/worker/find-in-file-worker-96e76d5fdb2c.js","githubDevUrl":null,"enabled_features":{"copilot_workspace":null,"code_nav_ui_events":false,"overview_shared_code_dropdown_button":false,"react_blob_overlay":false,"copilot_conversational_ux_embedding_update":false,"copilot_smell_icebreaker_ux":true,"accessible_code_button":true}}}}</script> <div data-target="react-partial.reactRoot"><style data-styled="true" data-styled-version="5.3.11">.iVEunk{margin-top:16px;margin-bottom:16px;}/*!sc*/ .jzuOtQ{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;}/*!sc*/ .bGojzy{margin-bottom:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;row-gap:16px;}/*!sc*/ .iNSVHo{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;padding-bottom:16px;padding-top:8px;}/*!sc*/ .bVgnfw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;gap:8px;}/*!sc*/ @media screen and (max-width:320px){.bVgnfw{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}}/*!sc*/ .CEgMp{position:relative;}/*!sc*/ @media screen and (max-width:380px){.CEgMp .ref-selector-button-text-container{max-width:80px;}}/*!sc*/ @media screen and (max-width:320px){.CEgMp{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}.CEgMp .overview-ref-selector{width:100%;}.CEgMp .overview-ref-selector > span{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;}.CEgMp .overview-ref-selector > span > span[data-component="text"]{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}}/*!sc*/ .gMOVLe[data-size="medium"]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;min-width:0;}/*!sc*/ .gMOVLe[data-size="medium"] svg{color:var(--fgColor-muted,var(--color-fg-muted,#656d76));}/*!sc*/ .gMOVLe[data-size="medium"] > span{width:inherit;}/*!sc*/ .gUkoLg{-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}/*!sc*/ .bZBlpz{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:100%;}/*!sc*/ .lhTYNA{margin-right:4px;color:var(--fgColor-muted,var(--color-fg-muted,#656d76));}/*!sc*/ .ffLUq{font-size:14px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}/*!sc*/ .fLXEGX{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}/*!sc*/ @media screen and (max-width:1079px){.fLXEGX{display:none;}}/*!sc*/ .lmSMZJ[data-size="medium"]{color:var(--fgColor-muted,var(--color-fg-muted,#656d76));padding-left:4px;padding-right:4px;}/*!sc*/ .lmSMZJ[data-size="medium"] span[data-component="leadingVisual"]{margin-right:4px !important;}/*!sc*/ .dqfxud{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}/*!sc*/ @media screen and (min-width:1080px){.dqfxud{display:none;}}/*!sc*/ @media screen and (max-width:543px){.dqfxud{display:none;}}/*!sc*/ .fGwBZA[data-size="medium"][data-no-visuals]{color:var(--fgColor-muted,var(--color-fg-muted,#656d76));}/*!sc*/ .jxTzTd{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;padding-left:8px;gap:8px;}/*!sc*/ .gqqBXN{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:8px;}/*!sc*/ @media screen and (max-width:543px){.gqqBXN{display:none;}}/*!sc*/ .dzXgxt{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}/*!sc*/ @media screen and (max-width:1011px){.dzXgxt{display:none;}}/*!sc*/ .iWFGlI{margin-left:8px;margin-right:8px;margin:0;}/*!sc*/ .YUPas{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}/*!sc*/ @media screen and (min-width:1012px){.YUPas{display:none;}}/*!sc*/ .izFOf{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}/*!sc*/ @media screen and (min-width:544px){.izFOf{display:none;}}/*!sc*/ .vIPPs{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;gap:16px;}/*!sc*/ .fdROMU{width:100%;border-collapse:separate;border-spacing:0;border:1px solid;border-color:var(--borderColor-default,var(--color-border-default,#d0d7de));border-radius:6px;table-layout:fixed;overflow:unset;}/*!sc*/ .jGKpsv{height:0px;line-height:0px;}/*!sc*/ .jGKpsv tr{height:0px;font-size:0px;}/*!sc*/ .jdgHnn{padding:16px;color:var(--fgColor-muted,var(--color-fg-muted,#656d76));font-size:12px;text-align:left;height:40px;}/*!sc*/ .jdgHnn th{padding-left:16px;background-color:var(--bgColor-muted,var(--color-canvas-subtle,#f6f8fa));}/*!sc*/ .bQivRW{width:100%;border-top-left-radius:6px;}/*!sc*/ @media screen and (min-width:544px){.bQivRW{display:none;}}/*!sc*/ .ldkMIO{width:40%;border-top-left-radius:6px;}/*!sc*/ @media screen and (max-width:543px){.ldkMIO{display:none;}}/*!sc*/ .jMbWeI{text-align:right;padding-right:16px;width:136px;border-top-right-radius:6px;}/*!sc*/ .gpqjiB{color:var(--fgColor-muted,var(--color-fg-muted,#656d76));font-size:12px;height:40px;}/*!sc*/ .dzCJzi{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;min-width:273px;padding:8px;}/*!sc*/ @media screen and (min-width:544px){.dzCJzi{-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;}}/*!sc*/ .eNCcrz{text-align:center;vertical-align:center;height:40px;border-top:1px solid;border-color:var(--borderColor-default,var(--color-border-default,#d0d7de));}/*!sc*/ .bHTcCe{border-top:1px solid var(--borderColor-default,var(--color-border-default));cursor:pointer;}/*!sc*/ .csrIcr{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;gap:16px;}/*!sc*/ .bUQNHB{border:1px solid;border-color:var(--borderColor-default,var(--color-border-default,#d0d7de));border-radius:6px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}/*!sc*/ @media screen and (max-width:543px){.bUQNHB{margin-left:-16px;margin-right:-16px;max-width:calc(100% + 32px);}}/*!sc*/ @media screen and (min-width:544px){.bUQNHB{max-width:100%;}}/*!sc*/ .jPdcfu{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;border-bottom:1px solid;border-bottom-color:var(--borderColor-default,var(--color-border-default,#d0d7de));-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-right:8px;position:-webkit-sticky;position:sticky;top:0;background-color:var(--bgColor-default,var(--color-canvas-default,#ffffff));z-index:1;border-top-left-radius:6px;border-top-right-radius:6px;}/*!sc*/ .hUCRAk{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}/*!sc*/ .cwoBXV[data-size="medium"]{color:var(--fgColor-muted,var(--color-fg-subtle,#6e7781));padding-left:8px;padding-right:8px;}/*!sc*/ .QkQOb{padding:32px;overflow:auto;}/*!sc*/ data-styled.g1[id="Box-sc-g0xbh4-0"]{content:"iVEunk,jzuOtQ,bGojzy,iNSVHo,bVgnfw,CEgMp,gMOVLe,gUkoLg,bZBlpz,lhTYNA,ffLUq,fLXEGX,lmSMZJ,dqfxud,fGwBZA,jxTzTd,gqqBXN,dzXgxt,iWFGlI,YUPas,izFOf,vIPPs,fdROMU,jGKpsv,jdgHnn,bQivRW,ldkMIO,jMbWeI,gpqjiB,dzCJzi,eNCcrz,bHTcCe,csrIcr,bUQNHB,jPdcfu,hUCRAk,cwoBXV,QkQOb,"}/*!sc*/ .eMMFM{min-width:0;}/*!sc*/ .eMMFM:where([data-size='small']){font-size:var(--text-body-size-small,0.75rem);line-height:var(--text-body-lineHeight-small,1.6666);}/*!sc*/ .eMMFM:where([data-size='medium']){font-size:var(--text-body-size-medium,0.875rem);line-height:var(--text-body-lineHeight-medium,1.4285);}/*!sc*/ .eMMFM:where([data-size='large']){font-size:var(--text-body-size-large,1rem);line-height:var(--text-body-lineHeight-large,1.5);}/*!sc*/ .eMMFM:where([data-weight='light']){font-weight:var(--base-text-weight-light,300);}/*!sc*/ .eMMFM:where([data-weight='normal']){font-weight:var(--base-text-weight-normal,400);}/*!sc*/ .eMMFM:where([data-weight='medium']){font-weight:var(--base-text-weight-medium,500);}/*!sc*/ .eMMFM:where([data-weight='semibold']){font-weight:var(--base-text-weight-semibold,600);}/*!sc*/ data-styled.g3[id="Text__StyledText-sc-17v1xeu-0"]{content:"eMMFM,"}/*!sc*/ .brGdpi{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;-webkit-clip:rect(0,0,0,0);clip:rect(0,0,0,0);white-space:nowrap;border-width:0;}/*!sc*/ data-styled.g4[id="_VisuallyHidden__VisuallyHidden-sc-11jhm7a-0"]{content:"brGdpi,"}/*!sc*/ .jkNcAv{border:0;font-size:inherit;font-family:inherit;background-color:transparent;-webkit-appearance:none;color:inherit;width:100%;}/*!sc*/ .jkNcAv:focus{outline:0;}/*!sc*/ data-styled.g13[id="UnstyledTextInput__ToggledUnstyledTextInput-sc-14ypya-0"]{content:"jkNcAv,"}/*!sc*/ .hLzFvi{font-size:14px;line-height:var(--base-size-20);color:var(--fgColor-default,var(--color-fg-default,#1F2328));vertical-align:middle;background-color:var(--bgColor-default,var(--color-canvas-default,#ffffff));border:1px solid var(--control-borderColor-rest,var(--borderColor-default,var(--color-border-default,#d0d7de)));border-radius:6px;outline:none;box-shadow:var(--shadow-inset,var(--color-primer-shadow-inset,inset 0 1px 0 rgba(208,215,222,0.2)));display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:stretch;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;min-height:var(--base-size-32);overflow:hidden;--inner-action-size:var(--base-size-24);}/*!sc*/ .hLzFvi input,.hLzFvi textarea{cursor:text;}/*!sc*/ .hLzFvi select{cursor:pointer;}/*!sc*/ .hLzFvi input::-webkit-input-placeholder,.hLzFvi textarea::-webkit-input-placeholder,.hLzFvi select::-webkit-input-placeholder{color:var(---control-fgColor-placeholder,var(--fgColor-muted,var(--color-fg-muted,#656d76)));}/*!sc*/ .hLzFvi input::-moz-placeholder,.hLzFvi textarea::-moz-placeholder,.hLzFvi select::-moz-placeholder{color:var(---control-fgColor-placeholder,var(--fgColor-muted,var(--color-fg-muted,#656d76)));}/*!sc*/ .hLzFvi input:-ms-input-placeholder,.hLzFvi textarea:-ms-input-placeholder,.hLzFvi select:-ms-input-placeholder{color:var(---control-fgColor-placeholder,var(--fgColor-muted,var(--color-fg-muted,#656d76)));}/*!sc*/ .hLzFvi input::placeholder,.hLzFvi textarea::placeholder,.hLzFvi select::placeholder{color:var(---control-fgColor-placeholder,var(--fgColor-muted,var(--color-fg-muted,#656d76)));}/*!sc*/ .hLzFvi:where([data-trailing-action][data-focused]),.hLzFvi:where(:not([data-trailing-action]):focus-within){border-color:var(--fgColor-accent,var(--color-accent-fg,#0969da));outline:2px solid var(--fgColor-accent,var(--color-accent-fg,#0969da));outline-offset:-1px;}/*!sc*/ .hLzFvi > textarea{padding:var(--base-size-12);}/*!sc*/ .hLzFvi:where([data-contrast]){background-color:var(--bgColor-inset,var(--color-canvas-inset,#f6f8fa));}/*!sc*/ .hLzFvi:where([data-disabled]){color:var(--fgColor-disabled,var(--color-primer-fg-disabled,#8c959f));background-color:var(--control-bgColor-disabled,var(--color-input-disabled-bg,rgba(175,184,193,0.2)));box-shadow:none;border-color:var(--control-borderColor-disabled,var(--borderColor-default,var(--color-border-default,#d0d7de)));}/*!sc*/ .hLzFvi:where([data-disabled]) input,.hLzFvi:where([data-disabled]) textarea,.hLzFvi:where([data-disabled]) select{cursor:not-allowed;}/*!sc*/ .hLzFvi:where([data-monospace]){font-family:var(--fontStack-monospace,SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace);}/*!sc*/ .hLzFvi:where([data-validation='error']){border-color:var(--borderColor-danger-emphasis,var(--color-danger-emphasis,#cf222e));}/*!sc*/ .hLzFvi:where([data-validation='error']):where([data-trailing-action][data-focused]),.hLzFvi:where([data-validation='error']):where(:not([data-trailing-action])):focus-within{border-color:var(--fgColor-accent,var(--color-accent-fg,#0969da));outline:2px solid var(--fgColor-accent,var(--color-accent-fg,#0969da));outline-offset:-1px;}/*!sc*/ .hLzFvi:where([data-validation='success']){border-color:var(--bgColor-success-emphasis,var(--color-success-emphasis,#1f883d));}/*!sc*/ .hLzFvi:where([data-block]){width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-self:stretch;-ms-flex-item-align:stretch;align-self:stretch;}/*!sc*/ @media (min-width:768px){.hLzFvi{font-size:var(--text-body-size-medium);}}/*!sc*/ .hLzFvi:where([data-size='small']){--inner-action-size:var(--base-size-20);min-height:var(--base-size-28);padding-top:3px;padding-right:var(--base-size-8);padding-bottom:3px;padding-left:var(--base-size-8);font-size:var(--text-body-size-small);line-height:var(--base-size-20);}/*!sc*/ .hLzFvi:where([data-size='large']){--inner-action-size:var(--base-size-28);height:var(--base-size-40);padding-top:10px;padding-right:var(--base-size-8);padding-bottom:10px;padding-left:var(--base-size-8);}/*!sc*/ .hLzFvi:where([data-variant='small']){min-height:28px;padding-top:3px;padding-right:var(--base-size-8);padding-bottom:3px;padding-left:var(--base-size-8);font-size:(--text-body-size-small);line-height:var(--base-size-20);}/*!sc*/ .hLzFvi:where([data-variant='large']){padding-top:10px;padding-right:var(--base-size-8);padding-bottom:10px;padding-left:var(--base-size-8);font-size:var(--text-title-size-medium);}/*!sc*/ .hLzFvi{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;min-width:160px;}/*!sc*/ data-styled.g14[id="TextInputWrapper__StyledTextInputBaseWrapper-sc-1mqhpbi-0"]{content:"hLzFvi,"}/*!sc*/ .iHYdQq{background-repeat:no-repeat;background-position:right 8px center;padding-right:0;padding-left:0;}/*!sc*/ .iHYdQq > :not(:last-child){margin-right:8px;}/*!sc*/ .iHYdQq .TextInput-icon,.iHYdQq .TextInput-action{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;color:var(--fgColor-muted,var(--color-fg-muted,#656d76));-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;}/*!sc*/ .iHYdQq > input,.iHYdQq > select{padding-right:0;padding-left:0;}/*!sc*/ .iHYdQq:where([data-leading-visual]){padding-left:var(--base-size-12);}/*!sc*/ .iHYdQq:where([data-trailing-visual]:not([data-trailing-action])){padding-right:var(--base-size-12);}/*!sc*/ .iHYdQq:where(:not([data-leading-visual])) > input,.iHYdQq:where(:not([data-leading-visual])) > select{padding-left:var(--base-size-12);}/*!sc*/ .iHYdQq:where(:not([data-trailing-visual]):not([data-trailing-action])) > input,.iHYdQq:where(:not([data-trailing-visual]):not([data-trailing-action])) > select{padding-right:var(--base-size-12);}/*!sc*/ .iHYdQq{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;min-width:160px;}/*!sc*/ data-styled.g15[id="TextInputWrapper__StyledTextInputWrapper-sc-1mqhpbi-1"]{content:"iHYdQq,"}/*!sc*/ .hWlpPn{position:relative;display:inline-block;}/*!sc*/ .hWlpPn::after{position:absolute;z-index:1000000;display:none;padding:0.5em 0.75em;font:normal normal 11px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";-webkit-font-smoothing:subpixel-antialiased;color:var(--tooltip-fgColor,var(--fgColor-onEmphasis,var(--color-fg-on-emphasis,#ffffff)));text-align:center;-webkit-text-decoration:none;text-decoration:none;text-shadow:none;text-transform:none;-webkit-letter-spacing:normal;-moz-letter-spacing:normal;-ms-letter-spacing:normal;letter-spacing:normal;word-wrap:break-word;white-space:pre;pointer-events:none;content:attr(aria-label);background:var(--tooltip-bgColor,var(--bgColor-emphasis,var(--color-neutral-emphasis-plus,#24292f)));border-radius:6px;opacity:0;}/*!sc*/ @-webkit-keyframes tooltip-appear{from{opacity:0;}to{opacity:1;}}/*!sc*/ @keyframes tooltip-appear{from{opacity:0;}to{opacity:1;}}/*!sc*/ .hWlpPn:hover::after,.hWlpPn:active::after,.hWlpPn:focus::after,.hWlpPn:focus-within::after{display:inline-block;-webkit-text-decoration:none;text-decoration:none;-webkit-animation-name:tooltip-appear;animation-name:tooltip-appear;-webkit-animation-duration:0.1s;animation-duration:0.1s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;-webkit-animation-delay:0s;animation-delay:0s;}/*!sc*/ .hWlpPn.tooltipped-no-delay:hover::after,.hWlpPn.tooltipped-no-delay:active::after,.hWlpPn.tooltipped-no-delay:focus::after,.hWlpPn.tooltipped-no-delay:focus-within::after{-webkit-animation-delay:0s;animation-delay:0s;}/*!sc*/ .hWlpPn.tooltipped-multiline:hover::after,.hWlpPn.tooltipped-multiline:active::after,.hWlpPn.tooltipped-multiline:focus::after,.hWlpPn.tooltipped-multiline:focus-within::after{display:table-cell;}/*!sc*/ .hWlpPn.tooltipped-s::after,.hWlpPn.tooltipped-se::after,.hWlpPn.tooltipped-sw::after{top:100%;right:50%;margin-top:6px;}/*!sc*/ .hWlpPn.tooltipped-se::after{right:auto;left:50%;margin-left:-16px;}/*!sc*/ .hWlpPn.tooltipped-sw::after{margin-right:-16px;}/*!sc*/ .hWlpPn.tooltipped-n::after,.hWlpPn.tooltipped-ne::after,.hWlpPn.tooltipped-nw::after{right:50%;bottom:100%;margin-bottom:6px;}/*!sc*/ .hWlpPn.tooltipped-ne::after{right:auto;left:50%;margin-left:-16px;}/*!sc*/ .hWlpPn.tooltipped-nw::after{margin-right:-16px;}/*!sc*/ .hWlpPn.tooltipped-s::after,.hWlpPn.tooltipped-n::after{-webkit-transform:translateX(50%);-ms-transform:translateX(50%);transform:translateX(50%);}/*!sc*/ .hWlpPn.tooltipped-w::after{right:100%;bottom:50%;margin-right:6px;-webkit-transform:translateY(50%);-ms-transform:translateY(50%);transform:translateY(50%);}/*!sc*/ .hWlpPn.tooltipped-e::after{bottom:50%;left:100%;margin-left:6px;-webkit-transform:translateY(50%);-ms-transform:translateY(50%);transform:translateY(50%);}/*!sc*/ .hWlpPn.tooltipped-multiline::after{width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:250px;word-wrap:break-word;white-space:pre-line;border-collapse:separate;}/*!sc*/ .hWlpPn.tooltipped-multiline.tooltipped-s::after,.hWlpPn.tooltipped-multiline.tooltipped-n::after{right:auto;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);}/*!sc*/ .hWlpPn.tooltipped-multiline.tooltipped-w::after,.hWlpPn.tooltipped-multiline.tooltipped-e::after{right:100%;}/*!sc*/ .hWlpPn.tooltipped-align-right-2::after{right:0;margin-right:0;}/*!sc*/ .hWlpPn.tooltipped-align-left-2::after{left:0;margin-left:0;}/*!sc*/ data-styled.g17[id="Tooltip__TooltipBase-sc-17tf59c-0"]{content:"hWlpPn,"}/*!sc*/ .liVpTx{display:inline-block;overflow:hidden;text-overflow:ellipsis;vertical-align:top;white-space:nowrap;max-width:125px;}/*!sc*/ data-styled.g19[id="Truncate__StyledTruncate-sc-23o1d2-0"]{content:"liVpTx,"}/*!sc*/ .eBevHz{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;padding-inline:var(--stack-padding-normal,16px);-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;min-height:var(--control-xlarge-size,48px);box-shadow:inset 0px -1px var(--borderColor-muted,var(--borderColor-muted,var(--color-border-muted,hsla(210,18%,87%,1))));-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;border-bottom:none;max-width:100%;padding-left:8px;padding-right:8px;}/*!sc*/ data-styled.g99[id="UnderlineTabbedInterface__StyledComponentUnderlineWrapper-sc-4ilrg0-0"]{content:"eBevHz,"}/*!sc*/ .ehEdWC{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;list-style:none;white-space:nowrap;padding:0;margin:0;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;position:relative;}/*!sc*/ data-styled.g100[id="UnderlineTabbedInterface__StyledComponentUnderlineItemList-sc-4ilrg0-1"]{content:"ehEdWC,"}/*!sc*/ .beOdPj{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:0;cursor:pointer;font:inherit;position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;color:var(--fgColor-default,var(--color-fg-default,#1F2328));text-align:center;-webkit-text-decoration:none;text-decoration:none;line-height:var(--text-body-lineHeight-medium,1.4285);border-radius:var(--borderRadius-medium,6px);font-size:var(--text-body-size-medium,14px);padding-inline:var(--control-medium-paddingInline-condensed,8px);padding-block:var(--control-medium-paddingBlock,6px);-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}/*!sc*/ @media (hover:hover){.beOdPj:hover{background-color:var(--bgColor-neutral-muted,var(--bgColor-neutral-muted,var(--color-neutral-subtle,rgba(234,238,242,0.5))));-webkit-transition:background 0.12s ease-out;transition:background 0.12s ease-out;-webkit-text-decoration:none;text-decoration:none;}}/*!sc*/ .beOdPj:focus:{outline:2px solid transparent;box-shadow:inset 0 0 0 2px var(--fgColor-accent,var(--fgColor-accent,var(--color-accent-fg,#0969da)));}/*!sc*/ .beOdPj:focus::not(:focus-visible){box-shadow:none;}/*!sc*/ .beOdPj:focus-visible{outline:2px solid transparent;box-shadow:inset 0 0 0 2px var(--fgColor-accent,var(--fgColor-accent,var(--color-accent-fg,#0969da)));}/*!sc*/ .beOdPj [data-content]::before{content:attr(data-content);display:block;height:0;font-weight:var(--base-text-weight-semibold,500);visibility:hidden;white-space:nowrap;}/*!sc*/ .beOdPj [data-component='icon']{color:var(--fgColor-muted,var(--fgColor-muted,var(--color-fg-muted,#656d76)));-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;margin-inline-end:var(--control-medium-gap,8px);}/*!sc*/ .beOdPj [data-component='counter']{margin-inline-start:var(--control-medium-gap,8px);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}/*!sc*/ .beOdPj::after{position:absolute;right:50%;bottom:calc(50% - calc(var(--control-xlarge-size,48px) / 2 + 1px));width:100%;height:2px;content:'';background-color:transparent;border-radius:0;-webkit-transform:translate(50%,-50%);-ms-transform:translate(50%,-50%);transform:translate(50%,-50%);}/*!sc*/ .beOdPj[aria-current]:not([aria-current='false']) [data-component='text'],.beOdPj[aria-selected='true'] [data-component='text']{font-weight:var(--base-text-weight-semibold,500);}/*!sc*/ .beOdPj[aria-current]:not([aria-current='false'])::after,.beOdPj[aria-selected='true']::after{background-color:var(--underlineNav-borderColor-active,var(--color-primer-border-active,#fd8c73));}/*!sc*/ @media (forced-colors:active){.beOdPj[aria-current]:not([aria-current='false'])::after,.beOdPj[aria-selected='true']::after{background-color:LinkText;}}/*!sc*/ data-styled.g101[id="UnderlineTabbedInterface__StyledUnderlineItem-sc-4ilrg0-2"]{content:"beOdPj,"}/*!sc*/ </style> <!-- --> <!-- --> <div class="Box-sc-g0xbh4-0 iVEunk"><div class="Box-sc-g0xbh4-0 jzuOtQ"><div class="Box-sc-g0xbh4-0 bGojzy"></div></div><div class="Box-sc-g0xbh4-0 iNSVHo"><div class="Box-sc-g0xbh4-0 bVgnfw"><div class="Box-sc-g0xbh4-0 CEgMp"><button type="button" aria-haspopup="true" aria-expanded="false" tabindex="0" aria-label="main branch" data-testid="anchor-button" class="Box-sc-g0xbh4-0 gMOVLe prc-Button-ButtonBase-c50BI overview-ref-selector width-full" data-loading="false" data-size="medium" data-variant="default" aria-describedby="branch-picker-repos-header-ref-selector-loading-announcement" id="branch-picker-repos-header-ref-selector"><span data-component="buttonContent" class="Box-sc-g0xbh4-0 gUkoLg prc-Button-ButtonContent-HKbr-"><span data-component="text" class="prc-Button-Label-pTQ3x"><div class="Box-sc-g0xbh4-0 bZBlpz"><div class="Box-sc-g0xbh4-0 lhTYNA"><svg aria-hidden="true" focusable="false" class="octicon octicon-git-branch" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"></path></svg></div><div class="Box-sc-g0xbh4-0 ffLUq ref-selector-button-text-container"><span class="Text__StyledText-sc-17v1xeu-0 eMMFM"> <!-- -->main</span></div></div></span><span data-component="trailingVisual" class="prc-Button-Visual-2epfX prc-Button-VisualWrap-Db-eB"><svg aria-hidden="true" focusable="false" class="octicon octicon-triangle-down" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path></svg></span></span></button><button hidden="" data-hotkey-scope="read-only-cursor-text-area"></button></div><div class="Box-sc-g0xbh4-0 fLXEGX"><a style="--button-color:fg.muted" type="button" href="/bemporad/jax-sysid/branches" class="Box-sc-g0xbh4-0 lmSMZJ prc-Button-ButtonBase-c50BI" data-loading="false" data-size="medium" data-variant="invisible" aria-describedby=":Rclab:-loading-announcement"><span data-component="buttonContent" class="Box-sc-g0xbh4-0 gUkoLg prc-Button-ButtonContent-HKbr-"><span data-component="leadingVisual" class="prc-Button-Visual-2epfX prc-Button-VisualWrap-Db-eB"><svg aria-hidden="true" focusable="false" class="octicon octicon-git-branch" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"></path></svg></span><span data-component="text" class="prc-Button-Label-pTQ3x">Branches</span></span></a><a style="--button-color:fg.muted" type="button" href="/bemporad/jax-sysid/tags" class="Box-sc-g0xbh4-0 lmSMZJ prc-Button-ButtonBase-c50BI" data-loading="false" data-size="medium" data-variant="invisible" aria-describedby=":Rklab:-loading-announcement"><span data-component="buttonContent" class="Box-sc-g0xbh4-0 gUkoLg prc-Button-ButtonContent-HKbr-"><span data-component="leadingVisual" class="prc-Button-Visual-2epfX prc-Button-VisualWrap-Db-eB"><svg aria-hidden="true" focusable="false" class="octicon octicon-tag" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M1 7.775V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 0 1 0 2.474l-5.026 5.026a1.75 1.75 0 0 1-2.474 0l-6.25-6.25A1.752 1.752 0 0 1 1 7.775Zm1.5 0c0 .066.026.13.073.177l6.25 6.25a.25.25 0 0 0 .354 0l5.025-5.025a.25.25 0 0 0 0-.354l-6.25-6.25a.25.25 0 0 0-.177-.073H2.75a.25.25 0 0 0-.25.25ZM6 5a1 1 0 1 1 0 2 1 1 0 0 1 0-2Z"></path></svg></span><span data-component="text" class="prc-Button-Label-pTQ3x">Tags</span></span></a></div><div class="Box-sc-g0xbh4-0 dqfxud"><a style="--button-color:fg.muted" type="button" aria-label="Go to Branches page" href="/bemporad/jax-sysid/branches" class="Box-sc-g0xbh4-0 fGwBZA prc-Button-ButtonBase-c50BI" data-loading="false" data-no-visuals="true" data-size="medium" data-variant="invisible" aria-describedby=":Relab:-loading-announcement"><svg aria-hidden="true" focusable="false" class="octicon octicon-git-branch" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"></path></svg></a><a style="--button-color:fg.muted" type="button" aria-label="Go to Tags page" href="/bemporad/jax-sysid/tags" class="Box-sc-g0xbh4-0 fGwBZA prc-Button-ButtonBase-c50BI" data-loading="false" data-no-visuals="true" data-size="medium" data-variant="invisible" aria-describedby=":Rmlab:-loading-announcement"><svg aria-hidden="true" focusable="false" class="octicon octicon-tag" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M1 7.775V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 0 1 0 2.474l-5.026 5.026a1.75 1.75 0 0 1-2.474 0l-6.25-6.25A1.752 1.752 0 0 1 1 7.775Zm1.5 0c0 .066.026.13.073.177l6.25 6.25a.25.25 0 0 0 .354 0l5.025-5.025a.25.25 0 0 0 0-.354l-6.25-6.25a.25.25 0 0 0-.177-.073H2.75a.25.25 0 0 0-.25.25ZM6 5a1 1 0 1 1 0 2 1 1 0 0 1 0-2Z"></path></svg></a></div></div><div class="Box-sc-g0xbh4-0 jxTzTd"><div class="Box-sc-g0xbh4-0 gqqBXN"><div class="Box-sc-g0xbh4-0 dzXgxt"><!--$--><div class="Box-sc-g0xbh4-0 iWFGlI"><span class="TextInputWrapper__StyledTextInputBaseWrapper-sc-1mqhpbi-0 hLzFvi TextInputWrapper__StyledTextInputWrapper-sc-1mqhpbi-1 iHYdQq TextInput-wrapper" data-leading-visual="true" data-trailing-visual="true" aria-busy="false"><span class="TextInput-icon" id=":R2j5ab:" aria-hidden="true"><svg aria-hidden="true" focusable="false" class="octicon octicon-search" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg></span><input type="text" aria-label="Go to file" role="combobox" aria-controls="file-results-list" aria-expanded="false" aria-haspopup="dialog" autoCorrect="off" spellcheck="false" placeholder="Go to file" aria-describedby=":R2j5ab: :R2j5abH1:" data-component="input" class="UnstyledTextInput__ToggledUnstyledTextInput-sc-14ypya-0 jkNcAv" value=""/><span class="TextInput-icon" id=":R2j5abH1:" aria-hidden="true"></span></span></div><!--/$--></div><div class="Box-sc-g0xbh4-0 YUPas"><button type="button" class="prc-Button-ButtonBase-c50BI" data-loading="false" data-no-visuals="true" data-size="medium" data-variant="default" aria-describedby=":Rr5ab:-loading-announcement"><span data-component="buttonContent" data-align="center" class="prc-Button-ButtonContent-HKbr-"><span data-component="text" class="prc-Button-Label-pTQ3x">Go to file</span></span></button></div><div class="react-directory-add-file-icon"></div><div class="react-directory-remove-file-icon"></div></div><button type="button" aria-haspopup="true" aria-expanded="false" tabindex="0" class="prc-Button-ButtonBase-c50BI" data-loading="false" data-size="medium" data-variant="primary" aria-describedby=":R55ab:-loading-announcement" id=":R55ab:"><span data-component="buttonContent" data-align="center" class="prc-Button-ButtonContent-HKbr-"><span data-component="leadingVisual" class="prc-Button-Visual-2epfX prc-Button-VisualWrap-Db-eB"><svg aria-hidden="true" focusable="false" class="hide-sm" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L.47 8.53a.75.75 0 0 1 0-1.06Z"></path></svg></span><span data-component="text" class="prc-Button-Label-pTQ3x">Code</span><span data-component="trailingVisual" class="prc-Button-Visual-2epfX prc-Button-VisualWrap-Db-eB"><svg aria-hidden="true" focusable="false" class="octicon octicon-triangle-down" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path></svg></span></span></button><div class="Box-sc-g0xbh4-0 izFOf"><button data-component="IconButton" type="button" aria-label="Open more actions menu" aria-haspopup="true" aria-expanded="false" tabindex="0" class="prc-Button-ButtonBase-c50BI prc-Button-IconButton-szpyj" data-loading="false" data-no-visuals="true" data-size="medium" data-variant="default" aria-describedby=":R75ab:-loading-announcement" id=":R75ab:"><svg aria-hidden="true" focusable="false" class="octicon octicon-kebab-horizontal" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path></svg></button></div></div></div><div class="Box-sc-g0xbh4-0 vIPPs"><div data-hpc="true"><button hidden="" data-testid="focus-next-element-button" data-hotkey="j"></button><button hidden="" data-testid="focus-previous-element-button" data-hotkey="k"></button><h2 class="sr-only ScreenReaderHeading-module__userSelectNone--vW4Cq prc-Heading-Heading-6CmGO" data-testid="screen-reader-heading" id="folders-and-files">Folders and files</h2><table aria-labelledby="folders-and-files" class="Box-sc-g0xbh4-0 fdROMU"><thead class="Box-sc-g0xbh4-0 jGKpsv"><tr class="Box-sc-g0xbh4-0 jdgHnn"><th colSpan="2" class="Box-sc-g0xbh4-0 bQivRW"><span class="text-bold">Name</span></th><th colSpan="1" class="Box-sc-g0xbh4-0 ldkMIO"><span class="text-bold">Name</span></th><th class="hide-sm"><div title="Last commit message" class="Truncate__StyledTruncate-sc-23o1d2-0 liVpTx width-fit"><span class="text-bold">Last commit message</span></div></th><th colSpan="1" class="Box-sc-g0xbh4-0 jMbWeI"><div title="Last commit date" class="Truncate__StyledTruncate-sc-23o1d2-0 liVpTx width-fit"><span class="text-bold">Last commit date</span></div></th></tr></thead><tbody><tr class="Box-sc-g0xbh4-0 gpqjiB"><td colSpan="3" class="bgColor-muted p-1 rounded-top-2"><div class="Box-sc-g0xbh4-0 dzCJzi"><h2 class="sr-only ScreenReaderHeading-module__userSelectNone--vW4Cq prc-Heading-Heading-6CmGO" data-testid="screen-reader-heading">Latest commit</h2><div style="width:120px" class="Skeleton Skeleton--text" data-testid="loading"> </div><div class="d-flex flex-shrink-0 gap-2"><div data-testid="latest-commit-details" class="d-none d-sm-flex flex-items-center"></div><div class="d-flex gap-2"><h2 class="sr-only ScreenReaderHeading-module__userSelectNone--vW4Cq prc-Heading-Heading-6CmGO" data-testid="screen-reader-heading">History</h2><a href="/bemporad/jax-sysid/commits/main/" class="prc-Button-ButtonBase-c50BI d-none d-lg-flex LinkButton-module__code-view-link-button--xvCGA flex-items-center fgColor-default" data-loading="false" data-size="small" data-variant="invisible" aria-describedby=":Raqj8pab:-loading-announcement"><span data-component="buttonContent" data-align="center" class="prc-Button-ButtonContent-HKbr-"><span data-component="leadingVisual" class="prc-Button-Visual-2epfX prc-Button-VisualWrap-Db-eB"><svg aria-hidden="true" focusable="false" class="octicon octicon-history" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="m.427 1.927 1.215 1.215a8.002 8.002 0 1 1-1.6 5.685.75.75 0 1 1 1.493-.154 6.5 6.5 0 1 0 1.18-4.458l1.358 1.358A.25.25 0 0 1 3.896 6H.25A.25.25 0 0 1 0 5.75V2.104a.25.25 0 0 1 .427-.177ZM7.75 4a.75.75 0 0 1 .75.75v2.992l2.028.812a.75.75 0 0 1-.557 1.392l-2.5-1A.751.751 0 0 1 7 8.25v-3.5A.75.75 0 0 1 7.75 4Z"></path></svg></span><span data-component="text" class="prc-Button-Label-pTQ3x"><span class="fgColor-default">42 Commits</span></span></span></a><div class="d-sm-none"></div><div class="d-flex d-lg-none"><span role="tooltip" aria-label="42 Commits" id="history-icon-button-tooltip" class="Tooltip__TooltipBase-sc-17tf59c-0 hWlpPn tooltipped-n"><a href="/bemporad/jax-sysid/commits/main/" class="prc-Button-ButtonBase-c50BI LinkButton-module__code-view-link-button--xvCGA flex-items-center fgColor-default" data-loading="false" data-size="small" data-variant="invisible" aria-describedby=":R1iqj8pab:-loading-announcement history-icon-button-tooltip"><span data-component="buttonContent" data-align="center" class="prc-Button-ButtonContent-HKbr-"><span data-component="leadingVisual" class="prc-Button-Visual-2epfX prc-Button-VisualWrap-Db-eB"><svg aria-hidden="true" focusable="false" class="octicon octicon-history" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="m.427 1.927 1.215 1.215a8.002 8.002 0 1 1-1.6 5.685.75.75 0 1 1 1.493-.154 6.5 6.5 0 1 0 1.18-4.458l1.358 1.358A.25.25 0 0 1 3.896 6H.25A.25.25 0 0 1 0 5.75V2.104a.25.25 0 0 1 .427-.177ZM7.75 4a.75.75 0 0 1 .75.75v2.992l2.028.812a.75.75 0 0 1-.557 1.392l-2.5-1A.751.751 0 0 1 7 8.25v-3.5A.75.75 0 0 1 7.75 4Z"></path></svg></span></span></a></span></div></div></div></div></td></tr><tr class="react-directory-row undefined" id="folder-row-0"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="examples" aria-label="examples, (Directory)" class="Link--primary" href="/bemporad/jax-sysid/tree/main/examples">examples</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="examples" aria-label="examples, (Directory)" class="Link--primary" href="/bemporad/jax-sysid/tree/main/examples">examples</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row undefined" id="folder-row-1"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="src" aria-label="src, (Directory)" class="Link--primary" href="/bemporad/jax-sysid/tree/main/src">src</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="src" aria-label="src, (Directory)" class="Link--primary" href="/bemporad/jax-sysid/tree/main/src">src</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row undefined" id="folder-row-2"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="tests" aria-label="tests, (Directory)" class="Link--primary" href="/bemporad/jax-sysid/tree/main/tests">tests</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="tests" aria-label="tests, (Directory)" class="Link--primary" href="/bemporad/jax-sysid/tree/main/tests">tests</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row undefined" id="folder-row-3"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title=".DS_Store" aria-label=".DS_Store, (File)" class="Link--primary" href="/bemporad/jax-sysid/blob/main/.DS_Store">.DS_Store</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title=".DS_Store" aria-label=".DS_Store, (File)" class="Link--primary" href="/bemporad/jax-sysid/blob/main/.DS_Store">.DS_Store</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row undefined" id="folder-row-4"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title=".gitignore" aria-label=".gitignore, (File)" class="Link--primary" href="/bemporad/jax-sysid/blob/main/.gitignore">.gitignore</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title=".gitignore" aria-label=".gitignore, (File)" class="Link--primary" href="/bemporad/jax-sysid/blob/main/.gitignore">.gitignore</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row undefined" id="folder-row-5"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="LICENSE.txt" aria-label="LICENSE.txt, (File)" class="Link--primary" href="/bemporad/jax-sysid/blob/main/LICENSE.txt">LICENSE.txt</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="LICENSE.txt" aria-label="LICENSE.txt, (File)" class="Link--primary" href="/bemporad/jax-sysid/blob/main/LICENSE.txt">LICENSE.txt</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row undefined" id="folder-row-6"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="README.md" aria-label="README.md, (File)" class="Link--primary" href="/bemporad/jax-sysid/blob/main/README.md">README.md</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="README.md" aria-label="README.md, (File)" class="Link--primary" href="/bemporad/jax-sysid/blob/main/README.md">README.md</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row undefined" id="folder-row-7"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="pyproject.toml" aria-label="pyproject.toml, (File)" class="Link--primary" href="/bemporad/jax-sysid/blob/main/pyproject.toml">pyproject.toml</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="pyproject.toml" aria-label="pyproject.toml, (File)" class="Link--primary" href="/bemporad/jax-sysid/blob/main/pyproject.toml">pyproject.toml</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="Box-sc-g0xbh4-0 eNCcrz d-none" data-testid="view-all-files-row"><td colSpan="3" class="Box-sc-g0xbh4-0 bHTcCe"><div><button class="prc-Link-Link-85e08">View all files</button></div></td></tr></tbody></table></div><div class="Box-sc-g0xbh4-0 csrIcr"><div class="Box-sc-g0xbh4-0 bUQNHB"><div itemscope="" itemType="https://schema.org/abstract" class="Box-sc-g0xbh4-0 jPdcfu"><h2 class="_VisuallyHidden__VisuallyHidden-sc-11jhm7a-0 brGdpi">Repository files navigation</h2><nav class="UnderlineTabbedInterface__StyledComponentUnderlineWrapper-sc-4ilrg0-0 eBevHz" aria-label="Repository files"><ul role="list" class="UnderlineTabbedInterface__StyledComponentUnderlineItemList-sc-4ilrg0-1 ehEdWC"><li class="Box-sc-g0xbh4-0 hUCRAk"><a href="#" aria-current="page" class="UnderlineTabbedInterface__StyledUnderlineItem-sc-4ilrg0-2 beOdPj"><span data-component="icon"><svg aria-hidden="true" focusable="false" class="octicon octicon-book" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M0 1.75A.75.75 0 0 1 .75 1h4.253c1.227 0 2.317.59 3 1.501A3.743 3.743 0 0 1 11.006 1h4.245a.75.75 0 0 1 .75.75v10.5a.75.75 0 0 1-.75.75h-4.507a2.25 2.25 0 0 0-1.591.659l-.622.621a.75.75 0 0 1-1.06 0l-.622-.621A2.25 2.25 0 0 0 5.258 13H.75a.75.75 0 0 1-.75-.75Zm7.251 10.324.004-5.073-.002-2.253A2.25 2.25 0 0 0 5.003 2.5H1.5v9h3.757a3.75 3.75 0 0 1 1.994.574ZM8.755 4.75l-.004 7.322a3.752 3.752 0 0 1 1.992-.572H14.5v-9h-3.495a2.25 2.25 0 0 0-2.25 2.25Z"></path></svg></span><span data-component="text" data-content="README">README</span></a></li><li class="Box-sc-g0xbh4-0 hUCRAk"><a href="#" class="UnderlineTabbedInterface__StyledUnderlineItem-sc-4ilrg0-2 beOdPj"><span data-component="icon"><svg aria-hidden="true" focusable="false" class="octicon octicon-law" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M8.75.75V2h.985c.304 0 .603.08.867.231l1.29.736c.038.022.08.033.124.033h2.234a.75.75 0 0 1 0 1.5h-.427l2.111 4.692a.75.75 0 0 1-.154.838l-.53-.53.529.531-.001.002-.002.002-.006.006-.006.005-.01.01-.045.04c-.21.176-.441.327-.686.45C14.556 10.78 13.88 11 13 11a4.498 4.498 0 0 1-2.023-.454 3.544 3.544 0 0 1-.686-.45l-.045-.04-.016-.015-.006-.006-.004-.004v-.001a.75.75 0 0 1-.154-.838L12.178 4.5h-.162c-.305 0-.604-.079-.868-.231l-1.29-.736a.245.245 0 0 0-.124-.033H8.75V13h2.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1 0-1.5h2.5V3.5h-.984a.245.245 0 0 0-.124.033l-1.289.737c-.265.15-.564.23-.869.23h-.162l2.112 4.692a.75.75 0 0 1-.154.838l-.53-.53.529.531-.001.002-.002.002-.006.006-.016.015-.045.04c-.21.176-.441.327-.686.45C4.556 10.78 3.88 11 3 11a4.498 4.498 0 0 1-2.023-.454 3.544 3.544 0 0 1-.686-.45l-.045-.04-.016-.015-.006-.006-.004-.004v-.001a.75.75 0 0 1-.154-.838L2.178 4.5H1.75a.75.75 0 0 1 0-1.5h2.234a.249.249 0 0 0 .125-.033l1.288-.737c.265-.15.564-.23.869-.23h.984V.75a.75.75 0 0 1 1.5 0Zm2.945 8.477c.285.135.718.273 1.305.273s1.02-.138 1.305-.273L13 6.327Zm-10 0c.285.135.718.273 1.305.273s1.02-.138 1.305-.273L3 6.327Z"></path></svg></span><span data-component="text" data-content="Apache-2.0 license">Apache-2.0 license</span></a></li></ul></nav><button style="--button-color:fg.subtle" type="button" aria-label="Outline" aria-haspopup="true" aria-expanded="false" tabindex="0" class="Box-sc-g0xbh4-0 cwoBXV prc-Button-ButtonBase-c50BI" data-loading="false" data-size="medium" data-variant="invisible" aria-describedby=":Rr9ab:-loading-announcement" id=":Rr9ab:"><svg aria-hidden="true" focusable="false" class="octicon octicon-list-unordered" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M5.75 2.5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5Zm0 5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5Zm0 5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5ZM2 14a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm1-6a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM2 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg></button></div><div class="Box-sc-g0xbh4-0 QkQOb js-snippet-clipboard-copy-unpositioned undefined" data-hpc="true"><article class="markdown-body entry-content container-lg" itemprop="text"><p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/c58a6223c4fb4ca5f02f0918a33916e5e1e56c160b9979810a99d4ddf410912e/687474703a2f2f6373652e6c61622e696d746c756363612e69742f7e62656d706f7261642f6a61782d73797369642f696d616765732f6a61782d73797369642d6c6f676f2e706e67"><img src="https://camo.githubusercontent.com/c58a6223c4fb4ca5f02f0918a33916e5e1e56c160b9979810a99d4ddf410912e/687474703a2f2f6373652e6c61622e696d746c756363612e69742f7e62656d706f7261642f6a61782d73797369642f696d616765732f6a61782d73797369642d6c6f676f2e706e67" alt="jax-sysid" width="40%/" data-canonical-src="http://cse.lab.imtlucca.it/~bemporad/jax-sysid/images/jax-sysid-logo.png" style="max-width: 100%;"></a></p> <p dir="auto">A Python package based on <a href="https://jax.readthedocs.io" rel="nofollow"> JAX </a> for linear and nonlinear system identification of state-space models, recurrent neural network (RNN) training, and nonlinear regression/classification.</p> <div class="markdown-heading" dir="auto"><h1 tabindex="-1" class="heading-element" dir="auto">Contents</h1><a id="user-content-contents" class="anchor" aria-label="Permalink: Contents" href="#contents"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <ul dir="auto"> <li><a href="#contents">Contents</a> <ul dir="auto"> <li><a href="#package-description">Package description</a></li> <li><a href="#installation">Installation</a></li> <li><a href="#basic-usage">Basic usage</a> <ul dir="auto"> <li><a href="#linear-state-space-models">Linear state-space models</a> <ul dir="auto"> <li><a href="#training-linear-models">Training linear models</a></li> <li><a href="#l1--and-group-lasso-regularization">L1- and group-Lasso regularization</a></li> <li><a href="#multiple-experiments">Multiple experiments</a></li> <li><a href="#stability">Stability</a></li> <li><a href="#static-gain">Static gain</a></li> </ul> </li> <li><a href="#nonlinear-system-identification-and-rnns">Nonlinear system identification and RNNs</a> <ul dir="auto"> <li><a href="#training-nonlinear-models">Training nonlinear models</a></li> <li><a href="#parallel-training">Parallel training</a></li> <li><a href="#flaxlinen-models">flax.linen models</a></li> <li><a href="#custom-output-loss">Custom output loss</a></li> <li><a href="#custom-regularization">Custom regularization</a></li> <li><a href="#static-gain-1">Static gain</a></li> <li><a href="#upper-and-lower-bounds">Upper and lower bounds</a></li> </ul> </li> <li><a href="#linear-parameter-varying-lpv-models">Linear Parameter-Varying (LPV) models</a> <ul dir="auto"> <li><a href="#training-lpv-models">Training LPV models</a></li> </ul> </li> <li><a href="#continuous-time-models">Continuous-time models</a> <ul dir="auto"> <li><a href="#training-continuous-time-models">Training continuous-time models</a></li> </ul> </li> <li><a href="#static-models">Static models</a> <ul dir="auto"> <li><a href="#nonlinear-regression">Nonlinear regression</a></li> <li><a href="#classification">Classification</a></li> </ul> </li> </ul> </li> <li><a href="#contributors">Contributors</a></li> <li><a href="#acknowledgments">Acknowledgments</a></li> <li><a href="#citing-jax-sysid">Citing jax-sysid</a></li> <li><a href="#license">License</a></li> </ul> </li> </ul> <p dir="auto"><a name="user-content-description"></a></p> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">Package description</h2><a id="user-content-package-description" class="anchor" aria-label="Permalink: Package description" href="#package-description"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto"><strong>jax-sysid</strong> is a Python package based on <a href="https://jax.readthedocs.io" rel="nofollow"> JAX </a> for linear and nonlinear system identification of state-space models, recurrent neural network (RNN) training, and nonlinear regression/classification. The algorithm can handle L1-regularization and group-Lasso regularization and relies on L-BFGS optimization for accurate modeling, fast convergence, and good sparsification of model coefficients.</p> <p dir="auto">The package implements the approach described in the following paper:</p> <p dir="auto"><a name="user-content-cite-bem24"></a></p> <blockquote> <p dir="auto">[1] A. Bemporad, "<a href="http://arxiv.org/abs/2403.03827" rel="nofollow">Linear and nonlinear system identification under $\ell_1$- and group-Lasso regularization via L-BFGS-B</a>," submitted for publication. Available on arXiv at <a href="http://arxiv.org/abs/2403.03827" rel="nofollow"> </a><a href="http://arxiv.org/abs/2403.03827" rel="nofollow">http://arxiv.org/abs/2403.03827</a>, 2024. [<a href="#ref1">bib entry</a>]</p> </blockquote> <p dir="auto"><a name="user-content-install"></a></p> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">Installation</h2><a id="user-content-installation" class="anchor" aria-label="Permalink: Installation" href="#installation"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="pip install jax-sysid"><pre><span class="pl-s1">pip</span> <span class="pl-s1">install</span> <span class="pl-s1">jax</span><span class="pl-c1">-</span><span class="pl-s1">sysid</span></pre></div> <p dir="auto"><strong>Note</strong>: currently, <code>jax_sysid</code> forces installing <code>jax==0.4.31</code>. This is due to the considerable slower performance of later versions of <code>jax</code> in training recurrent models. If you need to use later versions of <code>jax</code>, you must set the environment variable <code>XLA_FLAGS=--xla_cpu_use_thunk_runtime=false</code> to recover a similar performance.</p> <p dir="auto"><a name="user-content-basic-usage"></a></p> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">Basic usage</h2><a id="user-content-basic-usage" class="anchor" aria-label="Permalink: Basic usage" href="#basic-usage"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto"><a name="user-content-linear"></a></p> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Linear state-space models</h3><a id="user-content-linear-state-space-models" class="anchor" aria-label="Permalink: Linear state-space models" href="#linear-state-space-models"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <div class="markdown-heading" dir="auto"><h4 tabindex="-1" class="heading-element" dir="auto">Training linear models</h4><a id="user-content-training-linear-models" class="anchor" aria-label="Permalink: Training linear models" href="#training-linear-models"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Given input/output training data <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$(u_0,y_0)$</math-renderer>, <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$\ldots$</math-renderer>, <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$(u_{N-1},y_{N-1})$</math-renderer>, <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$u_k\in R^{n_u}$</math-renderer>, <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$y_k\in R^{n_y}$</math-renderer>, we want to identify a state-space model in the following form</p> <p dir="auto"><math-renderer class="js-display-math" style="display: block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$$ x_{k+1}=Ax_k+Bu_k$$</math-renderer></p> <p dir="auto"><math-renderer class="js-display-math" style="display: block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$$ \hat y_k=Cx_k+Du_k $$</math-renderer></p> <p dir="auto">where <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$k$</math-renderer> denotes the sample instant, <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$x_k\in R^{n_x}$</math-renderer> is the vector of hidden states, and <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$A,B,C,D$</math-renderer> are matrices of appropriate dimensions to be learned.</p> <p dir="auto">The training problem to solve is</p> <p dir="auto"><math-renderer class="js-display-math" style="display: block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$$\min_{z}r(z)+\frac{1}{N}\sum_{k=0}^{N-1} |y_{k}-Cx_k-Du_k|_2^2$$</math-renderer></p> <p dir="auto"><math-renderer class="js-display-math" style="display: block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$$\textrm{s.t.}\ x_{k+1}=Ax_k+Bu_k, \ k=0,\ldots,N-2$$</math-renderer></p> <p dir="auto">where <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$z=(\theta,x_0)$</math-renderer> and <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$\theta$</math-renderer> collecting the entries of <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$A,B,C,D$</math-renderer>.</p> <p dir="auto">The regularization term <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$r(z)$</math-renderer> includes the following components:</p> <p dir="auto"><math-renderer class="js-display-math" style="display: block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$$\rho_{\theta} |\theta|_2^2 $$</math-renderer></p> <p dir="auto"><math-renderer class="js-display-math" style="display: block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$$\rho_{x_0} |x_0|_2^2$$</math-renderer></p> <p dir="auto"><math-renderer class="js-display-math" style="display: block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$$\tau \left|z\right|_1$$</math-renderer></p> <p dir="auto"><math-renderer class="js-display-math" style="display: block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$$\tau_g\sum_{i=1}^{n_u} |I_iz|_2$$</math-renderer></p> <p dir="auto">with <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$\rho_\theta&gt;0$</math-renderer>, <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$\rho_{x_0}&gt;0$</math-renderer>, <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$\tau\geq 0$</math-renderer>, <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$\tau_g\geq 0$</math-renderer>. See examples below.</p> <p dir="auto">Let's start training a discrete-time linear model <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$(A,B,C,D)$</math-renderer> on a sequence of inputs <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$U=[u_0\ \ldots\ u_{N-1}]'$</math-renderer> and output <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$Y=[y_0\ \ldots\ y_{N-1}]'$</math-renderer>, with regularization <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$\rho_\theta=10^{-2}$</math-renderer>, <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$\rho_{x_0}=10^{-3}$</math-renderer>, running the L-BFGS solver for at most 1000 function evaluations:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from jax_sysid.models import LinearModel model = LinearModel(nx, ny, nu) model.loss(rho_x0=1.e-3, rho_th=1.e-2) model.optimization(lbfgs_epochs=1000) model.fit(Y,U) Yhat, Xhat = model.predict(model.x0, U)"><pre><span class="pl-k">from</span> <span class="pl-s1">jax_sysid</span>.<span class="pl-s1">models</span> <span class="pl-k">import</span> <span class="pl-v">LinearModel</span> <span class="pl-s1">model</span> <span class="pl-c1">=</span> <span class="pl-en">LinearModel</span>(<span class="pl-s1">nx</span>, <span class="pl-s1">ny</span>, <span class="pl-s1">nu</span>) <span class="pl-s1">model</span>.<span class="pl-c1">loss</span>(<span class="pl-s1">rho_x0</span><span class="pl-c1">=</span><span class="pl-c1">1.e-3</span>, <span class="pl-s1">rho_th</span><span class="pl-c1">=</span><span class="pl-c1">1.e-2</span>) <span class="pl-s1">model</span>.<span class="pl-c1">optimization</span>(<span class="pl-s1">lbfgs_epochs</span><span class="pl-c1">=</span><span class="pl-c1">1000</span>) <span class="pl-s1">model</span>.<span class="pl-c1">fit</span>(<span class="pl-c1">Y</span>,<span class="pl-c1">U</span>) <span class="pl-v">Yhat</span>, <span class="pl-v">Xhat</span> <span class="pl-c1">=</span> <span class="pl-s1">model</span>.<span class="pl-c1">predict</span>(<span class="pl-s1">model</span>.<span class="pl-c1">x0</span>, <span class="pl-c1">U</span>)</pre></div> <p dir="auto">After identifying the model, to retrieve the resulting state-space realization you can use the following:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="A,B,C,D = model.ssdata()"><pre><span class="pl-c1">A</span>,<span class="pl-c1">B</span>,<span class="pl-c1">C</span>,<span class="pl-c1">D</span> <span class="pl-c1">=</span> <span class="pl-s1">model</span>.<span class="pl-c1">ssdata</span>()</pre></div> <p dir="auto">Given a new test sequence of inputs and outputs, an initial state that is compatible with the identified model can be reconstructed by running an extended Kalman filter and Rauch–Tung–Striebel smoothing (cf. <a href="#cite-Bem24">[1]</a>) and used to simulate the model:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="x0_test = model.learn_x0(U_test, Y_test) Yhat_test, Xhat_test = model.predict(x0_test, U_test)"><pre><span class="pl-s1">x0_test</span> <span class="pl-c1">=</span> <span class="pl-s1">model</span>.<span class="pl-c1">learn_x0</span>(<span class="pl-v">U_test</span>, <span class="pl-v">Y_test</span>) <span class="pl-v">Yhat_test</span>, <span class="pl-v">Xhat_test</span> <span class="pl-c1">=</span> <span class="pl-s1">model</span>.<span class="pl-c1">predict</span>(<span class="pl-s1">x0_test</span>, <span class="pl-v">U_test</span>)</pre></div> <p dir="auto">R2-scores on training and test data can be computed as follows:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from jax_sysid.utils import compute_scores R2_train, R2_test, msg = compute_scores(Y, Yhat, Y_test, Yhat_test, fit='R2') print(msg)"><pre><span class="pl-k">from</span> <span class="pl-s1">jax_sysid</span>.<span class="pl-s1">utils</span> <span class="pl-k">import</span> <span class="pl-s1">compute_scores</span> <span class="pl-v">R2_train</span>, <span class="pl-v">R2_test</span>, <span class="pl-s1">msg</span> <span class="pl-c1">=</span> <span class="pl-en">compute_scores</span>(<span class="pl-c1">Y</span>, <span class="pl-v">Yhat</span>, <span class="pl-v">Y_test</span>, <span class="pl-v">Yhat_test</span>, <span class="pl-s1">fit</span><span class="pl-c1">=</span><span class="pl-s">'R2'</span>) <span class="pl-en">print</span>(<span class="pl-s1">msg</span>)</pre></div> <p dir="auto">It is good practice to scale the input and output signals. To identify a model on scaled signals, you can use the following:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from jax_sysid.utils import standard_scale, unscale Ys, ymean, ygain = standard_scale(Y) Us, umean, ugain = standard_scale(U) model.fit(Ys, Us) Yshat, Xhat = model.predict(model.x0, Us) Yhat = unscale(Yshat, ymean, ygain)"><pre><span class="pl-k">from</span> <span class="pl-s1">jax_sysid</span>.<span class="pl-s1">utils</span> <span class="pl-k">import</span> <span class="pl-s1">standard_scale</span>, <span class="pl-s1">unscale</span> <span class="pl-v">Ys</span>, <span class="pl-s1">ymean</span>, <span class="pl-s1">ygain</span> <span class="pl-c1">=</span> <span class="pl-en">standard_scale</span>(<span class="pl-c1">Y</span>) <span class="pl-v">Us</span>, <span class="pl-s1">umean</span>, <span class="pl-s1">ugain</span> <span class="pl-c1">=</span> <span class="pl-en">standard_scale</span>(<span class="pl-c1">U</span>) <span class="pl-s1">model</span>.<span class="pl-c1">fit</span>(<span class="pl-v">Ys</span>, <span class="pl-v">Us</span>) <span class="pl-v">Yshat</span>, <span class="pl-v">Xhat</span> <span class="pl-c1">=</span> <span class="pl-s1">model</span>.<span class="pl-c1">predict</span>(<span class="pl-s1">model</span>.<span class="pl-c1">x0</span>, <span class="pl-v">Us</span>) <span class="pl-v">Yhat</span> <span class="pl-c1">=</span> <span class="pl-en">unscale</span>(<span class="pl-v">Yshat</span>, <span class="pl-s1">ymean</span>, <span class="pl-s1">ygain</span>)</pre></div> <div class="markdown-heading" dir="auto"><h4 tabindex="-1" class="heading-element" dir="auto">L1- and group-Lasso regularization</h4><a id="user-content-l1--and-group-lasso-regularization" class="anchor" aria-label="Permalink: L1- and group-Lasso regularization" href="#l1--and-group-lasso-regularization"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Let us now retrain the model using L1-regularization and check the sparsity of the resulting model:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="model.loss(rho_x0=1.e-3, rho_th=1.e-2, tau_th=0.03) model.fit(Ys, Us) print(model.sparsity_analysis())"><pre><span class="pl-s1">model</span>.<span class="pl-c1">loss</span>(<span class="pl-s1">rho_x0</span><span class="pl-c1">=</span><span class="pl-c1">1.e-3</span>, <span class="pl-s1">rho_th</span><span class="pl-c1">=</span><span class="pl-c1">1.e-2</span>, <span class="pl-s1">tau_th</span><span class="pl-c1">=</span><span class="pl-c1">0.03</span>) <span class="pl-s1">model</span>.<span class="pl-c1">fit</span>(<span class="pl-v">Ys</span>, <span class="pl-v">Us</span>) <span class="pl-en">print</span>(<span class="pl-s1">model</span>.<span class="pl-c1">sparsity_analysis</span>())</pre></div> <p dir="auto">To reduce the number of states in the model, you can use group-Lasso regularization as follows:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="model.loss(rho_x0=1.e-3, rho_th=1.e-2, tau_g=0.1) model.group_lasso_x() model.fit(Ys, Us)"><pre><span class="pl-s1">model</span>.<span class="pl-c1">loss</span>(<span class="pl-s1">rho_x0</span><span class="pl-c1">=</span><span class="pl-c1">1.e-3</span>, <span class="pl-s1">rho_th</span><span class="pl-c1">=</span><span class="pl-c1">1.e-2</span>, <span class="pl-s1">tau_g</span><span class="pl-c1">=</span><span class="pl-c1">0.1</span>) <span class="pl-s1">model</span>.<span class="pl-c1">group_lasso_x</span>() <span class="pl-s1">model</span>.<span class="pl-c1">fit</span>(<span class="pl-v">Ys</span>, <span class="pl-v">Us</span>)</pre></div> <p dir="auto">Groups in this case are entries in <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$A,B,C,x_0$</math-renderer> related to the same state.</p> <p dir="auto">Group-Lasso can be also used to try to reduce the number of inputs that are relevant in the model. You can do this as follows:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="model.loss(rho_x0=1.e-3, rho_th=1.e-2, tau_g=0.15) model.group_lasso_u() model.fit(Ys, Us)"><pre><span class="pl-s1">model</span>.<span class="pl-c1">loss</span>(<span class="pl-s1">rho_x0</span><span class="pl-c1">=</span><span class="pl-c1">1.e-3</span>, <span class="pl-s1">rho_th</span><span class="pl-c1">=</span><span class="pl-c1">1.e-2</span>, <span class="pl-s1">tau_g</span><span class="pl-c1">=</span><span class="pl-c1">0.15</span>) <span class="pl-s1">model</span>.<span class="pl-c1">group_lasso_u</span>() <span class="pl-s1">model</span>.<span class="pl-c1">fit</span>(<span class="pl-v">Ys</span>, <span class="pl-v">Us</span>)</pre></div> <p dir="auto">Groups in this case are entries in <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$B,D$</math-renderer> related to the same input.</p> <div class="markdown-heading" dir="auto"><h4 tabindex="-1" class="heading-element" dir="auto">Multiple experiments</h4><a id="user-content-multiple-experiments" class="anchor" aria-label="Permalink: Multiple experiments" href="#multiple-experiments"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto"><strong>jax-sysid</strong> also supports multiple training experiments. In this case, the sequences of training inputs and outputs are passed as a list of arrays. For example, if three experiments are available for training, use the following command:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="model.fit([Ys1, Ys2, Ys3], [Us1, Us2, Us3])"><pre><span class="pl-s1">model</span>.<span class="pl-c1">fit</span>([<span class="pl-v">Ys1</span>, <span class="pl-v">Ys2</span>, <span class="pl-v">Ys3</span>], [<span class="pl-v">Us1</span>, <span class="pl-v">Us2</span>, <span class="pl-v">Us3</span>])</pre></div> <p dir="auto">In case the initial state <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$x_0$</math-renderer> is trainable, one initial state per experiment is optimized. To avoid training the initial state, add <code>train_x0=False</code> when calling <code>model.loss</code>.</p> <div class="markdown-heading" dir="auto"><h4 tabindex="-1" class="heading-element" dir="auto">Stability</h4><a id="user-content-stability" class="anchor" aria-label="Permalink: Stability" href="#stability"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">To attempt forcing that the identified linear model is asymptotically stable, i.e., that matrix <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$A$</math-renderer> has all eigenvalues inside the unit disk, you can use the following command:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="model.force_stability()"><pre><span class="pl-s1">model</span>.<span class="pl-c1">force_stability</span>()</pre></div> <p dir="auto">before calling the <code>fit</code> function. This will introduce a custom regularization penalty that tries to enforce the constraint <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$|A|_2&lt;1$</math-renderer>.</p> <div class="markdown-heading" dir="auto"><h4 tabindex="-1" class="heading-element" dir="auto">Static gain</h4><a id="user-content-static-gain" class="anchor" aria-label="Permalink: Static gain" href="#static-gain"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">To introduce a penalty that attempts forcing the identified linear model to have a given DC-gain matrix <code>M</code>, you can use the following commands:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="dcgain_loss = model.dcgain_loss(DCgain = M) model.loss(rho_x0=1.e-3, rho_th=1.e-2, custom_regularization = dcgain_loss)"><pre><span class="pl-s1">dcgain_loss</span> <span class="pl-c1">=</span> <span class="pl-s1">model</span>.<span class="pl-c1">dcgain_loss</span>(<span class="pl-v">DCgain</span> <span class="pl-c1">=</span> <span class="pl-c1">M</span>) <span class="pl-s1">model</span>.<span class="pl-c1">loss</span>(<span class="pl-s1">rho_x0</span><span class="pl-c1">=</span><span class="pl-c1">1.e-3</span>, <span class="pl-s1">rho_th</span><span class="pl-c1">=</span><span class="pl-c1">1.e-2</span>, <span class="pl-s1">custom_regularization</span> <span class="pl-c1">=</span> <span class="pl-s1">dcgain_loss</span>)</pre></div> <p dir="auto">before calling the <code>fit</code> function. Similarly, to fit instead the DC-gain of the model to steady-state input data <code>Uss</code> and corresponding output data <code>Yss</code>, you can use</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="dcgain_loss = model.dcgain_loss(Uss = Uss, Yss = Yss)"><pre><span class="pl-s1">dcgain_loss</span> <span class="pl-c1">=</span> <span class="pl-s1">model</span>.<span class="pl-c1">dcgain_loss</span>(<span class="pl-v">Uss</span> <span class="pl-c1">=</span> <span class="pl-v">Uss</span>, <span class="pl-v">Yss</span> <span class="pl-c1">=</span> <span class="pl-v">Yss</span>)</pre></div> <p dir="auto">and use <code>dcgain_loss</code> as the custom regularization function.</p> <p dir="auto"><a name="user-content-nonlinear"></a></p> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Nonlinear system identification and RNNs</h3><a id="user-content-nonlinear-system-identification-and-rnns" class="anchor" aria-label="Permalink: Nonlinear system identification and RNNs" href="#nonlinear-system-identification-and-rnns"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <div class="markdown-heading" dir="auto"><h4 tabindex="-1" class="heading-element" dir="auto">Training nonlinear models</h4><a id="user-content-training-nonlinear-models" class="anchor" aria-label="Permalink: Training nonlinear models" href="#training-nonlinear-models"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Given input/output training data <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$(u_0,y_0)$</math-renderer>, <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$\ldots$</math-renderer>, <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$(u_{N-1},y_{N-1})$</math-renderer>, <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$u_k\in R^{n_u}$</math-renderer>, <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$y_k\in R^{n_y}$</math-renderer>, we want to identify a nonlinear parametric state-space model in the following form</p> <p dir="auto"><math-renderer class="js-display-math" style="display: block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$$ x_{k+1}=f(x_k,u_k,\theta)$$</math-renderer></p> <p dir="auto"><math-renderer class="js-display-math" style="display: block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$$ \hat y_k=g(x_k,u_k,\theta)$$</math-renderer></p> <p dir="auto">where <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$k$</math-renderer> denotes the sample instant, <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$x_k\in R^{n_x}$</math-renderer> is the vector of hidden states, and <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$\theta$</math-renderer> collects the trainable parameters of the model.</p> <p dir="auto">As for the linear case, the training problem to solve is</p> <p dir="auto"><math-renderer class="js-display-math" style="display: block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$$ \min_{z}r(z)+\frac{1}{N}\sum_{k=0}^{N-1} |y_{k}-g(x_k,u_k,\theta)|_2^2$$</math-renderer></p> <p dir="auto"><math-renderer class="js-display-math" style="display: block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$$\textrm{s.t.}\ x_{k+1}=f(x_k,u_k,\theta),\ k=0,\ldots,N-2$$</math-renderer></p> <p dir="auto">where <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$z=(\theta,x_0)$</math-renderer>. The regularization term <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$r(z)$</math-renderer> is the same as in the linear case.</p> <p dir="auto">For example, let us consider the following residual RNN model without input/output feedthrough:</p> <p dir="auto"><math-renderer class="js-display-math" style="display: block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$$ x_{k+1}=Ax_k+Bu_k+f_x(x_k,u_k,\theta_x)$$</math-renderer></p> <p dir="auto"><math-renderer class="js-display-math" style="display: block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$$ \hat y_k=Cx_k+f_y(x_k,\theta_y)$$</math-renderer></p> <p dir="auto">where <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$f_x$</math-renderer>, <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$f_y$</math-renderer> are feedforward shallow neural networks, and let <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$z$</math-renderer> collects the coefficients in <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$A,B,C,D,\theta_x,\theta_y$</math-renderer>. We want to train <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$z$</math-renderer> by running 1000 Adam iterations followed by at most 1000 L-BFGS function evaluations:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from jax_sysid.models import Model Ys, ymean, ygain = standard_scale(Y) Us, umean, ugain = standard_scale(U) def sigmoid(x): return 1. / (1. + jnp.exp(-x)) @jax.jit def state_fcn(x,u,params): A,B,C,W1,W2,W3,b1,b2,W4,W5,b3,b4=params return A@x+B@u+W3@sigmoid(W1@x+W2@u+b1)+b2 @jax.jit def output_fcn(x,u,params): A,B,C,W1,W2,W3,b1,b2,W4,W5,b3,b4=params return C@x+W5@sigmoid(W4@x+b3)+b4 model = Model(nx, ny, nu, state_fcn=state_fcn, output_fcn=output_fcn) nnx = 5 # number of hidden neurons in state-update function nny = 5 # number of hidden neurons in output function # Parameter initialization: A = 0.5*np.eye(nx) B = 0.1*np.random.randn(nx,nu) C = 0.1*np.random.randn(ny,nx) W1 = 0.1*np.random.randn(nnx,nx) W2 = 0.5*np.random.randn(nnx,nu) W3 = 0.5*np.random.randn(nx,nnx) b1 = np.zeros(nnx) b2 = np.zeros(nx) W4 = 0.5*np.random.randn(nny,nx) W5 = 0.5*np.random.randn(ny,nny) b3 = np.zeros(nny) b4 = np.zeros(ny) model.init(params=[A,B,C,W1,W2,W3,b1,b2,W4,W5,b3,b4]) model.loss(rho_x0=1.e-4, rho_th=1.e-4) model.optimization(adam_epochs=1000, lbfgs_epochs=1000) model.fit(Ys, Us) Yshat, Xshat = model.predict(model.x0, Us) Yhat = unscale(Yshat, ymean, ygain)"><pre><span class="pl-k">from</span> <span class="pl-s1">jax_sysid</span>.<span class="pl-s1">models</span> <span class="pl-k">import</span> <span class="pl-v">Model</span> <span class="pl-v">Ys</span>, <span class="pl-s1">ymean</span>, <span class="pl-s1">ygain</span> <span class="pl-c1">=</span> <span class="pl-en">standard_scale</span>(<span class="pl-c1">Y</span>) <span class="pl-v">Us</span>, <span class="pl-s1">umean</span>, <span class="pl-s1">ugain</span> <span class="pl-c1">=</span> <span class="pl-en">standard_scale</span>(<span class="pl-c1">U</span>) <span class="pl-k">def</span> <span class="pl-en">sigmoid</span>(<span class="pl-s1">x</span>): <span class="pl-k">return</span> <span class="pl-c1">1.</span> <span class="pl-c1">/</span> (<span class="pl-c1">1.</span> <span class="pl-c1">+</span> <span class="pl-s1">jnp</span>.<span class="pl-c1">exp</span>(<span class="pl-c1">-</span><span class="pl-s1">x</span>)) <span class="pl-en">@<span class="pl-s1">jax</span>.<span class="pl-c1">jit</span></span> <span class="pl-k">def</span> <span class="pl-en">state_fcn</span>(<span class="pl-s1">x</span>,<span class="pl-s1">u</span>,<span class="pl-s1">params</span>): <span class="pl-c1">A</span>,<span class="pl-c1">B</span>,<span class="pl-c1">C</span>,<span class="pl-v">W1</span>,<span class="pl-v">W2</span>,<span class="pl-v">W3</span>,<span class="pl-s1">b1</span>,<span class="pl-s1">b2</span>,<span class="pl-v">W4</span>,<span class="pl-v">W5</span>,<span class="pl-s1">b3</span>,<span class="pl-s1">b4</span><span class="pl-c1">=</span><span class="pl-s1">params</span> <span class="pl-k">return</span> <span class="pl-c1">A</span>@<span class="pl-s1">x</span><span class="pl-c1">+</span><span class="pl-c1">B</span>@<span class="pl-s1">u</span><span class="pl-c1">+</span><span class="pl-v">W3</span>@<span class="pl-en">sigmoid</span>(<span class="pl-v">W1</span>@<span class="pl-s1">x</span><span class="pl-c1">+</span><span class="pl-v">W2</span>@<span class="pl-s1">u</span><span class="pl-c1">+</span><span class="pl-s1">b1</span>)<span class="pl-c1">+</span><span class="pl-s1">b2</span> <span class="pl-en">@<span class="pl-s1">jax</span>.<span class="pl-c1">jit</span></span> <span class="pl-k">def</span> <span class="pl-en">output_fcn</span>(<span class="pl-s1">x</span>,<span class="pl-s1">u</span>,<span class="pl-s1">params</span>): <span class="pl-c1">A</span>,<span class="pl-c1">B</span>,<span class="pl-c1">C</span>,<span class="pl-v">W1</span>,<span class="pl-v">W2</span>,<span class="pl-v">W3</span>,<span class="pl-s1">b1</span>,<span class="pl-s1">b2</span>,<span class="pl-v">W4</span>,<span class="pl-v">W5</span>,<span class="pl-s1">b3</span>,<span class="pl-s1">b4</span><span class="pl-c1">=</span><span class="pl-s1">params</span> <span class="pl-k">return</span> <span class="pl-c1">C</span>@<span class="pl-s1">x</span><span class="pl-c1">+</span><span class="pl-v">W5</span>@<span class="pl-en">sigmoid</span>(<span class="pl-v">W4</span>@<span class="pl-s1">x</span><span class="pl-c1">+</span><span class="pl-s1">b3</span>)<span class="pl-c1">+</span><span class="pl-s1">b4</span> <span class="pl-s1">model</span> <span class="pl-c1">=</span> <span class="pl-en">Model</span>(<span class="pl-s1">nx</span>, <span class="pl-s1">ny</span>, <span class="pl-s1">nu</span>, <span class="pl-s1">state_fcn</span><span class="pl-c1">=</span><span class="pl-s1">state_fcn</span>, <span class="pl-s1">output_fcn</span><span class="pl-c1">=</span><span class="pl-s1">output_fcn</span>) <span class="pl-s1">nnx</span> <span class="pl-c1">=</span> <span class="pl-c1">5</span> <span class="pl-c"># number of hidden neurons in state-update function</span> <span class="pl-s1">nny</span> <span class="pl-c1">=</span> <span class="pl-c1">5</span> <span class="pl-c"># number of hidden neurons in output function</span> <span class="pl-c"># Parameter initialization:</span> <span class="pl-c1">A</span> <span class="pl-c1">=</span> <span class="pl-c1">0.5</span><span class="pl-c1">*</span><span class="pl-s1">np</span>.<span class="pl-c1">eye</span>(<span class="pl-s1">nx</span>) <span class="pl-c1">B</span> <span class="pl-c1">=</span> <span class="pl-c1">0.1</span><span class="pl-c1">*</span><span class="pl-s1">np</span>.<span class="pl-c1">random</span>.<span class="pl-c1">randn</span>(<span class="pl-s1">nx</span>,<span class="pl-s1">nu</span>) <span class="pl-c1">C</span> <span class="pl-c1">=</span> <span class="pl-c1">0.1</span><span class="pl-c1">*</span><span class="pl-s1">np</span>.<span class="pl-c1">random</span>.<span class="pl-c1">randn</span>(<span class="pl-s1">ny</span>,<span class="pl-s1">nx</span>) <span class="pl-v">W1</span> <span class="pl-c1">=</span> <span class="pl-c1">0.1</span><span class="pl-c1">*</span><span class="pl-s1">np</span>.<span class="pl-c1">random</span>.<span class="pl-c1">randn</span>(<span class="pl-s1">nnx</span>,<span class="pl-s1">nx</span>) <span class="pl-v">W2</span> <span class="pl-c1">=</span> <span class="pl-c1">0.5</span><span class="pl-c1">*</span><span class="pl-s1">np</span>.<span class="pl-c1">random</span>.<span class="pl-c1">randn</span>(<span class="pl-s1">nnx</span>,<span class="pl-s1">nu</span>) <span class="pl-v">W3</span> <span class="pl-c1">=</span> <span class="pl-c1">0.5</span><span class="pl-c1">*</span><span class="pl-s1">np</span>.<span class="pl-c1">random</span>.<span class="pl-c1">randn</span>(<span class="pl-s1">nx</span>,<span class="pl-s1">nnx</span>) <span class="pl-s1">b1</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-c1">zeros</span>(<span class="pl-s1">nnx</span>) <span class="pl-s1">b2</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-c1">zeros</span>(<span class="pl-s1">nx</span>) <span class="pl-v">W4</span> <span class="pl-c1">=</span> <span class="pl-c1">0.5</span><span class="pl-c1">*</span><span class="pl-s1">np</span>.<span class="pl-c1">random</span>.<span class="pl-c1">randn</span>(<span class="pl-s1">nny</span>,<span class="pl-s1">nx</span>) <span class="pl-v">W5</span> <span class="pl-c1">=</span> <span class="pl-c1">0.5</span><span class="pl-c1">*</span><span class="pl-s1">np</span>.<span class="pl-c1">random</span>.<span class="pl-c1">randn</span>(<span class="pl-s1">ny</span>,<span class="pl-s1">nny</span>) <span class="pl-s1">b3</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-c1">zeros</span>(<span class="pl-s1">nny</span>) <span class="pl-s1">b4</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-c1">zeros</span>(<span class="pl-s1">ny</span>) <span class="pl-s1">model</span>.<span class="pl-c1">init</span>(<span class="pl-s1">params</span><span class="pl-c1">=</span>[<span class="pl-c1">A</span>,<span class="pl-c1">B</span>,<span class="pl-c1">C</span>,<span class="pl-v">W1</span>,<span class="pl-v">W2</span>,<span class="pl-v">W3</span>,<span class="pl-s1">b1</span>,<span class="pl-s1">b2</span>,<span class="pl-v">W4</span>,<span class="pl-v">W5</span>,<span class="pl-s1">b3</span>,<span class="pl-s1">b4</span>]) <span class="pl-s1">model</span>.<span class="pl-c1">loss</span>(<span class="pl-s1">rho_x0</span><span class="pl-c1">=</span><span class="pl-c1">1.e-4</span>, <span class="pl-s1">rho_th</span><span class="pl-c1">=</span><span class="pl-c1">1.e-4</span>) <span class="pl-s1">model</span>.<span class="pl-c1">optimization</span>(<span class="pl-s1">adam_epochs</span><span class="pl-c1">=</span><span class="pl-c1">1000</span>, <span class="pl-s1">lbfgs_epochs</span><span class="pl-c1">=</span><span class="pl-c1">1000</span>) <span class="pl-s1">model</span>.<span class="pl-c1">fit</span>(<span class="pl-v">Ys</span>, <span class="pl-v">Us</span>) <span class="pl-v">Yshat</span>, <span class="pl-v">Xshat</span> <span class="pl-c1">=</span> <span class="pl-s1">model</span>.<span class="pl-c1">predict</span>(<span class="pl-s1">model</span>.<span class="pl-c1">x0</span>, <span class="pl-v">Us</span>) <span class="pl-v">Yhat</span> <span class="pl-c1">=</span> <span class="pl-en">unscale</span>(<span class="pl-v">Yshat</span>, <span class="pl-s1">ymean</span>, <span class="pl-s1">ygain</span>)</pre></div> <div class="markdown-heading" dir="auto"><h4 tabindex="-1" class="heading-element" dir="auto">Parallel training</h4><a id="user-content-parallel-training" class="anchor" aria-label="Permalink: Parallel training" href="#parallel-training"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">As the training problem, in general, is a nonconvex optimization problem, the obtained model often depends on the initial value of the parameters. The <strong>jax-sysid</strong> library supports training models in parallel (including static models) using the <code>joblib</code> library. In the example above, we can train 10 different models using 10 jobs in <code>joblib</code> as follows:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="def init_fcn(seed): np.random.seed(seed) A = 0.5*np.eye(nx) B = 0.1*np.random.randn(nx,nu) C = 0.1*np.random.randn(ny,nx) W1 = 0.1*np.random.randn(nnx,nx) W2 = 0.5*np.random.randn(nnx,nu) W3 = 0.5*np.random.randn(nx,nnx) b1 = np.zeros(nnx) b2 = np.zeros(nx) W4 = 0.5*np.random.randn(nny,nx) W5 = 0.5*np.random.randn(ny,nny) b3 = np.zeros(nny) b4 = np.zeros(ny) return [A,B,C,W1,W2,W3,b1,b2,W4,W5,b3,b4] models = model.parallel_fit(Ys, Us, init_fcn=init_fcn, seeds=range(10), n_jobs=10)"><pre class="notranslate"><code>def init_fcn(seed): np.random.seed(seed) A = 0.5*np.eye(nx) B = 0.1*np.random.randn(nx,nu) C = 0.1*np.random.randn(ny,nx) W1 = 0.1*np.random.randn(nnx,nx) W2 = 0.5*np.random.randn(nnx,nu) W3 = 0.5*np.random.randn(nx,nnx) b1 = np.zeros(nnx) b2 = np.zeros(nx) W4 = 0.5*np.random.randn(nny,nx) W5 = 0.5*np.random.randn(ny,nny) b3 = np.zeros(nny) b4 = np.zeros(ny) return [A,B,C,W1,W2,W3,b1,b2,W4,W5,b3,b4] models = model.parallel_fit(Ys, Us, init_fcn=init_fcn, seeds=range(10), n_jobs=10) </code></pre></div> <p dir="auto">By default, <code>n_jobs</code> is equal to the number of all available CPUs.</p> <p dir="auto">To select the best model on a dataset <code>Us_test</code>, <code>Ys_test</code> in accordance with a given fit criterion, you can use <code>find_best_model</code>:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from jax_sysid.models import find_best_model best_model, best_R2 = find_best_model(models, Ys_test, Us_test, fit='R2')"><pre class="notranslate"><code>from jax_sysid.models import find_best_model best_model, best_R2 = find_best_model(models, Ys_test, Us_test, fit='R2') </code></pre></div> <div class="markdown-heading" dir="auto"><h4 tabindex="-1" class="heading-element" dir="auto">flax.linen models</h4><a id="user-content-flaxlinen-models" class="anchor" aria-label="Permalink: flax.linen models" href="#flaxlinen-models"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto"><strong>jax-sysid</strong> also supports recurrent neural networks defined via the <strong>flax.linen</strong> library (the <code>flax</code> package can be installed via <code>pip install flax</code>):</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from jax_sysid.models import RNN # state-update function class FX(nn.Module): @nn.compact def __call__(self, x): x = nn.Dense(features=5)(x) x = nn.swish(x) x = nn.Dense(features=5)(x) x = nn.swish(x) x = nn.Dense(features=nx)(x) return x # output function class FY(nn.Module): @nn.compact def __call__(self, x): x = nn.Dense(features=5)(x) x = nn.tanh(x) x = nn.Dense(features=ny)(x) return x model = RNN(nx, ny, nu, FX=FX, FY=FY, x_scaling=0.1) model.loss(rho_x0=1.e-4, rho_th=1.e-4, tau_th=0.0001) model.optimization(adam_epochs=0, lbfgs_epochs=2000) model.fit(Ys, Us)"><pre><span class="pl-k">from</span> <span class="pl-s1">jax_sysid</span>.<span class="pl-s1">models</span> <span class="pl-k">import</span> <span class="pl-c1">RNN</span> <span class="pl-c"># state-update function</span> <span class="pl-k">class</span> <span class="pl-c1">FX</span>(<span class="pl-s1">nn</span>.<span class="pl-c1">Module</span>): <span class="pl-en">@<span class="pl-s1">nn</span>.<span class="pl-c1">compact</span></span> <span class="pl-k">def</span> <span class="pl-en">__call__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">x</span>): <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">nn</span>.<span class="pl-c1">Dense</span>(<span class="pl-s1">features</span><span class="pl-c1">=</span><span class="pl-c1">5</span>)(<span class="pl-s1">x</span>) <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">nn</span>.<span class="pl-c1">swish</span>(<span class="pl-s1">x</span>) <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">nn</span>.<span class="pl-c1">Dense</span>(<span class="pl-s1">features</span><span class="pl-c1">=</span><span class="pl-c1">5</span>)(<span class="pl-s1">x</span>) <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">nn</span>.<span class="pl-c1">swish</span>(<span class="pl-s1">x</span>) <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">nn</span>.<span class="pl-c1">Dense</span>(<span class="pl-s1">features</span><span class="pl-c1">=</span><span class="pl-s1">nx</span>)(<span class="pl-s1">x</span>) <span class="pl-k">return</span> <span class="pl-s1">x</span> <span class="pl-c"># output function</span> <span class="pl-k">class</span> <span class="pl-c1">FY</span>(<span class="pl-s1">nn</span>.<span class="pl-c1">Module</span>): <span class="pl-en">@<span class="pl-s1">nn</span>.<span class="pl-c1">compact</span></span> <span class="pl-k">def</span> <span class="pl-en">__call__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">x</span>): <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">nn</span>.<span class="pl-c1">Dense</span>(<span class="pl-s1">features</span><span class="pl-c1">=</span><span class="pl-c1">5</span>)(<span class="pl-s1">x</span>) <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">nn</span>.<span class="pl-c1">tanh</span>(<span class="pl-s1">x</span>) <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">nn</span>.<span class="pl-c1">Dense</span>(<span class="pl-s1">features</span><span class="pl-c1">=</span><span class="pl-s1">ny</span>)(<span class="pl-s1">x</span>) <span class="pl-k">return</span> <span class="pl-s1">x</span> <span class="pl-s1">model</span> <span class="pl-c1">=</span> <span class="pl-en">RNN</span>(<span class="pl-s1">nx</span>, <span class="pl-s1">ny</span>, <span class="pl-s1">nu</span>, <span class="pl-c1">FX</span><span class="pl-c1">=</span><span class="pl-c1">FX</span>, <span class="pl-c1">FY</span><span class="pl-c1">=</span><span class="pl-c1">FY</span>, <span class="pl-s1">x_scaling</span><span class="pl-c1">=</span><span class="pl-c1">0.1</span>) <span class="pl-s1">model</span>.<span class="pl-c1">loss</span>(<span class="pl-s1">rho_x0</span><span class="pl-c1">=</span><span class="pl-c1">1.e-4</span>, <span class="pl-s1">rho_th</span><span class="pl-c1">=</span><span class="pl-c1">1.e-4</span>, <span class="pl-s1">tau_th</span><span class="pl-c1">=</span><span class="pl-c1">0.0001</span>) <span class="pl-s1">model</span>.<span class="pl-c1">optimization</span>(<span class="pl-s1">adam_epochs</span><span class="pl-c1">=</span><span class="pl-c1">0</span>, <span class="pl-s1">lbfgs_epochs</span><span class="pl-c1">=</span><span class="pl-c1">2000</span>) <span class="pl-s1">model</span>.<span class="pl-c1">fit</span>(<span class="pl-v">Ys</span>, <span class="pl-v">Us</span>)</pre></div> <p dir="auto">where the extra parameter <code>x_scaling</code> is used to scale down (when <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$0\leq$</math-renderer> <code>x_scaling</code> <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$&lt;1$</math-renderer>) the default initialization of the network weights instantiated by <strong>flax</strong>.</p> <div class="markdown-heading" dir="auto"><h4 tabindex="-1" class="heading-element" dir="auto">Custom output loss</h4><a id="user-content-custom-output-loss" class="anchor" aria-label="Permalink: Custom output loss" href="#custom-output-loss"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto"><strong>jax-sysid</strong> also supports custom loss functions penalizing the deviations of <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$\hat y$</math-renderer> from <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$y$</math-renderer>. For example, to identify a system with a binary output, we can use the (modified) cross-entropy loss</p> <p dir="auto"><math-renderer class="js-display-math" style="display: block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$$ {\mathcal L}(\hat Y,Y)=\frac{1}{N}\sum_{k=0}^{N-1} -y_k\log(\epsilon+\hat y_k)-(1-y_k)\log(\epsilon+1-\hat y_k) $$</math-renderer></p> <p dir="auto">where <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$\hat Y=(\hat y_0,\ldots,\hat y_{N-1})$</math-renderer> and <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$Y=(y_0,\ldots, y_{N-1})$</math-renderer> are the sequences of predicted and measured outputs, respectively, and <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$\epsilon&gt;0$</math-renderer> is a tolerance used to prevent numerical issues in case <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$\hat y_k\approx 0$</math-renderer> or <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$\hat y_k\approx 1$</math-renderer>:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="epsil=1.e-4 @jax.jit def cross_entropy_loss(Yhat,Y): loss=jnp.sum(-Y*jnp.log(epsil+Yhat)-(1.-Y)*jnp.log(epsil+1.-Yhat))/Y.shape[0] return loss model.loss(rho_x0=0.01, rho_th=0.001, output_loss=cross_entropy_loss)"><pre><span class="pl-s1">epsil</span><span class="pl-c1">=</span><span class="pl-c1">1.e-4</span> <span class="pl-en">@<span class="pl-s1">jax</span>.<span class="pl-c1">jit</span></span> <span class="pl-k">def</span> <span class="pl-en">cross_entropy_loss</span>(<span class="pl-v">Yhat</span>,<span class="pl-c1">Y</span>): <span class="pl-s1">loss</span><span class="pl-c1">=</span><span class="pl-s1">jnp</span>.<span class="pl-c1">sum</span>(<span class="pl-c1">-</span><span class="pl-c1">Y</span><span class="pl-c1">*</span><span class="pl-s1">jnp</span>.<span class="pl-c1">log</span>(<span class="pl-s1">epsil</span><span class="pl-c1">+</span><span class="pl-v">Yhat</span>)<span class="pl-c1">-</span>(<span class="pl-c1">1.</span><span class="pl-c1">-</span><span class="pl-c1">Y</span>)<span class="pl-c1">*</span><span class="pl-s1">jnp</span>.<span class="pl-c1">log</span>(<span class="pl-s1">epsil</span><span class="pl-c1">+</span><span class="pl-c1">1.</span><span class="pl-c1">-</span><span class="pl-v">Yhat</span>))<span class="pl-c1">/</span><span class="pl-c1">Y</span>.<span class="pl-c1">shape</span>[<span class="pl-c1">0</span>] <span class="pl-k">return</span> <span class="pl-s1">loss</span> <span class="pl-s1">model</span>.<span class="pl-c1">loss</span>(<span class="pl-s1">rho_x0</span><span class="pl-c1">=</span><span class="pl-c1">0.01</span>, <span class="pl-s1">rho_th</span><span class="pl-c1">=</span><span class="pl-c1">0.001</span>, <span class="pl-s1">output_loss</span><span class="pl-c1">=</span><span class="pl-s1">cross_entropy_loss</span>)</pre></div> <p dir="auto">By default, <strong>jax-sysid</strong> minimizes the classical mean squared error</p> <p dir="auto"><math-renderer class="js-display-math" style="display: block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$$ {\mathcal L}(\hat Y,Y)=\frac{1}{N}\sum_{k=0}^{N-1} |y_k-\hat y_k|_2^2 $$</math-renderer></p> <div class="markdown-heading" dir="auto"><h4 tabindex="-1" class="heading-element" dir="auto">Custom regularization</h4><a id="user-content-custom-regularization" class="anchor" aria-label="Permalink: Custom regularization" href="#custom-regularization"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto"><strong>jax-sysid</strong> also supports custom regularization terms <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$r_c(z)$</math-renderer>, where <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$z=(\theta,x_0)$</math-renderer>. You can specify such a custom regularization function when defining the overall loss. For example, say for some reason you want to impose <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$|\theta|_2^2\leq 1$</math-renderer> as a soft constraint, you can penalize</p> <p dir="auto">$$\frac{1}{2} \rho_{\theta} |\theta|<em>2^2 + \rho</em>{x_0} |x_0|_2^2 + \rho_c\max{|\theta|_2^2-1,0}^2$$</p> <p dir="auto">with <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$\rho_c\gg\rho_\theta$</math-renderer>, <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$\rho_c\gg\rho_{x_0}$</math-renderer>, for instance <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$\rho_c=1000$</math-renderer>, <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$\rho_\theta=0.001$</math-renderer>, <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$\rho_{x0}=0.01$</math-renderer>. In Python:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@jax.jit def custom_reg_fcn(th,x0): return 1000.*jnp.maximum(jnp.sum(th**2)-1.,0.)**2 model.loss(rho_x0=0.01, rho_th=0.001, custom_regularization= custom_reg_fcn)"><pre><span class="pl-en">@<span class="pl-s1">jax</span>.<span class="pl-c1">jit</span></span> <span class="pl-k">def</span> <span class="pl-en">custom_reg_fcn</span>(<span class="pl-s1">th</span>,<span class="pl-s1">x0</span>): <span class="pl-k">return</span> <span class="pl-c1">1000.</span><span class="pl-c1">*</span><span class="pl-s1">jnp</span>.<span class="pl-c1">maximum</span>(<span class="pl-s1">jnp</span>.<span class="pl-c1">sum</span>(<span class="pl-s1">th</span><span class="pl-c1">**</span><span class="pl-c1">2</span>)<span class="pl-c1">-</span><span class="pl-c1">1.</span>,<span class="pl-c1">0.</span>)<span class="pl-c1">**</span><span class="pl-c1">2</span> <span class="pl-s1">model</span>.<span class="pl-c1">loss</span>(<span class="pl-s1">rho_x0</span><span class="pl-c1">=</span><span class="pl-c1">0.01</span>, <span class="pl-s1">rho_th</span><span class="pl-c1">=</span><span class="pl-c1">0.001</span>, <span class="pl-s1">custom_regularization</span><span class="pl-c1">=</span> <span class="pl-s1">custom_reg_fcn</span>)</pre></div> <div class="markdown-heading" dir="auto"><h4 tabindex="-1" class="heading-element" dir="auto">Static gain</h4><a id="user-content-static-gain-1" class="anchor" aria-label="Permalink: Static gain" href="#static-gain-1"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">As for linear systems, a special case of custom regularization function to fit the DC-gain of the model to steady-state input data <code>Uss</code> and corresponding output data <code>Yss</code> is obtained using the following commands:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="dcgain_loss = model.dcgain_loss(Uss = Uss, Yss = Yss) model.loss(rho_x0=1.e-3, rho_th=1.e-2, custom_regularization = dcgain_loss)"><pre><span class="pl-s1">dcgain_loss</span> <span class="pl-c1">=</span> <span class="pl-s1">model</span>.<span class="pl-c1">dcgain_loss</span>(<span class="pl-v">Uss</span> <span class="pl-c1">=</span> <span class="pl-v">Uss</span>, <span class="pl-v">Yss</span> <span class="pl-c1">=</span> <span class="pl-v">Yss</span>) <span class="pl-s1">model</span>.<span class="pl-c1">loss</span>(<span class="pl-s1">rho_x0</span><span class="pl-c1">=</span><span class="pl-c1">1.e-3</span>, <span class="pl-s1">rho_th</span><span class="pl-c1">=</span><span class="pl-c1">1.e-2</span>, <span class="pl-s1">custom_regularization</span> <span class="pl-c1">=</span> <span class="pl-s1">dcgain_loss</span>)</pre></div> <p dir="auto">before calling the <code>fit</code> function. Note that this penalty involves solving a system of nonlinear equations for every input/output steady-state pair to evaluate the loss function, so it can be slow if many steady-state data pairs are given.</p> <div class="markdown-heading" dir="auto"><h4 tabindex="-1" class="heading-element" dir="auto">Upper and lower bounds</h4><a id="user-content-upper-and-lower-bounds" class="anchor" aria-label="Permalink: Upper and lower bounds" href="#upper-and-lower-bounds"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">To include lower and upper bounds on the parameters of the model and/or the initial state, use the following additional arguments when specifying the optimization problem:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="model.optimization(params_min=lb, params_max=ub, x0_min=xmin, x0_max=xmax, ...)"><pre><span class="pl-s1">model</span>.<span class="pl-c1">optimization</span>(<span class="pl-s1">params_min</span><span class="pl-c1">=</span><span class="pl-s1">lb</span>, <span class="pl-s1">params_max</span><span class="pl-c1">=</span><span class="pl-s1">ub</span>, <span class="pl-s1">x0_min</span><span class="pl-c1">=</span><span class="pl-s1">xmin</span>, <span class="pl-s1">x0_max</span><span class="pl-c1">=</span><span class="pl-s1">xmax</span>, ...)</pre></div> <p dir="auto">where <code>lb</code> and <code>ub</code> are lists of arrays with the same structure as <code>model.params</code>, while <code>xmin</code> and <code>xmax</code> are arrays of the same dimension <code>model.nx</code> of the state vector. By default, each value is set equal to <code>None</code>, i.e., the corresponding constraint is not enforced. See <code>example_linear_positive.py</code> for examples of how to use nonnegative constraints to fit a positive linear system.</p> <p dir="auto"><a name="user-content-quasilpv"></a></p> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Linear Parameter-Varying (LPV) models</h3><a id="user-content-linear-parameter-varying-lpv-models" class="anchor" aria-label="Permalink: Linear Parameter-Varying (LPV) models" href="#linear-parameter-varying-lpv-models"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <div class="markdown-heading" dir="auto"><h4 tabindex="-1" class="heading-element" dir="auto">Training LPV models</h4><a id="user-content-training-lpv-models" class="anchor" aria-label="Permalink: Training LPV models" href="#training-lpv-models"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">As a special case of nonlinear dynamical models, <strong>jax-sysid</strong> supports the identification of quasi-LPV models of the form</p> <p dir="auto"><math-renderer class="js-display-math" style="display: block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$$x_{k+1} = A(p_k)x_k + B(p_k)u_k$$</math-renderer></p> <p dir="auto"><math-renderer class="js-display-math" style="display: block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$$y_k = C(p_k) x_k+D(p_k)u_k$$</math-renderer></p> <p dir="auto">(a.k.a. <em>self-scheduled</em> LPV models) where the scheduling vector <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$p_k$</math-renderer> is an arbitrary parametric nonlinear function (to be trained) of <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$x_k$</math-renderer> and <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$u_k$</math-renderer> with <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$n_p$</math-renderer> entries</p> <p dir="auto"><math-renderer class="js-display-math" style="display: block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$$p_k = f(x_k,u_k,\theta_p)$$</math-renderer></p> <p dir="auto">and</p> <p dir="auto"><math-renderer class="js-display-math" style="display: block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$$A(p_k) = A_{\rm lin}+\sum_{i=1}^{n_p} A_i p_{ki},~~B(p_k) = B_{\rm lin}+\sum_{i=1}^{n_p} B_i p_{ki}$$</math-renderer></p> <p dir="auto"><math-renderer class="js-display-math" style="display: block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$$C(p_k) = C_{\rm lin}+\sum_{i=1}^{n_p} C_i p_{ki},~~D(p_k) = D_{\rm lin}+\sum_{i=1}^{n_p} D_i p_{ki}$$</math-renderer></p> <p dir="auto">For both LTI and qLPV models, <strong>jax-sysid</strong> must enable the feedthrough term <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$D(p_k)=0$</math-renderer> by specifying the flag <code>feedthrough=True</code> when defining the model (by default, no feedthrough is in place). Moreover, for all linear, nonlinear, and qLPV models, one can force <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$y_k=[I\ 0]x_k$</math-renderer> by specifying <code>y_in_x=True</code> in the object constructor.</p> <p dir="auto">Let's train a quasi-LPV model on a sequence of inputs <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$U=[u_0\ \ldots\ u_{N-1}]'$</math-renderer> and output <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$Y=[y_0\ \ldots\ y_{N-1}]'$</math-renderer>, with scheduling parameter function <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$f(x,u,\theta_p)$</math-renderer> = <code>qlpv_fcn</code>, initial parameters <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$\theta_p$</math-renderer> = <code>qlpv_params_init</code>, regularization <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$\rho_\theta=10^{-2}$</math-renderer>, <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$\rho_{x_0}=10^{-3}$</math-renderer>, running the L-BFGS solver for at most 1000 function evaluations:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from jax_sysid.models import qLPVModel model = qLPVModel(nx, ny, nu, npar, qlpv_fcn, qlpv_params_init) model.loss(rho_x0=1.e-3, rho_th=1.e-2) model.optimization(lbfgs_epochs=1000) model.fit(Ys, Us, LTI_training=True) Yhat, Xhat = model.predict(model.x0, U)"><pre><span class="pl-k">from</span> <span class="pl-s1">jax_sysid</span>.<span class="pl-s1">models</span> <span class="pl-k">import</span> <span class="pl-s1">qLPVModel</span> <span class="pl-s1">model</span> <span class="pl-c1">=</span> <span class="pl-en">qLPVModel</span>(<span class="pl-s1">nx</span>, <span class="pl-s1">ny</span>, <span class="pl-s1">nu</span>, <span class="pl-s1">npar</span>, <span class="pl-s1">qlpv_fcn</span>, <span class="pl-s1">qlpv_params_init</span>) <span class="pl-s1">model</span>.<span class="pl-c1">loss</span>(<span class="pl-s1">rho_x0</span><span class="pl-c1">=</span><span class="pl-c1">1.e-3</span>, <span class="pl-s1">rho_th</span><span class="pl-c1">=</span><span class="pl-c1">1.e-2</span>) <span class="pl-s1">model</span>.<span class="pl-c1">optimization</span>(<span class="pl-s1">lbfgs_epochs</span><span class="pl-c1">=</span><span class="pl-c1">1000</span>) <span class="pl-s1">model</span>.<span class="pl-c1">fit</span>(<span class="pl-v">Ys</span>, <span class="pl-v">Us</span>, <span class="pl-v">LTI_training</span><span class="pl-c1">=</span><span class="pl-c1">True</span>) <span class="pl-v">Yhat</span>, <span class="pl-v">Xhat</span> <span class="pl-c1">=</span> <span class="pl-s1">model</span>.<span class="pl-c1">predict</span>(<span class="pl-s1">model</span>.<span class="pl-c1">x0</span>, <span class="pl-c1">U</span>)</pre></div> <p dir="auto">where <code>Us</code>, <code>Ys</code> are the scaled input and output signals. The flag <code>LTI_training=True</code> forces the training algorithm to initialize <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$A_{\rm lin},B_{\rm lin},C_{\rm lin},D_{\rm lin}$</math-renderer> by first fitting an LTI model.</p> <p dir="auto">After identifying the model, to retrieve the resulting matrices <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$A_{\rm lin}$</math-renderer>, <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$B_{\rm lin}$</math-renderer>, <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$C_{\rm lin}$</math-renderer>, <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$D_{\rm lin}$</math-renderer>, <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">${A_i}$</math-renderer>, <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">${B_i}$</math-renderer>, <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">${C_i}$</math-renderer>, <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">${D_i}$</math-renderer>, <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$i=1,\ldots,n_p$</math-renderer>, you can use the following:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="A, B, C, D, Ap, Bp, Cp, Dp = model.ssdata()"><pre><span class="pl-c1">A</span>, <span class="pl-c1">B</span>, <span class="pl-c1">C</span>, <span class="pl-c1">D</span>, <span class="pl-v">Ap</span>, <span class="pl-v">Bp</span>, <span class="pl-v">Cp</span>, <span class="pl-v">Dp</span> <span class="pl-c1">=</span> <span class="pl-s1">model</span>.<span class="pl-c1">ssdata</span>()</pre></div> <p dir="auto">where <code>Ap</code>, <code>Bp</code>, <code>Cp</code>, <code>Dp</code> are tensors (3D matrices) containing the corresponding linear matrices, i.e., <code>Ap[i,:,:]</code>=$A_i$, <code>Bp[i,:,:]</code>=$B_i$, <code>Cp[i,:,:]</code>=$C_i$, <code>Dp[i,:,:]</code>=$D_i$.</p> <p dir="auto">To attempt to reduce the number of scheduling variables in the model, you can use group-Lasso regularization as follows:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="model.loss(rho_x0=1.e-3, rho_th=1.e-2, tau_g=0.1) model.group_lasso_p() model.fit(Ys, Us)"><pre><span class="pl-s1">model</span>.<span class="pl-c1">loss</span>(<span class="pl-s1">rho_x0</span><span class="pl-c1">=</span><span class="pl-c1">1.e-3</span>, <span class="pl-s1">rho_th</span><span class="pl-c1">=</span><span class="pl-c1">1.e-2</span>, <span class="pl-s1">tau_g</span><span class="pl-c1">=</span><span class="pl-c1">0.1</span>) <span class="pl-s1">model</span>.<span class="pl-c1">group_lasso_p</span>() <span class="pl-s1">model</span>.<span class="pl-c1">fit</span>(<span class="pl-v">Ys</span>, <span class="pl-v">Us</span>)</pre></div> <p dir="auto">Each group <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$i=1,\ldots,n_p$</math-renderer> collects the entries of <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$(A_i, B_i, C_i, D_i)$</math-renderer> and <code>tau_g</code> is the weight associated with the corresponding group-Lasso penalty.</p> <p dir="auto">Parallel training from different initial guesses is also supported for qLPV models. To this end, you must define a function <code>qlpv_param_init_fcn(seed)</code> that initializes the parameter vector <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$\theta_p$</math-renderer> of the scheduling function for a given <code>seed</code>. For example, you can train the model for 10 different random seeds on 10 jobs by running:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="models = model.parallel_fit(Y, U, qlpv_param_init_fcn=qlpv_param_init_fcn, seeds=range(10), n_jobs=10)"><pre><span class="pl-s1">models</span> <span class="pl-c1">=</span> <span class="pl-s1">model</span>.<span class="pl-c1">parallel_fit</span>(<span class="pl-c1">Y</span>, <span class="pl-c1">U</span>, <span class="pl-s1">qlpv_param_init_fcn</span><span class="pl-c1">=</span><span class="pl-s1">qlpv_param_init_fcn</span>, <span class="pl-s1">seeds</span><span class="pl-c1">=</span><span class="pl-en">range</span>(<span class="pl-c1">10</span>), <span class="pl-s1">n_jobs</span><span class="pl-c1">=</span><span class="pl-c1">10</span>)</pre></div> <p dir="auto"><em>Externally scheduled</em> LPV models, in which <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$p_k$</math-renderer> is an exogenous signal, can be modeled by simply extending the input signal to also include <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$p_k$</math-renderer> and defining <code>qlpv_fcn</code> as <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$f(x,[u\ p],\theta_p)=p$</math-renderer>. In this case, <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$\theta_p$</math-renderer> is empty, as there is no parameter to tune in the scheduling parameter function.</p> <p dir="auto"><a name="user-content-continuous-time"></a></p> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Continuous-time models</h3><a id="user-content-continuous-time-models" class="anchor" aria-label="Permalink: Continuous-time models" href="#continuous-time-models"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <div class="markdown-heading" dir="auto"><h4 tabindex="-1" class="heading-element" dir="auto">Training continuous-time models</h4><a id="user-content-training-continuous-time-models" class="anchor" aria-label="Permalink: Training continuous-time models" href="#training-continuous-time-models"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto"><strong>jax-sysid</strong> supports the identification of general parametric nonlinear continuous-time models</p> <p dir="auto"><math-renderer class="js-display-math" style="display: block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$$\frac{dx(t)}{dt} = f_x(x(t),u(t),t,\theta)$$</math-renderer> <math-renderer class="js-display-math" style="display: block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$$y_k = f_y(x(t),u(t),t,\theta)$$</math-renderer></p> <p dir="auto">by using the package <code>diffrax</code> (Kidger, 2021) for the integration of ordinary differential equations.</p> <p dir="auto">The default loss function is <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$$\frac{1}{t_{end}-t_{init}}\int_{t_{init}}^{t_{end}}(\hat y(t)-y(t))^2 dt$$</math-renderer> where <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$t_{init}$</math-renderer> and <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$t_{end}$</math-renderer> are the initial and final time over which the training dataset is defined.</p> <p dir="auto">Linear time-invariant continuous-time models are a special case in which <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$$f_x(x(t),u(t),t,\theta)=Ax(t)+Bu(t)$$</math-renderer> <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$$f_y(x(t),u(t),t,\theta)=Cx(t)+Du(t)$$</math-renderer> with <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$\theta=(A,B,C,D)$</math-renderer>.</p> <p dir="auto">You can train a continuous time model with <code>nx</code> states, <code>ny</code> outputs, and <code>nu</code> inputs as follows:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from jax_sysid import CTModel model = CTModel(nx, ny, nu, state_fcn=state_fcn, output_fcn=output_fcn)"><pre class="notranslate"><code>from jax_sysid import CTModel model = CTModel(nx, ny, nu, state_fcn=state_fcn, output_fcn=output_fcn) </code></pre></div> <p dir="auto">where <code>state_fcn(x, u, t, params)</code> defines the state update <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$\frac{dx(t)}{dt}$</math-renderer> and <code>output_fcn(x, u, t, params)</code> the output <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$y(t)$</math-renderer>.</p> <p dir="auto">Then, run</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="model.init(params) # initial values of the parameters model.fit(Y, U, T)"><pre class="notranslate"><code>model.init(params) # initial values of the parameters model.fit(Y, U, T) </code></pre></div> <p dir="auto">By default, the integration method <code>diffrax.Heun()</code> is employed, with an integration step equal to (<code>T[1]-T[0]</code>)/10 and the input signal <code>U</code> is modeled in continuous-time by assuming that a zero-order hold (ZOH) keeps the samples <code>U[k]</code> constant over each time interval in <code>T</code>.</p> <p dir="auto">To change integration options, such as to use a different integration solver like <code>diffrax.Euler()</code>, <code>diffrax.Dopri5()</code>, etc., you must call</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="model.integration_options(ode_solver=diffrax.Dopri5())"><pre class="notranslate"><code>model.integration_options(ode_solver=diffrax.Dopri5()) </code></pre></div> <p dir="auto">After training, predictions can be obtained by running</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Y, X = model.predict(model.x0, U, T)"><pre class="notranslate"><code>Y, X = model.predict(model.x0, U, T) </code></pre></div> <p dir="auto">You can reconstruct an initial state on test data by running</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="x0_test = model.learn_x0(U_test, Y_test, T_test)"><pre class="notranslate"><code>x0_test = model.learn_x0(U_test, Y_test, T_test) </code></pre></div> <p dir="auto">To specify that the input signal is sampled at different time instants, you must use an extra input argument to specify the array of time instants at which the input is sampled:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="model.fit(Y, U, T, Tu) x0_test = model.learn_x0(U_test, Y_test, T_test, Tu_test)"><pre class="notranslate"><code>model.fit(Y, U, T, Tu) x0_test = model.learn_x0(U_test, Y_test, T_test, Tu_test) </code></pre></div> <p dir="auto"><a name="user-content-static"></a></p> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Static models</h3><a id="user-content-static-models" class="anchor" aria-label="Permalink: Static models" href="#static-models"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <div class="markdown-heading" dir="auto"><h4 tabindex="-1" class="heading-element" dir="auto">Nonlinear regression</h4><a id="user-content-nonlinear-regression" class="anchor" aria-label="Permalink: Nonlinear regression" href="#nonlinear-regression"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">The same optimization algorithms used to train dynamical models can be used to train static models, i.e., to solve the nonlinear regression problem:</p> <p dir="auto"><math-renderer class="js-display-math" style="display: block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$$ \min_{z}r(z)+\frac{1}{N}\sum_{k=0}^{N-1} |y_{k}-f(u_k,\theta)|_2^2$$</math-renderer></p> <p dir="auto">where <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$z=\theta$</math-renderer> is the vector of model parameters to train and <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$r(z)$</math-renderer> admits the same regularization terms as in the case of dynamical models.</p> <p dir="auto">For example, if the model is a shallow neural network you can use the following code:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from jax_sysid.models import StaticModel from jax_sysid.utils import standard_scale, unscale @jax.jit def output_fcn(u, params): W1,b1,W2,b2=params y = W1@u.T+b1 y = W2@jnp.arctan(y)+b2 return y.T model = StaticModel(ny, nu, output_fcn) nn=10 # number of neurons model.init(params=[np.random.randn(nn,nu), np.random.randn(nn,1), np.random.randn(1,nn), np.random.randn(1,1)]) model.loss(rho_th=1.e-4, tau_th=tau_th) model.optimization(lbfgs_epochs=500) model.fit(Ys, Us)"><pre><span class="pl-k">from</span> <span class="pl-s1">jax_sysid</span>.<span class="pl-s1">models</span> <span class="pl-k">import</span> <span class="pl-v">StaticModel</span> <span class="pl-k">from</span> <span class="pl-s1">jax_sysid</span>.<span class="pl-s1">utils</span> <span class="pl-k">import</span> <span class="pl-s1">standard_scale</span>, <span class="pl-s1">unscale</span> <span class="pl-en">@<span class="pl-s1">jax</span>.<span class="pl-c1">jit</span></span> <span class="pl-k">def</span> <span class="pl-en">output_fcn</span>(<span class="pl-s1">u</span>, <span class="pl-s1">params</span>): <span class="pl-v">W1</span>,<span class="pl-s1">b1</span>,<span class="pl-v">W2</span>,<span class="pl-s1">b2</span><span class="pl-c1">=</span><span class="pl-s1">params</span> <span class="pl-s1">y</span> <span class="pl-c1">=</span> <span class="pl-v">W1</span>@<span class="pl-s1">u</span>.<span class="pl-c1">T</span><span class="pl-c1">+</span><span class="pl-s1">b1</span> <span class="pl-s1">y</span> <span class="pl-c1">=</span> <span class="pl-v">W2</span>@<span class="pl-s1">jnp</span>.<span class="pl-c1">arctan</span>(<span class="pl-s1">y</span>)<span class="pl-c1">+</span><span class="pl-s1">b2</span> <span class="pl-k">return</span> <span class="pl-s1">y</span>.<span class="pl-c1">T</span> <span class="pl-s1">model</span> <span class="pl-c1">=</span> <span class="pl-en">StaticModel</span>(<span class="pl-s1">ny</span>, <span class="pl-s1">nu</span>, <span class="pl-s1">output_fcn</span>) <span class="pl-s1">nn</span><span class="pl-c1">=</span><span class="pl-c1">10</span> <span class="pl-c"># number of neurons</span> <span class="pl-s1">model</span>.<span class="pl-c1">init</span>(<span class="pl-s1">params</span><span class="pl-c1">=</span>[<span class="pl-s1">np</span>.<span class="pl-c1">random</span>.<span class="pl-c1">randn</span>(<span class="pl-s1">nn</span>,<span class="pl-s1">nu</span>), <span class="pl-s1">np</span>.<span class="pl-c1">random</span>.<span class="pl-c1">randn</span>(<span class="pl-s1">nn</span>,<span class="pl-c1">1</span>), <span class="pl-s1">np</span>.<span class="pl-c1">random</span>.<span class="pl-c1">randn</span>(<span class="pl-c1">1</span>,<span class="pl-s1">nn</span>), <span class="pl-s1">np</span>.<span class="pl-c1">random</span>.<span class="pl-c1">randn</span>(<span class="pl-c1">1</span>,<span class="pl-c1">1</span>)]) <span class="pl-s1">model</span>.<span class="pl-c1">loss</span>(<span class="pl-s1">rho_th</span><span class="pl-c1">=</span><span class="pl-c1">1.e-4</span>, <span class="pl-s1">tau_th</span><span class="pl-c1">=</span><span class="pl-s1">tau_th</span>) <span class="pl-s1">model</span>.<span class="pl-c1">optimization</span>(<span class="pl-s1">lbfgs_epochs</span><span class="pl-c1">=</span><span class="pl-c1">500</span>) <span class="pl-s1">model</span>.<span class="pl-c1">fit</span>(<span class="pl-v">Ys</span>, <span class="pl-v">Us</span>)</pre></div> <p dir="auto"><strong>jax-sysid</strong> also supports feedforward neural networks defined via the <strong>flax.linen</strong> library:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from jax_sysid.models import FNN from flax import linen as nn # output function class FY(nn.Module): @nn.compact def __call__(self, x): x = nn.Dense(features=20)(x) x = nn.tanh(x) x = nn.Dense(features=20)(x) x = nn.tanh(x) x = nn.Dense(features=ny)(x) return x model = FNN(ny, nu, FY) model.loss(rho_th=1.e-4, tau_th=tau_th) model.optimization(lbfgs_epochs=500) model.fit(Ys, Us)"><pre><span class="pl-k">from</span> <span class="pl-s1">jax_sysid</span>.<span class="pl-s1">models</span> <span class="pl-k">import</span> <span class="pl-c1">FNN</span> <span class="pl-k">from</span> <span class="pl-s1">flax</span> <span class="pl-k">import</span> <span class="pl-s1">linen</span> <span class="pl-k">as</span> <span class="pl-s1">nn</span> <span class="pl-c"># output function</span> <span class="pl-k">class</span> <span class="pl-c1">FY</span>(<span class="pl-s1">nn</span>.<span class="pl-c1">Module</span>): <span class="pl-en">@<span class="pl-s1">nn</span>.<span class="pl-c1">compact</span></span> <span class="pl-k">def</span> <span class="pl-en">__call__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">x</span>): <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">nn</span>.<span class="pl-c1">Dense</span>(<span class="pl-s1">features</span><span class="pl-c1">=</span><span class="pl-c1">20</span>)(<span class="pl-s1">x</span>) <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">nn</span>.<span class="pl-c1">tanh</span>(<span class="pl-s1">x</span>) <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">nn</span>.<span class="pl-c1">Dense</span>(<span class="pl-s1">features</span><span class="pl-c1">=</span><span class="pl-c1">20</span>)(<span class="pl-s1">x</span>) <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">nn</span>.<span class="pl-c1">tanh</span>(<span class="pl-s1">x</span>) <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">nn</span>.<span class="pl-c1">Dense</span>(<span class="pl-s1">features</span><span class="pl-c1">=</span><span class="pl-s1">ny</span>)(<span class="pl-s1">x</span>) <span class="pl-k">return</span> <span class="pl-s1">x</span> <span class="pl-s1">model</span> <span class="pl-c1">=</span> <span class="pl-en">FNN</span>(<span class="pl-s1">ny</span>, <span class="pl-s1">nu</span>, <span class="pl-c1">FY</span>) <span class="pl-s1">model</span>.<span class="pl-c1">loss</span>(<span class="pl-s1">rho_th</span><span class="pl-c1">=</span><span class="pl-c1">1.e-4</span>, <span class="pl-s1">tau_th</span><span class="pl-c1">=</span><span class="pl-s1">tau_th</span>) <span class="pl-s1">model</span>.<span class="pl-c1">optimization</span>(<span class="pl-s1">lbfgs_epochs</span><span class="pl-c1">=</span><span class="pl-c1">500</span>) <span class="pl-s1">model</span>.<span class="pl-c1">fit</span>(<span class="pl-v">Ys</span>, <span class="pl-v">Us</span>)</pre></div> <p dir="auto">To include lower and upper bounds on the parameters of the model, use the following additional arguments when specifying the optimization problem:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="model.optimization(lbfgs_epochs=500, params_min=lb, params_max=ub)"><pre><span class="pl-s1">model</span>.<span class="pl-c1">optimization</span>(<span class="pl-s1">lbfgs_epochs</span><span class="pl-c1">=</span><span class="pl-c1">500</span>, <span class="pl-s1">params_min</span><span class="pl-c1">=</span><span class="pl-s1">lb</span>, <span class="pl-s1">params_max</span><span class="pl-c1">=</span><span class="pl-s1">ub</span>)</pre></div> <p dir="auto">where <code>lb</code> and <code>ub</code> are lists of arrays with the same structure as <code>model.params</code>. See <code>example_static_convex.py</code> for examples of how to use nonnegative constraints to fit input-convex neural networks.</p> <div class="markdown-heading" dir="auto"><h4 tabindex="-1" class="heading-element" dir="auto">Classification</h4><a id="user-content-classification" class="anchor" aria-label="Permalink: Classification" href="#classification"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">To solve classification problems, you need to define a custom loss function to change the default Mean-Squared-Error loss. For example, to train a classifier for a multi-category classification problem with <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$K$</math-renderer> classes, you can specify a neural network with a linear output layer generating output predictions <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$\hat y\in R^K$</math-renderer> and define the associated cross-entropy <math-renderer class="js-inline-math" style="display: inline-block" data-static-url="https://github.githubassets.com/static" data-run-id="2d8119db95bbf41c1968ed8468bfd33a">$\ell(\hat y,y) = -\sum_{k=1}^Ky_k\log\left(\frac{e^{\hat y_k}}{\sum_{j=1}^Ke^{\hat y_j}}\right)$</math-renderer> function as follows:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="def cross_entropy(Yhat,Y): return -jax.numpy.sum(jax.nn.log_softmax(Yhat, axis=1)*Y)/Y.shape[0] model.loss(rho_th=1.e-4, output_loss=cross_entropy)"><pre><span class="pl-k">def</span> <span class="pl-en">cross_entropy</span>(<span class="pl-v">Yhat</span>,<span class="pl-c1">Y</span>): <span class="pl-k">return</span> <span class="pl-c1">-</span><span class="pl-s1">jax</span>.<span class="pl-c1">numpy</span>.<span class="pl-c1">sum</span>(<span class="pl-s1">jax</span>.<span class="pl-c1">nn</span>.<span class="pl-c1">log_softmax</span>(<span class="pl-v">Yhat</span>, <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-c1">1</span>)<span class="pl-c1">*</span><span class="pl-c1">Y</span>)<span class="pl-c1">/</span><span class="pl-c1">Y</span>.<span class="pl-c1">shape</span>[<span class="pl-c1">0</span>] <span class="pl-s1">model</span>.<span class="pl-c1">loss</span>(<span class="pl-s1">rho_th</span><span class="pl-c1">=</span><span class="pl-c1">1.e-4</span>, <span class="pl-s1">output_loss</span><span class="pl-c1">=</span><span class="pl-s1">cross_entropy</span>)</pre></div> <p dir="auto">See <code>example_static_fashion_mist.py</code> for an example using <strong>Keras</strong> with JAX backend to define the neural network model.</p> <p dir="auto"><a name="user-content-contributors"></a></p> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">Contributors</h2><a id="user-content-contributors" class="anchor" aria-label="Permalink: Contributors" href="#contributors"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">This package was coded by Alberto Bemporad.</p> <p dir="auto">This software is distributed without any warranty. Please cite the paper below if you use this software.</p> <p dir="auto"><a name="user-content-acknowledgments"></a></p> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">Acknowledgments</h2><a id="user-content-acknowledgments" class="anchor" aria-label="Permalink: Acknowledgments" href="#acknowledgments"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">We thank Roland Toth for suggesting the use of Kung's method for initializing linear state-space models and Kui Xie for feedback on the reconstruction of the initial state via EKF + RTS smoothing.</p> <p dir="auto"><a name="user-content-bibliography"></a></p> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">Citing jax-sysid</h2><a id="user-content-citing-jax-sysid" class="anchor" aria-label="Permalink: Citing jax-sysid" href="#citing-jax-sysid"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto"><a name="user-content-ref1"></a></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@article{Bem25, author={A. Bemporad}, title={An {L-BFGS-B} approach for linear and nonlinear system identification under $\ell_1$ and group-Lasso regularization}, journal = {IEEE Transactions on Automatic Control}, note = {in press. Also available on arXiv at \url{http://arxiv.org/abs/2403.03827}}, year=2025 }"><pre class="notranslate"><code>@article{Bem25, author={A. Bemporad}, title={An {L-BFGS-B} approach for linear and nonlinear system identification under $\ell_1$ and group-Lasso regularization}, journal = {IEEE Transactions on Automatic Control}, note = {in press. Also available on arXiv at \url{http://arxiv.org/abs/2403.03827}}, year=2025 } </code></pre></div> <p dir="auto"><a name="user-content-license"></a></p> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">License</h2><a id="user-content-license" class="anchor" aria-label="Permalink: License" href="#license"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Apache 2.0</p> <p dir="auto">(C) 2024 A. Bemporad</p> </article></div></div></div></div></div> <!-- --> <!-- --> <script type="application/json" id="__PRIMER_DATA_:R0:__">{"resolvedServerColorMode":"day"}</script></div> </react-partial> <input type="hidden" data-csrf="true" value="+RZwU+VvjCLNhQ5WyOI83Y5hscH6XkMqgClVmJhME14ojFvo7qmYJrby6N/AbN5sB8DagTSYd8FGalt+feavnQ==" /> </div> <div data-view-component="true" class="Layout-sidebar"> <div class="BorderGrid about-margin" data-pjax> <div class="BorderGrid-row"> <div class="BorderGrid-cell"> <div class="hide-sm hide-md"> <h2 class="mb-3 h4">About</h2> <p class="f4 my-3"> A Python package for linear subspace identification, nonlinear system identification, and nonlinear regression using Jax </p> <h3 class="sr-only">Resources</h3> <div class="mt-2"> <a class="Link--muted" data-analytics-event="{"category":"Repository Overview","action":"click","label":"location:sidebar;file:readme"}" href="#readme-ov-file"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-book mr-2"> <path d="M0 1.75A.75.75 0 0 1 .75 1h4.253c1.227 0 2.317.59 3 1.501A3.743 3.743 0 0 1 11.006 1h4.245a.75.75 0 0 1 .75.75v10.5a.75.75 0 0 1-.75.75h-4.507a2.25 2.25 0 0 0-1.591.659l-.622.621a.75.75 0 0 1-1.06 0l-.622-.621A2.25 2.25 0 0 0 5.258 13H.75a.75.75 0 0 1-.75-.75Zm7.251 10.324.004-5.073-.002-2.253A2.25 2.25 0 0 0 5.003 2.5H1.5v9h3.757a3.75 3.75 0 0 1 1.994.574ZM8.755 4.75l-.004 7.322a3.752 3.752 0 0 1 1.992-.572H14.5v-9h-3.495a2.25 2.25 0 0 0-2.25 2.25Z"></path> </svg> Readme </a> </div> <h3 class="sr-only">License</h3> <div class="mt-2"> <a href="#Apache-2.0-1-ov-file" class="Link--muted" data-analytics-event="{"category":"Repository Overview","action":"click","label":"location:sidebar;file:license"}" > <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-law mr-2"> <path d="M8.75.75V2h.985c.304 0 .603.08.867.231l1.29.736c.038.022.08.033.124.033h2.234a.75.75 0 0 1 0 1.5h-.427l2.111 4.692a.75.75 0 0 1-.154.838l-.53-.53.529.531-.001.002-.002.002-.006.006-.006.005-.01.01-.045.04c-.21.176-.441.327-.686.45C14.556 10.78 13.88 11 13 11a4.498 4.498 0 0 1-2.023-.454 3.544 3.544 0 0 1-.686-.45l-.045-.04-.016-.015-.006-.006-.004-.004v-.001a.75.75 0 0 1-.154-.838L12.178 4.5h-.162c-.305 0-.604-.079-.868-.231l-1.29-.736a.245.245 0 0 0-.124-.033H8.75V13h2.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1 0-1.5h2.5V3.5h-.984a.245.245 0 0 0-.124.033l-1.289.737c-.265.15-.564.23-.869.23h-.162l2.112 4.692a.75.75 0 0 1-.154.838l-.53-.53.529.531-.001.002-.002.002-.006.006-.016.015-.045.04c-.21.176-.441.327-.686.45C4.556 10.78 3.88 11 3 11a4.498 4.498 0 0 1-2.023-.454 3.544 3.544 0 0 1-.686-.45l-.045-.04-.016-.015-.006-.006-.004-.004v-.001a.75.75 0 0 1-.154-.838L2.178 4.5H1.75a.75.75 0 0 1 0-1.5h2.234a.249.249 0 0 0 .125-.033l1.288-.737c.265-.15.564-.23.869-.23h.984V.75a.75.75 0 0 1 1.5 0Zm2.945 8.477c.285.135.718.273 1.305.273s1.02-.138 1.305-.273L13 6.327Zm-10 0c.285.135.718.273 1.305.273s1.02-.138 1.305-.273L3 6.327Z"></path> </svg> Apache-2.0 license </a> </div> <include-fragment src="/bemporad/jax-sysid/hovercards/citation/sidebar_partial?tree_name=main"> </include-fragment> <div class="mt-2"> <a href="/bemporad/jax-sysid/activity" data-view-component="true" class="Link Link--muted"><svg text="gray" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-pulse mr-2"> <path d="M6 2c.306 0 .582.187.696.471L10 10.731l1.304-3.26A.751.751 0 0 1 12 7h3.25a.75.75 0 0 1 0 1.5h-2.742l-1.812 4.528a.751.751 0 0 1-1.392 0L6 4.77 4.696 8.03A.75.75 0 0 1 4 8.5H.75a.75.75 0 0 1 0-1.5h2.742l1.812-4.529A.751.751 0 0 1 6 2Z"></path> </svg> <span class="color-fg-muted">Activity</span></a> </div> <h3 class="sr-only">Stars</h3> <div class="mt-2"> <a href="/bemporad/jax-sysid/stargazers" data-view-component="true" class="Link Link--muted"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-star mr-2"> <path d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694Z"></path> </svg> <strong>26</strong> stars</a> </div> <h3 class="sr-only">Watchers</h3> <div class="mt-2"> <a href="/bemporad/jax-sysid/watchers" data-view-component="true" class="Link Link--muted"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-eye mr-2"> <path d="M8 2c1.981 0 3.671.992 4.933 2.078 1.27 1.091 2.187 2.345 2.637 3.023a1.62 1.62 0 0 1 0 1.798c-.45.678-1.367 1.932-2.637 3.023C11.67 13.008 9.981 14 8 14c-1.981 0-3.671-.992-4.933-2.078C1.797 10.83.88 9.576.43 8.898a1.62 1.62 0 0 1 0-1.798c.45-.677 1.367-1.931 2.637-3.022C4.33 2.992 6.019 2 8 2ZM1.679 7.932a.12.12 0 0 0 0 .136c.411.622 1.241 1.75 2.366 2.717C5.176 11.758 6.527 12.5 8 12.5c1.473 0 2.825-.742 3.955-1.715 1.124-.967 1.954-2.096 2.366-2.717a.12.12 0 0 0 0-.136c-.412-.621-1.242-1.75-2.366-2.717C10.824 4.242 9.473 3.5 8 3.5c-1.473 0-2.825.742-3.955 1.715-1.124.967-1.954 2.096-2.366 2.717ZM8 10a2 2 0 1 1-.001-3.999A2 2 0 0 1 8 10Z"></path> </svg> <strong>2</strong> watching</a> </div> <h3 class="sr-only">Forks</h3> <div class="mt-2"> <a href="/bemporad/jax-sysid/forks" data-view-component="true" class="Link Link--muted"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo-forked mr-2"> <path d="M5 5.372v.878c0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75v-.878a2.25 2.25 0 1 1 1.5 0v.878a2.25 2.25 0 0 1-2.25 2.25h-1.5v2.128a2.251 2.251 0 1 1-1.5 0V8.5h-1.5A2.25 2.25 0 0 1 3.5 6.25v-.878a2.25 2.25 0 1 1 1.5 0ZM5 3.25a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Zm6.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm-3 8.75a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Z"></path> </svg> <strong>6</strong> forks</a> </div> <div class="mt-2"> <a class="Link--muted" href="/contact/report-content?content_url=https%3A%2F%2Fgithub.com%2Fbemporad%2Fjax-sysid&report=bemporad+%28user%29"> Report repository </a> </div> </div> </div> </div> <div class="BorderGrid-row"> <div class="BorderGrid-cell"> <h2 class="h4 mb-3" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame"> <a href="/bemporad/jax-sysid/releases" data-view-component="true" class="Link--primary no-underline Link">Releases</a></h2> <div class="text-small color-fg-muted">No releases published</div> </div> </div> <div class="BorderGrid-row"> <div class="BorderGrid-cell"> <h2 class="h4 mb-3"> <a href="/users/bemporad/packages?repo_name=jax-sysid" data-view-component="true" class="Link--primary no-underline Link d-flex flex-items-center">Packages <span title="0" hidden="hidden" data-view-component="true" class="Counter ml-1">0</span></a></h2> <div class="text-small color-fg-muted" > No packages published <br> </div> </div> </div> <div class="BorderGrid-row" hidden> <div class="BorderGrid-cell"> <include-fragment src="/bemporad/jax-sysid/used_by_list" accept="text/fragment+html"> </include-fragment> </div> </div> <div class="BorderGrid-row"> <div class="BorderGrid-cell"> <h2 class="h4 mb-3">Languages</h2> <div class="mb-2"> <span data-view-component="true" class="Progress"> <span style="background-color:#3572A5 !important;;width: 100.0%;" itemprop="keywords" data-view-component="true" class="Progress-item color-bg-success-emphasis"></span> </span></div> <ul class="list-style-none"> <li class="d-inline"> <a class="d-inline-flex flex-items-center flex-nowrap Link--secondary no-underline text-small mr-3" href="/bemporad/jax-sysid/search?l=python" data-ga-click="Repository, language stats search click, location:repo overview"> <svg style="color:#3572A5;" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-dot-fill mr-2"> <path d="M8 4a4 4 0 1 1 0 8 4 4 0 0 1 0-8Z"></path> </svg> <span class="color-fg-default text-bold mr-1">Python</span> <span>100.0%</span> </a> </li> </ul> </div> </div> </div> </div> </div></div> </div> </div> </turbo-frame> </main> </div> </div> <footer class="footer pt-8 pb-6 f6 color-fg-muted p-responsive" role="contentinfo" > <h2 class='sr-only'>Footer</h2> <div class="d-flex flex-justify-center flex-items-center flex-column-reverse flex-lg-row flex-wrap flex-lg-nowrap"> <div class="d-flex flex-items-center flex-shrink-0 mx-2"> <a aria-label="Homepage" title="GitHub" class="footer-octicon mr-2" href="https://github.com"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-mark-github"> <path d="M12.5.75C6.146.75 1 5.896 1 12.25c0 5.089 3.292 9.387 7.863 10.91.575.101.79-.244.79-.546 0-.273-.014-1.178-.014-2.142-2.889.532-3.636-.704-3.866-1.35-.13-.331-.69-1.352-1.18-1.625-.402-.216-.977-.748-.014-.762.906-.014 1.553.834 1.769 1.179 1.035 1.74 2.688 1.25 3.349.948.1-.747.402-1.25.733-1.538-2.559-.287-5.232-1.279-5.232-5.678 0-1.25.445-2.285 1.178-3.09-.115-.288-.517-1.467.115-3.048 0 0 .963-.302 3.163 1.179.92-.259 1.897-.388 2.875-.388.977 0 1.955.13 2.875.388 2.2-1.495 3.162-1.179 3.162-1.179.633 1.581.23 2.76.115 3.048.733.805 1.179 1.825 1.179 3.09 0 4.413-2.688 5.39-5.247 5.678.417.36.776 1.05.776 2.128 0 1.538-.014 2.774-.014 3.162 0 .302.216.662.79.547C20.709 21.637 24 17.324 24 12.25 24 5.896 18.854.75 12.5.75Z"></path> </svg> </a> <span> © 2025 GitHub, Inc. </span> </div> <nav aria-label="Footer"> <h3 class="sr-only" id="sr-footer-heading">Footer navigation</h3> <ul class="list-style-none d-flex flex-justify-center flex-wrap mb-2 mb-lg-0" aria-labelledby="sr-footer-heading"> <li class="mx-2"> <a data-analytics-event="{"category":"Footer","action":"go to Terms","label":"text:terms"}" href="https://docs.github.com/site-policy/github-terms/github-terms-of-service" data-view-component="true" class="Link--secondary Link">Terms</a> </li> <li class="mx-2"> <a data-analytics-event="{"category":"Footer","action":"go to privacy","label":"text:privacy"}" href="https://docs.github.com/site-policy/privacy-policies/github-privacy-statement" data-view-component="true" class="Link--secondary Link">Privacy</a> </li> <li class="mx-2"> <a data-analytics-event="{"category":"Footer","action":"go to security","label":"text:security"}" href="https://github.com/security" data-view-component="true" class="Link--secondary Link">Security</a> </li> <li class="mx-2"> <a data-analytics-event="{"category":"Footer","action":"go to status","label":"text:status"}" href="https://www.githubstatus.com/" data-view-component="true" class="Link--secondary Link">Status</a> </li> <li class="mx-2"> <a data-analytics-event="{"category":"Footer","action":"go to docs","label":"text:docs"}" href="https://docs.github.com/" data-view-component="true" class="Link--secondary Link">Docs</a> </li> <li class="mx-2"> <a data-analytics-event="{"category":"Footer","action":"go to contact","label":"text:contact"}" href="https://support.github.com?tags=dotcom-footer" data-view-component="true" class="Link--secondary Link">Contact</a> </li> <li class="mx-2" > <cookie-consent-link> <button type="button" class="Link--secondary underline-on-hover border-0 p-0 color-bg-transparent" data-action="click:cookie-consent-link#showConsentManagement" data-analytics-event="{"location":"footer","action":"cookies","context":"subfooter","tag":"link","label":"cookies_link_subfooter_footer"}" > Manage cookies </button> </cookie-consent-link> </li> <li class="mx-2"> <cookie-consent-link> <button type="button" class="Link--secondary underline-on-hover border-0 p-0 color-bg-transparent" data-action="click:cookie-consent-link#showConsentManagement" data-analytics-event="{"location":"footer","action":"dont_share_info","context":"subfooter","tag":"link","label":"dont_share_info_link_subfooter_footer"}" > Do not share my personal information </button> </cookie-consent-link> </li> </ul> </nav> </div> </footer> <ghcc-consent id="ghcc" class="position-fixed bottom-0 left-0" style="z-index: 999999" data-initial-cookie-consent-allowed="" data-cookie-consent-required="false"></ghcc-consent> <div id="ajax-error-message" class="ajax-error-message flash flash-error" hidden> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert"> <path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path> </svg> <button type="button" class="flash-close js-ajax-error-dismiss" aria-label="Dismiss error"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg> </button> You can’t perform that action at this time. </div> <template id="site-details-dialog"> <details class="details-reset details-overlay details-overlay-dark lh-default color-fg-default hx_rsm" open> <summary role="button" aria-label="Close dialog"></summary> <details-dialog class="Box Box--overlay d-flex flex-column anim-fade-in fast hx_rsm-dialog hx_rsm-modal"> <button class="Box-btn-octicon m-0 btn-octicon position-absolute right-0 top-0" type="button" aria-label="Close dialog" data-close-dialog> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg> </button> <div class="octocat-spinner my-6 js-details-dialog-spinner"></div> </details-dialog> </details> </template> <div class="Popover js-hovercard-content position-absolute" style="display: none; outline: none;"> <div class="Popover-message Popover-message--bottom-left Popover-message--large Box color-shadow-large" style="width:360px;"> </div> </div> <template id="snippet-clipboard-copy-button"> <div class="zeroclipboard-container position-absolute right-0 top-0"> <clipboard-copy aria-label="Copy" class="ClipboardButton btn js-clipboard-copy m-2 p-0" data-copy-feedback="Copied!" data-tooltip-direction="w"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copy js-clipboard-copy-icon m-2"> <path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path> </svg> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check js-clipboard-check-icon color-fg-success d-none m-2"> <path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path> </svg> </clipboard-copy> </div> </template> <template id="snippet-clipboard-copy-button-unpositioned"> <div class="zeroclipboard-container"> <clipboard-copy aria-label="Copy" class="ClipboardButton btn btn-invisible js-clipboard-copy m-2 p-0 d-flex flex-justify-center flex-items-center" data-copy-feedback="Copied!" data-tooltip-direction="w"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copy js-clipboard-copy-icon"> <path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path> </svg> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check js-clipboard-check-icon color-fg-success d-none"> <path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path> </svg> </clipboard-copy> </div> </template> </div> <div id="js-global-screen-reader-notice" class="sr-only mt-n1" aria-live="polite" aria-atomic="true" ></div> <div id="js-global-screen-reader-notice-assertive" class="sr-only mt-n1" aria-live="assertive" aria-atomic="true"></div> </body> </html>