Watts-College / crj-507-spring-2024

https://watts-college.github.io/crj-507-spring-2024/
MIT License
1 stars 0 forks source link

Lab 6 Part 1 Question 2 #29

Closed CGUEVARR closed 6 months ago

CGUEVARR commented 6 months ago

Hello- Confirm for #2 this is the code we should be using? I think not having to create our own matrix is throwing everyone off. Thanks in advance!

2. Create the unipartite graph that represents the "person" matrix.




# Your code here

Person.mat <- A %*% t(A)

dim(Person.mat)
Person.mat [1:10,1:10]
jacobtnyoung commented 6 months ago

Hi @CGUEVARR! That is correct. As reviewed in the tutorial on projection, for an N x M adjacency matrix A, the N x N project is created by multiplying by the transpose, A %*% t(A).

The code you have above is correct.