Skip to content

Commit

Permalink
Deploying to gh-pages from @ 90d8259 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
asogaard committed May 22, 2024
1 parent 1ca9e93 commit 3595c4c
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 3 deletions.
1 change: 1 addition & 0 deletions _modules/graphnet/models/components/embedding.html
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ <h1 id="modules-graphnet-models-components-embedding--page-root">Source code for
<span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">n_features</span><span class="si">}</span><span class="s2"> features."</span>
<span class="p">)</span>
<span class="k">elif</span> <span class="n">n_features</span> <span class="o">&gt;=</span> <span class="mi">6</span><span class="p">:</span>

<span class="n">hidden_dim</span> <span class="o">=</span> <span class="mi">6</span> <span class="o">*</span> <span class="n">seq_length</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">hidden_dim</span> <span class="o">=</span> <span class="nb">int</span><span class="p">((</span><span class="n">n_features</span> <span class="o">+</span> <span class="mf">0.5</span><span class="p">)</span> <span class="o">*</span> <span class="n">seq_length</span><span class="p">)</span>
Expand Down
44 changes: 44 additions & 0 deletions _modules/graphnet/models/graphs/graphs.html
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,50 @@ <h1 id="modules-graphnet-models-graphs-graphs--page-root">Source code for graphn
<span class="n">seed</span><span class="o">=</span><span class="n">seed</span><span class="p">,</span>
<span class="p">)</span></div>



<div class="viewcode-block" id="EdgelessGraph">
<a class="viewcode-back" href="../../../../api/graphnet.models.graphs.graphs.html#graphnet.models.graphs.graphs.EdgelessGraph">[docs]</a>
<span class="k">class</span> <span class="nc">EdgelessGraph</span><span class="p">(</span><span class="n">GraphDefinition</span><span class="p">):</span>
<span class="w"> </span><span class="sd">"""A Data representation without edge assignment.</span>

<span class="sd"> I.e the resulting representation is created without an EdgeDefinition.</span>
<span class="sd"> """</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">detector</span><span class="p">:</span> <span class="n">Detector</span><span class="p">,</span>
<span class="n">node_definition</span><span class="p">:</span> <span class="n">NodeDefinition</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
<span class="n">input_feature_names</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
<span class="n">dtype</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">torch</span><span class="o">.</span><span class="n">dtype</span><span class="p">]</span> <span class="o">=</span> <span class="n">torch</span><span class="o">.</span><span class="n">float</span><span class="p">,</span>
<span class="n">perturbation_dict</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">float</span><span class="p">]]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
<span class="n">seed</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">Union</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="n">Generator</span><span class="p">]]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
<span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<span class="w"> </span><span class="sd">"""Construct isolated nodes graph representation.</span>

<span class="sd"> Args:</span>
<span class="sd"> detector: Detector that represents your data.</span>
<span class="sd"> node_definition: Definition of nodes in the graph.</span>
<span class="sd"> input_feature_names: Name of input feature columns.</span>
<span class="sd"> dtype: data type for node features.</span>
<span class="sd"> perturbation_dict: Dictionary mapping a feature name to a standard</span>
<span class="sd"> deviation according to which the values for this</span>
<span class="sd"> feature should be randomly perturbed. Defaults</span>
<span class="sd"> to None.</span>
<span class="sd"> seed: seed or Generator used to randomly sample perturbations.</span>
<span class="sd"> Defaults to None.</span>
<span class="sd"> """</span>
<span class="c1"># Base class constructor</span>
<span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span>
<span class="n">detector</span><span class="o">=</span><span class="n">detector</span><span class="p">,</span>
<span class="n">node_definition</span><span class="o">=</span><span class="n">node_definition</span> <span class="ow">or</span> <span class="n">NodesAsPulses</span><span class="p">(),</span>
<span class="n">edge_definition</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="n">dtype</span><span class="o">=</span><span class="n">dtype</span><span class="p">,</span>
<span class="n">input_feature_names</span><span class="o">=</span><span class="n">input_feature_names</span><span class="p">,</span>
<span class="n">perturbation_dict</span><span class="o">=</span><span class="n">perturbation_dict</span><span class="p">,</span>
<span class="n">seed</span><span class="o">=</span><span class="n">seed</span><span class="p">,</span>
<span class="p">)</span></div>

