Run Mahout in action example lastfm - hadoop

I have one problem when run the Last.fm clustering example in Mahout in action book.
The issue is when I run the command :
--bin/mahout kmeans -i /user/local/Mia/lastfm_vector/ -o /user/local/Mia/lastfm_topics -c /user/local/Mia/lastfm_centroids -k 2000 -ow -dm org.apache.mahout.common.distance.CosineDistanceMeasure -cd 0.01 -x 20 -cl
I checked out the source code from git:
https://github.com/tdunning/MiA.git
The issue is: Exception is thread "main" java.io.FileNotFoundException: File does not exit:/user/local/Mia/lastfm_vector
Everyone who help me to provide me file input Lastfm_vector to run this example. I need it for my education.
Thanks & Regard!

Related

How to run OMNeT++ project from Ubuntu terminal

I am using OMNeT++ 5.5.1 installed in Ubuntu 19.04 and it is working fine in IDE environment.
But, I need to run an INET project from Ubuntu terminal. Can anyone suggest me what command to write in terminal if:
I want to run, for example, INET showcase examples ( wireless/sensornetwork/omnetpp.ini)?
how to see the list of configurations in omnetpp.ini?
and how to choose one specific config and run it?
Thank you
To run a simulation from command line do the following:
Go to directory of the example you want to start, e.g.:
cd showcases/wireless/sensornetwork
To see available config names in omnetpp.ini type:
opp_run -a
To run selected config (e.g. LMac) with GUI type the following command:
opp_run -m -u Qtenv -n ../../../src:../..:../../../tutorials:../../../showcases -l ../../../src/INET omnetpp.ini -c LMac
To see all runs for selected config type:
opp_run -s -c LMac omnetpp.ini -q runs
To start one selected run (e.g. 5) from config (e.g. LMac) without GUI type the following command:
opp_run -m -u Cmdenv -n ../../../src:../..:../../../tutorials:../../../showcases -l ../../../src/INET omnetpp.ini -c LMac -r 5
To start all runs in selected config (e.g. LMac) type the following command:
opp_run -m -u Cmdenv -n ../../../src:../..:../../../tutorials:../../../showcases -l ../../../src/INET omnetpp.ini -c LMac
The main options for opp_run:
-u Qtenv selects graphical view of a simulation (for command environment use -u Cmdenv)
-n indicates directories of NED files
-l selects library (here: libINET.so)
For more information about running simulations look to OMNeT++ Manual.

Run time error in Castalia

Hey friends i had installed Omnet++ 4.2.2 and Castalia 3.2.I had tried to run the example simulations,but it saying an run time error.i had attached it as a image.Please help me.Please tell me the solutions.Help indeed please.
You probably didn't build the Castalia. In order to build it under Windows do the following:
Open in any text editor the file makemake from main Castalia-3.2 directory, and change the line: OPTS=" -f -r --deep -o CastaliaBin -u Cmdenv -P $ROOT -M release" into:
OPTS=" -f -r --deep -P $ROOT -M release"
Open console mingwenv.cmd.
Change directory to the Castalia directory. Example: assuming that Castalia-3.2 is in d:\Castalia-3.2 you should type: cd /d/Castalia-3.2
Then type in mingwcmd console:
./makemake
make
In order to check it try to start a simulation by typing in console:
cd Simulations/BANtest/
../../Castalia-3.2.exe
The simulation should start in graphical mode.

Mahout K-Means: No input clusters found error

I am running Mahout 0.9 version on the most recent version of Hadoop. In K-Means algorithm, I transform the input data into vectors as required.
I executed the following command, to run K-Means:
mahout kmeans -i /user/ubuntu/Test/Vec/tfidf-vectors/ -c /user/ubuntu/Test/init-cluster -o /user/ubuntu/Test/Result -x 10 -k 2 -ow -cl
/user/ubuntu/Test/init-cluster is an empty folder, because I have already provided the -k parameter.
Interestingly, according to the log information below, Mahout deletes the cluster folder (/user/ubuntu/Test/init-cluster):
15/11/27 17:13:31 INFO common.HadoopUtil: Deleting /user/ubuntu/Test/init-cluster
In the end, Mahout gives:
Exception in thread "main" java.lang.IllegalStateException:
No input clusters found in /user/ubuntu/Test/init-cluster/part-randomSeed.
Check your -c argument
Any idea how to fix it?

Mahout random forest example, command line parameter for data not recognized

The command:
hadoop jar /opt/cloudera/parcels/CDH-5.0.0-1.cdh5.0.0.p0.47/lib/mahout/mahout-examples-0.8-cdh5.0.0-job.jar org.apache.mahout.classifier.df.mapreduce.BuildForest –d advert-train.csv –ds advert-info –t 100 -o advert-model
Generates the error:
org.apache.commons.cli2.OptionException: Unexpected –d while processing Options
That doesn't seem possible. I looked at the source code and -d is a required option.
hadoop version
returns
Hadoop 2.3.0-cdh5.0.0
The files advert-train.csv and advert-info both exist in my default HDFS directory /users/cloudera
A detailed instruction to run the random forest in mahout can be found here:
https://mahout.apache.org/users/classification/partial-implementation.html
I was able to run this example in Cloudera CDH 5.0 with no problem. I think the problem maybe due to the configuration or the fact that you need to specify the other parameters also. I just used the mahout command in Cloudera for running the example. In your case the command would be:
mahout org.apache.mahout.classifier.df.mapreduce.BuildForest
-Dmapred.max.split.size=1874231 –d advert-train.csv –ds advert-info
-sl 5 -p –t 100 -o advert-model
in which,
-Dmapred.max.split.size should specify Hadoop the max. size of each partition which should be around 1/10 of size of your dataset
-sl is used to specify the number of variables randomly selected
-p tells mahout to use partial implementation
The rest of variables should be fine.

Birt - Report Engine Command Line (genReport.sh) not outputting anything

\Hi all,
I just installed version 3.7 and here's what I'm trying to run. It runs for about 30 seconds and doesn't show any errors. The problem is I can't find test.pdf anywhere.
export BIRT_HOME=/opt/local/birt-runtime-3_7_2
cd $BIRT_HOME/ReportEngine/
./genReport.sh runrender -f PDF -o /tmp/test.pdf /opt/local/apache-tomcat-7.0.26/webapps/Birt/user_reports/scientific_services.rptdesign
I also tried running this as the root user with the same result.
Add the "-m" (or --mode) flag before "runrender":
./genReport.sh -m runrender -f PDF -o /tmp/test.pdf /opt/local/apache-tomcat-7.0.26/webapps/Birt/user_reports/scientific_services.rptdesign

Resources