Currently, I am working on a project. The dataset is balanced roughly in the ratio of 50:50. I created a decision tree classifier. I am achieving decent accuracy (~75%) on validation data but the precision for the target variable is biased. For class=0 it is approx. 98% while for the class = 1 it is just 17%.
I have tried scaling the data using MinMaxScaler still no luck.
model = tree.DecisionTreeClassifier(class_weight={1:30}, min_samples_leaf=160, max_depth=10)
X_train, X_test, y_train, y_test = train_test_split(X, Y, test_size=0.3, random_state=10)
min_max_scaler = preprocessing.MinMaxScaler()
X_train_scaled = min_max_scaler.fit_transform(X_train)
X_test_scaled = min_max_scaler.fit_transform(X_test)
model = model.fit(X_train_scaled, y_train)
prediction = model.predict(X_test_scaled)
print metrics.accuracy_score(y_test, prediction)
print classification_report(y_test, prediction)
Size of x_train_scaled = 12600 and x_test_scaled = 5400 Accuracy: 75% Precision: {0:100%, 1:17%} Recall: {0:74%, 1:100%} F1-Score: {0:85%, 1:29%}
How can I improve the precision of class=1 while still maintaining the overall precision and accuracy?