没有合适的资源?快使用搜索试试~ 我知道了~
C4.5算法实现,自己写的,大家一起讨论下!
5星 · 超过95%的资源 需积分: 10 23 下载量 194 浏览量
2010-12-15
08:47:38
上传
评论
收藏 1KB TXT 举报
温馨提示
试读
2页
用算法实现C4.5算法,很复杂的!我自己写的很不好,所以大家一起讨论下,谢谢了!
资源推荐
资源详情
资源评论
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()) {
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()) {
资源评论
- xiaohao912013-12-20很好的,学习c4。5算法时可以借鉴一下
yanzhong1985
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功