What is the primary purpose of python code quoted below? ##…

What is the primary purpose of python code quoted below? ## param_grid = { ‘bootstrap’: [True],   ‘max_depth’: [40, 60, 80, 100], ‘max_features’: [1,2,3],  ‘min_samples_leaf’: [3, 4, 5],   ‘min_samples_split’: [8, 10, 12],   ‘n_estimators’: [100, 200, 300, 1000] } rfc = RandomForestClassifier() grid_search = GridSearchCV(estimator = rfc, param_grid = param_grid,                       cv = 3, n_jobs = -1, verbose = True)               ##

Please use the data below, calculate the gini indexes: Re…

Please use the data below, calculate the gini indexes: Record Attribute: home type Attribute: salary class 1 31 3 1 2 30 1 0 3 6 2 0 4 15 4 1 5 10 4 0 please calculate:  gini index (hometype 15) = ?  Gini index (split) = ? Please show your calculation process to get full points. (Hint: gini index formula: Gini index =1-∑(Pj2 ), where j range from 1 to n. Pj is relative frequency of class j in T; n is number of classes; T is data size. Gini index (split) = (N1/N) * gini(T1)+(N2/N)*gini(T2). )