Ejemplo n.º 1
0
 def _ext_identity(samples):
   """Extracts the values of all latent variables."""
   res = collections.OrderedDict()
   res['mean_log_volatility'] = util.get_columns(
       samples, r'^mean_log_volatility$')[:, 0]
   res['white_noise_shock_scale'] = util.get_columns(
       samples, r'^white_noise_shock_scale$')[:, 0]
   res['persistence_of_volatility'] = util.get_columns(
       samples, r'^persistence$')[:, 0]
   res['log_volatility'] = util.get_columns(
       samples, r'^log_volatilities\.\d+$',)
   return res
 def _ext_identity(samples):
     """Extracts the values of all latent variables."""
     res = collections.OrderedDict()
     res['county_effect_mean'] = util.get_columns(
         samples, r'^county_effect_mean$')[:, 0]
     res['county_effect_scale'] = util.get_columns(
         samples, r'^county_effect_scale$')[:, 0]
     res['county_effect'] = util.get_columns(samples,
                                             r'^county_effect\.\d+$')
     res['weight'] = util.get_columns(samples, r'^weight\.\d+$')
     res['log_radon_scale'] = (util.get_columns(samples,
                                                r'^log_radon_scale$')[:, 0])
     return res
 def _ext_identity(samples):
     """Extract all the parameters."""
     res = collections.OrderedDict()
     res['unscaled_weights'] = util.get_columns(
         samples,
         r'^unscaled_weights\.\d+$',
     )
     res['local_scales'] = util.get_columns(
         samples,
         r'^local_scales\.\d+$',
     )
     res['global_scale'] = util.get_columns(
         samples,
         r'^global_scale$',
     )[:, 0]
     return res
Ejemplo n.º 4
0
 def _ext_identity(samples):
   """Extract all the parameters."""
   res = collections.OrderedDict()
   res['amplitude'] = util.get_columns(
       samples,
       r'^amplitude$',
   )[:, 0]
   res['length_scale'] = util.get_columns(
       samples,
       r'^length_scale$',
   )[:, 0]
   res['log_intensity'] = util.get_columns(
       samples,
       r'^log_intensity\.\d+$',
   )
   return res
Ejemplo n.º 5
0
 def _ext_identity(samples):
     """Extracts all the parameters."""
     res = collections.OrderedDict()
     res['mean_student_ability'] = util.get_columns(
         samples,
         r'^mean_student_ability$',
     )[:, 0]
     res['student_ability'] = util.get_columns(
         samples,
         r'^student_ability\.\d+$',
     )
     res['question_difficulty'] = util.get_columns(
         samples,
         r'^question_difficulty\.\d+$',
     )
     return res
Ejemplo n.º 6
0
 def _ext_per_example_test_nll(samples):
   return util.get_columns(samples, r'^per_example_test_nll\.\d+$')
Ejemplo n.º 7
0
 def _ext_test_nll(samples):
   return util.get_columns(samples, r'^test_nll$')[:, 0]
Ejemplo n.º 8
0
 def _ext_identity(samples):
   return util.get_columns(samples, r'^weights\.\d+$')
Ejemplo n.º 9
0
 def _ext_identity(samples):
   """Extracts the values of all latent variables."""
   locs = util.get_columns(samples, r'^loc\.\d+$')
   return locs