Skip to content

Instantly share code, notes, and snippets.

Viktor Pekar vpekar

  • Birmingham, UK
Block or report user

Report or block vpekar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@vpekar
vpekar / plot_compare_reduction.py
Created Nov 3, 2016
Comparing feature selection methods including information gain and information gain ratio
View plot_compare_reduction.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
=================================================================
Selecting dimensionality reduction with Pipeline and GridSearchCV
=================================================================
This example constructs a pipeline that does dimensionality
reduction followed by prediction with a support vector
classifier. It demonstrates the use of GridSearchCV and
@vpekar
vpekar / document_classification_20newsgroups.py
Last active Mar 13, 2017
Document classification with feature selection using information gain
View document_classification_20newsgroups.py
"""
======================================================
Classification of text documents using sparse features
======================================================
This is an example showing how scikit-learn can be used to classify documents
by topics using a bag-of-words approach. This example uses a scipy.sparse
matrix to store the features and demonstrates various classifiers that can
efficiently handle sparse matrices.
You can’t perform that action at this time.