research: tune the classifier inside `score_leadership_prospects` on a fiscal-year grouped fold

Abierto
#349 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python, scikit-learn

Línea de trabajo

Start in philanthropy/models/_upgrade.py at score_leadership_prospects to see which inner classifier settings are exposed, then read philanthropy/model_selection/_temporal_donor_splitter.py for FiscalYearGroupedSplitter. Run a small grid with that splitter, not a random split, and compare hit rates on the KDD98, DonorsChoose and PSID Results files via scripts/make_results_pages.py. Done means a changed default only if it wins on validation and loses on no test fold, or a recorded rejection with numbers. Comment on the issue before starting.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement help wanted roadmap
Goal

Check whether the leadership-upgrade model's inner classifier settings can be improved without leaking future years.

Acceptance criteria
  • Tune a small grid of MajorGiftClassifier settings with FiscalYearGroupedSplitter, never a random split. Start from tree shape (max_leaf_nodes, min_samples_leaf) and class_weight: the MajorGiftClassifier docstring already records that learning_rate=0.05, max_iter=300 scored the same as the defaults on a KDD Cup 1998 validation fold (response target, five seeds), because early stopping kicks in above 10,000 rows. Re-test those two only on the leadership target, where files are smaller.
  • Tune on the same rows the function trains on: build them with philanthropy.ingest.build_leadership_snapshots and fit MajorGiftClassifier directly. score_leadership_prospects takes no classifier settings (it builds MajorGiftClassifier(random_state=...) at philanthropy/models/_upgrade.py around lines 461 and 530).
  • Compare against the current defaults on the existing Results files (KDD98, DonorsChoose, PSID) on top-10% hit rate with intervals.
  • Change the default only if it wins on the validation fold and doesn't lose on the test fold of any file; otherwise record the rejection with numbers. A winning setting changes the two MajorGiftClassifier(...) calls in _upgrade.py, not MajorGiftClassifier's own defaults, which the response Results also depend on.
Scope

Tuning only. The report keys and the CLI output stay the same.

Where to start
  • philanthropy/models/_upgrade.py (score_leadership_prospects)
  • philanthropy/model_selection/_temporal_donor_splitter.py
  • scripts/make_results_pages.py
Dependencies
  • None

Phase order is a release plan, not a rule against picking up independent work early. Comment on this issue before you start so two people don't build the same thing.

Lenguaje dominante
Python
Estrellas
11
Forks
23
Merge medio
2 d 19 h
PR fusionados (30 d)
31

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de PhilanthroPy-Project/PhilanthroPy

Todos los issues de PhilanthroPy-Project/PhilanthroPy

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.