Alban Hessler | 1 Feb 2006 08:36
Picon

Re: Missing Value Filter

Hello,

I found why it was not working correctly. I was uploading the attributes 
with an arff file empty from any data, and then where adding instances 
read from a database. But when Weka load the instance from the database, 
it was counting '?' as nominal value. And then I was adding those 
instances to my empty Instances read from the ARFF. So far, no error, 
except when I tried to filter out those missing values. If I am doing 
that, it is because I am not sure if Weka will read out the possible 
attribute values from the database. I see that weka, when reading from a 
database, builds up the attributes possible values as long as it sees 
unknown values. But then counting the '?' as a possible value isn't a 
missbehaviour?
My workaround was too create an arff buffer from the database using my 
ARFF file for the attributes description, and then creates the instances 
from there.

Thank you, Peter, for the help,

Cheers,

Alban

Peter Reutemann a écrit :
>> Then when trying to build my classifier, it detects missing values, 
>> and runs the ReplaceMissingValues filter.  
>
> Why not run the filter by default? E.g., SMO does that (as long as the 
> checks are turned on).
>
(Continue reading)

Yu Le | 1 Feb 2006 14:50
Picon
Favicon

SQL SERVER 2000 DATA LOADED BUT ERR MESSAGES ABOUT TINYINT VARCHAR

Thanks in advance for helping.
if possible, please kindly post proper databaseutils.props for sql server 2000.
 
CONTENTS BELOW:
 
  #1) Probelm Statement & JAVA line:it does not recognize tinyint & varchar (true for both 3.4 and 3.5.2)
  #2) explorer INFO window content shows successful reading
  #3) tried solutions
  #4) databaseutils.props file content
----------------------------------------------------------------------------------------------------
#1) it does not recognize tinyint & varchar (true for both 3.4 and 3.5.2); 
        operating system is windows 2000 professional
        java version;
                C:\WEKA-3-5-2>java -version
                java version "1.5.0_06"
                Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
                Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
 
         java  -jar weka.jar -mine2097152 -mx900m -verbosegc
 
        err message;
                couldn't read from database;
                unknown data type; tinyint. add entry in weka/experiment/databaseutils.props.
----------------------------------------------------------------------------------------------------
#2) for version 3.5.2, inside Explorer INFO window:
        connecting to: jdbc:odbc:S=true
        Query: select top 100 * from tmp
        100 rows selected (100 displayed).
----------------------------------------------------------------------------------------------------
#3)
    I tried TInyint=2, tinyint=3
    i also tried different upper and lower cases for leading characters in 'tinyint' with no success
----------------------------------------------------------------------------------------------------
#4)
Here is the content of my c:\program files\weka-3-4\databaseutils.props;
jdbcDriver=sun.jdbc.odbc.JdbcOdbcDriver
jdbcURL=jdbc:odbc:S
 
TINYINT=4
CHAR=0
TEXT=0
VARCHAR=0
VARCHAR2=0
NUMBER=2
LONGVARCHAR=0
BINARY=0
VARBINARY=0
LONGVARBINARY=0
BIT=1
NUMERIC=2
DECIMAL=2
FLOAT=2
DOUBLE=2
SMALLINT=4
#SHORT=4
SHORT=5
INTEGER=5
BIGINT=6
LONG=6
REAL=7
DATE=8
TIME=8
TIMESTAMP=8
 
#mappings for table creation
CREATE_STRING=TEXT
CREATE_INT=INT
CREATE_DOUBLE=DOUBLE
 
#database flags
checkUpperCaseNames=false
setAutoCommit=true
createIndex=false
 
#flags for loading and saving instances using DatabaseLoader/Saver
nominalToStringLimit=50
idColumn=auto_generated_id
_______________________________________________
Wekalist mailing list
Wekalist <at> list.scms.waikato.ac.nz
https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
Alban Hessler | 1 Feb 2006 17:55
Picon

Inference in Bayesian Networks with weka

Hello everyone!

I was wondering of the capacities in Weka to do inferences in a Bayesian 
Network. For example the JavaBayes library has a very nice way to 
observe variables (the evidences) and then infer the probability of any 
other nodes in the graph. Is there something similar done in weka? Looks 
like the inference implemented is just used to infer the classifier, no 
way to observe a particular set of variables.

By the way the link for the Inference is broken : 
http://www.cs.waikato.ac.nz/~remco/weka_bn/node4.html

Thank you in advance for the help,

Cheers,

Alban

Attachment (smime.p7s): application/x-pkcs7-signature, 3514 bytes
_______________________________________________
Wekalist mailing list
Wekalist <at> list.scms.waikato.ac.nz
https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
Peter Reutemann | 1 Feb 2006 20:39
Picon
Picon
Favicon

Re: Missing Value Filter

> I found why it was not working correctly. I was uploading the attributes 
> with an arff file empty from any data, and then where adding instances 
> read from a database. 

Aha... Well, for databases it's different, there NULL is the missing 
value, not '?'.

