class GoodnessOfFit_CS extends Error
The GoodnessOfFit_CS
class is used to fit data to probability distributions.
Choosing the number of 'intervals' can be challenging and can affect the result:
Suggestions: each interval should have 'E_i = n*p_i >= 5' and intervals >= sqrt (n).
It uses the Chi-square goodness of fit test with equal width intervals.
- See also
www.eg.bucknell.edu/~xmeng/Course/CS6337/Note/master/node66.html Compute the following for each interval and sum over all intervals. (O_i - E_i)^2 / E_i where O_i and E_i are the observed and expected counts for interval 'i', respectively.
- Alphabetic
- By Inheritance
- GoodnessOfFit_CS
- Error
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
GoodnessOfFit_CS(d: VectorD, dmin: Double, dmax: Double, intervals: Int = 10)
- d
the sample data points/vector
- dmin
the minimum value for d
- dmax
the maximum value for d
- intervals
the number of intervals for the data's histogram
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( ... ) @native() @HotSpotIntrinsicCandidate()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
fit(rv: Variate, met: Metric = pearson): Boolean
Perform a Chi-square goodness of fit test, matching the histogram of the given data 'd' with the random variable's probability function 'pf' (pdf).
Perform a Chi-square goodness of fit test, matching the histogram of the given data 'd' with the random variable's probability function 'pf' (pdf).
- rv
the random variate to test
- met
the discrepancy metric to use (defaults to pearson)
-
def
fit2(d2: VectorD, met: Metric = pearson): Boolean
Perform a Chi-square goodness of fit test, matching the histograms of the given data 'd' with an alternative data-set/vector 'd2'.
Perform a Chi-square goodness of fit test, matching the histograms of the given data 'd' with an alternative data-set/vector 'd2'.
- d2
the alternate data set
- met
the discrepancy metric to use (defaults to pearson)
-
def
fit3(d2: VectorD, met: Metric = pearson): Boolean
Perform a Chi-square goodness of fit test, matching the counts of the given data 'd' with an alternative data-set/vector 'd2'.
Perform a Chi-square goodness of fit test, matching the counts of the given data 'd' with an alternative data-set/vector 'd2'.
- d2
the alternate data set
- met
the discrepancy metric to use (defaults to pearson)
-
final
def
flaw(method: String, message: String): Unit
- Definition Classes
- Error
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
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()
-
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( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated