|
28 | 28 | - WPPM: structured prior over basis weights and |
29 | 29 | decay_rate-controlled covariance fields. |
30 | 30 |
|
31 | | -3. TaskLikelihood (model/likelihood.py): |
| 31 | +3. TaskLikelihood (model/likelihood/base.py): |
32 | 32 | - Encodes the psychophysical decision rule. |
| 33 | + - Concrete tasks live in model/likelihood/oddity.py (MC-based) |
| 34 | + and model/likelihood/neural.py (NN surrogate). |
33 | 35 | - WPPM: loglik and predict implemented via Monte Carlo |
34 | 36 | observer simulations, using the noise model explicitly. |
35 | 37 |
|
|
63 | 65 |
|
64 | 66 | Extensibility |
65 | 67 | ------------- |
66 | | -- To add a new task: subclass TaskLikelihood, implement predict/loglik. |
| 68 | +- To add a new task: subclass TaskLikelihood, implement predict() only |
| 69 | + (loglik and simulate are inherited). Add the class to |
| 70 | + model/likelihood/ and re-export from model/likelihood/__init__.py. |
67 | 71 | - To add a new noise model: subclass NoiseModel, implement logpdf/sample. |
68 | 72 |
|
69 | 73 |
|
70 | 74 |
|
71 | 75 | ---------------------------------------------------------------------- |
72 | 76 | """ |
73 | 77 |
|
| 78 | +# from . import session as session |
74 | 79 | # Data |
75 | 80 | # Re-export subpackages for unified import style (e.g., psyphy.model, psyphy.inference) |
76 | 81 | # from . import acquisition as acquisition |
77 | 82 | from . import data as data |
78 | 83 | from . import inference as inference |
79 | 84 | from . import model as model |
80 | 85 | from . import posterior as posterior |
81 | | - |
82 | | -# from . import session as session |
83 | 86 | from . import trial_placement as trial_placement |
84 | 87 | from . import utils as utils |
85 | 88 | from .data.dataset import ResponseData, TrialBatch |
|
89 | 92 | # Inference |
90 | 93 | from .inference.map_optimizer import MAPOptimizer |
91 | 94 | from .model.likelihood import OddityTask, OddityTaskConfig |
| 95 | + |
| 96 | +# TODO: expose NN surrogate at top level once NeuralSurrogateOddityTask.predict() |
| 97 | +# is fully implemented (feature extraction + trained forward function). |
| 98 | +# Add here: |
| 99 | +# from .model.likelihood import NeuralSurrogateTask, NeuralSurrogateOddityTask |
| 100 | +# And add both names to __all__ below alongside OddityTask. |
92 | 101 | from .model.noise import GaussianNoise, StudentTNoise |
93 | 102 | from .model.prior import Prior |
94 | 103 | from .model.wppm import WPPM |
|
0 commit comments