> But when Weka load the instance from the database, 
> it was counting '?' as nominal value. 

Which is correct for databases.

> And then I was adding those 
> instances to my empty Instances read from the ARFF. So far, no error, 
> except when I tried to filter out those missing values. If I am doing 
> that, it is because I am not sure if Weka will read out the possible 
> attribute values from the database. I see that weka, when reading from a 
> database, builds up the attributes possible values as long as it sees 
> unknown values. But then counting the '?' as a possible value isn't a 
> missbehaviour?

Nope, '?' is only the missing value for text files.

> My workaround was too create an arff buffer from the database using my 
> ARFF file for the attributes description, and then creates the instances 
> from there.

Just replace the '?' in your table with NULLs and you're set. No 
workaround necessary then.

Cheers, Peter
--

-- 
Peter Reutemann, Dept. of Computer Science, University of Waikato, NZ
http://www.cs.waikato.ac.nz/~fracpete/     +64 (7) 838-4466 Ext. 5174
Peter Reutemann | 1 Feb 2006 21:57
Picon
Picon
Favicon

Re: SQL SERVER 2000 DATA LOADED BUT ERR MESSAGES ABOUT TINYINT VARCHAR

>   #1) Probelm Statement & JAVA line:it does not recognize tinyint & 
> varchar (true for both 3.4 and 3.5.2)

After adding "tinyint=3" to my DatabaseUtils.props file, I could load 
data from a table containing "tinyint" columns.
Instead of placing the DatabaseUtils.props in the Weka directory, try 
putting it in your home directory (that's where mine's located).

HTH

Cheers, Peter
--

-- 
Peter Reutemann, Dept. of Computer Science, University of Waikato, NZ
http://www.cs.waikato.ac.nz/~fracpete/     +64 (7) 838-4466 Ext. 5174
Remco Bouckaert | 2 Feb 2006 00:14
Picon

Re: Inference in Bayesian Networks with weka


On Thu, 02 Feb 2006 05:55, Alban Hessler wrote:
> Hello everyone!
>
> I was wondering of the capacities in Weka to do inferences in a Bayesian
> Network. For example the JavaBayes library has a very nice way to
> observe variables (the evidences) and then infer the probability of any
> other nodes in the graph. Is there something similar done in weka? Looks
> like the inference implemented is just used to infer the classifier, no
> way to observe a particular set of variables.
>
> By the way the link for the Inference is broken :
> http://www.cs.waikato.ac.nz/~remco/weka_bn/node4.html
>

Weka is more concerned with learning classifiers than with inference, so you 
cannot do general inference in Weka right now. 

If you want to, you can learn a network from data, save it as XML (see 
http://www.cs.waikato.ac.nz/~remco/weka_bn/node30.html
) and import it in JavaBayes where you can do inference.

Cheers,

Remco
Lisa Ron | 2 Feb 2006 03:35
Picon

How can I use weka classes in .NET

Hello Everyone,
 
Can I get any ideas about how to use weka's java classes in a VB.net/VC.net project.
 
Thanks a lot
 
Lisa
_______________________________________________
Wekalist mailing list
Wekalist <at> list.scms.waikato.ac.nz
https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
Peter Reutemann | 2 Feb 2006 04:09
Picon
Picon
Favicon

Re: How can I use weka classes in .NET

> Can I get any ideas about how to use weka's java classes in a 
> VB.net/VC.net project.

Googling for "using java from .net" gave as first result this:
   http://www.ikvm.net/devguide/net2java.html

Never used it, but maybe worth a try...

Cheers, Peter
--

-- 
Peter Reutemann, Dept. of Computer Science, University of Waikato, NZ
http://www.cs.waikato.ac.nz/~fracpete/     +64 (7) 838-4466 Ext. 5174
chinni latha | 2 Feb 2006 07:08
Picon
Favicon

problem working weka on solaris

Hi all,
I am getting the following problem when i am trying 

java -jar weka.jar

Exception in thread "main"
java.lang.NoSuchMethodError: java.lang.Runtime: metho
d maxMemory()J not found
        at weka.core.Memory.<init>(Unknown Source)
        at <Unloaded Method>

Can any body help me with this problem.
thanks
sreelath

		
__________________________________________________________ 
Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com
Peter Reutemann | 2 Feb 2006 08:26
Picon
Picon
Favicon

Re: problem working weka on solaris

> I am getting the following problem when i am trying 
> 
> java -jar weka.jar
> 
> 
> Exception in thread "main"
> java.lang.NoSuchMethodError: java.lang.Runtime: metho
> d maxMemory()J not found
>         at weka.core.Memory.<init>(Unknown Source)
>         at <Unloaded Method>

What exact version of Java are you using (output via "java -version")?

Cheers, Peter
--

-- 
Peter Reutemann, Dept. of Computer Science, University of Waikato, NZ
http://www.cs.waikato.ac.nz/~fracpete/     +64 (7) 838-4466 Ext. 5174

Gmane