当前位置:首页 » 行情解析 » weka决策树分析股票数据
扩展阅读
穿越当导演拍电影的小说 2024-05-03 22:03:53
网球教练的韩国电影 2024-05-03 21:44:26
万达集团旗下的股票代码 2024-05-03 21:36:21

weka决策树分析股票数据

发布时间: 2021-07-31 13:33:07

Ⅰ “基于WEKA的数据预处理分析”该怎么实现

数据预处理的任务就那么几个:
1
去除奇异值
2
降维(如分组)
3
构建新的变量
4
标准化

只不过换了种软件操作,weka只是工具,先有思想,就可以很好的实用weka,不要被工具奴役

Ⅱ 用人工神经网络进行股票预测,数据样本为开盘,收盘,最高,最低,成交量,成交额。用weka或matlab实现

把样本数据分为训练样本和测试样本,然后用训练样本训练网络,用测试样本进行模型验证

Ⅲ 用weka中决策树算法分类测试问题,急!!!

据我所知weka不能处理太大量的数据,你用了18000个而且属性值有270个可能是计算量太大了。

Ⅳ 请教用人工神经网络进行股票预测在weka

预测股票可不是有以往股票数据就能的,要考虑因果性,现实事件与股票波动有因果性,也就是时序性。在这情况下有LSTM单元组成循环神经网络可以做到,但训练集的强度跟体积可是很大的,这需要注意。

Ⅳ 通过weka建立决策树怎么提取分类规则

你的意思是从训练好的决策树模型中自动提取出分类规则吗?weka好像没有可以直接从树结构中提取规则的功能吧。

不过如果模型不是太复杂的话手工统计每个从根节点到叶子节点的遍历也很方便啊,每个遍历上的内部节点加上树枝就是if条件,叶子节点就是then的判断结果。如果模型比较复杂的话可以考虑做个简单的二次开发。

假设你用的是J48,用weka explorer把训练好的决策树另存下来(或者直接在代码里用输出流写入文件),再用输入流把决策树读入为一个sourcable对象,调用对象的tosource方法把决策树代码化,接下来就是文本处理的问题了,通过分析代码结构得到相应的分类规则。

大概是这样的读入过程:

FileInputStream j48 = new FileInputStream("j48.model");
ObjectInputStream j48object = new ObjectInputStream(j48);

Sourcable j48code = (Sourcable) j48object.readObject();
System.out.println(j48code.toSource("J48 Tree"));

用上面几行举个例子,希望对你有启发^^

Ⅵ 我是weka新手,我下载数据集后,用weka中的id3算法来进行分类,结果不能看到决策树,是怎么回事啊

weka的ID3算法是会输出一个决策树的,只不过那只是中间计算时输出的结果。同时还会输出很多其他的统计结果。
要看看它有没有报错。 数据集的属性是不是都是离散型的。如果有些是实数型,如17.1,17.2,1.735,17.2....这样就不符合要求,无法生成合理的决策树。
以下是一个简单的weka输出决策树:

age = youth
| student = no: no
| student = yes: yes
age = middle_aged: yes
age = senior
| credit_rating = fair: yes
| credit_rating = excellent
| | income = high: null
| | income = medium: no
| | income = low: no

Ⅶ weka 代码 算法 j48 决策树 c4.5

我想你应该是想通过这个页面的url来得到这个网页里面的某些数据把。用HttpClient 。
下面我这个方法是得到搜狗页面命中多少条记录的代码。

public static void main (String args[]){
String sRequestUrlString="http://www.sogou.com/web?query=ondblclick
%3D%22%22";
GetMethod getMethod = new GetMethod(sRequestUrlString);
HttpClient client = new HttpClient();
client.setConnectionTimeout(1000 * 60);
int status=0;
try {
status = client.executeMethod(getMethod);
} catch (HttpException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
String sResponse="";
if(status==HttpStatus.SC_OK) {
sResponse=(getMethod.getResponseBodyAsString());
} else {

System.out.println("检索失败");
}
getMethod.releaseConnection();
String regExData = "找到 ([,\\d]*) 个网页";
if(sResponse!=null && sResponse.trim().length()>0) {
Pattern pattern = Pattern.compile(regExData);
Matcher matcher = pattern.matcher(sResponse);
if(matcher.find()) {
if(matcher.groupCount()>=1) {
int iTmpInteger =
Integer.parseInt(matcher.group(1).replaceAll(",",""),10);

System.out.println("找到"+iTmpInteger+"个网页");
}
}
}
}

这段测试代码是来测试搜狗的,String sRequestUrlString="http://www.sogou.com/web?
query=ondblclick%3D%22%22";
这里是拼写好的检索的url,
sResponse=(getMethod.getResponseBodyAsString());这个是得到本页面的源文件,然后通过
String regExData = "找到 ([,\\d]*) 个网页";正则表达式来获取([,\\d]*) ,得到命中的条数。

Ⅷ weka进行数据挖掘分类

分类得出的决策树只显示了一部

Ⅸ 如何使用Java Weka开源项目,实现J48决策树、支持向量机算法,在10个UCI数据集上对这两个算法进行性能

publicstaticvoidRegular()throwsException{
Fileinputfile=newFile("F:\weka\eucalyptus_Train.arff");
ArffLoaderloader=newArffLoader();
loader.setFile(inputfile);

InstancesinsTrain=loader.getDataSet();
insTrain.setClassIndex(insTrain.numAttributes()-1);

inputfile=newFile("F:\weka\eucalyptus_Test.arff");
loader.setFile(inputfile);
InstancesinsTest=loader.getDataSet();
insTest.setClassIndex(insTest.numAttributes()-1);

doublesum=insTest.numInstances();
intright=0;
Classifierclas=newJ48();
//Classifierclas=newweka.classifiers.bayes.BayesNet();
clas.buildClassifier(insTrain);

for(inti=0;i<sum;i++){
if(clas.classifyInstance(insTest.instance(i))==insTest.instance(i).classValue()){
right++;
}
System.out.println(clas.classifyInstance(insTest.instance(i))+":"+insTest.instance(i).classValue());
}
System.out.println("分类准确率:"+right/sum);
}

svm的话,要用一个wlsvm的包。 代码是一样的,就是Classifier class= new J48()这里要用svm的实例