from sklearn.datasets import load_iris
from sklearn.tree import DecisionTreeClassifier

# Load the iris dataset
iris = load_iris()

# Define the decision tree classifier
clf = DecisionTreeClassifier()

# Fit the classifier to the data
clf.fit(iris.data, iris.target)

# Make predictions on new data
new_data = [[5.0, 3.5, 1.3, 0.2], [6.0, 3.0, 4.8, 1.8], [7.3, 2.9, 6.3, 1.8]]
preds = clf.predict(new_data)

# Set a threshold for the classifier
threshold = 0.5

# Make predictions using the threshold
probs = clf.predict_proba(new_data)
threshold_preds = (probs[:, 1] >= threshold).astype(int)

# Print the original predictions and the predictions with threshold
print('Original predictions:', preds)
print('Predictions with threshold:', threshold_preds)