Skip to main content

Activation Function Package

Project description

Activa is a Python package that calculates the activation functions of a set of input numerical values while outputting clear visualization of these values for further analysis.

Features of Activa

  • Calculates activation functions (ReLU, Sigmoid, Tanh, Softplus, Gaussian)
  • Provides visual displays of each function against it's derivatives
  • Outputs a comparison table for each values across all activation functions available

Quick Start

First, install the library:

$ pip install Activa

Example

For the example, we will be using the default data in the package, data = [-1, 0, 1]

To import libraries

>> from Activa import ReLU, Sigmoid, Gaussian, Table
  1. Implementing the ReLU activation function
>> relu = ReLU()
>> relu.relu_values
array([0, 0, 1])
  1. Implementing the Sigmoid activation function
>> sig = Sigmoid()
>> sig.sigmoid_values
array([0.26894142, 0.5       , 0.73105858])
  1. Implementing the Gaussian activation function
>> gs = Gaussian()
>> gs.gaussian_values
array([0.36787944, 1.        , 0.36787944])
  1. Implementing the comparison table for all activation functions
>> tb = Table()
>> tb.show
   actual_values   sigmoid  relu      tanh  softplus  gaussian
0             -1  0.268941     0 -0.761594  0.313262  0.367879
1              0  0.500000     0  0.000000  0.693147  1.000000
2              1  0.731059     1  0.761594  1.313262  0.367879

More information

Kindly checkout the github repo for more updates

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Activa-1.0.5.tar.gz (4.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page