Fri Aug 17, 2018 5:21 pm
Login Register Lost Password? Contact Us


Examples.Sentilyze.NaiveBayes.Classify error

Topics related to the set of Machine Learning libraries and Matrix processing algorithms

Tue Feb 02, 2016 5:00 pm Change Time Zone

Getting error when I try to run Classification example
Examples.Sentilyze.NaiveBayes.Classify(<dataset>);

Error: Unknown identifier "FieldAggregates" (3, 14), 2167,

Looks like there is a circular reference
ML.Classify calls ML.Discretize-> ML.FieldAggregates-> ML.Correlate-> ML.FieldAggregates

Not sure if I am missing something.
balajisampath
 
Posts: 63
Joined: Mon Jul 22, 2013 6:29 pm

Tue Feb 02, 2016 7:24 pm Change Time Zone

Your attempt to call Examples.Sentilyze.NaiveBayes.Classify, should look something like the following:
Code: Select all
IMPORT ML;
IMPORT Examples.Sentilyze AS Sentilyze;
d:=DATASET('~gilbch::sentilyze::trainer::english',ML.Docs.Types.Raw,THOR);
Sentilyze.NaiveBayes.Classify(d);
tlhumphrey2
 
Posts: 250
Joined: Mon May 07, 2012 6:23 pm

Tue Feb 02, 2016 7:55 pm Change Time Zone

I tried the same but didn't post the complete code.
Now just tried your code and got the same error
error.jpg
error.jpg (149.49 KiB) Viewed 1007 times
balajisampath
 
Posts: 63
Joined: Mon Jul 22, 2013 6:29 pm

Tue Feb 02, 2016 8:47 pm Change Time Zone

Your ML folder should look like the following. You should see FieldAggregates in it.
Attachments
MLFolderContents.png
ML Folder Contents
MLFolderContents.png (19.66 KiB) Viewed 1004 times
tlhumphrey2
 
Posts: 250
Joined: Mon May 07, 2012 6:23 pm

Tue Feb 02, 2016 9:43 pm Change Time Zone

Yes it is. Please refer the image attached in my above reply. Scroll to right you can see my folder structure and files.
balajisampath
 
Posts: 63
Joined: Mon Jul 22, 2013 6:29 pm

Wed Feb 03, 2016 2:32 pm Change Time Zone

Where is the "unknown identifier FieldAggregates" error coming from? It isn't coming from Sentilyze.NaiveBayes.Classify because that function doesn't use FieldAggregates. So, the error must be coming from something that this function uses.

In the Syntax error window use the horizontal scroll bar and scroll over the right of the error. There you should see the name of the function/module the error comes from. Please let me know the function's name.
tlhumphrey2
 
Posts: 250
Joined: Mon May 07, 2012 6:23 pm

Wed Feb 03, 2016 3:18 pm Change Time Zone

Error: Unknown identifier "FieldAggregates" (3, 14), 2167, C:\Users\Public\Documents\HPCC Systems\ECL\My Files\ML\Correlate.ecl

Examples.Sentilyze.NaiveBayes.Classify calls ML.Discretize which in turn calls ML.FieldAggregates.

I am getting error when I try to compile ML.FieldAggregates or ML.Correlate
balajisampath
 
Posts: 63
Joined: Mon Jul 22, 2013 6:29 pm

Wed Feb 03, 2016 4:33 pm Change Time Zone

I have attempted to setup my file structure to look like yours -- hoping to duplicate the error you are getting. But, I couldn't duplicate the error. The attachment is the file structure I currently have which should look similar to yours where the Examples and ML folders are contained in "My Files". You should also have the 3 blue folders I have at the bottom, i.e. Examples, ecllibrary, and plugins.
Attachments
2-3-2016-11-12-50AM.jpg
2-3-2016-11-12-50AM.jpg (46.52 KiB) Viewed 978 times
tlhumphrey2
 
Posts: 250
Joined: Mon May 07, 2012 6:23 pm

Wed Feb 03, 2016 5:24 pm Change Time Zone

Sorry. I miss-spoke. You don't need the blue Examples folder shown at the bottom of my file structure attachment.
tlhumphrey2
 
Posts: 250
Joined: Mon May 07, 2012 6:23 pm

Wed Feb 03, 2016 10:51 pm Change Time Zone

Download the latest ML folder and try to compile ML.FieldAggregates
balajisampath
 
Posts: 63
Joined: Mon Jul 22, 2013 6:29 pm

Next

Return to Machine Learning

Who is online

Users browsing this forum: No registered users and 1 guest