×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Java
Posted by: Hong Tsai
Added: Dec 15, 2022 8:31 AM
Views: 0
Tags: sdfsdf
  1.        Dataset<Row> featuresDf = selectFeatures(sourceDf);
  2.  
  3.         if(isFilterInactiveItems){
  4.             featuresDf = filterInactiveItems(featuresDf, endDateStr);
  5.         }
  6.         featuresDf = addPlacementId(featuresDf);
  7.         if (clType.equals("calibrated_aposteriori_ctr")) {
  8.             featuresDf = featuresDf.withColumn("is_easy",(featuresDf.col("calibrated_aposteriori_ctr").$greater(lit(4.0))
  9.                     .or(featuresDf.col("calibrated_aposteriori_ctr").$less(lit(0.8)))).cast("float"));
  10.         }