From 360330be585b9b38a57592896572154ba799f93a Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Thu, 2 Nov 2023 14:20:48 +0000 Subject: [PATCH] GitHub Actions build openturns/otsvm 6733810987 --- .../auto_examples_python.zip | Bin 6407 -> 6416 bytes .../plot_example1.ipynb | 4 +- .../auto_examples_jupyter.zip | Bin 8282 -> 8291 bytes .../plot_example2.ipynb | 2 +- .../plot_example1.py | 6 +- .../auto_examples/plot_example1.rst.txt | 8 +- .../auto_examples/plot_example2.rst.txt | 2 +- .../auto_examples/sg_execution_times.rst.txt | 6 +- otsvm/master/_static/basic.css | 22 +++ otsvm/master/_static/classic.css | 2 +- otsvm/master/_static/documentation_options.js | 3 +- otsvm/master/_static/pygments.css | 1 + otsvm/master/_static/searchtools.js | 26 ++- otsvm/master/_static/sg_gallery-dataframe.css | 1 + otsvm/master/_static/sphinx_highlight.js | 16 +- otsvm/master/auto_examples/index.html | 22 +-- otsvm/master/auto_examples/plot_example1.html | 32 ++-- otsvm/master/auto_examples/plot_example2.html | 24 +-- .../auto_examples/sg_execution_times.html | 28 +-- .../architecture/architecture.html | 28 +-- .../developer_guide/developer_guide.html | 22 +-- .../validation/validation.html | 40 ++--- otsvm/master/genindex.html | 100 +++++++++-- otsvm/master/index.html | 28 +-- otsvm/master/objects.inv | Bin 1257 -> 1406 bytes otsvm/master/search.html | 26 +-- otsvm/master/searchindex.js | 2 +- .../_generated/otsvm.ExponentialRBF.html | 153 +++++++++++----- .../otsvm.LibSVMClassification.html | 66 +++---- .../_generated/otsvm.LibSVMRegression.html | 46 ++--- .../_generated/otsvm.LinearKernel.html | 157 +++++++++++----- .../_generated/otsvm.NormalRBF.html | 153 +++++++++++----- .../_generated/otsvm.PolynomialKernel.html | 153 +++++++++++----- .../_generated/otsvm.RationalKernel.html | 153 +++++++++++----- .../_generated/otsvm.SigmoidKernel.html | 153 +++++++++++----- otsvm/master/user_manual/user_manual.html | 168 +++++++++--------- 36 files changed, 1082 insertions(+), 571 deletions(-) diff --git a/otsvm/master/_downloads/07fcc19ba03226cd3d83d4e40ec44385/auto_examples_python.zip b/otsvm/master/_downloads/07fcc19ba03226cd3d83d4e40ec44385/auto_examples_python.zip index 2197265d402e82d4d7560457ea4dcd6a1c9e219b..a49c6bc2584cd7dff8bb01f5e48ad82cc50bb493 100644 GIT binary patch delta 188 zcmZoSnqb5i;LXe;!TeC^@TjxL}4Q8K#>EdI@bIVWMKHSQG6LEvrlHy=DnOR znLv!mdpUJBU*g%$4CibW$YYdXWD;RU7^qw=sIJDwz@Wx9xnDxTz(}v4GQb<51jPoR hEdpSdK!_!cA#9TuN{EQC0`)U6Faco=kgk&e@c?|>gzc66EXcs{d2=?~GR{fDI-4B?_A+e}e#{JF3yJ43 z^1zgD1S;Ri=fNhy$Rxsy#RS30Gb9v54D|{s1H2JRK)NRPNl0la3NbJgP9PzQV-plbJL*R7huYJ>NBEkj&-?p%`Ycc1J##k;^$57?yKR uz9X+N*;av5i;+o$8Db}j*+BD!!7hOiOB!!*PJSmZKG{uykL|QPNDu(`r8ckt delta 190 zcmaFtaLYkFz?+#xgaHJ$W^4>Al1nzd6u{8U~++E6dEpfWEhz?+dt vgc)KfOylJH@?yHLfHoK8 a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, @@ -670,6 +674,16 @@ dd { margin-left: 30px; } +.sig dd { + margin-top: 0px; + margin-bottom: 0px; +} + +.sig dl { + margin-top: 0px; + margin-bottom: 0px; +} + dl > dd:last-child, dl > dd:last-child > :last-child { margin-bottom: 0; @@ -738,6 +752,14 @@ abbr, acronym { cursor: help; } +.translated { + background-color: rgba(207, 255, 207, 0.2) +} + +.untranslated { + background-color: rgba(255, 207, 207, 0.2) +} + /* -- code displays --------------------------------------------------------- */ pre { diff --git a/otsvm/master/_static/classic.css b/otsvm/master/_static/classic.css index d0ed3264dfb..9ad992b8acc 100644 --- a/otsvm/master/_static/classic.css +++ b/otsvm/master/_static/classic.css @@ -129,7 +129,7 @@ a { } a:visited { - color: #355f7c; + color: #551a8b; text-decoration: none; } diff --git a/otsvm/master/_static/documentation_options.js b/otsvm/master/_static/documentation_options.js index b08960088a8..fe1aa455f78 100644 --- a/otsvm/master/_static/documentation_options.js +++ b/otsvm/master/_static/documentation_options.js @@ -1,5 +1,4 @@ -var DOCUMENTATION_OPTIONS = { - URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), +const DOCUMENTATION_OPTIONS = { VERSION: '0.12', LANGUAGE: 'en', COLLAPSE_INDEX: false, diff --git a/otsvm/master/_static/pygments.css b/otsvm/master/_static/pygments.css index 691aeb82d00..0d49244edab 100644 --- a/otsvm/master/_static/pygments.css +++ b/otsvm/master/_static/pygments.css @@ -17,6 +17,7 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: .highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #A00000 } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ .highlight .gr { color: #FF0000 } /* Generic.Error */ .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ .highlight .gi { color: #00A000 } /* Generic.Inserted */ diff --git a/otsvm/master/_static/searchtools.js b/otsvm/master/_static/searchtools.js index 97d56a74d82..7918c3fab31 100644 --- a/otsvm/master/_static/searchtools.js +++ b/otsvm/master/_static/searchtools.js @@ -57,12 +57,12 @@ const _removeChildren = (element) => { const _escapeRegExp = (string) => string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string -const _displayItem = (item, searchTerms) => { +const _displayItem = (item, searchTerms, highlightTerms) => { const docBuilder = DOCUMENTATION_OPTIONS.BUILDER; - const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT; const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX; const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX; const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY; + const contentRoot = document.documentElement.dataset.content_root; const [docName, title, anchor, descr, score, _filename] = item; @@ -75,20 +75,24 @@ const _displayItem = (item, searchTerms) => { if (dirname.match(/\/index\/$/)) dirname = dirname.substring(0, dirname.length - 6); else if (dirname === "index/") dirname = ""; - requestUrl = docUrlRoot + dirname; + requestUrl = contentRoot + dirname; linkUrl = requestUrl; } else { // normal html builders - requestUrl = docUrlRoot + docName + docFileSuffix; + requestUrl = contentRoot + docName + docFileSuffix; linkUrl = docName + docLinkSuffix; } let linkEl = listItem.appendChild(document.createElement("a")); linkEl.href = linkUrl + anchor; linkEl.dataset.score = score; linkEl.innerHTML = title; - if (descr) + if (descr) { listItem.appendChild(document.createElement("span")).innerHTML = " (" + descr + ")"; + // highlight search terms in the description + if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js + highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); + } else if (showSearchSummary) fetch(requestUrl) .then((responseData) => responseData.text()) @@ -97,6 +101,9 @@ const _displayItem = (item, searchTerms) => { listItem.appendChild( Search.makeSearchSummary(data, searchTerms) ); + // highlight search terms in the summary + if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js + highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); }); Search.output.appendChild(listItem); }; @@ -115,14 +122,15 @@ const _finishSearch = (resultCount) => { const _displayNextItem = ( results, resultCount, - searchTerms + searchTerms, + highlightTerms, ) => { // results left, load the summary and display it // this is intended to be dynamic (don't sub resultsCount) if (results.length) { - _displayItem(results.pop(), searchTerms); + _displayItem(results.pop(), searchTerms, highlightTerms); setTimeout( - () => _displayNextItem(results, resultCount, searchTerms), + () => _displayNextItem(results, resultCount, searchTerms, highlightTerms), 5 ); } @@ -360,7 +368,7 @@ const Search = { // console.info("search results:", Search.lastresults); // print the results - _displayNextItem(results, results.length, searchTerms); + _displayNextItem(results, results.length, searchTerms, highlightTerms); }, /** diff --git a/otsvm/master/_static/sg_gallery-dataframe.css b/otsvm/master/_static/sg_gallery-dataframe.css index 25be73092eb..fac74c43b7c 100644 --- a/otsvm/master/_static/sg_gallery-dataframe.css +++ b/otsvm/master/_static/sg_gallery-dataframe.css @@ -19,6 +19,7 @@ table.dataframe { color: var(--sg-text-color); font-size: 12px; table-layout: fixed; + width: auto; } table.dataframe thead { border-bottom: 1px solid var(--sg-text-color); diff --git a/otsvm/master/_static/sphinx_highlight.js b/otsvm/master/_static/sphinx_highlight.js index aae669d7ea6..8a96c69a194 100644 --- a/otsvm/master/_static/sphinx_highlight.js +++ b/otsvm/master/_static/sphinx_highlight.js @@ -29,14 +29,19 @@ const _highlight = (node, addItems, text, className) => { } span.appendChild(document.createTextNode(val.substr(pos, text.length))); + const rest = document.createTextNode(val.substr(pos + text.length)); parent.insertBefore( span, parent.insertBefore( - document.createTextNode(val.substr(pos + text.length)), + rest, node.nextSibling ) ); node.nodeValue = val.substr(0, pos); + /* There may be more occurrences of search term in this node. So call this + * function recursively on the remaining fragment. + */ + _highlight(rest, addItems, text, className); if (isInSVG) { const rect = document.createElementNS( @@ -140,5 +145,10 @@ const SphinxHighlight = { }, }; -_ready(SphinxHighlight.highlightSearchWords); -_ready(SphinxHighlight.initEscapeListener); +_ready(() => { + /* Do not call highlightSearchWords() when we are on the search page. + * It will highlight words from the *previous* search query. + */ + if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords(); + SphinxHighlight.initEscapeListener(); +}); diff --git a/otsvm/master/auto_examples/index.html b/otsvm/master/auto_examples/index.html index ca6d13b22c7..3a128873ce6 100644 --- a/otsvm/master/auto_examples/index.html +++ b/otsvm/master/auto_examples/index.html @@ -1,23 +1,23 @@ - + Examples — OTSVM 0.12 documentation - - + + - - - - + + + + - - - + + + @@ -47,7 +47,7 @@

Navigation

-

Examples

+

Examples

Classification

Classification
diff --git a/otsvm/master/auto_examples/plot_example1.html b/otsvm/master/auto_examples/plot_example1.html index 5ab5c2a6c29..a91acdc8381 100644 --- a/otsvm/master/auto_examples/plot_example1.html +++ b/otsvm/master/auto_examples/plot_example1.html @@ -1,23 +1,23 @@ - + Regression — OTSVM 0.12 documentation - - + + - - - - + + + + - - - + + + @@ -53,7 +53,7 @@

Navigation

to download the full example code

-

Regression

+

Regression

The objective of this example is to create a SVM Regression algorithm in order to create a metamodel.

otsvm enables to:

    @@ -66,7 +66,7 @@

    Navigation

    We recommend for users to use the RBF Kernel (the Gaussian kernel). Moreover, it is important to understand that the selection of parameters (kernel parameter and tradeoff factor) is primary. If you don’t know what to take as parameters, you must take a wide range values, -for example tradeoff \in \{10^-5,10^-3,10^-1...10^3 \} kernel\ parameter \in \{10^-15, 10^-13...,10^3 \}. +for example tradeoff \in \{10^-5,10^-3,10^-1...10^3 \} kernel\ parameter \in \{10^-15, 10^-13...,10^3 \}. Usually, the algorithm always converges, but this can take a long while, mostly if you have a lot of parameters to test.

    import openturns as ot
     import otsvm
    @@ -111,7 +111,7 @@ 

    Navigation

    dataOut = model(dataIn) # second, we create our svm regression object, we must select the third parameter # in an enumerate in the list { NormalRBF, Linear, Sigmoid, Polynomial } -algo = otsvm.SVMRegression(dataIn, dataOut, otsvm.LibSVM.NormalRbf) +algo = otsvm.LibSVMRegression(dataIn, dataOut, otsvm.LibSVM.NormalRbf) # third, we set kernel parameter and tradeoff factor algo.setTradeoffFactor(tradeoff) algo.setKernelParameter(kernel) @@ -132,7 +132,7 @@

    Navigation

    dataOut = model(dataIn) # second, we create our svm regression object, the first parameter is the # function -algo2 = otsvm.SVMRegression(dataIn, dataOut, otsvm.LibSVM.Linear) +algo2 = otsvm.LibSVMRegression(dataIn, dataOut, otsvm.LibSVM.Linear) # third, we set kernel parameter and tradeoff factor algo2.setTradeoffFactor(tradeoff) algo2.setKernelParameter(kernel) @@ -157,7 +157,7 @@

    Navigation

    # degree of 2 ot.ResourceMap.Set("LibSVM-DegreePolynomialKernel", "2") # now the degree of the Polynomial kernel is 2 -algo = otsvm.SVMRegression(dataIn, dataOut, otsvm.LibSVM.Polynomial) +algo = otsvm.LibSVMRegression(dataIn, dataOut, otsvm.LibSVM.Polynomial) # third, we set kernel parameter and tradeoff factor algo.setTradeoffFactor(tradeoff) algo.setKernelParameter(kernel) @@ -176,7 +176,7 @@

    Navigation

    residual=[0.0515409] error=[1.04162]
    -

    Total running time of the script: ( 0 minutes 6.452 seconds)

    +

    Total running time of the script: (0 minutes 4.452 seconds)

-

Total running time of the script: ( 0 minutes 2.537 seconds)

+

Total running time of the script: (0 minutes 1.962 seconds)