class SVDReg extends Error
The SVDReg
class works on the principle of Gradient Descent for minimizing
the error generated and L2 regularization, while predicting the missing value
in the matrix. This is obtained by the dot product of 'u(i)' and 'v(j)' vectors:
Dimensionality is reduced from 'n' features to 'k' factors.
predict (i, j) = u(i) dot v(j)
- Alphabetic
- By Inheritance
- SVDReg
- Error
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
Value Members
-
def
calc_objf: Double
Calculate the value of the objective function after the 'u' and 'v' matrices are generated.
-
def
factor: Unit
Factor the the input matrix 'a' to obtain the 'u' and the 'v' matrices.
-
final
def
flaw(method: String, message: String): Unit
Show the flaw by printing the error message.
Show the flaw by printing the error message.
- method
the method where the error occurred
- message
the error message
- Definition Classes
- Error
-
def
nz_sqmean: Double
Return the square root of the non-zero mean / k of the initial rating matrix.
-
def
predict(i: Int, j: Int): Double
Predict the value for given row and column.
Predict the value for given row and column.
- i
the row id
- j
the column id
-
def
update(h: Int): Double
Update the 'u' and 'v' matrix to minimze sum of squared error and return the mean sum of squared errors.
Update the 'u' and 'v' matrix to minimze sum of squared error and return the mean sum of squared errors.
- h
the current column to update