Browse code

Update GapsResult.h

Jeanette Johnson authored on 05/10/2021 22:20:56 • GitHub committed on 05/10/2021 22:20:56
Showing1 changed files
... ...
@@ -2,7 +2,6 @@
2 2
 #define __COGAPS_GAPS_RESULT__
3 3
 
4 4
 #include "data_structures/Matrix.h"
5
-
6 5
 #include <stdint.h>
7 6
 #include <string>
8 7
 #include <vector>
... ...
@@ -36,4 +35,4 @@ struct GapsResult
36 35
     float averageQueueLengthP;
37 36
 };
38 37
 
39
-#endif // __COGAPS_GAPS_RESULT__
40 38
\ No newline at end of file
39
+#endif // __COGAPS_GAPS_RESULT__
Browse code

empty constructors for python bindings

Jeanette Johnson authored on 05/10/2021 21:03:24
Showing1 changed files
... ...
@@ -11,6 +11,7 @@ class GapsStatistics;
11 11
 
12 12
 struct GapsResult
13 13
 {
14
+    explicit GapsResult();
14 15
     explicit GapsResult(const GapsStatistics &stat);
15 16
     void writeToFile(const std::string &path);
16 17
 
Browse code

Snapshots working for both phases

Tom Sherman authored on 05/09/2019 00:20:30
Showing1 changed files
... ...
@@ -20,8 +20,10 @@ struct GapsResult
20 20
     Matrix Psd;
21 21
     Matrix pumpMatrix;
22 22
     Matrix meanPatternAssignment;
23
-    std::vector<Matrix> snapshotsA;
24
-    std::vector<Matrix> snapshotsP;
23
+    std::vector<Matrix> equilibrationSnapshotsA;
24
+    std::vector<Matrix> equilibrationSnapshotsP;
25
+    std::vector<Matrix> samplingSnapshotsA;
26
+    std::vector<Matrix> samplingSnapshotsP;
25 27
     std::vector<float> chisqHistory;
26 28
     std::vector<unsigned> atomHistoryA;
27 29
     std::vector<unsigned> atomHistoryP;
Browse code

Added option to take snapshots during sampling

The argument 'nSnapshots' specifies how many samples of the A and P matrix should be saved. The snapshots are equally spaced out during the sampling phase. This is useful for various post-run analysis techniques but should primarily be used to test ideas, not as part of an official analysis.

Tom Sherman authored on 03/09/2019 15:23:59
Showing1 changed files
... ...
@@ -20,6 +20,8 @@ struct GapsResult
20 20
     Matrix Psd;
21 21
     Matrix pumpMatrix;
22 22
     Matrix meanPatternAssignment;
23
+    std::vector<Matrix> snapshotsA;
24
+    std::vector<Matrix> snapshotsP;
23 25
     std::vector<float> chisqHistory;
24 26
     std::vector<unsigned> atomHistoryA;
25 27
     std::vector<unsigned> atomHistoryP;
Browse code

clean up linter warnings

Tom Sherman authored on 24/06/2019 19:44:02
Showing1 changed files
... ...
@@ -1,39 +1,34 @@
1 1
 #ifndef __COGAPS_GAPS_RESULT__
2 2
 #define __COGAPS_GAPS_RESULT__
3 3
 
4
-#include "GapsStatistics.h"
5 4
 #include "data_structures/Matrix.h"
6 5
 
7 6
 #include <stdint.h>
8 7
 #include <string>
8
+#include <vector>
9
+
10
+class GapsStatistics;
9 11
 
10 12
 struct GapsResult
11 13
 {
14
+    explicit GapsResult(const GapsStatistics &stat);
15
+    void writeToFile(const std::string &path);
16
+
12 17
     Matrix Amean;
13 18
     Matrix Asd;
14 19
     Matrix Pmean;
15 20
     Matrix Psd;
16 21
     Matrix pumpMatrix;
17 22
     Matrix meanPatternAssignment;
18
-
19 23
     std::vector<float> chisqHistory;
20 24
     std::vector<unsigned> atomHistoryA;
21 25
     std::vector<unsigned> atomHistoryP;
22
-
23 26
     uint64_t totalUpdates;
24 27
     uint32_t seed;
25 28
     unsigned totalRunningTime;
26
-
27 29
     float meanChiSq;
28 30
     float averageQueueLengthA;
29 31
     float averageQueueLengthP;
30
-
31
-    explicit GapsResult(const GapsStatistics &stat);
32
-
33
-    void writeToFile(const std::string &fullPath);
34
-    void writeCsv(const std::string &path);
35
-    void writeTsv(const std::string &path);
36
-    void writeGct(const std::string &path);
37 32
 };
38 33
 
39 34
 #endif // __COGAPS_GAPS_RESULT__
40 35
\ No newline at end of file
Browse code

record number of updates in the result object

Tom Sherman authored on 18/06/2019 18:15:06
Showing1 changed files
... ...
@@ -16,14 +16,15 @@ struct GapsResult
16 16
     Matrix pumpMatrix;
17 17
     Matrix meanPatternAssignment;
18 18
 
19
-    float meanChiSq;
20
-    uint32_t seed;
21
-    unsigned totalRunningTime;
22
-
23 19
     std::vector<float> chisqHistory;
24 20
     std::vector<unsigned> atomHistoryA;
25 21
     std::vector<unsigned> atomHistoryP;
26 22
 
23
+    uint64_t totalUpdates;
24
+    uint32_t seed;
25
+    unsigned totalRunningTime;
26
+
27
+    float meanChiSq;
27 28
     float averageQueueLengthA;
28 29
     float averageQueueLengthP;
29 30
 
Browse code

return running time in result object's metadata

Tom Sherman authored on 18/06/2019 18:00:21
Showing1 changed files
... ...
@@ -18,6 +18,7 @@ struct GapsResult
18 18
 
19 19
     float meanChiSq;
20 20
     uint32_t seed;
21
+    unsigned totalRunningTime;
21 22
 
22 23
     std::vector<float> chisqHistory;
23 24
     std::vector<unsigned> atomHistoryA;
Browse code

return average queue length in metadata

Tom Sherman authored on 09/01/2019 22:01:27
Showing1 changed files
... ...
@@ -23,6 +23,9 @@ struct GapsResult
23 23
     std::vector<unsigned> atomHistoryA;
24 24
     std::vector<unsigned> atomHistoryP;
25 25
 
26
+    float averageQueueLengthA;
27
+    float averageQueueLengthP;
28
+
26 29
     explicit GapsResult(const GapsStatistics &stat);
27 30
 
28 31
     void writeToFile(const std::string &fullPath);
Browse code

added PUMP back to COGAPS

Tom Sherman authored on 21/12/2018 00:52:37
Showing1 changed files
... ...
@@ -13,7 +13,9 @@ struct GapsResult
13 13
     Matrix Asd;
14 14
     Matrix Pmean;
15 15
     Matrix Psd;
16
-    
16
+    Matrix pumpMatrix;
17
+    Matrix meanPatternAssignment;
18
+
17 19
     float meanChiSq;
18 20
     uint32_t seed;
19 21
 
Browse code

store atom and chisq history

Tom Sherman authored on 15/11/2018 21:58:54
Showing1 changed files
... ...
@@ -17,6 +17,10 @@ struct GapsResult
17 17
     float meanChiSq;
18 18
     uint32_t seed;
19 19
 
20
+    std::vector<float> chisqHistory;
21
+    std::vector<unsigned> atomHistoryA;
22
+    std::vector<unsigned> atomHistoryP;
23
+
20 24
     explicit GapsResult(const GapsStatistics &stat);
21 25
 
22 26
     void writeToFile(const std::string &fullPath);
Browse code

cleaned up version and regenerated vignette

Tom Sherman authored on 02/11/2018 20:05:05
Showing1 changed files
... ...
@@ -17,7 +17,7 @@ struct GapsResult
17 17
     float meanChiSq;
18 18
     uint32_t seed;
19 19
 
20
-    GapsResult(const GapsStatistics &stat);
20
+    explicit GapsResult(const GapsStatistics &stat);
21 21
 
22 22
     void writeToFile(const std::string &fullPath);
23 23
     void writeCsv(const std::string &path);
Browse code

updated config to commit file permissions

Tom Sherman authored on 29/10/2018 19:56:14
Showing1 changed files
1 1
old mode 100644
2 2
new mode 100755
Browse code

dense sampler appears to be working

Tom Sherman authored on 15/10/2018 20:52:28
Showing1 changed files
... ...
@@ -9,10 +9,10 @@
9 9
 
10 10
 struct GapsResult
11 11
 {
12
-    ColMatrix Amean;
13
-    ColMatrix Asd;
14
-    ColMatrix Pmean;
15
-    ColMatrix Psd;
12
+    Matrix Amean;
13
+    Matrix Asd;
14
+    Matrix Pmean;
15
+    Matrix Psd;
16 16
     
17 17
     float meanChiSq;
18 18
     uint32_t seed;
Browse code

started making changes

Tom Sherman authored on 28/08/2018 19:53:08
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,28 @@
1
+#ifndef __COGAPS_GAPS_RESULT__
2
+#define __COGAPS_GAPS_RESULT__
3
+
4
+#include "GapsStatistics.h"
5
+#include "data_structures/Matrix.h"
6
+
7
+#include <stdint.h>
8
+#include <string>
9
+
10
+struct GapsResult
11
+{
12
+    ColMatrix Amean;
13
+    ColMatrix Asd;
14
+    ColMatrix Pmean;
15
+    ColMatrix Psd;
16
+    
17
+    float meanChiSq;
18
+    uint32_t seed;
19
+
20
+    GapsResult(const GapsStatistics &stat);
21
+
22
+    void writeToFile(const std::string &fullPath);
23
+    void writeCsv(const std::string &path);
24
+    void writeTsv(const std::string &path);
25
+    void writeGct(const std::string &path);
26
+};
27
+
28
+#endif // __COGAPS_GAPS_RESULT__
0 29
\ No newline at end of file