Line 0
Link Here
|
|
|
1 |
--- crm114_hyperspace.c.orig 2020-10-07 23:50:11.708416808 +0200 |
2 |
+++ crm114_hyperspace.c 2020-10-07 23:47:47.539756629 +0200 |
3 |
@@ -66,7 +66,7 @@ |
4 |
(*db)->cb.block[whichclass].size_used, |
5 |
featurecount * sizeof (HYPERSPACE_FEATUREBUCKET)); |
6 |
|
7 |
- if (db == NULL || features == NULL) |
8 |
+ if (db == NULL || features == NULL) |
9 |
return CRM114_BADARG; |
10 |
|
11 |
if (whichclass < 0 || whichclass > (*db)->cb.how_many_classes - 1) |
12 |
--- crm114_lib.h.orig 2020-10-07 23:50:11.708416808 +0200 |
13 |
+++ crm114_lib.h 2020-10-07 23:47:47.531756592 +0200 |
14 |
@@ -25,8 +25,8 @@ |
15 |
|
16 |
|
17 |
// GROT GROT GROT global vars we have to do something about |
18 |
-int crm114__user_trace; |
19 |
-int crm114__internal_trace; |
20 |
+#define crm114__user_trace 0 |
21 |
+#define crm114__internal_trace 0 |
22 |
|
23 |
|
24 |
// Structure of a library callable classifier: |
25 |
--- crm114_matrix_util.c.orig 2020-10-07 23:50:11.712416826 +0200 |
26 |
+++ crm114_matrix_util.c 2020-10-07 23:47:47.539756629 +0200 |
27 |
@@ -28,6 +28,8 @@ |
28 |
|
29 |
#include "crm114_matrix_util.h" |
30 |
|
31 |
+int CRM114__MATR_DEBUG_MODE; //the debug value |
32 |
+ |
33 |
/************************************************************************ |
34 |
*Expanding array and linked list functions. Mostly for use with the |
35 |
*matrix library, but possibly more general. |
36 |
--- crm114_matrix_util.h.orig 2020-10-07 23:50:11.712416826 +0200 |
37 |
+++ crm114_matrix_util.h 2020-10-07 23:47:47.531756592 +0200 |
38 |
@@ -68,7 +68,7 @@ |
39 |
#define MY_INLINE static inline |
40 |
#endif |
41 |
|
42 |
-int CRM114__MATR_DEBUG_MODE; //the debug value |
43 |
+extern int CRM114__MATR_DEBUG_MODE; //the debug value |
44 |
//for SVM, if internal trace is on |
45 |
//CRM114__MATR_DEBUG_MODE = SVM_INTERNAL_TRACE_LEVEL |
46 |
//for PCA, if internal trace is on |
47 |
--- crm114_pca_lib_fncts.c.orig 2020-10-07 23:50:11.712416826 +0200 |
48 |
+++ crm114_pca_lib_fncts.c 2020-10-07 23:47:47.543756648 +0200 |
49 |
@@ -28,6 +28,8 @@ |
50 |
#include "crm114_matrix.h" |
51 |
#include "crm114_pca_lib_fncts.h" |
52 |
|
53 |
+int CRM114__PCA_DEBUG_MODE; //The debug mode for the PCA |
54 |
+ |
55 |
/******************************************************************************************* |
56 |
*This is a variation of the VonMises power algorithm for sparse matrices. Let us have |
57 |
*x_1, x_2,.., x_n examples with column means xbar. Then the VonMises update is: |
58 |
--- crm114_pca_lib_fncts.h.orig 2020-10-07 23:50:11.716416844 +0200 |
59 |
+++ crm114_pca_lib_fncts.h 2020-10-07 23:47:47.531756592 +0200 |
60 |
@@ -39,7 +39,7 @@ |
61 |
//The intermediate DEBUG modes may enable debug printing for the |
62 |
//matrix operations. See crm114_matrix_util.h for details. |
63 |
|
64 |
-int CRM114__PCA_DEBUG_MODE; //The debug mode for the PCA |
65 |
+extern int CRM114__PCA_DEBUG_MODE; //The debug mode for the PCA |
66 |
extern int CRM114__MATR_DEBUG_MODE; //Debug mode for matrices. CRM114__MATR_DEBUG_MODE = CRM114__PCA_DEBUG_MODE |
67 |
//Defined in crm114_matrix_util.h |
68 |
|
69 |
--- crm114_svm_lib_fncts.c.orig 2020-10-07 23:50:11.716416844 +0200 |
70 |
+++ crm114_svm_lib_fncts.c 2020-10-07 23:47:47.543756648 +0200 |
71 |
@@ -38,6 +38,8 @@ |
72 |
double weight, int max_train_val); |
73 |
static ExpandingArray *svm_preprocess(Matrix *X, Vector *old_theta); |
74 |
|
75 |
+int CRM114__SVM_DEBUG_MODE; |
76 |
+ |
77 |
/********************************************************************** |
78 |
*This method is taken from: |
79 |
* Training SVMs in Linear Time |
80 |
--- crm114_svm_lib_fncts.h.orig 2020-10-07 23:50:11.716416844 +0200 |
81 |
+++ crm114_svm_lib_fncts.h 2020-10-07 23:47:47.531756592 +0200 |
82 |
@@ -60,7 +60,7 @@ |
83 |
//a feasible setting since the print operations |
84 |
//put all the zeros in! |
85 |
|
86 |
-int CRM114__SVM_DEBUG_MODE; //There are a number of modes. |
87 |
+extern int CRM114__SVM_DEBUG_MODE; //There are a number of modes. |
88 |
//See crm114_matrix_util.h for them. |
89 |
//the SVM solution struct |
90 |
typedef struct { |
91 |
--- crm114_svm_quad_prog.c.orig 2020-10-07 23:50:11.720416862 +0200 |
92 |
+++ crm114_svm_quad_prog.c 2020-10-07 23:47:47.543756648 +0200 |
93 |
@@ -45,7 +45,7 @@ |
94 |
Vector *x); |
95 |
#endif |
96 |
|
97 |
-static int QP_DEBUG_MODE; |
98 |
+#define QP_DEBUG_MODE 0 |
99 |
|
100 |
|
101 |
/****************************************************************** |