Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor/emcomposition/fields class #3126

Merged
merged 25 commits into from
Nov 25, 2024
Merged

Conversation

jdcpni
Copy link
Collaborator

@jdcpni jdcpni commented Nov 24, 2024

• emcomposition.py:

  • refactor to use Field class
  • fields attribute added that contains a list of Field objects

…Link into devel

# Conflicts:
#	Scripts/Models (Under Development)/EGO/Using EMComposition/ScriptControl.py
#	Scripts/Models (Under Development)/EGO/Using EMComposition/TestParams.py
…Link into devel

# Conflicts:
#	Scripts/Models (Under Development)/EGO/Using EMComposition/CSW/ScriptControl.py
  add field class
• emcomposition.py
  - refactor to use fields for all node attributes/arrays
Copy link

This PR causes the following changes to the html docs (ubuntu-latest-3.11):

diff -r docs-base/EMComposition.html docs-head/EMComposition.html
406,407c406,408
< <p>These arguments are used to specify the names of the fields in a memory entry, which are used as keys and how those are
< weighted for retrieval, and whether those weights are learned.</p>
---
> <p>These arguments are used to specify the names of the fields in a memory entry, which are used for its keys and values,
> how keys are weighted for retrieval, whether those weights are learned, and which fields are used for computing error
> that is propagated through the EMComposition.</p>
665c666,668
< by the <a class="reference internal" href="#emcomposition-memory-capacity"><span class="std std-ref">memory_capacity</span></a> argument.</p>
---
> by the <a class="reference internal" href="#emcomposition-memory-capacity"><span class="std std-ref">memory_capacity</span></a> argument.  Information about the fields is stored in the
> <a class="reference internal" href="#psyneulink.library.compositions.emcomposition.EMComposition.fields" title="psyneulink.library.compositions.emcomposition.EMComposition.fields"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">fields</span></code></a> attribute, which is a list of <code class="xref any docutils literal notranslate"><span class="pre">Field</span></code> objects containing information about the nodes
> and values associated with each field.</p>
1060a1064,1075
> <dt class="sig sig-object py" id="psyneulink.library.compositions.emcomposition.EMComposition.fields">
> <span class="sig-name descname"><span class="pre">fields</span></span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition.fields" title="Permalink to this definition">¶</a></dt>
> <dd><p>list of <code class="xref any docutils literal notranslate"><span class="pre">Field</span></code> objects, each of which contains information about the nodes and values of a field in the
> EMComposition’s memory (see <code class="xref any docutils literal notranslate"><span class="pre">Field</span></code>).</p>
> <dl class="field-list simple">
> <dt class="field-odd">Type</dt>
> <dd class="field-odd"><p>ContentAddressableList[Field]</p>
> </dd>
> </dl>
> </dd></dl>
> 
> <dl class="py attribute">
1544,1566c1559,1561
< <dt class="sig sig-object py" id="psyneulink.library.compositions.emcomposition.EMComposition._construct_query_input_nodes">
< <span class="sig-name descname"><span class="pre">_construct_query_input_nodes</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">field_weights</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition._construct_query_input_nodes" title="Permalink to this definition">¶</a></dt>
< <dd><p>Create one node for each key to be used as cue for retrieval (and then stored) in memory.
< Used to assign new set of weights for Projection for query_input_node[i] -&gt; match_node[i]
< where i is selected randomly without replacement from (0-&gt;memory_capacity)</p>
< <dl class="field-list simple">
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></p>
< </dd>
< </dl>
< </dd></dl>
< 
< <dl class="py method">
< <dt class="sig sig-object py" id="psyneulink.library.compositions.emcomposition.EMComposition._construct_value_input_nodes">
< <span class="sig-name descname"><span class="pre">_construct_value_input_nodes</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">field_weights</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition._construct_value_input_nodes" title="Permalink to this definition">¶</a></dt>
< <dd><p>Create one input node for each value to be stored in memory.
< Used to assign new set of weights for Projection for combined_matches_node -&gt; retrieved_node[i]
< where i is selected randomly without replacement from (0-&gt;memory_capacity)</p>
< <dl class="field-list simple">
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></p>
< </dd>
< </dl>
---
> <dt class="sig sig-object py" id="psyneulink.library.compositions.emcomposition.EMComposition._construct_input_nodes">
> <span class="sig-name descname"><span class="pre">_construct_input_nodes</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition._construct_input_nodes" title="Permalink to this definition">¶</a></dt>
> <dd><p>Create one node for each input to EMComposition and identify as key or value</p>
1573,1578c1568
< Used to create a matrix for Projectoin from match / memory weights from concatenate_node -&gt; match_node</p>
< <dl class="field-list simple">
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p><a class="reference internal" href="ProcessingMechanism.html#psyneulink.core.components.mechanisms.processing.processingmechanism.ProcessingMechanism" title="psyneulink.core.components.mechanisms.processing.processingmechanism.ProcessingMechanism"><code class="xref py py-class docutils literal notranslate"><span class="pre">ProcessingMechanism</span></code></a></p>
< </dd>
< </dl>
---
> Used to create a matrix for Projection from match / memory weights from concatenate_node -&gt; match_node</p>
1598,1602d1587
< <dl class="field-list simple">
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></p>
< </dd>
< </dl>
1607c1592
< <span class="sig-name descname"><span class="pre">_construct_field_weight_nodes</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">field_weights</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">concatenate_queries</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">use_gating_for_weighting</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition._construct_field_weight_nodes" title="Permalink to this definition">¶</a></dt>
---
> <span class="sig-name descname"><span class="pre">_construct_field_weight_nodes</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">concatenate_queries</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">use_gating_for_weighting</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition._construct_field_weight_nodes" title="Permalink to this definition">¶</a></dt>
1609,1613d1593
< <dl class="field-list simple">
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></p>
< </dd>
< </dl>
1618c1598
< <span class="sig-name descname"><span class="pre">_construct_weighted_match_nodes</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">memory_capacity</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">field_weights</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition._construct_weighted_match_nodes" title="Permalink to this definition">¶</a></dt>
---
> <span class="sig-name descname"><span class="pre">_construct_weighted_match_nodes</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">concatenate_queries</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition._construct_weighted_match_nodes" title="Permalink to this definition">¶</a></dt>
1620,1624d1599
< <dl class="field-list simple">
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></p>
< </dd>
< </dl>
1631,1635d1605
< <dl class="field-list simple">
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p><code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism"><code class="xref py py-class docutils literal notranslate"><span class="pre">ControlMechanism</span></code></a>]</p>
< </dd>
< </dl>
1640c1610
< <span class="sig-name descname"><span class="pre">_construct_combined_matches_node</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">memory_capacity</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">field_weighting</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">use_gating_for_weighting</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition._construct_combined_matches_node" title="Permalink to this definition">¶</a></dt>
---
> <span class="sig-name descname"><span class="pre">_construct_combined_matches_node</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">concatenate_queries</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">memory_capacity</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">use_gating_for_weighting</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition._construct_combined_matches_node" title="Permalink to this definition">¶</a></dt>
1642,1646d1611
< <dl class="field-list simple">
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p><a class="reference internal" href="ProcessingMechanism.html#psyneulink.core.components.mechanisms.processing.processingmechanism.ProcessingMechanism" title="psyneulink.core.components.mechanisms.processing.processingmechanism.ProcessingMechanism"><code class="xref py py-class docutils literal notranslate"><span class="pre">ProcessingMechanism</span></code></a></p>
< </dd>
< </dl>
1653,1657d1617
< <dl class="field-list simple">
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></p>
< </dd>
< </dl>
1673c1633
< <span class="sig-name descname"><span class="pre">_construct_storage_node</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">memory_template</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">field_weights</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">concatenate_queries_node</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">memory_decay_rate</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">storage_prob</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition._construct_storage_node" title="Permalink to this definition">¶</a></dt>
---
> <span class="sig-name descname"><span class="pre">_construct_storage_node</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">use_storage_node</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">memory_template</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">memory_decay_rate</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">storage_prob</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition._construct_storage_node" title="Permalink to this definition">¶</a></dt>
1695,1699d1654
< <dl class="field-list simple">
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></p>
< </dd>
< </dl>
diff -r docs-base/genindex.html docs-head/genindex.html
315a316,317
>       <li><a href="EMComposition.html#psyneulink.library.compositions.emcomposition.EMComposition._construct_input_nodes">_construct_input_nodes() (psyneulink.library.compositions.emcomposition.EMComposition method)</a>
> </li>
320,321d321
<       <li><a href="EMComposition.html#psyneulink.library.compositions.emcomposition.EMComposition._construct_query_input_nodes">_construct_query_input_nodes() (psyneulink.library.compositions.emcomposition.EMComposition method)</a>
< </li>
330,331d329
<       <li><a href="EMComposition.html#psyneulink.library.compositions.emcomposition.EMComposition._construct_value_input_nodes">_construct_value_input_nodes() (psyneulink.library.compositions.emcomposition.EMComposition method)</a>
< </li>
2368a2367,2368
> </li>
>       <li><a href="EMComposition.html#psyneulink.library.compositions.emcomposition.EMComposition.fields">fields (psyneulink.library.compositions.emcomposition.EMComposition attribute)</a>
Binary files docs-base/objects.inv and docs-head/objects.inv differ
diff -r docs-base/searchindex.js docs-head/searchindex.js
1c1
< Search.setIndex({docnames:["AGT","AGTControlMechanism","AutoAssociativeLearningMechanism","AutoAssociativeProjection","AutodiffComposition","BasicsAndPrimer","BeukersNBackModel","BeukersNBackModel_NB","BotvinickConflictMonitoringModel","BustamanteStroopXORLVOCModel","Cohen_HustonModel","ComparatorMechanism","Compilation","Component","Components","Composition","CompositionFunctionApproximator","CompositionInterfaceMechanism","Compositions","Condition","Context","ContrastiveHebbianMechanism","ContributorsGuide","ControlMechanism","ControlMechanisms","ControlProjection","ControlProjections","ControlSignal","ConventionsAndDefinitions","Core","DDM","DefaultControlMechanism","Defaults","DistributionFunctions","EMComposition","EVC","EVCAuxiliary","EVCControlMechanism","EpisodicMemoryMechanism","Function","Functions","GatingMechanism","GatingMechanisms","GatingProjection","GatingProjections","GatingSignal","GilzenratModel","InputPort","IntegratorFunctions","IntegratorMechanism","IntegratorMechanisms","KWTAMechanism","Keywords","KohonenMechanism","LCAMechanism","LCControlMechanism","LCMechanism","LLVM","LeabraMechanism","LearningFunctions","LearningMechanism","LearningMechanisms","LearningProjection","LearningProjections","LearningSignal","Library","Log","MappingProjection","MaskedMappingProjection","Mechanism","Mechanisms","MemoryFunctions","Models","ModulatoryMechanism","ModulatoryMechanisms","ModulatoryProjection","ModulatoryProjections","ModulatorySignal","MontagueModel","NieuwenhuisModel","NonStatefulFunctions","ObjectiveFunctions","ObjectiveMechanism","ObjectiveMechanisms","OptimizationControlMechanism","OptimizationFunctions","OutputPort","PCTC_model","ParameterEstimationComposition","ParameterPort","Parameters","Pathway","PathwayProjection","PathwayProjections","Port","PredictionErrorMechanism","Preferences","ProcessingMechanism","ProcessingMechanisms","Projection","Projections","QuickReference","RecurrentTransferMechanism","RefactoredLearningGuide","Registry","RegressionCFA","Report","Scheduler","Scheduling","SelectionFunctions","Services","StatefulFunction","StatefulFunctions","Subystems","Time","TransferFunctions","TransferMechanism","TransferMechanisms","TransformFunctions","UserDefinedFunction","UserGuide","UserGuide_TBD","Visualization","globals","index","index_logo_with_text","mdf","nback_nb"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":4,"sphinx.domains.index":1,"sphinx.domains.j
...

See CI logs for the full diff.

Copy link

This PR causes the following changes to the html docs (ubuntu-latest-3.11):

diff -r docs-base/EMComposition.html docs-head/EMComposition.html
406,407c406,408
< <p>These arguments are used to specify the names of the fields in a memory entry, which are used as keys and how those are
< weighted for retrieval, and whether those weights are learned.</p>
---
> <p>These arguments are used to specify the names of the fields in a memory entry, which are used for its keys and values,
> how keys are weighted for retrieval, whether those weights are learned, and which fields are used for computing error
> that is propagated through the EMComposition.</p>
665c666,668
< by the <a class="reference internal" href="#emcomposition-memory-capacity"><span class="std std-ref">memory_capacity</span></a> argument.</p>
---
> by the <a class="reference internal" href="#emcomposition-memory-capacity"><span class="std std-ref">memory_capacity</span></a> argument.  Information about the fields is stored in the
> <a class="reference internal" href="#psyneulink.library.compositions.emcomposition.EMComposition.fields" title="psyneulink.library.compositions.emcomposition.EMComposition.fields"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">fields</span></code></a> attribute, which is a list of <code class="xref any docutils literal notranslate"><span class="pre">Field</span></code> objects containing information about the nodes
> and values associated with each field.</p>
1060a1064,1075
> <dt class="sig sig-object py" id="psyneulink.library.compositions.emcomposition.EMComposition.fields">
> <span class="sig-name descname"><span class="pre">fields</span></span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition.fields" title="Permalink to this definition">¶</a></dt>
> <dd><p>list of <code class="xref any docutils literal notranslate"><span class="pre">Field</span></code> objects, each of which contains information about the nodes and values of a field in the
> EMComposition’s memory (see <code class="xref any docutils literal notranslate"><span class="pre">Field</span></code>).</p>
> <dl class="field-list simple">
> <dt class="field-odd">Type</dt>
> <dd class="field-odd"><p>ContentAddressableList[Field]</p>
> </dd>
> </dl>
> </dd></dl>
> 
> <dl class="py attribute">
1544,1566c1559,1561
< <dt class="sig sig-object py" id="psyneulink.library.compositions.emcomposition.EMComposition._construct_query_input_nodes">
< <span class="sig-name descname"><span class="pre">_construct_query_input_nodes</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">field_weights</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition._construct_query_input_nodes" title="Permalink to this definition">¶</a></dt>
< <dd><p>Create one node for each key to be used as cue for retrieval (and then stored) in memory.
< Used to assign new set of weights for Projection for query_input_node[i] -&gt; match_node[i]
< where i is selected randomly without replacement from (0-&gt;memory_capacity)</p>
< <dl class="field-list simple">
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></p>
< </dd>
< </dl>
< </dd></dl>
< 
< <dl class="py method">
< <dt class="sig sig-object py" id="psyneulink.library.compositions.emcomposition.EMComposition._construct_value_input_nodes">
< <span class="sig-name descname"><span class="pre">_construct_value_input_nodes</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">field_weights</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition._construct_value_input_nodes" title="Permalink to this definition">¶</a></dt>
< <dd><p>Create one input node for each value to be stored in memory.
< Used to assign new set of weights for Projection for combined_matches_node -&gt; retrieved_node[i]
< where i is selected randomly without replacement from (0-&gt;memory_capacity)</p>
< <dl class="field-list simple">
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></p>
< </dd>
< </dl>
---
> <dt class="sig sig-object py" id="psyneulink.library.compositions.emcomposition.EMComposition._construct_input_nodes">
> <span class="sig-name descname"><span class="pre">_construct_input_nodes</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition._construct_input_nodes" title="Permalink to this definition">¶</a></dt>
> <dd><p>Create one node for each input to EMComposition and identify as key or value</p>
1573,1578c1568
< Used to create a matrix for Projectoin from match / memory weights from concatenate_node -&gt; match_node</p>
< <dl class="field-list simple">
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p><a class="reference internal" href="ProcessingMechanism.html#psyneulink.core.components.mechanisms.processing.processingmechanism.ProcessingMechanism" title="psyneulink.core.components.mechanisms.processing.processingmechanism.ProcessingMechanism"><code class="xref py py-class docutils literal notranslate"><span class="pre">ProcessingMechanism</span></code></a></p>
< </dd>
< </dl>
---
> Used to create a matrix for Projection from match / memory weights from concatenate_node -&gt; match_node</p>
1598,1602d1587
< <dl class="field-list simple">
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></p>
< </dd>
< </dl>
1607c1592
< <span class="sig-name descname"><span class="pre">_construct_field_weight_nodes</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">field_weights</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">concatenate_queries</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">use_gating_for_weighting</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition._construct_field_weight_nodes" title="Permalink to this definition">¶</a></dt>
---
> <span class="sig-name descname"><span class="pre">_construct_field_weight_nodes</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">concatenate_queries</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">use_gating_for_weighting</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition._construct_field_weight_nodes" title="Permalink to this definition">¶</a></dt>
1609,1613d1593
< <dl class="field-list simple">
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></p>
< </dd>
< </dl>
1618c1598
< <span class="sig-name descname"><span class="pre">_construct_weighted_match_nodes</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">memory_capacity</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">field_weights</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition._construct_weighted_match_nodes" title="Permalink to this definition">¶</a></dt>
---
> <span class="sig-name descname"><span class="pre">_construct_weighted_match_nodes</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">concatenate_queries</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition._construct_weighted_match_nodes" title="Permalink to this definition">¶</a></dt>
1620,1624d1599
< <dl class="field-list simple">
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></p>
< </dd>
< </dl>
1631,1635d1605
< <dl class="field-list simple">
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p><code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism"><code class="xref py py-class docutils literal notranslate"><span class="pre">ControlMechanism</span></code></a>]</p>
< </dd>
< </dl>
1640c1610
< <span class="sig-name descname"><span class="pre">_construct_combined_matches_node</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">memory_capacity</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">field_weighting</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">use_gating_for_weighting</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition._construct_combined_matches_node" title="Permalink to this definition">¶</a></dt>
---
> <span class="sig-name descname"><span class="pre">_construct_combined_matches_node</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">concatenate_queries</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">memory_capacity</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">use_gating_for_weighting</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition._construct_combined_matches_node" title="Permalink to this definition">¶</a></dt>
1642,1646d1611
< <dl class="field-list simple">
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p><a class="reference internal" href="ProcessingMechanism.html#psyneulink.core.components.mechanisms.processing.processingmechanism.ProcessingMechanism" title="psyneulink.core.components.mechanisms.processing.processingmechanism.ProcessingMechanism"><code class="xref py py-class docutils literal notranslate"><span class="pre">ProcessingMechanism</span></code></a></p>
< </dd>
< </dl>
1653,1657d1617
< <dl class="field-list simple">
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></p>
< </dd>
< </dl>
1673c1633
< <span class="sig-name descname"><span class="pre">_construct_storage_node</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">memory_template</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">field_weights</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">concatenate_queries_node</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">memory_decay_rate</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">storage_prob</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition._construct_storage_node" title="Permalink to this definition">¶</a></dt>
---
> <span class="sig-name descname"><span class="pre">_construct_storage_node</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">use_storage_node</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">memory_template</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">memory_decay_rate</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">storage_prob</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition._construct_storage_node" title="Permalink to this definition">¶</a></dt>
1695,1699d1654
< <dl class="field-list simple">
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></p>
< </dd>
< </dl>
diff -r docs-base/ModulatoryProjection.html docs-head/ModulatoryProjection.html
272c272
< <a class="reference internal" href="Port.html"><span class="doc">Port</span></a> are listed in the Port’s <a class="reference internal" href="Mechanism.html#id7" title="psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.mod_afferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">mod_afferents</span></code></a> attribute.</p>
---
> <a class="reference internal" href="Port.html"><span class="doc">Port</span></a> are listed in the Port’s <a class="reference internal" href="ParameterPort.html#psyneulink.core.components.ports.parameterport.ParameterPort.mod_afferents" title="psyneulink.core.components.ports.parameterport.ParameterPort.mod_afferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">mod_afferents</span></code></a> attribute.</p>
diff -r docs-base/Port.html docs-head/Port.html
616c616
< <code class="xref any docutils literal notranslate"><span class="pre">PathWayProjections</span></code> (listed in its <a class="reference internal" href="Mechanism.html#id6" title="psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.path_afferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">path_afferents</span></code></a> attribute) as the variable for its
---
> <code class="xref any docutils literal notranslate"><span class="pre">PathWayProjections</span></code> (listed in its <a class="reference internal" href="#psyneulink.core.components.ports.port.Port_Base.path_afferents" title="psyneulink.core.components.ports.port.Port_Base.path_afferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">path_afferents</span></code></a> attribute) as the variable for its
diff -r docs-base/TransferFunctions.html docs-head/TransferFunctions.html
2199c2199
< <p><a class="reference internal" href="#psyneulink.core.components.functions.transferfunctions.Exponential.bounds" title="psyneulink.core.components.functions.transferfunctions.Exponential.bounds"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">bounds</span></code></a> – specifies the lower and upper limits of the result;  if there are none, the attribute is set to
---
> <p><a class="reference internal" href="OptimizationFunctions.html#psyneulink.core.components.functions.optimizationfunctions.GradientOptimization.bounds" title="psyneulink.core.components.functions.optimizationfunctions.GradientOptimization.bounds"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">bounds</span></code></a> – specifies the lower and upper limits of the result;  if there are none, the attribute is set to
diff -r docs-base/genindex.html docs-head/genindex.html
315a316,317
>       <li><a href="EMComposition.html#psyneulink.library.compositions.emcomposition.EMComposition._construct_input_nodes">_construct_input_nodes() (psyneulink.library.compositions.emcomposition.EMComposition method)</a>
> </li>
320,321d321
<       <li><a href="EMComposition.html#psyneulink.library.compositions.emcomposition.EMComposition._construct_query_input_nodes">_construct_query_input_nodes() (psyneulink.library.compositions.emcomposition.EMComposition method)</a>
< </li>
330,331d329
<       <li><a href="EMComposition.html#psyneulink.library.compositions.emcomposition.EMComposition._construct_value_input_nodes">_construct_value_input_nodes() (psyneulink.library.compositions.emcomposition.EMComposition method)</a>
< </li>
2368a2367,2368
> </li>
>       <li><a href="EMComposition
...

See CI logs for the full diff.

Copy link

This PR causes the following changes to the html docs (ubuntu-latest-3.11):

diff -r docs-base/EMComposition.html docs-head/EMComposition.html
406,407c406,408
< <p>These arguments are used to specify the names of the fields in a memory entry, which are used as keys and how those are
< weighted for retrieval, and whether those weights are learned.</p>
---
> <p>These arguments are used to specify the names of the fields in a memory entry, which are used for its keys and values,
> how keys are weighted for retrieval, whether those weights are learned, and which fields are used for computing error
> that is propagated through the EMComposition.</p>
665c666,668
< by the <a class="reference internal" href="#emcomposition-memory-capacity"><span class="std std-ref">memory_capacity</span></a> argument.</p>
---
> by the <a class="reference internal" href="#emcomposition-memory-capacity"><span class="std std-ref">memory_capacity</span></a> argument.  Information about the fields is stored in the
> <a class="reference internal" href="#psyneulink.library.compositions.emcomposition.EMComposition.fields" title="psyneulink.library.compositions.emcomposition.EMComposition.fields"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">fields</span></code></a> attribute, which is a list of <code class="xref any docutils literal notranslate"><span class="pre">Field</span></code> objects containing information about the nodes
> and values associated with each field.</p>
1031c1034
< If False, a method on EMComposition is used rather than a LearningMechanism.  This is meant for
---
> If False, a method on EMComposition is used rather than a LearningMechanism. This is meant for
1060a1064,1075
> <dt class="sig sig-object py" id="psyneulink.library.compositions.emcomposition.EMComposition.fields">
> <span class="sig-name descname"><span class="pre">fields</span></span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition.fields" title="Permalink to this definition">¶</a></dt>
> <dd><p>list of <code class="xref any docutils literal notranslate"><span class="pre">Field</span></code> objects, each of which contains information about the nodes and values of a field in the
> EMComposition’s memory (see <code class="xref any docutils literal notranslate"><span class="pre">Field</span></code>).</p>
> <dl class="field-list simple">
> <dt class="field-odd">Type</dt>
> <dd class="field-odd"><p>ContentAddressableList[Field]</p>
> </dd>
> </dl>
> </dd></dl>
> 
> <dl class="py attribute">
1544,1566c1559,1561
< <dt class="sig sig-object py" id="psyneulink.library.compositions.emcomposition.EMComposition._construct_query_input_nodes">
< <span class="sig-name descname"><span class="pre">_construct_query_input_nodes</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">field_weights</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition._construct_query_input_nodes" title="Permalink to this definition">¶</a></dt>
< <dd><p>Create one node for each key to be used as cue for retrieval (and then stored) in memory.
< Used to assign new set of weights for Projection for query_input_node[i] -&gt; match_node[i]
< where i is selected randomly without replacement from (0-&gt;memory_capacity)</p>
< <dl class="field-list simple">
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></p>
< </dd>
< </dl>
< </dd></dl>
< 
< <dl class="py method">
< <dt class="sig sig-object py" id="psyneulink.library.compositions.emcomposition.EMComposition._construct_value_input_nodes">
< <span class="sig-name descname"><span class="pre">_construct_value_input_nodes</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">field_weights</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition._construct_value_input_nodes" title="Permalink to this definition">¶</a></dt>
< <dd><p>Create one input node for each value to be stored in memory.
< Used to assign new set of weights for Projection for combined_matches_node -&gt; retrieved_node[i]
< where i is selected randomly without replacement from (0-&gt;memory_capacity)</p>
< <dl class="field-list simple">
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></p>
< </dd>
< </dl>
---
> <dt class="sig sig-object py" id="psyneulink.library.compositions.emcomposition.EMComposition._construct_input_nodes">
> <span class="sig-name descname"><span class="pre">_construct_input_nodes</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition._construct_input_nodes" title="Permalink to this definition">¶</a></dt>
> <dd><p>Create one node for each input to EMComposition and identify as key or value</p>
1573,1578c1568
< Used to create a matrix for Projectoin from match / memory weights from concatenate_node -&gt; match_node</p>
< <dl class="field-list simple">
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p><a class="reference internal" href="ProcessingMechanism.html#psyneulink.core.components.mechanisms.processing.processingmechanism.ProcessingMechanism" title="psyneulink.core.components.mechanisms.processing.processingmechanism.ProcessingMechanism"><code class="xref py py-class docutils literal notranslate"><span class="pre">ProcessingMechanism</span></code></a></p>
< </dd>
< </dl>
---
> Used to create a matrix for Projection from match / memory weights from concatenate_node -&gt; match_node</p>
1598,1602d1587
< <dl class="field-list simple">
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></p>
< </dd>
< </dl>
1607c1592
< <span class="sig-name descname"><span class="pre">_construct_field_weight_nodes</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">field_weights</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">concatenate_queries</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">use_gating_for_weighting</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition._construct_field_weight_nodes" title="Permalink to this definition">¶</a></dt>
---
> <span class="sig-name descname"><span class="pre">_construct_field_weight_nodes</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">concatenate_queries</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">use_gating_for_weighting</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition._construct_field_weight_nodes" title="Permalink to this definition">¶</a></dt>
1609,1613d1593
< <dl class="field-list simple">
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></p>
< </dd>
< </dl>
1618c1598
< <span class="sig-name descname"><span class="pre">_construct_weighted_match_nodes</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">memory_capacity</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">field_weights</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition._construct_weighted_match_nodes" title="Permalink to this definition">¶</a></dt>
---
> <span class="sig-name descname"><span class="pre">_construct_weighted_match_nodes</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">concatenate_queries</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition._construct_weighted_match_nodes" title="Permalink to this definition">¶</a></dt>
1620,1624d1599
< <dl class="field-list simple">
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></p>
< </dd>
< </dl>
1631,1635d1605
< <dl class="field-list simple">
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p><code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism"><code class="xref py py-class docutils literal notranslate"><span class="pre">ControlMechanism</span></code></a>]</p>
< </dd>
< </dl>
1640c1610
< <span class="sig-name descname"><span class="pre">_construct_combined_matches_node</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">memory_capacity</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">field_weighting</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">use_gating_for_weighting</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition._construct_combined_matches_node" title="Permalink to this definition">¶</a></dt>
---
> <span class="sig-name descname"><span class="pre">_construct_combined_matches_node</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">concatenate_queries</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">memory_capacity</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">use_gating_for_weighting</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition._construct_combined_matches_node" title="Permalink to this definition">¶</a></dt>
1642,1646d1611
< <dl class="field-list simple">
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p><a class="reference internal" href="ProcessingMechanism.html#psyneulink.core.components.mechanisms.processing.processingmechanism.ProcessingMechanism" title="psyneulink.core.components.mechanisms.processing.processingmechanism.ProcessingMechanism"><code class="xref py py-class docutils literal notranslate"><span class="pre">ProcessingMechanism</span></code></a></p>
< </dd>
< </dl>
1653,1657d1617
< <dl class="field-list simple">
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></p>
< </dd>
< </dl>
1673c1633
< <span class="sig-name descname"><span class="pre">_construct_storage_node</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">memory_template</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">field_weights</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">concatenate_queries_node</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">memory_decay_rate</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">storage_prob</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition._construct_storage_node" title="Permalink to this definition">¶</a></dt>
---
> <span class="sig-name descname"><span class="pre">_construct_storage_node</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">use_storage_node</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">memory_template</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">memory_decay_rate</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">storage_prob</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.compositions.emcomposition.EMComposition._construct_storage_node" title="Permalink to this definition">¶</a></dt>
1695,1699d1654
< <dl class="field-list simple">
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></p>
< </dd>
< </dl>
diff -r docs-base/TransferFunctions.html docs-head/TransferFunctions.html
2199c2199
< <p><a class="reference internal" href="OptimizationFunctions.html#psyneulink.core.components.functions.optimizationfunctions.GradientOptimization.bounds" title="psyneulink.core.components.functions.optimizationfunctions.GradientOptimization.bounds"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">bounds</span></code></a> – specifies the lower and upper limits of the result;  if there are none, the attribute is set to
---
> <p><a class="reference internal" href="#psyneulink.core.components.functions.transferfunctions.Exponential.bounds" title="psyneulink.core.components.functions.transferfunctions.Exponential.bounds"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">bounds</span></code></a> – specifies the lower and upper limits of the result;  if there are none, the attribute is set to
diff -r docs-base/genindex.html docs-head/genindex.html
315a316,317
>       <li><a href="EMComposition.html#psyneulink.library.compositions.emcomposition.EMComposition._construct_input_nodes">_construct_input_nodes() (psyneulink.library.compositions.emcomposition.EMComposition method)</a>
> </li>
320,321d321
<       <li><a href="EMComposition.html#psyneulink.library.compositions.emcomposition.EMComposition._construct_query_input_nodes">_construct_query_input_nodes() (psyneulink.library.compositions.emcomposition.EMComposition method)</a>
< </li>
330,331d329
<       <li><a href="EMComposition.html#psyneulink.library.compositions.emcomposition.EMComposition._construct_value_input_nodes">_construct_value_input_nodes() (psyneulink.library.compositions.emcomposition.EMComposition method)</a>
< </li>
2368a2367,2368
> </li>
>       <li><a href="EMComposition.html#psyneulink.library.compositions.emcomposition.EMComposition.fields">fields (psyneulink.library.compositions.emcomposition.EMComposition attribute)</a>
Binary files docs-base/objects.inv and docs-head/objects.inv differ
diff -r docs-base/searchindex.js docs-head/searchindex.js
1c1
< Search.setIndex({docnames:["AGT","AGTControlMechanism","AutoAssociativeLearningMechanism","AutoAssociativeProjection","AutodiffComposition","BasicsAndPrimer","BeukersNBackModel","BeukersNBackModel_NB","BotvinickConflictMonitoringModel","BustamanteStroopXORLVOCModel","Cohen_HustonModel","ComparatorMechanism","Compilation","Component","Components","Composition","CompositionFunctionApproximator","CompositionInterfaceMechanism","Compositions","Condition","Context","ContrastiveHebbianMechanism","ContributorsGuide","ControlMechanism","ControlMechanisms","ControlProjection","ControlProjections","ControlSignal","ConventionsAndDefinitions","Core","DDM","DefaultControlMechanism","Defaults","DistributionFunctions","EMComposition","EVC","EVCAuxiliary","EVCControlMechanism","EpisodicMemoryMechanism","Function","Functions","GatingMechanism","GatingMechanisms","GatingProjection","GatingProjections","GatingSignal","GilzenratModel","InputPort","IntegratorFunctions","IntegratorMechanism","IntegratorMechanisms","KWTAMechanism","Keywords","KohonenMechanism","LCAMechanism","LCControlMechanism","LCMechanism","LLVM","LeabraMechanism","LearningFunctions","LearningMechanism","LearningMechanisms","LearningProjection","LearningProjections","LearningSignal","Library","Log","MappingProjection","MaskedMappingProjection","Mechanism","Mechanisms",
...

See CI logs for the full diff.

@coveralls
Copy link

coveralls commented Nov 25, 2024

Coverage Status

coverage: 83.881% (-0.008%) from 83.889%
when pulling 778a138 on refactor/emcomposition/fields_class
into bf1e6b3 on devel.

@jdcpni jdcpni merged commit 7b20f13 into devel Nov 25, 2024
71 checks passed
@jdcpni jdcpni deleted the refactor/emcomposition/fields_class branch November 25, 2024 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants