From the course: Practical Python for Algorithmic Trading

Unlock the full course today

Join today to access over 23,800 courses taught by industry experts.

Compute machine learning regression model

Compute machine learning regression model - Python Tutorial

From the course: Practical Python for Algorithmic Trading

Compute machine learning regression model

- [Instructor] The previous investment strategy took into account a classification model that calculated the direction of the stock, the categories up and down. But we are missing good characteristics on the prediction because the continuous prediction will give us the amount of percentage increase, which may give us better clues about whether to invest or not. In this tutorial, I will show you the differences between classification and regression models and develop the regression model for our investment strategy. So we load the datasets. We separate the variables in Target and Explanatory. This time, we are using the change_tomorrow, the numerical variable, instead of the categorical variable. We execute. We create the machine learning model from the SK Learn library within the three module deficient tree regressor. Because this time, we want to calculate a numerical variable. As always, we create the instance deficient…

Contents