Python Forum
Predict data class using euclidean distance
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Predict data class using euclidean distance
#1
Hello, I currently have an assignment to write a python function to compute predictions according to the mean Euclidean distance to the sample points of each class. I also need to determine the training error. The function should have the following interface function:

[prediction] = meanPrediction(C1, C2, UnknownC)

This is what I have been able to determine:

- UnknownC should be composed by the training set or, in other words, C1 and C2.
- C1 and C2 are a single column arrays with 10 lines each, which means UnknownC is a single column array with 20 lines.

I was also able to compute all three arrays and the euclidean distance between C1 and C2. However, I don't know how to make the predictions for UnknownC using the distance I acquired, neither compute the training error.

Thanks in advance for any help that you may give.

Best regards,
Luis
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Distance between indicies of a list johnissa 2 3,067 Apr-25-2018, 01:04 AM
Last Post: johnissa
  Distance between two points! zepel 14 33,995 Apr-28-2017, 08:32 PM
Last Post: sparkz_alot

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020