I would like to show two dataset random forest feature selection results in one bar, without overlapping. My solution overlaps with other data. Can I show them separately?
XData2 = Data2.drop(['Label'], axis=1)
yData2 = Data2['Label']
Xtrain, Xtest, ytrain, ytest = train_test_split(XData2, yData2, test_size = 0.33, random_state = 42)
RF_featuresData2 = RandomForestClassifier(n_estimators=100, random_state=0)
RF_featuresData2.fit(Xtrain, ytrain)
feature_scoresData2 = pd.Series(RF_featuresData2.feature_importances_, index=Xtrain.columns).sort_values(ascending=False)
sns.barplot(x=feature_scoresData2, y=feature_scoresData2.index)
Same steps I did for Data1 and also the result like this:
XData1 = Data1.drop(['Label'], axis=1)
yData1 = Data1['Label']
X_train, X_test, y_train, y_test = train_test_split(XData1, yData1, test_size = 0.33, random_state = 42)
RF_featuresData1 = RandomForestClassifier(n_estimators=100, random_state=0)
RF_featuresData1.fit(X_train, y_train)
feature_scoresData1 = pd.Series(RF_featuresData1.feature_importances_, index=X_train.columns).sort_values(ascending=False)
sns.barplot(x=feature_scoresData1, y=feature_scoresData1.index)
These are the plots I did. My goal is to combine them into one plot. Like in the seaborn documentation page, but for 2 datasets.