pasteur.extras.synth.privbayes.implementation#

Description

Functions

add_multiple_to_pset(s, x, h)

Given parent set s, adds attributes x with heights h.

add_to_pset(s, x, h)

Given parent set s, adds attribute x with height h.

calc_entropy(mar)

Calculates the entropy for the provided data.

calc_mutual_info(j_mar, x_mar, p_mar)

Calculates mutual information I(X,P) for the provided data using log2.

calc_noisy_marginals(oracle, attrs, nodes, ...)

Calculates the marginals and adds laplacian noise with scale noise_scale.

calc_r_function(j_mar, x_mar, p_mar)

Calculates the R(X,P) function for the provided data.

find_maximal_parents(heights, domain, ...)

greedy_bayes(oracle, attrs, e1, e2, theta, ...)

Performs the greedy bayes algorithm for variable domain data.

print_tree(attrs, nodes, e1, e2, theta, t)

sample_rows(attrs, nodes, marginals, n)

rtype:

DataFrame

sens_entropy(n)

Provides the sensitivity for the entropy function for a given dataset size (n).

sens_mutual_info(n)

Provides the the log2 sensitivity of the mutual information function for a given dataset size (n).

sens_r_function(n)

Provides the the R function sensitivity for a given dataset size (n).

Classes

Node(attr, col, domain, partial, p)