类 ChiSqTest
- java.lang.Object
-
- org.apache.flink.ml.stats.chisqtest.ChiSqTest
-
- 所有已实现的接口:
Serializable,org.apache.flink.ml.api.AlgoOperator<ChiSqTest>,org.apache.flink.ml.api.Stage<ChiSqTest>,org.apache.flink.ml.common.param.HasFeaturesCol<ChiSqTest>,org.apache.flink.ml.common.param.HasFlatten<ChiSqTest>,org.apache.flink.ml.common.param.HasLabelCol<ChiSqTest>,org.apache.flink.ml.param.WithParams<ChiSqTest>,ChiSqTestParams<ChiSqTest>
public class ChiSqTest extends Object implements org.apache.flink.ml.api.AlgoOperator<ChiSqTest>, ChiSqTestParams<ChiSqTest>
An AlgoOperator which implements the Chi-square test algorithm.Chi-square Test computes the statistics of independence of variables in a contingency table, e.g., p-value, and DOF(degree of freedom) for each input feature. The contingency table is constructed from the observed categorical values.
The input of this algorithm is a table containing a labelColumn of numerical type and a featuresColumn of vector type. Each index in the input vector represents a feature to be tested. By default, the output of this algorithm is a table containing a single row with the following columns, each of which has one value per feature.
- "pValues": vector
- "degreesOfFreedom": int array
- "statistics": vector
The output of this algorithm can be flattened to multiple rows by setting
HasFlatten.FLATTENto true, which would contain the following columns:- "featureIndex": int
- "pValue": double
- "degreeOfFreedom": int
- "statistic": double
See: http://en.wikipedia.org/wiki/Chi-squared_test.
- 另请参阅:
- 序列化表格
-
-
构造器概要
构造器 构造器 说明 ChiSqTest()
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 Map<org.apache.flink.ml.param.Param<?>,Object>getParamMap()static ChiSqTestload(org.apache.flink.table.api.bridge.java.StreamTableEnvironment tEnv, String path)voidsave(String path)org.apache.flink.table.api.Table[]transform(org.apache.flink.table.api.Table... inputs)
-
-
-
方法详细资料
-
transform
public org.apache.flink.table.api.Table[] transform(org.apache.flink.table.api.Table... inputs)
- 指定者:
transform在接口中org.apache.flink.ml.api.AlgoOperator<ChiSqTest>
-
save
public void save(String path) throws IOException
- 指定者:
save在接口中org.apache.flink.ml.api.Stage<ChiSqTest>- 抛出:
IOException
-
load
public static ChiSqTest load(org.apache.flink.table.api.bridge.java.StreamTableEnvironment tEnv, String path) throws IOException
- 抛出:
IOException
-
-