You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@madlib.apache.org by Nurur Rahman <nu...@glic.com> on 2016/07/13 15:07:48 UTC

MADlib's Random Forest Classification and Regression Example

Hello,
I am going through Random Forest example given in MADlib's User Documentation:
http://madlib.incubator.apache.org/docs/latest/group__grp__random__forest.html#examples

In both cases when I run "SELECT madlib.forest_train( ... ... )" exactly as it is shown in
steps 1 and 2 in the example page, I get the following error:

ERROR:  plpy.SPIError: Function "madlib._dt_apply(madlib.bytea8,madlib.bytea8,madlib.bytea8,smallint,smallint,smallint,boolean,integer)": Invalid type conversion. Simple type supplied but backend expects composite type. (plpython.c:4648)
CONTEXT:  Traceback (most recent call last):
  PL/Python function "forest_train", line 39, in <module>
    sample_ratio
  PL/Python function "forest_train", line 553, in forest_train
  PL/Python function "forest_train", line 2192, in _tree_train_using_bins
  PL/Python function "forest_train", line 1162, in _one_step
PL/Python function "forest_train"



Relevant Info:
"PostgreSQL 8.2.15
(Greenplum Database 4.2.0 build 1)
(HAWQ 1.3.0.0 build 12954)

"MADlib version: 1.9, git revision: rc/v1.9-rc1


Can anyone please explain what the reasons behind this error message? Your help will be appreciated.


Thanks.
Nurur


-----------------------------------------
This message, and any attachments to it, may contain information that is privileged, confidential, and exempt from disclosure under applicable law.  If the reader of this message is not the intended recipient, you are notified that any use, dissemination, distribution, copying, or communication of this message is strictly prohibited.  If you have received this message in error, please notify the sender immediately by return e-mail and delete the message and any attachments.  Thank you.

Re: MADlib's Random Forest Classification and Regression Example

Posted by Frank McQuillan <fm...@pivotal.io>.
Thanks Rahul for the detailed analysis.

Do try Rahul's suggestion, Nurur, and let us know what results you see.

Frank

On Tue, Jul 19, 2016 at 6:51 AM, Nurur Rahman <nu...@glic.com> wrote:

