plot.py 1.4 KB

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/env python3
  2. import argparse
  3. k=64
  4. parser = argparse.ArgumentParser(description="Analyse diffusion maps.
  5. The following plots will be made:
  6. * a plot of the eigenvalues, useful for making an educated guess on the
  7. dimensionality (see REFERENCE)
  8. * 3D
  9. ", formatter_class=argparse.ArgumentDefaultsHelpFormatter)
  10. parser.add_argument('diffusion-map', help='file containing the diffusion map')
  11. parser.add_argument('output', help='Directory to save plots in')
  12. parser.add_argument('-k', metavar='k', type=int, help='number of neirest neighbours to use', default=64)
  13. parser.add_argument('--points', type=int, help='number of sampled points to use', default=2048)
  14. parser.add_argument('--eigenvectors', type=int, help='only calculate this number of eigenvectors', required=False)
  15. parser.add_argument('--normalize', type=bool, help='normalize data before constructing diffusion maps', default=True)
  16. parser.add_argument('--space-clip-percentage', type=int, help='percentage to ignore in each space dimension (for eliminating border effects)', default=25)
  17. parser.add_argument('--start-time', type=int, help='time to start at (percentage-wise)', default=10)
  18. parser.add_argument('--end-time', type=int, help='time to end at (percentage-wise)', default=100)
  19. parser.add_argument('--batch', action=argparse.BooleanOptionalAction, help="Only save plots, don't show them in a GUI")
  20. args = parser.parse_args()
  21. print(args)