Skip to main content

A homemade machine learning platform modeled after TensorFlow

Project description

Artifice

Artifice is a homemade machine learning platform modeled after TensorFlow, co-developed and co-written by William Bidle and Ilana Zane.

Installation

To get started with Artifice, copy the following command and paste it into your command line:

pip install Artifice

To test the installation, run the following code into your Python editor of choice:

from Artifice import Artifice

layer_sequence = [1,'ReLU', 2, 'sigmoid', 3]
loss_function = 'MSLE'

nn = Artifice.NN(layer_sequence, loss_function)

print('activation func library:\n', nn.activation_funcs_library, '\n')
print('loss func library:\n', nn.loss_funcs_library, '\n')
print('current weights:\n', nn.weights, '\n')
print('current activation functions:\n', nn.activation_funcs, '\n')
print('current loss function:\n', nn.loss_func_label, ':', nn.loss_func, '\n')
print('traing error:\n', nn.training_err, '\n')

If there are no errors, then you have successfully installed Artifice! The full list of functions, their usage, as well as some examples can be found within the Artifice.py file.

List of available activation functions

For a given value, $x$, different activation functions are definined by the following.

  • "sigmoid" :

$$\frac{1}{1 + e^{-x}}$$

  • 'tanh' :

$$tanh(x)$$

  • 'ReLU' :

$$f(x) = \begin{cases} x & \text{if } x \geq 0,\ 0 & \text{if } x < 0. \end{cases}$$

List of avaliable loss functions

For a given network output vector, $\vec{y}^{out}$, and true value vector, $\vec{y}^{true}$, with $N$ components each, different loss functions are definined by the following.

  • Mean Squared Error ("MSE") :

$$\sum_{i}^N(y_i^{out} - y_i^{true})^2$$

  • Mean Absolute Error ("MAE") :

$$\sum_{i}^N|y_i^{out} - y_i^{true}|$$

  • "MAPE" : $$100 * \sum_{i}^N|\frac{y_i^{out} - y_i^{true}}{y_i^{out} + y_i^{true}}|$$

  • Mean Squared Logarithmic Error ("MSLE") :

$$\sum_{i}^N(log(y_i^{out} + 1) - log(y_i^{true} + 1))^2$$

  • Binary Cross-Entropy ("BCE") :

$$\sum_{i}^N(y_i^{true}*log(y_i^{out}) + (1 - y_i^{true})*log(1 - y_i^{out}))$$

  • "Poisson" :

$$\sum_{i}^N(y_i^{out} - y_i^{true} * log(y_i^{out}))$$

Examples

Detailed examples on how to use Artifice can be found in the Artifice_Tutorial.ipynb Jupyter Notebook.

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

Artifice-0.1.0.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Artifice-0.1.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file Artifice-0.1.0.tar.gz.

File metadata

  • Download URL: Artifice-0.1.0.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.5

File hashes

Hashes for Artifice-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7992099aeb2c58c99bf4dd16193a6cbfaa6312018ac8540123ef374e5d6d5273
MD5 ae3b9032b23151cc624a17090f21f9bc
BLAKE2b-256 d7e6ff50de0397dfeb7a6a0cbc6dd2b33328f612ddb4c8e23cfcee0984cce0ac

See more details on using hashes here.

File details

Details for the file Artifice-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: Artifice-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.5

File hashes

Hashes for Artifice-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b9072ed8de7b3b7d1fd92f05b63c76bb8b5b8e77ffd4a0e842b50bbe55a515ac
MD5 3924e68100a6b79e7029ef7f6f6887ab
BLAKE2b-256 beffbe5ebf80bb84b1ded154a576c7dd091566fecb1ced7420fa7facb186d952

See more details on using hashes here.

Supported by

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