Skip to content

Commit

Permalink
get mean
Browse files Browse the repository at this point in the history
  • Loading branch information
nomuramasahir0 committed Dec 19, 2023
1 parent 07d26c9 commit ea11b1f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmaes/_cma.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,11 @@ def generation(self) -> int:
when multi-variate gaussian distribution is updated."""
return self._g

@property
def mean(self) -> np.ndarray:
"""Mean Vector"""
return self._mean

def reseed_rng(self, seed: int) -> None:
self._rng.seed(seed)

Expand Down
5 changes: 5 additions & 0 deletions cmaes/_cmawm.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@ def generation(self) -> int:
when multi-variate gaussian distribution is updated."""
return self._cma.generation

@property
def mean(self) -> np.ndarray:
"""Mean Vector"""
return self._cma.mean

@property
def _rng(self) -> np.random.RandomState:
return self._cma._rng
Expand Down

0 comments on commit ea11b1f

Please sign in to comment.