10 Year Challenge: AI Edition

The “10 Year Challenge” seems like any other social media challenge, however it may have a major effect in the world of facial recognition.

The Challenge as it is now, is to post two pictures of yourself side by side. One of the pictures is from 2008 while the other is from 2018.

Seems pretty harmless at first glance, however Fortune 500 adviser and tech writer Kate O’Neill had this to say on Twitter.

Me 10 years ago: probably would have played along with the profile picture aging meme going around on Facebook and Instagram Me now: ponders how all this data could be mined to train facial recognition algorithms on age progression and age recognition

Kate O’Neill

With the growth of data mining and facial recognition software it will be interesting to see if this has any effect.

Please No More Serverless

“Serverless”, The new Buzzword

Is this the apocalypse for servers?

Photo by Brock DuPont on Unsplash

Now you can be serverless too! 

Why waste time and resources running your own servers when a company will gladly take over with their new “serverless” plan.

Wait… Don’t we already have and use the cloud?

“Well yes,  but this is completely different! It’s serverless!

What actually is it?

Serverless is actually a subset of cloud infrastructure. The only real difference is serverless is the cloud as FaaS (Function as a Service). Which means you only pay for your actual usage and that depends on the resources you used and the time they were used for. The cloud you typically pay a subscription that gives you a set amount of time and compute power.

Serverless is like using a GUI on an operating system while using the cloud is using a terminal. A terminal is going to have much more control and options but for people who want to “Point & Click”, this is better for them.

I think serverless is a great idea that will help out a lot of businesses looking to adopt new technology. The problem I have is the name “Serverless”, your still going to be using servers but you won’t control them. 

Cloud Gaming Streaming Services

Cloud Gaming?

In the past week, both Google and Microsoft have announced there cloud gaming projects. Google announced Project Stream, a game streaming service to play games via Chrome. Microsoft announced Project xCloud,  a cloud platform that will allow gamers to play from anywhere they choose. Which will let gamers use their mobile phones to play. 

Project Stream

Project Stream became available to test on October 5th 2018, with the first game on trial being Assassin’s Creed Odyssey. In order to sign up you must be residing in the US and have a 25 Mbps connection, along with either Windows, Chrome OS, macOS, or Linux for the operating system. 

Common issues Reported from public testing:

– Not getting 60fps
– Minor lag/latency
– Difficult to use touch interface controls, using a controller gives a higher quality experience.
– Unable to adjust graphical settings


project stream has surpassed a lot of expectations. The real question will be how it holds up to a fps multiplayer game.

Project xCloud

Microsoft is already testing and is expecting to begin public trials in 2019. Currently, the test experience is running at 10 Mbps and using a 4G network. As the introduction of 5G networks continues across the US, they expect will help provide a better quality experience. Project xCloud is expected to work across most phones and tablets. 

Exploring HR Employee Attrition and Performance with R

Based on IBM’s fictional data set created by their data scientists.

Employee Attrition is when an employee leaves a company due to normal means, (loss of customers, retirement, and resignation), and there is not someone to fill the vacancy. Can a company identify employee’s that are likely to leave a company?
A company with a high employee attrition rate is a good sign of underlying problems and can affect a company in a very negative way. One such way is the cost related to finding and training a replacement, as well as the possible strain it can put on other workers that in the meantime have to cover.

This dataset was produced by IBM and has just under 1500 observations of 31 different variables including attrition. 4 of the variables (EmployeeNumber, Over18, EmployeeCount, StandardHours) have the same value for all observations. Due to this, we can drop these since they won’t be helpful for our model. Next, the column “ï..Age” was renamed to “Age” to make calling this variable simpler. Finally, for build and testing models, the dataset was split into a training and test set at 70/30.

Initial Analysis:
Looking at the overall employee attrition rate for the entire dataset we can see it’s ~19%. Typically, a goal for a company is to keep this rate to ~10% and this dataset shows almost double that rate.

Here we show the influence of all factors on the employee attrition rate which shows the influence levels are similar. However, we can take the top factors and explore those in depth.

Top Factor Analysis Findings:

Factor Variable Importance
Total Working Years 0.6564557
Years At Company 0.6525268
Overtime 0.6505954
Years In Current Role 0.6480052
Monthly Income 0.6456590
Job Level 0.6414233

Total Working Years:

Looking at the total amount of years an employee has been in the workforce (at any job) there are two significant points to be found. First, in the initial 3 years of working, the data shows the attrition rate of 50%. This is expected as people tend to start at an entry-level job and get their first job experience before moving on. The rate drops off in the following amount of years until reaching 37 – 40 years in the job force. Here we have just under ~75% attrition rate which can be best explained as employees retiring since 37 years from 18 is 55 years old, the age people usually retire at.

Years at the company: 
The findings related to the number of years at the company and employee attrition followed the same trend as total working years did but with the rate lower for each. The reasoning behind this is most likely the same as total working years, with early on moving around. Then, staying put and finally retiring.

Employees that work overtime have over double the attrition rate (~25%), then those who don’t (~10). A possible reason behind this could be that some employees can get “burned out” working overtime. Possibly want to spend time outside of work and end up looking for a new job.

Monthly Income:
As expected employees with a higher monthly income were less likely to leave a company. Specifically, in the human resource and research and development departments. The sales department was interesting in that monthly income wasn’t as big a factor in attrition.

Model Building:

Gradient Boosting Model (GBM):
Using a GBM model with default parameters, the best training model came at 88%, at 150 trees. Using this model, we can create a prediction using the test data. The accuracy of this prediction was 87% which being very close to the training accuracy shows this is correct.

Interaction.depth n.Trees Accuracy Kappa
1 150 .878 .397

Classification Trees:
The classification tree built with default parameters showed a slightly lower overall accuracy. The training accuracy came to 82% and the prediction was 83%.

dt_model<- train(Attrition ~ ., data = attrition_train, method = "rpart")
cp Accuracy Kappa
0.039 .82 .24

When building a classification tree with only the top 5 factors, the accuracy fell in between the other two models at, 84% training and prediction.

dt_model1<- train(Attrition ~ TotalWorkingYears + YearsAtCompany + OverTime + YearsInCurrentRole + MonthlyIncome + JobLevel, data = attrition_train, method = "rpart")

cp Accuracy Kappa
0.0301 .84 .19


As we can see from this data analysis, the biggest factor to employee attrition is the length of time in the workforce either at the same company or not. However, I would recommend looking deeper into employees that work overtime and getting their reasons for leaving. Possibly, have meetings with overtime workers and find out if they need help. For example, if they are working at their capacity and still having to work overtime then might be time and possibly even cheaper to hire extra help.
I would also recommend for the company to continue to collect this same type of data at an annual basis and run the models to find those employees that are more likely to leave. Once you have the list of employees, set up reviews and see if their’s a way to help them out or even you may catch, worker issues early on. Lastly, a further review into the sales department is warranted with the high attrition rate.

Introduction to Data Analysis with R

Using Basic Data Analysis functions on the mtcars dataset

Let’s Start

# Copying mtcars data frame to our new data frame myCars
myCars <- mtcars

Which car has the highest horsepower (hp) ? 

#find and display the car with the highest horsepower index <- which.max(myCars$hp)
# Display the car name along with the rest of the row myCars[index,]
##                mpg cyl disp hp drat  wt  qsec vs am  gear carb ## Maserati Bora  15   8  301 335 3.54 3.57 14.6  0  1    5    8

Maserati Bora has the highest horsepower at 335

Exploring miles per gallon (mpg) of the cars

# find and display the car with the highest mpg
##                 mpg cyl disp hp drat    wt qsec vs am gear carb ## Toyota Corolla 33.9   4 71.1 65 4.22 1.835 19.9  1  1    4    1
# Creating a sorted dataframe, based on mpg
highMPGcars <- myCars[ order(-myCars$mpg),]
mpg cyl  disp  hp drat    wt  qsec vs am gear carb ## Toyota Corolla 33.9   4  71.1  65 4.22 1.835 19.90  1  1    4    1
## Fiat 128       32.4   4  78.7  66 4.08 2.200 19.47  1  1    4    1 ## Honda Civic    30.4   4  75.7  52 4.93 1.615 18.52  1  1    4    2
## Lotus Europa   30.4   4  95.1 113 3.77 1.513 16.90  1  1    5    2 ## Fiat X1-9      27.3   4  79.0  66 4.08 1.935 18.90  1  1    4    1 ## Porsche 914-2  26.0   4 120.3  91 4.43 2.140 16.70  0  1    5    2

Which car has the “best” combination of mpg and hp?

# Best car combination of mpg and hp, where mpg and hp must be given equal # weight
bestCombo<- myCars$hp / myCars$mpg
##                mpg cyl disp  hp drat   wt qsec vs am gear carb ## Maserati Bora  15   8  301 335 3.54 3.57 14.6  0  1    5    8

The Maserati Bora hp to mpg is ~ 22hp per gallon