- Use this repo if you're too lazy to extract features
- But still want good performance (in terms of speed and model "accuracy")
- The only dependency is NumPy.
- Extremely Lightweight
- Use this for Millions of predictions/day.
This repository extends this repo to sequential features.
from PyRFF import get_features_sequential, get_features
import numpy as np
# List of variable size vectors
sequential = [np.random.normal(size=(np.random.randint(1, 12), 4))
for i in range(4)]
# Get Sequential Features
feat = get_features_sequential(
sequential, # Input List
123, # Random Seed
# Feature Type orf (Orthogonal Random Feature) or rff (Random Fourier Features)
"orf",
6, # Output Feature Size // 2
0.1, # Standard Deviation for Random Kernel
max_length=6 # Maximum padded size for input vector (time dimension)
)
print(feat.shape) # (4, 12)
pip install py-rff
- Check "Example.py" for the starter code.
Surya Kant Sahu - surya.@gmail.com
Tetsuya Ishikawa - tiskw111@gmail.com