Issue 1:
Darwin-15.0.0-x86_64-i386-64bit
('Python', '2.7.11 |Anaconda custom (x86_64)| (default, Dec 6 2015, 18:57:58) \n[GCC 4.2.1 (Apple Inc. build 5577)]')
('NumPy', '1.11.0')
('SciPy', '0.17.0')
('Scikit-Learn', '0.17.1')

When trying to run a t-SNE

proj = TSNE().fit_transform(X)
ValueError: array must not contain infs or NaNs

However

np.isfinite(X).all() # True
np.isnan(X).all() # False
np.isinf(X).all() # False

Full Stack Trace:

ValueError Traceback (most recent call last)
<ipython-input-16-c25f35fd042c> in <module>()
----> 1 plot(X, y)

<ipython-input-1-72bdb7124d13> in plot(X, y)
74
75 def plot(X, y):
---> 76 proj = TSNE().fit_transform(X)
77 scatter(proj, y)

/Users/joelkuiper/anaconda/lib/python2.7/site-packages/sklearn/manifold/t_sne.pyc in fit_transform(self, X, y)
864 Embedding of the training data in low-dimensional space.
865 """
--> 866 embedding = self._fit(X)
867 self.embedding_ = embedding
868 return self.embedding_

/Users/joelkuiper/anaconda/lib/python2.7/site-packages/sklearn/manifold/t_sne.pyc in _fit(self, X, skip_num_points)
775 X_embedded=X_embedded,
776 neighbors=neighbors_nn,
--> 777 skip_num_points=skip_num_points)
778
779 def _tsne(self, P, degrees_of_freedom, n_samples, random_state,

/Users/joelkuiper/anaconda/lib/python2.7/site-packages/sklearn/manifold/t_sne.pyc in _tsne(self, P, degrees_of_freedom, n_samples, random_state, X_embedded, neighbors, skip_num_points)
830 opt_args['momentum'] = 0.8
831 opt_args['it'] = it + 1
--> 832 params, error, it = _gradient_descent(obj_func, params, **opt_args)
833 if self.verbose:
834 print("[t-SNE] Error after %d iterations with early "

/Users/joelkuiper/anaconda/lib/python2.7/site-packages/sklearn/manifold/t_sne.pyc in _gradient_descent(objective, p0, it, n_iter, objective_error, n_iter_check, n_iter_without_progress, momentum, learning_rate, min_gain, min_grad_norm, min_error_diff, verbose, args, kwargs)
385 for i in range(it, n_iter):
386 new_error, grad = objective(p, *args, **kwargs)
--> 387 grad_norm = linalg.norm(grad)
388
389 inc = update * grad >= 0.0

/Users/joelkuiper/anaconda/lib/python2.7/site-packages/scipy/linalg/misc.pyc in norm(a, ord, axis, keepdims)
127 """
128 # Differs from numpy only in non-finite handling and the use of blas.
--> 129 a = np.asarray_chkfinite(a)
130
131 # Only use optimized norms if axis and keepdims are not specified.

/Users/joelkuiper/anaconda/lib/python2.7/site-packages/numpy/lib/function_base.pyc in asarray_chkfinite(a, dtype, order)
1020 if a.dtype.char in typecodes['AllFloat'] and not np.isfinite(a).all():
1021 raise ValueError(
-> 1022 "array must not contain infs or NaNs")
1023 return a
1024

ValueError: array must not contain infs or NaNs

Issue 2:
Currently, RandomForestRegressor and friends perform a reduction by means of a simple averaging over the population.

In the past, I have written code to compute the mode over a set of votes; currently, I would like to experiment with using a trimmed mean. But there isnt any reduction operation that I cant see as being potentially useful to experiment with.

Is that intuition wrong? Are there good arguments in the literature why a mean is always the interesting metric to reduce your population by? And if not, are there any good implementational reasons why this wouldnt fit well into sklearn? There will be some memory and runtime overhead for more complex reductions, but no show stoppers that I can see

If not, are there any other issues/PRs that overlap with this? I might try my hand at implementing something like this myself.