Generator Model¶
Encapsulates Hazy generator model file archives.
- class hazy_client2.generator_model.GeneratorModel(model_file: str)¶
Bases:
object
Encapsulates Hazy generator model file archives.
- Parameters:
model_file (str) – Path to the Hazy model file
- scores() Optional[dict] ¶
Returns all model scores.
- Returns:
Dictionary containing all of the model’s metrics
- Return type:
- column_scores()¶
Returns all table column scores.
- Returns:
Dictionary containing table column scores
- Return type:
- score(score_type, score_name, table_name=None)¶
Returns a specific score.
- Parameters:
- Returns:
Score within the range 0 - 100. A higher score indicates better performance
- Return type:
- sample_data()¶
Returns sample data that was generated and stored in the model file during the training stage.
- Returns:
DataFrame of sample data
- Return type:
DataFrame
- property image¶
Returns the name of the Docker image used to train the model.
- Returns:
Name of synthesiser’s Docker image
- Return type:
- property commit¶
Returns the commit sha of the Docker image used to train the model.
- Returns:
Commit SHA
- Return type:
- property release_version¶
Returns the release version of the Docker image used to train the model in the form x.y.z.
- Returns:
Release verson
- Return type:
- property generation_schema_version: Optional[SchemaVersion]¶
Return the generation schema version locked in by the model file once trained.
- Returns:
If the schema version is None. It means the model was trained before the introduction of saving schema versions to the model file which makes it either SchemaVersion.fs(“0.0.0”) or SchemaVersion.fs(“0.1.0”). If you are using `limit_strings and batch_magnitude on and this function returns None
- Return type:
Optional[SchemaVersion]