My textbooks tells me to use the following import statements:
from sklearn.tree import DecisionTreeClassifier, DecisionTreeRegressor
from sklearn.ensemble import RandomForestClassifier, GradientBoostingClassifier
from sklearn.model_selection import train_test_split, cross_val_score, GridSearchCV
Instead of doing all that can I simply do
import sklearn
Or if I can't just do that, can I just do
import sklearn.tree
import sklearn.ensemble
import sklearn.model_selection
I'd like to understand the differences. I want to understand how importing works and not just for sklearn. Are certain options faster or require less ram?
Thanks