Going Pro in Data Science by MOUSAIF YASSINE

Going Pro in Data Science by MOUSAIF YASSINE

Author:MOUSAIF, YASSINE
Language: eng
Format: epub
Publisher: UNKNOWN
Published: 2022-01-09T00:00:00+00:00


Build Like a Pro

You don’t have to build the elements of a data product in a set order (i.e., build the repository first, then the algorithms, then the control‐ ler; see Figure 5-4). The professional approach is to build in the order of highest technical risk. Start with the riskiest element first, and go from there. An element can be technically risky for a lot of reasons. The riskiest part may be the one that has the highest work‐ load or the part you understand the least.

Figure 5-4. Implementing the pieces of the blackboard pattern You can build out components in any order by focusing on a single element and stubbing3 out the rest. If you decide, for example, to start by building an algorithm, dummy up the input data and define a temporary spot to write the algorithm’s output.

Then, implement a data product in the order of technical risk: riski‐ est elements first. Focus on a particular element, stub out the rest, and replace the stubs later. In Chapter 4, I described an analysis we performed on employee satisfaction data. After we had a model that told us which factors influenced happiness, we wanted to do further analysis to find out why those factors were important. The plan was to take employees that the model identified as happy, and build a topic model from their unstructured text comments.

3 A stub is a piece of code that serves as a simulation for some piece of programming functionality. A stub is a simple, temporary substitute for yet-to-be-developed code. I was certain that I could write the algorithm needed to produce the topic model. I was somewhat confident that I could access the data, but I wasn’t sure at all how to coordinate all the pieces so that they fit into a coherent analysis. I decided to start by writing the control. I wrote the following R code, then ran it to make sure that it exe‐ cuted as expected:

#Read in the employee ratings

ratings < read.csv(file = "dummy_company_reviews.csv") #This function takes raw employee ratings, processes them, #builds a topic model then displays the topics

topic_model < function(ratings){

topic_model_stub < c("topic1","topic2","topic3") } #Perform a topic analysis on the reviewers with factors that #match happy employees. The resulting topics will give us more #information about why the employees are happy

ratings.happy < subset(ratings,

Compensation.Benefits > 2 & Management > 3 &

Job.Security.Advancement > 2 & Helpful.Yes > 0

)

ratings.happy.desc < ratings.happy[,"Review.Description.Trans lated"]

topic_model(ratings.happy.desc)



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.