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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:32:07+00:00 2026-05-26T23:32:07+00:00

I have a file from which I am reading the data. I need advice

  • 0

I have a file from which I am reading the data.
I need advice on how to design the data structure which does the following:
So, the data is of form

id_1::id_2::similiarity_score

Now, though the data is in this form but it also means that

id_2::id_1::same_similiarity_Score

So, what I want is a datastructure which when I use in program.
So lets say I want to use this data in order to find which two items are similar

object.maxSimiliarity(object_id_1)
returns object_id_2 # has max score

but then this object_id_1 can also be in product_id_2 column in the database…

so in database in can be either of form:

 object_id_1:: object_id_2::score
 or object_id2::object_id_1::score

so I sort off want to design this datastructure in a way that

k_1, k_2:: value <--> k_2,k_1::value
  • 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-26T23:32:08+00:00Added an answer on May 26, 2026 at 11:32 pm

    It seems to me that you could use the scores to build lists of best to worst matches:

    d = {
         'id1':  [id_best_match_to_id1, id_next_best_match_to_id1, ..., id_worst_match_to_id1],
         'id2':  [id_best_match_to_id2, id_next_best_match_to_id2, ..., id_worst_match_to_id2],
         ...
    }
    

    If the similarity scores need to be retained, use a list of tuples in the form (id_best_match_to_id1, similarity_score_to_id1).

    I don’t see a way to exploit that similarity is a symmetric relation where sim(x,y)==sim(y,x).

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

Sidebar

Related Questions

I am reading and writting a structure into a text file which is not
I have the following code from a legacy app which currently reads from an
have written a stochastic simulation in Java, which loads data from a few CSV
I have a file which is an XML representation of some data that is
I have this resource file which I need to process, wich packs a set
I currently have a .csv file with several unlabeled columns of data, which to
I have a large file, with 1.8 million rows of data, that I need
I have a text file which contains content scraped from webpages. The text file
I have a XML file which holds configuration data for data sources, and the
I have a function which reads a big text file,splits a part(from a given

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.