C# Class SharpNeat.Network.DefaultActivationFunctionLibrary

Default implementation of an IActivationFunctionLibrary. Also provides static factory methods to create libraries with commonly used activation functions.
Inheritance: IActivationFunctionLibrary
Mostra file Open project: colgreen/sharpneat Class Usage Examples

Public Methods

Method Description
CreateLibraryCppn ( ) : IActivationFunctionLibrary

Create an IActivationFunctionLibrary for use with CPPNs.

CreateLibraryNeat ( IActivationFunction activationFn ) : IActivationFunctionLibrary

Create an IActivationFunctionLibrary for use with NEAT. NEAT uses the same activation function for all neurons/nodes therefore this factory method creates an IActivationFunction containing only the single provided IActivationFunction.

CreateLibraryRbf ( IActivationFunction activationFn, double auxArgsMutationSigmaCenter, double auxArgsMutationSigmaRadius ) : IActivationFunctionLibrary

Create an IActivationFunctionLibrary for use with Radial Basis Function NEAT.

DefaultActivationFunctionLibrary ( IList fnList ) : System.Collections.Generic

Constructs an activation function library with the provided list of activation functions.

GetFunction ( int id ) : IActivationFunction

Gets the function with the specified integer ID.

GetFunctionList ( ) : IList

Gets a list of all functions in the library.

GetRandomFunction ( XorShiftRandom rng ) : ActivationFunctionInfo

Randomly select a function based on each function's selection probability.

Private Methods

Method Description
CreateFunctionDictionary ( IList fnList ) : IActivationFunction>.Dictionary

Method Details

CreateLibraryCppn() public static method

Create an IActivationFunctionLibrary for use with CPPNs.
public static CreateLibraryCppn ( ) : IActivationFunctionLibrary
return IActivationFunctionLibrary

CreateLibraryNeat() public static method

Create an IActivationFunctionLibrary for use with NEAT. NEAT uses the same activation function for all neurons/nodes therefore this factory method creates an IActivationFunction containing only the single provided IActivationFunction.
public static CreateLibraryNeat ( IActivationFunction activationFn ) : IActivationFunctionLibrary
activationFn IActivationFunction
return IActivationFunctionLibrary

CreateLibraryRbf() public static method

Create an IActivationFunctionLibrary for use with Radial Basis Function NEAT.
public static CreateLibraryRbf ( IActivationFunction activationFn, double auxArgsMutationSigmaCenter, double auxArgsMutationSigmaRadius ) : IActivationFunctionLibrary
activationFn IActivationFunction
auxArgsMutationSigmaCenter double
auxArgsMutationSigmaRadius double
return IActivationFunctionLibrary

DefaultActivationFunctionLibrary() public method

Constructs an activation function library with the provided list of activation functions.
public DefaultActivationFunctionLibrary ( IList fnList ) : System.Collections.Generic
fnList IList
return System.Collections.Generic

GetFunction() public method

Gets the function with the specified integer ID.
public GetFunction ( int id ) : IActivationFunction
id int
return IActivationFunction

GetFunctionList() public method

Gets a list of all functions in the library.
public GetFunctionList ( ) : IList
return IList

GetRandomFunction() public method

Randomly select a function based on each function's selection probability.
public GetRandomFunction ( XorShiftRandom rng ) : ActivationFunctionInfo
rng Redzen.Numerics.XorShiftRandom
return ActivationFunctionInfo