Publications by Betsy Rosalen
CUNY MSDS DATA609 HW6
Ex. 1 Use a data set such as PlantGrowth in R to calculate three different distance metrics and discuss the results. Without thinking much about it I calculated the distance using both variables, independent and dependent, (you can see the results below), but then the numbers didn’t really make sense. For the Manhattan distance it is just doub...
3076 sym R (6321 sym/41 pcs) 3 img 12 tbl
CUNY MSDS DATA609 HW5
Ex. 1 Carry out the logistic regression (Example 22 on Page 94 in the book, Introduction to Algorithms for Data Mining and Machine Learning, by Xin-She Yang), in R using the data. x 0.1 0.5 1.0 1.5 2.0 2.5 y 0 0 1 1 1 0 The formula is \[y(x) = \frac{1}{1+exp[-(a+bx)]}\] First we use the glm function with family = 'binomial' to cr...
3010 sym R (6232 sym/33 pcs) 5 img 1 tbl
CUNY MSDS DATA609 HW4
Ex. 1 For Example 19 on Page 79 in the book (Introduction to Algorithms for Data Mining and Machine Learning, by Xin-She Yang), carry out the regression using R. x -0.98 1.00 2.02 3.03 4.00 y 2.44 -1.51 -0.47 2.54 7.52 I always plot the data first to see if it gives me any insight into what type of model I might need. In this case i...
2075 sym R (3636 sym/26 pcs) 9 img 3 tbl
CUNY MSDS DATA609 HW2
Ex. 1 Show \(x^2 + exp(x) + 2x^4 + 1\) is convex. A function is defined as convex if: \[ f(\alpha x+\beta y) \le \alpha f(x) + \beta f(y), \quad \forall \:x,\: y \in \Omega, \quad \text{where } \alpha \ge 0,\ \beta \ge 0,\ \alpha + \beta = 1. \] Substituting in our expression we get: \[ \begin{align} (\alpha x+\beta y)^2 + exp(\alpha x + \beta y...
4308 sym R (144 sym/5 pcs) 1 img
CUNY MSDS DATA609 HW1
Ex. 1 Find the minimum of \(f(x,y) = x^2 + xy + y^2\) in \((x, y) \in\mathbb{R}^2\). There are two first partial derivatives \(\frac{\partial f}{\partial x}\) and \(\frac{\partial f}{\partial y}\), thus the stationary conditions are: \(\frac{\partial f}{\partial x} = 2x + y = 0\) and \(\frac{\partial f}{\partial y} = x + 2y = 0\). From \(2x + y ...
5650 sym R (2408 sym/8 pcs)
CUNY MSDS DATA609 HW3
Ex. 1 Write down Newton’s formula for finding the minimum of \[f(x) = (3x^4 - 4x^3)/12\] in the range of \([-10, 10]\). Then implement it in R. Newton’s Formula: \[ \begin{align} x_{k+1} = x_k - \frac{f'(x_k)}{f''(x_k)} \end{align} \] Inserting the first two derivatives of \(f(x) = \frac{3x^4 - 4x^3}{12}\) we get: \[ \begin{align} x_{k+1} ...
1476 sym R (2706 sym/6 pcs)