Package org.apache.spark.mllib.stat.test
Interface TestResult<DF>
- Type Parameters:
DF
- Return type ofdegreesOfFreedom
.
- All Known Implementing Classes:
ChiSqTestResult
,KolmogorovSmirnovTestResult
public interface TestResult<DF>
Trait for hypothesis test results.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the degree(s) of freedom of the hypothesis test.Null hypothesis of the test.double
pValue()
The probability of obtaining a test statistic result at least as extreme as the one that was actually observed, assuming that the null hypothesis is true.double
Test statistic.toString()
String explaining the hypothesis test result.
-
Method Details
-
degreesOfFreedom
DF degreesOfFreedom()Returns the degree(s) of freedom of the hypothesis test. Return type should be Number(e.g. Int, Double) or tuples of Numbers for toString compatibility.- Returns:
- (undocumented)
-
nullHypothesis
String nullHypothesis()Null hypothesis of the test.- Returns:
- (undocumented)
-
pValue
double pValue()The probability of obtaining a test statistic result at least as extreme as the one that was actually observed, assuming that the null hypothesis is true.- Returns:
- (undocumented)
-
statistic
double statistic()Test statistic.- Returns:
- (undocumented)
-
toString
String toString()String explaining the hypothesis test result. Specific classes implementing this trait should override this method to output test-specific information.
-