</pre></div>

</article>
Expand Down
40 changes: 40 additions & 0 deletions api/graphnet.models.graphs.graphs.html
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,8 @@
<li class="md-nav__item"><a href="#api-graphnet-models-graphs-graphs--page-root" class="md-nav__link">graphs</a><nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item"><a href="#graphnet.models.graphs.graphs.KNNGraph" class="md-nav__link"><code class="docutils literal notranslate"><span class="pre">KNNGraph</span></code></a>
</li>
<li class="md-nav__item"><a href="#graphnet.models.graphs.graphs.EdgelessGraph" class="md-nav__link"><code class="docutils literal notranslate"><span class="pre">EdgelessGraph</span></code></a>
</li></ul>
</nav>
</li>
Expand All @@ -436,6 +438,13 @@
<a href="#graphnet.models.graphs.graphs.KNNGraph" class="md-nav__link"><code class="docutils literal notranslate"><span class="pre">KNNGraph</span></code></a>


</li>
<li class="md-nav__item">


<a href="#graphnet.models.graphs.graphs.EdgelessGraph" class="md-nav__link"><code class="docutils literal notranslate"><span class="pre">EdgelessGraph</span></code></a>


</li></ul>

</li>
Expand Down Expand Up @@ -553,6 +562,8 @@
<li class="md-nav__item"><a href="#api-graphnet-models-graphs-graphs--page-root" class="md-nav__link">graphs</a><nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item"><a href="#graphnet.models.graphs.graphs.KNNGraph" class="md-nav__link"><code class="docutils literal notranslate"><span class="pre">KNNGraph</span></code></a>
</li>
<li class="md-nav__item"><a href="#graphnet.models.graphs.graphs.EdgelessGraph" class="md-nav__link"><code class="docutils literal notranslate"><span class="pre">EdgelessGraph</span></code></a>
</li></ul>
</nav>
</li>
Expand Down Expand Up @@ -601,6 +612,35 @@
</dd>
</dl>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="graphnet.models.graphs.graphs.EdgelessGraph">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">graphnet.models.graphs.graphs.</span></span><span class="sig-name descname"><span class="pre">EdgelessGraph</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/graphnet/models/graphs/graphs.html#EdgelessGraph"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#graphnet.models.graphs.graphs.EdgelessGraph" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="graphnet.models.graphs.graph_definition.html#graphnet.models.graphs.graph_definition.GraphDefinition" title="graphnet.models.graphs.graph_definition.GraphDefinition"><code class="xref py py-class docutils literal notranslate"><span class="pre">GraphDefinition</span></code></a></p>
<p>A Data representation without edge assignment.</p>
<p>I.e the resulting representation is created without an EdgeDefinition.</p>
<p>Construct isolated nodes graph representation.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>detector</strong> (<span class="sphinx_autodoc_typehints-type"><a class="reference internal" href="graphnet.models.detector.detector.html#graphnet.models.detector.detector.Detector" title="graphnet.models.detector.detector.Detector"><code class="xref py py-class docutils literal notranslate"><span class="pre">Detector</span></code></a></span>) – Detector that represents your data.</p></li>
<li><p><strong>node_definition</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<a class="reference internal" href="graphnet.models.graphs.nodes.nodes.html#graphnet.models.graphs.nodes.nodes.NodeDefinition" title="graphnet.models.graphs.nodes.nodes.NodeDefinition"><code class="xref py py-class docutils literal notranslate"><span class="pre">NodeDefinition</span></code></a>]</span>, default: <code class="docutils literal notranslate"><span class="pre">None</span></code>) – Definition of nodes in the graph.</p></li>
<li><p><strong>input_feature_names</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">List</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>]]</span>, default: <code class="docutils literal notranslate"><span class="pre">None</span></code>) – Name of input feature columns.</p></li>
<li><p><strong>dtype</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">dtype</span></code>]</span>, default: <code class="docutils literal notranslate"><span class="pre">torch.float32</span></code>) – data type for node features.</p></li>
<li><p><strong>perturbation_dict</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">Dict</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]]</span>, default: <code class="docutils literal notranslate"><span class="pre">None</span></code>) – Dictionary mapping a feature name to a standard
deviation according to which the values for this
feature should be randomly perturbed. Defaults
to None.</p></li>
<li><p><strong>seed</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">Generator</span></code>, <code class="xref py py-obj docutils literal notranslate"><span class="pre">None</span></code>]</span>, default: <code class="docutils literal notranslate"><span class="pre">None</span></code>) – seed or Generator used to randomly sample perturbations.
Defaults to None.</p></li>
<li><p><strong>args</strong> (<em>Any</em>)</p></li>
<li><p><strong>kwargs</strong> (<em>Any</em>)</p></li>
</ul>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>object</p>
</dd>
</dl>
</dd></dl>
</section>


