Skip to content

Commit

Permalink
Fix missing protobuf messages for BetaGG hierarchy
Browse files Browse the repository at this point in the history
  • Loading branch information
TeoGiane committed Mar 22, 2024
1 parent b2c31ef commit dc9ccee
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/proto/algorithm_state.proto
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ message AlgorithmState {
LinRegUniLSState lin_reg_uni_ls_state = 4; // State of a linear regression univariate location-scale family
Vector general_state = 5; // Just a vector of doubles
FAState fa_state = 6; // State of a Mixture of Factor Analysers

SRState sr_state = 7; // State of a Mixture of Beta distributions
}
int32 cardinality = 3; // How many observations are in this cluster
}
Expand All @@ -45,6 +45,7 @@ message AlgorithmState {
MultiNormalIGDistribution lin_reg_uni_state = 4;
NxIGDistribution nnxig_state = 5;
FAPriorDistribution fa_state = 7;
GamGamDistribution gg_state = 8;
}
}
HierarchyHypers hierarchy_hypers = 5; // The current values of the hyperparameters of the hierarchy
Expand Down
7 changes: 7 additions & 0 deletions src/proto/distribution.proto
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,10 @@ message MultiNormalIGDistribution {
double shape = 3;
double scale = 4;
}

message GamGamDistribution {
double a_shape = 1;
double a_rate = 2;
double b_shape = 3;
double b_rate = 4;
}
1 change: 1 addition & 0 deletions src/proto/hierarchy_id.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ enum HierarchyId {
FA = 5; // Factor Analysers
NNxIG = 6; // Normal - Normal x Inverse Gamma
PythonHier = 7; // Generic python hierarchy
BetaGG = 8; // Beta - GammaGamma hierarchy
}
9 changes: 9 additions & 0 deletions src/proto/hierarchy_prior.proto
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,12 @@ message PythonHierPrior{
Vector values = 1; // values are modified from python
}
}

/*
* Prior for the parameters of the base measure in a Beta - GammaGamma hierarchy
*/
message GGPrior {
oneof prior {
GamGamDistribution fixed_values = 1;
}
}
5 changes: 5 additions & 0 deletions src/proto/ls_state.proto
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,8 @@ message FAState {
Matrix eta = 3;
Matrix lambda = 4;
}

message SRState {
double shape = 1;
double rate = 2;
}

0 comments on commit dc9ccee

Please sign in to comment.