Skip to main content

A simple python vector package.

Project description

Vector

A python vector library

Contents

Why vector

Vector is a mathematical library for python. In my search to understand artificial intelligence (AI) I strived to make my own neural network entirely from scratch. To do this I began with numpy – a python library which is the go-to for mathematical things within python. As I started to make this program, I realised that I wanted more control over the objects and wanted to use them in such a way that would make sense for AI. So, I made my own library – vector – a simple vector library in python which holds the basic activation functions for neural networks, random generation, and of course a Vector object which is to be used in a way similar to np.array.

Usage

To import the library:

from vector import Vector
from vector import activation
from vector import random

To define a vector object, a = Vector([1, 0, 0, 1]) or a = Vector(1). This class definition takes in either a list, tuple, int, or float.
To generate a random vector, a = random.random_vector(length, lower_bound, upper_bound), lower_bound and upper_bound are optional arguments and by default are -0.1 and 0.1 respectively.
The vector library has 2 activation functions and the 2 derivative functions of those functions:

activation.sigmoig(vec)
activation.sigmoid_prime(vec)
activation.linear(vec)
activation.linear_prime(vec)

In the example above, vec is either an integer, float, or Vector. sigmoid is: 1 / (1 + e ^ -x) and linear is: 0.5 * x. The _prime in the function name means derivative.

Installation

To install this library using pip, you need to type pip install vector-ai-ml.

pylint

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

vector-ai-ml-0.0.3.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

vector_ai_ml-0.0.3-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file vector-ai-ml-0.0.3.tar.gz.

File metadata

  • Download URL: vector-ai-ml-0.0.3.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for vector-ai-ml-0.0.3.tar.gz
Algorithm Hash digest
SHA256 c66041394a95107c25cfd41e249ddce432c8ebb98b2989c5a67da98b847315f1
MD5 6b9590c551ed42547c769b87aceda10f
BLAKE2b-256 4fc19e279896b2937f2694578dd7fcebcded2986e599b2f40492146b1af424e1

See more details on using hashes here.

File details

Details for the file vector_ai_ml-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: vector_ai_ml-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for vector_ai_ml-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 226fa6d894eb0ddb8a59f5fde9132716ce3bc19d9dc39d6dbce3f5f7c1603f7c
MD5 48446ae8f1f3471f311832708071d5a4
BLAKE2b-256 2553d1eb5e22dad384a4834c9d3d6041282ce52c8495797629f61b0cdfbb5e3d

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