* fixed a cross-platform endian issue
* removed a duplicated dtype checking
* Trigger [arm64] CI
* added an entry to doc/whats_new/v0.24.rst
* moved my fix entry to sklearn.tree section
* Update sklearn/tree/_tree.pyx
Added comments
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
* code simplified
* fixed a typo in sklearn/tree/_tree.pyx
* Update doc/whats_new/v0.24.rst
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
* updated doc/whats_new/v0.24.rst
* Update sklearn/tree/_tree.pyx
Added a space after "if", to be PEP8 compliant.
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
* Update sklearn/tree/_tree.pyx
Co-authored-by: Qi Zhang <q.zhang@ibm.com>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
Co-authored-by: Juan Carlos Alfaro Jiménez <JuanCarlos.Alfaro@uclm.es>
Co-authored-by: Nicolas Hug <contact@nicolas-hug.com>
Co-authored-by: thomas.wesselink@ing.com <thomas.wesselink@ing.com>
* Fix undefined behavior in _tree.pyx and _quad_tree.pyx
Accessing a member through a null pointer is undefined behavior, even if
no actual memory access is performed (like in this case, where it was
used only for offset computation). See the following link for an
explanation:
https://software.intel.com/content/www/us/en/develop/blogs/null-pointer-dereferencing-causes-undefined-behavior.html
The current approach will also fail when building with tools like ubsan
(undefined behavior sanitizer).
The standard way to compute offsets of struct members is the offsetof
macro but it seems it's not supported by Cython so I've used the
approach described here:
https://mail.python.org/pipermail/cython-devel/2013-April/003505.html
* Simplify definitions of types for numpy.
According to
9e9cdb0192 (issuecomment-638998985)
these dictionaries with offsets are there for old numpy versions and
they are no longer needed. We can use instead an approach similar to
https://github.com/scikit-learn/scikit-learn/pull/15097/files#diff-b071106a87a03ee4e9149e3f0a2b1180L187
I have verified that tests keep passing and that the undefined behavior
that motivated this pull request in the first place is still fixed.
* Document the new numpy type definition approach.
Added a brief comment and a link to stackoverflow thread that explain
why the simpler approach to define numpy types works.
* Fix typo 'dtyle'->'dtype'
* normalize_components in sparsePCA
* changed default strategy of Dummy to prior and removed outputs_2d ttribute
* removed usage of None to drop estimator in ensemble and behaviour param of IsolationForest
* remove support for drop=None in Voting
* removed some warning decorators
* remove feature_extraction.extract_patches
* removed VectorizerMixin and copy parameter from TFIDFVectorizer
* kernel.set_params now raises attributeerror
* removed fig from plot_partial_dependence
* removed iid parameter of search estimators
* removed brier_scorer
* raise error in split when shuffle is False and random_state is not None
* removed MultiOutputEstimator
* removed base classes of NaiveBayes
* removed drop from pipeline
* removed utils in random_projection
* removed presort and classes_ in trees
* flake8
* fixed some tests
* flake
* fixed docstring
* fixed other one
* some left
* mmmm
* Added links to utils.Bunch and fixed format of the docstring in datasets
* Added links to utils.Bunch in sklearn.compose
* Added links to utils.Bunch in sklearn.tree
* Added links to utils.Bunch in sklearn.ensemble
* Added links to utils.Bunch in sklearn.inspection
* Added links to utils.Bunch in sklearn.pipeline
* modified docstring of Bunch
* Added links to utils.Bunch to index.rst of sklearn.datasets
* Fixed some docstrings because the lines are too long
* Fixed some points as reviewed.
* Add links and delete 'for more information...'
* Fixed indent
* Fixed forgotten points.
* Fixed some points as reviewed.
* Standardize sample weights validation in BaseDecisionTree
Co-authored-by: Sallie Walecka <sallie.walecka@gmail.com>
* Use DOUBLE var instead of np.float64 & refactored test
Co-authored-by: Sallie Walecka <sallie.walecka@gmail.com>