scikit-learn/scikit-learn

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

Open

#10,329 opened on 2017年12月15日

GitHub で見る
 (25 comments) (0 reactions) (0 assignees)Python (66,084 stars) (27,020 forks)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

コントリビューターガイド