Weka libsvm is not in classpath after system format - weka

While using weka SVM ,the error is receiving "libsvm is not in classpath'.
I set the classpath through environmental variables, But the error still remains.I was using the weka svm for one year for data classification, but I haven't gone through this kind of problem. This problem surfaced when I have installed weka 3.6.12 after formatting my system. I am using window 7 32-bit PC. The error "jdbc.idbDriver is not in path" is also exists.

Open SimpleCLI in your weka GUI and execute following commands.
java weka.core.SystemInfo
Please look for following values
java.class.path: ./weka.jar;
...
weka.version: 3.6.13
As you can see, I do not have libsvm.jar in my classpath too.
I have to include using one of the ways explained in http://weka.wikispaces.com/LibSVM.
Below passage is taken from (http://weka.wikispaces.com/LibSVM Troubleshooting)
Troubleshooting
libsvm classes not in CLASSPATH!◦Check whether the libsvm.jar is really in your CLASSPATH. Execute the following command in the SimpleCLI:
java weka.core.SystemInfo
The property java.class.path must list the libsvm.jar. If it is listed, check whether the path is correct.
If you're on Windows and you find %CLASSPATH% there, see next bullet point to fix this.
On Windows, if you added the libsvm.jar to your CLASSPATH environment variable, it can still happen that Weka pops up the error message that the libsvm classes are not in your CLASSPATH. This can happen on Windows 2000 and XP and the %CLASSPATH% does not get expanded to its actual value in starting up Weka. You can inspect your current CLASSPATH with which Weka got started up with the SimpleCLI (see previous bullet point). If %CLASSPATH% is listed there, your system has the same problem. This Wekalist post explains how to explicitly add the mysql.jar to RunWeka.ini (works the same for libsvm.jar).
Note: backslashes have to be escaped, not only once, but twice (they get interpreted by Java twice!). In other words, instead of one you have to use four: C:\some\where then turns into C:\\some\\where.

Write a startscript that sets up everything for you.
The file could be called weka.bat und should look like this (untested- adapt as necessary):
WEKA_HOME=c:\weka
set WEKA_JAR=%WEKA_HOME%\weka.jar
set PATH=$WEKA_HOME;$PATH
set CP="%WEKA_JAR%;%WEKA_HOME%\lib\libsvm.jar"
set DIR=c:\weka\data
cd "%DIR%"
set WEKA_HOME=%DIR%
rem start small GUI Chooser
java -cp $CP weka.gui.GUIChooser 2 >>c:\weka\weka.log
This assumes that you installed weka to a dir called c:\weka,
that the subdirectories \data and \lib exist, and that you have copied libsvm.jar into the \lib subdirectory.

Related

Weka software decision tree

After installing Weka 3.8, load a .csv file in the Explorer, I wanted to build a decision tree with the parameter "use training set".
Everything was installed ok (a self-extracting executable for 64-bit Windows that includes Oracle's 64-bit Java VM 1.8)
The file loaded fine as it was saved previously, using excel, as coma delimited.
The problem lays in building the decision tree itself: I go to the tab Classify, select the test option "use training set" and start.
After starting, appears a particular result which, accordingly to some images I've seen before, should allow, from there, to right-click and select "Visualize Tree".
That doesn't happen, as you can see in the next image:
How do I fix this in order to build the decision tree?
You have run a ZeroR classifier, see http://chem-eng.utoronto.ca/~datamining/dmc/zeror.htm. The ZeroR classifier is not a decission tree classifier and can not be visualised as such. You need to train an actual decission tree classifier, J48 is one of them. See http://facweb.cs.depaul.edu/mobasher/classes/ect584/WEKA/classify.html for a guide on how to do so.

Doxygen, nothing shows up in Graphical Class Hierarchy

I'm trying to use DOxygen to generate documentation for a rather large code base.
I got Doxygen 1.8.10 for Windows with Doxywizard.
I installed Graphviz 2.38
I was able to generate the Textual Class Hierarchy without a problem using Recursive option in the Expert tab.
I selected the "Use dot tool from GraphViz package" option in the Wizard.
I also checked "HAVE_DOT" and "CLASS_DIAGRAMS" options in the Expert tab for Dot.
When I generate the documentation and click on Show HTML Output, I cannot see anything under the Graphical Class Hierarchy. I can still see all the classes and their dependencies in the Textual Class Hierarchy.
in Mozilla Firefox, the Graphical Class Hierarchy page shows up as empty
in Internet Explorer, the Graphical Class Hierarchy page shows a lot of broken image icons aligned in 1 column
What am I doing wrong here?
Thank you,
When you select HAVE_DOT in the Expert Tab, doxygen will assume you have DOT available from the PATH. You need to make sure of this.
However, you also have the DOT_PATH option. Here you can put the path where DOT can be found.
I was able to solve this issue by executing a simple line on CMD which iteratively generates the missing .png files from .dot files.
for %f in (*dot) do dot %~nxf -Tpng -o %~nf.png
Make sure to execute this in /html folder where all .dot files reside and have dot.exe in your PATH environment variable. Also, If you receive any syntax errors, such as:
syntax error in line 1 near 'ëPNG'
try changing the default program of .dot format to Notepad (mine was set to Word).

Wix multi-disc layout requirement - Caching and locating media

First time asking a question here, and might not be my last. This is in regards to WiX 3.8
My company is starting to go into the installer business, and one of the requirements I have been tasked to do is to create a multi-disc installation for our product. I have used WiX before for simple patches, but now we want to create a full installation. Some of the requirements include:
Creating external cab files for multiple discs [Which I enabled with setting the 'EmbedCab' property in the media tag to 'no' and setting the disc ID's to each file element with Compression to low]
The finished build will have the 5 discs in separate folders, with the respected external cab files in each [Media tag 'layout' set to destination]
Executing the .msi file inside the 'Disc1' folder [Which works...almost]
The problem I am running into is that when the .msi file is located on the hard disk, either outside the Disc layouts or inside the 'Disc1' subfolder, it cannot find the other .cab files. The requirement I have is that I need to find a way to be able to only prompt for a disc if and only if after searching inside the next subfolder 'Disc2' and finding the next .cab file to install. Therefore it can not only look in the root where the .msi is located, but also check the subfolders for the required cab files. (This almost mimic's InstallShield, but I REALLY don't want to go that route.)
The second issue I have is regards to the bootstrapper. The .exe file needs to embed the .msi file as per the requirement. However, even when disabling caching of the msi file, the bootstrapper seems to start caching all the other .cab files (we are talking about a 20GB installation). Even disabling repair and rollback, the bootstrapper continues to try to cache the cab files into the PackageCache area on my system.
I've looked online and read the WiX books to help find a solution, but I seem to finally hit a dead end. Can anyone give me any thoughts or insight to help with this issue?
Some things I have tried so far:
- Using a custom action (C++) to perform a 'ResolveSource' to try to change the 'SourceDir' property to continue installation
- Thought about making a custom bootstrapper to disable the package caching event entirely, but I have no idea where to start.
Any advice, direction or even a sample to help would be greatly appreciated.
Thanks!

Get file's Previous Versions, from WINAPI

In Windows 7 theres a possibility for getting file's previous versions like in the below image:
Is there any way to retrieve file's previous version by code? because I couldn't find any API.
Thanks advanced! =]
There are several tags listed with this question. So it is unclear if a strictly c/c++ approach is desired, or if scripting etc will work. In any case...
Here are some links that will hopefully point in the right direction:
On the MSDN site, there is documentation and example code referring
to shadow
copy
API.
Here is a Link to the
concept
of shadow copy service.
Here is a description of how you can command line, or program
script to recover
files from shadow copy.
Using the API link above with the structures found
here
will provide you with a way to get information about a particular
file, volume etc.
Finally, Here is a link talking about the Volrest utility from
Windows Server 2003 Resource Kit
tools, including
information on how you can "see a list of available previous
versions of [a] folder".
So after some searching, and thanks to #ryyker and #Ben directions I was able to find out the answer:
For example for file: C:\SomeFolder\SomeFile.exe
From cmd (run as administrator):
vssadmin list shadows for=C:\
For programmatic solution you can run it with:
CreateProcessW(NULL,L"cmd.exe /c \"vssadmin list shadows for=C:\\ > C:\\someTmpFile.txt\"",...);
Read and parse the created file.
Here above you get a list of shadow copies (kind of "Previous versions" containers).
Refer to the appropriate "Shadow Copy Volume" row (the version you want) and append the remaining file path after the volume name:
\\ Previous version path = \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy3\SomeFolder\SomeFile.exe"
wchar_t* prevPath = L"\\\\?\\GLOBALROOT\\Device\\HarddiskVolumeShadowCopy3\\SomeFolder\\SomeFile.exe";
Now you can read the file with the well known WIN32API functions CreateFile and ReadFile. (Create and Read file example from MSDN: EXAMPLE)
Make sure to use the UNICODE versions of that functions as the ASCII version may lack support of "\?\" paths.
Good luck! =]

Linked directory not found

I have following scenario:
The main software I wrote uses a database created by a simulator. This database is around 10 GB big at the moment, so I want to keep only one copy of that data per system.
Assuming I have following projects:
Main Software using the data, located at /SimData
DLL using the data for debugging, searching for data at /SimData
Debugging tool to parse the image database, searching for the data at /SimData
Since I do not want to have all those programs have their own copy of SimData (not only to decrease place used, but also to ensure that all Simulation data used is always up to date for all programs).
I created for the DLL and Debugging Utility a link named SimData to MainSoftware/SimData, but when opening a file with "SimData\MyFile.data" it cannot find it, only the MainSoftware with the ACTUAL SimData folder can find it.
How can I use the MainSoftware/SimData folder without setting absolute paths?
This is on Windows 7 x64
I agree with Peter about adding the DB location as a configurable parameter. A common place to store that is in the registry.
however, If you want to create links that will be recognized by your software, try hardlinks. . fsutil should do the trick as described here.
You need a way to configure the database location. You could use an INI or other configuration file, or a registry setting, or a command-line input, or an environment variable. Or You could write your program to search a directory hierarchy... for example, if the various modules are usually siblings of each other in your directory tree, you could search for SimData/MyFile.data, ../SimData/MyFile.data, ../../MainSoftware/SimData/Myfile.data, and use the first one found.
Which answer is the "right one" depends on your situation.