_base_builder#

Building blocks of modular builders used by various Analytics objects.

Classes#

BaseBuilder

A base for various builders of privacy-tracking objects.

PrivacyBudgetMixin

Adds support for setting the privacy budget for a builder.

PrivateDataFrame

A private dataframe and its protected change.

DataFrameMixin

Adds private and public dataframe support to a builder.

ParameterMixin

Adds support for setting parameters to a builder.

class BaseBuilder#

Bases: abc.ABC

A base for various builders of privacy-tracking objects.

abstract build()#

Constructs the type that this builder builds.

Return type

Any

class PrivacyBudgetMixin#

Adds support for setting the privacy budget for a builder.

with_privacy_budget(privacy_budget)#

Set the privacy budget for the object being built.

Parameters

privacy_budget (tmlt.analytics.privacy_budget.PrivacyBudget) –

class PrivateDataFrame#

Bases: NamedTuple

A private dataframe and its protected change.

class DataFrameMixin#

Adds private and public dataframe support to a builder.

with_private_dataframe(source_id, dataframe, protected_change)#

Adds a Spark DataFrame as a private source.

Not all Spark column types are supported in private sources; see tmlt.analytics.session.SUPPORTED_SPARK_TYPES for information about which types are supported.

Parameters
with_public_dataframe(source_id, dataframe)#

Adds a public dataframe.

Parameters
with_id_space(id_space)#

Adds an identifier space.

This defines a space of identifiers that map 1-to-1 to the identifiers being protected by a table with the AddRowsWithID protected change. Any table with such a protected change must be a member of some identifier space.

Parameters

id_space (str) –

class ParameterMixin#

Adds support for setting parameters to a builder.

with_parameter(name, value)#

Set the value of a parameter.

Parameters
  • name (str) –

  • value (Any) –