protected override AlternatingLeastSquares CreateRecommender(Dictionary <string, Dictionary <string, double> > data)
        {
            var parameters  = new AlternatingLeastSquaresParameters(factors: 3, regularization: 0, iterations: 15, useConjugateGradient: true);
            var recommender = AlternatingLeastSquares.Fit(DataMatrix.Load(data), parameters);

            return(recommender);
        }
Exemplo n.º 2
0
        public IMatrixFactorizationRecommender FitModel()
        {
            var parameters = new AlternatingLeastSquaresParameters(
                factors: this.Factors,
                regularization: 0.01f,
                iterations: 1,
                useConjugateGradient: true,
                calculateLossAtIteration: true);

            var recommender = AlternatingLeastSquares.Fit(this.data !, parameters);

            return(recommender);
        }