Skip to content

Commit

Permalink
Working through new sampling
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffrey-hokanson committed Apr 16, 2019
1 parent 95b76cf commit f603fda
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
8 changes: 8 additions & 0 deletions docs/source/samplers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ Samplers
========


High Level Interface
====================

.. autoclass:: psdr.Sampler
:members:

.. autoclass:: psdr.SequentialMaximinSampler


Low Level Functions
===================
Expand Down
8 changes: 7 additions & 1 deletion psdr/sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,12 @@ def seq_maximin_sample(domain, Xhat, L = None, Nsamp = int(1e3), X0 = None):
return Xcan[i]


def multiobj_seq_maximin_sample(domain, Xhat, Ls, Nsamp = int(1e3), X0 = None):
r""" A multi-objective sequential maximin sampling
"""
pass


def fill_distance_estimate(domain, Xhat, L = None, Nsamp = int(1e4), X0 = None ):
r""" Estimate the fill distance of the points Xhat in the domain
Expand Down Expand Up @@ -346,7 +352,7 @@ def fX(self):
return None

class SequentialMaximinSampler(Sampler):
r""" Sequential maximin sampling
r""" Sequential maximin sampling with a fixed metric
Given a distance metric provided by :math:`\mathbf{L}`,
construct a sequence of samples :math:`\widehat{\mathbf{x}}_i`
Expand Down
5 changes: 5 additions & 0 deletions psdr/subspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,11 @@ def _fix_subspace_signs_samps(self, U, X, fX):
def _fix_subspace_signs_grads(self, U, grads):
self._U = U.dot(np.diag(np.sign(np.mean(grads.dot(U), axis = 0))))


def approximate_lipschitz(self, X = None, fX = None, grads = None, dim = None):
r""" Approximate the Lipschitz matrix on the low-dimensional subspace
"""
pass


class ActiveSubspace(SubspaceBasedDimensionReduction):
Expand Down

0 comments on commit f603fda

Please sign in to comment.