With a given list [12,24,35,24,88,120,155,88,120,155], write a program to print this list after removing all duplicate values with original order reserved. Hints: Use set() to store a number of values without duplicate.
def removeDuplicate( li ): newli=[] seen = set() for item in li: if item not in seen: seen.add( item ) newli.append(item) return newli li=[12,24,35,24,88,120,155,88,120,155] print removeDuplicate(li)
Why is Naive Bayes ‘naive’ ?
Naive Bayes is ‘naive’ because it assumes that all of the features in a data set are equally important and independent. As we know, these assumption are rarely true in real world scenario.
Find: $$ \lim_{x \to +\infty} \frac{3x^2 +7x^3}{x^2 +5x^4} $$
$$ \lim_{x \to +\infty} \frac{3x^2 +7x^3}{x^2 +5x^4} = \lim_{x \to +\infty} \frac{3/x^2 +7/x}{1/x^2 +5} = \frac{0 +0}{0 +5} = 0 $$