Like someone else who stepped into coding from other random fields might have experienced, I do find the lack of system level knowledge could significantly hinder the workflow. In a word, how to get a smoothly working environment for all your tools with minimum conflicts and collapse? Recently I encountered some After spending a whole day, Here I mainly talk about Python,
Continue reading

I came across a question in codewars which is based on the calculation of the *n*th number in the Fabonacci sequence. Remember back in high school we were asked to derive this via MI, which is a long story. And thanks to the power of computation that gives options to simplify this process. Anyway, here are a few ways for solution: 1. Math function This is put at the first place because for people who do math it is the most intuitive action to just calculate the result from $$F_n = \frac{1}{sqrt(5)}\bigg[ \big(\frac{1+sqrt(5)}{2}\big)^n - \big(\frac{1-sqrt(5)}{2}\big)^n \bigg]$$ However, the calculation
Continue reading

Cost function $$J(\theta) = \frac{1}{2m} \sum^m{i=1} (H\theta(X^{(i)}) - y^{(i)})^2$$ $$Cost(h\theta(X), y) = \begin{cases} -log(h\theta(X)),&\text{if }y=1
-log(1-h\theta(X)),&\text{if }y=0 \end{cases} $$ P.S. Katex tips: in Hugo’s math mode, to get line separator for multi-line equations, use ‘’ $\times 6$ instead of ‘\‘. And if a function faild, add ‘’ as escape char for random ‘’s might help (annoying…I know…)
Continue reading

Here is a series of course notes migration, in order to say-goodbye to the text books and my messy physical notepads. Hypothesis model $$H_\theta(X) = \theta^T X = \theta_0\cdot 1 + \theta_1\cdot x_1 + \cdots + \theta_n\cdot xn$$ $\theta\in n+1$ column vector, $X\in (n+1)\times m$ matrix when having $m$ training cases. Cost function $$J(\theta) = \frac{1}{2m} \sum^m{i=1} (H_\theta(X^{(i)}) - y^{(i)})^2$$
Continue reading

Author's picture

lxip

唯自渡方是真渡

Data Science

MA US