rms

TCLK error when I run 'validate' from the rms package

跟風遠走 提交于 2019-12-23 04:09:15
问题 I'm running Rstudio 0.98.501 with R 3.02 on OSX Mavericks 10.9.1. I have XQuarts installed. I have loaded these packages: library(foreign) library(Hmisc) library("ggplot2") library(gdata) library(MASS) library(rms) Then I do this I do this: model1 <- lrm(Y~xvars, data=devset, x=T, y=T) val.model1 <-validate(model1, B=50) I get this error: Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj") [tcl] invalid command name "toplevel". Does anyone have any tips? 回答1: Hej! I had the

大数据线性回归预测学生成绩

♀尐吖头ヾ 提交于 2019-12-22 04:34:20
通过训练集训练和测试集测试来生成多个线性模型,从而预测学生成绩,本文所有代码请点击 Github 1. 实验数据背景 1.1 数据来源 本项目的数据来源于kaggle.com,数据集的名称为Student Grade Prediction,Paulo Cortez,Minho大学,葡萄牙吉马良斯, http://www3.dsi.uminho.pt/pcortez 1.2 数据简介 该数据接近了两所葡萄牙学校的中学学生的学习成绩。数据属性包括学生成绩,人口统计学,社会和与学校相关的特征),并通过使用学校报告和调查表进行收集。提供了两个关于两个不同学科表现的数据集:数学(mat)和葡萄牙语(por) 该数据集共有396条,每列33个属性,属性简介如下: 1.学校-学生学校(二进制:“ GP”-加布里埃尔·佩雷拉(Gabriel Pereira)或“ MS”-Mousinho da Silveira) 2.性别-学生的性别(二进制:“ F”-女性或“ M”-男性) 3.年龄-学生的年龄(数字:15至22) 4.地址-学生的家庭住址类型(二进制:“ U”-城市或“ R”-农村) 5.famsize-家庭大小(二进制:“ LE3”-小于或等于3或“ GT3”-大于3) 6.Pstatus-父母的同居状态(二进制:“ T”-同居或“ A”-分开) 7.Medu-母亲的教育(数字:0-无,1

机器学习实战:基于Scikit-Learn和TensorFlow---第二章笔记

只愿长相守 提交于 2019-12-22 01:25:14
机器学习实战:基于Scikit-Learn和TensorFlow—第二章笔记 一、学习目标 以加州住房价格的数据集作为数据源,来进行构建一个完整的机器学习的项目。 二、完整的处理流程 2.1、目标问题 拿到数据集,搭建机器学习的项目,我们肯定是希望从这个数据中分析出什么结果。所以我们的目标就是:根据数据集,对一个区域的房价中位数进行预测。你肯定知道这是一个典型的监督式学习任务(因为已经给出了标记的训练示例),而且也是一个典型的回归任务(因 为你要对某个值进行预测)。更具体地说,这是一个多变量回归问题,因为系统要使用多个特征进行预测(使用到区域的人口、收入中位数等)。 2.2、性能指标 你辛苦构建完模型后,肯定要选择一个指标来测试下你的模型到底表现如何吧。回归问题的典型性能衡量指标是均方根误差(RMSE)。 公式1-1:均方根误差(RMSE) ( ∑ i = 1 m ( h ( x i ) − y i ) 2 ) m \sqrt{\frac{(\sum_{i=1}^m(h(x^i) - y^i)^2)}{m}} m ( ∑ i = 1 m ​ ( h ( x i ) − y i ) 2 ) ​ ​ 解释下其中的符号: m是你在测量RMSE时,所使用的数据集中实例的数量(例如,如果你在评估RMSE时使用的验证集里包含2000个区域,则m=2000) x i x^i x i 是数据集中

Database in J2ME

扶醉桌前 提交于 2019-12-18 05:13:16
问题 I am new in J2ME. In my Application, I want to add the Multiple Records in the Record Store and also want to access it. How can I add the multiple Records in the Record Store and how can I access it? 回答1: Here is my library code for RMS, just study it, it is very easy to implement, all the methods like insert,updated, delete is there. import javax.microedition.rms.RecordEnumeration; import javax.microedition.rms.RecordStore; import javax.microedition.rms.RecordStoreFullException; import javax

Why does ggplot (.predict) not plot in R /rms package?