Expand Down
1 change: 1 addition & 0 deletions api/graphnet.models.graphs.html
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,7 @@
</li>
<li class="toctree-l1"><a class="reference internal" href="graphnet.models.graphs.graphs.html">graphs</a><ul>
<li class="toctree-l2"><a class="reference internal" href="graphnet.models.graphs.graphs.html#graphnet.models.graphs.graphs.KNNGraph"><code class="docutils literal notranslate"><span class="pre">KNNGraph</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="graphnet.models.graphs.graphs.html#graphnet.models.graphs.graphs.EdgelessGraph"><code class="docutils literal notranslate"><span class="pre">EdgelessGraph</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="graphnet.models.graphs.utils.html">utils</a><ul>
Expand Down
6 changes: 4 additions & 2 deletions genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,8 @@ <h2 id="E">E</h2>
<li><a href="api/graphnet.models.components.layers.html#graphnet.models.components.layers.EdgeConvTito">EdgeConvTito (class in graphnet.models.components.layers)</a>
</li>
<li><a href="api/graphnet.models.graphs.edges.edges.html#graphnet.models.graphs.edges.edges.EdgeDefinition">EdgeDefinition (class in graphnet.models.graphs.edges.edges)</a>
</li>
<li><a href="api/graphnet.models.graphs.graphs.html#graphnet.models.graphs.graphs.EdgelessGraph">EdgelessGraph (class in graphnet.models.graphs.graphs)</a>
</li>
<li><a href="api/graphnet.models.task.reconstruction.html#graphnet.models.task.reconstruction.EnergyReconstruction">EnergyReconstruction (class in graphnet.models.task.reconstruction)</a>
</li>
Expand All @@ -695,11 +697,11 @@ <h2 id="E">E</h2>
<li><a href="api/graphnet.training.loss_functions.html#graphnet.training.loss_functions.EnsembleLoss">EnsembleLoss (class in graphnet.training.loss_functions)</a>
</li>
<li><a href="api/graphnet.utilities.maths.html#graphnet.utilities.maths.eps_like">eps_like() (in module graphnet.utilities.maths)</a>
</li>
<li><a href="api/graphnet.data.curated_datamodule.html#graphnet.data.curated_datamodule.ERDAHostedDataset">ERDAHostedDataset (class in graphnet.data.curated_datamodule)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="api/graphnet.data.curated_datamodule.html#graphnet.data.curated_datamodule.ERDAHostedDataset">ERDAHostedDataset (class in graphnet.data.curated_datamodule)</a>
</li>
<li><a href="api/graphnet.utilities.logging.html#graphnet.utilities.logging.Logger.error">error() (graphnet.utilities.logging.Logger method)</a>
</li>
<li><a href="api/graphnet.training.loss_functions.html#graphnet.training.loss_functions.EuclideanDistanceLoss">EuclideanDistanceLoss (class in graphnet.training.loss_functions)</a>
Expand Down
Binary file modified objects.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

0 comments on commit 3595c4c

Please sign in to comment.