Skip to content

altheanabila/Decision-Tree-Simulation-in-Python

Repository files navigation

Decision-Tree-Simulation-in-Python

I try to run a simple Decision Tree simulation of Movie collectiond data by finding out how each independent variables affect budget. Using python, we can visualize the result of the decision.

  1. import related libraries

text image

  1. Extracting the data Movie_regression.csv into pandas dataframe

textimage

  1. Treat the missing value by replacing with mean.

textimage text image

  1. Creating dummy variable, for variable with string value

textimage

  1. Define X variable and y variable

text image

  1. Use test train split with test size: 0.2

text image

  1. import decision tree regressor, and define prediction of y

text image

  1. Find mean squared error and r2 score, define dot data

text image

  1. Display regression tree graph

textimage

text image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published