Ignore:
Timestamp:
08/25/16 17:48:45 (8 years ago)
Author:
oriona
Message:

Function for computing variances removed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mds-and-trees/mds_plot.py

    r598 r599  
    7777def compute_mds(distance_matrix, dim):
    7878        embed, evals = cmdscale(distance_matrix)
    79         variances = compute_variances(embed)
     79        variances = [np.var(embed[:,i]) for i in range(len(embed[0]))]
    8080        embed = np.asarray([embed[:,i] for i in range(dim)]).T
    8181
     
    8585
    8686        return embed
    87 
    88 
    89 def compute_variances(embed):
    90         variances = []
    91         for i in range(len(embed[0])):
    92                 variances.append(np.var(embed[:,i]))
    93         return variances
    9487
    9588
Note: See TracChangeset for help on using the changeset viewer.