Your Perfect Assignment is Just a Click Away

We Write Custom Academic Papers

100% Original, Plagiarism Free, Customized to your instructions!


Harvard University Machine Learning Algorithms in Rstudio Coding

Harvard University Machine Learning Algorithms in Rstudio Coding

Question Description

I’m working on a programming project and need support to help me learn.

I’m working on a programming project and need support to help me study.

I am working on a project in R on the babynames dataset.

I have this snippet of code analysis that works but I need to incorporate two machine learning algorithms in this project and I am not sure what to choose and how to implement.

Here is the code:

#install gender and genderdata packages and all applicable libraries

#The gender package in cran contains only demonstration data.

#For full data analysis, I had to download the genderdata package.

install.packages(“genderdata”, type = “source”,

repos = “”)

install.packages(c(“gender”, “genderdata”),

repos = “”,

type = “source”)





#I used (method = “ssa”): United States from 1930 to 2012.

#Drawn from Social Security Administration data.

#I took a sample of random names from websites that identify gender neutral names

#the prospective parents could visit using a Google search and graphed them earlier.

#From the earlier analysis on each name, I chose 7 names that seemed the most neutral based on

#male and female trendlines in the charts.

ssa_names <- c(“Charlie”, “Royal”, “Morgan”, “Skyler”,

“Frankie”, “Oakley”, “Justice”)

ssa_years <- c(rep(c(2009, 2012), 3), 2012)

ssa_df <- tibble(first_names = ssa_names,

last_names = LETTERS[1:7],

years = ssa_years,

min_years = ssa_years – 3,

max_years = ssa_years + 3)


#This dataset connects first names to years but there are columns

#for minimum and maximum years for possible age range since birth dates are not always exact.

#We pass this to gender_df() function, which assigns the method that we wish to use and the names of the columns that contain the names and the birth years. The result is a tibble of predictions.

results <- gender_df(ssa_df, name_col = “first_names”, year_col = “years”,

method = “ssa”)


#gender_df() function calculates genders only for unique

#combinations of first names and years

ssa_df %>%

left_join(results, by = c(“first_names” = “name”, “years” = “year_min”))

gender_df(ssa_df, name_col = “first_names”,

year_col = c(“min_years”, “max_years”), method = “ssa”)

#Now, we use gender_df() to predict gender by passing it the columns

#minimum and maximum years to be used for each name

ssa_df %>%

left_join(results, by = c(“first_names” = “name”, “years” = “year_min”))

gender_df(ssa_df, name_col = “first_names”,

year_col = c(“min_years”, “max_years”), method = “ssa”)

ssa_df %>%

distinct(first_names, years) %>%

rowwise() %>%

do(results = gender(.$first_names, years = .$years, method = “ssa”)) %>%


ssa_df %>%

distinct(first_names, years) %>%

group_by(years) %>%

do(results = gender(.$first_names, years = .$years[1], method = “ssa”)) %>%


What I really want to do is to use two different algorithms to get to the best method to do that following.

1. Analyze the dataset for the names that are the closet to being equally assigned to either a male or female. The last chart shows the proportions but I want to find an algorithm that would come up with the top 10 names that are the most gender neutral.

Order Solution Now

Our Service Charter

1. Professional & Expert Writers: Executive Papers only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Executive Papers are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Executive Papers is known for timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Executive Papers, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.