add poisson demo
This commit is contained in:
parent
9c0ba67088
commit
60d307c445
@ -7,3 +7,4 @@ cross_validation Cross validation
|
|||||||
create_sparse_matrix Create Sparse Matrix
|
create_sparse_matrix Create Sparse Matrix
|
||||||
predict_leaf_indices Predicting the corresponding leaves
|
predict_leaf_indices Predicting the corresponding leaves
|
||||||
early_Stopping Early Stop in training
|
early_Stopping Early Stop in training
|
||||||
|
poisson_regression Poisson Regression on count data
|
||||||
|
|||||||
7
R-package/demo/poisson_regression.R
Normal file
7
R-package/demo/poisson_regression.R
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
data(mtcars)
|
||||||
|
head(mtcars)
|
||||||
|
bst = xgboost(data=as.matrix(mtcars[,-11]),label=mtcars[,11],
|
||||||
|
objective='count:poisson',nrounds=5)
|
||||||
|
pred = predict(bst,as.matrix(mtcars[,-11]))
|
||||||
|
sqrt(mean((pred-mtcars[,11])^2))
|
||||||
|
|
||||||
@ -7,3 +7,5 @@ demo(generalized_linear_model)
|
|||||||
demo(cross_validation)
|
demo(cross_validation)
|
||||||
demo(create_sparse_matrix)
|
demo(create_sparse_matrix)
|
||||||
demo(predict_leaf_indices)
|
demo(predict_leaf_indices)
|
||||||
|
demo(early_Stopping)
|
||||||
|
demo(poisson_regression)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user