emergent 8.2.2 Projection Class Reference
emergent 8.2.2   Home · Wiki Docs For: Projection · Emergent Help Browser 

Projection Class Reference

Projection describes connectivity between layers (from receivers perspective)

See for more info: Wiki Docs For: Projection

 #include <Projection>

defined at: /mnt/ssd/grey/local/include/Emergent/Projection.h :49-210

Inherits From: SpecUser, taNBase, taOBase, taBase

Inherited By: Projection*, Projection&, const Projection, LeabraPrjn

Index: SubTypes, Members, Methods, Static Members, Static Methods, Expert Members, Expert Methods

Sub Types


SubType Documentation

enum Projection::PrjnSource

ConstantValueDescription
Projection::NEXT0x00000000Recv from the next layer in network
Projection::PREV0x00000001Recv from the previous layer in network
Projection::SELF0x00000002Recv from the same layer
Projection::CUSTOM0x00000003Recv from the layer spec'd in the projection

enum Projection::PrjnDirection

which direction does this projection come from

ConstantValueDescription
Projection::FM_INPUT0x00000000from layer is closer to input signals than recv layer
Projection::FM_OUTPUT0x00000001from layer is closer to output signals than recv layer
Projection::LATERAL0x00000002from layer is same distance from input and output signals as this layer
Projection::DIR_UNKNOWN0x00000003direction not set


Regular (preferred) Member and Method Documentation

Members

Member Category: State

Member Category: Structure

Member Category: _NoCategory

Methods

Method Category: Access

Method Category: File

Method Category: ObjectMgmt

Method Category: State

Method Category: Statistic

Method Category: Statistics

Method Category: Structure

Method Category: UserData

Method Category: Weights

Method Category: _NoCategory


Member Documentation

Member Category: State

Projection::recv_con_stats : PrjnConStats

stats for recv connections created for the receiving units in this projection

Projection::send_con_stats : PrjnConStats

stats for recv connections created for the receiving units in this projection

Member Category: Structure

Projection::con_spec : ConSpec_SPtr

conspec to use for creating connections

Projection::con_type : TypeDef*

Type of connection

Projection::direction : Projection::PrjnDirection

which direction does this projection go (in terms of distance from input and output layers) -- auto computed by Compute_PrjnDirection when network is built, or you can manually set, but be sure to set dir_fixed to keep that setting; optionally used by only some algorithms

Projection::from : LayerRef

layer receiving from (set this for custom)

Projection::from_type : Projection::PrjnSource

Source of the projections

Projection::prjn_clr : taColor

Default color for the projection line and arrow (subservient to the Type-defined color, if applicable)

Projection::spec : ProjectionSpec_SPtr

spec for this item

Member Category: _NoCategory

Projection::dir_fixed : bool

fix the direction setting to specific value shown below (cannot fix DIR_UNKNOWN) -- otherwise it is automatically computed based on the layer_type settings

Projection::disp : bool

display this projection in the network view display

Projection::name : taString

name of the projection -- this is generated automatically based on the from name

Projection::notes : taString

notes on this projection: what types of projection spec and conspec have been tried, what parameters are important, etc?

Projection::off : bool

turn this projection off -- useful for experimenting with projections while being able to keep the specifications in place


Method Documentation

Method Category: Access

bool Projection::IsActive ( NetworkState_cpp* net )

is this projection active and valid?

Show Source Code

bool Projection::NotActive ( NetworkState_cpp* net )

is this projection NOT active and valid?

Show Source Code

bool Projection::ValidIdxs ( )

are the recv_idx and send_idx valid for this projection?

Show Source Code

Method Category: File

bool Projection::LoadWeights ( taString& fname, bool quiet = false )

read weight values in from a simple ordered list of weights (fmt is read from file) (leave fname empty to pull up file chooser)

Show Source Code

void Projection::SaveWeights ( taString& fname )

write weight values out in a simple ordered list of weights (leave fname empty to pull up file chooser)

Show Source Code

Method Category: ObjectMgmt

bool Projection::ChangeMyType ( TypeDef* new_type )

Change me into a different type of object, copying current info (done through owner)

Show Source Code

taString taNBase::GetName ( )

Get the name of the object

Show Source Code

bool taNBase::HasName ( )

does the object have a name field that can be set?

Show Source Code

void taNBase::MakeNameUnique ( )

make sure my name is unique relative to names of objects associated with my owner (e.g., if it is a list object), typically because my name has changed, and owner needs to ensure that all names are unique

Show Source Code

bool taNBase::SetName ( taString& nm )

Set the object's name

Show Source Code

Method Category: State

NetworkState_cpp* Projection::GetValidNetState ( )

get our network state -- only will be returned if network is built, intact, and projection is intact..

Show Source Code

Method Category: Statistic

void Projection::MonitorVar ( NetMonitor* net_mon, taString& variable )

monitor (record in a datatable) the given variable on this projection

Show Source Code

Method Category: Statistics

DataTable* Projection::ConVarsToTable ( DataTable* dt, taString& var1, taString& var2, taString& var3, taString& var4, taString& var5, taString& var6, taString& var7, taString& var8, taString& var9, taString& var10, taString& var11, taString& var12, taString& var13, taString& var14 )

record given connection-level variable to data table with column names the same as the variable names, and one row per *connection* (unlike monitor-based operations which create matrix columns) -- this is useful for performing analyses on learning rules as a function of sending and receiving unit variables -- uses receiver-based connection traversal -- connection variables are just specified directly by name -- corresponding receiver unit variables are 'r.var' and sending unit variables are 's.var'

Show Source Code

Method Category: Structure

bool Projection::CheckConnect ( bool quiet = false )

check if projection is connected

Show Source Code

void Projection::CheckSpecs ( )

check to make sure that specs are not null and set to the right type, and update with new specs etc to fix any errors (with notify), so that at least network operations will not crash -- called in Build and CheckConfig

Show Source Code

bool Projection::ConSpecUpdated ( )

called when there was a potential update of the con spec

Show Source Code

ConSpec* Projection::GetMainConSpec ( )

get the connection spec for this projection

Show Source Code

ProjectionSpec* Projection::GetMainPrjnSpec ( )

get the projection spec for this projection

Show Source Code

int Projection::LesionCons ( float p_lesion, bool permute = true )

remove connections with prob p_lesion (permute = fixed no. lesioned)

Show Source Code

bool Projection::MainIsActive ( )

active test that works for main code -- before net state is built..

Show Source Code

bool Projection::MainNotActive ( )

active test that works for main code -- before net state is built..

Show Source Code

int Projection::ProbAddCons ( float p_add_con, float init_wt = 0.0 )

probabilistically add new connections (assuming prior pruning), init_wt = initial weight value of new connection

Show Source Code

int Projection::ReplaceConSpec ( ConSpec* old_sp, ConSpec* new_sp, bool prompt = false )

switch any connections/projections using old_sp to using new_sp

Show Source Code

int Projection::ReplacePrjnSpec ( ProjectionSpec* old_sp, ProjectionSpec* new_sp, bool prompt = false )

switch any projections using old_sp to using new_sp

Show Source Code

bool Projection::SetConSpec ( ConSpec* sp )

set the con spec for all connections in this prjn

Show Source Code

bool Projection::SetConType ( TypeDef* td )

set the connection type for all connections in this prjn

Show Source Code

void Projection::SetCustomFrom ( Layer* from_lay )

set a CUSTOM projection from given layer (if from_lay == layer, turns into SELF)

Show Source Code

void Projection::SetFrom ( )

set where to receive from based on selections

Show Source Code

bool Projection::SetPrjnSpec ( ProjectionSpec* sp )

set the projection spec (connectivity pattern) for this projection

Show Source Code

void Projection::ToggleOff ( )

toggle the off status of this projection -- if on, turn off, if off, turn on

Show Source Code

void Projection::UpdateName ( )

update the name of projection to reflect any changes in where it receives from

Show Source Code

DataTable* Projection::VarToTable ( DataTable* dt, taString& variable )

send given variable to data table -- number of columns depends on variable (for connection variables, specify r. or s. (e.g., r.wt)) -- this uses a NetMonitor internally, so see documentation there for more information

Show Source Code

DataTable* Projection::WeightsToTable ( DataTable* dt, taString& col_nm, bool recv_wts = true )

copy entire set of projection weights to given table (e.g., for analysis), with one row per receiving unit, and one column (name is layer name if not otherwise specified) that has a float matrix cell of the geometry of the sending layer -- recv prjn if recv_wts is true, else sending weights

Show Source Code

Method Category: UserData

void taOBase::RemoveAllUserData ( )

get rid of our user data list entirely -- this is done automatically when saving something that has no user data items, but you can also force it with this method -- deletes the whole list

Show Source Code

Method Category: Weights

void Projection::AddNoiseToWeights ( Random& noise_spec )

add noise to weights using given noise specification -- must call Init_Weights_post at network level after running this!

Show Source Code

