Trying to share some code ideas

logo

Tag: R

Lyrical Success

I’m not gonna write you a love songSara Bareilles

Post 1 of 4

A question I’ve always wondered is their a magic formula for creating a number one song. Many song writers are prolific however their song doesn’t necessarily have commercial success. It may be difficult to quantify how the musical composition relates to the song’s success. However I am going to make an attempt at evaluating the lyrics of songs to determining if we can accurately predict if a song will be commercially successful.

Modeling and Prediction for Movie Audience Ratings

Modeling and Prediction for Movie Audience Ratings

Synopsis

One of the key issues facing film production companies is, will the production company make a profit from a movie. It is assumed that favorable audience reviews will in-turn lead to higher ticket sales or DVD sales, both items directly affect a movie’s profitability.

The analysis will look at what attributes lead to a higher average audience review score on the public website, Rotten Tomatoes

Spoiler Alert The analysis creates a model that is close, but isn’t 100% confident.

R Markdown to WordPress

Posting an Rmd File to WordPress

Updated: 2021-10-02 for R version 4.1

There are four R packages you will need to be able to post an Rmd file to WordPress. Yes there are alternatives you can generate the HTML yourself and copy and paste things, but why would you want to do it?

Class for Parsing NGrams

Train an NGram Model

Will take the ngrams, reading and writing from the SQLite database and train the model utilizing Katz-Backoff methodology on the likelihood of the next word.

See code below

File Handler for RDS Formatted Files

File Handler for RDS Formatted Files

Using a list, load RDS formatted files into standard data frame. Allows for grouping multiple files into one data frame for processing.

See code below

SQLite Interface Class for R

SQLite Interface Class for R

I wrote an interface class to help with working with the SQLite database.

Methods include, selectQuery, updateQuery, readTable, writeTable

 

see code below

Powered by WordPress & Theme by Anders Norén