Skip to content

Commit

Permalink
Add EllipticalSliceSampler MCMC kernel.
Browse files Browse the repository at this point in the history
RELNOTES: Add EllipticalSliceSampler as an experimental MCMC kernel.

PiperOrigin-RevId: 242481143
  • Loading branch information
srvasude authored and tensorflower-gardener committed Apr 8, 2019
1 parent ecd53d7 commit 6d5ec90
Show file tree
Hide file tree
Showing 4 changed files with 731 additions and 0 deletions.
64 changes: 64 additions & 0 deletions experimental/mcmc/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Copyright 2018 The TensorFlow Probability Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
# Description:
# MCMC methods, diagnostics, and related utilities.

# [internal] load python3.bzl

package(
default_visibility = [
"//tensorflow_probability:__subpackages__",
],
)

licenses(["notice"]) # Apache 2.0

exports_files(["LICENSE"])

py_library(
name = "mcmc",
srcs = ["__init__.py"],
srcs_version = "PY2AND3",
deps = [
":elliptical_slice_sampler",
],
)

py_library(
name = "elliptical_slice_sampler",
srcs = ["elliptical_slice_sampler.py"],
srcs_version = "PY2AND3",
deps = [
# numpy dep,
# tensorflow dep,
"//tensorflow_probability/python/mcmc:kernel",
"//tensorflow_probability/python/mcmc/internal",
],
)

py_test(
name = "elliptical_slice_sampler_test",
size = "large",
timeout = "long",
srcs = ["elliptical_slice_sampler_test.py"],
shard_count = 6,
deps = [
":elliptical_slice_sampler",
# numpy dep,
# tensorflow dep,
"//tensorflow_probability",
"//tensorflow_probability/python/internal:test_util",
],
)
25 changes: 25 additions & 0 deletions experimental/mcmc/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright 2018 The TensorFlow Probability Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""TensorFlow Probability MCMC python package."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

from tensorflow_probability.opensource.experimental.mcmc.elliptical_slice_sampler import EllipticalSliceSampler

__all__ = [
'EllipticalSliceSampler',
]
Loading

0 comments on commit 6d5ec90

Please sign in to comment.