sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
17k
content
stringlengths
1
200k
ac8f0ce82389dc23891edd0f07e848a5a9496472c83edecee2cb68e044fe6eeb
C
2,275
64
/* ---------------------------------------------------------- */ /* mexFunction: sparse_inp_native */ /* */ /* inner-product and apply sparse selection */ /* for array simplicity, we follow LMaFit to use transpose U...
ac14a1486103f61a61adee3aae4a9b0a03cf7046a84daecc13039849904352f2
C
2,313
70
/* ---------------------------------------------------------- */ /* mexFunction: segSubg_loss */ /* */ /* compute subgradient (without X') for each provided segment */ /* ...
c08fa41b19d6c3ea1a2e181523c3ec44ec218ff82eaab793a9e25d219da11499
C
2,326
119
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "mex.h" #ifdef MX_API_VER #if MX_API_VER < 0x07030000 typedef int mwIndex; #endif #endif void exit_with_help() { mexPrintf( "Usage: libsvmwrite('filename', label_vector, instance_matrix);\n" ); } static void fake_answer(int nlhs, mxArray *plhs[])...
93c64361a1ed6f8534292eccd0b82c89a96f4265ce316d92019b30ea5d150925
C
2,467
145
#include <stdio.h> #include <ctype.h> #include "mex.h" #if MX_API_VER < 0x07030000 typedef int mwIndex; #endif void exit_with_help() { mexPrintf( "Usage: [label_vector, instance_matrix] = read_sparse(fname);\n" ); } static void fake_answer(mxArray *plhs[]) { plhs[0] = mxCreateDoubleMatrix(0, 0, mxREAL); plhs[...
6767e66ff44e39d036c51b6c9d138c8ce818cd5f06380887b15ec50f553500a7
C
2,578
106
/* see solve_triu for compilation instructions. */ #include "mex.h" #include <string.h> #ifdef mxCreateScalarDouble #define BLAS64 #endif #ifdef BLAS64 #include "blas.h" #else #ifdef UNDERSCORE_LAPACK_CALL /* Thanks to Ruben Martinez-Cantin */ extern int dtrsm_(char *side, char *uplo, char *transa, char *diag, ...
8c7189ea77c040ffb6a9aa6f838e2e9953e079bcbd41c27277c4684eb2007081
C
2,666
87
/* takes the dot product between a length of 3 deformation vector in a 4D volume and the surface normals of a polyhedral object. Author: Jason Lerch <jason@sickkids.ca> */ #define HAVE_MINC2 1 #include <volume_io.h> #include <bicpl.h> #include <stdio.h> int main(int argc, char *argv[]) { VIO_Volume ...
a4eb0707153243092588170bd1825e1733b17eefc2f00fa1c28336a3db707487
C
2,780
124
/* * ============================================================= * computegr.c * * input: x,i,j,d * x : matrix DxN * i,j : indices of neighbors 1xC * d : distances 1xC * * output: * dx : matrix DxN * ============================================================= */ /* $Revision: 1.1...
45d832b598f2f83465341b157771c8519a4a6bc53b4e8953df1ea9721374a95d
C
2,882
104
/* AutoCorr * auto correlations * MEX file * * batta 1999, lipa 2000 * * input: t1: a time series to auto correlate * (assumed to be sorted) * binsize: the binsize for the auto corr histogram * nbins: the number of bins * NOTE: ASSUMES t1, binsize, nbins in SAME units * out...
58529d5a27c3b6b1cdabd60dbc417cefa95ee4aeb1c0b500a6b022bb2b54e577
C
3,045
90
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include "MIToolbox/ArrayOperations.h" #include "MIToolbox/Entropy.h" #include "MIToolbox/MutualInformation.h" int main(int argc, char *argv[]) { int i; double length, miTarget, entropyTarget, cmiTarget; double firstEntropy, secondEntropy, thirdEntrop...
529c129be172c91b58a574a8f16939f5aaf79772d0010f7f137f717fe5a81e80
C
3,108
98
/******************************************************************************* ** RenyiEntropy.c ** Part of the mutual information toolbox ** ** Contains functions to calculate the Renyi alpha entropy of a single variable ** H_\alpha(X), the Renyi joint entropy of two variables H_\alpha(X,Y), and the ** conditional...
9bdb9dad243624653d568674533360157068178bb23d3c0410f3ce320b95579c
C
3,239
132
/* CrossCorr * cross correlations * MEX file * * batta 1999 * * input: t1, t2: two time series to cross correlate * (assumed to be sorted) * binsize: the binsize for the cross corr histogram * nbins: the number of bins * NOTE: ASSUMES t1, t2, binsize, nbins in SAME units *...
2b7754970d67857ec731fc6f6cadbbf13e3fe6db580f1a5d0dcb7cd05cd13927
C
3,520
107
/* Performs a superparamagnetic-inspired hierarchical clustering algorithm * on multidimensional samples. * * USAGE * * [C, P] = spc_mex(D, MCS) * * COMPILATION * * mex spc_mex.c SPC.c MergeSort.c L.c FAIRSPLIT.c ALGRAPH.c * * INPUT * D - Ndimensions-by-Npoints array of feature data * MCS - mi...
c28e639b88aa2cab71c2e2b01f6fb39f7fb78960f2033c8293db7bbdb7fda162
C
3,609
96
/******************************************************************************* ** RenyiMutualInformation.c ** Part of the mutual information toolbox ** ** Contains functions to calculate the Renyi mutual information of ** two variables X and Y, I_\alpha(X;Y), using the Renyi alpha divergence and ** the joint entrop...
8cfb1a4ac19efd45ef950579956eaff90d37e5148887f5dd774c417d8ec1f526
C
3,744
190
#include <stdlib.h> #include <string.h> #include "linear.h" #include "mex.h" #ifdef MX_API_VER #if MX_API_VER < 0x07030000 typedef int mwIndex; #endif #endif #define Malloc(type,n) (type *)malloc((n)*sizeof(type)) #define NUM_OF_RETURN_FIELD 7 static const char *field_names[] = { "Parameters", "nr_class", "nr_f...
0e100340514fb5e342c0a84f1cfda0586cdaadc3ce10b90c91671310addf2804
C
3,746
111
#include "mex.h" #include <math.h> void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] ) { /* Declare variables. */ int *irs, *jcs, *k_ind, i, j, k, l, m, n, p, cc, ck, nzmax, min_ind, *ind; double *d, *k_d, *pr, *sr, dist, tmp, min_d; mxArray ...
b303730464f028b7acdcc3a770fef31a4883ef68c92e7061399e6656ada8e3cb
C
3,823
200
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <ctype.h> #include <errno.h> #include "mex.h" #if MX_API_VER < 0x07030000 typedef int mwIndex; #endif #define max(x,y) (((x)>(y))?(x):(y)) #define min(x,y) (((x)<(y))?(x):(y)) void exit_with_help() { mexPrintf( "Usage: [label_vector, instance_mat...
78dacf5ed610c5a65a5c22892b8096deff3edbfafe829cef983aca60f3cce286
C
3,878
132
/**** * Needs two inputs: a structure segmentation map and * jacobians. Will then estimate the volume of each structure * by multiplying each voxel by the voxel's volume times the * jacobian ****/ #include <minc2.h> #include <stdio.h> #include <stdlib.h> #include <math.h> int main(int argc, char **argv) { mih...
b64c7770f1eb9e7776c7a5c4f8820fb46f5db75124b8bd9470fc627449a2fde4
C
3,918
96
/******************************************************************************* ** MutualInformation.c ** Part of the mutual information toolbox ** ** Contains functions to calculate the mutual information of ** two variables X and Y, I(X;Y), to calculate the joint mutual information ** of two variables X & Z on the ...
a7ad94c15539206a89be12e69686025b3c9838d925335729f5014f70641e6b7f
C
3,939
104
/******************************************************************************* ** RenyiMutualInformation.c ** Part of the mutual information toolbox ** ** Contains functions to calculate the Renyi mutual information of ** two variables X and Y, I_\alpha(X;Y), using the Renyi alpha divergence and ** the joint entrop...
cecccaf148941a3a7782d6469d0d712fa531d8d70cc0f1ba49c1f9b41501d133
C
3,951
130
/******************************************************************************* ** Entropy.c ** Part of the mutual information toolbox ** ** Contains functions to calculate the entropy of a single variable H(X), ** the joint entropy of two variables H(X,Y), and the conditional entropy ** H(X|Y) ** ** Author: Adam Po...
6a42f100b8c2045b9052bbcb01be1dadf49164b81785b29b03e266f7be9cf8a8
C
4,060
212
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <ctype.h> #include <errno.h> #include "mex.h" #ifdef MX_API_VER #if MX_API_VER < 0x07030000 typedef int mwIndex; #endif #endif #ifndef max #define max(x,y) (((x)>(y))?(x):(y)) #endif #ifndef min #define min(x,y) (((x)<(y))?(x):(y)) #endif void exit_...
1eebe3c25259ec6b5f81ae341bdd6be42077ba942414d8cab8eb5ec1f0f42eb8
C
4,062
186
#include <stdio.h> #include <ctype.h> #include <stdlib.h> #include <string.h> #include "svm.h" struct svm_node *x; int max_nr_attr = 64; struct svm_model* model; int predict_probability=0; void predict(FILE *input, FILE *output) { int correct = 0; int total = 0; double error = 0; double sumv = 0, sumy = 0, sumvv...
df80dd7dfe1c8b9806741d3502141403354b36d494798f3848d5f79965631a54
C
4,141
134
/******************************************************************************* ** Entropy.c ** Part of the mutual information toolbox ** ** Contains functions to calculate the entropy of a single variable H(X), ** the joint entropy of two variables H(X,Y), and the conditional entropy ** H(X|Y) ** ** Author:...
b2291c289d1e7d9ef21ff37983cef079093ec43966b3a06c25e0fccc7cf13781
C
4,173
143
#include <stdlib.h> #include <stdio.h> #include <time.h> #include <mex.h> #include <math.h> #include "matrix.h" #include "flsa.h" /* Functions contained in "flsa.h" 1. The algorithm for sloving (1) with a given (labmda1, lambda2) void flsa(double *x, double *z, double *info, double * v, double *z0, ...
b4b316aca7892d5ccdc2d864d9e255f7362c5406a21595cb105a3922b663670a
C
4,173
96
/******************************************************************************* ** WeightedMutualInformation.c ** Part of the mutual information toolbox ** ** Contains functions to calculate the mutual information of ** two variables X and Y, I(X;Y), to calculate the joint mutual information ** of two variables X & Z...
a1a378823057b3632f6e55def0c8d765c64e4bc1b7eb3be0fa9d61448eabe373
C
4,208
147
/* daub4.c - Daubechies 4-coeff wavelet transform * * Applies the daubechies 4-coefficient multiscale wavelet transform on * columns of the input matrix. * * USAGE * * [W] = daub4(D, [isign]) * * Compile with: * * mex daub4.c * * INPUT * D - signal matrix (each column of D is transformed ind...
647a67e2bfed7ca4f02bc795ec83015b8e09fd378ee6b848cde4c7a4b3707a36
C
4,254
124
#ifndef lint static char svnid[] = "$Id: nifti_stats_mex.c 7147 2017-08-03 14:07:01Z spm $"; #endif /* * This is a MATLAB MEX interface for Bob Cox's extensive nifti_stats.c * functionality. See nifti_stats.m for documentation. */ #include <stdio.h> #include <stdlib.h> #include <math.h> #include "mex.h" #include...
7411a5fa52692baae622975b5ae666b3d5f88cc41355adaabefdb1aab7a5d2af
C
4,294
138
/* Takes a transform and a volume as the input, and outputs a tag file which can be used by tagtoxfm. The primary goal is to compute a linear transformation from a non-linear grid transform. */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> #define HAVE_MINC2 1 #include <volume_io.h> #include <bicp...
8ea96f854ff9039b286f16a376eb4edbb6024ad6af2c89edef9cafa96d42100d
C
4,463
155
#define PY_SSIZE_T_CLEAN #include <Python.h> #include <math.h> #define NO_IMPORT_ARRAY #define NO_IMPORT_UFUNC #define PY_ARRAY_UNIQUE_SYMBOL shapely_ARRAY_API #define PY_UFUNC_UNIQUE_SYMBOL shapely_UFUNC_API #include <numpy/ndarraytypes.h> #include <numpy/npy_3kcompat.h> #include <numpy/ufuncobject.h> #include "fas...
64dbebe015919de040eb5fe3bb994134b491564447e8c423a3d09d0f8b91339d
C
4,566
175
<<<<<<< HEAD /* * $Id: zstream.c 7523 2019-02-01 11:31:08Z guillaume $ * Guillaume Flandin */ /* mex -O CFLAGS='$CFLAGS -std=c99' -largeArrayDims zstream.c */ /* setenv CFLAGS "`mkoctfile -p CFLAGS` -std=c99" */ /* mkoctfile --mex zstream.c */ /* miniz: https://github.com/richgel999/miniz */ #define MI...
3de44c37c3cea8957964c2f266a69692e9df320623d941009032b91c5e466f55
C
4,701
151
#define PY_SSIZE_T_CLEAN #include <Python.h> #include <math.h> #define NO_IMPORT_ARRAY #define NO_IMPORT_UFUNC #define PY_ARRAY_UNIQUE_SYMBOL shapely_ARRAY_API #define PY_UFUNC_UNIQUE_SYMBOL shapely_UFUNC_API #include <numpy/ndarraytypes.h> #include <numpy/npy_3kcompat.h> #include <numpy/ufuncobject.h> #include "fas...
d3311fa2aff66e91ad51763f348d3a0484b60fe3e77f9233e32cbe60a7c59343
C
4,711
133
/******************************************************************************* ** WeightedEntropy.c ** Part of the mutual information toolbox ** ** Contains functions to calculate the entropy of a single variable H(X), ** the joint entropy of two variables H(X,Y), and the conditional entropy ** H(X|Y), while using a...
3f1c3b03c0c74109d9405910a9a3bc418489d9536fcd99b3346a8b745e47930a
C
4,843
144
/******************************************************************************* ** WeightedEntropy.c ** Part of the mutual information toolbox ** ** Contains functions to calculate the entropy of a single variable H(X), ** the joint entropy of two variables H(X,Y), and the conditional entropy ** H(X|Y), while using a...
b7081b2782ce43f41ae796bb2dd200a48830f95ba24eff9043bc3221b7a5bde4
C
4,973
127
/******************************************************************************* ** MIM implements the Mutual Information Maximisation method, which selects ** features with the largest univariate mutual informations. ** ** Initial Version - 22/02/2014 ** Updated - 22/02/2014 - Patched calloc. ** ** Author - Adam Pococ...
26f461b7bb370e50bfbbde406556ff47d3a1d449fadf239b4981b95dbee63db8
C
5,081
158
/******************************************************************************* ** Demonstration feature selection algorithm - MATLAB r2009a ** ** Initial Version - 13/06/2008 ** Updated - 07/07/2010 ** based on CMIM.m ** ** Conditional Mutual Information Maximisation ** in ** "Fast Binary Feature Selection using Cond...
277d405518640acbc80436721513ecaf9de21d984840c13d43cdabc101df14b0
C
5,095
141
/**** * Needs two inputs: a structure segmentation map and * a map with counts. Will then determine the total number * of counts in a structure by adding up all counts for * each of the labels/segmentations. ****/ #include <minc2.h> #include <stdio.h> #include <stdlib.h> #include <math.h> int main(int argc, char...
ad4ca65cc1da8fdd8606006f4a38cbe7175e8a214d59da02f49cab0c51bc4850
C
5,113
121
/******************************************************************************* ** MutualInformation.c ** Part of the mutual information toolbox ** ** Contains functions to calculate the mutual information of ** two variables X and Y, I(X;Y), to calculate the joint mutual information ** of two variables X & Z on the ...
0cd259ee2d1d52036075d8b605542b393498aa1dd9cc750b5dd2c0d4fd28d20f
C
5,130
159
/******************************************************************************* ** Demonstration feature selection algorithm - MATLAB r2009a ** ** Initial Version - 13/06/2008 ** Updated - 07/07/2010 ** based on CMIM.m ** ** Conditional Mutual Information Maximisation ** in ** "Fast Binary Feature Selection using Cond...
642e5da433d0ecb977beea6684c3aa74a7f74f91d8b5fae61123117acbd46c59
C
5,235
116
/******************************************************************************* ** WeightedMutualInformation.c ** Part of the mutual information toolbox ** ** Contains functions to calculate the mutual information of ** two variables X and Y, I(X;Y), to calculate the joint mutual information ** of two variables X & Z...
a04b80fe9f7e26263fdb5177081164d007bc75583774a8fe7a8916f0af6c4813
C
5,344
243
#include <stdio.h> #include <ctype.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include "linear.h" int print_null(const char *s,...) {return 0;} static int (*info)(const char *fmt,...) = &printf; struct feature_node *x; int max_nr_attr = 64; struct model* model_; int flag_predict_probability=0; v...
969c4a504ba049b8185590b32338c5af1bcaecca4d4615b4c1b484f402892abe
C
5,358
190
/******************************************************************************* ** RenyiMIToolboxMex.c ** is the MATLAB entry point for the Renyi Entropy and MI MIToolbox functions ** when called from a MATLAB/OCTAVE script. ** ** Copyright 2010-2017 Adam Pocock, The University Of Manchester ** www.cs.manchester.ac.u...
da234149ed8edaf19a44afb94539db02ec50f54b7ee0db53f518a73ca37bea2a
C
5,381
229
#include <stdio.h> #include <ctype.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include "svm.h" struct svm_node *x; int max_nr_attr = 64; struct svm_model* model; int predict_probability=0; static char *line = NULL; static int max_line_len; static char* readline(FILE *input) { int len; if(fget...
3cd297eeba5e6e05456009108a4470ae9be5d5b9614a45bb95876041c7e37257
C
5,435
209
#define PY_SSIZE_T_CLEAN #include <Python.h> #define PyGEOS_API_Module #define PY_ARRAY_UNIQUE_SYMBOL shapely_ARRAY_API #define PY_UFUNC_UNIQUE_SYMBOL shapely_UFUNC_API #include <numpy/ndarraytypes.h> #include <numpy/npy_3kcompat.h> #include <numpy/ufuncobject.h> #include "c_api.h" #include "coords.h" #include "geo...
a1d0fa96a4422e4f350293f3206b029e09a54807067e7bba57d848e649f3e8dc
C
5,450
139
/******************************************************************************* ** CMIM.c, implements a discrete version of the ** Conditional Mutual Information Maximisation criterion, using the fast ** exact implementation from ** ** "Fast Binary Feature Selection using Conditional Mutual Information Maximisation" ...
cd4ee9f656b50ebf5a7035f6a2f874454873fb8767d73bf7e3514e68d11724f2
C
5,653
184
/******************************************************************************* ** Demonstration feature selection algorithm - MATLAB r2009a ** ** Initial Version - 13/06/2008 ** Updated - 07/07/2010 ** based on mRMR_D.m ** ** Minimum Relevance Maximum Redundancy ** in ** "Feature Selection Based on Mutual Information...
3e816ffb2de443e97884a36567d2ea4cca2fac1223e065fd7bd4564201ab0c47
C
5,704
185
/******************************************************************************* ** Demonstration feature selection algorithm - MATLAB r2009a ** ** Initial Version - 13/06/2008 ** Updated - 07/07/2010 ** based on mRMR_D.m ** ** Minimum Relevance Maximum Redundancy ** in ** "Feature Selection Based on Mutual Information...
d2c425b2bc0bd08343a336a19e2a38a647b18aee58a145ad885f82b6d71736d5
C
5,811
178
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #define HAVE_MINC2 1 #include <volume_io.h> #include <bicpl.h> #include <ParseArgv.h> #include <time_stamp.h> /* argument parsing defaults */ static int verbose = FALSE; static int clobber = FALSE; static int datatype = NC_SHORT; /* argument table */ static...
651adefce127a358a4b1e9282bac1a9d2a534d9cc5332b37040fbdc4bc1a8ed9
C
5,909
167
/******************************************************************************* ** CondMI.c, implements the CMI criterion using a greedy forward search ** ** Initial Version - 19/08/2010 ** Updated - 23/06/2011 ** Updated - 22/02/2014 - Patched calloc. ** ** Author - Adam Pocock ** ** Part of the FEAture Selection To...
8554baa537524ecaba1e0eb5e860fcdb06e0ca6edc89f11482bce869f78bedcf
C
5,943
205
/******************************************************************************* ** ** RenyiMIToolboxMex.c ** is the MATLAB entry point for the Renyi Entropy and MI MIToolbox functions ** when called from a MATLAB/OCTAVE script. ** ** Copyright 2010 Adam Pocock, The University Of Manchester ** www.cs.manchester.a...
1918a4abf70dc8779f30b781f633dabaacec9a6a42d9b056f8d546b16bf75ec3
C
5,963
192
/******************************************************************************* ** RenyiEntropy.c ** Part of the mutual information toolbox ** ** Contains functions to calculate the Renyi alpha entropy of a single variable ** H_\alpha(X), the Renyi joint entropy of two variables H_\alpha(X,Y), and the ** conditional...
0c3814519b3b9cbd6c6edaee0fb14a5842ee47210643fe036241ac75f52736ca
C
6,136
168
/******************************************************************************* ** mRMR_D.c implements the minimum Relevance Maximum Redundancy criterion ** using the difference variant, from ** ** "Feature Selection Based on Mutual Information: Criteria of Max-Dependency, Max-Relevance, and Min-Redundancy" ** H. Peng...
199eca215f904b1336f815120fecdff50c785fca72634cf00fc5318e8eb717ad
C
6,174
173
/******************************************************************************* ** JMI.c implements the JMI criterion from ** ** "Data Visualization and Feature Selection: New Algorithms for Nongaussian Data" ** H. Yang and J. Moody, NIPS (1999) ** ** Initial Version - 19/08/2010 ** Updated - 23/06/2011 ** Updated - 2...
c6381e34c625d4694af5683333b67f58058807fc7507d2bfe4b4cdfcbebb64b3
C
6,223
199
/******************************************************************************* ** Demonstration feature selection algorithm - MATLAB r2009a ** ** Initial Version - 13/06/2008 ** Updated - 07/07/2010 ** based on DISR.m ** ** Double Input Symmetrical Relevance ** in ** "On the Use of Variable Complementarity for Featur...
c07e3d7d05eca2e565886fe662d4929a9b35d15a4cdd65bdcc5946b073f9bd7a
C
6,235
189
/* ----------------------------- MNI Header ----------------------------------- @NAME : tagtoxfm @INPUT : argc, argv - command line arguments @OUTPUT : (none) @RETURNS : status @DESCRIPTION: Program to calculate a transform file from a tag file. @METHOD : @GLOBALS : @CALLS : @CREATED ...
1be243ada5c695b2ef1ecd98c21cdc6ed583a92c7c1e2d7609a54e498e1fb67e
C
6,264
252
#define PY_SSIZE_T_CLEAN #include <Python.h> #define NO_IMPORT_ARRAY #define PY_ARRAY_UNIQUE_SYMBOL shapely_ARRAY_API #include <numpy/ndarraytypes.h> #include <numpy/npy_math.h> #include "geos.h" /* Check simple geometries (Point, LineString, LinearRing; backed by a single CoordSequence). Returns 1 on true, 0 on ...
b058b6ce1ebca3af055acb281ec39456dd57431fe459c801aa7ff535ab9d2214
C
6,292
231
/* * * mexCCACollectdata.c * prepare data for cca.m to form SDP * * by feisha@cis.upenn.edu */ #include "mex.h" #include "matrix.h" #include <stdlib.h> #include <float.h> #include <string.h> #include <math.h> /* the computation engine */ void collectdata(double *y, int* edgerow, int *edgecol, double *...
eb234c353d4593c6bb7768748b650f758184b75b8dad1a1a99cbed614f217ad1
C
6,399
202
/******************************************************************************* ** Demonstration feature selection algorithm - MATLAB r2009a ** ** Initial Version - 13/06/2008 ** Updated - 07/07/2010 ** based on DISR.m ** ** Double Input Symmetrical Relevance ** in ** "On the Use of Variable Complementarity for Featur...
f8950f787d58fd66a7750d2ee6c98688fb8594cec84006ab00da330c40687b9b
C
6,460
201
#define PY_SSIZE_T_CLEAN #include <Python.h> #include <math.h> #define NO_IMPORT_ARRAY #define NO_IMPORT_UFUNC #define PY_ARRAY_UNIQUE_SYMBOL shapely_ARRAY_API #define PY_UFUNC_UNIQUE_SYMBOL shapely_UFUNC_API #include <numpy/ndarraytypes.h> #include <numpy/npy_3kcompat.h> #include <numpy/ufuncobject.h> #include "fas...
d7b65b54bb3ca0d109388aebd0bef6de4542184284db1e14132127b07440dec0
C
6,493
180
/******************************************************************************* ** DISR.c, implements the Double Input Symmetrical Relevance criterion ** from ** ** "On the Use of Variable Complementarity for Feature Selection in Cancer Classification" ** P. Meyer and G. Bontempi, (2006) ** ** Initial Version - 13/06...
c0308d4d77fc282fbf3b0a86e09703b0320e1cd7e6ec93799ea1cfee76b1ffbb
C
6,700
341
#include <float.h> #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <string.h> void exit_with_help() { printf( "Usage: svm-scale [options] data_filename\n" "options:\n" "-l lower : x scaling lower limit (default -1)\n" "-u upper : x scaling upper limit (default +1)\n" "-y y_lower y_upper : y sc...
d81e984da666b2e4f1905d171e4bafb8b04103969ad1f7279801a92061c81eba
C
6,727
252
/* L.c List data structure and utility functions. Elements can only be added or deleted from end To create a new linked list: L = NEW_L(N); where N is the number of nodes initially allocated Functions: NEW_L - make a new linked list L_GET_ID - get the id of the i-th node ...
361db39fd71b318f216dfa50812698d5dd6af28941f10345144298a744622ad4
C
7,042
353
#include <float.h> #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <string.h> void exit_with_help() { printf( "Usage: svm-scale [options] data_filename\n" "options:\n" "-l lower : x scaling lower limit (default -1)\n" "-u upper : x scaling upper limit (default +1)\n" "-y y_lower y_upper : y sc...
a1da21527674ef9a684e48bb8395e4952cd6f8550de4fc61c6a7fa38dbe6ec43
C
7,042
353
#include <float.h> #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <string.h> void exit_with_help() { printf( "Usage: svm-scale [options] data_filename\n" "options:\n" "-l lower : x scaling lower limit (default -1)\n" "-u upper : x scaling upper limit (default +1)\n" "-y y_lower y_upper : y sc...
299e3d8c9512160afc8020b9171322a657ddca78aa9cb5c895d3869d005a4932
C
7,045
269
/*************************************************************************** *cr *cr (C) Copyright 1995-2009 The Board of Trustees of the *cr University of Illinois *cr All Rights Reserved *cr ***************************************************************...
f4aed0451e08aa50888f593232fe6ff0c7fb217c8b64f4cd750194759b6dadad
C
7,053
253
#include "mex.h" #include "math.h" #include "string.h" void computeKernelRow(double* X, int n, int d, int index, const char* function, int param1, int param2, double* row); void computeColumnSums(double* X, int n, int d, const char* function, int param1, int param2, double* column_sums, double *total_sum); void cente...
3258c6c33f9b1f73062106e573ff5a3e574bec6b24ddfb69d5157d33fe6414c9
C
7,359
181
/******************************************************************************* ** ICAP.c implements the Interaction Capping criterion from ** ** "Machine Learning Based on Attribute Interactions" ** A. Jakulin, PhD Thesis (2005) ** ** Initial Version - 19/08/2010 ** Updated - 12/02/2013 - patched the use of DBL_MAX...
ad257a64564a27a5fa665f0b5a772e8d3cb56b06e2ba367381ee863f788349cb
C
7,684
349
#include <stdlib.h> #include <string.h> #include "svm.h" #include "mex.h" #if MX_API_VER < 0x07030000 typedef int mwIndex; #endif #define NUM_OF_RETURN_FIELD 10 #define Malloc(type,n) (type *)malloc((n)*sizeof(type)) static const char *field_names[] = { "Parameters", "nr_class", "totalSV", "rho", "Label", "P...
6799ba7a1e752afc51685758e30a994075c6bf1d153ca720652fcb4f2d9dc4b4
C
7,722
351
#include <stdlib.h> #include <string.h> #include "../svm.h" #include "mex.h" #ifdef MX_API_VER #if MX_API_VER < 0x07030000 typedef int mwIndex; #endif #endif #define NUM_OF_RETURN_FIELD 10 #define Malloc(type,n) (type *)malloc((n)*sizeof(type)) static const char *field_names[] = { "Parameters", "nr_class", "tot...
d226c1f140d02b3bb5d7f6ec438e62aa5140097b9228da2be94441763553bf39
C
7,787
331
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include "svm.h" #define Malloc(type,n) (type *)malloc((n)*sizeof(type)) void exit_with_help() { printf( "Usage: svm-train [options] training_set_file [model_file]\n" "options:\n" "-s svm_type : set type of SVM (default 0)\n" "\t%d -- C...
db508a5a25d294b4a96314460c4797b3b992554772f7601687c6967e3c9cbb07
C
7,844
196
/******************************************************************************* ** betaGamma() implements the Beta-Gamma space from Brown (2009). ** This incoporates MIFS, CIFE, and CondRed. ** ** MIFS - "Using mutual information for selecting features in supervised neural net learning" ** R. Battiti, IEEE Transaction...
a7a338b213957835168e9a4ca7ef20ca84b3dad50300f08b671fef166a7c1eb2
C
8,098
246
#define PY_SSIZE_T_CLEAN #include <Python.h> #include <math.h> #define NO_IMPORT_ARRAY #define NO_IMPORT_UFUNC #define PY_ARRAY_UNIQUE_SYMBOL shapely_ARRAY_API #define PY_UFUNC_UNIQUE_SYMBOL shapely_UFUNC_API #include <numpy/ndarraytypes.h> #include <numpy/npy_3kcompat.h> #include <numpy/ufuncobject.h> #include "fas...
6aa2e9cbcf3d656e3801e8d75165e5b6e74040f2380ea90c88fb3bdbbff9e806
C
8,141
365
#include <stdlib.h> #include <string.h> #include "svm.h" #include "mex.h" #if MX_API_VER < 0x07030000 typedef int mwIndex; #endif #define NUM_OF_RETURN_FIELD 10 #define Malloc(type,n) (type *)malloc((n)*sizeof(type)) static const char *field_names[] = { "Parameters", "nr_class", "totalSV", "rho", "Label", "...
a8bd0b875a6477f1f82fc56e6bc820fe879a8b0847ac6b16a446685358930b8a
C
8,151
281
/* * * mexCCACollectdata.c * prepare data for cca.m to form SDP * * by feisha@cis.upenn.edu */ #include "mex.h" #include "matrix.h" #include <stdlib.h> #include <float.h> #include <string.h> #include <math.h> /* the computation engine */ void collectdata(double *x, double *y, int* edgerow, int *edgeco...
00b49f2ef5faa6ba0dc63da7cf5174b41ecd0f9015a7a724ef5dc8558e9be7d1
C
8,186
339
/* * Miniscope_PYTHON_I2C_2_SPI.c * * Created: 7/21/2018 6:34:01 PM * Author : DBAharoni */ // ----- USER DEFINED CONFIG (SELECT ONE) ------ //#define DUAL_LED_MINISCOPE //#define DUAL_LED_MINISCOPE_DEMO //#define V4_MINISCOPE #define V4_MINISCOPE_CONST_LED // --------------------------------------------- #defin...
4b856c68c031a26df88fb62cbe8b95d366b5324fad2e51c7b927a701e353fb5e
C
8,491
339
#include <stdio.h> #include <ctype.h> #include <stdlib.h> #include <string.h> #include "svm.h" #include "mex.h" #include "svm_model_matlab.h" #if MX_API_VER < 0x07030000 typedef int mwIndex; #endif #define CMD_LEN 2048 void read_sparse_instance(const mxArray *prhs, int index, struct svm_node *x) { int i, j, low, h...
b14555e84b4c62d6a30a8c7dc0dddd07e18f0f3dd55dd711b2d662ca3db9c6b5
C
8,523
341
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "linear.h" #include "mex.h" #include "linear_model_matlab.h" #ifdef MX_API_VER #if MX_API_VER < 0x07030000 typedef int mwIndex; #endif #endif #define CMD_LEN 2048 #define Malloc(type,n) (type *)malloc((n)*sizeof(type)) int print_null(const char *s...
3644c84a34aff86e68c30bbb5e36986b9d503e9898642f18f9251db83c001189
C
8,557
317
#include <stdlib.h> #include <stdio.h> #include <time.h> #include <mex.h> #include <math.h> #include "matrix.h" #define delta 1e-12 /* Euclidean Projection onto l1 Ball (eplb) min 1/2 ||x- y||_2^2 s.t. ||x||_1 <= z which is converted to the following zero finding problem f(lambda)= sum...
60fb80c83834fb5ba9dba872062d31063654a88aa3afdf0081890c94df9c4c65
C
8,696
405
#include <float.h> #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <string.h> void exit_with_help() { printf( "Usage: svm-scale [options] data_filename\n" "options:\n" "-l lower : x scaling lower limit (default -1)\n" "-u upper : x scaling upper limit (default +1)\n" "-y y_lower y_upper : y sc...
a7a9f12471dc622f2c15eedf286c709b4763412d6f0891f0967531747c6f57f0
C
9,058
345
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "svm.h" #include "mex.h" #include "svm_model_matlab.h" #if MX_API_VER < 0x07030000 typedef int mwIndex; #endif #define CMD_LEN 2048 void read_sparse_instance(const mxArray *prhs, int index, struct svm_node *x) { int i, j, low, high; mwIndex *ir, ...
220c309fa3cd2d2ad8a3e1873421682841f6e74a76315b3d841daa6e7876b4a2
C
9,072
345
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "svm.h" #include "mex.h" #include "svm_model_matlab.h" #if MX_API_VER < 0x07030000 typedef int mwIndex; #endif #define CMD_LEN 2048 void read_sparse_instance(const mxArray *prhs, int index, struct svm_node *x) { int i, j, low, high; mwIndex *ir, ...
8702a4f12cfdae3b6fe7516bd5999395e4aa054803512033297cbd7725bbb79e
C
9,093
279
#define PY_SSIZE_T_CLEAN #include <Python.h> #include <math.h> #define NO_IMPORT_ARRAY #define NO_IMPORT_UFUNC #define PY_ARRAY_UNIQUE_SYMBOL shapely_ARRAY_API #define PY_UFUNC_UNIQUE_SYMBOL shapely_UFUNC_API #include <numpy/ndarraytypes.h> #include <numpy/npy_3kcompat.h> #include <numpy/ufuncobject.h> #include "fas...
11fcab9f52de774c86b09df8d4b0eb552c14c553b67d9b019c7ad4c7aad2f9f8
C
9,174
394
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include <errno.h> #include "svm.h" #define Malloc(type,n) (type *)malloc((n)*sizeof(type)) void print_null(const char *s) {} void exit_with_help() { printf( "Usage: svm-train [options] training_set_file [model_file]\n" "options:\n" "-s...
8816831ca4768131e25984c7b20626dc31e8275f253f54beaba1df441053ae7e
C
9,284
284
#define PY_SSIZE_T_CLEAN #include <Python.h> #include <math.h> #define NO_IMPORT_ARRAY #define NO_IMPORT_UFUNC #define PY_ARRAY_UNIQUE_SYMBOL shapely_ARRAY_API #define PY_UFUNC_UNIQUE_SYMBOL shapely_UFUNC_API #include <numpy/ndarraytypes.h> #include <numpy/npy_3kcompat.h> #include <numpy/ufuncobject.h> #include "fas...
4c39392041fd52ee15ab6f5702b480cc1c5601d3db67d0efa6b821c36c6bc310
C
9,297
349
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "../svm.h" #include "mex.h" #include "svm_model_matlab.h" #ifdef MX_API_VER #if MX_API_VER < 0x07030000 typedef int mwIndex; #endif #endif #define CMD_LEN 2048 void read_sparse_instance(const mxArray *prhs, int index, struct svm_node *x) { int i, ...
caaab70b1ac88088ae5972428e0e76393bc7acbc9cf4e2a982e04d0cc21d4023
C
9,315
423
#include <stdlib.h> #include <string.h> #include "svm.h" #include "mex.h" #if MX_API_VER < 0x07030000 typedef int mwIndex; #endif #define NUM_OF_RETURN_FIELD 11 #define Malloc(type,n) (type *)malloc((n)*sizeof(type)) static const char *field_names[] = { "Parameters", "nr_class", "totalSV", "rho", "w2", "Lab...
9d5b92c5c5b2d44f47848fff1e3d4d33ded77c5cee76b3ef308ee9d7cf9b3339
C
9,322
269
#define PY_SSIZE_T_CLEAN #include <Python.h> #include <math.h> #define NO_IMPORT_ARRAY #define NO_IMPORT_UFUNC #define PY_ARRAY_UNIQUE_SYMBOL shapely_ARRAY_API #define PY_UFUNC_UNIQUE_SYMBOL shapely_UFUNC_API #include <numpy/ndarraytypes.h> #include <numpy/npy_3kcompat.h> #include <numpy/ufuncobject.h> #include "fas...
c114ef436c993423f08f51e3c63ca86a7867e3404f9233e526e2ea0ff6e39032
C
9,422
311
/******************************************************************************* ** ArrayOperations.c ** Part of the mutual information toolbox ** ** Contains functions to floor arrays, and to merge arrays into a joint ** state. ** ** Author: Adam Pocock ** Created 17/2/2010 ** Updated - 22/02/2014 - Added checking on...
8196ea7cb359d53e3373e6fd0d4cfe858ff6397e40f18d59477295a0785395dd
C
9,477
269
#define PY_SSIZE_T_CLEAN #include <Python.h> #include <math.h> #define NO_IMPORT_ARRAY #define NO_IMPORT_UFUNC #define PY_ARRAY_UNIQUE_SYMBOL shapely_ARRAY_API #define PY_UFUNC_UNIQUE_SYMBOL shapely_UFUNC_API #include <numpy/ndarraytypes.h> #include <numpy/npy_3kcompat.h> #include <numpy/ufuncobject.h> #include "fas...
3790767862b809c960fe2bf3b9200aafe240e812bdd254a90c4bb38b40756d40
C
9,533
385
/* * $Id: mat2file.c 7510 2019-01-02 15:06:12Z guillaume $ * John Ashburner */ #define _LARGEFILE_SOURCE #define _LARGEFILE64_SOURCE #define _FILE_OFFSET_BITS 64 #include <math.h> #include <fcntl.h> #include <sys/stat.h> #include <stdlib.h> #include <stdio.h> #include "mex.h" #ifdef SPM_WIN32 #include <windows.h> ...
15a7535d83af4aa78d7223f341943578d3bf6fbabc0630d565af5ca61dd65973
C
9,784
291
#define PY_SSIZE_T_CLEAN #include <Python.h> #include <math.h> #define NO_IMPORT_ARRAY #define NO_IMPORT_UFUNC #define PY_ARRAY_UNIQUE_SYMBOL shapely_ARRAY_API #define PY_UFUNC_UNIQUE_SYMBOL shapely_UFUNC_API #include <numpy/ndarraytypes.h> #include <numpy/npy_3kcompat.h> #include <numpy/ufuncobject.h> #include "fas...
59376a0108c27e512de5f1a24581ed2aeb66748579328f09d994457605ee444c
C
9,948
265
#define PY_SSIZE_T_CLEAN #include <Python.h> #include <math.h> #define NO_IMPORT_ARRAY #define NO_IMPORT_UFUNC #define PY_ARRAY_UNIQUE_SYMBOL shapely_ARRAY_API #define PY_UFUNC_UNIQUE_SYMBOL shapely_UFUNC_API #include <numpy/ndarraytypes.h> #include <numpy/npy_3kcompat.h> #include <numpy/ufuncobject.h> #include "fas...
1dfb561656ad0fa3e35f00d613f6b60c6a2979bac518b487f34bc07f99570d67
C
10,284
285
#define PY_SSIZE_T_CLEAN #include <Python.h> #include <math.h> #define NO_IMPORT_ARRAY #define NO_IMPORT_UFUNC #define PY_ARRAY_UNIQUE_SYMBOL shapely_ARRAY_API #define PY_UFUNC_UNIQUE_SYMBOL shapely_UFUNC_API #include <numpy/ndarraytypes.h> #include <numpy/npy_3kcompat.h> #include <numpy/ufuncobject.h> #include "fas...
ac33e9915ed7f4bee36b57575aa90b8d22d8c9cd09fdaff7d66230a2e9b2d198
C
10,296
292
#define PY_SSIZE_T_CLEAN #include <Python.h> #include <math.h> #define NO_IMPORT_ARRAY #define NO_IMPORT_UFUNC #define PY_ARRAY_UNIQUE_SYMBOL shapely_ARRAY_API #define PY_UFUNC_UNIQUE_SYMBOL shapely_UFUNC_API #include <numpy/ndarraytypes.h> #include <numpy/npy_3kcompat.h> #include <numpy/ufuncobject.h> #include "fas...
7a696fc25c8e097a071f38da387a3bad79b24078395c90e2605d2c2dfe1eefce
C
10,384
315
#define PY_SSIZE_T_CLEAN #include <Python.h> #include <math.h> #define NO_IMPORT_ARRAY #define NO_IMPORT_UFUNC #define PY_ARRAY_UNIQUE_SYMBOL shapely_ARRAY_API #define PY_UFUNC_UNIQUE_SYMBOL shapely_UFUNC_API #include <numpy/ndarraytypes.h> #include <numpy/npy_3kcompat.h> #include <numpy/ufuncobject.h> #include "fas...
12a0118179ca1052921f6020fd0c0c96555acb1912d18441f7a067e7e4c9a79e
C
11,118
347
/******************************************************************************* ** CalculateProbability.c ** Part of the mutual information toolbox ** ** Contains functions to calculate the probability of each state in the array ** and to calculate the probability of the joint state of two arrays ** ** Author: Adam P...
703e2aef37354ef06482df919835f9e660b02d7d342f50fddfde0db6a505299c
C
11,194
340
#define PY_SSIZE_T_CLEAN #include <Python.h> #include <math.h> #define NO_IMPORT_ARRAY #define NO_IMPORT_UFUNC #define PY_ARRAY_UNIQUE_SYMBOL shapely_ARRAY_API #define PY_UFUNC_UNIQUE_SYMBOL shapely_UFUNC_API #include <numpy/ndarraytypes.h> #include <numpy/npy_3kcompat.h> #include <numpy/ufuncobject.h> #include "fas...
40c7fd09342e7b6e6f4ad67ba0c4e0edacde653ac33a29f2a8a15119673d7122
C
11,255
467
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include "svm.h" #include "mex.h" #include "svm_model_matlab.h" #if MX_API_VER < 0x07030000 typedef int mwIndex; #endif #define CMD_LEN 2048 #define Malloc(type,n) (type *)malloc((n)*sizeof(type)) void exit_with_help() { mexPrintf( "Usa...
ed13bec9baf9b0dad61197fe7cec6f1d60f33ea25c9b33be266acb49f72b73fc
C
11,338
304
#define PY_SSIZE_T_CLEAN #include <Python.h> #include <math.h> #define NO_IMPORT_ARRAY #define NO_IMPORT_UFUNC #define PY_ARRAY_UNIQUE_SYMBOL shapely_ARRAY_API #define PY_UFUNC_UNIQUE_SYMBOL shapely_UFUNC_API #include <numpy/ndarraytypes.h> #include <numpy/npy_3kcompat.h> #include <numpy/ufuncobject.h> #include "fas...
d886d307e39c5aa5eb3fa1bf54aef89b3438c6236924d8eb2f8f53f051e5ff15
C
11,570
478
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include <errno.h> #include "linear.h" #define Malloc(type,n) (type *)malloc((n)*sizeof(type)) #define INF HUGE_VAL void print_null(const char *s) {} void exit_with_help() { printf( "Usage: train [options] training_set_f...
162d9735fe3e443b1ea2ba8116f74d9938120e06903856f24600ea24216d31a2
C
11,913
334
#define PY_SSIZE_T_CLEAN #include <Python.h> #include <math.h> #define NO_IMPORT_ARRAY #define NO_IMPORT_UFUNC #define PY_ARRAY_UNIQUE_SYMBOL shapely_ARRAY_API #define PY_UFUNC_UNIQUE_SYMBOL shapely_UFUNC_API #include <numpy/ndarraytypes.h> #include <numpy/npy_3kcompat.h> #include <numpy/ufuncobject.h> #include "fas...