The index should start from 1 for LIBSVM format, as defined in the README
of LIBSVM (https://github.com/cjlin1/libsvm/blob/master/README#L64). The
only exception is the precomputed kernel, which MLlib doesn't support.
-Xiangrui

On Wed, May 6, 2015 at 1:42 AM, doyere <doy...@doyere.cn> wrote:

> Hi all,
>
> After do some tests,finally I solve it.I wrote here for other people who
> met this question. here's a example of data format error I faced
>
> 0 0:0 1:0 2:1
> 1 1:1 3:2
>
> the data for 0:0 and 1:0/1:1 is the reason for
> ArrayIndexOutOfBoundsException.If someone who faced the same question just
> delete them from u past data or update it. Since it was worked in
> libsvm-tools,so I guess in spark MLlib it just implements a bit different.
>
>  原始邮件
> *发件人:* doyere<doy...@doyere.cn>
> *收件人:* user<user@spark.apache.org>
> *发送时间:* 2015年5月6日(周三) 08:59
> *主题:* MLlib libsvm isssues with data
>
> hi all:
>
> I’ve met a issues with MLlib.I used posted to the community seems put the
> wrong place:( .Then I put in stackoverflowf.for a good format details plz
> see
> http://stackoverflow.com/questions/30048344/spark-mllib-libsvm-isssues-with-data.hope
> someone could help [image: 😢]
>
> I guess it’s due to my data.but I’ve test it in libsvm-tools it worked
> well,and I’ve used the libsvm data python data format test tool and it’s
> ok.Just don’t know why it errors with java.lang.
> ArrayIndexOutOfBoundsException: -1 :(
>
> And this is my first time using the mail list ask for help.If I did
> something wrong or I described not clearly plz tell me.
>
>
> doye
>

Reply via email to