Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6089263
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:04:47+00:00 2026-05-23T12:04:47+00:00

I have an IEnumerable full of objects that we are using to represent user

  • 0

I have an IEnumerable full of objects that we are using to represent user actions. This is for the ultimate goal of displaying a list of the most recent actions taken in the system. This list can get rather long, and the users have requested a 24 hour period for the list. I want to perform some “squashing” on this list somewhat like what Facebook does for likes and comments. For example instead of listing all 37 updates a specific user performed I can list that user x updated 37 y.

These objects have the username and the datetime for the action taken as an attribute, so that information is easy enough to select. I need some help with the best way to programmatically determine what should be squashed. Ideally I am thinking for example if 1000+ people are updated in our system in less than 10 minutes by the same user then its an import and not a manual edit, and I will remove those from the list of actions and replace it with “so and so ran an import”

How would I query an IEnumerable for the objects with the same username and within a specific date range?

Edit: The only thing I am able to initially think of is iterating over the Enumerable for each possible user and for each possible 10 minute time period. That just sounds horribly inefficient though, and I’m clearly just ignorant of the options available.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:04:48+00:00Added an answer on May 23, 2026 at 12:04 pm

    As it turns out I was approaching this problem incorrectly. After attempting to query the dataset in different ways using LINQ I realized that this was an AI problem. I was trying to identify groups of data within a large dataset on a per user and time basis.

    This is a clustering problem. I have written and published a library to perform K means clustering on objects in an IEnumerable. The process goes a little something like this:

    var clusters = SharpLearning.Clustering.KCluster(k, iterations, listOfIClusterableObjects);
    
    foreach (var cluster in clusters) {
        // Process some data.
        // clusters is a List<Cluster<T>> where your objects can be viewed in the .Members attribute
    }
    

    The Cluster class containing two distance algorithms, the IClusterable interface and the KCluster algorithm are all provided in the C# Machine Learning Library

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a query that contains about 10 joins. Using a List View and
I have created an IEnumerable list of racing drivers using LINQ from a string
I'm a newbie when it comes to LINQ... I have an IEnumerable generic list
If I have variable of type IEnumerable<List<string>> is there a LINQ statement or lambda
Assume we have a method like this: public IEnumerable<T> FirstMethod() { var entities =
Imagine I have the following: private IEnumerable MyFunc(parameter a) { using(MyDataContext dc = new
I have just noticed that a multidimensional array in C# does not implement IEnumerable<T>
I have an ObservableCollection of about 1000 objects that needs to be filtered (searched)
I have an IEnumerable of an item class defined like this: public class Item
I have a IEnumerable collection of Car objects A Car has a property: Year

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.