Skip to main content

A package for calculating shifted gradients

Project description

ns_gradient

This package is used to calculate the gradients of a shifted column of dataset to form a rows

  column_0 column_1 column_2 column_3 column_4 column_5
0  0.05601      NaN      NaN      NaN      NaN      NaN
1  0.08611  0.05601      NaN      NaN      NaN      NaN
2  0.05125  0.08611  0.05601      NaN      NaN      NaN
3  0.02576  0.05125  0.08611  0.05601      NaN      NaN
4  0.01776  0.02576  0.05125  0.08611  0.05601      NaN

Usage

Once installed ns_gradient can be imported and functions called like so:

import pandas as pd
from ns_gradient.nsgrads import Nsgrads, calculator
df = pd.read_csv('./src/ns_gradient/all_sigs_df.csv')
df.drop(['Unnamed: 0'], axis=1, inplace=True)

result = calculator(dataset=df, periods=20, column='close')

print(result.get('gradients_mean')) # to get the mean
print(result.get('dataset')) # to retrieve data used to calculate the gradients
print(result.get('gradients')) # to get the vector gradients

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

ns_gradient-0.0.2.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

ns_gradient-0.0.2-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file ns_gradient-0.0.2.tar.gz.

File metadata

  • Download URL: ns_gradient-0.0.2.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.4

File hashes

Hashes for ns_gradient-0.0.2.tar.gz
Algorithm Hash digest
SHA256 4f4f762564217852cb5e49814c8ad2fd28c01a74b9e819e7cf59712c60d1c955
MD5 3b5e68e3eb0a3b72266f6d1eb74cdb41
BLAKE2b-256 4aa17955ca984a489bff09ec15bf2d5e22514bf384727994cfc675ae63e46cf6

See more details on using hashes here.

File details

Details for the file ns_gradient-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: ns_gradient-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.4

File hashes

Hashes for ns_gradient-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ed39348b85b9e6f57188d64b2c4ae4395283875fcd4182f747b33ffcb29355e0
MD5 d96a3625ff0229e2d426b711ef39c0c4
BLAKE2b-256 059b268fb33dd091d990105a157fbbf8f86715d0fef2c71fe3e6c7d33cf03ff3

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