• Github
Table of Contents
0.16.1.0
  • Welcome to PsyNeuLink
  • Basics and Primer
  • Quick Reference
  • Core
  • Library
  • Contributors Guide
  • Docs >
  • MaskedMappingProjection
Shortcuts

MaskedMappingProjection¶

Contents¶

  • Overview

  • Creating a MaskedMappingProjection

  • Structure

  • Execution

  • Class Reference

Overview¶

A MaskedMappingProjection is a subclass of MappingProjection that applies a specified mask array (either additively, multiplicatively, or exponentially) to the MappingProjection’s matrix each time the MappingProjection is executed. The mask is assigned a ParameterPort and can thus be modulated by a ControlMechanism.

Creating a MaskedMappingProjection¶

A MaskedMappingProjection is created in the same way as a MappingProjection, with the exception that its constructor includes mask and mask_operation arguments that can be used to configure the mask and how it is applied to the Projection’s matrix. The mask attribute must be an array that has the same shape as the matrix attribute, and the mask_operation argument must be the keyword ADD, MULTIPLY, or EXPONENTIATE (see Execution below).

Structure¶

A MaskedMappingProjection is identical to a MappingProjection, with the addition of mask and mask_operation attributes.

Execution¶

A MaskedMappingProjection executes in the same manner as a MappingProjection, with the exception that, each time the Projection is executed, its mask is applied to its matrix parameter as specified by its mask_operation attribute, before generating the Projection’s value.

Class Reference¶

class psyneulink.library.components.projections.pathway.maskedmappingprojection.MaskedMappingProjection(sender=None, receiver=None, matrix=None, mask=None, mask_operation=None, function=None, params=None, name=None, prefs=None, **kwargs)¶

Subclass of MappingProjection, the matrix of which can be masked on each execution. See MappingProjection for additional arguments and attributes.

Parameters
  • mask (int, float, list, np.ndarray : default None) – specifies a mask to be applied to the matrix each time the Projection is executed, in a manner specified by the mask_operation argument.

  • mask_operation (ADD, MULTIPLY, or EXPONENTIATE : default MULTIPLY) – specifies the manner in which the mask is applied to the matrix each time the Projection is executed.

mask¶

mask applied to the matrix each time the Projection is executed, in a manner specified by mask_operation.

mask_operation : ADD, MULTIPLY, or EXPONENTIATE : default MULTIPLY determines the manner in which the mask is applied to the matrix when the Projection is executed.

Type

int, float, list, np.ndarray : default None

_validate_params(request_set, target_set=None, context=None)¶

Validate mask argument

exception psyneulink.library.components.projections.pathway.maskedmappingprojection.MaskedMappingProjectionError(message, component=None)¶

© Copyright 2016, Jonathan D. Cohen.

Built with Sphinx using a theme provided by Read the Docs.
  • MaskedMappingProjection
    • Contents
    • Overview
    • Creating a MaskedMappingProjection
    • Structure
    • Execution
    • Class Reference
  • Github