Skip to main content

Posts

Showing posts from March, 2020

Advanced Regression.

Advanced Regression. - Generalized Linear Regression - Regularized Regression - Ridge and Lasso Regression Generalized Linear Regression process consists of the following two steps: 1. Conduct exploratory data analysis by examining scatter plots of explanatory and dependent variables. 2. Choose an appropriate set of functions which seem to fit the plot well and build models using them. Functions having no global maxima or minima are usually polynomial functions. Also, they typically have multiple roots and local maxima and minima. Ex: ax^4+bx^3+cx^2+dx+f Monotonically increasing function Ex: e^x 1. Can x1.x2.x3 be a feature if the raw attributes are x1, x2, x3 and x4? A. Yes, Derived features can be created using any combination of the raw attributes (linear or non-linear). In this case, the combination x1. x2. x3 is non-linear. 2. How many maximum features can be created if we have d raw attributes for n data points? Note that (n r)  here refers to the number of...

Model Selection

Model Selection: Finally, you learned 4 unique points about using a simpler model where ever possible: A simpler model is usually more generic than a complex model. This becomes important because generic models are bound to perform better on unseen datasets. A simpler model requires less training data points. This becomes extremely important because in many cases one has to work with limited data points. A simple model is more robust and does not change significantly if the training data points undergo small changes. A simple model may make more errors in the training phase but it is bound to outperform complex models when it sees new data. This happens because of overfitting. Complexity: The disadvantages the first person is likely to face because of a complex model are (mark all that apply): 1. He’ll need more training data to ‘learn’ 2. Despite the training, he may as well not learn and perform poorly in the real world Overfitting: The possibility of overfitting exist...

Naive Bayes

Naive Bayes Naïve Bayes is a probabilistic classifier that returns the probability of a test point belonging to a class P(Ci|x) = P(x|Ci)P(Ci)/ P(x) where Ci denotes the classes, and X denotes the features of the data point. Ex: C1, C2 or C = edible/poisonous The feature ‘cap-shape’ is represented by X and X can take the values CONVEX, FLAT, BELL, etc The probability of a CONVEX mushroom being edible, P(C = edible | X = CONVEX) is given by: P( X = CONVEX | C = edible) . P(C = edible) / P(X = CONVEX) Comprehension - Naive Bayes with Two Features S.No Type of mushroom   Cap shape 1.       Poisonous         Convex 2.       Edible Convex 3.       Poisonous Convex 4.       Edible Convex 5.       Edible Convex 6.       Poisonous Convex 7.       Edible Bell 8.       Edible Bell 9.    ...