Tuesday, December 22, 2015

XGBoost in R. Error in xgb.iter.update SoftmaxMultiClassObj

XGBoost in R. For regression, classification and ranking

Xgboost is short for eXtreme Gradient Boosting package, XGBoost includes regression, classification and ranking.

Install XGBoost latest version from github

devtools::install_github('dmlc/xgboost',subdir='R-package')


Error

clf<-xgboost(
 data=data.matrix(train[,feature.names]),
        label     = train$Survived,
 booster   = "gblinear",
 nrounds   = 20,
 objective = "multi:softprob",
 num_class = 2,
        eval_metric = "merror"
            )  
Error in xgb.iter.update(bst$handle, dtrain, i - 1, obj) : SoftmaxMultiClassObj: label must be in [0, num_class), num_class=2 but found 2 in label
Solution

needed to convert the response variable from factor to numeric.

train$Survived<-as.numeric(levels(train$Survived))[train$Survived]

also install package "libx11-dev"
solai@vm1$ sudo apt-get install libx11-dev

then try again.

Next :

Sunday, December 20, 2015

Top 9 Rule : Code of conduct for Data Science professional

Top 9 Rule : Code of conduct for Data Science professional
previous post - Rattle : GUI for R

Top 9 Rule : Code of conduct for Data Science professional

Rule 1 - know the Terminology

Data Scientist - Client Relationship
Rule 2 - Competence
Rule 3 - Scope of Data Science Professional Services Between Client and Data Scientist
Rule 4 - Communication with Clients
Rule 5 - Confidential Information
Rule 6 - Conflicts of Interest
Rule 7 - Duties to Prospective Client
Rule 8 - Data Science Evidence, Quality of Data and Quality of Evidence

Maintaining the Integrity of the Data Science Profession
Rule 9 - Misconduct

For more details report

Thursday, December 10, 2015

How to Install rattle package : Graphical User Interface for Data Mining in R

How to Install rattle package : Graphical User Interface for Data Mining in R

step to install rattle package in R

Need to installl "libgtk2.0-dev" package in OS

bigdata@solai:~$ sudo apt-get install libgtk2.0-dev

then install "RGtk2" and "rattle" in R environment
install.packages("RGtk2")
install.packages("rattle")

load the library for the session by
library(rattle)