Commit Graph

352 Commits

Author SHA1 Message Date
Olivier Grisel e012b7b3e7 FIX assert_array_almost_equal in test_image 2016-04-07 09:58:36 +02:00
Olivier Grisel 2efa626f9b [MRG] Fix strict tests
* FIX test_common: assert_greater_equal(iter_, 1)

The previous check was too strict. It is fine for an estimator to
decide that is has converged in one pass over the data.

* STYLE PEP8

* FIX test_reconstruct_patches_perfect_color too strict

* STYLE flake8 fixes
2016-04-07 09:55:08 +02:00
dsquareindia eb242c26d9 ENH: FeatureHasher now accepts string values. 2016-03-11 20:37:10 +05:30
Lars Buitinck 2e4aafd19c MAINT remove my email address
I'm getting too many individual support requests. People should
use the mailing list.
2016-03-04 10:43:41 +01:00
Nelson Liu fcfaa5fc37 Updated examples and tests that use scipy's lena
scipy.misc.lena will be removed in scipy version 0.17.
This changes the example to use scipy.misc.face instead.
2016-02-11 09:13:40 +01:00
YenChenLin aec8dd08e8 Add doc to clarify the use of DictVectorizer when categorical features are represented as numeric values 2016-02-05 15:34:50 +08:00
Amlan Kar 201e292c98 Typo
The text should say negative value for max_df *or* min_df
2016-01-27 18:02:04 +05:30
Alexander Loginov 3e4ebacbbf I guess it is some small mistake
And we need to fix it
2015-12-15 00:29:41 +00:00
Alexandre Gramfort 95940b5b2f Merge pull request #5980 from dshieble/Odd_docstring_for_CountVectorizer_analyzer
removed the doc line 'Only applies if analyzer == 'word'' from CountVectorizer analyzer
2015-12-08 09:31:49 +01:00
Dan Shiebler 8d1ed03300 removed the doc line 'Only applies if analyzer == 'word'' from CountVectorizer analyzer' 2015-12-07 20:16:53 -05:00
Wenjian Huang 75d9cea012 Update text.py 2015-11-21 08:51:35 +08:00
Arthur Mensch 986fb60947 C file removal + cython build + Travis build cache 2015-11-04 14:30:06 +01:00
Raghav R V 3f8743f47b Main Commits - Major
--------------------

* ENH Reogranize classes/fn from grid_search into search.py
* ENH Reogranize classes/fn from cross_validation into split.py
* ENH Reogranize cls/fn from cross_validation/learning_curve into validate.py

* MAINT Merge _check_cv into check_cv inside the model_selection module
* MAINT Update all the imports to point to the model_selection module
* FIX use iter_cv to iterate throught the new style/old style cv objs
* TST Add tests for the new model_selection members
* ENH Wrap the old-style cv obj/iterables instead of using iter_cv

* ENH Use scipy's binomial coefficient function comb for calucation of nCk
* ENH Few enhancements to the split module
* ENH Improve check_cv input validation and docstring
* MAINT _get_test_folds(X, y, labels) --> _get_test_folds(labels)
* TST if 1d arrays for X introduce any errors
* ENH use 1d X arrays for all tests;
* ENH X_10 --> X (global var)

Minor
-----

* ENH _PartitionIterator --> _BaseCrossValidator;
* ENH CVIterator --> CVIterableWrapper
* TST Import the old SKF locally
* FIX/TST Clean up the split module's tests.
* DOC Improve documentation of the cv parameter
* COSMIT consistently hyphenate cross-validation/cross-validator
* TST Calculate n_samples from X
* COSMIT Use separate lines for each import.
* COSMIT cross_validation_generator --> cross_validator

Commits merged manually
-----------------------

* FIX Document the random_state attribute in RandomSearchCV
* MAINT Use check_cv instead of _check_cv
* ENH refactor OVO decision function, use it in SVC for sklearn-like
  decision_function shape
* FIX avoid memory cost when sampling from large parameter grids

ENH Major to Minor incremental enhancements to the model_selection

Squashed commit messages - (For reference)

Major
-----

* ENH p --> n_labels
* FIX *ShuffleSplit: all float/invalid type errors at init and int error at split
* FIX make PredefinedSplit accept test_folds in constructor; Cleanup docstrings
* ENH+TST KFold: make rng to be generated at every split call for reproducibility
* FIX/MAINT KFold: make shuffle a public attr
* FIX Make CVIterableWrapper private.
* FIX reuse len_cv instead of recalculating it
* FIX Prevent adding *SearchCV estimators from the old grid_search module
* re-FIX In all_estimators: the sorting to use only the 1st item (name)
    To avoid collision between the old and the new GridSearch classes.
* FIX test_validate.py: Use 2D X (1D X is being detected as a single sample)
* MAINT validate.py --> validation.py
* MAINT make the submodules private
* MAINT Support old cv/gs/lc until 0.19
* FIX/MAINT n_splits --> get_n_splits
* FIX/TST test_logistic.py/test_ovr_multinomial_iris:
    pass predefined folds as an iterable
* MAINT expose BaseCrossValidator
* Update the model_selection module with changes from master
  - From #5161
  -  - MAINT remove redundant p variable
  -  - Add check for sparse prediction in cross_val_predict
  - From #5201 - DOC improve random_state param doc
  - From #5190 - LabelKFold and test
  - From #4583 - LabelShuffleSplit and tests
  - From #5300 - shuffle the `labels` not the `indxs` in LabelKFold + tests
  - From #5378 - Make the GridSearchCV docs more accurate.
  - From #5458 - Remove shuffle from LabelKFold
  - From #5466(#4270) - Gaussian Process by Jan Metzen
  - From #4826 - Move custom error / warnings into sklearn.exception

Minor
-----

* ENH Make the KFold shuffling test stronger
* FIX/DOC Use the higher level model_selection module as ref
* DOC in check_cv "y : array-like, optional"
* DOC a supervised learning problem --> supervised learning problems
* DOC cross-validators --> cross-validation strategies
* DOC Correct Olivier Grisel's name ;)
* MINOR/FIX cv_indices --> kfold
* FIX/DOC Align the 'See also' section of the new KFold, LeaveOneOut
* TST/FIX imports on separate lines
* FIX use __class__ instead of classmethod
* TST/FIX import directly from model_selection
* COSMIT Relocate the random_state documentation
* COSMIT remove pass
* MAINT Remove deprecation warnings from old tests
* FIX correct import at test_split
* FIX/MAINT Move P_sparse, X, y defns to top; rm unused W_sparse, X_sparse
* FIX random state to avoid doctest failure
* TST n_splits and split wrapping of _CVIterableWrapper
* FIX/MAINT Use multilabel indicator matrix directly
* TST/DOC clarify why we conflate classes 0 and 1
* DOC add comment that this was taken from BaseEstimator
* FIX use of labels is not needed in stratified k fold
* Fix cross_validation reference
* Fix the labels param doc

FIX/DOC/MAINT Addressing the review comments by Arnaud and Andy

COSMIT Sort the members alphabetically
COSMIT len_cv --> n_splits
COSMIT Merge 2 if; FIX Use kwargs
DOC Add my name to the authors :D
DOC make labels parameter consistent
FIX Remove hack for boolean indices; + COSMIT idx --> indices; DOC Add Returns
COSMIT preds --> predictions
DOC Add Returns and neatly arrange X, y, labels
FIX idx(s)/ind(s)--> indice(s)
COSMIT Merge if and else to elif
COSMIT n --> n_samples
COSMIT Use bincount only once
COSMIT cls --> class_i / class_i (ith class indices) -->
perm_indices_class_i

FIX/ENH/TST Addressing the final reviews

COSMIT c --> count
FIX/TST make check_cv raise ValueError for string cv value
TST nested cv (gs inside cross_val_score) works for diff cvs
FIX/ENH Raise ValueError when labels is None for label based cvs;
TST if labels is being passed correctly to the cv and that the
ValueError is being propagated to the cross_val_score/predict and grid
search
FIX pass labels to cross_val_score
FIX use make_classification
DOC Add Returns; COSMIT Remove scaffolding
TST add a test to check the _build_repr helper
REVERT the old GS/RS should also be tested by the common tests.
ENH Add a tuple of all/label based CVS
FIX raise VE even at get_n_splits if labels is None
FIX Fabian's comments
PEP8
2015-10-23 17:28:08 +02:00
Raghav R V a87011262a FIX precision to float64 across the codebase 2015-10-16 11:20:29 +02:00
Joshua Loyal 60b41a8044 correct optional arguments for FeatureHasher 2015-10-08 11:58:09 -04:00
Cindy Sridharan 0a7a1db8c7 removed list around sorted 2015-09-16 15:24:29 -07:00
Cindy Sridharan 4366ba500d use sklearn.utils.random 2015-09-16 15:24:28 -07:00
Cindy Sridharan 4af0c49f27 vocabulary of type set now coerced to list to preserve iteration ordering after serialization 2015-09-16 15:24:28 -07:00
jnothman 250e509e86 ENH O(1) stop-word lookup when list provided
The docstring says stop_words can be a list, but it should be accessed as a set.
2015-08-08 22:55:13 +10:00
Joel Nothman 0b83c989bc DOC tweaks for feature_extraction.text 2015-07-28 13:28:58 +10:00
Lars Buitinck 1f3ebb02fc DOC FeatureHasher takes (finite) numbers as values
Fixes #4882.
2015-07-12 13:20:06 +02:00
pianomania 243983daaf try to mollify travis 2015-07-09 20:31:02 +08:00
pianomania bf8695451b add an example for FeatureHasher 2015-07-08 21:37:07 +08:00
pianomania 4491d10ced add a example for FeatureHasher 2015-07-08 13:57:21 +08:00
Andreas Mueller 0650d5502e DOC adding backlinks to docstrings 2015-06-03 00:24:04 -04:00
Andreas Mueller a8626b36a6 TST/COSMIT remove nose call boilerplate 2015-05-28 14:54:01 -04:00
Lars Buitinck bb592f3865 DOC fix comment in tf-idf: log+1, not log(1+x)
[ci skip]
2015-05-23 16:12:20 +02:00
Andreas Mueller 6e54079393 Merge pull request #4356 from vortex-ape/dict_vectorizer
Fixes #4355: DictVectorizer.restrict docstring unclear
2015-04-01 16:44:40 -05:00
Raghav R V cd2ee7e454 MAINT docstring --> comments to prevent nose from using doc in verbose mode 2015-03-21 11:16:49 +05:30
Vinayak Mehta ef9cbcb214 added docstrings for restrict
updated docstring

fixed build error

fixed build issue occuring due to different python versions

added doctest: +ELLIPSIS

fixed output

Reformulated docstring
2015-03-17 22:23:13 +05:30
Andreas Mueller 6303af4ec2 DOC make defaults more explicit in text feature extraction. 2015-03-16 14:25:24 -04:00
Olivier Grisel ed5519fe8a Merge pull request #4307 from amueller/more_quite_testing
[MRG] catch some warnings, be less verbose in testing.
2015-03-03 09:27:15 +01:00
Andreas Mueller f1b8283c95 catch some warnings, be less verbose in testing. 2015-03-02 14:40:35 -05:00
Andreas Mueller 9bc4de8dae some fixes for sphinx and in examples 2015-03-02 12:50:53 -05:00
Lars 73e5cf5dbf Merge pull request #3933 from fabianp/loss_liblinear
MAINT Change loss names for LinearSVC and LinearSVR
2015-02-10 17:49:10 +01:00
Loïc Estève 5c0c5c672c MAINT use absolute imports in tests
as per the guideline in:
http://scikit-learn.org/stable/developers/#coding-guidelines
2015-02-10 13:40:31 +01:00
Fabian Pedregosa dbc5d707c6 Change loss names for LinearSVC and LinearSVR()
the names are now consistent across methods

In LinearSVC:
   'l1' -> 'hinge'
   'l2' -> 'squared_hinge'
In LinearSVR:
   'l1' -> 'epsilon_insensitive'
   'l2' -> 'squared_epsilon_insensitive'
2015-02-09 11:09:16 +01:00
Lars 38104ff4e8 Merge pull request #4193 from lesteve/deactivate-travis-default-venv
CI: test with NumPy 1.6.1, fix for its broken bincount
2015-02-03 16:25:36 +01:00
Raghav R V 21369dd6a1 TST Removal or modification of stop_words_ should not affect transform.
DOC Add a line to {Count, Tfidf}Vectorizer about removal of stop_words_
DOC Add documentation of stop_words_ attr in TfidfVectorizer
2015-02-02 02:20:04 +05:30
Loïc Estève cedf023e20 Move import statement 2015-02-01 18:20:30 +01:00
Loïc Estève 67dcd99d82 TST fix tests with numpy 1.6.1
np.bincount raises an Exception with empty input arrays for numpy versions < 1.6.2
Add utils.fixes.bincount to tackle this issue and use it instead of np.bincount
2015-02-01 15:49:49 +01:00
Raghav R V b3fbccca38 FIX various mismatch between docstring and signature params
DOC max_iterations -> max_iter. Make it consistent with kmeans

MAINT Replace the deprecated dx parameter with d in the docstrings

MAINT Deprecation warning for max_iterations parameter.
2015-01-16 11:54:57 -05:00
Raghav R V abd31d2cad MAINT Make uniform the error raised for not fitted condition 2015-01-12 00:33:40 +05:30
Lukas Michelbacher d67e9c4d8f Add newline before bullets
Without the extra line, the headline is rendered in bold.
2015-01-08 18:37:26 +00:00
Lukas Michelbacher de72e1db23 Add dependence to max_features to docstring
As requested in 4032#issuecomment-68478422.
2015-01-02 09:10:41 +00:00
MechCoder eb660edbf3 FIX: Raise error when patch width/height is greater than image width/height 2014-11-21 10:23:47 -05:00
Christian Stade-Schuldt cd7b43ccf9 TST make catch_warnings blocks more robust 2014-10-12 18:20:18 +02:00
Lars Buitinck fd4ba4d9cb MAINT: set attributes as last action in DictVectorizer.fit
Prevents getting a half-initialized transformer when an exception occurs.
2014-09-23 12:33:51 +02:00
Lars Buitinck a7a05120e2 MAINT: handle frombuffer with empty 1st arg in utils.fixes 2014-09-22 17:23:51 +02:00
Lars Buitinck 7354359bca MAINT refactor DictVectorizer's transform+fit_transform (1)
Also:

* postpone attribute setting to the end of the fit_transform algorithm,
  so that exceptions leave the transformer in a consistent state;
* call sort_indices on CSR result.

Didn't refactor fit as I couldn't get the code shorter without making
_transform cumbersome to read.
2014-09-22 16:44:47 +02:00