lib/svmkit/kernel_approximation/rbf.rb in svmkit-0.2.8 vs lib/svmkit/kernel_approximation/rbf.rb in svmkit-0.2.9
- old
+ new
@@ -38,10 +38,10 @@
# @param random_seed [Integer] The seed value using to initialize the random generator.
def initialize(gamma: 1.0, n_components: 128, random_seed: nil)
SVMKit::Validation.check_params_float(gamma: gamma)
SVMKit::Validation.check_params_integer(n_components: n_components)
SVMKit::Validation.check_params_type_or_nil(Integer, random_seed: random_seed)
-
+ SVMKit::Validation.check_params_positive(gamma: gamma, n_components: n_components)
@params = {}
@params[:gamma] = gamma
@params[:n_components] = n_components
@params[:random_seed] = random_seed
@params[:random_seed] ||= srand