jiangxin369 commented on code in PR #187: URL: https://github.com/apache/flink-ml/pull/187#discussion_r1037760329
########## docs/content/docs/operators/feature/univariategeatureselector.md: ########## @@ -0,0 +1,220 @@ +--- +title: "Univariate Feature Selector" +weight: 1 +type: docs +aliases: +- /operators/feature/univariatefeatureselector.html +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +## Univariate Feature Selector +Univariate Feature Selector is an algorithm that selects features based on +univariate statistical tests against labels. + +Currently, Flink supports three Univariate Feature Selectors: chi-squared, +ANOVA F-test and F-value. User can choose Univariate Feature Selector by +setting `featureType` and `labelType`, and Flink will pick the score function +based on the specified `featureType` and `labelType`. + +The following combination of `featureType` and `labelType` are supported: + +<ul> + <li>`featureType` `categorical` and `labelType` `categorical`: Flink uses + chi-squared, i.e. chi2 in sklearn. + <li>`featureType` `continuous` and `labelType` `categorical`: Flink uses + ANOVA F-test, f_classif in sklearn. + <li>`featureType` `continuous` and `labelType` `continuous`: Flink uses + F-value, i.e. f_regression in sklearn. +</ul> + Review Comment: Sure, but why not keep consistent with Javadoc just like `VectorAssembler` and `FeatureHasher`? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
