How FindU’s ML-powered college matching works
def calculate_match_score(student, school): # Start with neutral score base_score = 0.5 # Add dimensional bonuses academic_bonus = calculate_academic_fit(student, school) * 0.35 financial_bonus = calculate_financial_fit(student, school) * 0.25 campus_bonus = calculate_campus_fit(student, school) * 0.20 outcome_bonus = calculate_outcome_fit(student, school) * 0.20 final_score = base_score + academic_bonus + financial_bonus + campus_bonus + outcome_bonus return min(max(final_score, 0), 1) # Clamp to [0, 1]
def should_insert_probe(swipe_count, phase): if phase == "discovery": return swipe_count % 4 == 0 # 25% probes elif phase == "refinement": return swipe_count % 6 == 0 # 17% probes else: return swipe_count % 10 == 0 # 10% probes
class ThompsonSampler: def __init__(self): self.alpha = defaultdict(lambda: 1) # Successes self.beta = defaultdict(lambda: 1) # Failures def sample(self, school_id): # Draw from Beta distribution return np.random.beta( self.alpha[school_id], self.beta[school_id] ) def update(self, school_id, liked): if liked: self.alpha[school_id] += 1 else: self.beta[school_id] += 1
def update_weights(current_weights, swipe_data): learning_rate = get_learning_rate(swipe_count) for feature in features: gradient = calculate_gradient(feature, swipe_data) current_weights[feature] += learning_rate * gradient # Normalize weights total = sum(current_weights.values()) for feature in current_weights: current_weights[feature] /= total return current_weights
class SchoolCache: def __init__(self): self.cache = {} self.ttl = 86400 # 24 hours def get_schools(self): if self.is_expired(): self.refresh() return self.cache['schools']
POST /recommendations
POST /swipe
GET /match/{student_id}/{school_id}
def get_algorithm_variant(student_id): if hash(student_id) % 100 < 10: return "experimental" else: return "control"