The memoize function could be extended by considering the default arguments before caching is done. for example:
hyp.reduce(data, reduce='IncrementalPCA', ndims=5)
and
hyp.reduce(data, ndims=5)
do the same thing since the default reduction model is IncrementalPCA. However, because the cache key is a str comprised of the inputs, they are not treated as the same. Considering the default arguments before adding to the cache would speed things up in some cases.
The memoize function could be extended by considering the default arguments before caching is done. for example:
hyp.reduce(data, reduce='IncrementalPCA', ndims=5)
andhyp.reduce(data, ndims=5)
do the same thing since the default reduction model is
IncrementalPCA
. However, because the cache key is a str comprised of the inputs, they are not treated as the same. Considering the default arguments before adding to the cache would speed things up in some cases.