Skip to content

xgboost #2

Description

@ebruturgal

Hi, I think you have a mistake in xgboost,

train_x = data.matrix(train[, -13])
train_y = train[,13]
#define predictor and response variables in testing set
test_x = data.matrix(test[, -13])
test_y = test[, 13]

when you write -13 method sometimes takes the y predictor in prediction. because your dependent variable is at the end of the data set so i think you have to change the code. my dependent is first variable as a column and my code is
train_x = data.matrix(train[, -1])
train_y = train[,1]

test_x = data.matrix(test[, -1])
test_y = test[, 1]

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions