You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Vi Ngo Van <ng...@gmail.com> on 2015/07/15 04:31:10 UTC

MLlib LogisticRegressionWithLBFGS error

Hi All,
I've met a issue with MLlib when i use LogisticRegressionWithLBFGS

my sample data :

*0 863:1 40646:1 37697:1 1423:1 38648:1 4230:1 23823:1 41594:1 27614:1
5689:1 18493:1 44187:1 5694:1 27799:1 12010:1*
*0 863:1 40646:1 37697:1 1423:1 38648:1 4230:1 23823:1 41594:1 27614:1
5689:1 18493:1 44187:1 5694:1 27799:1 12010:1*
*0 29510:1 42091:1 8258:1 46813:1 37658:1 37868:1 29478:1 15872:1 13188:1
2193:1 27614:1 50162:1 5668:1 5617:1 48841:1 36836:1 2325:1 7382:1 24668:1*
*2 43736:1 35551:1 535:1 19816:1 28472:1 45485:1 33417:1 42875:1 235:1
21952:1 23361:1 37697:1 42615:1 27425:1 32021:1 1423:1 38648:1 18241:1
32213:1 11935:1 34422:1 40512:1 25988:1 4798:1 44180:1 37697:1 38968:1
25988:1 32024:1 18455:1 14193:1 8538:1*
*2 42015:1 33077:1 38396:1 21952:1 23361:1 50762:1 25988:1 4798:1 44180:1
38968:1 1423:1 38648:1 41415:1 535:1 19816:1 28472:1 45485:1 33417:1
42875:1 235:1 26256:1 9060:1*
*0 4798:1 44180:1 4788:1 42630:1*
...

I have given a error :
*java.lang.ArrayIndexOutOfBoundsException: 52686*
* at
org.apache.spark.mllib.stat.MultivariateOnlineSummarizer$$anonfun$add$3.apply$mcVID$sp(MultivariateOnlineSummarizer.scala:82)*

Hope, someone can help.
Thanks you.

-- 
Ngo Van Vi <http://www.facebook.com/ngovanvi>
Mobile : (+84)1695893851
Skype: ngovi_htbk

Re: MLlib LogisticRegressionWithLBFGS error

Posted by Vi Ngo Van <ng...@gmail.com>.
This is a LibSVM format. I can use this data with libsvm library.
In this sample, they are not sorted. I will sort them and try it again.
Thanks you,

On Wed, Jul 15, 2015 at 1:47 PM, Burak Yavuz <br...@gmail.com> wrote:

> Hi,
>
> Is this in LibSVM format? If so, the indices should be sorted in
> increasing order. It seems like they are not sorted.
>
> Best,
> Burak
>
> On Tue, Jul 14, 2015 at 7:31 PM, Vi Ngo Van <ng...@gmail.com>
> wrote:
>
>> Hi All,
>> I've met a issue with MLlib when i use LogisticRegressionWithLBFGS
>>
>> my sample data :
>>
>> *0 863:1 40646:1 37697:1 1423:1 38648:1 4230:1 23823:1 41594:1 27614:1
>> 5689:1 18493:1 44187:1 5694:1 27799:1 12010:1*
>> *0 863:1 40646:1 37697:1 1423:1 38648:1 4230:1 23823:1 41594:1 27614:1
>> 5689:1 18493:1 44187:1 5694:1 27799:1 12010:1*
>> *0 29510:1 42091:1 8258:1 46813:1 37658:1 37868:1 29478:1 15872:1 13188:1
>> 2193:1 27614:1 50162:1 5668:1 5617:1 48841:1 36836:1 2325:1 7382:1 24668:1*
>> *2 43736:1 35551:1 535:1 19816:1 28472:1 45485:1 33417:1 42875:1 235:1
>> 21952:1 23361:1 37697:1 42615:1 27425:1 32021:1 1423:1 38648:1 18241:1
>> 32213:1 11935:1 34422:1 40512:1 25988:1 4798:1 44180:1 37697:1 38968:1
>> 25988:1 32024:1 18455:1 14193:1 8538:1*
>> *2 42015:1 33077:1 38396:1 21952:1 23361:1 50762:1 25988:1 4798:1 44180:1
>> 38968:1 1423:1 38648:1 41415:1 535:1 19816:1 28472:1 45485:1 33417:1
>> 42875:1 235:1 26256:1 9060:1*
>> *0 4798:1 44180:1 4788:1 42630:1*
>> ...
>>
>> I have given a error :
>> *java.lang.ArrayIndexOutOfBoundsException: 52686*
>> * at
>> org.apache.spark.mllib.stat.MultivariateOnlineSummarizer$$anonfun$add$3.apply$mcVID$sp(MultivariateOnlineSummarizer.scala:82)*
>>
>> Hope, someone can help.
>> Thanks you.
>>
>> --
>> Ngo Van Vi <http://www.facebook.com/ngovanvi>
>> Mobile : (+84)1695893851
>> Skype: ngovi_htbk
>>
>
>


-- 
Ngo Van Vi <http://www.facebook.com/ngovanvi>
Mobile : (+84)1695893851
Skype: ngovi_htbk

Re: MLlib LogisticRegressionWithLBFGS error

Posted by Burak Yavuz <br...@gmail.com>.
Hi,

Is this in LibSVM format? If so, the indices should be sorted in increasing
order. It seems like they are not sorted.

Best,
Burak

On Tue, Jul 14, 2015 at 7:31 PM, Vi Ngo Van <ng...@gmail.com> wrote:

> Hi All,
> I've met a issue with MLlib when i use LogisticRegressionWithLBFGS
>
> my sample data :
>
> *0 863:1 40646:1 37697:1 1423:1 38648:1 4230:1 23823:1 41594:1 27614:1
> 5689:1 18493:1 44187:1 5694:1 27799:1 12010:1*
> *0 863:1 40646:1 37697:1 1423:1 38648:1 4230:1 23823:1 41594:1 27614:1
> 5689:1 18493:1 44187:1 5694:1 27799:1 12010:1*
> *0 29510:1 42091:1 8258:1 46813:1 37658:1 37868:1 29478:1 15872:1 13188:1
> 2193:1 27614:1 50162:1 5668:1 5617:1 48841:1 36836:1 2325:1 7382:1 24668:1*
> *2 43736:1 35551:1 535:1 19816:1 28472:1 45485:1 33417:1 42875:1 235:1
> 21952:1 23361:1 37697:1 42615:1 27425:1 32021:1 1423:1 38648:1 18241:1
> 32213:1 11935:1 34422:1 40512:1 25988:1 4798:1 44180:1 37697:1 38968:1
> 25988:1 32024:1 18455:1 14193:1 8538:1*
> *2 42015:1 33077:1 38396:1 21952:1 23361:1 50762:1 25988:1 4798:1 44180:1
> 38968:1 1423:1 38648:1 41415:1 535:1 19816:1 28472:1 45485:1 33417:1
> 42875:1 235:1 26256:1 9060:1*
> *0 4798:1 44180:1 4788:1 42630:1*
> ...
>
> I have given a error :
> *java.lang.ArrayIndexOutOfBoundsException: 52686*
> * at
> org.apache.spark.mllib.stat.MultivariateOnlineSummarizer$$anonfun$add$3.apply$mcVID$sp(MultivariateOnlineSummarizer.scala:82)*
>
> Hope, someone can help.
> Thanks you.
>
> --
> Ngo Van Vi <http://www.facebook.com/ngovanvi>
> Mobile : (+84)1695893851
> Skype: ngovi_htbk
>