Professional Documents
Culture Documents
Practicum Data Scientist Takeaways Course10 Theme3 en
Practicum Data Scientist Takeaways Course10 Theme3 en
d = distance.euclidean(a, b)
Creating class
In class ClassName:
def fit(self, arg1, arg2, ...): # class method
# method content
Theory
Scalar product Class
is an operation resulting in a number (scalar), that is equal is a new data type with its own methods and attributes.
to the sum of element-by-element products of two vectors’
elements Manhattan distance or city block distance
is the sum of modules of coordinate differences of vectors
Euclidian distance a = (x1, x2, ..., xn) и b = (y1, y2, ..., yn):
between vectors a = (x1, x2, ..., xn) и b = (y1, y2, ..., yn) is
the sum of squared differences of coordinates: