1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.hipparchus.stat;
18
19 import java.util.Locale;
20
21 import org.hipparchus.exception.Localizable;
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36 public enum LocalizedStatFormats implements Localizable {
37
38
39 TIES_ARE_NOT_ALLOWED("Ties are not allowed."),
40
41
42 INSUFFICIENT_DATA_FOR_T_STATISTIC("insufficient data for t statistic, needs at least 2, got {0}"),
43
44
45 NOT_ENOUGH_DATA_REGRESSION("the number of observations is not sufficient to conduct regression"),
46
47
48 INVALID_REGRESSION_OBSERVATION("length of regressor array = {0} does not match the number of variables = {1} in the model"),
49
50
51 NOT_ENOUGH_DATA_FOR_NUMBER_OF_PREDICTORS("not enough data ({0} rows) for this many predictors ({1} predictors)"),
52
53
54 NOT_SUPPORTED_NAN_STRATEGY("NaN strategy {0} not supported"),
55
56
57 NO_REGRESSORS("Regression model must include at least one regressor"),
58
59
60 COVARIANCE_MATRIX("covariance matrix"),
61
62
63 OUT_OF_BOUNDS_QUANTILE_VALUE("out of bounds quantile value: {0}, must be in (0, 100]"),
64
65
66 OUT_OF_BOUNDS_CONFIDENCE_LEVEL("out of bounds confidence level {0}, must be between {1} and {2}"),
67
68
69 OUT_OF_BOUND_SIGNIFICANCE_LEVEL("out of bounds significance level {0}, must be between {1} and {2}"),
70
71
72 SIGNIFICANCE_LEVEL("significance level ({0})"),
73
74
75 TOO_MANY_REGRESSORS("too many regressors ({0}) specified, only {1} in the model"),
76
77
78 TWO_OR_MORE_CATEGORIES_REQUIRED("two or more categories required, got {0}"),
79
80
81 TWO_OR_MORE_VALUES_IN_CATEGORY_REQUIRED("two or more values required in each category, one has {0}"),
82
83
84 ILLEGAL_STATE_PCA("you must fit the PCA projection before calling {0}");
85
86
87 private final String sourceFormat;
88
89
90
91
92
93
94
95 LocalizedStatFormats(final String sourceFormat) {
96 this.sourceFormat = sourceFormat;
97 }
98
99
100 @Override
101 public String getSourceString() {
102 return sourceFormat;
103 }
104
105
106 @Override
107 public String getLocalizedString(final Locale locale) {
108 return getLocalizedString("assets/" + LocalizedStatFormats.class.getName().replaceAll("\\.", "/"),
109 name(), locale);
110 }
111
112 }