Implement a function that takes a
xreturns their Euclidean norm.
The Euclidean norm of a vector is the square root of its dot product with itself.
Implement a function that takes two
zand returns their Euclidean distance.
Can you re-use the solution of the previous exercise?
Implement a function that takes a matrix
Aand an integer
k, and returns
Aelevated to the
Write a Python program that plots the data here:
Every row has an experiment ID and a value; there are 10 experiments, and 100 values (rows) per experiment. For each experiment, plot its values as a time series.
The plot the average time series, i.e. the average curve, where the average is taken over all experiments.
plot(x, y)function, as done in the examples above, to plot the ten curves and their mean.
Implement the Power Iteration method for finding the largest eigenvalue and eigenvector of a matrix, as described in the first paragraph of:
Check that it matches the results given by the
eig()method of the
Implement the Gram-Schmidt orthogonalization routine, described here:
Given the iris dataset, compute the covariance matrix of the petal lenght and petal widht for the iris setosa rows.
The covariance matrix is defined here: