I am performing crop classification using random forest technique on Sentinel-2 data. The file size of image on which classification has to be performed is only 26 mb. I am using Jupyer notebook. Any idea why is it taking so much time? My system configuration is i7 12th gen 16gb ram. Below is my code-
from sklearn.ensemble import RandomForestClassifier, GradientBoostingClassifier
from sklearn import svm
# Initialize our models
rf = RandomForestClassifier( n_estimators = 500, criterion = 'gini', max_depth = 4,
min_samples_split = 2, min_samples_leaf = 1, max_features = 1.0,
bootstrap = True, oob_score = True, n_jobs = 1, random_state = None, verbose = True)
rf = rf.fit(X_train, Y_train)
print ("Trained model :: ", rf)
While the code is still running it is showing the statement -
"[Parallel(n_jobs=1)]: Using backend SequentialBackend with 1 concurrent workers. [Parallel(n_jobs=1)]: Done 500 out of 500 | elapsed: 68.2min finished."
Also except the above written code all the other steps are running quite fast for eg. pairing the image I want to classify and training roi NumPy arrays so I may feed them to the models, Splitting the data up in train and test sets etc.