Updated docs [skip ci]
This commit is contained in:
@@ -90,10 +90,10 @@ libmf::Model::params()
|
|||||||
.threads(12) // number of threads
|
.threads(12) // number of threads
|
||||||
.bins(25) // number of bins
|
.bins(25) // number of bins
|
||||||
.iterations(20) // number of iterations
|
.iterations(20) // number of iterations
|
||||||
.lambda_p1(0.0) // coefficient of L1-norm regularization on P
|
.lambda_p1(0.0) // coefficient of L1-norm regularization for P
|
||||||
.lambda_p2(0.1) // coefficient of L2-norm regularization on P
|
.lambda_p2(0.1) // coefficient of L2-norm regularization for P
|
||||||
.lambda_q1(0.0) // coefficient of L1-norm regularization on Q
|
.lambda_q1(0.0) // coefficient of L1-norm regularization for Q
|
||||||
.lambda_q2(0.1) // coefficient of L2-norm regularization on Q
|
.lambda_q2(0.1) // coefficient of L2-norm regularization for Q
|
||||||
.learning_rate(0.1) // learning rate
|
.learning_rate(0.1) // learning rate
|
||||||
.alpha(1.0) // importance of negative entries
|
.alpha(1.0) // importance of negative entries
|
||||||
.c(0.0001) // desired value of negative entries
|
.c(0.0001) // desired value of negative entries
|
||||||
|
|||||||
@@ -43,25 +43,25 @@ impl Params {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Sets the coefficient of L1-norm regularization on P.
|
/// Sets the coefficient of L1-norm regularization for P.
|
||||||
pub fn lambda_p1(&mut self, value: f32) -> &mut Self {
|
pub fn lambda_p1(&mut self, value: f32) -> &mut Self {
|
||||||
self.param.lambda_p1 = value;
|
self.param.lambda_p1 = value;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Sets the coefficient of L2-norm regularization on P.
|
/// Sets the coefficient of L2-norm regularization for P.
|
||||||
pub fn lambda_p2(&mut self, value: f32) -> &mut Self {
|
pub fn lambda_p2(&mut self, value: f32) -> &mut Self {
|
||||||
self.param.lambda_p2 = value;
|
self.param.lambda_p2 = value;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Sets the coefficient of L1-norm regularization on Q.
|
/// Sets the coefficient of L1-norm regularization for Q.
|
||||||
pub fn lambda_q1(&mut self, value: f32) -> &mut Self {
|
pub fn lambda_q1(&mut self, value: f32) -> &mut Self {
|
||||||
self.param.lambda_q1 = value;
|
self.param.lambda_q1 = value;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Sets the coefficient of L2-norm regularization on Q.
|
/// Sets the coefficient of L2-norm regularization for Q.
|
||||||
pub fn lambda_q2(&mut self, value: f32) -> &mut Self {
|
pub fn lambda_q2(&mut self, value: f32) -> &mut Self {
|
||||||
self.param.lambda_q2 = value;
|
self.param.lambda_q2 = value;
|
||||||
self
|
self
|
||||||
|
|||||||
Reference in New Issue
Block a user