Instructions to use rubinraza/customer-churn-predictor with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use rubinraza/customer-churn-predictor with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://rubinraza/customer-churn-predictor") - Notebooks
- Google Colab
- Kaggle
Customer Churn Prediction using TensorFlow/Keras
Project Overview This project uses an Artificial Neural Network (ANN) to predict customer churn based on a dataset of telecom customers. The goal is to identify users who are likely to cancel their service so the business can take action to keep them.
Model Architecture I built a Sequential model with three layers:
Input Layer: Processes the customer features (tenure, monthly charges, etc.).
Hidden Layers: Two layers with 32 and 64 neurons using the ReLU activation function to find patterns.
Output Layer: A single neuron with a Sigmoid activation to output a probability between 0 and 1.
- Training & Performance Optimizer: Stochastic Gradient Descent (SGD).
Loss Function: Binary Crossentropy.
Epochs: 200.
Final Accuracy: 78.1% on the test dataset.
- How to Use To use this model, you will need TensorFlow installed. You can load the my_model.keras file using the following Python code:
Python from tensorflow.keras.models import load_model model = load_model('my_model.keras')
- Downloads last month
- 4