NHotWeightedEncoder

Transform a collection of weighted categorical features to columns of weight sums, with at most
N values.
Weights of the same labels in a row are summed instead of 1.0 as is the case with the normal
NHotEncoder.
Missing values are either transformed to zero vectors or encoded as a missing value.
When using aggregated feature summary from a previous session, unseen labels are either
transformed to zero vectors or encoded as __unknown__ (if encodeMissingValue is true) and
[FeatureRejection.Unseen] ] rejections are reported.
class Object
trait Matchable
class Any

Value members

Methods

def apply(name: String, encodeMissingValue: Boolean): Transformer[Seq[WeightedLabel], Set[String], SortedMap[String, Int]]
Create a new NHotWeightedEncoder instance.
def fromSettings(setting: Settings): Transformer[Seq[WeightedLabel], Set[String], SortedMap[String, Int]]
Create a new NHotWeightedEncoder from a settings object
Value Params
setting
Settings object