← Back to KivaScore

KivaScore Technical Methodology

KivaScore calculates repayment likelihood and estimated social impact independently. The repayment pipeline is a supervised machine-learning model. The impact pipeline combines three structured rubric classifiers with one deterministic vulnerability module.

1. Repayment Score

Target and output

The deployed model is an XGBClassifier with a binary logistic objective. It estimates default probability. The site displays:

Repayment Score = 100 × (1 − predicted default probability)

Deployed feature set

The following fields are read directly from the deployed xgboost_deployable_pipeline.joblib.

GroupFeatures
Loanloan_amount, repayment_term, loan_use_chars, loan_use_words, posted_month, posted_weekday
Country / macroagriculture_value_added_pct_gdp, domestic_credit_private_sector, gdp_growth, gdp_per_capita, inflation, population_total, rural_population_pct, unemployment
Governancecontrol_of_corruption, government_effectiveness, rule_of_law
Borrower / groupborrower_count, female_percent, all_female, all_male, mixed_gender
Location / climatelatitude, longitude, climate_pdsi, climate_tmax
Field partnerpartner_default_rate, partner_loans_posted, partner_avg_loan_amount, partner_avg_repayment_term, partner_avg_days_to_fund, partner_avg_borrowers_per_group
Categoricalsector, repayment_interval

Preprocessing

XGBoost parameters

ParameterValue
objectivebinary:logistic
eval_metricaucpr
n_estimators500
learning_rate0.05
max_depth6
min_child_weight5
subsample0.8
colsample_bytree0.8
tree_methodhist
random_state42

Temporal split

The deployable training script uses loans through 2012 for training and 2013 as the out-of-time test year. Country, governance, climate, and partner-history features are joined to the loan records before training.

2. Impact Score

Final aggregation

Each component is scored on a 0–5 scale. The raw impact score is:

Raw Impact =
0.25 × Immediate
+ 0.20 × Future
+ 0.20 × Community
+ 0.35 × Vulnerability

The raw score is converted to a percentile against the recent impact reference distribution used by the live scoring pipeline. The displayed 0–100 Impact Score is that percentile.

2.1 Immediate Impact — 25%

The classifier uses activity and loan use first, and the description when needed. It assigns one primary immediate-impact class plus structured livelihood and household labels. Python, not the language model, calculates the numeric score.

Primary classBase score
critical_health_or_survival5.0
health_safety_or_basic_need4.4
protects_existing_livelihood4.0
creates_new_livelihood3.5
education_access_or_continuity3.25
expands_existing_livelihood3.0
meaningful_household_or_personal_improvement2.5
maintains_existing_livelihood2.0
minor_immediate_opportunity1.0
no_clear_immediate_impact0.0

Supporting labels add 0.10 each, capped at +0.30. Distinct secondary-impact boosters are grouped to prevent duplicate effects from stacking and are capped at +1.50. The final Immediate score is capped at 5.0.

2.2 Future Impact — 20%

The structured classifier returns purchase type, value horizon, evidence strength, and binary signals for durable or persistent future value. Routine restocking is explicitly normalized to maintenance rather than treated as new capacity.

Examples of purchase-type base scores:

Value-horizon scores are 0.5 (one-time), 1.5 (short), 3.0 (medium), 4.25 (long), and 5.0 (potentially lifelong). Evidence multipliers are 0.88 (low), 0.95 (medium), and 1.00 (high).

Future =
5 × (magnitude / 5)^0.65
  × (duration / 5)^0.35
  × evidence multiplier

Additional deterministic adjustments reward new income capacity, durable productive capacity, durable skills, persistent health/function benefits, and persistent household infrastructure; a maintenance-only classification receives a penalty.

2.3 Community Impact — 20%

Community impact is restricted to benefits outside the borrower-side group. The classifier is instructed not to infer future hiring, geographic scarcity, future expansion, or borrower success.

Community =
(community potential)^0.65
× (loan contribution)^0.35

Community-potential labels map to 0.5, 1.5, 3.5, 4.5, or 5.0 for minimal through very high. Loan-contribution labels map to 0.5, 1.25, 3.5, 4.5, or 5.0 for none through transformative.

2.4 Vulnerability — 35%

Vulnerability does not use an LLM or web search in the live pipeline. It has two deterministic parts.

Area vulnerability = 0.5 + 4.5 × poor420

Household scoring starts from 2.50 and applies capped rule-group adjustments. Area and household weights adapt to household evidence:

Household evidenceArea weightHousehold weight
Low0.650.35
Medium0.500.50
High0.400.60

The module preserves strongly supported extreme scores and clamps the final vulnerability score to 0.5–5.0.

3. Explanations and Compare Mode

Borrower-specific explanations are generated only after the underlying repayment or impact score exists. They summarize the factors behind a score and do not determine the score.

Compare Mode sends each loan through the same repayment and impact pipelines, then displays up to six loans side by side and allows sorting by repayment, impact, or the combined view.