weka链接SQLserver

来源:互联网 发布:淘宝买家退款率8% 编辑:程序博客网 时间:2024/05/18 01:30

首先要保证你的电脑中安装了jdk,在jdk的安装目录下,找到如下路径

C:\Program Files (x86)\Java\jre6\lib\ext

在该路径下载复制如jdbc的驱动jar。

在weka安装目录中找到,weka.jar的文件

按一下目录找到DatabaseUtils.props

weka.jar\weka\experiment 

在DatabaseUtils.props中修改下面部分

# General information on database access can be found here:
# http://weka.wikispaces.com/Databases
#
# Version: $Revision: 5836 $


# The comma-separated list of jdbc drivers to use
#jdbcDriver=RmiJdbc.RJDriver,jdbc.idbDriver
#jdbcDriver=jdbc.idbDriver
jdbcDriver=com.microsoft.sqlserver.jdbc.SQLServerDriver(改为sqlserver的服务器)
#jdbcDriver=org.gjt.mm.mysql.Driver


# The url to the experiment database
#jdbcURL=jdbc:rmi://expserver/jdbc:idb=experiments.prp
jdbcURL=jdbc:sqlserver://localhost;databaseName=Movie;user=sa(改为自己的数据库名字和用户名就行)
#jdbcURL=jdbc:mysql://mysqlserver/username

原创粉丝点击