2013/8/3 Issam <issamo...@gmail.com>:
> Hi, I noticed that .sgd_fast. SquaredLoss works only on scalars as can
> be done by the code below:
>
> `SquaredLoss().loss(12,3)`
>
> Is there a way to make it work for arrays? For example,
> `SquaredLoss().loss(np.array([12,11]), np.array([4,5]))`?
>
> It says it only supports scalars

The loss functions in sgd_fast are intended to be used with "true"
SGD, i.e. not the minibatch version. But in the minibatch case, you
can just use NumPy vectorized operations.

-- 
Lars Buitinck
Scientific programmer, ILPS
University of Amsterdam

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to