[SOLVED] COEN 140 - Lab Assignment 2

35.00 $

Programming resource
Digital learning resource
Category:
βœ“ Practical programming resource
βœ“ Suitable for guided study and reference
βœ“ Tutor guidance available when needed

Description

Rate this product

Machine Learning and Data Mining

Β Linear Algebra

Β 

Note: matrix and vector operations can be found in lecture slides COEN140_02_LinearAlgebraReview.pdf.

 

  1. Create a 2Γ—5 matrix 𝐀 with elements as random float numbers from 0 to 1. Print the rank of 𝐀.

 

Let 𝐁 = 𝐀𝐀𝑇, find the shape and rank of 𝐁

 

Let 𝐂 = 𝐀𝑇𝐀, find the shape and rank of 𝐂

Β 

Β 

  1. Create a 3Γ—5 matrix 𝐗 with elements as random integers from 0 to 10, and find the dimension (shape) of 𝐀 = 𝐗𝐗𝑇 by coding;

 

Create a 3Γ—1 column vector 𝐰 with elements as random integers from 0 to 10, and find the dimension of 𝐀𝐰 by coding;

 

Find the dimension of 𝐰𝑇𝐀 by coding;

 

Find the dimension of 𝐰𝑇𝐀𝐰 by coding.

 

Find a way (by coding) to verify that 𝐗𝐗𝑇 is symmetric.

 

 

Calculate π€βˆ’1. Print π€βˆ’1𝐀 and π€π€βˆ’1.

 

 

  1. Create a 5Γ—1 column vector 𝐱 with elements as random float numbers from 0 to 1. Calculate 𝐱𝐱𝑇 by coding. What do you think is the rank of 𝐱𝐱𝑇?

 

 

  1. Create a 5Γ—5 identity matrix 𝐈 and print it.

 

 

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.