Question: Create python class. This class should carry the following items; a. Class variables: i. K-Fold (int) ii. Activation Function (string) iii. Loss Function (string) iv.

Create python class. This class should carry the following items; a. Class variables: i. K-Fold (int) ii. Activation Function (string) iii. Loss Function (string) iv. Cost Function (string) v. Split Type (int) vi. Training Set, Validation Set, Test Set are all in matrix/vector (array) form. vii. Split Range (float) viii. Val_Range (float) ix. Weights (WO,W1......wn) X. L2 penalty (float) xi. L1 penalty (float) xii. Batch Size (int) xiii. Epoch (int) Class methods i. BF_SLR (...) method [Brute Force Simple Linear Regression] ii. POIR_GD(...,L2,L1) method [High Order Polynomial Regression with Gradient Descent] ii. MLR_GDI...,L2,L1) method [Multiple Linear Regression with Gradient Descent] iv. CostF(...) method for calculating Cost. IR1: In Class methods, Brute Force Simple Linear Regression model should try to search only (wo, w1) coefficients The input parameters of this method is search_range1, search_range2. (Single input "x" is used. If the training set has multiple features like x1, x2, X3..., then we are going to take the first x1 as input) Ex: BF_SLR(Training_Set, range1, range2) IR2: In Class methods, POIR_GD method use high order polynomial regression to find solution. PolOrder is used for the complexity degree of the polynomial. (Single input "x" is used. If the training set has multiple features like x1, x2, X3..., then we are going to take the first x1 as input). L2 penalty or L1 penalty is used to regularize the Polynomial solution for generalization. You can use Split_Type as; - Split_Type=0: Here you may use Training / Test Splitting by defining Split Range - Split_Type=1: Here you may use Training Nalidation/Test Splitting by defining Split Range, Val_Range - Split Type=2: Here you may use k-Fold Cross Validation by defining k-Fold. Ex: POIR_GD (Training_Set, Val_Set, Test_Set, Polorder, L2 penalty, L1 penalty, Split_Type) IR3 : In Class methods, MLR_GD uses all features (x1,x2,...,XN). L2 penalty or L1 penalty is used to regularize the Multiple Linear Regression solution for generalization. You can use Split_Type as; - Split_Type=0: Here you may use Training / Test Splitting by defining Split Range - Split_Type=1: Here you may use Training /Validation/Test Splitting by defining Split Range, Val_Range - Split_Type=2: Here you may use k-Fold Cross Validation by defining k-Fold. Ex: MLR_GD (Training_Set, Val_Set, Test_Set, L2 penalty, L1 penalty, Split_Type) IR4 : In Class methods, CostF function is used for calculating Cost Function. This method uses function name as input parameter. [We can use RSS, MSE, RMSPROP ] Ex: Costf ("RSS")

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!