Coder Social home page Coder Social logo

zhaoshiying97 / featurizer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fagan2888/featurizer

0.0 0.0 0.0 182 KB

featurizer is a define-by-run framework for data feature engineering on top of pytorch

License: Apache License 2.0

Python 100.00%

featurizer's Introduction

featurizer

featurizer is a define-by-run framework for data feature engineering

quick start

import torch
import featurizer.functors as ff

rm = ff.RollingMean(window=5)

data = torch.randn((20, 6))
rm_data = rm(data)
print(rm_data)

install

git clone https://github.com/StateOfTheArt-quant/featurizer.git
cd featurizer
python setup.py install

core concept: functor

A functor is class which allows an instance object of the class to be called or invoked as if it were an ordinary function.

import pandas as pd

class Functor(object)
    def __init__(self, window=5):
        self.window = 5
    
    def forward(self, x)
        return pd.rolling_mean(x, window=5)
    
    def __call__(self, x)
        output = self.forward(x)
        return output
import numpy as np

obj = Functor(window=5)
data = np.random.random((20, 6))
output = obj(data)

featurizer's People

Contributors

vw511 avatar walkacross avatar francisli196 avatar heli3434 avatar bowen905 avatar zhaoshiying97 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.