o

scalaglm

# Basis 

#### object Basis

Linear Supertypes
AnyRef, Any
Ordering
1. Alphabetic
2. By Inheritance
Inherited
1. Basis
2. AnyRef
3. Any
1. Hide All
2. Show All
Visibility
1. Public
2. All

### Value Members

1. final def !=(arg0: Any): Boolean
Definition Classes
AnyRef → Any
2. final def ##(): Int
Definition Classes
AnyRef → Any
3. final def ==(arg0: Any): Boolean
Definition Classes
AnyRef → Any
4. final def asInstanceOf[T0]: T0
Definition Classes
Any
5. def bs(x: DenseVector[Double], degree: Int = 3, intercept: Boolean = false)(intKnots: Seq[Double] = List(), lb: Double = min(x), ub: Double = max(x)): DenseMatrix[Double]

Construct a B-spline covariate matrix using input vector `x`.

Construct a B-spline covariate matrix using input vector `x`.

x

A covariate vector.

degree

The degree of the required B-spline basis (3 for cubic, default).

intercept

Include first basis function?

intKnots

Interior knots.

lb

Lower boundary knot.

ub

Upper boundary knot.

6. def bspline(x: Double, i: Int, deg: Int, knots: Vector[Double]): Double

B-spline basis function.

B-spline basis function. Evaluated using the de Boor recurrence.

x

The argument of the B-spline function.

i

The index of the B-spline function (starting from 0).

deg

The degree of the B-spline.

knots

The knot sequence.

returns

The value of the B-spline function at `x`.

7. def clone()
Attributes
protected[lang]
Definition Classes
AnyRef
Annotations
@throws( ... ) @native()
8. def cosine(x: Double, j: Int): Double

Cosine orthogonal basis function.

Cosine orthogonal basis function. Normalised with sqrt(2).

x

The argument of the cosine function, nominally between 0 and 1.

j

The order of the basis function (assumed >= 1).

returns

The value of the cosine basis function at `x`.

9. def cosine(x: DenseVector[Double], n: Int): DenseMatrix[Double]

Construct a cosine series basis matrix with `n` columns using input vector `x`.

Construct a cosine series basis matrix with `n` columns using input vector `x`.

x

A covariate vector.

n

The number of cosine series basis functions required.

returns

A matrix with rows matching the length of `x` and `n` columns.

10. final def eq(arg0: AnyRef): Boolean
Definition Classes
AnyRef
11. def equals(arg0: Any): Boolean
Definition Classes
AnyRef → Any
12. def finalize(): Unit
Attributes
protected[lang]
Definition Classes
AnyRef
Annotations
@throws( classOf[java.lang.Throwable] )
13. final def getClass(): Class[_]
Definition Classes
AnyRef → Any
Annotations
@native()
14. def hashCode(): Int
Definition Classes
AnyRef → Any
Annotations
@native()
15. final def isInstanceOf[T0]: Boolean
Definition Classes
Any
16. def legendre(x: Double, n: Int): Double

Legendre orthogonal polynomial function.

Legendre orthogonal polynomial function. Evaluated using Bonnet's recursion.

x

The argument of the polynomial, nominally between -1 and 1.

n

The degree of the polynomial.

returns

The value of the `n`th polynomial at `x`.

17. final def ne(arg0: AnyRef): Boolean
Definition Classes
AnyRef
18. final def notify(): Unit
Definition Classes
AnyRef
Annotations
@native()
19. final def notifyAll(): Unit
Definition Classes
AnyRef
Annotations
@native()
20. def poly(x: DenseVector[Double], degree: Int, raw: Boolean = false): DenseMatrix[Double]

Construct a polynomial basis matrix with `degree` columns using input vector `x`.

Construct a polynomial basis matrix with `degree` columns using input vector `x`. Defaults to orthogonal Legendre polynomials, but `raw` monomials can be requested.

x

A covariate vector.

degree

The maximum degree of the polynomial basis.

raw

Raw monomial basis (true) or orthogonal polynomials (false, default).

returns

A matrix with rows matching the length of `x` and `degree` columns.

21. final def synchronized[T0](arg0: ⇒ T0): T0
Definition Classes
AnyRef
22. def toString(): String
Definition Classes
AnyRef → Any
23. final def wait(): Unit
Definition Classes
AnyRef
Annotations
@throws( ... )
24. final def wait(arg0: Long, arg1: Int): Unit
Definition Classes
AnyRef
Annotations
@throws( ... )
25. final def wait(arg0: Long): Unit
Definition Classes
AnyRef
Annotations
@throws( ... ) @native()