Git Product home page Git Product logo

telco_churn_googlecloud's Introduction

Telco_churn_GoogleCloud

Here I have made an end to end scikit learn machine learning pipeline and then deployed it on google cloud using following steps:

1)Install xgboost using pip install xgboost and give the service account necessary permissions.

2)Create a notebook instance named 'model-demo' in GCP and create a bucket named 'churn-model-pra' to store the dataset for training the model.

3)Create a 'telco_churn.ipynb' notebook that includes the pipeline used to predict whether a customer will churn or not.

4)Save the model in a 'model.joblib' file using the joblib.dump(pipeline_xgb, 'model.joblib') command.

5)Copy the 'model.joblib' file to the bucket using the command !gsutil cp ./model.joblib gs://$BUCKET_NAME/model.joblib.

6)Create a file named 'predict_setup.ipynb' to write two files: 'predictor.py' and 'setup.py'. 'predictor.py' contains the 'ChurnPredictor' class and setup.py contains the dependencies and their versions. Convert the setup.py file into a '.tar' file using !python setup.py sdist --formats=gztar.

7)Copy the 'custom_predict-0.1.tar.gz' file to the 'churn-model-pra' bucket using the command !gsutil cp ./dist/custom_predict-0.1.tar.gz gs://churn-model-pra/custom_predict-0.1.tar.gz.

8)Create the model using the command !gcloud beta ai-platform models create ChurnPredictor5 --regions us-central1 --enable-console-logging.

9)Create the version of the model using the command !gcloud --quiet beta ai-platform versions create V1 --model ChurnPredictor5 --runtime-version 2.9 --python-version 3.7 --origin gs://churn-model-pra/ --package-uris gs://churn-model-pra/custom_predict-0.1.tar.gz --prediction-class predictor.ChurnPredictor

telco_churn_googlecloud's People

Contributors

prathammehta16 avatar

Stargazers

 avatar

Watchers

Kostas Georgiou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.