Finansal işlemler için kural ve makine öğrenmesi tabanlı anomali tespit kütüphanesi.
Project description
Finomaly
PyPI & Source Code
PyPI: https://pypi.org/project/finomaly/
Source Code: https://github.com/Barisaksel/finomaly
Finomaly is a modular, open-source Python library for anomaly detection in financial transactions. It supports both rule-based and machine learning-based detection, multi-language reporting, and professional reporting formats.
Features
- Rule-based anomaly detection (JSON-configurable, customer-specific rules)
- Machine learning models: IsolationForest, RandomForest, XGBoost
- Profile-based analysis (behavioral deviation, unusual time, etc.)
- Multi-language support (TR/EN) for all messages and reports
- Centralized message and rule management
- Professional reporting: Excel, HTML, PDF (with optional charts)
- Visual analytics: anomaly distribution, scatter plots
- Easy integration, clean API, and extensible modular structure
Installation
pip install finomaly
Quick Start
import pandas as pd
from finomaly.core.anomaly_system import CorporateAnomalySystem
# Load your data
train_df = pd.read_excel('train.xlsx')
predict_df = pd.read_excel('predict.xlsx')
# Define features and rules
features = ['Tutar', 'Saat']
rules_path = 'rules.json'
# Initialize system
system = CorporateAnomalySystem(features, rules_path=rules_path, ml_method='isolation_forest', lang='en')
# Train model
system.fit('train.xlsx', customer_col='MusteriID', amount_col='Tutar')
# Predict anomalies
output_path = system.predict('predict.xlsx', customer_col='MusteriID', amount_col='Tutar')
result = pd.read_excel(output_path)
print(result.head())
Reporting & Visualization
from finomaly.report.visualizer import Visualizer
from finomaly.report.pdf_reporter import PDFReporter
visualizer = Visualizer()
visualizer.plot_anomaly_distribution(result, amount_col='Tutar', anomaly_col='ML_Anomaly')
pdf_reporter = PDFReporter()
pdf_reporter.generate_pdf_report(result, 'report.pdf')
Project Structure
core/: Rule engine, model management, utilitiesml/: ML models (IsolationForest, RandomForest, XGBoost)profile/: Profile-based analysis (behavioral, time-based)report/: Reporting and visualization (Excel, HTML, PDF, charts)
Contributing
Finomaly is open-source and welcomes contributions. Please open issues or pull requests for improvements, bug fixes, or new features.
License
MIT License
Author
Barış
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file finomaly-0.1.1.tar.gz.
File metadata
- Download URL: finomaly-0.1.1.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7af65307fe734551d1cef8271fe9a6ebc8da61e7cfe319f8ff5fa18a937ff29b
|
|
| MD5 |
a949da8e20b59e715101210e6b784bb1
|
|
| BLAKE2b-256 |
c16f2ee1a6da9bcc2fc80614600e435ef372cc45a28437ed8fca0448cc10d7cf
|
File details
Details for the file finomaly-0.1.1-py3-none-any.whl.
File metadata
- Download URL: finomaly-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d35f32afaf5ac7a6f4c5a3458ed165b97f318b9a8f4ddd1a94431692cdd34ef
|
|
| MD5 |
4f6de07e16cd5ef7fe5a653763cc6da8
|
|
| BLAKE2b-256 |
83aa203e9ec161cb0c6af0b03bddddc987480cc1d8f3b7c97af5a4fe74f799cc
|