SaveModel() public méthode

public SaveModel ( string filename ) : void
filename string
Résultat void
Exemple #1
0
        ///
        public override void SaveModel(string filename)
        {
            baseline_predictor.SaveModel(filename + "-global-effects");

            using (StreamWriter writer = Model.GetWriter(filename, this.GetType(), "3.03"))
            {
                writer.WriteLine(Correlation);
                correlation.Write(writer);
            }
        }
        ///
        public override void SaveModel(string filename)
        {
            global_effects.SaveModel(filename + "-global-effects");

            using (StreamWriter writer = Model.GetWriter(filename, this.GetType(), "2.03"))
            {
                writer.WriteLine(num_learned_factors);
                writer.WriteMatrix(user_factors);
                writer.WriteMatrix(item_factors);
            }
        }
Exemple #3
0
        ///
        public override void SaveModel(string filename)
        {
            global_effects.SaveModel(filename + "-global-effects");

            using (StreamWriter writer = Recommender.GetWriter(filename, this.GetType()))
            {
                writer.WriteLine(global_bias.ToString(CultureInfo.InvariantCulture));
                writer.WriteLine(num_learned_factors);
                IMatrixUtils.WriteMatrix(writer, user_factors);
                IMatrixUtils.WriteMatrix(writer, item_factors);
            }
        }