Compute density (mlx_dlogis), cumulative distribution (mlx_plogis),
and quantile (mlx_qlogis) functions for the logistic distribution using MLX.
Usage
mlx_dlogis(x, location = 0, scale = 1, log = FALSE)
mlx_plogis(x, location = 0, scale = 1)
mlx_qlogis(p, location = 0, scale = 1)Examples
x <- as_mlx(seq(-3, 3, by = 0.5))
mlx_dlogis(x)
#> mlx array [13]
#> dtype: float32
#> values:
#> [1] 0.04517667 0.07010371 0.10499357 0.14914644 0.19661194 0.23500369
#> [7] 0.25000000 0.23500372 0.19661194 0.14914645 0.10499360 0.07010371
#> [13] 0.04517666
mlx_plogis(x)
#> mlx array [13]
#> dtype: float32
#> values:
#> [1] 0.04742588 0.07585818 0.11920293 0.18242553 0.26894143 0.37754068
#> [7] 0.50000000 0.62245935 0.73105860 0.81757444 0.88079703 0.92414182
#> [13] 0.95257413
p <- as_mlx(c(0.25, 0.5, 0.75))
mlx_qlogis(p)
#> mlx array [3]
#> dtype: float32
#> values:
#> [1] -1.098612 0.000000 1.098612