ptype.Trainer module

class ptype.Trainer.Trainer(machines, dfs, labels)

A Trainer object.

Parameters
  • machines – PFSMs to train.

  • dfs – data frames to train with.

  • labels – column types labeled by hand, where _label[i][j] denotes the type of j^th column in i^th dataframe.

train(max_iter=20, uniformly=False, threshold=1e-10)

Train the PFSMs.

Parameters
  • max_iter – the maximum number of iterations the optimization algorithm runs as long as it’s not converged.

  • uniformly – a binary variable used to initialize the PFSMs - True allows initializing uniformly rather than using hand-crafted values.

  • threshold

Returns