Commit Graph

329 Commits

Author SHA1 Message Date
Vrishank Bhardwaj ed5a0cac6b [MRG+1] Update docstrings of KMeans.inertia_ (#9920)
[MRG+2] Update docstrings of KMeans.inertia_
2017-10-15 18:56:18 -07:00
Hanmin Qin 32ac22870d [MRG+1] Fix warnings in lgtm.com (remove redundant code) (#9719) 2017-09-14 11:42:58 +02:00
tobycheese da415db476 DOC remove unnecessary line (#9504) 2017-08-07 08:48:07 +10:00
Loïc Estève 1bb8826fd2 Fix pdf doc generation
Use 4 plots instead of one so that unsupervised_learning.rst can show png separately.

Partially reverts #9030. Minor changes for consistent labeling.
2017-06-26 14:13:20 +02:00
Aarshay Jain 1d4e18a1a7 [MRG + 1] 10 more examples fixed with matplotlib 2.0 updates (#9030)
* examples/covariance/plot_outlier_detection.py - matplotlib2.0 update

* examples/cluster/plot_kmeans_silhouette_analysis.py - matplotlib2.0 update

* examples/cluster/plot_birch_vs_minibatchkmeans.py - matplotlib2.0 + pep8 fix

* examples/cluster/plot_cluster_iris.py - matplotlib2.0 update

* examples/cluster/plot_agglomerative_clustering.py - matplotlib2.0 update

* examples/cluster/plot_ward_structured_vs_unstructured.py - matplotlib2.0 update

* examples/cluster/plot_kmeans_assumptions.py - matplotlib2.0 update

* examples/classification/plot_lda_qda.py - matplotlib2.0 + pep8 fix

* examples/calibration/plot_calibration.py - matplotlib2.0 update

* examples/plot_johnson_lindenstrauss_bound.py - matplotlib2.0 update

* flake8 changes

* reversing changes for plot_kmeans_assumptions & plot_agglomerative_clustering

* cluster/plot_cluster_iris.py - major fixes

* examples/cluster/plot_cluster_iris.py - flake8 fix

* examples/cluster/plot_cluster_iris.py - 3d projection error fix

* cluster/plot_cluster_iris.py - elevation and azimuth setting
2017-06-21 16:04:53 +02:00
plagree 1f6ac72df7 [MRG] DOC examples with correct notebook style (#9061)
* DOC examples with correct notebook style

* Modifications in examples/ to avoid unwanted notebook style

* Remove last notebook style example

* Space formatting to avoid notebook style
2017-06-20 14:48:57 +02:00
Nate Guerin 25917bae33 Use tuples for color specification (#9149)
In the Matplotlib 'Specifying Colors' section, neither list nor array is a valid color specification type.  When this example is run using Python 3.5, and matplotlib 2.0.2 (latest), it errors with the message: 

"ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()"

This change preserves the semantics of the example while allowing it to successfully run by converting to tuples for the matplotlib color specification.
2017-06-19 00:33:10 +10:00
Loïc Estève b185c4e8f9 FIX examples with numpy 1.13 2017-06-09 00:21:41 +02:00
Naoya Kanai bd0fc236e0 [MRG+1] MAINT drop SciPy < 0.13 (#8854)
Remove sklearn.utils.fixes functions that are not needed for scipy >= 0.13 and keep deprecated wrappers in other modules.
2017-06-02 23:36:33 +02:00
Bob Baxley db370178d6 [MRG+1] [DOC] Adding GMM to plot_cluster_comparison.py (#6305)
* Adding GMM to plot_cluster_comparison.py and changing number of components in all algos to 3.

* adding two datasets to clustering comparision example

* Adding GMM to plot_cluster_comparison.py and changing number of components in all algos to 3.

* adding two datasets to clustering comparision example

* GMM example using GaussianMixture

* fixing lint errors; changing order of datasets in the columns so that no_structure is at the end.

* adding warning supression.

* fixing warning supression.

* hand-tuned cluster parameters

* moved list of algo names; cleaning up color cycling

* fixing islice stop to be an int

* change default to params, make plot color-blind compatible, fix spelling error

* new color palette that is more color-blind friendly
2017-03-21 23:15:37 +01:00
Patrick Pei bd4e00b1eb [MRG] DOC Example: Fix minor standard output formatting (#7456) 2016-09-20 08:06:36 +10:00
fisache b242539fc0 Fix minor typo 2016-07-13 16:23:14 +09:00
Thierry Guillemot 78a674875e Correct the deprecation of the random_integers numpy function. (#6712) 2016-04-26 16:08:48 +02:00
Saiwing Yeung c5fd5cbb7e DOC: fixed typos and one style issue in plot examples
The comment in a few example plots refer to "the mesh [x_min, m_max] x
[y_min, y_max]" when it should be "x_max".

Also fixed the spacing in plot_random_forest_embedding.py `[x_min,
x_max] x [y_min, y_max]` to `[x_min, x_max]x[y_min, y_max]` to comply
with the coding style of other files with similar code (like those in
the current pull request).
2016-04-25 11:59:40 +08:00
YenChenLin 46fc1be145 Remove redundant words in sklearn 2016-02-23 16:54:03 +08: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
Gael Varoquaux 317dea8a05 Merge pull request #6005 from seales/SpellingFix
[MRG+1] General spelling fixes
2016-01-04 13:42:20 +01:00
MechCoder ad758d2069 FIX: Cluster centers after fir in KMeans and MBKMeans need not be ordered in the same way 2015-12-19 23:59:32 -05:00
seales 0485ada58b General spelling fixes 2015-12-16 09:46:42 -08:00
Qimu Zheng 0e074a009a Fix bug in mini batch kmeans example 2015-12-16 14:19:31 +08:00
Andreas Mueller 5b1aca08c2 MAINT Don't use deprecated 1d X (or deprecated matplotlib stuff) in examples. 2015-12-10 12:11:48 -05:00
Gael Varoquaux b043d643d1 DOC: Comment better the importance of the mask
To address #5921
2015-11-26 07:34:39 +01:00
Raghav R V f67e911124 DOC Modify documentation/examples for the new model_selection module 2015-10-29 16:49:23 +01:00
Phil Roth f9e07364d6 Adding a new kmeans example. 2015-07-23 14:43:26 -04:00
Yury Zhauniarovich d9e46314b0 Updated graph ranges
The minimum and maximum values for the graph were not correctly defined.
2015-07-10 14:13:56 +02:00
Andreas Mueller 1491843d95 DOC minor fixes in formatting, don't use deprecated n_components in Agglomerative 2015-03-25 20:20:29 -04:00
Andreas Mueller 46060feddc Pass the appropriate include_self argument to kneighbors_graph everywhere. 2015-03-16 13:30:22 -04:00
Andreas Mueller 9bc4de8dae some fixes for sphinx and in examples 2015-03-02 12:50:53 -05:00
Loïc Estève 7b24628421 DOC python 3 fix in plot_kmeans_silhouette_analysis.py 2015-02-18 16:24:41 +01:00
Raghav R V 444bf22736 DOC ENH Simplify the example code; Add plots for n_clusters = 3 and 5 2015-01-20 06:02:25 +05:30
Raghav R V ae95a0c2e9 DOC ENH Remove the vertical x = 0 line and plot avg silhouette score line 2015-01-16 23:48:20 +05:30
Raghav R V f04266a7c2 DOC ENH Fill the silhouette with the corresponding cluster color
PEP8 Minor PEP8 Fixes too.
2015-01-16 23:48:20 +05:30
Raghav R V b5b1c5993f DOC Add silhouette analysis plot for KMeans 2015-01-16 23:48:20 +05:30
Andreas Mueller c970fb51e7 COSMIT spelling 2015-01-15 15:09:35 -05:00
MechCoder 54e7f886ce Rename global_clusters to n_clusters again 2014-12-05 14:07:17 +01:00
MechCoder 767bf266d5 API: Rename n_clusters to global_clusters 2014-12-05 14:07:16 +01:00
MechCoder b01e21e1b2 Made the following changes.
1. Update doc and whatsnew.rst
2. Fix coloring
2014-12-05 14:07:16 +01:00
MechCoder 129f371f85 DOC: Modification to the documentation of threshold 2014-12-05 14:07:16 +01:00
MechCoder 000c9b199b Made the following changes
1. Remove call to KNeighborsClassifier
2. Set default branching_factor to 50
2014-12-05 14:07:16 +01:00
MechCoder abc78088b9 Made the following changes
1. Fix condition for checking threshold.
2. Fix the global clustering by remapping the samples to the
   subcluster_centers.
3. Add tests for threshold.
4. Minor doc and cosmits.
2014-12-05 14:07:16 +01:00
MechCoder a4e7ff3da1 DOC: Update documentation of _CFNode 2014-12-05 14:07:16 +01:00
MechCoder 64a4a1181f Made the following changes
1. Inherit from BaseEstimator to enable pretty printing
2. Add transform function
2014-12-05 14:07:16 +01:00
MechCoder 08d3dfef4a STY: Cosmits in documentation 2014-12-05 14:07:16 +01:00
MechCoder f4afc7ecf0 ENH: Add narrative documentation 2014-12-05 14:07:16 +01:00
MechCoder 46f29519ff ENH: Sparse matrix support 2014-12-05 14:07:16 +01:00
MechCoder dcfdf6c7ce ENH: Added example to compare birch and minibatchkmeans 2014-12-05 14:07:16 +01:00
MechCoder d5a654d5e8 ENH: Made the following changes
1. Added partial_fit and predict methods
2. Inherit from ClusterMixin from fit_predict methods
3. Removed inplace modification of X and self.copy
4. Added final global clustering and n_clusters param.
2014-12-05 14:07:16 +01:00
MechCoder 0ed517fa90 Made the following changes
1. Improved documentation.
2. Added sanity test.
3. Moved example to a separate folder
4. Optimised compuation of centroids.
5. Added underscore to public attributes.
2014-12-05 14:07:16 +01:00
MechCoder 8a8ead3009 Minor typo in plot_dict_face_patches.py 2014-11-21 15:15:37 +01:00
MechCoder a049adac9c DOC: Typo in dict_faces.py 2014-11-20 14:00:55 +01:00