You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by Abhijith CHandraprabhu <ab...@gmail.com> on 2012/11/22 18:37:28 UTC

ALSWRFactorizerTest.java

 I am a first time java user. After struggling with MAHOUT+MAVEN+ECLISE for
a whole month, I have been able to get the system working. Could ony of you
kindly save me sometime by letting me know how can I use a particular
function like ALSWRFactorizer.java. My main intention is to study the
ALS-WR factorization, hence I would like to see the way recommendation is
done on the test data in ALSWRFactorizerTest.java. Where should I write my
code if any. How can I check the code in Debug mode i.e with breakpoints
like in MATLAB.  I am willing to learn things myself, but i just need some
right direction. I spent a whole month is just knowing what is MAVEN and
ECLIPSE and setting up MAHOUT.

I have no problems with the mathematical aspects, but I am not familiar
with the implementation in java, however I am hellbent on learning to
program with java but I am so lost.

-- 
Best regards,
Abhijith

Re: ALSWRFactorizerTest.java

Posted by Julian Ortega <jo...@gmail.com>.
You should have a look at the Mahout in Action book.

Nonetheless, this
example<https://github.com/tdunning/MiA/blob/mahout-0.7/src/main/java/mia/recommender/ch02/RecommenderIntro.java>from
the book shows the basics of making a recommender. In the example they
are using GenericUserBasedRecommender, in your case you would need a
SVDRecommender and you tell that recommender the type of Factorizer you
want to use, e.g. ALSWRFactorizer. That said, for a SVDRecommender you
don't need to specify a sense of similarity nor of neighborhood. However,
you can specify sampling strategies and/or whether the generated model
should be persisted (to avoid recalculating if you don't need to. Hope that
helps


On Thu, Nov 22, 2012 at 6:37 PM, Abhijith CHandraprabhu <abhijithc@gmail.com
> wrote:

>  I am a first time java user. After struggling with MAHOUT+MAVEN+ECLISE for
> a whole month, I have been able to get the system working. Could ony of you
> kindly save me sometime by letting me know how can I use a particular
> function like ALSWRFactorizer.java. My main intention is to study the
> ALS-WR factorization, hence I would like to see the way recommendation is
> done on the test data in ALSWRFactorizerTest.java. Where should I write my
> code if any. How can I check the code in Debug mode i.e with breakpoints
> like in MATLAB.  I am willing to learn things myself, but i just need some
> right direction. I spent a whole month is just knowing what is MAVEN and
> ECLIPSE and setting up MAHOUT.
>
> I have no problems with the mathematical aspects, but I am not familiar
> with the implementation in java, however I am hellbent on learning to
> program with java but I am so lost.
>
> --
> Best regards,
> Abhijith
>

Re: ALSWRFactorizerTest.java

Posted by Abhijith CHandraprabhu <ab...@gmail.com>.
Hi, thank you very much the thing is running  without any problems.

On Wed, Nov 28, 2012 at 9:44 AM, KUBA <pa...@interia.pl> wrote:

> Turn off eclipse, run console ,go to mahout directory and do
> mvn eclipse:clean
> mvn eclipse:eclipse
> mvn install
>
> then start eclipse, and even if errors remains (they should be gone), you
> should be able to run all tests, and debug them
>
>
>
> "Abhijith CHandraprabhu" <ab...@gmail.com> pisze:
> > Hello, thank you for your support..I am almost there.. But I after lots
> of
> > googling I see that I have
> > "decorates Java projects and working sets that contain build path
> errors".
> > I see a red exclamatory sign on all the projects in the package explorer.
> >
> > One possible solution I tried is to try JRE System Library -> Alternate
> > JRE. It was originally set to JRE System Library[JavaSE-1.6].
> > I also tried the Workspace default JRE(java-7-oracle).
> >
> > I tried to delete all the messaged in the Problem tab, and clean the
> > project but it still remained.
> >
> > I tried to maventest on the mahout-math project individually by right
> > clicking on mahout-math and selecting run as -> maventest.
> > It gives
> > Results :
> >
> > Tests run: 1867, Failures: 0, Errors: 0, Skipped: 0
> >
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] BUILD SUCCESS
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] Total time: 37.075s
> > [INFO] Finished at: Wed Nov 28 01:57:27 CET 2012
> > [INFO] Final Memory: 15M/132M
> > [INFO]
> >
> >
> > I tried to delete the messages in the Problem tab, and then clean the
> > project. but the problem still remained.
> >
> > I guess I again need help to sort this issue.
> >
> > The message in the Problem tab is:
> >
> > A cycle was detected in the build path of project 'mahout-math'. The
> cycle
> > consists of projects {mahout-core, mahout-math, mahout-examples,
> > mahout-integration}
> >
> > The project cannot be built until build path errors are resolved
> >
> > And so on for the rest of the projects.
> >
> > On Tue, Nov 27, 2012 at 10:23 PM, kuba  wrote:
> >
> > > Hello,
> > >
> > > Don't change anything in mahout 0.7 that you downloaded from repo,
> > > If you can't import it, that mean that you've got another project in
> > > eclipse workspace, that's named same, or reffer to same maven artifact.
> > > Clear your eclipse workspace, delete all projects from it (not from
> disk,
> > > it should be enough just if they disappear from eclipse).
> > >
> > > To remove project from eclipse click on its root node in project
> explorer
> > > and press 'delete' key.
> > >
> > > You can also go to file -> switch workspace -> other... and create new
> > > clean workspace.
> > >
> > >
> > >
> > > W dniu 27.11.2012 20:16, Abhijith CHandraprabhu pisze:
> > >
> > >> Hey!! I did the steps as mentioned by you, I face the following
> issues :
> > >>   1. I have downloaded the mahout-0.7 contents into my home folder and
> > >> tried
> > >> to import as mentioned, then I get the following warning :
> > >>
> > >>   Project mahout already exists
> > >>   Add a version or custom suffix using "Name template" in "Advanced"
> > >> settings
> > >>
> > >> So I change the Name template: [groupId].[artifactId]-[**version] in
> the
> > >> advanced settings,You need to delete
> > >>
> > >>
> > >> But this is affecting while building in eclipse.
> > >>
> > >> Invalid project description.
> > >> OK
> > >> /home/abhijith/workspace/**mahout-0.7/buildtools overlaps the
> location of
> > >> another project: 'mahout-buildtools-TRUNK'
> > >>
> > >> I think  have messed up with the naming conventions because out of
> > >> desperation I have tried different naming conventions.
> > >>
> > >> I have looked into how to remove projects from eclipse.
> > >>
> > >> Oh also I have deleted the old project root folder from /home.
> > >>
> > >> I am not able to remove the old projects, could you kindly tell me
> how can
> > >> I start fresh by removing everything old!!
> > >>
> > >>
> > >>
> > >> On Fri, Nov 23, 2012 at 9:16 PM, kuba  wrote:
> > >>
> > >>  Hi,
> > >>>
> > >>> I think you've problem because of way you downloaded or used your
> code in
> > >>> eclipse.
> > >>>
> > >>> Try to do it like that:
> > >>>
> > >>> 1. download tag, not trunk version of mahout, ie:
> > >>> https://svn.apache.org/repos/****asf/mahout/tags/mahout-0.7/
> > >>>
> > >>> >
> > >>>
> > >>> then you're not tied to newest version.
> > >>>
> > >>> 2. Install m2eclipse plugin for eclipse. DO NOT create new project,
> but
> > >>> after installing m2eclipse plugin,
> > >>> in eclipse go to file-> import -> maven -> exising maven project, and
> > >>> select root directory of just checked out source.
> > >>> That way you shouldn't have no errors in project. Why?
> > >>> Because when you create project, you need to mage project
> dependencies on
> > >>> your own (add missing jars). When you import project, it's maven
> that's
> > >>> taking care of downloading all required referenced jars.
> > >>>
> > >>> Hope that helps.
> > >>>
> > >>>
> > >>>
> > >>> W dniu 23.11.2012 17:47, Abhijith CHandraprabhu pisze:
> > >>>
> > >>>   Yes you are right. But how can I avert the 0.8-SNAPSHOT and stick
> to
> > >>> the
> > >>>
> > >>>> 0.7 version? I have configured MAVEN+MAHOUT into eclipse. So the
> upgrade
> > >>>> is
> > >>>> happening automatically..
> > >>>> I guess I have to avoid
> > >>>> [INFO] Building Apache Mahout 0.8-SNAPSHOT
> > >>>>
> > >>>> Do you think it a problem with the 0.8-SNAPSHOT only or with the
> > >>>> previous
> > >>>> versions as well. I cant tell as I still have not run a single
> program
> > >>>> successfully until now.
> > >>>>
> > >>>> Anyways while building the projects by maven:
> > >>>> [INFO] Apache Mahout                           ----            Was
> OK
> > >>>> [INFO] Mahout Build Tools                      ----            Was
> OK
> > >>>> [INFO] Mahout Math                              ------
> > >>>> Compilation Error
> > >>>> [INFO] Mahout Core
> > >>>> [INFO] Mahout Integration
> > >>>> [INFO] Mahout Examples
> > >>>> [INFO] Mahout Release Package
> > >>>>
> > >>>> While building the Mahout Math it gave an error:
> > >>>>
> > >>>> [INFO] Compiling 238 source files to
> > >>>> /home/abhijith/trunk/math/****target/classes
> > >>>> [INFO]
> ------------------------------****----------------------------**
> > >>>> --**-
> > >>>>
> > >>>> [ERROR] COMPILATION ERROR
> > >>>>
> > >>>> What do you think, I should I do?
> > >>>>
> > >>>> On Fri, Nov 23, 2012 at 4:14 PM, Julian Ortega
> > >>>> wrote:
> > >>>>
> > >>>>   Oh, you are using the 0.8-SNAPSHOT, which indeed has 6 tests.
> > >>>>
> > >>>>> My best guess is that Mahout and its subprojects are not properly
> > >>>>> configured to be used in Eclipse
> > >>>>>
> > >>>>> On Fri, Nov 23, 2012 at 4:03 PM, Abhijith CHandraprabhu <
> > >>>>> abhijithc@gmail.com
> > >>>>>
> > >>>>>  wrote:
> > >>>>>> ALSWRFactorizerTest
> > >>>>>>
> > >>>>>>
> > >>>>
> > >>
> > >
> >
> >
> > --
> > Best regards,
> > Abhijith
> >
>
>
>


-- 
Best regards,
Abhijith

Re: ALSWRFactorizerTest.java

Posted by KUBA <pa...@interia.pl>.
Turn off eclipse, run console ,go to mahout directory and do
mvn eclipse:clean
mvn eclipse:eclipse
mvn install

then start eclipse, and even if errors remains (they should be gone), you should be able to run all tests, and debug them



"Abhijith CHandraprabhu" <ab...@gmail.com> pisze:
> Hello, thank you for your support..I am almost there.. But I after lots of
> googling I see that I have
> "decorates Java projects and working sets that contain build path errors".
> I see a red exclamatory sign on all the projects in the package explorer.
> 
> One possible solution I tried is to try JRE System Library -> Alternate
> JRE. It was originally set to JRE System Library[JavaSE-1.6].
> I also tried the Workspace default JRE(java-7-oracle).
> 
> I tried to delete all the messaged in the Problem tab, and clean the
> project but it still remained.
> 
> I tried to maventest on the mahout-math project individually by right
> clicking on mahout-math and selecting run as -> maventest.
> It gives
> Results :
> 
> Tests run: 1867, Failures: 0, Errors: 0, Skipped: 0
> 
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 37.075s
> [INFO] Finished at: Wed Nov 28 01:57:27 CET 2012
> [INFO] Final Memory: 15M/132M
> [INFO]
> 
> 
> I tried to delete the messages in the Problem tab, and then clean the
> project. but the problem still remained.
> 
> I guess I again need help to sort this issue.
> 
> The message in the Problem tab is:
> 
> A cycle was detected in the build path of project 'mahout-math'. The cycle
> consists of projects {mahout-core, mahout-math, mahout-examples,
> mahout-integration}
> 
> The project cannot be built until build path errors are resolved
> 
> And so on for the rest of the projects.
> 
> On Tue, Nov 27, 2012 at 10:23 PM, kuba  wrote:
> 
> > Hello,
> >
> > Don't change anything in mahout 0.7 that you downloaded from repo,
> > If you can't import it, that mean that you've got another project in
> > eclipse workspace, that's named same, or reffer to same maven artifact.
> > Clear your eclipse workspace, delete all projects from it (not from disk,
> > it should be enough just if they disappear from eclipse).
> >
> > To remove project from eclipse click on its root node in project explorer
> > and press 'delete' key.
> >
> > You can also go to file -> switch workspace -> other... and create new
> > clean workspace.
> >
> >
> >
> > W dniu 27.11.2012 20:16, Abhijith CHandraprabhu pisze:
> >
> >> Hey!! I did the steps as mentioned by you, I face the following issues :
> >>   1. I have downloaded the mahout-0.7 contents into my home folder and
> >> tried
> >> to import as mentioned, then I get the following warning :
> >>
> >>   Project mahout already exists
> >>   Add a version or custom suffix using "Name template" in "Advanced"
> >> settings
> >>
> >> So I change the Name template: [groupId].[artifactId]-[**version] in the
> >> advanced settings,You need to delete
> >>
> >>
> >> But this is affecting while building in eclipse.
> >>
> >> Invalid project description.
> >> OK
> >> /home/abhijith/workspace/**mahout-0.7/buildtools overlaps the location of
> >> another project: 'mahout-buildtools-TRUNK'
> >>
> >> I think  have messed up with the naming conventions because out of
> >> desperation I have tried different naming conventions.
> >>
> >> I have looked into how to remove projects from eclipse.
> >>
> >> Oh also I have deleted the old project root folder from /home.
> >>
> >> I am not able to remove the old projects, could you kindly tell me how can
> >> I start fresh by removing everything old!!
> >>
> >>
> >>
> >> On Fri, Nov 23, 2012 at 9:16 PM, kuba  wrote:
> >>
> >>  Hi,
> >>>
> >>> I think you've problem because of way you downloaded or used your code in
> >>> eclipse.
> >>>
> >>> Try to do it like that:
> >>>
> >>> 1. download tag, not trunk version of mahout, ie:
> >>> https://svn.apache.org/repos/****asf/mahout/tags/mahout-0.7/
> >>> 
> >>> >
> >>>
> >>> then you're not tied to newest version.
> >>>
> >>> 2. Install m2eclipse plugin for eclipse. DO NOT create new project, but
> >>> after installing m2eclipse plugin,
> >>> in eclipse go to file-> import -> maven -> exising maven project, and
> >>> select root directory of just checked out source.
> >>> That way you shouldn't have no errors in project. Why?
> >>> Because when you create project, you need to mage project dependencies on
> >>> your own (add missing jars). When you import project, it's maven that's
> >>> taking care of downloading all required referenced jars.
> >>>
> >>> Hope that helps.
> >>>
> >>>
> >>>
> >>> W dniu 23.11.2012 17:47, Abhijith CHandraprabhu pisze:
> >>>
> >>>   Yes you are right. But how can I avert the 0.8-SNAPSHOT and stick to
> >>> the
> >>>
> >>>> 0.7 version? I have configured MAVEN+MAHOUT into eclipse. So the upgrade
> >>>> is
> >>>> happening automatically..
> >>>> I guess I have to avoid
> >>>> [INFO] Building Apache Mahout 0.8-SNAPSHOT
> >>>>
> >>>> Do you think it a problem with the 0.8-SNAPSHOT only or with the
> >>>> previous
> >>>> versions as well. I cant tell as I still have not run a single program
> >>>> successfully until now.
> >>>>
> >>>> Anyways while building the projects by maven:
> >>>> [INFO] Apache Mahout                           ----            Was OK
> >>>> [INFO] Mahout Build Tools                      ----            Was OK
> >>>> [INFO] Mahout Math                              ------
> >>>> Compilation Error
> >>>> [INFO] Mahout Core
> >>>> [INFO] Mahout Integration
> >>>> [INFO] Mahout Examples
> >>>> [INFO] Mahout Release Package
> >>>>
> >>>> While building the Mahout Math it gave an error:
> >>>>
> >>>> [INFO] Compiling 238 source files to
> >>>> /home/abhijith/trunk/math/****target/classes
> >>>> [INFO] ------------------------------****----------------------------**
> >>>> --**-
> >>>>
> >>>> [ERROR] COMPILATION ERROR
> >>>>
> >>>> What do you think, I should I do?
> >>>>
> >>>> On Fri, Nov 23, 2012 at 4:14 PM, Julian Ortega 
> >>>> wrote:
> >>>>
> >>>>   Oh, you are using the 0.8-SNAPSHOT, which indeed has 6 tests.
> >>>>
> >>>>> My best guess is that Mahout and its subprojects are not properly
> >>>>> configured to be used in Eclipse
> >>>>>
> >>>>> On Fri, Nov 23, 2012 at 4:03 PM, Abhijith CHandraprabhu <
> >>>>> abhijithc@gmail.com
> >>>>>
> >>>>>  wrote:
> >>>>>> ALSWRFactorizerTest
> >>>>>>
> >>>>>>
> >>>>
> >>
> >
> 
> 
> -- 
> Best regards,
> Abhijith
> 



Re: ALSWRFactorizerTest.java

Posted by Abhijith CHandraprabhu <ab...@gmail.com>.
Hello, thank you for your support..I am almost there.. But I after lots of
googling I see that I have
"decorates Java projects and working sets that contain build path errors".
I see a red exclamatory sign on all the projects in the package explorer.

One possible solution I tried is to try JRE System Library -> Alternate
JRE. It was originally set to JRE System Library[JavaSE-1.6].
I also tried the Workspace default JRE(java-7-oracle).

I tried to delete all the messaged in the Problem tab, and clean the
project but it still remained.

I tried to maventest on the mahout-math project individually by right
clicking on mahout-math and selecting run as -> maventest.
It gives
Results :

Tests run: 1867, Failures: 0, Errors: 0, Skipped: 0

[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 37.075s
[INFO] Finished at: Wed Nov 28 01:57:27 CET 2012
[INFO] Final Memory: 15M/132M
[INFO]


I tried to delete the messages in the Problem tab, and then clean the
project. but the problem still remained.

I guess I again need help to sort this issue.

The message in the Problem tab is:

A cycle was detected in the build path of project 'mahout-math'. The cycle
consists of projects {mahout-core, mahout-math, mahout-examples,
mahout-integration}

The project cannot be built until build path errors are resolved

And so on for the rest of the projects.

On Tue, Nov 27, 2012 at 10:23 PM, kuba <pa...@interia.pl> wrote:

> Hello,
>
> Don't change anything in mahout 0.7 that you downloaded from repo,
> If you can't import it, that mean that you've got another project in
> eclipse workspace, that's named same, or reffer to same maven artifact.
> Clear your eclipse workspace, delete all projects from it (not from disk,
> it should be enough just if they disappear from eclipse).
>
> To remove project from eclipse click on its root node in project explorer
> and press 'delete' key.
>
> You can also go to file -> switch workspace -> other... and create new
> clean workspace.
>
>
>
> W dniu 27.11.2012 20:16, Abhijith CHandraprabhu pisze:
>
>> Hey!! I did the steps as mentioned by you, I face the following issues :
>>   1. I have downloaded the mahout-0.7 contents into my home folder and
>> tried
>> to import as mentioned, then I get the following warning :
>>
>>   Project mahout already exists
>>   Add a version or custom suffix using "Name template" in "Advanced"
>> settings
>>
>> So I change the Name template: [groupId].[artifactId]-[**version] in the
>> advanced settings,You need to delete
>>
>>
>> But this is affecting while building in eclipse.
>>
>> Invalid project description.
>> OK
>> /home/abhijith/workspace/**mahout-0.7/buildtools overlaps the location of
>> another project: 'mahout-buildtools-TRUNK'
>>
>> I think  have messed up with the naming conventions because out of
>> desperation I have tried different naming conventions.
>>
>> I have looked into how to remove projects from eclipse.
>>
>> Oh also I have deleted the old project root folder from /home.
>>
>> I am not able to remove the old projects, could you kindly tell me how can
>> I start fresh by removing everything old!!
>>
>>
>>
>> On Fri, Nov 23, 2012 at 9:16 PM, kuba <pa...@interia.pl> wrote:
>>
>>  Hi,
>>>
>>> I think you've problem because of way you downloaded or used your code in
>>> eclipse.
>>>
>>> Try to do it like that:
>>>
>>> 1. download tag, not trunk version of mahout, ie:
>>> https://svn.apache.org/repos/****asf/mahout/tags/mahout-0.7/<https://svn.apache.org/repos/**asf/mahout/tags/mahout-0.7/>
>>> <h**ttps://svn.apache.org/repos/**asf/mahout/tags/mahout-0.7/<https://svn.apache.org/repos/asf/mahout/tags/mahout-0.7/>
>>> >
>>>
>>> then you're not tied to newest version.
>>>
>>> 2. Install m2eclipse plugin for eclipse. DO NOT create new project, but
>>> after installing m2eclipse plugin,
>>> in eclipse go to file-> import -> maven -> exising maven project, and
>>> select root directory of just checked out source.
>>> That way you shouldn't have no errors in project. Why?
>>> Because when you create project, you need to mage project dependencies on
>>> your own (add missing jars). When you import project, it's maven that's
>>> taking care of downloading all required referenced jars.
>>>
>>> Hope that helps.
>>>
>>>
>>>
>>> W dniu 23.11.2012 17:47, Abhijith CHandraprabhu pisze:
>>>
>>>   Yes you are right. But how can I avert the 0.8-SNAPSHOT and stick to
>>> the
>>>
>>>> 0.7 version? I have configured MAVEN+MAHOUT into eclipse. So the upgrade
>>>> is
>>>> happening automatically..
>>>> I guess I have to avoid
>>>> [INFO] Building Apache Mahout 0.8-SNAPSHOT
>>>>
>>>> Do you think it a problem with the 0.8-SNAPSHOT only or with the
>>>> previous
>>>> versions as well. I cant tell as I still have not run a single program
>>>> successfully until now.
>>>>
>>>> Anyways while building the projects by maven:
>>>> [INFO] Apache Mahout                           ----            Was OK
>>>> [INFO] Mahout Build Tools                      ----            Was OK
>>>> [INFO] Mahout Math                              ------
>>>> Compilation Error
>>>> [INFO] Mahout Core
>>>> [INFO] Mahout Integration
>>>> [INFO] Mahout Examples
>>>> [INFO] Mahout Release Package
>>>>
>>>> While building the Mahout Math it gave an error:
>>>>
>>>> [INFO] Compiling 238 source files to
>>>> /home/abhijith/trunk/math/****target/classes
>>>> [INFO] ------------------------------****----------------------------**
>>>> --**-
>>>>
>>>> [ERROR] COMPILATION ERROR
>>>>
>>>> What do you think, I should I do?
>>>>
>>>> On Fri, Nov 23, 2012 at 4:14 PM, Julian Ortega <jo...@gmail.com>
>>>> wrote:
>>>>
>>>>   Oh, you are using the 0.8-SNAPSHOT, which indeed has 6 tests.
>>>>
>>>>> My best guess is that Mahout and its subprojects are not properly
>>>>> configured to be used in Eclipse
>>>>>
>>>>> On Fri, Nov 23, 2012 at 4:03 PM, Abhijith CHandraprabhu <
>>>>> abhijithc@gmail.com
>>>>>
>>>>>  wrote:
>>>>>> ALSWRFactorizerTest
>>>>>>
>>>>>>
>>>>
>>
>


-- 
Best regards,
Abhijith

Re: ALSWRFactorizerTest.java

Posted by kuba <pa...@interia.pl>.
Hello,

Don't change anything in mahout 0.7 that you downloaded from repo,
If you can't import it, that mean that you've got another project in 
eclipse workspace, that's named same, or reffer to same maven artifact.
Clear your eclipse workspace, delete all projects from it (not from 
disk, it should be enough just if they disappear from eclipse).

To remove project from eclipse click on its root node in project 
explorer and press 'delete' key.

You can also go to file -> switch workspace -> other... and create new 
clean workspace.



W dniu 27.11.2012 20:16, Abhijith CHandraprabhu pisze:
> Hey!! I did the steps as mentioned by you, I face the following issues :
>   1. I have downloaded the mahout-0.7 contents into my home folder and tried
> to import as mentioned, then I get the following warning :
>
>   Project mahout already exists
>   Add a version or custom suffix using "Name template" in "Advanced" settings
>
> So I change the Name template: [groupId].[artifactId]-[version] in the
> advanced settings,You need to delete
>
> But this is affecting while building in eclipse.
>
> Invalid project description.
> OK
> /home/abhijith/workspace/mahout-0.7/buildtools overlaps the location of
> another project: 'mahout-buildtools-TRUNK'
>
> I think  have messed up with the naming conventions because out of
> desperation I have tried different naming conventions.
>
> I have looked into how to remove projects from eclipse.
>
> Oh also I have deleted the old project root folder from /home.
>
> I am not able to remove the old projects, could you kindly tell me how can
> I start fresh by removing everything old!!
>
>
>
> On Fri, Nov 23, 2012 at 9:16 PM, kuba <pa...@interia.pl> wrote:
>
>> Hi,
>>
>> I think you've problem because of way you downloaded or used your code in
>> eclipse.
>>
>> Try to do it like that:
>>
>> 1. download tag, not trunk version of mahout, ie:
>> https://svn.apache.org/repos/**asf/mahout/tags/mahout-0.7/<https://svn.apache.org/repos/asf/mahout/tags/mahout-0.7/>
>> then you're not tied to newest version.
>>
>> 2. Install m2eclipse plugin for eclipse. DO NOT create new project, but
>> after installing m2eclipse plugin,
>> in eclipse go to file-> import -> maven -> exising maven project, and
>> select root directory of just checked out source.
>> That way you shouldn't have no errors in project. Why?
>> Because when you create project, you need to mage project dependencies on
>> your own (add missing jars). When you import project, it's maven that's
>> taking care of downloading all required referenced jars.
>>
>> Hope that helps.
>>
>>
>>
>> W dniu 23.11.2012 17:47, Abhijith CHandraprabhu pisze:
>>
>>   Yes you are right. But how can I avert the 0.8-SNAPSHOT and stick to the
>>> 0.7 version? I have configured MAVEN+MAHOUT into eclipse. So the upgrade
>>> is
>>> happening automatically..
>>> I guess I have to avoid
>>> [INFO] Building Apache Mahout 0.8-SNAPSHOT
>>>
>>> Do you think it a problem with the 0.8-SNAPSHOT only or with the previous
>>> versions as well. I cant tell as I still have not run a single program
>>> successfully until now.
>>>
>>> Anyways while building the projects by maven:
>>> [INFO] Apache Mahout                           ----            Was OK
>>> [INFO] Mahout Build Tools                      ----            Was OK
>>> [INFO] Mahout Math                              ------
>>> Compilation Error
>>> [INFO] Mahout Core
>>> [INFO] Mahout Integration
>>> [INFO] Mahout Examples
>>> [INFO] Mahout Release Package
>>>
>>> While building the Mahout Math it gave an error:
>>>
>>> [INFO] Compiling 238 source files to
>>> /home/abhijith/trunk/math/**target/classes
>>> [INFO] ------------------------------**------------------------------**-
>>> [ERROR] COMPILATION ERROR
>>>
>>> What do you think, I should I do?
>>>
>>> On Fri, Nov 23, 2012 at 4:14 PM, Julian Ortega <jo...@gmail.com>
>>> wrote:
>>>
>>>   Oh, you are using the 0.8-SNAPSHOT, which indeed has 6 tests.
>>>> My best guess is that Mahout and its subprojects are not properly
>>>> configured to be used in Eclipse
>>>>
>>>> On Fri, Nov 23, 2012 at 4:03 PM, Abhijith CHandraprabhu <
>>>> abhijithc@gmail.com
>>>>
>>>>> wrote:
>>>>> ALSWRFactorizerTest
>>>>>
>>>
>


Re: ALSWRFactorizerTest.java

Posted by Abhijith CHandraprabhu <ab...@gmail.com>.
Hey!! I did the steps as mentioned by you, I face the following issues :
 1. I have downloaded the mahout-0.7 contents into my home folder and tried
to import as mentioned, then I get the following warning :

 Project mahout already exists
 Add a version or custom suffix using "Name template" in "Advanced" settings

So I change the Name template: [groupId].[artifactId]-[version] in the
advanced settings,

But this is affecting while building in eclipse.

Invalid project description.
OK
/home/abhijith/workspace/mahout-0.7/buildtools overlaps the location of
another project: 'mahout-buildtools-TRUNK'

I think  have messed up with the naming conventions because out of
desperation I have tried different naming conventions.

I have looked into how to remove projects from eclipse.

Oh also I have deleted the old project root folder from /home.

I am not able to remove the old projects, could you kindly tell me how can
I start fresh by removing everything old!!



On Fri, Nov 23, 2012 at 9:16 PM, kuba <pa...@interia.pl> wrote:

> Hi,
>
> I think you've problem because of way you downloaded or used your code in
> eclipse.
>
> Try to do it like that:
>
> 1. download tag, not trunk version of mahout, ie:
> https://svn.apache.org/repos/**asf/mahout/tags/mahout-0.7/<https://svn.apache.org/repos/asf/mahout/tags/mahout-0.7/>
> then you're not tied to newest version.
>
> 2. Install m2eclipse plugin for eclipse. DO NOT create new project, but
> after installing m2eclipse plugin,
> in eclipse go to file-> import -> maven -> exising maven project, and
> select root directory of just checked out source.
> That way you shouldn't have no errors in project. Why?
> Because when you create project, you need to mage project dependencies on
> your own (add missing jars). When you import project, it's maven that's
> taking care of downloading all required referenced jars.
>
> Hope that helps.
>
>
>
> W dniu 23.11.2012 17:47, Abhijith CHandraprabhu pisze:
>
>  Yes you are right. But how can I avert the 0.8-SNAPSHOT and stick to the
>> 0.7 version? I have configured MAVEN+MAHOUT into eclipse. So the upgrade
>> is
>> happening automatically..
>> I guess I have to avoid
>> [INFO] Building Apache Mahout 0.8-SNAPSHOT
>>
>> Do you think it a problem with the 0.8-SNAPSHOT only or with the previous
>> versions as well. I cant tell as I still have not run a single program
>> successfully until now.
>>
>> Anyways while building the projects by maven:
>> [INFO] Apache Mahout                           ----            Was OK
>> [INFO] Mahout Build Tools                      ----            Was OK
>> [INFO] Mahout Math                              ------
>> Compilation Error
>> [INFO] Mahout Core
>> [INFO] Mahout Integration
>> [INFO] Mahout Examples
>> [INFO] Mahout Release Package
>>
>> While building the Mahout Math it gave an error:
>>
>> [INFO] Compiling 238 source files to
>> /home/abhijith/trunk/math/**target/classes
>> [INFO] ------------------------------**------------------------------**-
>> [ERROR] COMPILATION ERROR
>>
>> What do you think, I should I do?
>>
>> On Fri, Nov 23, 2012 at 4:14 PM, Julian Ortega <jo...@gmail.com>
>> wrote:
>>
>>  Oh, you are using the 0.8-SNAPSHOT, which indeed has 6 tests.
>>>
>>> My best guess is that Mahout and its subprojects are not properly
>>> configured to be used in Eclipse
>>>
>>> On Fri, Nov 23, 2012 at 4:03 PM, Abhijith CHandraprabhu <
>>> abhijithc@gmail.com
>>>
>>>> wrote:
>>>> ALSWRFactorizerTest
>>>>
>>>
>>
>>
>


-- 
Best regards,
Abhijith

Re: ALSWRFactorizerTest.java

Posted by kuba <pa...@interia.pl>.
Hi,

I think you've problem because of way you downloaded or used your code 
in eclipse.

Try to do it like that:

1. download tag, not trunk version of mahout, ie:
https://svn.apache.org/repos/asf/mahout/tags/mahout-0.7/
then you're not tied to newest version.

2. Install m2eclipse plugin for eclipse. DO NOT create new project, but 
after installing m2eclipse plugin,
in eclipse go to file-> import -> maven -> exising maven project, and 
select root directory of just checked out source.
That way you shouldn't have no errors in project. Why?
Because when you create project, you need to mage project dependencies 
on your own (add missing jars). When you import project, it's maven 
that's taking care of downloading all required referenced jars.

Hope that helps.



W dniu 23.11.2012 17:47, Abhijith CHandraprabhu pisze:
> Yes you are right. But how can I avert the 0.8-SNAPSHOT and stick to the
> 0.7 version? I have configured MAVEN+MAHOUT into eclipse. So the upgrade is
> happening automatically..
> I guess I have to avoid
> [INFO] Building Apache Mahout 0.8-SNAPSHOT
>
> Do you think it a problem with the 0.8-SNAPSHOT only or with the previous
> versions as well. I cant tell as I still have not run a single program
> successfully until now.
>
> Anyways while building the projects by maven:
> [INFO] Apache Mahout                           ----            Was OK
> [INFO] Mahout Build Tools                      ----            Was OK
> [INFO] Mahout Math                              ------
> Compilation Error
> [INFO] Mahout Core
> [INFO] Mahout Integration
> [INFO] Mahout Examples
> [INFO] Mahout Release Package
>
> While building the Mahout Math it gave an error:
>
> [INFO] Compiling 238 source files to
> /home/abhijith/trunk/math/target/classes
> [INFO] -------------------------------------------------------------
> [ERROR] COMPILATION ERROR
>
> What do you think, I should I do?
>
> On Fri, Nov 23, 2012 at 4:14 PM, Julian Ortega <jo...@gmail.com> wrote:
>
>> Oh, you are using the 0.8-SNAPSHOT, which indeed has 6 tests.
>>
>> My best guess is that Mahout and its subprojects are not properly
>> configured to be used in Eclipse
>>
>> On Fri, Nov 23, 2012 at 4:03 PM, Abhijith CHandraprabhu <
>> abhijithc@gmail.com
>>> wrote:
>>> ALSWRFactorizerTest
>
>


Re: ALSWRFactorizerTest.java

Posted by Abhijith CHandraprabhu <ab...@gmail.com>.
Yes you are right. But how can I avert the 0.8-SNAPSHOT and stick to the
0.7 version? I have configured MAVEN+MAHOUT into eclipse. So the upgrade is
happening automatically..
I guess I have to avoid
[INFO] Building Apache Mahout 0.8-SNAPSHOT

Do you think it a problem with the 0.8-SNAPSHOT only or with the previous
versions as well. I cant tell as I still have not run a single program
successfully until now.

Anyways while building the projects by maven:
[INFO] Apache Mahout                           ----            Was OK
[INFO] Mahout Build Tools                      ----            Was OK
[INFO] Mahout Math                              ------
Compilation Error
[INFO] Mahout Core
[INFO] Mahout Integration
[INFO] Mahout Examples
[INFO] Mahout Release Package

While building the Mahout Math it gave an error:

[INFO] Compiling 238 source files to
/home/abhijith/trunk/math/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR

What do you think, I should I do?

On Fri, Nov 23, 2012 at 4:14 PM, Julian Ortega <jo...@gmail.com> wrote:

> Oh, you are using the 0.8-SNAPSHOT, which indeed has 6 tests.
>
> My best guess is that Mahout and its subprojects are not properly
> configured to be used in Eclipse
>
> On Fri, Nov 23, 2012 at 4:03 PM, Abhijith CHandraprabhu <
> abhijithc@gmail.com
> > wrote:
>
> > ALSWRFactorizerTest
>



-- 
Best regards,
Abhijith

Re: ALSWRFactorizerTest.java

Posted by Julian Ortega <jo...@gmail.com>.
Oh, you are using the 0.8-SNAPSHOT, which indeed has 6 tests.

My best guess is that Mahout and its subprojects are not properly
configured to be used in Eclipse

On Fri, Nov 23, 2012 at 4:03 PM, Abhijith CHandraprabhu <abhijithc@gmail.com
> wrote:

> ALSWRFactorizerTest

Re: ALSWRFactorizerTest.java

Posted by Abhijith CHandraprabhu <ab...@gmail.com>.
Thank you Julian, I have now little bit idea about what is happening, I see
that there are 6 tests in ALSWRFactorizerTest.java, sadly I have errors in
all 6 of them :-(

On Fri, Nov 23, 2012 at 3:53 PM, Julian Ortega <jo...@gmail.com> wrote:

> Sorry, I meant the ALSWRFactorizerTest has 5 tests
>
>
> On Fri, Nov 23, 2012 at 3:52 PM, Julian Ortega <jo...@gmail.com> wrote:
>
> > From what I see you are running the ClustersFilterTest (which has 2
> > tests), not the ALSWRFactorizerTest (which has 3 tests). So that might be
> > why you never get into the breakpoints
> >
> > On Fri, Nov 23, 2012 at 3:40 PM, Abhijith CHandraprabhu <
> > abhijithc@gmail.com> wrote:
> >
> >> ClustersFilterTest
> >
> >
> >
>



-- 
Best regards,
Abhijith

Re: ALSWRFactorizerTest.java

Posted by Julian Ortega <jo...@gmail.com>.
Sorry, I meant the ALSWRFactorizerTest has 5 tests


On Fri, Nov 23, 2012 at 3:52 PM, Julian Ortega <jo...@gmail.com> wrote:

> From what I see you are running the ClustersFilterTest (which has 2
> tests), not the ALSWRFactorizerTest (which has 3 tests). So that might be
> why you never get into the breakpoints
>
> On Fri, Nov 23, 2012 at 3:40 PM, Abhijith CHandraprabhu <
> abhijithc@gmail.com> wrote:
>
>> ClustersFilterTest
>
>
>

Re: ALSWRFactorizerTest.java

Posted by Julian Ortega <jo...@gmail.com>.
>From what I see you are running the ClustersFilterTest (which has 2 tests),
not the ALSWRFactorizerTest (which has 3 tests). So that might be why you
never get into the breakpoints

On Fri, Nov 23, 2012 at 3:40 PM, Abhijith CHandraprabhu <abhijithc@gmail.com
> wrote:

> ClustersFilterTest

Re: ALSWRFactorizerTest.java

Posted by Abhijith CHandraprabhu <ab...@gmail.com>.
Hello, thank you very much for your help. You are giving me the exact
answer I needed, but I am unable to see the output after ->Run as -> JUnit
Test.

When I right click on ALSWRFactorizerTest.java , I get the Run
Configuration window. Here I select test runner: JUnit 4,
the  Project is mahout-examples
      Test class : org.apache.mahout.clustering.display.ClustersFilterTest
      Test Method : (All methods)

I click Run
Then I get a Errors in Workspace message saying that :
Errors exist in required project(s):
mahout-integration, mahout-examples, mahout-core, mahout-math
 Proceed with launch?.
After proceeding, JUnit window says : runs 2/2, Errors:0, Failures: 0

My question might seem silly to you, but I have no idea about it, How to
view the test results?

Also could you tell me where can I change the log level to 'info' or
'debug'.

I was not able to run in debug mode with breakpoints.

Thank you very much. I would really appreciate little more support from you
until I figure things out how to debug the code.

On Thu, Nov 22, 2012 at 7:00 PM, kuba <pa...@interia.pl> wrote:

> Hi,
>
> ALSWRFactorizerTest.java is test case written in JUnit, for developers, to
> check if ALSWRFactorizer is working right.
> If you want to run it in eclipse:
> open ALSWRFactorizerTest.java file in eclipse editor, right click -> Run
> as -> JUnit Test, and you should see test results.
>
>
> functions annotated as @TestCase are separeate test cases.
> Function annotated @Before is used to set data before running tests.
> If you want to have a good look at what's going on inside, try changing
> log level to 'info' or 'debug'.
>
> If you want to be able to debug this file, right click -> Debug as.. ->
> JUnit Test. You can set breakpoints, and evaluate parts of code - just
> select part of code and press Ctrl+Shift+I.
>
> Hope this helps.
>
>
>
>
>
>
> Abhijith CHandraprabhu wrote:
>
>>   I am a first time java user. After struggling with MAHOUT+MAVEN+ECLISE
>> for
>> a whole month, I have been able to get the system working. Could ony of
>> you
>> kindly save me sometime by letting me know how can I use a particular
>> function like ALSWRFactorizer.java. My main intention is to study the
>> ALS-WR factorization, hence I would like to see the way recommendation is
>> done on the test data in ALSWRFactorizerTest.java. Where should I write my
>> code if any. How can I check the code in Debug mode i.e with breakpoints
>> like in MATLAB.  I am willing to learn things myself, but i just need some
>> right direction. I spent a whole month is just knowing what is MAVEN and
>> ECLIPSE and setting up MAHOUT.
>>
>> I have no problems with the mathematical aspects, but I am not familiar
>> with the implementation in java, however I am hellbent on learning to
>> program with java but I am so lost.
>>
>>
>


-- 
Best regards,
Abhijith

Re: ALSWRFactorizerTest.java

Posted by kuba <pa...@interia.pl>.
Hi,

ALSWRFactorizerTest.java is test case written in JUnit, for developers, to check if ALSWRFactorizer is working right.
If you want to run it in eclipse:
open ALSWRFactorizerTest.java file in eclipse editor, right click -> Run as -> JUnit Test, and you should see test results.


functions annotated as @TestCase are separeate test cases.
Function annotated @Before is used to set data before running tests.
If you want to have a good look at what's going on inside, try changing log level to 'info' or 'debug'.

If you want to be able to debug this file, right click -> Debug as.. -> JUnit Test. You can set breakpoints, and evaluate parts of code - just select part of code and press Ctrl+Shift+I.

Hope this helps.





Abhijith CHandraprabhu wrote:
>   I am a first time java user. After struggling with MAHOUT+MAVEN+ECLISE for
> a whole month, I have been able to get the system working. Could ony of you
> kindly save me sometime by letting me know how can I use a particular
> function like ALSWRFactorizer.java. My main intention is to study the
> ALS-WR factorization, hence I would like to see the way recommendation is
> done on the test data in ALSWRFactorizerTest.java. Where should I write my
> code if any. How can I check the code in Debug mode i.e with breakpoints
> like in MATLAB.  I am willing to learn things myself, but i just need some
> right direction. I spent a whole month is just knowing what is MAVEN and
> ECLIPSE and setting up MAHOUT.
>
> I have no problems with the mathematical aspects, but I am not familiar
> with the implementation in java, however I am hellbent on learning to
> program with java but I am so lost.
>