473,387 Members | 1,864 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

nearest neighbour classificator

oll3i
679 512MB
When i have DNA test data like the data below just few first rows pasted here
first number is the number of rows and second number is the number of columns 21st column is a decision
1186 21
1 2 3 1 3 3 1 3 3 1 2 0 3 2 1 3 2 1 0 2 3
0 0 2 1 0 0 0 2 1 3 2 1 2 2 1 0 3 1 1 3 2
0 3 1 1 0 2 2 0 1 3 1 3 0 0 2 1 1 3 3 1 2
1 2 3 3 3 1 3 0 3 3 1 2 1 3 3 1 3 0 3 3 3
3 0 1 3 3 2 0 3 3 3 3 1 3 3 1 3 1 0 3 2 3
0 2 0 3 2 1 2 2 1 2 3 0 3 1 3 0 2 2 1 0 1
3 1 3 2 0 2 0 1 0 3 2 1 3 3 3 1 3 3 0 1 3
0 0 2 0 2 2 3 2 1 3 0 0 3 2 0 3 2 0 3 1 2
3 1 3 3 1 3 1 2 2 0 1 0 3 1 3 3 0 1 3 3 3
1 1 1 0 2 0 2 1 1 3 3 0 1 1 1 1 1 3 3 2 1
0 2 2 0 0 3 3 2 1 3 1 1 3 3 1 1 3 2 2 1 2
2 0 1 1 3 0 3 0 2 2 0 2 0 3 3 3 3 2 0 3 3
1 1 2 2 2 0 2 2 0 2 2 0 3 2 0 3 2 0 2 0 3
1 3 1 3 3 3 1 1 2 2 2 1 3 3 1 2 2 1 3 3 3
3 0 1 0 1 0 2 1 3 3 3 0 3 1 3 3 1 3 3 3 1
0 3 0 2 0 1 2 1 3 2 1 1 2 0 0 3 0 1 2 1 3
1 3 2 0 0 2 1 1 1 3 3 0 1 0 1 3 1 0 1 3 1
2 0 2 1 1 1 0 0 2 2 3 1 3 0 3 2 1 3 1 1 3
0 3 2 0 0 3 2 0 0 0 3 3 1 1 1 2 0 3 3 2 3
0 0 0 0 1 2 1 2 1 3 0 0 3 1 1 0 1 0 2 2 2
when i classify each row to look for the nearest neighbour should i return
the row to which Euclidean distance is the smallest or should i return the decision ? or it's not the question for this forum :) ? but maybe somebody here have written classificators before
thank YOU
Jul 10 '07 #1
3 1570
JosAH
11,448 Expert 8TB
When i have DNA test data like the data below just few first rows pasted here
first number is the number of rows and second number is the number of columns 21st column is a decision
1186 21
1 2 3 1 3 3 1 3 3 1 2 0 3 2 1 3 2 1 0 2 3
0 0 2 1 0 0 0 2 1 3 2 1 2 2 1 0 3 1 1 3 2
0 3 1 1 0 2 2 0 1 3 1 3 0 0 2 1 1 3 3 1 2
1 2 3 3 3 1 3 0 3 3 1 2 1 3 3 1 3 0 3 3 3
3 0 1 3 3 2 0 3 3 3 3 1 3 3 1 3 1 0 3 2 3
0 2 0 3 2 1 2 2 1 2 3 0 3 1 3 0 2 2 1 0 1
3 1 3 2 0 2 0 1 0 3 2 1 3 3 3 1 3 3 0 1 3
0 0 2 0 2 2 3 2 1 3 0 0 3 2 0 3 2 0 3 1 2
3 1 3 3 1 3 1 2 2 0 1 0 3 1 3 3 0 1 3 3 3
1 1 1 0 2 0 2 1 1 3 3 0 1 1 1 1 1 3 3 2 1
0 2 2 0 0 3 3 2 1 3 1 1 3 3 1 1 3 2 2 1 2
2 0 1 1 3 0 3 0 2 2 0 2 0 3 3 3 3 2 0 3 3
1 1 2 2 2 0 2 2 0 2 2 0 3 2 0 3 2 0 2 0 3
1 3 1 3 3 3 1 1 2 2 2 1 3 3 1 2 2 1 3 3 3
3 0 1 0 1 0 2 1 3 3 3 0 3 1 3 3 1 3 3 3 1
0 3 0 2 0 1 2 1 3 2 1 1 2 0 0 3 0 1 2 1 3
1 3 2 0 0 2 1 1 1 3 3 0 1 0 1 3 1 0 1 3 1
2 0 2 1 1 1 0 0 2 2 3 1 3 0 3 2 1 3 1 1 3
0 3 2 0 0 3 2 0 0 0 3 3 1 1 1 2 0 3 3 2 3
0 0 0 0 1 2 1 2 1 3 0 0 3 1 1 0 1 0 2 2 2
when i classify each row to look for the nearest neighbour should i return
the row to which Euclidean distance is the smallest or should i return the decision ? or it's not the question for this forum :) ? but maybe somebody here have written classificators before
thank YOU
You have to define your algebra first for those first 20 digits if you want to be able
to speak about a 'nearest neighbour'. What do 0, 1, 2, 3 mean? C, G, T and A?
what makes one number to be closer to another number than another? What
does the decision digit mean? Is it a coincidence that it is in the range [0,3]
too in your example? Please elaborate.

kind regards,

Jos
Jul 10 '07 #2
oll3i
679 512MB
he you see, lecturer only told us that the last column is a decision
i counted it with naive bayes and the decision is correct a least for the rows i tested
in the tutorials on knn i found the test data eg
x1 x2 y(classification)
1 2 bad
2 7 good
we just have the decision [0,3]
maybe i should gather the decisions of the nearest neighbours and then return the decision that occurs most frequently ?
Jul 10 '07 #3
JosAH
11,448 Expert 8TB
I have a question for you: what, by Jove, is a 'decision'. Don't tell me it's a number.

kind regards,

Jos
Jul 10 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

14
by: John Hunter | last post by:
I have a list of two tuples containing x and y coord (x0, y0) (x1, y1) ... (xn, yn) Given a new point x,y, I would like to find the point in the list closest to x,y. I have to do this a...
4
by: tertius | last post by:
Hi, I'm trying to round my float total to the nearest .05 cents. 12.01 should produce 12.00 0.14 should produce 0.10 2.28 " 2.25 703.81 " 703.80 ...
2
by: nkunapa | last post by:
Hi: Is there a way in XPATH to find the nearest node of the node in context with a certain attribute value. Here is my problem. I have the following XML and I am trying to add all the nodes with...
4
by: Travis Stewart | last post by:
Hi, I am not very familiar with C++ so the problems I am having might be simple and I just cannot see them or I am totally unaware of why something would be incorrect. Anyway, I'm using the ANN...
8
by: Gompie | last post by:
Why does the function DMin("Abs(!- #" & & "#)";"SomeTable") not work properly with datefields. It always finds the closest difference with a later date only, if an earlier date in the table is...
1
by: maryjones11289 | last post by:
Hi All, I'm trying to write/find code that creates a Ternary Search Tree in Visual Basic (VB6 or .NET). Here's my situation: What I have is an array consisting of 60,000 string elements. All...
4
by: naren2345 | last post by:
Would this expression round an integer n to the nearest power of 4 ? ((n-1)|3) + 1
3
by: Valvalis | last post by:
Hello, I am trying to set a class attribute of a text.item element to the value of its nearest ancestor. I want to do this in the case that the class of the text.item is currently a blank string....
1
by: lindabaldwin | last post by:
Hi everyone, I have a code that I can use in Excel to round to the nearest 0.5, but I cannot get it to work in Access. When I try to execute it I get the following error message: "Compile error:...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.