Skip to content

Commit

Permalink
Add doc string
Browse files Browse the repository at this point in the history
  • Loading branch information
zeotuan committed Apr 19, 2024
1 parent 3b41e4c commit ac337ea
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ import scala.math.BigDecimal.RoundingMode
/**
* If a column is incomplete in the sample, we model its completeness as a binomial variable,
* estimate a confidence interval and use this to define a lower bound for the completeness
*
* @param minCompleteness : minimum completeness threshold to determine if rule should be applied
* @param maxCompleteness : maximum completeness threshold to determine if rule should be applied
*/
case class RetainCompletenessRule(minCompleteness: Double = 0.2, maxCompleteness: Double = 1.0, sensitivity: Double = 1.96) extends ConstraintRule[ColumnProfile] {
case class RetainCompletenessRule(minCompleteness: Double = 0.2, maxCompleteness: Double = 1.0) extends ConstraintRule[ColumnProfile] {
override def shouldBeApplied(profile: ColumnProfile, numRecords: Long): Boolean = {
profile.completeness > minCompleteness && profile.completeness < maxCompleteness
}
Expand Down

0 comments on commit ac337ea

Please sign in to comment.