I'm struggling to figure out how to use the function gaussian_pdf : mu:arr -> sigma:arr -> arr -> arr in the Owl.Arr module. When I tried the following code in the top level (i.e. OCaml's REPL), it crashes due to a segmentation fault:
#require "owl";;
open Owl;;
let mu_arr = Arr.init [|2|] (fun _ -> 1.);;
Arr.set mu_arr [|1|] 4.;; (* Set the second element of mu_arr to 4. *)
let sigma_arr = Arr.init [|2|] (fun _ -> 0.1);;
let current_point = Arr.init [|2|] (fun _ -> 1.5);;
let result_arr = Arr.gaussian_pdf ~mu:mu_arr ~sigma:sigma_arr current_point;;
I managed to figure out how to use gaussian_rvs, but gaussian_pdf still eludes me. Thanks a lot in advance!
I'm struggling to figure out how to use the function
gaussian_pdf : mu:arr -> sigma:arr -> arr -> arrin theOwl.Arrmodule. When I tried the following code in the top level (i.e. OCaml's REPL), it crashes due to a segmentation fault:I managed to figure out how to use
gaussian_rvs, butgaussian_pdfstill eludes me. Thanks a lot in advance!