Hi Sanaa! The example you link to is from the doc of the master branch of OT. Look at the URL:
http ://openturns.github.io/openturns/
master/user_manual/_generated/openturns.RandomWalkMetropolisHastings.html
So this page is showing how to use the future version of the RandomWalkMetropolisHastings
class! See the README.rst file for more details about the different versions of the doc.
If you want to use the future version, you can install the nightly OT pip package:
Alternatively, you can simply wait for version 1.19. The release candidate is coming very soon.
Concerning RandomWalkMetropolisHastings
, you can look forward to many improvements. Unfortunately, as you saw, they break backwards compatibility.