[SciPy-Dev] cKDTree

Sylvain Corlay sylvain.corlay at gmail.com
Tue Sep 6 14:23:05 EDT 2016


I understand (especially about the scikits), although I was surprised by
some recently added features in scipy, such as differential evolution

DE is more of a  "recipe" which has been studied empirically for which
there is no theoretical convergence rate. Even though it may "work well"
for certain problems, it causes some issues such as defining on which basis
it should even be "improved", and what should be the foundation for a
change. (Recently a result on convergence in probability (with no error
rate) on a bounded domain has been published, but no result exists on the
speed of convergence afaik...)

Evolutionary optimization is definitely cool and may work strikingly well
for certain problems, but I was surprised that it got elected to inclusion
in scipy. DE would have been a nice seed for a scikit-evolution.

For those interested in stochastic algorithms for global multivariate
optimization for which we have proven convergence results and an abundant
literature, we have at least the two following categories of methods

 - *MCMC* (Markov Chain Monte Carlo) which comprises simulated annealing,
for which there are nice results of convergence in distribution.
 - *Robbins-Monro* methods, which comprise stochastic gradient methods, for
which we have almost-sure convergence and central-limit - type theorems.

This sort of raises the question of the scope of scipy. Should scipy go
through the same sort of "big split" as Jupyter or more à la d3js? Is
amount of specialized knowledge required to understand a methods part of
what defines the line of division in what should be or not be in scipy?

Sylvain

On Tue, Sep 6, 2016 at 8:08 PM, Jacob Vanderplas <jakevdp at cs.washington.edu>
wrote:

> As for adding more functionality along those lines, I would advocate
> creation of a new package or perhaps a scikit. As we've seen with
> scikit-learn, useful features can filter-up into scipy (e.g.
> sparse.csgraph) and the development of new features within an independent
> package is *much* easier than development from within a scipy PR.
>    Jake
>
>  Jake VanderPlas
>  Senior Data Science Fellow
>  Director of Research in Physical Sciences
>  University of Washington eScience Institute
>
> On Tue, Sep 6, 2016 at 11:03 AM, Sylvain Corlay <sylvain.corlay at gmail.com>
> wrote:
>
>> Would you guys consider in scope for scipy to have implementation of
>> faster nearest neighbor search methods than KdTree?
>>
>> Some methods are fairly simple... e.g principal axis tree which use the
>> principal direction of the dataset to split the dataset into smaller
>> subsets.  As soon as intrinsic dimensionality is significantly smaller than
>> the dimension of the space, it is significantly faster.
>>
>> Besides, only having to compute the (an approximate) principal axis is
>> much faster than doing an actual PCA.
>>
>> On Tue, Sep 6, 2016 at 4:14 AM, Jacob Vanderplas <
>> jakevdp at cs.washington.edu> wrote:
>>
>>> From my own casual benchmarks, the new scipy cKDTree is much faster than
>>> any of the scikit-learn options, though it still only supports axis-aligned
>>> euclidean-like metrics (where sklearn's BallTree supports dozens of
>>> additional metrics). The cKDTree also has a limited range of query types
>>> compared to scikit-learn's trees,
>>>    Jake
>>>
>>>  Jake VanderPlas
>>>  Senior Data Science Fellow
>>>  Director of Research in Physical Sciences
>>>  University of Washington eScience Institute
>>>
>>> On Mon, Sep 5, 2016 at 12:46 AM, Daπid <davidmenhur at gmail.com> wrote:
>>>
>>>> On 4 September 2016 at 23:00, Robert Lucente <rlucente at pipeline.com>
>>>> wrote:
>>>> > Please note that I am a newbie and just a lurker.
>>>> >
>>>> > I noticed in a recent email that cKDTree was mentioned.
>>>> >
>>>> > Q: What is the relationship if any between SciPy an scikit-learn when
>>>> it comes to cKDTree?
>>>> >
>>>> > The reason that I ask are the following 2 links
>>>> >
>>>> > https://jakevdp.github.io/blog/2013/04/29/benchmarking-neare
>>>> st-neighbor-searches-in-python/
>>>> >
>>>> > https://github.com/scikit-learn/scikit-learn/issues/3682
>>>>
>>>> Note that these benchmarks are from 2013 and 2014. Scipy's KDTree has
>>>> seen its performance recently improved, twice. Scikit's last update to
>>>> its KDTree was in 2015. So, we need to run the benchmarks again.
>>>>
>>>> /David.
>>>> _______________________________________________
>>>> SciPy-Dev mailing list
>>>> SciPy-Dev at scipy.org
>>>> https://mail.scipy.org/mailman/listinfo/scipy-dev
>>>>
>>>
>>>
>>> _______________________________________________
>>> SciPy-Dev mailing list
>>> SciPy-Dev at scipy.org
>>> https://mail.scipy.org/mailman/listinfo/scipy-dev
>>>
>>>
>>
>> _______________________________________________
>> SciPy-Dev mailing list
>> SciPy-Dev at scipy.org
>> https://mail.scipy.org/mailman/listinfo/scipy-dev
>>
>>
>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at scipy.org
> https://mail.scipy.org/mailman/listinfo/scipy-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20160906/6c5d6d43/attachment.html>


More information about the SciPy-Dev mailing list