fix: updated 3 more notebooks for v1.0.0 API - 75% success rate
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -98,7 +98,7 @@
|
||||
" # Benchmark OptimizR (Rust)\n",
|
||||
" rust_times = []\n",
|
||||
" for _ in range(n_runs):\n",
|
||||
" hmm_rust = HMM(n_states=3, random_state=42)\n",
|
||||
" hmm_rust = HMM(n_states=3)\n",
|
||||
" start = time.perf_counter()\n",
|
||||
" hmm_rust.fit(data, n_iterations=50, tolerance=1e-4)\n",
|
||||
" rust_times.append(time.perf_counter() - start)\n",
|
||||
@@ -226,12 +226,11 @@
|
||||
" rust_times = []\n",
|
||||
" for _ in range(n_runs):\n",
|
||||
" start = time.perf_counter()\n",
|
||||
" samples_rust, _ = mcmc_sample(\n",
|
||||
" log_likelihood_fn=log_likelihood_normal,\n",
|
||||
" data=data,\n",
|
||||
" samples_rust = mcmc_sample(\n",
|
||||
" log_likelihood_fn=lambda params: log_likelihood_normal(params, data),\n",
|
||||
" initial_params=[0.0, 0.05],\n",
|
||||
" param_bounds=[(-1.0, 1.0), (0.001, 1.0)],\n",
|
||||
" proposal_std=[0.01, 0.005],\n",
|
||||
" proposal_std=0.01,\n",
|
||||
" n_samples=n_samples,\n",
|
||||
" burn_in=1000\n",
|
||||
" )\n",
|
||||
@@ -245,8 +244,7 @@
|
||||
" for _ in range(n_runs):\n",
|
||||
" start = time.perf_counter()\n",
|
||||
" samples_py, _ = mcmc_python(\n",
|
||||
" log_likelihood_fn=log_likelihood_normal,\n",
|
||||
" data=data,\n",
|
||||
" log_likelihood_fn=lambda params: log_likelihood_normal(params, data),\n",
|
||||
" initial_params=[0.0, 0.05],\n",
|
||||
" param_bounds=[(-1.0, 1.0), (0.001, 1.0)],\n",
|
||||
" proposal_std=np.array([0.01, 0.005]),\n",
|
||||
|
||||
Reference in New Issue
Block a user