Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Elements Of Chemical Reaction Engineering

Authors: H. Fogler

6th Edition

013548622X, 978-0135486221

More Books

Students also viewed these Programming questions

Question

Are there diff erent kinds of memory?

Answered: 1 week ago