class_docstr: Parameter searching with random strategy.
  
  Parameters
  ----------------
  model: :obj:`cornac.models.Recommender`, required
      Base recommender model to be tuned.
  
  space: list, required
      Parameter space to be searched on.
      It's a list of :obj:`cornac.hyperopt.SearchDomain`.
  
  metric: :obj:`cornac.metrics.RatingMetric` or :obj:`cornac.metrics.RankingMetric`, required
      Scoring metric to measure the performance and rank the parameter settings.
  
  eval_method: :obj:`cornac.eval_methods.BaseMethod`, required
      Evaluation method is being used. 
  
  n_trails: int, default: 10
      Number of trails for random search.
class_docstr_tok: ["Parameter","searching","with","random","strategy",".","Parameters","--","--","--","--","--","--","--","--","model",":",":","obj",":","`","cornac.models.Recommender","`",",","required","Base","recommender","model","to","be","tuned",".","space",":","list",",","required","Parameter","space","to","be","searched","on",".","It","'s","a","list","of",":","obj",":","`","cornac.hyperopt.SearchDomain","`",".","metric",":",":","obj",":","`","cornac.metrics.RatingMetric","`","or",":","obj",":","`","cornac.metrics.RankingMetric","`",",","required","Scoring","metric","to","measure","the","performance","and","rank","the","parameter","settings",".","eval_method",":",":","obj",":","`","cornac.eval_methods.BaseMethod","`",",","required","Evaluation","method","is","being","used",".","n_trails",":","int",",","default",":","10","Number","of","trails","for","random","search","."]
code: def __init__(self, model, space, metric, eval_method, n_trails=10):
      super().__init__(
          model,
          space,
          metric,
          eval_method,
          name="RandomSearch_{}".format(model.name),
      )
      self.n_trails = n_trails
  
imports: import numpy
  from itertools import product
  from .models import Recommender
  from .metrics import RatingMetric, RankingMetric
  from .eval_methods import rating_eval, ranking_eval
  from .utils import get_rng
label_desc: Use image node_id 1 to create a new RandomSearch object from inherited base classes: BaseSearch with example: obj = RandomSearch(model, space, metric, eval_method, n_trails)