Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Mathematics (https://www.askmehelpdesk.com/forumdisplay.php?f=199)
-   -   Computational Topology - Vietoris-Rips Complex (https://www.askmehelpdesk.com/showthread.php?t=834391)

  • Sep 14, 2017, 09:12 PM
    moh533
    Computational Topology - Vietoris-Rips Complex
    Write code for the function RipsComplex(P,d).

    - Inputs:

    - P : a set of points P belonging to R2 given as a k x 2 numpy matrix
    - d : a diameter d >= 0

    - Output:

    - The boundary matrix representing the 3-skeleton of VR(P, d).


    Note
    : I have little to no programming skills, so I'm just learning. Please bear with me. Also, this question is very similar to the previous question I posted. However, a graph does not need to be generated.. rather a 3-skeleton boundary matrix in python.


    Here's my work so far (same as previous question):


    import numpy as np
    import networkx as nx
    P = np.random.random((15,2)) #each point is row in matrix
    from scipy.spatial import distance-matrix
    plt.matshow(distance-matrix(P,P))
    row,col = np.where(D<???) #must find point with distance <???... not sure what distance to use
    print(row[:10],'\n',col[:10]) - slicing matrix


    #Next, I must remove duplicates and any point where col>row.. by slicing the matrix with specific parameters..


    Any help is greatly appreciated. Thanks!
  • Sep 14, 2017, 09:37 PM
    smoothy
    Homework rules on this site REQUIRE you provide your works AND what you think the answer is. You forgot to cut and paste those.
  • Sep 15, 2017, 07:00 AM
    moh533
    Edited

  • All times are GMT -7. The time now is 06:16 AM.