[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: predict
From: |
Juan Pablo Carbajal |
Subject: |
Re: predict |
Date: |
Wed, 16 Nov 2011 09:39:53 +0100 |
On Wed, Nov 16, 2011 at 8:08 AM, George Kousiouris
<address@hidden> wrote:
>
> hi,
>
> in matrix multiplication the inner dimensions must be identical. thus when
> you multiply an AxB matrix with a CxD one, you must have that B=C. and the
> result is a AxD matrix
>
> BR,
> George
>
>
> On 11/15/2011 10:50 PM, Tomi Piriyev wrote:
>
> hi,
> "
> if sigmoid(theta'*x) >= 0.5, p =1
> else p=0
> "
> i tried to use this code, , but compiler gets "error: operator *:
> nonconformant arguments (op1 is 1x3, op2 is 100x3)"
> could you help me
>
>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://mailman.cae.wisc.edu/listinfo/help-octave
>
>
> --
>
>
>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://mailman.cae.wisc.edu/listinfo/help-octave
>
>
Note that if the result of sigmoid is a matrix as well, you should put
p to one in the right places. That is
X = theta*x.';
[n m] = size(X);
p = false(n,m);
ind = sigmoid(X) >= 0.5;
p(ind) = true;
--
M. Sc. Juan Pablo Carbajal
-----
PhD Student
University of Zürich
http://ailab.ifi.uzh.ch/carbajal/
- predict, Tomi Piriyev, 2011/11/15
- Re: predict, Kimmo Luoma, 2011/11/16
- Re: predict, George Kousiouris, 2011/11/16
- Re: predict,
Juan Pablo Carbajal <=