-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[R package question] Is that possible to retrieve the score for each sample from lgb.cv? #808
Comments
It seams its searching for a class label. I've used the folowing the code: "params <- list(objective = "regression", metric = "l2") |
What is in your dtrain? What does your y look like? |
Its a continous variable I created dtrain like this:
and a summary from train.target:
|
Is train.dataset a data.frame? Does it have any missing value? |
No Missings and ist a data.frame but I used as.matrix to creata suitable
dataset for lgbm. This thing is that training with "lgb.train" works fine,
but cv.lgb does not.
Have you used cv.lgb for regression before ? did it worked ?
…On 11 August 2017 at 17:41, ajing ***@***.***> wrote:
Is train.dataset a data.frame? Does it have any missing value?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#808 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGQfk-muqMQHtUT_PfHriV1qYFUEHbrSks5sXIRHgaJpZM4Oxf5V>
.
|
Yes, it worked. |
Hum.. ok so the problem is on my data set. Thanks.
…On 11 Aug 2017 7:59 pm, "ajing" ***@***.***> wrote:
Yes, it worked.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#808 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGQfk1GIKv6d2_bfZTWLzhSdfYpoXRE7ks5sXKSlgaJpZM4Oxf5V>
.
|
I just tried thos code, its still show warnings :(
"
data<-read.table("./data/lowbwt.dat", header=TRUE, skip=0)
data_train <- data[, c(2:11)]
target <- data_train$BWT
data_train$BWT <- NULL
library(lightgbm)
dtrain <- lgb.Dataset(as.matrix(data_train), label = target)
params <- list(objective = "regression", metric = "l2")
model <- lgb.cv(params,
dtrain,
10,
nfold = 5,
min_data = 1,
learning_rate = 1,
early_stopping_rounds = 10)
"
The data set its the simple birds dataset, lowbwt.dat.
…On 11 August 2017 at 20:04, Filipe Santos ***@***.***> wrote:
Hum.. ok so the problem is on my data set. Thanks.
On 11 Aug 2017 7:59 pm, "ajing" ***@***.***> wrote:
> Yes, it worked.
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#808 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AGQfk1GIKv6d2_bfZTWLzhSdfYpoXRE7ks5sXKSlgaJpZM4Oxf5V>
> .
>
|
Have you tried this example:
This is a classification problem, but you can use regression to fit the model. |
Yes, I tried that one, it works fine. But the label (or target variable)
its a 0/1 value. I was just checking the possibility of an issue for true
continuous variables.
…On 12 August 2017 at 02:20, ajing ***@***.***> wrote:
Have you try this example:
library(lightgbm)
data(agaricus.train, package='lightgbm')
train <- agaricus.train
dtrain <- lgb.Dataset(train$data, label=train$label)
params <- list(objective="regression", metric="l2")
model <- lgb.cv(params, dtrain, 10, nfold=5, min_data=1, learning_rate=1, early_stopping_rounds=10)
This is a classification problem, but you can use regression to fit the
model.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#808 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGQfk8z6Ltw9b63x9chLXV4Dbrnwlgbhks5sXP3lgaJpZM4Oxf5V>
.
|
duplicated, refer to #283 |
I just wondering whether this is possible. This function can help to analyze the errors during training and do better feature engineering.
The text was updated successfully, but these errors were encountered: