scalaglm
package scalaglm
- Alphabetic
- Public
- All
Type Members
-
case class
Glm
(y: DenseVector[Double], Xmat: DenseMatrix[Double], colNames: Seq[String], fam: GlmFamily, addIntercept: Boolean = true, its: Int = 50) extends Model with Product with Serializable
Generalised linear regression modelling
Generalised linear regression modelling
- y
Vector of responses
- Xmat
Covariate matrix
- colNames
List of covariate names
- fam
Observation model. eg. LogisticGlm or PoissonGlm
- addIntercept
Add an intercept term to the covariate matrix?
- its
Max iterations for the IRLS algorithm (default 50)
- returns
An object of type Glm with many useful methods providing information about the regression fit, including .coefficients, .p and .summary
-
sealed
trait
GlmFamily
extends AnyRef
Trait for simple one-parameter exponential family observation models.
-
case class
Lm
(y: DenseVector[Double], Xmat: DenseMatrix[Double], colNames: Seq[String], addIntercept: Boolean = true) extends Model with Product with Serializable
Linear regression modelling
Linear regression modelling
- y
Vector of responses
- Xmat
Covariate matrix
- colNames
List of covariate names
- addIntercept
Add an intercept term to the covariate matrix?
- returns
An object of type Lm with many useful attributes providing information about the regression fit
- trait Model extends AnyRef
-
case class
Pca
(mat: DenseMatrix[Double], colNames: Seq[String]) extends Product with Serializable
Principal components analysis
Principal components analysis
Computed using SVD of the centred data matrix rather than from the spectral decomposition of the covariance matrix. eg. More like the R function "prcomp" than the R function "princomp".
NOTE: .loadings are transposed relative to the PCA function in Breeze
- mat
Data matrix with rows corresponding to observations and columns corresponding to variables
- colNames
Sequence of column names of mat
- returns
An object of type Pca with methods such as .loadings, .scores, .sdev and .summary
- trait Predict extends AnyRef
-
case class
PredictGlm
(mod: Glm, newX: DenseMatrix[Double], response: Boolean) extends Predict with Product with Serializable
Prediction from a fitted linear (Glm) model
Prediction from a fitted linear (Glm) model
- mod
fitted generalised linear model
- newX
covariate matrix for predictions
- response
predictions on the response scale?
- returns
An object of type PredictGlm with several useful attributes, including .fitted and .se
-
case class
PredictLm
(mod: Lm, newX: DenseMatrix[Double]) extends Predict with Product with Serializable
Prediction from a fitted linear (Lm) model
Prediction from a fitted linear (Lm) model
- mod
fitted linear model
- newX
covariate matrix for predictions
- returns
An object of type PredictLm with several useful attributes, including .fitted and .se
Value Members
- object Glm extends Serializable
- object Irls
- object Lm extends Serializable
-
object
LogisticGlm
extends GlmFamily with Product with Serializable
GlmFamily object for logistic regression
- object Pca extends Serializable
-
object
PoissonGlm
extends GlmFamily with Product with Serializable
GlmFamily object for Poisson regression
- object Utils