Term scoring and classification

seaice.SeaIceConnector.calculateConsensus(u, d, t, U_sum, D_sum)[source]

Calcluate consensus score. This is a heuristic for the percentage of the community who finds a term useful. Based on the observation that not every user will vote on a given term, user reptuation is used to estimate consensus. As the number of voters approaches the number of users, the votes become more equitable. (See doc/Scoring.pdf for details.)

  • u – Number of up voters.
  • d – Number of donw voters.
  • t – Number of total users.
  • U_sum – Sum of up-voter reputation.
  • D_sum – Sum of down-voter reputation.
seaice.SeaIceConnector.calculateStability(S, p_S, T_now, T_last, T_stable)[source]

Calculate term stability, returning the time point when the term become stable (as a datetime.datetime) or None if it’s not stable. This is based on the rate of change of the consensus score:

delta_S = (S - P_s) / (T_now - T_last)
  • T_now (datetime.datetime) – Current time.
  • T_last (datetime.datetime or None) – Time of last consensus score calculation.
  • T_stable – Time since term stabilized.
  • S (float) – Consensus score at T_now.
  • p_S (float) – Consensus score at T_last.
seaice.SeaIceConnector.stabilityError = 0.1

The maximum varation in consensus allowed for score to be considered stable (S/hour).

seaice.SeaIceConnector.stabilityFactor = 3600

Convert seconds (datetime.timedelta.seconds) to hours.

seaice.SeaIceConnector.stabilityInterval = 1

Interval (in hours) for which a term must be stable in order to be classified.

seaice.SeaIceConnector.stabilityConsensusIntervalHigh = 0.75

Classify stable term as canonical.

seaice.SeaIceConnector.stabilityConsensusIntervalLow = 0.25

Classify stable term as deprecated.

Previous topic

The pretty module

Next topic

Top level programs sea and ice

This Page