Skip to main content

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.

Metadata

Release files for Artifice 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Artifice 0.0.5
File Size Uploaded
Artifice-0.0.5.tar.gz 9.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Artifice 0.0.5
File Interpreter ABI Platform
Artifice-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 17.3 kB

Release files / Artifice-0.0.5.tar.gz

Download URL Artifice-0.0.5.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
624462e21522f0b5184774e9e828f665ad0a3329621fb11c42d4a325ce77ee6e
BLAKE2b-256 checksum
How to use checksums
c38d96b976b57d5e6053f8aad419b3bc2f6c30eae55a17677b7801caf40a294e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.5

Release files / Artifice-0.0.5-py3-none-any.whl

Download URL Artifice-0.0.5-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cc56cea0fc3e71bf6e35a936b71c1676fd29c5ea61664df8a82bae3b2dfcff66
BLAKE2b-256 checksum
How to use checksums
bd1957c74e9a4764e47c71bd14aeb88b11fe2ef7220e54692b81e3a34a173a7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.5

Release history Release notifications | RSS feed

0.1.0

2 release files

This release

0.0.5 This release

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page