Publications by Peter Gatica

EigenShoes - DATA605 Assignment 4

19.09.2022

Sys.setenv('R_MAX_VSIZE'=32000000000) # Getting Error: vector memory exhausted (limit reached) when running all shoes rm(list = ls()) library(jpeg) library(OpenImageR) ## Warning: package 'OpenImageR' was built under R version 4.0.5 library(Matrix) # Initialization # Set the file path directory of the jpg images v_file_path <- "/Users/Audiorun...

1217 sym R (5470 sym/31 pcs) 6 img

EigenShoes - DATA605 Assignment 4 Non-svd

20.09.2022

Sys.setenv(RGL_USE_NULL=TRUE) library(OpenImageR) library(doParallel) ## Loading required package: foreach ## Loading required package: iterators ## Loading required package: parallel library(foreach) library(jpeg) library(EBImage) ## ## Attaching package: 'EBImage' ## The following objects are masked from 'package:OpenImageR': ## ## readIm...

272 sym R (3925 sym/22 pcs) 4 img

DATA605 Assignment 5

26.09.2022

(Bayesian). A new test for multinucleoside-resistant (MNR) human immunodeficiency virus type 1(HIV-1) variants was recently developed. The test maintains 96% sensitivity, meaning that, for those with the disease, it will correctly report “positive” for 96% of them. The test is also 98% specific,meaning that, for those without the disease, 98%...

7224 sym Python (2433 sym/50 pcs)

DATA605 Assignment 6

03.10.2022

library(gtools) Problem 1 A bag contains 5 green and 7 red jellybeans. How many ways can 5 jellybeans be withdrawn from the bag so that the number of green ones withdrawn will be less than 2? \[ Step\ 1:\ \binom{5}{1} =\frac{5!}{(5-1)!1!} =\frac{120}{24} =5\ ways\ to\ get\ 1\ green\ jellybean \] choose(5,1) ## [1] 5 \[ Step\ 2:\ \binom{7}...

5635 sym R (1419 sym/53 pcs)

DATA605 Assignment 7

09.10.2022

# library(gtools) library(matlib) Let X1, X2, . . . , Xn be n mutually independent random variables, each of which is uniformly distributed on the integers from 1 to k. Let Y denote the minimum of the Xi’s. Find the distribution of Y . \[ For\ 1\leq j\leq k,m(j)=\frac{(k-j+1)^{n}-(k-j)^{n}}{k^{n}} \] Your organization owns a copier (future ...

1946 sym R (582 sym/35 pcs)

DATA605 Assignment 8

17.10.2022

library(matlib) Exercise 11. A company buys 100 lightbulbs, each of which has an exponential lifetime of 1000 hours. What is the expected time for the first of these bulbs to burn out? (See Exercise 10.) \[ First,\ let\ X_{i}-X_{n}\ be\ independent\ exponetially\ distributed\ random\ variables with a rate parameter\ \lambda_{i} \ldots \lamb...

2367 sym R (458 sym/11 pcs)

DATA605 Assignment 9

23.10.2022

library(matlib) 1. Exercise 11. The price of one share of stock in the Pilsdorff Beer Company (see Exer- cise 8.2.12) is given by Yn on the nth day of the year. Finn observes that the differences Xn = Yn+1 − Yn appear to be independent random variables with a common distribution having mean μ = 0 and variance σ2 = 1/4. If Y1 = 100, estimate ...

2041 sym R (15 sym/1 pcs)

DATA605 Assignment 10

30.10.2022

Smith is in jail and has 1 dollar; he can get out on bail if he has 8 dollars. A guard agrees to make a series of bets with him. If Smith bets A dollars, he wins A dollars with probability .4 and loses A dollars with probability .6. Find the probability that he wins 8 dollars before losing all of his money if he bets 1 dollar each time (timid st...

1332 sym

DATA605 Discussion 11

05.11.2022

# Load needed libraries library(tidyverse) library(readr) library(knitr) library(sqldf) Home Run Exit Velocity and Distance I am creating a simple model to show if there is a direct correlation with the exit velocity of a ball hit out of the park and the distance that it travels. I found a dataset that contains home run data between 2006 and 20...

1019 sym R (1706 sym/8 pcs) 2 img

DATA605 Assignment 11

07.11.2022

Vehicle speed and braking distance I am creating a simple model to show if there is a direct correlation between vehicle speed and braking distance to stop using the cars dataset. head(cars) ## speed dist ## 1 4 2 ## 2 4 10 ## 3 7 4 ## 4 7 22 ## 5 8 16 ## 6 9 10 summary(cars) ## speed dist ...

697 sym 2 img