GithubHelp home page GithubHelp logo

atlas-aerospace-yt / vector Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 24 KB

A python vector library

Home Page: https://pypi.org/project/vector-ai-ml/

License: MIT License

Python 100.00%
ai artificial-intelligence math mathematics vector

vector's Introduction

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

vector's People

Contributors

atlas-aerospace-yt avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.