> Rahul, Thank for your feedback.
>
> I will give it a shot as you suggested and will let you know.
>
>
>
> Regards.
>
> Nurur
>
>
>
>
>
> *From:* Rahul Iyer [mailto:riyer@pivotal.io]
> *Sent:* Monday, July 18, 2016 7:45 PM
> *To:* user@madlib.incubator.apache.org
> *Cc:* Frank McQuillan <fm...@pivotal.io>
> *Subject:* Re: MADlib's Random Forest Classification and Regression
> Example
>
>
>
> Hello Nurur,
>
>
>
> I tried reproducing your error on an existing HAWQ 1.3.0.0 installation
> with a new database and was unable to do so (see attached log for
> successful query results).
>
>
>
> It's possible something is corrupted in the database you're using. Was the
> madlib schema previously dropped in your database? Would it be possible for
> you to test this again on a fresh database?
>
>
>
> Best,
>
> Rahul
>
>
>
> On Wed, Jul 13, 2016 at 8:07 AM, Nurur Rahman <nu...@glic.com>
> wrote:
>
> Hello,
>
> I am going through Random Forest example given in MADlib's User
> Documentation:
>
>
> http://madlib.incubator.apache.org/docs/latest/group__grp__random__forest.html#examples
>
>
>
> In both cases when I run “SELECT madlib.forest_train( … … )” exactly as it
> is shown in
>
> steps 1 and 2 in the example page, I get the following error:
>
>
>
> ERROR:  plpy.SPIError: Function
> "madlib._dt_apply(madlib.bytea8,madlib.bytea8,madlib.bytea8,smallint,smallint,smallint,boolean,integer)":
> Invalid type conversion. Simple type supplied but backend expects composite
> type. (plpython.c:4648)
>
> CONTEXT:  Traceback (most recent call last):
>
>   PL/Python function "forest_train", line 39, in <module>
>
>     sample_ratio
>
>   PL/Python function "forest_train", line 553, in forest_train
>
>   PL/Python function "forest_train", line 2192, in _tree_train_using_bins
>
>   PL/Python function "forest_train", line 1162, in _one_step
>
> PL/Python function "forest_train"
>
>
>
>
>
>
>
> Relevant Info:
>
> "PostgreSQL 8.2.15
>
> (Greenplum Database 4.2.0 build 1)
>
> (HAWQ 1.3.0.0 build 12954)
>
>
>
> "MADlib version: 1.9, git revision: rc/v1.9-rc1
>
>
>
>
>
> Can anyone please explain what the reasons behind this error message? Your
> help will be appreciated.
>
>
>
>
>
> Thanks.
>
> Nurur
> ------------------------------
>
> ----------------------------------------- This message, and any
> attachments to it, may contain information that is privileged,
> confidential, and exempt from disclosure under applicable law. If the
> reader of this message is not the intended recipient, you are notified that
> any use, dissemination, distribution, copying, or communication of this
> message is strictly prohibited. If you have received this message in error,
> please notify the sender immediately by return e-mail and delete the
> message and any attachments. Thank you.
>
>
>
>
>
> --
>
> ---------------------------------------------------------
> Rahul Iyer
> Principal software engineer | Predictive Analytics
>
> *Pivotal **A new platform for a new era*
>
> ------------------------------
> ----------------------------------------- This message, and any
> attachments to it, may contain information that is privileged,
> confidential, and exempt from disclosure under applicable law. If the
> reader of this message is not the intended recipient, you are notified that
> any use, dissemination, distribution, copying, or communication of this
> message is strictly prohibited. If you have received this message in error,
> please notify the sender immediately by return e-mail and delete the
> message and any attachments. Thank you.
>
>

RE: MADlib's Random Forest Classification and Regression Example

Posted by Nurur Rahman <nu...@glic.com>.
Rahul, Thank for your feedback.
I will give it a shot as you suggested and will let you know.

Regards.
Nurur


From: Rahul Iyer [mailto:riyer@pivotal.io]
Sent: Monday, July 18, 2016 7:45 PM
To: user@madlib.incubator.apache.org
Cc: Frank McQuillan <fm...@pivotal.io>
Subject: Re: MADlib's Random Forest Classification and Regression Example

Hello Nurur,

I tried reproducing your error on an existing HAWQ 1.3.0.0 installation with a new database and was unable to do so (see attached log for successful query results).

It's possible something is corrupted in the database you're using. Was the madlib schema previously dropped in your database? Would it be possible for you to test this again on a fresh database?

Best,
Rahul

On Wed, Jul 13, 2016 at 8:07 AM, Nurur Rahman <nu...@glic.com>> wrote:
Hello,
I am going through Random Forest example given in MADlib's User Documentation:
http://madlib.incubator.apache.org/docs/latest/group__grp__random__forest.html#examples

In both cases when I run “SELECT madlib.forest_train( … … )” exactly as it is shown in
steps 1 and 2 in the example page, I get the following error:

ERROR:  plpy.SPIError: Function "madlib._dt_apply(madlib.bytea8,madlib.bytea8,madlib.bytea8,smallint,smallint,smallint,boolean,integer)": Invalid type conversion. Simple type supplied but backend expects composite type. (plpython.c:4648)
CONTEXT:  Traceback (most recent call last):
  PL/Python function "forest_train", line 39, in <module>
    sample_ratio
  PL/Python function "forest_train", line 553, in forest_train
  PL/Python function "forest_train", line 2192, in _tree_train_using_bins
  PL/Python function "forest_train", line 1162, in _one_step
PL/Python function "forest_train"



Relevant Info:
"PostgreSQL 8.2.15
(Greenplum Database 4.2.0 build 1)
(HAWQ 1.3.0.0 build 12954)

"MADlib version: 1.9, git revision: rc/v1.9-rc1


Can anyone please explain what the reasons behind this error message? Your help will be appreciated.


Thanks.
Nurur
________________________________
----------------------------------------- This message, and any attachments to it, may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are notified that any use, dissemination, distribution, copying, or communication of this message is strictly prohibited. If you have received this message in error, please notify the sender immediately by return e-mail and delete the message and any attachments. Thank you.



--

---------------------------------------------------------
Rahul Iyer
Principal software engineer | Predictive Analytics
Pivotal
A new platform for a new era


-----------------------------------------
This message, and any attachments to it, may contain information that is privileged, confidential, and exempt from disclosure under applicable law.  If the reader of this message is not the intended recipient, you are notified that any use, dissemination, distribution, copying, or communication of this message is strictly prohibited.  If you have received this message in error, please notify the sender immediately by return e-mail and delete the message and any attachments.  Thank you.

Re: MADlib's Random Forest Classification and Regression Example

Posted by Rahul Iyer <ri...@pivotal.io>.
It's the same as bytea but with 8-byte alignment. My understanding of why
it was added (this was before my time with MADlib) is that most of the
models used Eigen which worked faster with SSE2. The 8-byte alignment
helped in running the SSE2 instructions.

On Tue, Jul 19, 2016 at 2:59 PM, Jim Nasby <Ji...@bluetreble.com> wrote:

> On 7/19/16 3:25 PM, Rahul Iyer wrote:
>
>> The error message indicated that the madlib.bytea8 composite type was
>> missing or invalid.
>>
>
> Out of curiosity, why is that type needed?
> --
> Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
> Experts in Analytics, Data Architecture and PostgreSQL
> Data in Trouble? Get it in Treble! http://BlueTreble.com
> 855-TREBLE2 (855-873-2532)   mobile: 512-569-9461
>

Re: MADlib's Random Forest Classification and Regression Example

Posted by Jim Nasby <Ji...@BlueTreble.com>.
On 7/19/16 3:25 PM, Rahul Iyer wrote:
> The error message indicated that the madlib.bytea8 composite type was
> missing or invalid.

Out of curiosity, why is that type needed?
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)   mobile: 512-569-9461

Re: MADlib's Random Forest Classification and Regression Example

Posted by Rahul Iyer <ri...@pivotal.io>.
Hi Nurur,

I'm happy it worked out.

I don't have a concrete reason for suspecting a problem with the database.
The error message indicated that the madlib.bytea8 composite type was
missing or invalid. For HAWQ < 2.0, that type comes pre-built in the
database catalog and is not installed with MADlib. This led me to guessing
that the catalog was corrupted, probably due to that type being dropped or
changed by a superuser.

Rahul



On Tue, Jul 19, 2016 at 11:17 AM, Nurur Rahman <nu...@glic.com>
wrote:

> Hi Rahul,
>
>
>
> I changed the database and was able to run the model successfully. Thanks
> a lot for this useful tips.
>
>
>
> For a sake of completeness and learning, how did you know that a ‘corrupt
> database’ might be a
>
> reason behind? Would you like to share a bit of your experience/thought on
> this.
>
>
>
> Nurur
>
>
>
> *From:* Rahul Iyer [mailto:riyer@pivotal.io]
> *Sent:* Monday, July 18, 2016 7:45 PM
> *To:* user@madlib.incubator.apache.org
> *Cc:* Frank McQuillan <fm...@pivotal.io>
> *Subject:* Re: MADlib's Random Forest Classification and Regression
> Example
>
>
>
> Hello Nurur,
>
>
>
> I tried reproducing your error on an existing HAWQ 1.3.0.0 installation
> with a new database and was unable to do so (see attached log for
> successful query results).
>
>
>
> It's possible something is corrupted in the database you're using. Was the
> madlib schema previously dropped in your database? Would it be possible for
> you to test this again on a fresh database?
>
>
>
> Best,
>
> Rahul
>
>
>
> On Wed, Jul 13, 2016 at 8:07 AM, Nurur Rahman <nu...@glic.com>
> wrote:
>
> Hello,
>
> I am going through Random Forest example given in MADlib's User
> Documentation:
>
>
> http://madlib.incubator.apache.org/docs/latest/group__grp__random__forest.html#examples
>
>
>
> In both cases when I run “SELECT madlib.forest_train( … … )” exactly as it
> is shown in
>
> steps 1 and 2 in the example page, I get the following error:
>
>
>
> ERROR:  plpy.SPIError: Function
> "madlib._dt_apply(madlib.bytea8,madlib.bytea8,madlib.bytea8,smallint,smallint,smallint,boolean,integer)":
> Invalid type conversion. Simple type supplied but backend expects composite
> type. (plpython.c:4648)
>
> CONTEXT:  Traceback (most recent call last):
>
>   PL/Python function "forest_train", line 39, in <module>
>
>     sample_ratio
>
>   PL/Python function "forest_train", line 553, in forest_train
>
>   PL/Python function "forest_train", line 2192, in _tree_train_using_bins
>
>   PL/Python function "forest_train", line 1162, in _one_step
>
> PL/Python function "forest_train"
>
>
>
>
>
>
>
> Relevant Info:
>
> "PostgreSQL 8.2.15
>
> (Greenplum Database 4.2.0 build 1)
>
> (HAWQ 1.3.0.0 build 12954)
>
>
>
> "MADlib version: 1.9, git revision: rc/v1.9-rc1
>
>
>
>
>
> Can anyone please explain what the reasons behind this error message? Your
> help will be appreciated.
>
>
>
>
>
> Thanks.
>
> Nurur
> ------------------------------
>
> ----------------------------------------- This message, and any
> attachments to it, may contain information that is privileged,
> confidential, and exempt from disclosure under applicable law. If the
> reader of this message is not the intended recipient, you are notified that
> any use, dissemination, distribution, copying, or communication of this
> message is strictly prohibited. If you have received this message in error,
> please notify the sender immediately by return e-mail and delete the
> message and any attachments. Thank you.
>
>
>
>
>
> --
>
> ---------------------------------------------------------
> Rahul Iyer
> Principal software engineer | Predictive Analytics
>
> *Pivotal **A new platform for a new era*
>
> ------------------------------
> ----------------------------------------- This message, and any
> attachments to it, may contain information that is privileged,
> confidential, and exempt from disclosure under applicable law. If the
> reader of this message is not the intended recipient, you are notified that
> any use, dissemination, distribution, copying, or communication of this
> message is strictly prohibited. If you have received this message in error,
> please notify the sender immediately by return e-mail and delete the
> message and any attachments. Thank you.
>
>


-- 

---------------------------------------------------------
Rahul Iyer
Principal software engineer | Predictive Analytics

*Pivotal**A new platform for a new era*

RE: MADlib's Random Forest Classification and Regression Example

Posted by Nurur Rahman <nu...@glic.com>.
Hi Rahul,

I changed the database and was able to run the model successfully. Thanks a lot for this useful tips.

For a sake of completeness and learning, how did you know that a ‘corrupt database’ might be a
reason behind? Would you like to share a bit of your experience/thought on this.

Nurur

From: Rahul Iyer [mailto:riyer@pivotal.io]
Sent: Monday, July 18, 2016 7:45 PM
To: user@madlib.incubator.apache.org
Cc: Frank McQuillan <fm...@pivotal.io>
Subject: Re: MADlib's Random Forest Classification and Regression Example

Hello Nurur,

I tried reproducing your error on an existing HAWQ 1.3.0.0 installation with a new database and was unable to do so (see attached log for successful query results).

It's possible something is corrupted in the database you're using. Was the madlib schema previously dropped in your database? Would it be possible for you to test this again on a fresh database?

Best,
Rahul

On Wed, Jul 13, 2016 at 8:07 AM, Nurur Rahman <nu...@glic.com>> wrote:
Hello,
I am going through Random Forest example given in MADlib's User Documentation:
http://madlib.incubator.apache.org/docs/latest/group__grp__random__forest.html#examples

In both cases when I run “SELECT madlib.forest_train( … … )” exactly as it is shown in
steps 1 and 2 in the example page, I get the following error:

ERROR:  plpy.SPIError: Function "madlib._dt_apply(madlib.bytea8,madlib.bytea8,madlib.bytea8,smallint,smallint,smallint,boolean,integer)": Invalid type conversion. Simple type supplied but backend expects composite type. (plpython.c:4648)
CONTEXT:  Traceback (most recent call last):
  PL/Python function "forest_train", line 39, in <module>
    sample_ratio
  PL/Python function "forest_train", line 553, in forest_train
  PL/Python function "forest_train", line 2192, in _tree_train_using_bins
  PL/Python function "forest_train", line 1162, in _one_step
PL/Python function "forest_train"



Relevant Info:
"PostgreSQL 8.2.15
(Greenplum Database 4.2.0 build 1)
(HAWQ 1.3.0.0 build 12954)

"MADlib version: 1.9, git revision: rc/v1.9-rc1


Can anyone please explain what the reasons behind this error message? Your help will be appreciated.


Thanks.
Nurur
________________________________
----------------------------------------- This message, and any attachments to it, may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are notified that any use, dissemination, distribution, copying, or communication of this message is strictly prohibited. If you have received this message in error, please notify the sender immediately by return e-mail and delete the message and any attachments. Thank you.



--

---------------------------------------------------------
Rahul Iyer
Principal software engineer | Predictive Analytics
Pivotal
A new platform for a new era


-----------------------------------------
This message, and any attachments to it, may contain information that is privileged, confidential, and exempt from disclosure under applicable law.  If the reader of this message is not the intended recipient, you are notified that any use, dissemination, distribution, copying, or communication of this message is strictly prohibited.  If you have received this message in error, please notify the sender immediately by return e-mail and delete the message and any attachments.  Thank you.

Re: MADlib's Random Forest Classification and Regression Example

Posted by Rahul Iyer <ri...@pivotal.io>.
Hello Nurur,

I tried reproducing your error on an existing HAWQ 1.3.0.0 installation
with a new database and was unable to do so (see attached log for
successful query results).

It's possible something is corrupted in the database you're using. Was the
madlib schema previously dropped in your database? Would it be possible for
you to test this again on a fresh database?

Best,
Rahul

On Wed, Jul 13, 2016 at 8:07 AM, Nurur Rahman <nu...@glic.com> wrote:

> Hello,
>
> I am going through Random Forest example given in MADlib's User
> Documentation:
>
>
> http://madlib.incubator.apache.org/docs/latest/group__grp__random__forest.html#examples
>
>
>
> In both cases when I run “SELECT madlib.forest_train( … … )” exactly as it
> is shown in
>
> steps 1 and 2 in the example page, I get the following error:
>
>
>
> ERROR:  plpy.SPIError: Function
> "madlib._dt_apply(madlib.bytea8,madlib.bytea8,madlib.bytea8,smallint,smallint,smallint,boolean,integer)":
> Invalid type conversion. Simple type supplied but backend expects composite
> type. (plpython.c:4648)
>
> CONTEXT:  Traceback (most recent call last):
>
>   PL/Python function "forest_train", line 39, in <module>
>
>     sample_ratio
>
>   PL/Python function "forest_train", line 553, in forest_train
>
>   PL/Python function "forest_train", line 2192, in _tree_train_using_bins
>
>   PL/Python function "forest_train", line 1162, in _one_step
>
> PL/Python function "forest_train"
>
>
>
>
>
>
>
> Relevant Info:
>
> "PostgreSQL 8.2.15
>
> (Greenplum Database 4.2.0 build 1)
>
> (HAWQ 1.3.0.0 build 12954)
>
>
>
> "MADlib version: 1.9, git revision: rc/v1.9-rc1
>
>
>
>
>
> Can anyone please explain what the reasons behind this error message? Your
> help will be appreciated.
>
>
>
>
>
> Thanks.
>
> Nurur
>
> ------------------------------
> ----------------------------------------- This message, and any
> attachments to it, may contain information that is privileged,
> confidential, and exempt from disclosure under applicable law. If the
> reader of this message is not the intended recipient, you are notified that
> any use, dissemination, distribution, copying, or communication of this
> message is strictly prohibited. If you have received this message in error,
> please notify the sender immediately by return e-mail and delete the
> message and any attachments. Thank you.
>
>


-- 

---------------------------------------------------------
Rahul Iyer
Principal software engineer | Predictive Analytics

*Pivotal**A new platform for a new era*

Re: MADlib's Random Forest Classification and Regression Example

Posted by Frank McQuillan <fm...@pivotal.io>.
This means you are running on HAWQ 1.3.0.0 (it just lists underlying
versions).   This should work, let me see if I can find a version of HAWQ
1.3.0.0 around to test on then I will report back to this thread.

Frank

On Wed, Jul 13, 2016 at 12:40 PM, Nurur Rahman <nu...@glic.com>
wrote:

> Frank, really appreciate for looking at it.
>
> I believe for our system it runs on Linux. This is the output of “select
> version()” and “select madlib.version()”
>
>
>
> "PostgreSQL 8.2.15 (Greenplum Database 4.2.0 build 1)
>
> (HAWQ 1.3.0.0 build 12954) on x86_64-unknown-linux-gnu,
>
> compiled by GCC gcc (GCC) 4.4.2 compiled on Mar 25 2015 12:36:53"
>
>
>
> "MADlib version: 1.9, git revision: rc/v1.9-rc1,
>
> cmake configuration time: Thu Apr  7 18:43:03 UTC 2016,
>
> build type: Release,
>
> build system: Linux-2.6.18-238.27.1.el5.hotfix.bz516490,
>
> C compiler: gcc 4.4.0, C++ compiler: g++ 4.4.0"
>
>
>
> Thanks.
>
> Nurur
>
>
>
> *From:* Frank McQuillan [mailto:fmcquillan@pivotal.io]
> *Sent:* Wednesday, July 13, 2016 3:33 PM
> *To:* user@madlib.incubator.apache.org
> *Subject:* Re: MADlib's Random Forest Classification and Regression
> Example
>
>
>
> Hi Nurur,
>
>
>
> Thanks for the question.  I just re-ran those examples on my local machine
> on a recent version of Postgres and they seemed to work fine for me.
>
>
>
> Your email says:
>
>
>
> "PostgreSQL 8.2.15
>
> (Greenplum Database 4.2.0 build 1)
>
> (HAWQ 1.3.0.0 build 12954)"
>
>
>
> Which platform did you see the error on?
>
>
>
> Frank
>
>
>
>
>
>
>
>
>
> On Wed, Jul 13, 2016 at 8:07 AM, Nurur Rahman <nu...@glic.com>
> wrote:
>
> Hello,
>
> I am going through Random Forest example given in MADlib's User
> Documentation:
>
>
> http://madlib.incubator.apache.org/docs/latest/group__grp__random__forest.html#examples
>
>
>
> In both cases when I run “SELECT madlib.forest_train( … … )” exactly as it
> is shown in
>
> steps 1 and 2 in the example page, I get the following error:
>
>
>
> ERROR:  plpy.SPIError: Function
> "madlib._dt_apply(madlib.bytea8,madlib.bytea8,madlib.bytea8,smallint,smallint,smallint,boolean,integer)":
> Invalid type conversion. Simple type supplied but backend expects composite
> type. (plpython.c:4648)
>
> CONTEXT:  Traceback (most recent call last):
>
>   PL/Python function "forest_train", line 39, in <module>
>
>     sample_ratio
>
>   PL/Python function "forest_train", line 553, in forest_train
>
>   PL/Python function "forest_train", line 2192, in _tree_train_using_bins
>
>   PL/Python function "forest_train", line 1162, in _one_step
>
> PL/Python function "forest_train"
>
>
>
>
>
>
>
> Relevant Info:
>
> "PostgreSQL 8.2.15
>
> (Greenplum Database 4.2.0 build 1)
>
> (HAWQ 1.3.0.0 build 12954)
>
>
>
> "MADlib version: 1.9, git revision: rc/v1.9-rc1
>
>
>
>
>
> Can anyone please explain what the reasons behind this error message? Your
> help will be appreciated.
>
>
>
>
>
> Thanks.
>
> Nurur
> ------------------------------
>
> ----------------------------------------- This message, and any
> attachments to it, may contain information that is privileged,
> confidential, and exempt from disclosure under applicable law. If the
> reader of this message is not the intended recipient, you are notified that
> any use, dissemination, distribution, copying, or communication of this
> message is strictly prohibited. If you have received this message in error,
> please notify the sender immediately by return e-mail and delete the
> message and any attachments. Thank you.
>
>
>
> ------------------------------
> ----------------------------------------- This message, and any
> attachments to it, may contain information that is privileged,
> confidential, and exempt from disclosure under applicable law. If the
> reader of this message is not the intended recipient, you are notified that
> any use, dissemination, distribution, copying, or communication of this
> message is strictly prohibited. If you have received this message in error,
> please notify the sender immediately by return e-mail and delete the
> message and any attachments. Thank you.
>
>

