@@ -1525,19 +1525,20 @@ def Auto_NLP(nlp_column, train, test, target, score_type='',
1525
1525
#params['randomforestclassifier__max_depth'] = sp.stats.randint(2,10),
1526
1526
#params['randomforestclassifier__n_estimators'] = sp.stats.randint(200,500)
1527
1527
#### Adding a CalibratedClassifier to text classification tasks ########################
1528
- if modeltype != 'Regression' :
1529
- if isinstance (target , list ):
1530
- ### There is no need for CalibratedClassifierCV in Multi-Label problems
1531
- pass
1532
- else :
1533
- if X_train .shape [0 ] <= 1000 :
1534
- # This works well for small data sets and is similar to parametric
1535
- method = 'sigmoid' # 'isotonic' # #
1536
- else :
1537
- # This works well for large data sets and is non-parametric
1538
- method = 'isotonic'
1539
- calibrator_flag = True
1540
- print ('Using a Calibrated Classifier in this Multi_Classification dataset to improve results...' )
1528
+ ### Calibrated classifier is needed only for Logistic Regression models. Hence not needed here.
1529
+ # if modeltype != 'Regression':
1530
+ # if isinstance(target, list):
1531
+ # ### There is no need for CalibratedClassifierCV in Multi-Label problems
1532
+ # pass
1533
+ # else:
1534
+ # if X_train.shape[0] <= 1000:
1535
+ # # This works well for small data sets and is similar to parametric
1536
+ # method= 'sigmoid' # 'isotonic' # #
1537
+ # else:
1538
+ # # This works well for large data sets and is non-parametric
1539
+ # method= 'isotonic'
1540
+ # calibrator_flag = True
1541
+ # print('Using a Calibrated Classifier in this classification problem to improve results...')
1541
1542
################ B U I L D I N G A P I P E L I N E H E R E ######################
1542
1543
if top_num_features < top_num_features_limit :
1543
1544
print ("""Since top_num_features = %d, %s model selected. If you need different model, increase it >= %d.""" % (
0 commit comments