Question: python got this error '
python
got this error
'<' not supported between instances of 'str' and 'int'
when i manually assign class weights in logistic regression
weights = {0:0.1, 1:1} X_train, X_test, y_train, y_test = train_test_split(x, y, test_size=0.15, random_state = 0) lr = LogisticRegression(solver='newton-cg',class_weight=weights)
when i use class_weight='balanced' there is no error
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
