This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This is some code to make a multi index set for Polynomial Chaos Expansions | |
in Julia, where you want to enumerate all indices alpha such that | |
$\sum_{j=1}^d \alpha_j \leq p$, given a limit $p$ and a dimension $d$. | |
This would be used in constructing multivariate PCEs in, e.g., PolyChaos.jl. | |
""" | |
# Calculate the size of a total order multiindex set of order p in d dimensions | |
function TotalMsetSize(p::Int, d::Int) | |
# This comes from the "stars and bars" problem, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Say you want to change the compatibility of a package in the general registry | |
# Particularly, this is helpful if you need to change the [compat] for versions | |
# that have already been released. | |
import Pkg # Keep track of the packages | |
import RegistryTools # For changing the [compat] | |
# Which package's `Compat.toml` are we changing within the registry? | |
pkg_mod = "DiffEqFlux" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A function to calculate prediction intervals | |
## Sorry if the formatting isn't quite right, I'm still somewhat new to Julia | |
using DataFrames, GLM | |
""" | |
Predict the linear response of `xf` when using formula `fm` on DataFrame `df`, | |
then return the prediction interval of probability `p`. | |
pred_int(df, fm, xf[, p]) |
NewerOlder