Source control for data scientists This chapter covers In the last chapter, we…
- User
Source control for data scientists This chapter covers In the last chapter, we introduced several key software engineering concepts that will improve your life as a data scientist. These included: Source control Exception handling Putting a model into production Object-oriented programming (OOP) Automated testing Scale In this chapter, we’re going to delve deeper into the first of these - namely, . source control Source control (also called ) is basically a way of tracking changes to a codebase. version control As the number and size of codebases has grown indescribably over the years, the need for monitoring code changes, and making it easier for various developers to collaborate is absolutely crucial. Because software engineering has existed longer than modern data science, source control has been a software engineering concept longer than a data science one. However, as we’ll demonstrate in this chapter, source control is an important tool to learn for any data scientist. Before we delve into using source control for data science, however, let’s discuss how Source control for data scientists What is source control Why do data scientists need to know source control What is git What are the main git commands you need to know as a data scientist
—> source control Source control (also called version control ) : is basically a way of tracking changes to a codease —> As the number and size of codebases has grown indescribably over the years , the need for monitoring code changes , —> make easy to collaborate various developers to collaborate is absolutely
—> version contral come into the umbrealla of applying software engineering to data science
Next, let’s explore how source control will help you in your projects. Going back to the customer churn example from the first chapter, suppose you and a colleague are working on a data science project together to predict whether a customer will churn. To make this concrete, we will use the customer churn dataset available from Kaggle here: www.kaggle.com/competitions/customer-churn-prediction-2020/data. This dataset involves predicting whether a customer from a Telecom company will churn. The workflow of this project can be structured similarly to the data science life cycle that we discussed in the first chapter. As a refresher, we’ve repeated the chapter one diagram showing the combined data pipeline/ML pipeline view in Figure 2.1
In the following steps, we tie the pipeline components to our specific Kaggle dataset: Gathering data Fetch the data needed to build the customer churn model. In the Kaggle dataset we’ll be using, this includes information like length of account (account age), number of day calls, area code, etc.
In the following steps, we tie the pipeline components to our specific Kaggle dataset: Gathering data Fetch the data needed to build the customer churn model. In the Kaggle dataset we’ll be using, this includes information like length of account (account age), number of day calls, area code, etc. Exploratory data analysis (EDA) / data validation Analyzing the data for patterns, distributions, correlations, missing values, etc. For example, what’s the proportion of churn to non-churn? What’s the association with total day minutes used (total_day_minutes) and churn? Etc. Data cleaning Handle issues, such as missing values, outliers, dirty data, etc. Feature engineering Create new features for the models you both will build. For example, you could create a new feature based on the average total day charge for the state the user resides in. Model training Develop models, such as logistic regression or random forest to predict churn. Model evaluation. ©Manning Publications Co. To comment go to liveBook 26 Evaluate the performance of the models. Since churn vs. non-churn is a classification problem, we might use metrics like precision or recall here. Model deployment Make the finalized model accessible to others. For this case, that might mean prioritizing individuals predicted to churn for marketing or lower price incentives.
- Assistant