Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tidy up the terminal output before gradient descent begins #65

Open
dkobak opened this issue Feb 11, 2019 · 1 comment
Open

Tidy up the terminal output before gradient descent begins #65

dkobak opened this issue Feb 11, 2019 · 1 comment

Comments

@dkobak
Copy link
Collaborator

dkobak commented Feb 11, 2019

The terminal output before the gradient descent is a bit of a mess and always annoys me slightly :-)

fast_tsne data_path: data.dat
fast_tsne result_path: result.dat
fast_tsne nthreads: 8
Read the following parameters:
	 n 70000 by d 50 dataset, theta 0.500000,
	 perplexity 50.000000, no_dims 2, max_iter 1000,
	 stop_lying_iter 250, mom_switch_iter 250,
	 momentum 0.500000, final_momentum 0.800000,
	 learning_rate 10000.000000, K -1, sigma -1.000000, nbody_algo 2,
	 knn_algo 1, early_exag_coeff 12.000000,
	 no_momentum_during_exag 0, n_trees 50, search_k 7500,
	 start_late_exag_iter -1, late_exag_coeff -1.000000
	 nterms 3, interval_per_integer 1.000000, min_num_intervals 50, t-dist df 0.500000
Read the 70000 x 50 data matrix successfully. X[0,0] = 0.479432
Read the initialization successfully.
Will use momentum during exaggeration phase
Computing input similarities...
Using perplexity, so normalizing input data (to prevent numerical problems)
Using perplexity, not the manually set kernel width.  K (number of nearest neighbors) and sigma (bandwidth) parameters are going to be ignored.
Using ANNOY for knn search, with parameters: n_trees 50 and search_k 7500
Going to allocate memory. N: 70000, K: 150, N*K = 10500000
Building Annoy tree...
Done building tree. Beginning nearest neighbor search... 
parallel (8 threads):
[===========================================================>] 99% 10.518s
Symmetrizing...
Using the given initialization.
Exaggerating Ps by 12.000000
Input similarities computed (sparsity = 0.002962)!
Learning embedding...
Using FIt-SNE approximation.
Iteration 50 (50 iterations in 3.58 seconds), cost 6.430274
...

It would be nice to tidy this up a little to make it a little more user-friendly.

  1. The list of parameters is ugly, this can be formatted better.
  2. "Will use momentum during exaggeration phase" -- this is the default so maybe rather say nothing unless momentum is not used?
  3. "Using perplexity, not the manually set kernel width. K (number of nearest neighbors) and sigma (bandwidth) parameters are going to be ignored." -- again the default, so maybe rather not print this
  4. Would be nice to see the time spent on building Annoy tree once its built.
  5. "parallel (8 threads):" -- this is printed above already, maybe don't need to repeat?
  6. "Symmetrizing..." -- would definitely be nice to see the time spent, because this can take quite some time in some cases.
  7. "Input similarities computed (sparsity = 0.002962)!" -- this should be printed after symmetrizing is done.
  8. If no exaggeration is used, no need to print "exaggerating by 1"
  9. In general line breaks, "...", etc. can be used more consistently.
    etc.
@linqiaozhi
Copy link
Member

Agreed on all counts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants