MCPcopy Create free account

hub / github.com/al-jshen/compute / functions

Functions442 in github.com/al-jshen/compute

↓ 65 callersMethodsample_n
Generates a vector of `n` randomly sampled values from the given probability distribution.
src/distributions/mod.rs:32
↓ 28 callersMethodto_vec
Converts the matrix to a Vector.
src/linalg/array/matrix.rs:436
↓ 21 callersMethodinto_iter
(self)
src/linalg/array/vec.rs:139
↓ 15 callersFunctionis_matrix
(m: &[f64], nrows: usize)
src/linalg/utils.rs:47
↓ 15 callersFunctionmatmul
( a: &[f64], b: &[f64], rows_a: usize, rows_b: usize, transpose_a: bool, transpose_b:
src/linalg/utils.rs:362
↓ 15 callersFunctionmean
Calculates the mean of an array of data points.
src/statistics/moments.rs:37
↓ 13 callersFunctiongamma
Calculates the [Gamma function](https://en.wikipedia.org/wiki/Gamma_function) using the [Lanczos approximation](https://en.wikipedia.org/wiki/Lanczos_
src/functions/gamma.rs:31
↓ 13 callersMethodsample
Samples from the given T distribution.
src/distributions/t.rs:38
↓ 11 callersMethodt
Transpose the matrix.
src/linalg/array/matrix.rs:412
↓ 11 callersFunctiontranspose
Transpose a matrix.
src/linalg/utils.rs:158
↓ 10 callersFunctiondot
(x: &[f64], y: &[f64])
src/linalg/utils.rs:570
↓ 10 callersFunctionis_square
(m: &[f64])
src/linalg/utils.rs:58
↓ 8 callersMethodshape
Get the number of rows and columns in the matrix.
src/linalg/array/matrix.rs:282
↓ 7 callersFunctioninvert_matrix
Given an n by n matrix, invert it. The resulting matrix is returned as a flattened array.
src/linalg/utils.rs:183
↓ 7 callersFunctionmatmul_blocked
Performs blocked matrix multiplication with block size `bsize`. See the API for the [matmul](crate::linalg::matmul).
src/linalg/utils.rs:314
↓ 6 callersFunctioncholesky
Computes the Cholesky decomposition of the matrix `a` using the Cholesky-Banachiewicz algorithm.
src/linalg/decomposition/cholesky.rs:9
↓ 6 callersMethodextend
(&mut self, iter: T)
src/linalg/array/vec.rs:183
↓ 6 callersFunctionlinspace
Generates evenly spaced values within a given interval, with a set number of points. Both the start and stop points are included.
src/linalg/utils.rs:38
↓ 6 callersFunctionmax
Returns the largest element in the array.
src/statistics/order.rs:9
↓ 6 callersMethodsize
Get the total number of elements in the matrix.
src/linalg/array/matrix.rs:287
↓ 6 callersMethodto_matrix
(self)
src/linalg/array/vec.rs:66
↓ 5 callersFunctionarange
Generates evenly spaced values within a given interval. Values generated in the half-open interval [start, stop). That is, the stop point is not inclu
src/linalg/utils.rs:29
↓ 5 callersMethoddeviance
Return the deviance of the model.
src/predict/glms/glm.rs:247
↓ 5 callersFunctionlu
Computes the pivoted LU decomposition of a square matrix. For some matrix A, this decomposition is A = PLU. The resulting matrix has U in its upper tr
src/linalg/decomposition/lu.rs:14
↓ 5 callersMethodreshape
(&self, nrows: i32, ncols: i32)
src/linalg/array/vec.rs:71
↓ 5 callersFunctionsolve
Solve the linear system Ax = b.
src/linalg/utils.rs:274
↓ 5 callersFunctionvar
Calculates the population variance from an array of data points in a numerically stable manner using the Welford algorithm.
src/statistics/moments.rs:49
↓ 4 callersMethoddiag
Get the diagonal elements of the matrix.
src/linalg/array/matrix.rs:243
↓ 4 callersMethodlu
(&self)
src/linalg/array/matrix.rs:163
↓ 4 callersMethodlu_solve
Solve the linear system Ax = b given a LU decomposed matrix A. The first argument should be a tuple, where the first element is the LU decomposed matr
src/linalg/array/matrix.rs:526
↓ 4 callersFunctionrow_to_col_major
Convert a 1D matrix from row-major ordering into column-major ordering.
src/linalg/utils.rs:134
↓ 3 callersMethodcholesky
Return the Cholesky decomposition of the matrix. Resulting matrix is lower triangular.
src/linalg/array/matrix.rs:143
↓ 3 callersFunctioncholesky_solve
Solves the system Lx=b, where L is a lower triangular matrix (e.g., a Cholesky decomposed matrix), and b is a one dimensional vector.
src/linalg/decomposition/cholesky.rs:32
↓ 3 callersFunctioncol_to_row_major
Convert a 1D matrix from column-major ordering into row-major ordering.
src/linalg/utils.rs:146
↓ 3 callersMethodinv_link
(&self, eta: &[f64])
src/predict/glms/families.rs:43
↓ 3 callersFunctionlu_solve
Solve the linear system Ax = b given a LU decomposed matrix A. The first argument should be a tuple, where the first element is the LU decomposed matr
src/linalg/decomposition/lu.rs:56
↓ 3 callersFunctionmin
A module for computing order statistics. This includes medians, quantiles, and extrema. Returns the smallest element in the array.
src/statistics/order.rs:4
↓ 3 callersFunctionnorm
Calculates the norm of a vector.
src/linalg/utils.rs:609
↓ 3 callersFunctionrbfkernel
(a: &Matrix, b: &Matrix, var: f64, lengthsq: f64)
examples/gp_regression/src/main.rs:81
↓ 3 callersMethodupdate
Update the coefficients of the polynomial regressor.
src/predict/polynomial.rs:21
↓ 3 callersFunctionwelford_statistics
Uses the Welford online algorithm to calculate the count, mean, and m2 of an array of data points. This is the driver for the `mean`, `variance`, and
src/statistics/moments.rs:23
↓ 2 callersFunctionacf
Calculates the autocorrelation of lag (-)k of a vector of time series data, assuming that the points are equally spaced in time.
src/timeseries/functions.rs:17
↓ 2 callersFunctionbinom_coeff
Calculates the [binomial coefficient](https://en.wikipedia.org/wiki/Binomial_coefficient) nCk for two integers `n` and `k`, with `n >= k`.
src/functions/combinatorial.rs:7
↓ 2 callersFunctionbootstrap
Given an array of data, returns `n_bootstrap` vectors, where each has elements that are drawn from the original array with replacement, and the length
src/validation/resample.rs:8
↓ 2 callersMethodcoef
Return the maximum likelihood estimates for the parameters.
src/predict/glms/glm.rs:238
↓ 2 callersMethodcompute_ddbeta
(&self, x: &[f64], dmu: &[f64], var: &[f64], weights: &[f64])
src/predict/glms/glm.rs:113
↓ 2 callersMethoddata
(&self)
src/linalg/array/vec.rs:30
↓ 2 callersFunctiondesign
Create a design matrix from a given matrix.
src/linalg/utils.rs:465
↓ 2 callersMethodget_col_as_vector
Return a copy of the column of the matrix as a Vector.
src/linalg/array/matrix.rs:362
↓ 2 callersMethodget_dim
(&self)
src/distributions/multivariatenormal.rs:61
↓ 2 callersMethodget_row_as_vector
Return a copy of the row of the matrix as a Vector.
src/linalg/array/matrix.rs:356
↓ 2 callersFunctionhist_bin_centers
Given the edges of some intervals, return the centers of the intervals. If `edges` is length n, then the resulting vector will be length n - 1.
src/statistics/hist.rs:5
↓ 2 callersMethodinf_norm
Calculates the infinity norm of the matrix.
src/linalg/array/matrix.rs:396
↓ 2 callersFunctioninterp1d_linear
( x: &[f64], y: &[f64], tgt: &[f64], extrapolate: ExtrapolationMode, )
src/functions/interpolate.rs:9
↓ 2 callersMethodinv
Invert the matrix.
src/linalg/array/matrix.rs:73
↓ 2 callersFunctionipiv_parity
Calculates the parity of a swap permutation array ipiv (e.g. that you get as an output from Lapack).
src/linalg/utils.rs:111
↓ 2 callersFunctionis_positive_definite
(m: &[f64])
src/linalg/utils.rs:96
↓ 2 callersFunctionjackknife
Given a length-n array of data, returns all leave-one-out length n-1 vectors. See <https://en.wikipedia.org/wiki/Jackknife_resampling>
src/validation/resample.rs:23
↓ 2 callersMethodoptimize
Run the optimization algorithm, given a vector of parameters to optimize and a function which calculates the residuals.
src/optimize/adam.rs:84
↓ 2 callersMethodpredict
Use the fitted model to make predictions on some new data.
src/predict/glms/glm.rs:300
↓ 2 callersMethodpredict
Predict n values ahead. For forecasts after the first forecast, uses previous forecasts as "data" to create subsequent forecasts.
src/timeseries/autoregressive.rs:58
↓ 2 callersMethodreshape_mut
Reshape the matrix in-place. A size of `-1` in either the rows or the columns means that the size for that dimension will be automatically determined
src/linalg/array/matrix.rs:293
↓ 2 callersMethodsample
Samples from the given Binomial distribution. For `np <= 30`, this is done with an inversion algorithm. Otherwise, this is done with the BTPE algorith
src/distributions/binomial.rs:46
↓ 2 callersMethodsample_matrix
Generates a matrix of size `n x m` with values randomly sampled from the given distribution.
src/distributions/mod.rs:37
↓ 2 callersMethodset_stepsize
(&mut self, stepsize: f64)
src/optimize/adam.rs:64
↓ 2 callersMethodsolve
Solve the linear system Ax = b using LU decomposition.
src/linalg/array/matrix.rs:553
↓ 2 callersFunctionsum
(x: &[f64])
src/linalg/utils.rs:501
↓ 2 callersMethodsum_cols
Sum the matrix down the columns.
src/linalg/array/matrix.rs:384
↓ 2 callersMethodsum_rows
Sum the matrix across the rows.
src/linalg/array/matrix.rs:375
↓ 2 callersFunctiontrapezoid
Integrate samples from a function
src/integrate/samples.rs:4
↓ 2 callersFunctionxtx
Given a matrix X with k rows, return X transpose times X, which is a symmetric matrix.
src/linalg/utils.rs:217
↓ 1 callersFunctionacovf
Calculates the autocovariance of lag (-)k of a vector of time series data, assuming that the points are equally spaced in time.
src/timeseries/functions.rs:5
↓ 1 callersMethodapply_dbeta_penalty
(&self, dbeta: &mut [f64], coef: &[f64])
src/predict/glms/glm.rs:129
↓ 1 callersMethodapply_ddbeta_penalty
(&self, ddbeta: &mut [f64], n_predictors: usize)
src/predict/glms/glm.rs:135
↓ 1 callersMethodargmax
Find the position of the largest element in the matrix. Returns (row, column).
src/linalg/array/matrix.rs:498
↓ 1 callersMethodargmin
Find the position of the smallest element in the matrix. Returns (row, column).
src/linalg/array/matrix.rs:492
↓ 1 callersMethodas_ref
(&self)
src/linalg/array/vec.rs:124
↓ 1 callersFunctionbackward_substitution
Solve a matrix equation of the form Ux=b, where U is an upper triangular matrix. See the [Wikipedia page](https://en.wikipedia.org/wiki/Triangular_mat
src/linalg/decomposition/substitution.rs:23
↓ 1 callersMethodbackward_substitution
Solve a matrix equation of the form Ux=b, where U is an upper triangular matrix. See the [Wikipedia page](https://en.wikipedia.org/wiki/Triangular_mat
src/linalg/array/matrix.rs:132
↓ 1 callersFunctionbeta
Calculates the [beta function](https://en.wikipedia.org/wiki/Beta_function) using the relationship between the beta function and the gamma function.
src/functions/gamma.rs:46
↓ 1 callersFunctionbinomial_btpe
(n: u64, p: f64)
src/distributions/binomial.rs:91
↓ 1 callersFunctionbinomial_inversion
(n: u64, p: f64)
src/distributions/binomial.rs:77
↓ 1 callersMethodcholesky_solve
(&self, system: &Vector)
src/linalg/array/matrix.rs:511
↓ 1 callersMethodcoef_covariance_matrix
Returns the fitted covariance for the estimated parameters.
src/predict/glms/glm.rs:283
↓ 1 callersMethodcoef_standard_error
Returns the estimated standard errors on the estimated parameters. This is equivalent to the square root of the diagonals of the covariance matrix.
src/predict/glms/glm.rs:293
↓ 1 callersMethodcompute_dbeta
( &self, x: &[f64], y: &[f64], mu: &[f64], dmu: &[f64], var: &
src/predict/glms/glm.rs:86
↓ 1 callersMethodd_inv_link
(&self, eta: &[f64], mu: &[f64])
src/predict/glms/families.rs:57
↓ 1 callersMethoddet
Calculates the determinant of the matrix using the LU decomposition.
src/linalg/array/matrix.rs:205
↓ 1 callersMethoddeviance
(&self, y: &[f64], mu: &[f64])
src/predict/glms/families.rs:71
↓ 1 callersFunctiondiag
(a: &[f64])
src/linalg/utils.rs:124
↓ 1 callersFunctiondiag_matrix
Create a diagonal matrix with the given elements along the elements.
src/linalg/utils.rs:173
↓ 1 callersMethoddiff
(&self)
src/linalg/array/vec.rs:87
↓ 1 callersFunctiondigamma
Calculates the [digamma function](https://en.wikipedia.org/wiki/Digamma_function), which is the logarithmic derivative of the gamma function. It obeys
src/functions/gamma.rs:54
↓ 1 callersMethoddispersion
Calculates the dispersion of the model.
src/predict/glms/glm.rs:269
↓ 1 callersFunctionerf
Calculates the [error function](https://en.wikipedia.org/wiki/Error_function) erf(x). # Remarks Uses Equation 7.1.26 in Stegun in combination with Ho
src/functions/statistical.rs:59
↓ 1 callersMethodfit
Fit the polynomial regressor to some observed data `y` given some explanatory variables `x`. Uses least squares fitting.
src/predict/polynomial.rs:42
↓ 1 callersMethodfit
Fit the GLM using the [scoring algorithm](https://en.wikipedia.org/wiki/Score_(statistics)#Scoring_algorithm), which gives the maximumum likelihood es
src/predict/glms/glm.rs:144
↓ 1 callersMethodfit
Fit the AR(p) model to the data using the Yule-Walker equations.
src/timeseries/autoregressive.rs:27
↓ 1 callersFunctionforward_substitution
Solve a matrix equation of the form Lx=b, where L is a lower triangular matrix. See the [Wikipedia page](https://en.wikipedia.org/wiki/Triangular_matr
src/linalg/decomposition/substitution.rs:7
↓ 1 callersMethodforward_substitution
Solve a matrix equation of the form Lx=b, where L is a lower triangular matrix. See the [Wikipedia page](https://en.wikipedia.org/wiki/Triangular_matr
src/linalg/array/matrix.rs:120
next →1–100 of 442, ranked by callers