tSneAlgo.h 898 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #pragma once
  2. #include <QObject>
  3. #include "RunData.h"
  4. #include "Concurrent.h"
  5. #include <vector>
  6. class tSneAlgo : public QObject, public Concurrent
  7. {
  8. Q_OBJECT
  9. public:
  10. tSneAlgo(std::vector<SolutionPointData>::iterator begin, std::vector<SolutionPointData>::iterator end, double** YnotInitialized, double perplexity, double learningRate, int maxIter);
  11. ~tSneAlgo();
  12. int actualIteration = 0;
  13. double perplexity, learningRate;
  14. // in between 0.0 and 1.0
  15. double theta = 0;
  16. int maxIter = 750, stopLyingIter = 120, momentumSwitchIter = 20;
  17. private:
  18. int N, D, outputDimesion = 2;
  19. bool useRandomSeed = true;
  20. bool skipRandomInit = false;
  21. int randomSeet = 182437123;
  22. //intermediate
  23. double* inputArrayX;
  24. double* outputArrayY;
  25. void run() override;
  26. public:
  27. void setLearningRate(double epsillon);
  28. void setPerplexity(double perplexity);
  29. signals:
  30. void changedIter(int iter);
  31. void algoDone();
  32. };