mirror of
https://github.com/ION606/COGMOD-HWI.git
synced 2026-05-14 22:16:57 +00:00
added HW4
This commit is contained in:
Binary file not shown.
Binary file not shown.
+219
File diff suppressed because one or more lines are too long
@@ -0,0 +1,28 @@
|
||||
data {
|
||||
int<lower=0> N; // Number of training samples
|
||||
int<lower=0> M; // Number of predictors (3: bmi, age, children)
|
||||
matrix[N, M] X; // Training predictors
|
||||
vector[N] y; // Training target (charges)
|
||||
int<lower=0> N_test; // Number of test samples
|
||||
matrix[N_test, M] X_test; // Test predictors
|
||||
}
|
||||
parameters {
|
||||
real alpha; // Intercept
|
||||
vector[M] beta; // Regression coefficients
|
||||
real<lower=0> sigma; // Noise term
|
||||
}
|
||||
model {
|
||||
// Priors
|
||||
sigma ~ inv_gamma(2, 2);
|
||||
alpha ~ normal(0, 10);
|
||||
beta ~ normal(0, 1);
|
||||
|
||||
// Likelihood
|
||||
y ~ normal(alpha + X * beta, sigma);
|
||||
}
|
||||
generated quantities {
|
||||
vector[N_test] y_pred;
|
||||
for (i in 1:N_test) {
|
||||
y_pred[i] = normal_rng(alpha + X_test[i] * beta, sigma);
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -2,7 +2,7 @@
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@@ -26,7 +26,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@@ -46,7 +46,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 9,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@@ -109,7 +109,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 6,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
|
||||
+495
-38
File diff suppressed because one or more lines are too long
Binary file not shown.
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 21 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 363 KiB After Width: | Height: | Size: 378 KiB |
+210
-10
@@ -1,15 +1,215 @@
|
||||
contourpy==1.3.1
|
||||
cycler==0.12.1
|
||||
fonttools==4.56.0
|
||||
kiwisolver==1.4.8
|
||||
matplotlib==3.10.1
|
||||
numpy==2.2.3
|
||||
alabaster==1.0.0
|
||||
annotated-types==0.7.0
|
||||
anyascii==0.3.2
|
||||
anyio==4.8.0
|
||||
apparmor==4.0.3
|
||||
application-utility==1.4.0
|
||||
arandr==0.1.11
|
||||
argcomplete==3.5.3
|
||||
arrow==1.3.0
|
||||
attrs==23.2.1.dev0
|
||||
autocommand==2.2.2
|
||||
Automat==22.10.0
|
||||
b2==4.3.0
|
||||
b2sdk==2.7.0
|
||||
Babel==2.15.0
|
||||
black==25.1.0
|
||||
breezy==3.3.9
|
||||
btrfsutil==6.13
|
||||
build==1.2.2
|
||||
CacheControl==0.14.2
|
||||
cachy==0.3.0
|
||||
certifi==2025.1.31
|
||||
cffi==1.17.1
|
||||
cfgv==3.4.0
|
||||
chardet==5.2.0
|
||||
charset-normalizer==3.4.1
|
||||
cleo==2.1.0
|
||||
click==8.1.8
|
||||
configobj==5.0.9
|
||||
constantly==23.10.4
|
||||
crashtest==0.4.1
|
||||
cryptography==44.0.2
|
||||
cssselect2==0.7.0
|
||||
Cython==0.29.37
|
||||
dbus-python==1.4.0
|
||||
deluge==2.1.1
|
||||
distlib==0.3.9
|
||||
distro==1.9.0
|
||||
docopt==0.6.2
|
||||
docutils==0.21.2
|
||||
dulwich==0.22.8
|
||||
ecdsa==0.19.0
|
||||
editables==0.5
|
||||
fastbencode==0.3.1
|
||||
fastjsonschema==2.21.1
|
||||
filelock==3.18.0
|
||||
findpython==0.6.3
|
||||
flit_core==3.11.0
|
||||
GeoIP==1.3.2
|
||||
gpg==1.24.2
|
||||
gufw==24.4.0
|
||||
h11==0.14.0
|
||||
hatch==1.14.0
|
||||
hatchling==1.27.0
|
||||
html5lib==1.1
|
||||
httpcore==1.0.7
|
||||
httplib2==0.22.0
|
||||
httpx==0.28.1
|
||||
hyperlink==21.0.0
|
||||
identify==2.6.9
|
||||
idna==3.10
|
||||
ifaddr==0.2.0
|
||||
imagesize==1.4.1
|
||||
importlib_metadata==7.2.1
|
||||
incremental==22.10.0
|
||||
inflect==7.5.0
|
||||
iniconfig==2.0.0
|
||||
installer==0.7.0
|
||||
jaraco.classes==3.4.0
|
||||
jaraco.collections==5.1.0
|
||||
jaraco.context==6.0.1
|
||||
jaraco.functools==4.1.0
|
||||
jaraco.text==4.0.0
|
||||
jeepney==0.9.0
|
||||
Jinja2==3.1.5
|
||||
jsonschema==4.23.0
|
||||
jsonschema-specifications==2024.10.1
|
||||
keyring==25.6.0
|
||||
lark==1.2.2
|
||||
launchpadlib==2.0.0
|
||||
lazr.restfulclient==0.14.6
|
||||
lazr.uri==1.0.6
|
||||
legacy-cgi==2.6.2
|
||||
lensfun==0.3.4
|
||||
LibAppArmor==4.0.3
|
||||
libtorrent==2.0.11
|
||||
lit==19.1.7.dev0
|
||||
lockfile==0.12.2
|
||||
logfury==1.0.1
|
||||
lxml==5.3.1
|
||||
Mako==1.3.9.dev0
|
||||
Markdown==3.7
|
||||
markdown-it-py==3.0.0
|
||||
MarkupSafe==2.1.5
|
||||
material-color-utilities-python==0.1.5
|
||||
mdurl==0.1.2
|
||||
merge3==0.0.15
|
||||
meson==1.7.0
|
||||
more-itertools==10.6.0
|
||||
msgpack==1.0.5
|
||||
mypy_extensions==1.0.0
|
||||
netifaces==0.11.0
|
||||
nftables==0.1
|
||||
nodeenv==1.9.1
|
||||
npyscreen==4.10.5
|
||||
oauthlib==3.2.2
|
||||
ordered-set==4.1.0
|
||||
packaging==24.2
|
||||
pandas==2.2.3
|
||||
paranoid-scientist==0.2.3
|
||||
pacman_mirrors==4.27
|
||||
pathspec==0.12.1
|
||||
patiencediff==0.2.15
|
||||
pbs-installer==2025.3.17
|
||||
pefile==2024.8.26
|
||||
pexpect==4.9.0
|
||||
phx-class-registry==4.0.6
|
||||
pillow==11.1.0
|
||||
pkginfo==1.12.0
|
||||
platformdirs==4.3.6
|
||||
pluggy==1.5.0
|
||||
poetry==2.1.1
|
||||
poetry-core==2.1.1
|
||||
poetry-plugin-export==1.9.0
|
||||
pre_commit==4.1.0
|
||||
psutil==7.0.0
|
||||
ptyprocess==0.7.0
|
||||
pyasn1==0.6.0
|
||||
pyasn1_modules==0.4.0
|
||||
pycairo==1.27.0
|
||||
pycparser==2.22
|
||||
pydantic==2.10.6
|
||||
pydantic_core==2.27.2
|
||||
pygame_sdl2==2.1.0
|
||||
Pygments==2.19.1
|
||||
PyGObject==3.52.3
|
||||
pynotify==1.3.0
|
||||
pyOpenSSL==25.0.0
|
||||
pyparsing==3.2.1
|
||||
python-dateutil==2.9.0.post0
|
||||
pyproject_hooks==1.2.0
|
||||
PyQt5==5.15.11
|
||||
PyQt5_sip==12.17.0
|
||||
PyQt6==6.8.1
|
||||
PyQt6_sip==13.10.0
|
||||
PySocks==1.7.1
|
||||
pytest==8.3.5
|
||||
python-dateutil==2.9.0
|
||||
pytz==2025.1
|
||||
pyxdg==0.28
|
||||
PyYAML==6.0.2
|
||||
ranger-fm==1.9.4
|
||||
RapidFuzz==3.12.2
|
||||
referencing==0.35.1
|
||||
regex==2024.11.6
|
||||
rencode==1.0.6
|
||||
reportlab==4.2.2
|
||||
requests==2.32.3
|
||||
requests-toolbelt==1.0.0
|
||||
rich==13.9.4
|
||||
roman-numerals-py==3.1.0
|
||||
rpds-py==0.22.3
|
||||
rsa==4.9
|
||||
rst2ansi==0.1.5
|
||||
SecretStorage==3.3.3
|
||||
service-identity==24.2.0
|
||||
setproctitle==1.3.5
|
||||
setuptools==75.8.0
|
||||
setuptools-scm==8.2.1
|
||||
shellingham==1.5.4
|
||||
simplejson==3.20.1
|
||||
six==1.17.0
|
||||
tzdata==2025.1
|
||||
sniffio==1.3.1
|
||||
snowballstemmer==2.2.0
|
||||
speedtest-cli==2.1.3
|
||||
Sphinx==8.2.3
|
||||
sphinx_rtd_dark_mode==1.3.0
|
||||
sphinx_rtd_theme==2.0.0
|
||||
sphinxcontrib-applehelp==2.0.0
|
||||
sphinxcontrib-devhelp==2.0.0
|
||||
sphinxcontrib-htmlhelp==2.1.0
|
||||
sphinxcontrib-jquery==4.1
|
||||
sphinxcontrib-jsmath==1.0.1
|
||||
sphinxcontrib-qthelp==2.0.0
|
||||
sphinxcontrib-serializinghtml==2.0.0
|
||||
svglib==1.5.1
|
||||
systemd-python==235
|
||||
tabulate==0.9.0
|
||||
termcolor==2.5.0
|
||||
tinycss2==1.4.0
|
||||
tomli==2.0.1
|
||||
tomli_w==1.2.0
|
||||
tomlkit==0.13.2
|
||||
torbrowser-launcher==0.3.7
|
||||
tqdm==4.67.1
|
||||
trove-classifiers==2025.3.19.19
|
||||
Twisted==24.3.0
|
||||
typeguard==4.4.2
|
||||
types-python-dateutil==2.9.0.20241206
|
||||
typing_extensions==4.12.2
|
||||
tzlocal==5.3.1
|
||||
ueberzug==18.3.1
|
||||
ufw==0.36.2
|
||||
urllib3==2.3.0
|
||||
userpath==1.9.2
|
||||
uv==0.6.10
|
||||
validate==5.0.9
|
||||
validate-pyproject==0.24.1
|
||||
virtualenv==20.28.0
|
||||
wadllib==2.0.0
|
||||
webencodings==0.5.1
|
||||
wheel==0.45.1
|
||||
woeusb-ng==0.2.12
|
||||
wxPython==4.2.2
|
||||
Yapsy==2.0.0
|
||||
zipp==3.21.0
|
||||
zope.interface==7.2
|
||||
zstandard==0.23.0
|
||||
|
||||
Reference in New Issue
Block a user