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 6137347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:42:51+00:00 2026-05-23T17:42:51+00:00

I have the following problem. I have a training dataset comprising of a range

  • 0

I have the following problem. I have a training dataset comprising of a range of numbers. Each number belongs to a certain class. There are five classes.

Range:
1…10

Training Dataset:
{1,5,6,6,10,2,3,4,1,8,6,…}

Classes:
[1,2][3,4][5,6][7,8][9,10]

Is it possible to use a machine learning algorithm to find likelihoods for class prediction and what algorithm would be suited for this?

best, US

  • 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-23T17:42:52+00:00Added an answer on May 23, 2026 at 5:42 pm

    As described in the question’s comment,
    I want to calculate the likelihood of a certain class to appear based on the given distribution of the training set,
    the problem is trivial and hardly a machine learning one:
    Simply count the number of occurrences of each class in the “training set”, Count_12, Count_34, … Count_910. The likelihood that a given class xy would appear is simply given by

       P(xy) = Count_xy  / Total Number of elements in the "training set"
             = Count_xy  / (Count_12 + Count_34 + Count_56 + Count_78 + Count_910)
    

    A more interesting problem…
    …would be to consider the training set as a sequence and to guess what would the next item in that sequence be. The probability that the next item be from a given category would then not only be based on the prior for that category (the P(xy) computed above), but it would also be taking into account the items which precede it in the sequence. One of the interesting parts of this problem would then be to figure out how “far back” to look and much “weight” to give to the preceding sequences of items.

    Edit (now that OP indicated his/her interest for the “more interesting problem”).
    This “prediction-given-preceding-sequence” problem maps almost directly to the
    machine-learning-algorithm-for-predicting-order-of-events StackOverflow question.
    The slight differences being that the alphabet here has 10 distinct code (4 in the other question) and the fact that here we try and predict a class of codes, rather that just the code itself. With regards to this aggregation of, here, 2 codes per class, we have several options:

    • work with classes from the start, i.e. replace each code read in the sequence by its class, and only consider and keep track of classes then on.
    • work with codes only, i.e. create a predictor of 1-thru-10 codes, and only consider the class at the very end, adding the probability of the two codes which comprise a class, to produce the likelihood of the next item being of that class.
    • some hybrid solution: consider / work with the codes but sometimes aggregate to the class.

    My personal choice would be to try first with the code predictor (only aggregating at the very end), and maybe adapt from there if somehow insight gained from this initial attempt were to tell us that the logic or its performance could be simplified or improved would we aggregate earlier. Indeed the very same predictor could be used to try both approaches, one would simply need to alter the input stream, replacing all even numbers by the odd number preceding it. I’m guessing that valuable information (for the purpose of guessing upcoming codes) is lost when we aggregate early.

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

Sidebar

Related Questions

i have following problem: I have a class Foo which encapsulates a web-api. the
I have following problem statement. Export a C++ class in the dll (un-managed). Create
I have following problem: I have built a tabbar application with 4 tabs. I
I have following problem, Code: String a=Yeahh, I have no a idea what's happening
I have the following problem: I have a form in site/banen (currently local running
I have the following problem. I have three classes, A, B and C. A
I have the following problem: I implemented a managed mobile application for Windows Mobile
I have the following problem that the standard library doesn't solve well, and I'm
I have the following problem: I got a view with two text fields and
I have the following problem in a Database using Access 2007 as front end

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.