Skip to content

Commit

Permalink
feat: change version
Browse files Browse the repository at this point in the history
  • Loading branch information
tibetsou authored and tibetsou committed Nov 24, 2022
1 parent aef9fd5 commit 5cac45b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "opensrdk-probability"
version = "0.8.1"
version = "0.8.2"
authors = ["Kimura Yu <[email protected]>"]
edition = "2018"
description = "Standard probability library for OpenSRDK toolchain."
Expand Down
5 changes: 2 additions & 3 deletions src/nonparametric/generalized_kernel_density_estimation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ where
{
history: Vec<(S, A)>,
kernel: K,
kernel_params: Vec<f64>, //基本的にはカーネル密度推定をしたいが、標本の空間が実数スカラー(wikiみたいなナイーブな例)ではなく任意の集合としたい
//sとa_othersの関係を学習したい
kernel_params: Vec<f64>,
}

impl<S, A, K> GeneralizedKernelDensity<S, A, K>
Expand Down Expand Up @@ -77,7 +76,7 @@ where
rng: &mut dyn rand::RngCore,
) -> Result<Self::Value, DistributionError> {
let len = self.history.len();
let n = rng.gen_range(0usize..=len) - 1usize;
let n = rng.gen_range(0usize..len);
let result = self.history[n].1.clone();
Ok(result)
}
Expand Down

0 comments on commit 5cac45b

Please sign in to comment.