scikit-learn/scikit-learn

NMF n_components are not properly getting reflected in output when using Grid Search CV

Open

#10,329 建立於 2017年12月15日

在 GitHub 查看
 (25 留言) (0 反應) (0 負責人)Python (66,084 star) (27,020 fork)batch import
Bughelp wantedmodule:decompositionmodule:pipeline

描述

When I executed the example code from this link and analyzed the grid search output (grid.cv_results_['params']), n_components are not properly getting reflected in output.

Posting a small snippet of output of grid.cv_results_['params']:

{'classify__C': 1000,
  'reduce_dim': NMF(alpha=0.0, beta_loss='frobenius', init=None, l1_ratio=0.0, max_iter=200,
    **n_components=None,** random_state=None, shuffle=False, solver='cd',
    tol=0.0001, verbose=0),
  'reduce_dim__n_components': 2},
 {'classify__C': 1000,
  'reduce_dim': NMF(alpha=0.0, beta_loss='frobenius', init=None, l1_ratio=0.0, max_iter=200,
    **n_components=None**, random_state=None, shuffle=False, solver='cd',
    tol=0.0001, verbose=0),
  'reduce_dim__n_components': 4},
 {'classify__C': 1000,
  'reduce_dim': NMF(alpha=0.0, beta_loss='frobenius', init=None, l1_ratio=0.0, max_iter=200,
    **n_components=None**, random_state=None, shuffle=False, solver='cd',
    tol=0.0001, verbose=0),
  'reduce_dim__n_components': 8},

where reduce_dim__n_components are updating for NMF but not the actual n_components in NMF

Thanks, Pat

貢獻者指南

NMF n_components are not properly getting reflected in output when using Grid Search CV · scikit-learn/scikit-learn#10329 | Good First Issue