Laporan BD-01 Mushroom Classification

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Report BD-01 Mushroom Classification Task

Using Random Forests and Gradient Boosting


Nam : Favo Perdana Hadiyanto Saputra
No urut : 41

Used for linear algebra and data processing

Reading csv from selected file using pandas

used to separate each string in the caller series at the passed separator. A data frame is
returned with all the possible values after splitting every string.

As explained on the comment tag

It is required because we cant classify using string


As explained on the comment tag

Make pipelines with using random forest classifier and gradient boosting classifier, then
declaring the required parameters.

Make a new model to fill the fitted model inside, then make an object filled by cross
validation object from pipeline and hyperparameters as mentioned before.
Then fit the model made on respective object, x as class row from train.csv. and y as
class_e and class_p row from replaced string train.csv. The rest is mentioned on the
comment tag

Because test.csv doesn’t have cap-surface_g, the dataframe can’t be fitted each other, then
we have to make a new row on test.csv named cap-surface_g.

Replace class row on test dataframe by using predict model on test dataframe (with added
cap-surface_g).

Replace back changed value before back with e and p

Export the result

You might also like