Protocol Documentation

Table of Contents

algorithm_id.proto

Top

AlgorithmId

NameNumberDescription
UNKNOWN_ALGORITHM 0

Neal2 1

Neal3 2

Neal8 3

BlockedGibbs 4

SplitMerge 5

Slice 6

algorithm_params.proto

Top

AlgorithmParams

FieldTypeLabelDescription
algo_id string

rng_seed uint32

iterations uint32

burnin uint32

init_num_clusters uint32

neal8_n_aux uint32

algorithm_state.proto

Top

AlgorithmState

FieldTypeLabelDescription
cluster_states AlgorithmState.ClusterState repeated

cluster_allocs int32 repeated

mixing_state MixingState

iteration_num int32

AlgorithmState.ClusterState

FieldTypeLabelDescription
uni_ls_state UniLSState

multi_ls_state MultiLSState

lin_reg_uni_ls_state LinRegUniLSState

cardinality int32

distribution.proto

Top

BetaDistribution

FieldTypeLabelDescription
shape_a double

shape_b double

GammaDistribution

FieldTypeLabelDescription
shape double

rate double

InvWishartDistribution

FieldTypeLabelDescription
deg_free double

scale Matrix

MultiNormalDistribution

FieldTypeLabelDescription
mean Vector

var Matrix

UniNormalDistribution

FieldTypeLabelDescription
mean double

var double

hierarchy_id.proto

Top

HierarchyId

NameNumberDescription
UNKNOWN_HIERARCHY 0

NNIG 1

NNW 2

LinRegUni 3

hierarchy_prior.proto

Top

LinRegUniPrior

FieldTypeLabelDescription
fixed_values LinRegUniPrior.FixedValues

LinRegUniPrior.FixedValues

FieldTypeLabelDescription
mean Vector

var_scaling Matrix

shape double

scale double

NNIGPrior

FieldTypeLabelDescription
fixed_values NNIGPrior.FixedValues

normal_mean_prior NNIGPrior.NormalMeanPrior

ngg_prior NNIGPrior.NGGPrior

NNIGPrior.FixedValues

FieldTypeLabelDescription
mean double

var_scaling double

shape double

scale double

NNIGPrior.NGGPrior

FieldTypeLabelDescription
mean_prior UniNormalDistribution

var_scaling_prior GammaDistribution

shape double

scale_prior GammaDistribution

NNIGPrior.NormalMeanPrior

FieldTypeLabelDescription
mean_prior UniNormalDistribution

var_scaling double

shape double

scale double

NNWPrior

FieldTypeLabelDescription
fixed_values NNWPrior.FixedValues

normal_mean_prior NNWPrior.NormalMeanPrior

ngiw_prior NNWPrior.NGIWPrior

NNWPrior.FixedValues

FieldTypeLabelDescription
mean Vector

var_scaling double

deg_free double

scale Matrix

NNWPrior.NGIWPrior

FieldTypeLabelDescription
mean_prior MultiNormalDistribution

var_scaling_prior GammaDistribution

deg_free double

scale_prior InvWishartDistribution

NNWPrior.NormalMeanPrior

FieldTypeLabelDescription
mean_prior MultiNormalDistribution

var_scaling double

deg_free double

scale Matrix

ls_state.proto

Top

LinRegUniLSState

FieldTypeLabelDescription
regression_coeffs Vector

var double

MultiLSState

FieldTypeLabelDescription
mean Vector

prec Matrix

prec_chol Matrix

UniLSState

FieldTypeLabelDescription
mean double

var double

matrix.proto

Top

Matrix

FieldTypeLabelDescription
rows int32

cols int32

data double repeated

rowmajor bool

Vector

FieldTypeLabelDescription
size int32

data double repeated

mixing_id.proto

Top

MixingId

NameNumberDescription
UNKNOWN_MIXING 0

DP 1

PY 2

LogSB 3

TruncSB 4

mixing_prior.proto

Top

DPPrior

FieldTypeLabelDescription
fixed_value DPPrior.FixedValue

gamma_prior DPPrior.GammaPrior

DPPrior.FixedValue

FieldTypeLabelDescription
totalmass double

DPPrior.GammaPrior

FieldTypeLabelDescription
totalmass_prior GammaDistribution

LogSBPrior

FieldTypeLabelDescription
normal_prior MultiNormalDistribution

step_size double

TODO move?

num_components uint32

PYPrior

FieldTypeLabelDescription
fixed_values PYPrior.FixedValues

PYPrior.FixedValues

FieldTypeLabelDescription
strength double

discount double

TruncSBPrior

FieldTypeLabelDescription
beta_priors TruncSBPrior.BetaPriors

dp_prior TruncSBPrior.DPPrior

py_prior TruncSBPrior.PYPrior

num_components uint32

TruncSBPrior.BetaPriors

FieldTypeLabelDescription
beta_distributions BetaDistribution repeated

TruncSBPrior.DPPrior

FieldTypeLabelDescription
totalmass double

TruncSBPrior.PYPrior

FieldTypeLabelDescription
strength double

discount double

mixing_state.proto

Top

DPState

FieldTypeLabelDescription
totalmass double

LogSBState

FieldTypeLabelDescription
regression_coeffs Matrix

MixingState

FieldTypeLabelDescription
dp_state DPState

py_state PYState

log_sb_state LogSBState

trunc_sb_state TruncSBState

PYState

FieldTypeLabelDescription
strength double

discount double

TruncSBState

FieldTypeLabelDescription
sticks Vector

logweights Vector

semihdp.proto

Top

SemiHdpParams

FieldTypeLabelDescription
pseudo_prior SemiHdpParams.PseudoPriorParams

dirichlet_concentration double

rest_allocs_update string

Either "full", "metro_base", "metro_dist"

totalmass_rest double

totalmass_hdp double

w_prior SemiHdpParams.WPriorParams

SemiHdpParams.PseudoPriorParams

FieldTypeLabelDescription
card_weight double

mean_perturb_sd double

var_perturb_frac double

SemiHdpParams.WPriorParams

FieldTypeLabelDescription
shape1 double

shape2 double

SemiHdpState

FieldTypeLabelDescription
restaurants SemiHdpState.RestaurantState repeated

groups SemiHdpState.GroupState repeated

taus SemiHdpState.ClusterState repeated

c int32 repeated

w double

SemiHdpState.ClusterState

FieldTypeLabelDescription
uni_ls_state UniLSState

multi_ls_state MultiLSState

lin_reg_uni_ls_state LinRegUniLSState

cardinality int32

SemiHdpState.GroupState

FieldTypeLabelDescription
cluster_allocs int32 repeated

SemiHdpState.RestaurantState

FieldTypeLabelDescription
theta_stars SemiHdpState.ClusterState repeated

n_by_clus int32 repeated

table_to_shared int32 repeated

table_to_idio int32 repeated

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)