XGBoost Objective is Changed I am trying to use XGBoost in python for logistic regression. I am calling it as follows

import numpy as np
from xgboost import XGBClassifier

x_train = np.array([[1], [2], [3], [4]])
y_train = np.array([0, .25, .75, 1])

params = {
    "objective": "reg:logistic"
}

model = XGBClassifier(**params)
model.fit(x_train, y_train)
print(model.objective)


This outputs an objective of "multi:softprob" instead of "reg:logistic." Therefore, it isn't doing a logistic regression. How can I make sure that XGBoost doesn't switch the objective?
The solution to the above problem was to use XGBRegressor instead of XGBClassifier. Just swapping it in seems to have worked.