'Spark Java: How can we access the p Values in UnivariateFeatureSelector
I am using Spark 3.1.3 and I am trying to take the pValues from the result dataframe of UnivariateFeatureSelector.
UnivariateFeatureSelector selector = new UnivariateFeatureSelector()
.setFeatureType("continuous")
.setLabelType("categorical")
.setSelectionMode("fdr")
.setSelectionThreshold(0.25)
.setFeaturesCol("inten")
.setLabelCol("group")
.setOutputCol("selfeat");
UnivariateFeatureSelectorModel ufsmodel = selector.fit(expaftervector);
Dataset<Row> result = ufsmodel.transform(expaftervector);
I checked the methods it offers but I can only get the indices of the selected features.
System.out.println("Selected Features");
System.out.println(Arrays.toString(ufsmodel.selectedFeatures()));
Is there any way I can get the pValues of the selected features?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
