Downloads · 30 days
0
A25-CS078/smartbank-a25-cs078
smartbank-a25-cs078 is a machine learning model from A25-CS078. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
<div align="center" <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTZvwooWbazQP4T-2wOxQgoT8CGTDlL-u8RcA&s" alt="SmartBank Logo" width="500" / <h1 SmartBank Model Weights</h1 </div
Downloads · 30 days
0
Access
Public
Updated Dec 14, 2025
Repo size
613 MB
Likes
1
Public
Click a slice to open those files.
.pkl613 MB · 100%
From the Hugging Face model README
SmartBank Model Weights adalah model machine learning yang dilatih untuk memprediksi keberhasilan kampanye telemarketing perbankan (Deposito Berjangka). Model ini dirancang untuk membantu tim pemasaran memprioritaskan nasabah yang memiliki probabilitas konversi tertinggi.
Repository ini berisi file model terkompresi (.pkl) .
Model ini menggunakan pendekatan Ensemble Learning untuk mencapai performa yang lebih stabil dan akurat dibandingkan model tunggal.
Mengklasifikasikan nasabah ke dalam dua kategori:
Evaluasi dilakukan pada Data Test (20%) yang tidak dilihat model selama proses pelatihan.
<div align="center"> <img src="https://cdn-uploads.huggingface.co/production/uploads/68432ae150ae1d0b0390ca6b/MFcitJy-trQjvcHXruP6q.png" alt="Model Evaluation" /> </div>| Metrik | Skor | Deskripsi |
|---|---|---|
| Accuracy | 92,20% | Ketepatan prediksi keseluruhan. |
| ROC-AUC | 92,46% | Kemampuan memisahkan kelas positif dan negatif. |
| Precision | 91,90% | Seberapa akurat prediksi positif (Deposit). |
| Recall | 91,90% | Seberapa banyak nasabah potensial yang berhasil terdeteksi. |
| F1-Score | 91,18% | Rata-rata harmonis antara Precision dan Recall. |
Fokus utama model adalah meminimalkan False Negative agar bank tidak kehilangan peluang bisnis (nasabah potensial).
<div align="center"> <img src="https://cdn-uploads.huggingface.co/production/uploads/68432ae150ae1d0b0390ca6b/-MgKDQiBxwwHPPVHOgOyu.png" alt="Model Confusion Matrix" /> </div>Model dilatih menggunakan Bank Marketing Dataset dari UCI Machine Learning Repository.
default, housing, loancampaign, previous, poutcome_failure, poutcome_nonexistent, poutcome_successcons_conf_idx, cons_price_idx, euribor3m, emp_var_rate, nr_employedmarital_married, marital_single, marital_divorcedcontact_cellular, contact_telephonemonth_may, month_apr, month_aug, month_jul, month_jun, month_mar, month_nov, month_oct, month_sepeducation_university.degree, education_basic.4y, education_basic.6y, education_basic.9y, education_high.school, education_illiterate, education_professional.coursejob_categories_cat1, job_categories_cat2, job_categories_cat3, job_categories_cat4, job_categories_otherage_categories_struggling, age_categories_stable, age_categories_about to retire, age_categories_old age, age_categories_counting a last breatheday_of_week_mon, day_of_week_tue, day_of_week_wed, day_of_week_thu, day_of_week_friBerikut adalah contoh cara memuat model .pkl menggunakan Python. Pastikan Anda memiliki library scikit-learn dan xgboost terinstal.
menggunakan perintah CLI berikut:
pip install scikit-learn xgboost pandas joblib huggingface_hub
Lalu load model tersebut menggunakan kode berikut:
from huggingface_hub import hf_hub_download
import joblib
import pandas as pd
def load_model_from_hf(model_filename: str):
model_path = hf_hub_download(
repo_id="A25-CS078/smartbank-a25-cs078",
filename=model_filename,
cache_dir="models"
)
model = joblib.load(model_path)
return model # bisa disertai metadata jika diperlukan
def predict(model, data: dict):
df = pd.DataFrame([data])
prediction = model.predict(df)[0]
proba = None
if hasattr(model, "predict_proba"):
proba = model.predict_proba(df)[0].tolist()
return prediction, proba
# Load model
model = load_model_from_hf("model.pkl")
# Contoh input data
input_data = {
"age": 35,
"campaign": 1,
"duration": 120,
"euribor3m": 4.6
}
# Prediksi
prediction, probabilities = predict(model, input_data)
Dibangun dengan 🫶 oleh Bintang & Rafli (Capstone Team)