你。 提交于 2019-12-13 15:48:18
问题 Please find My Data of w and w1 at the bottom of this page. I have a Predictor ( w$test and w1$test ) which is the quantity of positive lymph nodes per total lymph node yield, i.e. ranging between 0 and 1. I have produced two models - each representing two different disease stages. I wish to plot them together but I all I get is this: The plot is produced with this code: library(ggplot2) library(rms) library(ggsci) d <- datadist(w) j <- options(datadist="d") d1 <- datadist(w1) j1 <- options

回归评价指标MSE、RMSE、MAE、R-Squared

可紊 提交于 2019-12-13 01:12:08
前言 分类问题的评价指标是准确率,那么回归算法的评价指标就是MSE,RMSE,MAE、R-Squared。下面一一介绍 均方误差(MSE) MSE (Mean Squared Error)叫做均方误差。看公式 这里的y是测试集上的。 用 真实值-预测值 然后平方之后求和平均。 猛着看一下这个公式是不是觉得眼熟,这不就是线性回归的损失函数嘛!!! 对,在线性回归的时候我们的目的就是让这个损失函数最小。那么模型做出来了,我们把损失函数丢到测试集上去看看损失值不就好了嘛。简单直观暴力! 均方根误差(RMSE) RMSE(Root Mean Squard Error)均方根误差。 这不就是MSE开个根号么。有意义么?其实实质是一样的。只不过用于数据更好的描述。 例如:要做房价预测,每平方是万元(真贵),我们预测结果也是万元。那么差值的平方单位应该是 千万级别的。那我们不太好描述自己做的模型效果。怎么说呢?我们的模型误差是 多少千万?。。。。。。于是干脆就开个根号就好了。我们误差的结果就跟我们数据是一个级别的可,在描述模型的时候就说,我们模型的误差是多少万元。 MAE MAE(平均绝对误差) 不用解释了吧。 R Squared 上面的几种衡量标准针对不同的模型会有不同的值。比如说预测房价 那么误差单位就是万元。数子可能是3,4,5之类的。那么预测身高就可能是0.1,0.6之类的

Local database in j2me midp 1.0

杀马特。学长 韩版系。学妹 提交于 2019-12-13 00:36:12
问题 I am developing one application in J2me MIDP 1.0 It requires local database management. I have heard about recordStore but can we use it for permanent storage? 回答1: Yes, your application can store data using a RecordStore, and you can get it back later even if the application or the phone has been shut down. EDIT: One example I found: http://www.roseindia.net/j2me/read-write-midlet.shtml 回答2: RecordStore, or more generally, MIDP RMS API is intended just for use for permanent storage : ...The

Data in J2ME RecordStore does not persist across sessions

只愿长相守 提交于 2019-12-12 07:22:40
问题 I'm building a mobile app with J2ME, and I've found that the data I write into a RecordStore can be accessed while the program is still running but it is lost after quitting and restarting it. No exception is thrown, the data is simply lost. UPDATE: Thanks everyone for your suggestions. I'm using NetBeans on Windows 7. I'm not sure if it is using the WTK version I have previously installed or another one it has installed somewhere else. I've checked my WTK folder for the files Pavel wrote

Restore recordstore after exit application

别等时光非礼了梦想. 提交于 2019-12-11 16:19:56
问题 I have written a LWUIT application that involves two RecordStores recordStore and recordStore2 . Two methods method getRecordData for retriving all records of recordStore, method getRecordData2 for retriving all records of recordStore2 . two Radiobuttons rb and rb2 are added ButtonGroup called group A TextField called tf addition button for adding a record for either recordstore or recordstore2 after rb or rb2 is selected a text which must written into tf TextField as a record Two lists

How do you clear the RecordStore of your midlet in Netbeans?

眉间皱痕 提交于 2019-12-11 02:49:20
问题 I find that when I try to add some new records, the already exist in the recordstore of the midlet, but I don't know where do I find the option to clear the midlet's recordstore in its emulator. Any help appreciated, Ted 回答1: Follow the below steps for clear the RMS in your netbeans project, Select the Tools and go to Java Platforms. Select Sun Java(TM) Wireless Toolkit 2.5.2 for CLDC under J2ME. Select the Tools & Extensions tab and click the Open Utilities . One Utilities Popup will appear