T
- The type of Output this trainer works with.public final class HashingTrainer<T extends Output<T>> extends Object implements Trainer<T>
DEFAULT_SEED
Constructor and Description |
---|
HashingTrainer(Trainer<T> trainer,
Hasher hasher) |
Modifier and Type | Method and Description |
---|---|
int |
getInvocationCount()
The number of times this trainer instance has had it's train method invoked.
|
TrainerProvenance |
getProvenance() |
Model<T> |
train(Dataset<T> dataset,
Map<String,com.oracle.labs.mlrg.olcut.provenance.Provenance> instanceProvenance)
This clones the
Dataset , hashes each of the examples
and rewrites their feature ids before passing it to the inner trainer. |
public Model<T> train(Dataset<T> dataset, Map<String,com.oracle.labs.mlrg.olcut.provenance.Provenance> instanceProvenance)
Dataset
, hashes each of the examples
and rewrites their feature ids before passing it to the inner trainer.
This ensures the Trainer sees the data after the collisions, and thus builds the correct size data structures.
public int getInvocationCount()
Trainer
This is used to determine how many times the trainer's RNG has been accessed to ensure replicability in the random number stream.
getInvocationCount
in interface Trainer<T extends Output<T>>
public TrainerProvenance getProvenance()
getProvenance
in interface com.oracle.labs.mlrg.olcut.provenance.Provenancable<TrainerProvenance>
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.