示例#1
0
        private async void Search(string text)
        {
            IsLoading         = true;
            _clear.Visibility = string.IsNullOrEmpty(text) ? ViewStates.Invisible : ViewStates.Visible;
            _filteredSources  = await SearchAsync(text);

            _listResults.Adapter = _resultAdapter = new SearchAdapter(_context, _filteredSources, _search);
            ItemsFiltered?.Invoke(this, new SearchBoxItemFilteredEventArgs(_filteredSources.ToList()));
            IsLoading = false;
        }
示例#2
0
 static Dictionary <string, double> Evaluate()
 {
     if (filtered_eval)
     {
         return(ItemsFiltered.Evaluate(recommender, test_data, training_data, item_attributes, relevant_users, relevant_items));
     }
     else
     {
         return(Items.Evaluate(recommender, test_data, training_data, relevant_users, relevant_items));
     }
 }
示例#3
0
        public void SetFilterResults(IList <TData> items)
        {
            //on first filter, init our original data
            if (originalDataSet == null)
            {
                originalDataSet = new List <TData> (dataSet);
            }

            applyAndAnimateRemovals(items);
            applyAndAnimateAdditions(items);
            applyAndAnimateMovedItems(items);

            ItemsFiltered?.Invoke(this, EventArgs.Empty);
        }
示例#4
0
        public override void Train()
        {
            filtered_items_by_user = new Dictionary <int, ICollection <int> > [MaxUserID + 1];
            items_by_attribute     = (SparseBooleanMatrix)item_attributes.Transpose();

            Console.Error.WriteLine("max_user_id {0} max_item_id {1}", MaxUserID, MaxItemID);

            for (int u = 0; u < filtered_items_by_user.Count; u++)
            {
                filtered_items_by_user[u] = ItemsFiltered.GetFilteredItems(u, Feedback, ItemAttributes);
            }

            base.Train();
        }