void Projection::Copy_Weights ( Projection* src )

copies weights from other projection

Show Source Code

void Projection::Init_Weights ( )

initialize weights for all the connections associated with this projection

Show Source Code

int Projection::PruneCons ( SimpleMathSpec& pre_proc, Relation::Relations rel, float cmp_val )

remove weights that (after pre-proc) meet relation to compare val

Show Source Code

void Projection::RenormWeights ( bool mult_norm, float avg_wt )

renormalize the weight values using either multiplicative (for positive-only weight values such as Leabra) or subtractive normalization (for pos/neg weight values, such as backprop) to hit the given average weight value -- must call Init_Weights_post at network level after running this!

Show Source Code

void Projection::RescaleWeights ( const float rescale_factor )

rescale weights by multiplying by given factor -- must call Init_Weights_post at network level after running this!

Show Source Code

void Projection::TransformWeights ( SimpleMathSpec& trans )

apply given transformation to weights -- must call Init_Weights_post at network level after running this!

Show Source Code

Method Category: _NoCategory

bool taNBase::AddFromTemplate ( taBase* obj, bool& is_acceptable )

handles drops from toolbar - when adding an object to a program, network, etc - e.g. dropping generic data table onto a program - set is_acceptable for objects 'not handled' but which are acceptable

Show Source Code

bool Projection::ApplySpecToMe ( BaseSpec* spec )

this is the one key method that must be overwritten in each base case to call the proper method to apply the given spec to this object -- returns true upon success, false for failure

Show Source Code

bool Projection::EditConState ( int unit_no, bool recv = true )

edit the connection state object containing connections for given unit, for this projection, for either recv or sending direction

Show Source Code

bool Projection::EditState ( )

edit the projection state object for this projection

Show Source Code

ConSpec_cpp* Projection::GetConSpec ( NetworkState_cpp* net )

Show Source Code

taBase* taOBase::GetOwner ( )

Show Source Code

ProjectionSpec_cpp* Projection::GetPrjnSpec ( NetworkState_cpp* net )

Show Source Code

PrjnState_cpp* Projection::GetPrjnState ( NetworkState_cpp* net )

Show Source Code

LayerState_cpp* Projection::GetRecvLayer ( NetworkState_cpp* net )

Show Source Code

LayerState_cpp* Projection::GetSendLayer ( NetworkState_cpp* net )

Show Source Code

TypeDef* Projection::GetTypeDef ( )

Show Source Code

void Projection::Initialize_core ( bool of = false, bool les = false, int prjn_dx = 0, int recv_lay_dx = 0, int send_lay_dx = 0, int send_prjn_dx = 0, int recv_dx = 0, int send_dx = 0, int spec_dx = 0, int cs_dx = 0, int ncv = 0 )

Show Source Code

void Projection::ResetConStats ( )

Show Source Code

taSigLink** taOBase::addr_sig_link ( )

Show Source Code

Static Member and Method Documentation

Static Members

Static Methods


Static Method Documentation


Expert Member and Method Documentation

Expert Members

Expert Member Category: State

Expert Member Category: _NoCategory

Expert Member Category: taBase

Expert Methods

Expert Method Category: UserData


Expert Member Documentation

Expert Member Category: State

Projection::con_spec_idx : int

con spec index

Projection::lesioned : bool

is a layer on either side of this projection lesioned, or is from not set properly?

Projection::n_con_vars : int

number of connection variables in connection state type

Projection::prjn_idx : int

index into network state projection list

Projection::recv_idx : int

receiving con_state index within unit

Projection::recv_lay_idx : int

index into network state layer list for (owning) receiving layer of this projection

Projection::send_idx : int

sending con_state index within unit

Projection::send_lay_idx : int

index into network state layer list for sending (from) layer of this projection

Projection::send_prjn_idx : int

index into network state list of projections organized by layer according to sending projection order

Projection::spec_idx : int

layer spec index in list in NetworkState

Expert Member Category: _NoCategory

Projection::layer : Layer*

layer this prjn is in

Expert Member Category: taBase

taOBase::owner : taBase*

pointer to owner

taOBase::user_data_ : UserDataItem_List*

storage for user data (created if needed) DO NOT ACCESS this list directly -- use the GetUserData / SetUserData etc interface!


Expert Method Documentation

Expert Method Category: UserData

UserDataItem_List* taOBase::GetUserDataList ( bool force = false )

gets the userdatalist for this class

Show Source Code


Copyright © 2017Regents of the University of Colorado, Carnegie Mellon University, Princeton University.
emergent 8.2.2