code
stringlengths
3
6.57k
procedure('kernel_heat_3d')
loop(0)
known('n>3')
tile(0,2,8,2)
tile(0,4,64,3)
tile(1,2,8,2)
tile(1,4,64,3)
flags.DEFINE_integer("resolution", 64, "Resolution of the video.")
flags.DEFINE_string("output_file", None, "Path to the output file.")
main(argv)
len(argv)
tf.app.UsageError("Too many command-line arguments.")
tf.io.TFRecordWriter(FLAGS.output_file)
range(20)
six.StringIO()
save(png_image)
tf.train.BytesList(value=[png_image.getvalue()
png_image.close()
tf.train.FeatureList(feature=frame_list)
tf.train.Int64List(value=[20])
tf.train.FloatList(value=[20.0])
tf.train.Int64List(value=[20])
tf.train.Int64List(value=[FLAGS.resolution, FLAGS.resolution])
tf.train.FeatureLists(feature_list=feature_list)
tf.train.Features(feature=context_feature)
writer.write(example.SerializeToString()
writer.close()
app.run(main)
ndb (base_models,)
models.Registry.import_models([models.NAMES.base_model])
get_deletion_policy()
get_export_policy()
has_reference_to_user_id(cls, unused_user_id)
The (unused)
TopicSimilaritiesModel(base_models.BaseModel)
ndb.JsonProperty(required=True)
get_deletion_policy()
get_export_policy()
simplefilter(action='ignore', category=FutureWarning)
np.random.seed(seed)
gen_sample_func(sample_size=size_check, marginal=marginal)
tp_func(theta_vec=theta_vec, x_vec=x_vec)
np.average([np.log(true_prob_vec[kk])
np.log(1 - true_prob_vec[kk])
enumerate(bern_vec)
tqdm(total=rep, desc='Toy Example for Simulations, n=%s, b=%s' % (sample_size_obs, b)
gen_obs_func(sample_size=sample_size_obs, true_param=t0_val)
sorted(classifier_dict_run.items()
print('----- %s Trained' % clf_name)
log_loss(y_true=bern_vec, y_pred=est_prob_vec)
parameter (of size guided_sample)
gen_param_fun(sample_size=guided_sample)
np.apply_along_axis(arr=theta_mat_sample.reshape(-1, 1)
np.apply_along_axis(arr=theta_mat_sample.reshape(-1, 1)
np.apply_along_axis(arr=theta_mat_sample.reshape(-1, 1)
np.exp(stats_sample)
np.sum(stats_sample)
np.random.choice(a=theta_mat_sample, p=stats_sample.reshape(-1, )
np.std(theta_mat_gaussian_fit)
np.std(theta_mat_gaussian_fit)
np.random.normal(size=b_prime, loc=np.mean(theta_mat_gaussian_fit)
np.apply_along_axis(arr=theta_mat.reshape(-1, 1)
msnh_sampling_func(b_prime=b_prime, sample_size=sample_size_obs)
np.hstack((theta_mat.reshape(-1, 1)
np.any(np.isnan(stats_mat_generated)
np.all(np.isfinite(stats_mat_generated)
np.any(np.isnan(stats_mat_observed)
np.all(np.isfinite(stats_mat_observed)
np.greater(stats_mat_observed, stats_mat_generated)
astype(int)
sorted(classifier_pvalue_dict.items()
sum(indicator_vec)
sum(indicator_vec)
len(indicator_vec)
np.repeat(sum(indicator_vec)
len(indicator_vec)
train_pvalue_clf(clf_model=clf_model_pvalue, X=theta_mat.reshape(-1, model_obj.d)
indicator_vec.reshape(-1, )
clf_pvalue.predict_proba(t0_grid.reshape(-1, model_obj.d)
clf_pvalue.predict_proba(theta_mat.reshape(-1, model_obj.d)
log_loss(y_true=indicator_vec, y_pred=theta_mat_pred)
clf_odds_fitted.items()
items()
np.mean((pvalue_val > alpha)
astype(int)
enumerate(t0_grid)
int(t0_val == theta_0_current)
int(pvalue_val[kk] > alpha)
int(pvalue_val[kk] <= alpha)
int(guided_sim)
int(empirical_marginal)
pbar.update(1)
pd.DataFrame.from_records(data=out_val, index=range(len(out_val)
str(alpha)
replace('.', '-')
str(t0_val)
replace('.', '-')
datetime.strftime(datetime.today()
out_df.to_csv(out_dir + out_filename)
print(cov_df.groupby(['classifier', 'classifier_pvalue'])