class Fit extends QoF with Error
The Fit
class provides methods to determine basic Quality of Fit 'QoF' measures.
- Alphabetic
- By Inheritance
- Fit
- Error
- QoF
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Fit(y: VectoD, n: Int, dfm: Double, df: Double)
- y
the values in the m-dimensional response vector
- n
the number of parameters (b.dim)
- dfm
the degrees of freedom for model/regression
- df
the degrees of freedom for error
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def diagnose(e: VectoD, yy: VectoD, yp: VectoD, w: VectoD = null, ym_: Double = noDouble): Unit
Diagnose the health of the model by computing the Quality of Fit (QoF) measures, from the error/residual vector and the predicted & actual responses.
Diagnose the health of the model by computing the Quality of Fit (QoF) measures, from the error/residual vector and the predicted & actual responses. For some models the instances may be weighted.
- e
the m-dimensional error/residual vector (yy - yp)
- yy
the actual response/output vector to use (test/full)
- yp
the predicted response/output vector (test/full)
- w
the weights on the instances (defaults to null)
- ym_
the mean of the actual response/output vector to use (training/full)
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def f_(z: Double): String
Format a double value.
- def fit: VectoD
Return the Quality of Fit (QoF) measures corresponding to the labels given above in the 'fitLabel' method.
Return the Quality of Fit (QoF) measures corresponding to the labels given above in the 'fitLabel' method. Note, if 'sse > sst', the model introduces errors and the 'rSq' may be negative, otherwise, R^2 ('rSq') ranges from 0 (weak) to 1 (strong). Override to add more quality of fit measures.
- def fitLabel: Seq[String]
Return the labels for the Quality of Fit (QoF) measures.
- def fitMap: Map[String, String]
Build a map of quality of fit measures (use of
LinkedHashMap
makes it ordered).Build a map of quality of fit measures (use of
LinkedHashMap
makes it ordered).- Definition Classes
- QoF
- final def flaw(method: String, message: String): Unit
- Definition Classes
- Error
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def help: String
Return the help string that describes the Quality of Fit (QoF) measures provided by the
Fit
class. - final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def ll(ms: Double = mse0, s2: Double = sig2e, m2: Int = m): Double
The log-likelihood function times -2.
The log-likelihood function times -2. Override as needed.
- ms
raw Mean Squared Error
- s2
MLE estimate of the population variance of the residuals
- See also
www.stat.cmu.edu/~cshalizi/mreg/15/lectures/06/lecture-06.pdf
www.wiley.com/en-us/Introduction+to+Linear+Regression+Analysis%2C+5th+Edition-p-9780470542811 Section 2.11
- def mse_: Double
Return the mean of squares for error (sse / df._2).
Return the mean of squares for error (sse / df._2). Must call diagnose first.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def resetDF(df_update: PairD): Unit
Reset the degrees of freedom to the new updated values.
Reset the degrees of freedom to the new updated values. For some models, the degrees of freedom is not known until after the model is built.
- df_update
the updated degrees of freedom (model, error)
- var sig2e: Double
- Attributes
- protected
- def summary(b: VectoD, stdErr: VectoD, vf: VectoD, show: Boolean = false): String
Produce a summary report with diagnostics for each predictor 'x_j' and the overall quality of fit.
Produce a summary report with diagnostics for each predictor 'x_j' and the overall quality of fit.
- b
the parameters/coefficients for the model
- vf
the Variance Inflation Factors (VIFs)
- show
flag indicating whether to print the summary
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated