Publications by Josh Iden
DATA 605 Discussion Week 10
The \(ij\)th entry \(p^{(n)}_{ij}\) of the matrix \(P^n\) gives the probabilty that the Markov chain, starting in state \(s_i\) will be in state \(s_j\) after \(n\) steps. library(expm) labels <- c("H","Y","D") T_mat <- matrix(c(0.8,0.2,0.0, # transition matrix 0.3,0.4,0.3, 0.2,0.1,0.7), nrow=3,...
228 sym R (507 sym/6 pcs) 2 img
DATA 607 Web APIs
Task: choose one of the New York Times APIs, construct an interface in R to read in the JSON data, and transform it into an R DataFrame. I’m going to use the jsonlite package to read in the JSON and transform it to a dataframe. library(jsonlite) Storing the apiKey (hidden) and url: url <- "https://api.nytimes.com/svc/books/v3/lists/current/hard...
538 sym R (16105 sym/8 pcs)
DATA 605 HW10
This is a Gambler’s Ruin problem, where \(q_k\) is the probability that the gambler’s stake reaches \(0\) before it reaches \(M\), given the initial stake \(k\), with any \(z\) with \(1 \leq z \leq M\): \(q_k = \frac{(\frac{q}{p})^z - 1}{(\frac{q}{p})^M - 1}\) The probability of betting $1 each time: M = 8 #desired total z = 1 # initial sta...
634 sym 1 img
DATA 605 DB10
DB WEEK 10 Taking a look at some life expectancy data from the WHO LOADING PACKAGES I’m going to use BASE R in conjunction with TIDYVERSE: library(tidyverse) ## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ── ## ✔ ggplot2 3....
614 sym R (3902 sym/11 pcs) 4 img
DATA 605 HW11
Introduction library(dplyr) glimpse(cars) ## Rows: 50 ## Columns: 2 ## $ speed <dbl> 4, 4, 7, 7, 8, 9, 10, 10, 10, 11, 11, 12, 12, 12, 12, 13, 13, 13… ## $ dist <dbl> 2, 10, 4, 22, 16, 10, 18, 26, 34, 17, 28, 14, 20, 24, 28, 26, 34… Step 1: Visualize the Data plot(dist ~ speed, cars) We can see that distance tends to increase as speed inc...
1789 sym R (1300 sym/12 pcs) 7 img
DATA 607 HW11
Introduction In this assignment, I’m tasked to apply some sentiment analysis base code from chapter 2 in Text Mining With R and apply it to a corpus of my choosing. The Code First let’s take a look at the code from chapter 2. The code features the following package dependencies: library(tidytext) library(tidyverse) library(janeaustenr) About...
1719 sym R (31567 sym/27 pcs)
DATA 606 LAB 8
The Human Freedom Index is a report that attempts to summarize the idea of “freedom” through a bunch of different variables for many countries around the globe. It serves as a rough objective measure for the relationships between the different types of freedom - whether it’s political, religious, economical or personal freedom - and other s...
11935 sym R (5346 sym/40 pcs) 9 img
DATA 607 HW12
DATA607 HW12 Josh Iden 2022-11-11 Recommender Systems Assignment Overview Your task is to analyze an existing recommender system that you find interesting. You should: Perform a Scenario Design analysis as described below. Consider whether it makes sense for your selected recommender system to perform scenario design twice, once for the organi...
5256 sym
DATA 605 HW12
Mulitple Regression from WHO data library(tidyverse) ## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ── ## ✔ ggplot2 3.3.6 ✔ purrr 0.3.5 ## ✔ tibble 3.1.8 ✔ dplyr 1.0.10 ## ✔ tidyr 1.2.0 ✔ strin...
2374 sym 8 img
DATA 605 DB13
DATA 605 Discussion Post 13 Josh Iden 2022-11-16 r = 0.5 #radius cm = 1/2 diameter dr = 0.1 #accuracy 1mm = 0.1cm V = expression(4/3*pi*r^3) # volume of a sphere vr = D(V, "r") # first derivative: v'(r) dV = round(eval(vr) * dr, 5) # propagated error: dV = vr * +/- dr print(paste("+/-",dV)) ## [1] "+/- 0.31416" ...
62 sym 1 img