

When I create the very first version of any model, I go full throttle. Now you can check the results by deploying the model that you have created on the test data. Plt.title('Receiver Operating Characteristic') # Calculate the fpr and tpr for all thresholds of the classificationįpr, tpr, threshold = roc_curve(df_test, probs) Probs = clf.predict_proba(df_test)Įvaluate the model: score = clf.score(df_test, df_test)Ĭreate a confusion matrix and ROC: get_ipython().magic('matplotlib inline')Ĭonfusion_matrix(df_test, predictions),Ĭolumns=,

Make some predictions: predictions = clf.predict(df_test) Now let's split the data into training and test: df_train, df_test = train_test_split(df, test_size=0.25)įire up the random forest model by calling it! clf = RandomForestClassifier(n_estimators=30)Ĭlf.fit(df_train, df_train) Though the data that I am using is a made-up or dummy data and all the values are in binaries, I will still go ahead and use the Pandas shape data frame function to look at the rows and column counts. df = pd.read_csv("Customer Churn Data.csv")
#Colab tools for data analysis. code
Using the below code we should be able to see the 5 rows of our customer data set. Using the Pandas read.csv command we will read the customer data file. Once all the dependencies have been called, it is time to use them.

import pandas as pdįrom sklearn.model_selection import train_test_splitįrom sklearn.ensemble import RandomForestClassifierįrom trics import confusion_matrixįrom IPython.display import display, HTML Once you have fired up your Google Colab environment, its time to call all the required libraries for this modeling routine. This article is just to demonstrate the ease of use and simplicity of the Google Colab environment. To demonstrate the ease of use we will be using our all-time favorite data science language, Python.īefore we get started, I just want to call out that this is not a tutorial article on the Python language. Now that we have some basic understanding of the Google Colaboratory environment and its key features, we can get started with a very basic routine that we will deploy using the Google Colaboratory environment. TPU: A Tensor Processing Unit is custom made circuitry developed specifically to execute machine learning and Tensor Flow, Google's open source machine learning framework.However, nowadays GPUs are being used to do all the heavy data crunching to accelerate the computational workloads while developing any model. GPU: A Graphics Processing Unit is a high-end circuitry that is designed to render 2D and 3D graphics together with the CPU.CPU: Going by its text book definition, a Central Processing Unit is the electronic circuitry which is considered the brain of the computer and is used to perform the basic arithmetic, logical, control, and input/output operations specified by the instructions of a computer application.allowing its users to experience the true power of the cloud-based application, itwill be worth stating the key differences in between CPU, GPU, and TPU Considering the fact that Google Colab is a cloud-based platform. As I stated above, Google Colab will do all the data processing and crunching-related heavy lifting on its own without worrying about the capacity of the user's physical machine. CPU to GPU to TPU: This is one of the most exciting and amazing features of Google Colab.This saves a lot of time and effort, given the fact that there are thousands of such dependencies available to make data analytics a breeze. No more dependency on the dependencies: You talk about any programming language, Google Colab has got all the required packages and dependencies already installed.In this article, we will see how we can use this amazing cloud-based platform and use a Random Forest model to predict customer churn in less than 200 lines of code.īefore we start, I would like to point out some great capabilities that Google Colab environment has in store for its users. Google's Colaboratory is a perfect solution for today's data analysts and engineers. To democratize data analytics and do all the data munging related heavy lifting, let's explore Google's Colaboratory, which is a Jupyter notebook environment that requires no setup and runs entirely on the cloud.
