Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

can anyone help me with searching algorithms?

cathycathy Posts: 67Member
Hi everyone,
I'm doing a search of a database using algorithms to tell the user how accurate the results are.
I have 2 search algorithms I'm working with - spreading activation which I have no idea how to implement and K-Nearest neighbour which I have the following problem with:-

I have my database set up with lots of foreign keys so each hair colour, eye colour etc.. has a number (brown = 1, black = 2...)
then the main table has (for example) Peter, 1, 2, 3, 4, 5 (Peter, hair = brown, eyes = green, .... and so on coz each number is a field)

So, I use the KNN to find the distance between 2,1 and 1,1 etc...
I'm looking for brown hair and green eyes (2,1) and the nearest is black hair, green eyes (1,1)

the problem is I don't know how to assign the numbers in the database, to a number on a graph!

I hope that makes sense!
If anyone can help me, please, please do! any ideas, suggestions and advice are welcome! Especially for Spreading Activation coz I really don't know how to use that!
Thanks.
Cathy.

Comments

  • DrMartenDrMarten Posts: 748Member
    How many database resuts are you using to start with?

    What do you want to do with your data exactly?

    You could use two letters or one letter for each colour of hair like

    blOnd> O
    bRown> R
    blacK> K
    greY > Y
    Ginger> G

    etcetera

    With you mention "nearest neighbour" searching are you trying to plot line graphs or similiar?

    I think i know where you might be going on this and "averaging" results may be an idea. Give me some more clues please.

Sign In or Register to comment.