Skip to content
Hillard28Public

About

Basic statistical models in C

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

38 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

cstat

Basic statistical models in C

If X and y variables are NumPy arrays, you need to apply numpy.ravel() with order='C' to both, prior to computing coefficients and intercept. This is because matrices are treated as 1-dimensional arrays and indexed based on row and column stride. C code assumes row-major (C standard) order, which should be the NumPy default as well.

What is currently implemented is a standard logistic regression optimized using full or stochastic gradient descent. The stochastic gradient descent algorithm currently only supports a batch-size of 1.

Planned: optimization of full gradient descent (currently loses out to a NumPy-native, vectorized implementation), mini-batches for stochastic gradient descent, and implementation of the SAG/SAGA algorithms for gradient descent.

About

Basic statistical models in C

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages