Debian Codegraph @

src/dr/inference/operators/AdaptableMCMCOperator.java

raw symbols SCIP
1 /*
2 * AdaptableMCMCOperator.java
3 *
4 * Copyright (c) 2002-2015 Alexei Drummond, Andrew Rambaut and Marc Suchard
5 *
6 * This file is part of BEAST.
7 * See the NOTICE file distributed with this work for additional
8 * information regarding copyright ownership and licensing.
9 *
10 * BEAST is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU Lesser General Public License as
12 * published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
14 *
15 * BEAST is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with BEAST; if not, write to the
22 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
23 * Boston, MA 02110-1301 USA
24 */
25
26 package dr.inference.operators;
27
28 /**
29 * An MCMC operator that can be coerced to produce a target acceptance probability.
30 *
31 * @author Alexei Drummond
32 * @author Andrew Rambaut
33 * @version $Id: AdaptableMCMCOperator.java,v 1.3 2005/05/24 20:26:00 rambaut Exp $
34 */
35 public interface AdaptableMCMCOperator extends MCMCOperator {
36
37 String ADAPTABLE = "adaptable";
38 String AUTO_OPTIMIZE = "autoOptimize";
39
40 double DEFAULT_ADAPTATION_TARGET = 0.234;
41 double MINIMUM_ACCEPTANCE_LEVEL = 0.1;
42 double MAXIMUM_ACCEPTANCE_LEVEL = 0.4;
43 double MINIMUM_GOOD_ACCEPTANCE_LEVEL = 0.2;
44 double MAXIMUM_GOOD_ACCEPTANCE_LEVEL = 0.3;
45
46 /**
47 * An adaptable parameter must have a range from -infinity to +infinity with a preference for
48 * small numbers.
49 * <p/>
50 * If operator acceptance is too high, BEAST increases the parameter; if operator acceptance is
51 * too low, BEAST decreases the parameter.
52 * <p/>
53 * From MarkovChain.adaptAcceptanceProbability:
54 * <p/>
55 * new parameter = old parameter + 1/(1+N) * (current-step acceptance probability - target probabilitity),
56 * <p/>
57 * where N is some function of the number of operator trials.
58 *
59 * @return an "adaptable" parameter
60 */
61 double getAdaptableParameter();
62
63 /**
64 * Sets the coercable parameter value. A coercable parameter must have a range from -infinity to +infinity with a preference for
65 * small numbers.
66 *
67 * @param value the value to set the coercible parameter to
68 */
69 void setAdaptableParameter(double value);
70
71 /**
72 * @return the underlying tuning parameter value
73 */
74 double getRawParameter();
75
76 String getAdaptableParameterName();
77
78 double getTargetAcceptanceProbability();
79
80 double getMinimumAcceptanceLevel();
81
82 double getMaximumAcceptanceLevel();
83
84 double getMinimumGoodAcceptanceLevel();
85
86 double getMaximumGoodAcceptanceLevel();
87
88 /**
89 * @return a short descriptive message of the performance of this operator.
90 */
91 String getPerformanceSuggestion();
92
93 /**
94 * @return the mode of this operator.
95 */
96 AdaptationMode getMode();
97
98 }