Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ns-gradient

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ns-gradient

A package for calculating shifted gradients

  • 0.0.2
  • PyPI
  • Socket score

Maintainers
1

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

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc