Example for R PLugin

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

Example for R PLugin

Prathibha
Hello,

I am trying to use RConsole with Weka.

Please provide an example for doing k-means clustering of the loaded dataset, on the RConsole of weka  on the Explorer.
This will be very helpful to understand the GUI.

Thank you very much.


Reply | Threaded
Open this post in threaded view
|

Re: Example for R PLugin

Eibe Frank-2
Administrator
Just enter the standard R commands. The data from the Preprocess panel is stored in "rdata".

To run k-means with 10 clusters and the default algorithm, and print the clusters, you'd use:

>>> clusters=kmeans(rdata,10)
>>> print(clusters)

Cheers,
Eibe

On 27/03/2014 19:18, Prathibha wrote:

> Hello,
>
> I am trying to use RConsole with Weka.
>
> Please provide an example for doing k-means clustering of the loaded
> dataset, on the RConsole of weka  on the Explorer.
> This will be very helpful to understand the GUI.
>
> Thank you very much.
>
>
>
>
>
>
> --
> View this message in context: http://weka.8497.n7.nabble.com/Example-for-R-PLugin-tp30563.html
> Sent from the WEKA mailing list archive at Nabble.com.
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: http://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>
_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: http://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: Example for R PLugin

Prathibha
Thank you very much Eibe.

I have installed R and added R_HOME vaiable (pointing to my R/../bin) , R.exe is in my PATH .
I am not sure where to set java.library.path property. Can you please guide me with that. ?
I am running weka on windows 64 bit machine.

One more question:
Is there a way to use Rconsole from the command line ?

Thank you very much for the prompt responses. They are helping a lot.



Eibe Frank-2 wrote
Just enter the standard R commands. The data from the Preprocess panel is stored in "rdata".

To run k-means with 10 clusters and the default algorithm, and print the clusters, you'd use:

>>> clusters=kmeans(rdata,10)
>>> print(clusters)

Cheers,
Eibe

On 27/03/2014 19:18, Prathibha wrote:
> Hello,
>
> I am trying to use RConsole with Weka.
>
> Please provide an example for doing k-means clustering of the loaded
> dataset, on the RConsole of weka  on the Explorer.
> This will be very helpful to understand the GUI.
>
> Thank you very much.
>
>
>
>
>
>
> --
> View this message in context: http://weka.8497.n7.nabble.com/Example-for-R-PLugin-tp30563.html
> Sent from the WEKA mailing list archive at Nabble.com.
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: http://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>
_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: http://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: Example for R PLugin

Mark Hall
On 28/03/14 4:30 am, "Prathibha" <[hidden email]> wrote:

>Thank you very much Eibe.
>
>I have installed R and added R_HOME vaiable (pointing to my R/../bin) ,
>R.exe is in my PATH .
>I am not sure where to set java.library.path property. Can you please
>guide
>me with that. ?
>I am running weka on windows 64 bit machine.
>
>One more question:
>Is there a way to use Rconsole from the command line ?
>
>Thank you very much for the prompt responses. They are helping a lot.


When you installed R on your machine it would have asked you for a folder
to use as your personal packages directory (this is where R installs its
packages). You need to set the R_LIBS_USER environment variable to point
to this directory. Once you’ve done this, and you’ve manually installed
the “rJava” package in R, Weka should be able to find the JRI native
libraries when it starts up.

Cheers,
Mark.

>
>
>
>
>Eibe Frank-2 wrote
>> Just enter the standard R commands. The data from the Preprocess panel
>>is
>> stored in "rdata".
>>
>> To run k-means with 10 clusters and the default algorithm, and print the
>> clusters, you'd use:
>>
>>>>> clusters=kmeans(rdata,10)
>>>>> print(clusters)
>>
>> Cheers,
>> Eibe
>>
>> On 27/03/2014 19:18, Prathibha wrote:
>>> Hello,
>>>
>>> I am trying to use RConsole with Weka.
>>>
>>> Please provide an example for doing k-means clustering of the loaded
>>> dataset, on the RConsole of weka  on the Explorer.
>>> This will be very helpful to understand the GUI.
>>>
>>> Thank you very much.
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://weka.8497.n7.nabble.com/Example-for-R-PLugin-tp30563.html
>>> Sent from the WEKA mailing list archive at Nabble.com.
>>> _______________________________________________
>>> Wekalist mailing list
>>> Send posts to:
>
>> Wekalist@.ac
>
>>> List info and subscription status:
>>> http://list.waikato.ac.nz/mailman/listinfo/wekalist
>>> List etiquette:
>>> http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>>>
>> _______________________________________________
>> Wekalist mailing list
>> Send posts to:
>
>> Wekalist@.ac
>
>> List info and subscription status:
>> http://list.waikato.ac.nz/mailman/listinfo/wekalist
>> List etiquette:
>> http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>
>
>
>
>
>--
>View this message in context:
>http://weka.8497.n7.nabble.com/Example-for-R-PLugin-tp30563p30568.html
>Sent from the WEKA mailing list archive at Nabble.com.
>_______________________________________________
>Wekalist mailing list
>Send posts to: [hidden email]
>List info and subscription status:
>http://list.waikato.ac.nz/mailman/listinfo/wekalist
>List etiquette:
>http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>



_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: http://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: Example for R PLugin

Michael Hall
On Mar 27, 2014, at 2:34 PM, Mark Hall <[hidden email]> wrote:

You need to set the R_LIBS_USER environment variable to point
to this directory. 

Curious, how do you do that on a Windows machine.

Michael Hall



AppConverter convert Apple jvm to openjdk apps http://www195.pair.com/mik3hall/index.html#appconverter






_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: http://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: Example for R PLugin

Eibe Frank-2
Administrator
Here is some info on changing an environment variable in different
versions of Windows (in this case, the PATH variable):

   http://www.java.com/en/download/help/path.xml

For some versions of Windows, there's also the setx command, which can
be applied in the Windows command-line interface:

   http://technet.microsoft.com/en-us/library/cc755104.aspx

Cheers,
Eibe

On 28/03/2014 12:57, Michael Hall wrote:

> On Mar 27, 2014, at 2:34 PM, Mark Hall <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>> You need to set the R_LIBS_USER environment variable to point
>> to this directory.
>
> Curious, how do you do that on a Windows machine.
>
> Michael Hall
>
> *trz*nio.2 for OS X http://www195.pair.com/mik3hall/index.html#trz
>
> *HalfPipe*Java 6/7 shell app
> http://www195.pair.com/mik3hall/index.html#halfpipe
>
> *AppConverter*convert Apple jvm to openjdk apps
> http://www195.pair.com/mik3hall/index.html#appconverter
>
>
>
>
>
>
>
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: http://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>
_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: http://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: Example for R PLugin

Mark Hall
In reply to this post by Michael Hall
On 28/03/14 12:57 pm, "Michael Hall" <[hidden email]> wrote:

>On Mar 27, 2014, at 2:34 PM, Mark Hall <[hidden email]> wrote:
>
>
>You need to set the R_LIBS_USER environment variable to point
>to this directory.
>
>
>Curious, how do you do that on a Windows machine.

There is a control panel in the system settings (I forget what its called
exactly, but searching for “environment variable” from the Start menu
finds it) that allows you to set variables.

Cheers,
Mark.


_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: http://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: Example for R PLugin

Rado Lipovec
Hi!
I wanted to test some classifiers in R using RPlugin but I did not succeed. What am I doing wrong?

Here are some informations on installation and execution in Weka:


Windows 7 x64
Weka 3.9.1  (I tried 3.8.1 too)
RPlugin 1.3.20 (I tried 1.2.20 with Weka 3.8.1 too)


R installation: C:\Program Files\R\R-3.4.0
PATH ....;C:\Program Files\R\R-3.4.0\bin\x64
R_HOME = C:\Program Files\R\R-3.4.0
R_USER_LIBS = C:\Program Files\R\R-3.4.0\library

R is working properly, but not RPlugin in Weka:

1. Information on RConsole:

"R does not seem to be available. Check that you have the R_HOME environment variable set,
R is in your path and that java.library.path property points to the JRI native library.
Information on settup for different OS can be found at http://www.rforge.net/JRI"

2. In Explore and Experiment with loaded RPlugin  is not possible to classify, clicking on "Choose" in Classifier panel hangs Weka.

3. In KnowledgeFlow is possible to design flow with MLR Classifier, but in runtime the RLearner does not work
(whichever RLearner  you choose  the same comment; here is example with classif.cforest) with comment:
---------------------------------------------------------
"08:45:42: [Low] FlowRunner$1674312155|FlowRunner: Launching start point: ArffLoader
08:45:42: [Basic] ArffLoader$13232398|Loading C:\Program Files\Weka-3-8\data\breast-cancer.arff
08:45:42: [Basic] ArffLoader$13232398|Loaded breast-cancer
08:45:42: [Basic] ClassAssigner$1075208094|Assigned 'Class' as class.
08:45:42: [Basic] TrainTestSplitMaker$1933194758|Creating train/test split
08:45:42: [Basic] MLRClassifier$253842422|-learner classif.cforest -batch 100 -S 1|Building MLRClassifier -learner classif.cforest -batch 100 -S 1 on breast-cancer for fold/set 1 out of 1
08:45:42: [ERROR] MLRClassifier$253842422|-learner classif.cforest -batch 100 -S 1|weka.core.UnsupportedAttributeTypeException: weka.classifiers.mlr.impl.MLRClassifierImpl: Cannot handle multi-valued nominal attributes!
weka.core.WekaException: weka.core.UnsupportedAttributeTypeException: weka.classifiers.mlr.impl.MLRClassifierImpl: Cannot handle multi-valued nominal attributes!
        at weka.knowledgeflow.steps.Classifier.processIncoming(Classifier.java:385)
        at weka.knowledgeflow.StepManagerImpl.processIncoming(StepManagerImpl.java:1045)
        at weka.knowledgeflow.BaseExecutionEnvironment$5.run(BaseExecutionEnvironment.java:484)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: weka.core.WekaException: weka.core.UnsupportedAttributeTypeException: weka.classifiers.mlr.impl.MLRClassifierImpl: Cannot handle multi-valued nominal attributes!
        at weka.knowledgeflow.steps.Classifier.processPrimary(Classifier.java:470)
        at weka.knowledgeflow.steps.Classifier.processPrimary(Classifier.java:65)
        at weka.knowledgeflow.steps.PairedDataHelper.processPrimary(PairedDataHelper.java:217)
        at weka.knowledgeflow.steps.PairedDataHelper.process(PairedDataHelper.java:171)
        at weka.knowledgeflow.steps.Classifier.processIncoming(Classifier.java:379)
        ... 7 more
Caused by: java.lang.Exception: weka.core.UnsupportedAttributeTypeException: weka.classifiers.mlr.impl.MLRClassifierImpl: Cannot handle multi-valued nominal attributes!
        at weka.classifiers.mlr.MLRClassifier.buildClassifier(MLRClassifier.java:929)
        at weka.knowledgeflow.steps.Classifier.processPrimary(Classifier.java:443)
        ... 11 more
Caused by: weka.core.UnsupportedAttributeTypeException: weka.classifiers.mlr.impl.MLRClassifierImpl: Cannot handle multi-valued nominal attributes!
        at weka.core.Capabilities.test(Capabilities.java:1123)
        at weka.core.Capabilities.test(Capabilities.java:1044)
        at weka.core.Capabilities.test(Capabilities.java:1277)
        at weka.core.Capabilities.test(Capabilities.java:1208)
        at weka.core.Capabilities.testWithFail(Capabilities.java:1506)
        at weka.classifiers.mlr.impl.MLRClassifierImpl.buildClassifier(MLRClassifierImpl.java:900)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at weka.classifiers.mlr.MLRClassifier.buildClassifier(MLRClassifier.java:926)
        ... 12 more

08:45:42: [Low] ArffLoader$13232398|Interrupted
08:45:42: [Low] ClassAssigner$1075208094|Interrupted
08:45:42: [Low] TrainTestSplitMaker$1933194758|Interrupted
08:45:42: [Low] MLRClassifier$253842422|-learner classif.cforest -batch 100 -S 1|Interrupted
08:45:42: [Low] TextViewer$844055944|Interrupted"
---------------------------------------------------------
 Can somebody help me? How can I set proper parameters, java.library.path especially?

Thanks a lot.
Rado
Reply | Threaded
Open this post in threaded view
|

Re: Example for R PLugin

Eibe Frank-2
Administrator
Did you install rJava in R?

Cheers,
Eibe

> On 29/05/2017, at 7:14 PM, Rado <[hidden email]> wrote:
>
> Hi!
> I wanted to test some classifiers in R using RPlugin but I did not succeed.
> What am I doing wrong?
>
> Here are some informations on installation and execution in Weka:
>
>
> Windows 7 x64
> Weka 3.9.1  (I tried 3.8.1 too)
> RPlugin 1.3.20 (I tried 1.2.20 with Weka 3.8.1 too)
>
>
> R installation: C:\Program Files\R\R-3.4.0
> PATH ....;C:\Program Files\R\R-3.4.0\bin\x64
> R_HOME = C:\Program Files\R\R-3.4.0
> R_USER_LIBS = C:\Program Files\R\R-3.4.0\library
>
> R is working properly, but not RPlugin in Weka:
>
> 1. Information on RConsole:
>
> "R does not seem to be available. Check that you have the R_HOME environment
> variable set,
> R is in your path and that java.library.path property points to the JRI
> native library.
> Information on settup for different OS can be found at
> http://www.rforge.net/JRI"
>
> 2. In Explore and Experiment with loaded RPlugin  is not possible to
> classify, clicking on "Choose" in Classifier panel hangs Weka.
>
> 3. In KnowledgeFlow is possible to design flow with MLR Classifier, but in
> runtime the RLearner does not work
> (whichever RLearner  you choose  the same comment; here is example with
> classif.cforest) with comment:
> ---------------------------------------------------------
> "08:45:42: [Low] FlowRunner$1674312155|FlowRunner: Launching start point:
> ArffLoader
> 08:45:42: [Basic] ArffLoader$13232398|Loading C:\Program
> Files\Weka-3-8\data\breast-cancer.arff
> 08:45:42: [Basic] ArffLoader$13232398|Loaded breast-cancer
> 08:45:42: [Basic] ClassAssigner$1075208094|Assigned 'Class' as class.
> 08:45:42: [Basic] TrainTestSplitMaker$1933194758|Creating train/test split
> 08:45:42: [Basic] MLRClassifier$253842422|-learner classif.cforest -batch
> 100 -S 1|Building MLRClassifier -learner classif.cforest -batch 100 -S 1 on
> breast-cancer for fold/set 1 out of 1
> 08:45:42: [ERROR] MLRClassifier$253842422|-learner classif.cforest -batch
> 100 -S 1|weka.core.UnsupportedAttributeTypeException:
> weka.classifiers.mlr.impl.MLRClassifierImpl: Cannot handle multi-valued
> nominal attributes!
> weka.core.WekaException: weka.core.UnsupportedAttributeTypeException:
> weka.classifiers.mlr.impl.MLRClassifierImpl: Cannot handle multi-valued
> nominal attributes!
>    at weka.knowledgeflow.steps.Classifier.processIncoming(Classifier.java:385)
>    at
> weka.knowledgeflow.StepManagerImpl.processIncoming(StepManagerImpl.java:1045)
>    at
> weka.knowledgeflow.BaseExecutionEnvironment$5.run(BaseExecutionEnvironment.java:484)
>    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
>    at java.util.concurrent.FutureTask.run(Unknown Source)
>    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>    at java.lang.Thread.run(Unknown Source)
> Caused by: weka.core.WekaException:
> weka.core.UnsupportedAttributeTypeException:
> weka.classifiers.mlr.impl.MLRClassifierImpl: Cannot handle multi-valued
> nominal attributes!
>    at weka.knowledgeflow.steps.Classifier.processPrimary(Classifier.java:470)
>    at weka.knowledgeflow.steps.Classifier.processPrimary(Classifier.java:65)
>    at
> weka.knowledgeflow.steps.PairedDataHelper.processPrimary(PairedDataHelper.java:217)
>    at
> weka.knowledgeflow.steps.PairedDataHelper.process(PairedDataHelper.java:171)
>    at weka.knowledgeflow.steps.Classifier.processIncoming(Classifier.java:379)
>    ... 7 more
> Caused by: java.lang.Exception: weka.core.UnsupportedAttributeTypeException:
> weka.classifiers.mlr.impl.MLRClassifierImpl: Cannot handle multi-valued
> nominal attributes!
>    at
> weka.classifiers.mlr.MLRClassifier.buildClassifier(MLRClassifier.java:929)
>    at weka.knowledgeflow.steps.Classifier.processPrimary(Classifier.java:443)
>    ... 11 more
> Caused by: weka.core.UnsupportedAttributeTypeException:
> weka.classifiers.mlr.impl.MLRClassifierImpl: Cannot handle multi-valued
> nominal attributes!
>    at weka.core.Capabilities.test(Capabilities.java:1123)
>    at weka.core.Capabilities.test(Capabilities.java:1044)
>    at weka.core.Capabilities.test(Capabilities.java:1277)
>    at weka.core.Capabilities.test(Capabilities.java:1208)
>    at weka.core.Capabilities.testWithFail(Capabilities.java:1506)
>    at
> weka.classifiers.mlr.impl.MLRClassifierImpl.buildClassifier(MLRClassifierImpl.java:900)
>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>    at java.lang.reflect.Method.invoke(Unknown Source)
>    at
> weka.classifiers.mlr.MLRClassifier.buildClassifier(MLRClassifier.java:926)
>    ... 12 more
>
> 08:45:42: [Low] ArffLoader$13232398|Interrupted
> 08:45:42: [Low] ClassAssigner$1075208094|Interrupted
> 08:45:42: [Low] TrainTestSplitMaker$1933194758|Interrupted
> 08:45:42: [Low] MLRClassifier$253842422|-learner classif.cforest -batch 100
> -S 1|Interrupted
> 08:45:42: [Low] TextViewer$844055944|Interrupted"
> ---------------------------------------------------------
> Can somebody help me? How can I set proper parameters, java.library.path
> especially?
>
> Thanks a lot.
> Rado
>
>
>
> --
> View this message in context: http://weka.8497.n7.nabble.com/Example-for-R-PLugin-tp30563p40786.html
> Sent from the WEKA mailing list archive at Nabble.com.
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: Example for R PLugin

Rado Lipovec
This post was updated on .
Hi!
Yes , I have already  installed it. R , after I tried to install it once again, has written:
---------------------------------------
install.packages("rJava")
--- Please select a CRAN mirror for use in this session ---
trying URL 'https://cran.wu.ac.at/bin/windows/contrib/3.4/rJava_0.9-8.zip'
Content type 'application/zip' length 716884 bytes (700 KB)
downloaded 700 KB

package ‘rJava’ successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package ‘rJava’

The downloaded binary packages are in
        C:\Users\Rado\AppData\Local\Temp\RtmpiIMfBh\downloaded_packages
-------------------------------------------------------
Many thanks for any other suggestion in advance.
Rado


Reply | Threaded
Open this post in threaded view
|

Re: Example for R PLugin

Michael Hall
You might see what doing this from R shows

library(rJava)
.jinit()
.jcall("java/lang/System", "S", "getProperty", "java.runtime.version”)

This should tell you if you have rJava working and it is connecting to a valid java version.

The exception in the log you showed earlier indicated a MLR, or Weka/MLR interface, version limitation for multi-class nominal classification. Not an installation problem.

Michael Hall



_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: Example for R PLugin

Eibe Frank-2
Administrator
In reply to this post by Rado Lipovec
The problem might be that you are using

R_USER_LIBS

when it should actually be

R_LIBS_USER

Also, make sure this folder actually contains the rJava package once you have installed it.

One more thing: make sure your JVM is a 64-bit JVM.

To see what things should look like, take a look at this video:

https://www.youtube.com/watch?v=EGwHXC3baWU

Cheers,
Eibe

> On 29 May 2017, at 21:10, Rado Lipovec <[hidden email]> wrote:
>
> Hi!
> Yes , I have already  installed it. RConsole after I tried to install it
> once again, has written:
> ---------------------------------------
> install.packages("rJava")
> --- Please select a CRAN mirror for use in this session ---
> trying URL 'https://cran.wu.ac.at/bin/windows/contrib/3.4/rJava_0.9-8.zip'
> Content type 'application/zip' length 716884 bytes (700 KB)
> downloaded 700 KB
>
> package ‘rJava’ successfully unpacked and MD5 sums checked
> Warning: cannot remove prior installation of package ‘rJava’
>
> The downloaded binary packages are in
>        C:\Users\Rado\AppData\Local\Temp\RtmpiIMfBh\downloaded_packages
> -------------------------------------------------------
> Many thanks for any other suggestion in advance.
> Rado
>
>
>
>
>
>
> --
> View this message in context: http://weka.8497.n7.nabble.com/Example-for-R-PLugin-tp30563p40788.html
> Sent from the WEKA mailing list archive at Nabble.com.
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: Example for R PLugin

Rado Lipovec
Hello again!
Yes, I made a big mistake in typing R_LIBS_USER and this was the cause of  error. So I reinstalled all from  scratch:
1. I uninstalled RPlugin from Weka
2. I deleted the wrong user variable R_USER_LIBS and replaced it with R_LIBS_USER=C:\Users\Rado\R_library
3. Uninstalled and reinstalled R
4. In R: install.packages("rJava") in R_LIBS_USER  directory  
5. Installed RPlugin in Weka.

Everything (till now) is working.

Your video has explained all in so easy way, many many thanks...

So: cheers, Frank!

Rado



Eibe Frank-2 wrote
The problem might be that you are using

R_USER_LIBS

when it should actually be

R_LIBS_USER

Also, make sure this folder actually contains the rJava package once you have installed it.

One more thing: make sure your JVM is a 64-bit JVM.

To see what things should look like, take a look at this video:

https://www.youtube.com/watch?v=EGwHXC3baWU

Cheers,
Eibe

> On 29 May 2017, at 21:10, Rado Lipovec <[hidden email]> wrote:
>
> Hi!
> Yes , I have already  installed it. RConsole after I tried to install it
> once again, has written:
> ---------------------------------------
> install.packages("rJava")
> --- Please select a CRAN mirror for use in this session ---
> trying URL 'https://cran.wu.ac.at/bin/windows/contrib/3.4/rJava_0.9-8.zip'
> Content type 'application/zip' length 716884 bytes (700 KB)
> downloaded 700 KB
>
> package ‘rJava’ successfully unpacked and MD5 sums checked
> Warning: cannot remove prior installation of package ‘rJava’
>
> The downloaded binary packages are in
>        C:\Users\Rado\AppData\Local\Temp\RtmpiIMfBh\downloaded_packages
> -------------------------------------------------------
> Many thanks for any other suggestion in advance.
> Rado
>
>
>
>
>
>
> --
> View this message in context: http://weka.8497.n7.nabble.com/Example-for-R-PLugin-tp30563p40788.html
> Sent from the WEKA mailing list archive at Nabble.com.
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

MLR clasifiers in Weka 3.9 and rPlugin 1.3.22

Rado Lipovec
In reply to this post by Eibe Frank-2
Hi!
I am right now going through Advanced data Mining with Weka  course (MOOC)
and I encountered some problems while using MLR classifiers.

My installation: Windows 7.1, Weka 3.9, R 3.2.5, rPlugin1.3.22 and MLR 2.11  

RConsole is working properly.
 
It seems that Weka does not install packages  of R learners automatically.
Example:
1.I tried to run regs.earth R learner through MLR wrapper using cpu dataset
as requested by exercise 2 in Activity 3.4 of the mentioned Advanced course.
The start button of classification panel remained greyed even after waiting
a lot of time.
2. I tried to install earth package thru R 3.2.5. Normal installation failed
because the installation procedure could not find the appropriate package
for this version of R.
3. I tried to install earth package thru R 3.2.5 using "packages" set of
tools using downloaded earth_3.4.1.zip.  Package was installed without
problem and I was able to use the regs.earth learner in Weka.
4. I tried to do same thing with regs.mob but I was unable to find the
package on the internet.

What should I do to if I want  Weka to install the R learners packages
automatically when they are selected in MLR wrapper window?

Thanks very much.
Rado Lipovec




--
Sent from: http://weka.8497.n7.nabble.com/
_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: MLR clasifiers in Weka 3.9 and rPlugin 1.3.22

Eibe Frank-2
Administrator

On Windows and on macOS, the automatic installation process for MLR classifiers will only work if appropriate versions of the classifier packages are available in binary format. If they are not available in binary format you will have to install them manually in R so that the source code version of the package can be compiled (you may have to install appropriate tools to be able to do that).

 

According to

 

https://mlr-org.github.io/mlr-tutorial/release/html/integrated_learners/

 

regr.mob is part of the R package party, which seems to come in binary versions for the latest release for both Windows and macOS:

 

https://cran.r-project.org/web/packages/party/index.html

 

Based on what you say, it sounds like your version of R may simply not be compatible with the latest versions of these package. If that’s the case, the easiest thing to make things work smoothly is to upgrade your R installation. You don’t need to use R 3.2.5 for the MOOC. The latest version of R should work fine. We’ve been using 3.4.0 in our lab, but later versions of 3.4 will presumably also work.

 

Another reason for failure is that you are behind a proxy server. In that case, you will need to tell R to download packages through the proxy. There is some information on this here:

 

https://stackoverflow.com/questions/6467277/proxy-setting-for-r

 

Cheers,

Eibe

 

From: [hidden email]
Sent: Saturday, 2 September 2017 5:22 AM
To: [hidden email]
Subject: [Wekalist] MLR clasifiers in Weka 3.9 and rPlugin 1.3.22

 

Hi!

I am right now going through Advanced data Mining with Weka  course (MOOC)

and I encountered some problems while using MLR classifiers.

f

My installation: Windows 7.1, Weka 3.9, R 3.2.5, rPlugin1.3.22 and MLR 2.11 

 

RConsole is working properly.

It seems that Weka does not install packages  of R learners automatically.

Example:

1.I tried to run regs.earth R learner through MLR wrapper using cpu dataset

as requested by exercise 2 in Activity 3.4 of the mentioned Advanced course.

The start button of classification panel remained greyed even after waiting

a lot of time.

2. I tried to install earth package thru R 3.2.5. Normal installation failed

because the installation procedure could not find the appropriate package

for this version of R.

3. I tried to install earth package thru R 3.2.5 using "packages" set of

tools using downloaded earth_3.4.1.zip.  Package was installed without

problem and I was able to use the regs.earth learner in Weka.

4. I tried to do same thing with regs.mob but I was unable to find the

package on the internet.

 

What should I do to if I want  Weka to install the R learners packages

automatically when they are selected in MLR wrapper window?

 

Thanks very much.

Rado Lipovec

 

 

 

 

--

Sent from: http://weka.8497.n7.nabble.com/

_______________________________________________

Wekalist mailing list

Send posts to: [hidden email]

List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist

List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

 


_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: MLR clasifiers in Weka 3.9 and rPlugin 1.3.22

Rado Lipovec
Thank you very much!

After several trials I installed from scratch R 3.4.1 , Weka 3.8.1, RPlugin
1.2.22 under fresh new created user and all R packages needed and now all is
working just fine .

I 'll try to install all things with weka 3.9.1 but for now I am happy with
this solution. I'll send you  results when I'll have time to try (may be it
will take some time  ).

It seems that the origin of the problem was in Windows 7 security settings,
that why I created new fresh user in Windows 7.

Thank you very much for quick response.

Rado Lipovec



--
Sent from: http://weka.8497.n7.nabble.com/
_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html