Database Reference
In-Depth Information
val userMatrix = new RowMatrix(userVectors)
val userMatrixSummary =
userMatrix.computeColumnSummaryStatistics()
println("Movie factors mean: " + movieMatrixSummary.mean)
println("Movie factors variance: " +
movieMatrixSummary.variance)
println("User factors mean: " + userMatrixSummary.mean)
println("User factors variance: " +
userMatrixSummary.variance)
You should see output similar to the one here:
Movie factors mean:
[0.28047737659519767,0.26886479057520024,0.2935579964446398,0.27821738264113755,
...
Movie factors variance:
[0.038242041794064895,0.03742229118854288,0.044116961097355877,0.057116244055791986,
...
User factors mean:
[0.2043520841572601,0.22135773814655782,0.2149706318418221,0.23647602029329481,
...
User factors variance:
[0.037749421148850396,0.02831191551960241,0.032831876953314174,0.036775110657850954,
...
If we look at the output, we will see that there do not appear to be any important outliers
that might skew the clustering results, so normalization should not be required in this
case.
Search WWH ::




Custom Search