Hyper-parameter Tuning¶
-
class
cornac.hyperopt.
Discrete
(name, values)[source]¶ Domain of a parameter with a set of discrete values.
Parameters:
-
class
cornac.hyperopt.
Continuous
(name, low=0.0, high=1.0)[source]¶ Domain of a parameter with continuous values within a range of [low, high).
Parameters:
-
class
cornac.hyperopt.
GridSearch
(model, space, metric, eval_method)[source]¶ Parameter searching on a grid.
Parameters: - model (
cornac.models.Recommender
, required) – Base recommender model to be tuned. - space (list, required) – Parameter space to be searched on.
It’s a list of
cornac.hyperopt.SearchDomain
. - metric (
cornac.metrics.RatingMetric
orcornac.metrics.RankingMetric
, required) – Scoring metric to measure the performance and rank the parameter settings. - eval_method (
cornac.eval_methods.BaseMethod
, required) – Evaluation method is being used.
- model (
-
class
cornac.hyperopt.
RandomSearch
(model, space, metric, eval_method, n_trails=10)[source]¶ Parameter searching with random strategy.
Parameters: - model (
cornac.models.Recommender
, required) – Base recommender model to be tuned. - space (list, required) – Parameter space to be searched on.
It’s a list of
cornac.hyperopt.SearchDomain
. - metric (
cornac.metrics.RatingMetric
orcornac.metrics.RankingMetric
, required) – Scoring metric to measure the performance and rank the parameter settings. - eval_method (
cornac.eval_methods.BaseMethod
, required) – Evaluation method is being used. - n_trails (int, default: 10) – Number of trails for random search.
- model (