Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 11 additions & 14 deletions docs/getting_started/getting_started.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2787,8 +2787,7 @@
"metadata": {},
"source": [
"### 2. Specifying different model types\n",
"\n",
"The default model in HSSM is the classic DDM, but HSSM supports many other model types. Below is a full list of supported models at the moment. We will add new models, and HSSM users can also contribute models. Please [click here](https://lnccbrown.github.io/HSSM/CONTRIBUTING/) for our contribution guidelines.\n",
"The default model in HSSM is the classic DDM, but HSSM supports many other model types. Below is a full list of supported models as of `hssm` v0.2.5. New models may be added in future updates.\n",
"\n",
"- ddm\n",
"- ddm_sdv\n",
Expand All @@ -2802,11 +2801,9 @@
"\n",
"For more information about these models, please [see here](https://lnccbrown.github.io/HSSM/api_defaults/#wfpt-and-wfpt_sdv-classes).\n",
"\n",
"To model a different model type, please use the `model` parameter of the HSSM class constructor. \n",
"\n",
"If `model` provided is one of the supported models above, HSSM also has default specifications for these models. No other specifications is necessary.\n",
"HSSM has default specifications for the models above (such as response variables, likelihoods, choices, bounds, and others); no further specification is necessary.\n",
"\n",
"If `model` provided is not one of the above, then HSSM considers that you are using a custom model. We will cover custom models in more detail in a separate tutorial.\n",
"For custom type modeling, please use the `model` parameter of the HSSM class constructor (tutorials available [here](https://lnccbrown.github.io/HSSM/tutorials/jax_callable_contribution_onnx_example/) and [here](https://lnccbrown.github.io/HSSM/tutorials/blackbox_contribution_onnx_example/)).\n",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this the right/intended tutorial that is linked here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so (?). The original text says "We will cover custom models in more detail in a separate tutorial." I assumed that separate tutorial is the one in the /docs/getting_started/hierarchical_modeling.ipynb notebook. Is that correct?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"\n",
"Below is an example of specifying the `angle` model type."
]
Expand Down Expand Up @@ -5225,7 +5222,7 @@
"\n",
"#### 3.1 Specifying priors through the `include` parameter\n",
"\n",
"The `include` parameter accept a list of dictionaries or `hssm.Param` objects. Both dictionaries and `hssm.Param` objects are equivalent, since the content of the dictionary will be passed as parameters to `hssm.Param` class during model creation, so it is more of a matter of preference. We recommend the `hssm.Param` object because some IDEs will be able to provide prompts for possible options of parameters. In the non-regression case, each dictionary typically looks like this:\n",
"The `include` parameter accepts a list of dictionaries or `hssm.Param` objects. Both dictionaries and `hssm.Param` objects are equivalent, since the content of the dictionary will be passed as parameters to the `hssm.Param` class during model creation, so it is more of a matter of preference. We recommend the `hssm.Param` object because some IDEs will be able to provide prompts for possible options of parameters. In the non-regression case, each dictionary typically looks like this:\n",
"\n",
"```python\n",
"{\n",
Expand All @@ -5239,7 +5236,7 @@
"}\n",
"```\n",
"\n",
"This is the equivalent of writing:\n",
"This is equivalent to writing:\n",
"\n",
"```python\n",
"hssm.Param(\n",
Expand All @@ -5249,7 +5246,7 @@
")\n",
"```\n",
"\n",
"The `name` field corresponds with the name of the parameter being specified.\n",
"The `name` field corresponds to the name of the parameter being specified.\n",
"\n",
"The `prior` field specifies the distribution of the prior. There are two ways to achieve this:\n",
"\n",
Expand All @@ -5263,13 +5260,13 @@
"}\n",
"```\n",
"\n",
"or, using the `dict` function:\n",
"or, using the `dict` constructor:\n",
"\n",
"```python\n",
"dict(name=\"Normal\", mu=0.0, sigma=1.0)\n",
"```\n",
"\n",
"2. A `hssm.Prior` object. This is exactly how you would specify priors using `bambi` (In fact, `hssm.Prior` is a subclass of `bmb.Prior` and for the most part can be used interchangeably with `bmb.Prior`). Then to specify the same normal prior as above, you would write:\n",
"2. A `hssm.Prior` object. This is exactly how you would specify priors using `bambi` (In fact, `hssm.Prior` is a subclass of `bmb.Prior` and for the most part can be used interchangeably with `bmb.Prior`). To specify the same normal prior as above, you would write:\n",
"\n",
"```python\n",
"hssm.Prior(\"Normal\", mu=0.0, sigma=1.0)\n",
Expand Down Expand Up @@ -7794,9 +7791,9 @@
"\n",
"We see that in the regression case, `name` and `bounds` are specified the exact same way as in the non-regression case. The regression formula is specified in a way that's very similar to the `lmer` package in R. Users that have experience with R formulas should be very familar with this syntax. In this case, the formula means that the parameter `v` is regressed on variables `x` and `y`, which can be found in the dataframe passed to `hssm.HSSM`. The `1` explicitly specifies an intercept for the regression.\n",
"\n",
"In addition to the `formula`, the users typically needs to specify priors for the regression coefficients. This is done in the `prior` field of the dictionary. Instead of specifying priors for the parameter, the priors are now specified for the corresponding regression coefficients. If not specified, HSSM will use default priors generated in Bambi.\n",
"In addition to the `formula`, users typically need to specify priors for the regression coefficients. This is done in the `prior` field of the dictionary. Instead of specifying priors for the parameter, the priors are now specified for the corresponding regression coefficients. If not specified, HSSM will use default priors generated in Bambi.\n",
"\n",
"The users might also want to specify a `link` function for generalized linear models. If left unspecified, the `identity` link function will be used.\n",
"Users might also want to specify a `link` function for generalized linear models. If left unspecified, the `identity` link function will be used.\n",
"\n",
"Now let's see an example of a regression:"
]
Expand All @@ -7810,7 +7807,7 @@
},
"outputs": [],
"source": [
"# Generate some fake simulation data\n",
"# Generate simulated data\n",
"\n",
"intercept = 1.5\n",
"x = np.random.uniform(-5.0, 5.0, size=1000)\n",
Expand Down