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/modulatory signals/linear default function #665

Merged
merged 9 commits into from
Feb 17, 2018
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ class ControlSignal(ModulatorySignal):
ControlSignal( \
owner, \
index=SEQUENTIAL, \
function=LinearCombination(operation=SUM), \
function=Linear(), \
costs_options=ControlSignalCosts.DEFAULTS, \
intensity_cost_function=Exponential, \
adjustment_cost_function=Linear, \
Expand Down Expand Up @@ -447,7 +447,7 @@ class ControlSignal(ModulatorySignal):
Class attributes:
+ componentType (str) = CONTROL_SIGNAL
+ paramClassDefaults (dict)
+ FUNCTION (LinearCombination)
+ FUNCTION (Linear)
+ FUNCTION_PARAMS (Operation.PRODUCT)

Class methods:
Expand Down Expand Up @@ -655,7 +655,7 @@ def __init__(self,
size=None,
index=None,
calculate=Linear,
function=LinearCombination(operation=SUM),
function=Linear(),
cost_options:tc.any(ControlSignalCosts, list)=ControlSignalCosts.DEFAULTS,
intensity_cost_function:(is_function_type)=Exponential,
adjustment_cost_function:tc.optional(is_function_type)=Linear,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ class GatingSignal(ModulatorySignal):
GatingSignal( \
owner, \
index=PRIMARY \
function=LinearCombination(operation=SUM), \
function=Linear(), \
modulation=ModulationParam.MULTIPLICATIVE, \
projections=None, \
params=None, \
Expand All @@ -284,7 +284,7 @@ class GatingSignal(ModulatorySignal):
Class attributes:
+ componentType (str) = GATING_SIGNAL
+ paramClassDefaults (dict)
+ FUNCTION (LinearCombination)
+ FUNCTION (Linear)
+ FUNCTION_PARAMS (Modulation.MULTIPLY)

Class methods:
Expand Down Expand Up @@ -419,7 +419,7 @@ def __init__(self,
size=None,
index=None,
calculate=Linear,
function=LinearCombination(operation=SUM),
function=Linear(),
modulation:tc.optional(_is_modulation_param)=None,
projections=None,
params=None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ class LearningSignal(ModulatorySignal):
"""
LearningSignal( \
owner, \
function=LinearCombination(operation=SUM), \
function=Linear(), \
modulation=ModulationParam.MULTIPLICATIVE \
learning_rate=None \
params=None, \
Expand All @@ -222,7 +222,7 @@ class LearningSignal(ModulatorySignal):
Class attributes:
+ componentType (str) = LEARNING_SIGNAL
+ paramClassDefaults (dict)
+ FUNCTION (LinearCombination)
+ FUNCTION (Linear)
+ FUNCTION_PARAMS (Operation.PRODUCT)

Class methods:
Expand Down Expand Up @@ -361,7 +361,7 @@ def __init__(self,
size=None,
index=PRIMARY,
calculate=Linear,
function=LinearCombination(operation=SUM),
function=Linear(),
learning_rate: tc.optional(parameter_spec) = None,
modulation:tc.optional(_is_modulation_param)=None,
projections=None,
Expand Down