Cforest计算成本,超出RAM限制

时间:2017-05-04 07:45:49

标签: limit ram party

我试图运行import { Component } from '@angular/core'; import { Platform, AlertController, NavController } from 'ionic-angular'; import { LoginService } from '../../providers/login-service'; import { Http, Response } from '@angular/http'; //import { NativeStorage } from 'ionic-native';9903601 import { DashboardPage } from '../dashboard/dashboard'; import { MapPage} from '../map/map' import 'rxjs/add/operator/map'; @Component({ selector: 'page-login', templateUrl: 'login.html', providers: [LoginService] }) export class LoginPage { public UID: any; masks: any; public phoneNumber: any = ""; public Token; public data; constructor(public platform: Platform, public navCtrl: NavController, public loginservice: LoginService, public http: Http, public alertCtrl: AlertController) { this.masks = { phoneNumber: ['+', '9', '1', '-', /[1-9]/, /\d/, /\d/, '-', /\d/, /\d/, /\d/, '-', /\d/, /\d/, /\d/, /\d/] }; } ionViewDidLoad() { this.GetUID(); } GetUID() { this.loginservice.UIDload() .then(data => { this.UID = data; }); } GetActivation() { this.http.get('http://mydomain/sendverification/' + this.UID + '/' + this.phoneNumber + '/' + 'android1') .map(res => res.text()) .subscribe(data => { this.data = data; this.data = this.data.replace(/\n/g, ""); this.data = this.data.replace(/\t/g, ""); let alert = this.alertCtrl.create({ title: "4 digit activation code sent to you", inputs: [{ name: 'activationcode', placeholder: 'activation code' }], buttons: [{ text: 'next', role: 'next', handler: data => { this.http.get('http://mydomain/chekverification/' + this.UID + '/' + data.activationcode) .map(res => res.text()) .subscribe(Token => { console.log(Token); this.navCtrl.push(MapPage, { UDI: this.UID, Token: Token }); this.navCtrl.setRoot(MapPage ,{ UDI: this.UID, Token: Token }); this.navCtrl.popToRoot(); }); } }, { text: 'retry', role: 'retry', handler: data => { this.GetActivation(); } } ] }); alert.present(); }); } } cforest包),其数据集为~70k观测值和~105个变量,其中一个是响应变量(二进制)。

cforest的具体信息是party

问题在于构建mtry = 10, ntree = 50, maxsurrogate = 3(2小时50分钟)需要很长时间,而cforest例如500棵树和ranger只需要6分钟。我知道每个过程背后的方法是完全不同的,但这个计算成本是否正常?我对调整参数做错了吗?

在构建了cforest之后,我尝试使用函数mtry=10在一个观察量为~30k的数据集中对其进行评估,并收到以下错误消息

predict()

我在使用Windows 7的台式计算机上工作,其技术特征是:

  • 处理器:Intel核心i5-5300U CPU @ 2.30GHz 2.30GHz
  • 已安装内存(RAM):8,00 GB(可用7,88 GB)
  • 系统类型:64位操作系统

非常感谢你的时间。

1 个答案:

答案 0 :(得分:1)

使用派对你可以单独构建树,然后将它们组合起来,但这很乏味。来自R-forge的partykit devel版本提供了ctree / cforest的重新实现,旨在提高内存效率。

的Torsten