RE: MADlib's Random Forest Classification and Regression Example

Posted by Nurur Rahman <nu...@glic.com>.
Frank, really appreciate for looking at it.
I believe for our system it runs on Linux. This is the output of “select version()” and “select madlib.version()”

"PostgreSQL 8.2.15 (Greenplum Database 4.2.0 build 1)
(HAWQ 1.3.0.0 build 12954) on x86_64-unknown-linux-gnu,
compiled by GCC gcc (GCC) 4.4.2 compiled on Mar 25 2015 12:36:53"

"MADlib version: 1.9, git revision: rc/v1.9-rc1,
cmake configuration time: Thu Apr  7 18:43:03 UTC 2016,
build type: Release,
build system: Linux-2.6.18-238.27.1.el5.hotfix.bz516490,
C compiler: gcc 4.4.0, C++ compiler: g++ 4.4.0"

Thanks.
Nurur

From: Frank McQuillan [mailto:fmcquillan@pivotal.io]
Sent: Wednesday, July 13, 2016 3:33 PM
To: user@madlib.incubator.apache.org
Subject: Re: MADlib's Random Forest Classification and Regression Example

Hi Nurur,

Thanks for the question.  I just re-ran those examples on my local machine on a recent version of Postgres and they seemed to work fine for me.

Your email says:

"PostgreSQL 8.2.15
(Greenplum Database 4.2.0 build 1)
(HAWQ 1.3.0.0 build 12954)"

Which platform did you see the error on?

Frank




On Wed, Jul 13, 2016 at 8:07 AM, Nurur Rahman <nu...@glic.com>> wrote:
Hello,
I am going through Random Forest example given in MADlib's User Documentation:
http://madlib.incubator.apache.org/docs/latest/group__grp__random__forest.html#examples

In both cases when I run “SELECT madlib.forest_train( … … )” exactly as it is shown in
steps 1 and 2 in the example page, I get the following error:

ERROR:  plpy.SPIError: Function "madlib._dt_apply(madlib.bytea8,madlib.bytea8,madlib.bytea8,smallint,smallint,smallint,boolean,integer)": Invalid type conversion. Simple type supplied but backend expects composite type. (plpython.c:4648)
CONTEXT:  Traceback (most recent call last):
  PL/Python function "forest_train", line 39, in <module>
    sample_ratio
  PL/Python function "forest_train", line 553, in forest_train
  PL/Python function "forest_train", line 2192, in _tree_train_using_bins
  PL/Python function "forest_train", line 1162, in _one_step
PL/Python function "forest_train"



Relevant Info:
"PostgreSQL 8.2.15
(Greenplum Database 4.2.0 build 1)
(HAWQ 1.3.0.0 build 12954)

"MADlib version: 1.9, git revision: rc/v1.9-rc1


Can anyone please explain what the reasons behind this error message? Your help will be appreciated.


Thanks.
Nurur
________________________________
----------------------------------------- This message, and any attachments to it, may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are notified that any use, dissemination, distribution, copying, or communication of this message is strictly prohibited. If you have received this message in error, please notify the sender immediately by return e-mail and delete the message and any attachments. Thank you.



-----------------------------------------
This message, and any attachments to it, may contain information that is privileged, confidential, and exempt from disclosure under applicable law.  If the reader of this message is not the intended recipient, you are notified that any use, dissemination, distribution, copying, or communication of this message is strictly prohibited.  If you have received this message in error, please notify the sender immediately by return e-mail and delete the message and any attachments.  Thank you.

Re: MADlib's Random Forest Classification and Regression Example

Posted by Frank McQuillan <fm...@pivotal.io>.
Hi Nurur,

Thanks for the question.  I just re-ran those examples on my local machine
on a recent version of Postgres and they seemed to work fine for me.

Your email says:

"PostgreSQL 8.2.15

(Greenplum Database 4.2.0 build 1)

(HAWQ 1.3.0.0 build 12954)"


Which platform did you see the error on?


Frank





On Wed, Jul 13, 2016 at 8:07 AM, Nurur Rahman <nu...@glic.com> wrote:

> Hello,
>
> I am going through Random Forest example given in MADlib's User
> Documentation:
>
>
> http://madlib.incubator.apache.org/docs/latest/group__grp__random__forest.html#examples
>
>
>
> In both cases when I run “SELECT madlib.forest_train( … … )” exactly as it
> is shown in
>
> steps 1 and 2 in the example page, I get the following error:
>
>
>
> ERROR:  plpy.SPIError: Function
> "madlib._dt_apply(madlib.bytea8,madlib.bytea8,madlib.bytea8,smallint,smallint,smallint,boolean,integer)":
> Invalid type conversion. Simple type supplied but backend expects composite
> type. (plpython.c:4648)
>
> CONTEXT:  Traceback (most recent call last):
>
>   PL/Python function "forest_train", line 39, in <module>
>
>     sample_ratio
>
>   PL/Python function "forest_train", line 553, in forest_train
>
>   PL/Python function "forest_train", line 2192, in _tree_train_using_bins
>
>   PL/Python function "forest_train", line 1162, in _one_step
>
> PL/Python function "forest_train"
>
>
>
>
>
>
>
> Relevant Info:
>
> "PostgreSQL 8.2.15
>
> (Greenplum Database 4.2.0 build 1)
>
> (HAWQ 1.3.0.0 build 12954)
>
>
>
> "MADlib version: 1.9, git revision: rc/v1.9-rc1
>
>
>
>
>
> Can anyone please explain what the reasons behind this error message? Your
> help will be appreciated.
>
>
>
>
>
> Thanks.
>
> Nurur
>
> ------------------------------
> ----------------------------------------- This message, and any
> attachments to it, may contain information that is privileged,
> confidential, and exempt from disclosure under applicable law. If the
> reader of this message is not the intended recipient, you are notified that
> any use, dissemination, distribution, copying, or communication of this
> message is strictly prohibited. If you have received this message in error,
> please notify the sender immediately by return e-mail and delete the
> message and any attachments. Thank you.
>
>