Пример #1
0
        private void Initialize()
        {
            // Initialize a suggestor instance with CollaborativeFiltering as the recommender engine.
            // Pre-Calculations are done in constructor
            MovieExtracter.GetInstance().Initialize();
            Dictionary<string, SuggestorCollection> movies = MovieExtracter.GetInstance().GetMovies().ToDictionary(x => x.Id.ToString(), x => (SuggestorCollection)x);
            //Dictionary<string, SuggestorCollection> ratings = .ToDictionary(x => (x.Key), x => (SuggestorItem)x.Value);
            users = MovieExtracter.GetInstance().GetUsers().ToDictionary(x => (x.Id.ToString()), x => (SuggestorUser)x);

            suggestor = new SuggestorConnector(null, null, users, new Suggestor.Algorithms.CollaborativeFiltering(10));
            suggestor.Initialize();
        }
Пример #2
0
        private void Initialize()
        {
            // Fetch data from NAV web service
            GetData();
            // Initialize a suggestor instance with TFIDF as the recommender engine.
            // Pre-Calculations are done in constructor

            Dictionary<string, SuggestorCollection> testInvoices = invoices.ToDictionary(x => (x.Key), x => (SuggestorCollection)x.Value);
            Dictionary<string, SuggestorItem> testItems = items.ToDictionary(x => (x.Key), x => (SuggestorItem)x.Value);
            Dictionary<string, SuggestorUser> testUsers = users.ToDictionary(x => (x.Key), x => (SuggestorUser)x.Value);

            suggestor = new SuggestorConnector(testInvoices, testItems, testUsers, new Suggestor.Algorithms.TFIDF(10));
            suggestor.Initialize();
        }
Пример #3
0
 public void InitializeTest()
 {
     suggestor = new SuggestorConnector(null, new Dictionary<string, SuggestorItem>(), users, new Suggestor.Algorithms.CollaborativeFiltering(10));
     suggestor.Initialize();
 }