Skip to content
This repository was archived by the owner on Jun 22, 2026. It is now read-only.

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weighted Sequence Features

Lightweight library for computing statistical features from weighted event sequences. Might be used in search ranking and feature extraction.

Basic Usage

See examples of basic usage in the examples/.

Top-N Filtering

Filter to top N elements by feature value before computing statistics:

stats, err := wseq.ComputeTopN(weights, features, 5)

Core Functions

Function Description
Compute(weights, features) Compute all statistics with validation
ComputeUnchecked(weights, features) Compute without validation (faster)
ComputeInto(stats, weights, features) Compute into existing Stats
ComputeTopN(weights, features, n) Filter to top N, then compute
FilterTopN(weights, features, n) Get top N elements by feature value

Constraints

  • Weights must be in range [0, 1]
  • Features must be in range [0, 1]
  • Input slices must have equal length
  • Input slices must not be empty

About

Lightweight library for computing statistical features from weighted event sequences. Might be used in search ranking and feature extraction.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages