logo

Crowdly

Browser

Додати до Chrome

An equation like y = Xh can be solved by inversion of X (i.e., h = X-1y ). And...

✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.

An equation like y = Xh can be solved by inversion of X (i.e., h = X-1y ). And, it can be solved manually or using Python libraries, when the X is square). But, if X is not square or invertible then there is a well known recipe to solve the system approximately called the pseudo inverse (i.e., Ordinary Least Squares )

Using the below Python references, drag and drop a code for solving the ĥ, assuming X and y are numpy arrays/matrices, and all required modules are imported.

numpy.linalg.inv(a)

    Compute the (multiplicative) inverse of a matrix.

numpy.linalg.pinv(a)  //fyi, the second parameter can not be considered

    Compute the (Moore-Penrose) pseudo-inverse of a matrix.

numpy.dot(a, b, out=None)

    Dot product of two arrays.

numpy.transpose(a, axes=None)

    Permute the dimensions of an array.

numpy.ndarray.T

    Same as self.transpose(), except that self is returned if self.ndim < 2.

0%
0%
0%
0%
0%
Більше питань подібних до цього

Хочете миттєвий доступ до всіх перевірених відповідей на moodle.nu.edu.kz?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!

Browser

Додати до Chrome