Skip to content

Commit

Permalink
Deploying to gh-pages from @ 93105cf 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
bahleg committed Sep 22, 2024
1 parent a88a6f9 commit d6016e3
Show file tree
Hide file tree
Showing 19 changed files with 181 additions and 125 deletions.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
Binary file modified .doctrees/index.doctree
Binary file not shown.
Binary file modified .doctrees/info.doctree
Binary file not shown.
Binary file modified .doctrees/installation.doctree
Binary file not shown.
Binary file modified .doctrees/train.doctree
Binary file not shown.
22 changes: 14 additions & 8 deletions _modules/index.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<html class="writer-html5" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Overview: module code &mdash; MyLib documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/graphviz.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../_static/css/theme.css" />
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css" />


<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
Expand All @@ -27,14 +29,18 @@
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home"> MyLib



<a href="../index.html" class="icon icon-home">
MyLib
</a>
<div class="version">
0.0.1
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
Expand Down Expand Up @@ -70,8 +76,8 @@
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>Overview: module code</li>
<li><a href="../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">Overview: module code</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
Expand Down
40 changes: 23 additions & 17 deletions _modules/mylib/train.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<html class="writer-html5" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>mylib.train &mdash; MyLib documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/graphviz.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css" />


<!--[if lt IE 9]>
<script src="../../_static/js/html5shiv.min.js"></script>
<![endif]-->
Expand All @@ -27,14 +29,18 @@
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../index.html" class="icon icon-home"> MyLib



<a href="../../index.html" class="icon icon-home">
MyLib
</a>
<div class="version">
0.0.1
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
Expand Down Expand Up @@ -70,9 +76,9 @@
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../index.html">Module code</a> &raquo;</li>
<li>mylib.train</li>
<li><a href="../../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="../index.html">Module code</a></li>
<li class="breadcrumb-item active">mylib.train</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
Expand Down Expand Up @@ -104,9 +110,9 @@ <h1>Source code for mylib.train</h1><div class="highlight"><pre>
<span class="kn">from</span> <span class="nn">sklearn.metrics</span> <span class="kn">import</span> <span class="n">classification_report</span>

<div class="viewcode-block" id="SyntheticBernuliDataset"><a class="viewcode-back" href="../../train.html#mylib.train.SyntheticBernuliDataset">[docs]</a><span class="k">class</span> <span class="nc">SyntheticBernuliDataset</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
<span class="sa">r</span><span class="sd">&#39;&#39;&#39;Base class for synthetic dataset.&#39;&#39;&#39;</span>
<span class="w"> </span><span class="sa">r</span><span class="sd">&#39;&#39;&#39;Base class for synthetic dataset.&#39;&#39;&#39;</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">n</span><span class="o">=</span><span class="mi">10</span><span class="p">,</span> <span class="n">m</span><span class="o">=</span><span class="mi">100</span><span class="p">,</span> <span class="n">seed</span><span class="o">=</span><span class="mi">42</span><span class="p">):</span>
<span class="sa">r</span><span class="sd">&#39;&#39;&#39;Constructor method</span>
<span class="w"> </span><span class="sa">r</span><span class="sd">&#39;&#39;&#39;Constructor method</span>

<span class="sd"> :param n: the number of feature</span>
<span class="sd"> :type n: int</span>
Expand All @@ -124,9 +130,9 @@ <h1>Source code for mylib.train</h1><div class="highlight"><pre>


<div class="viewcode-block" id="Trainer"><a class="viewcode-back" href="../../train.html#mylib.train.Trainer">[docs]</a><span class="k">class</span> <span class="nc">Trainer</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
<span class="sa">r</span><span class="sd">&#39;&#39;&#39;Base class for all trainer.&#39;&#39;&#39;</span>
<span class="w"> </span><span class="sa">r</span><span class="sd">&#39;&#39;&#39;Base class for all trainer.&#39;&#39;&#39;</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">model</span><span class="p">,</span> <span class="n">X</span><span class="p">,</span> <span class="n">Y</span><span class="p">,</span> <span class="n">seed</span><span class="o">=</span><span class="mi">42</span><span class="p">):</span>
<span class="sa">r</span><span class="sd">&#39;&#39;&#39;Constructor method</span>
<span class="w"> </span><span class="sa">r</span><span class="sd">&#39;&#39;&#39;Constructor method</span>

<span class="sd"> :param model: The class with fit and predict methods.</span>
<span class="sd"> :type model: object</span>
Expand All @@ -151,20 +157,20 @@ <h1>Source code for mylib.train</h1><div class="highlight"><pre>
<span class="p">)</span> <span class="o">=</span> <span class="n">train_test_split</span><span class="p">(</span><span class="n">X</span><span class="p">,</span> <span class="n">Y</span><span class="p">,</span> <span class="n">random_state</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">seed</span><span class="p">)</span>

<div class="viewcode-block" id="Trainer.train"><a class="viewcode-back" href="../../train.html#mylib.train.Trainer.train">[docs]</a> <span class="k">def</span> <span class="nf">train</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sa">r</span><span class="sd">&#39;&#39;&#39; Train model</span>
<span class="w"> </span><span class="sa">r</span><span class="sd">&#39;&#39;&#39; Train model</span>
<span class="sd"> &#39;&#39;&#39;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">model</span><span class="o">.</span><span class="n">fit</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">X_train</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">Y_train</span><span class="p">)</span></div>

<div class="viewcode-block" id="Trainer.eval"><a class="viewcode-back" href="../../train.html#mylib.train.Trainer.eval">[docs]</a> <span class="k">def</span> <span class="nf">eval</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">output_dict</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
<span class="sa">r</span><span class="sd">&#39;&#39;&#39;Evaluate model for initial validadtion dataset.</span>
<span class="w"> </span><span class="sa">r</span><span class="sd">&#39;&#39;&#39;Evaluate model for initial validadtion dataset.</span>
<span class="sd"> &#39;&#39;&#39;</span>
<span class="k">return</span> <span class="n">classification_report</span><span class="p">(</span>
<span class="bp">self</span><span class="o">.</span><span class="n">Y_val</span><span class="p">,</span>
<span class="bp">self</span><span class="o">.</span><span class="n">model</span><span class="o">.</span><span class="n">predict</span><span class="p">(</span>
<span class="bp">self</span><span class="o">.</span><span class="n">X_val</span><span class="p">),</span> <span class="n">output_dict</span><span class="o">=</span><span class="n">output_dict</span><span class="p">)</span></div>

<div class="viewcode-block" id="Trainer.test"><a class="viewcode-back" href="../../train.html#mylib.train.Trainer.test">[docs]</a> <span class="k">def</span> <span class="nf">test</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">X</span><span class="p">,</span> <span class="n">Y</span><span class="p">,</span> <span class="n">output_dict</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
<span class="sa">r</span><span class="sd">&quot;&quot;&quot;Evaluate model for given dataset.</span>
<span class="w"> </span><span class="sa">r</span><span class="sd">&quot;&quot;&quot;Evaluate model for given dataset.</span>
<span class="sd"> </span>
<span class="sd"> :param X: The array of shape </span>
<span class="sd"> `num_elements` :math:`\times` `num_feature`.</span>
Expand All @@ -178,7 +184,7 @@ <h1>Source code for mylib.train</h1><div class="highlight"><pre>


<div class="viewcode-block" id="cv_parameters"><a class="viewcode-back" href="../../train.html#mylib.train.cv_parameters">[docs]</a><span class="k">def</span> <span class="nf">cv_parameters</span><span class="p">(</span><span class="n">X</span><span class="p">,</span> <span class="n">Y</span><span class="p">,</span> <span class="n">seed</span><span class="o">=</span><span class="mi">42</span><span class="p">,</span> <span class="n">minimal</span><span class="o">=</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">maximum</span><span class="o">=</span><span class="mi">25</span><span class="p">,</span> <span class="n">count</span><span class="o">=</span><span class="mi">100</span><span class="p">):</span>
<span class="sa">r</span><span class="sd">&#39;&#39;&#39;Function for the experiment with different regularisation parameters </span>
<span class="w"> </span><span class="sa">r</span><span class="sd">&#39;&#39;&#39;Function for the experiment with different regularisation parameters </span>
<span class="sd"> and return accuracy and weidth for LogisticRegression for each parameter.</span>

<span class="sd"> :param X: The array of shape </span>
Expand Down
47 changes: 24 additions & 23 deletions _static/basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -236,16 +236,6 @@ div.body p, div.body dd, div.body li, div.body blockquote {
a.headerlink {
visibility: hidden;
}
a.brackets:before,
span.brackets > a:before{
content: "[";
}

a.brackets:after,
span.brackets > a:after {
content: "]";
}


h1:hover > a.headerlink,
h2:hover > a.headerlink,
Expand Down Expand Up @@ -334,11 +324,15 @@ aside.sidebar {
p.sidebar-title {
font-weight: bold;
}
nav.contents,
aside.topic,
div.admonition, div.topic, blockquote {
clear: left;
}

/* -- topics ---------------------------------------------------------------- */
nav.contents,
aside.topic,
div.topic {
border: 1px solid #ccc;
padding: 7px;
Expand Down Expand Up @@ -377,13 +371,17 @@ div.body p.centered {

div.sidebar > :last-child,
aside.sidebar > :last-child,
nav.contents > :last-child,
aside.topic > :last-child,
div.topic > :last-child,
div.admonition > :last-child {
margin-bottom: 0;
}

div.sidebar::after,
aside.sidebar::after,
nav.contents::after,
aside.topic::after,
div.topic::after,
div.admonition::after,
blockquote::after {
Expand Down Expand Up @@ -608,19 +606,26 @@ ol.simple p,
ul.simple p {
margin-bottom: 0;
}
dl.footnote > dt,
dl.citation > dt {
aside.footnote > span,
div.citation > span {
float: left;
margin-right: 0.5em;
}

dl.footnote > dd,
dl.citation > dd {
aside.footnote > span:last-of-type,
div.citation > span:last-of-type {
padding-right: 0.5em;
}
aside.footnote > p {
margin-left: 2em;
}
div.citation > p {
margin-left: 4em;
}
aside.footnote > p:last-of-type,
div.citation > p:last-of-type {
margin-bottom: 0em;
}

dl.footnote > dd:after,
dl.citation > dd:after {
aside.footnote > p:last-of-type:after,
div.citation > p:last-of-type:after {
content: "";
clear: both;
}
Expand All @@ -636,10 +641,6 @@ dl.field-list > dt {
padding-left: 0.5em;
padding-right: 5px;
}
dl.field-list > dt:after {
content: ":";
}


dl.field-list > dd {
padding-left: 0.5em;
Expand Down
Loading

0 comments on commit d6016e3

Please sign in to comment.