ml_fin_scorer 0.1.0
SDKdartflutter
Platformandroidioswindowslinuxmacosweb
A Dart package for calculating financial scores based on custom weights, normalized features, and domain-specific rules. Ideal for risk scoring, credit scoring, and user profiling in fintech applications.
💸 ml_fin_scorer

A Dart package for calculating custom financial scores using normalized, weighted feature groups.
Perfect for credit scoring, risk assessment, investment profiling, and more.
📦 Installation
Add this to your pubspec.yaml:
dependencies:
ml_fin_scorer: ^0.1.0
Then run:
dart pub get
✨ Features
- ✅ Weighted & normalized financial score calculation
- ✅ Group-based scoring (e.g., Income, Debt, Behavior)
- ✅ Custom scoring profiles (e.g., 0–100 or 300–850)
- ✅ Grade classification (A–D)
- ✅ Breakdown of group-level contributions
- ✅ Type-safe, test-covered, production-ready
🚀 Quick Example
import 'package:ml_fin_scorer/ml_fin_scorer.dart';
void main() {
final incomeGroup = FinancialFeatureGroup(
groupName: 'Income',
features: [
FinancialFeature(name: 'Salary', value: 8000, min: 0, max: 20000, weight: 0.6),
FinancialFeature(name: 'Side Income', value: 1500, min: 0, max: 5000, weight: 0.4),
],
);
final debtGroup = FinancialFeatureGroup(
groupName: 'Debt',
features: [
FinancialFeature(name: 'Loan Payments', value: 1000, min: 0, max: 5000, weight: 0.5),
FinancialFeature(name: 'Credit Usage %', value: 60, min: 0, max: 100, weight: 0.5),
],
);
final profile = CustomScoringProfile(minScore: 300, maxScore: 850);
final result = calculateGroupedFinancialScore(
groups: [incomeGroup, debtGroup],
profile: profile,
);
print(result); // Score: 712.53 (B) | Groups: {Income: 63.0%, Debt: 45.6%}
}
📚 API Overview
FinancialFeature
Defines a single variable:
FinancialFeature(
name: 'Salary',
value: 9000,
min: 0,
max: 20000,
weight: 0.7,
);
FinancialFeatureGroup
Groups related features:
FinancialFeatureGroup(
groupName: 'Income',
features: [...],
);
CustomScoringProfile
Customize output range:
CustomScoringProfile(minScore: 300, maxScore: 850)
calculateGroupedFinancialScore(...)
Main function — returns a ScoreResult:
ScoreResult(
finalScore: 712.3,
grade: 'B',
groupScores: {'Income': 0.63, 'Debt': 0.45},
)
✅ Use Cases
- Creditworthiness scoring
- Financial risk analysis
- Investment client profiling
- Personal finance assistant engines
🧪 Testing
dart test
100% unit-tested with edge cases handled.
⚖ License
MIT © 2025 Mehmet Çelik