calculate_stability function

Calculate Concept Stability