Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Yiwzh/fix cv #62

Merged
merged 3 commits into from
Nov 28, 2018
Merged

Yiwzh/fix cv #62

merged 3 commits into from
Nov 28, 2018

Conversation

zyw400
Copy link
Member

@zyw400 zyw400 commented Nov 27, 2018

In CV, is the training data is a pandas data frame, in the aux_info, there is no information about input data.

In the PR, we update the column existance check to distinguish between cases that input is FileDataStream or pandas dataframe. If the input is pandas data frame, we check if the group id column exists in the dataframe. If the input is FileDataStream, we check if the group id column exists in the FileDataStream's schema.

fixes #58

add case for X is data frame
add a space
@zyw400 zyw400 requested review from ganik and shmoradims November 27, 2018 06:57
Copy link

@shmoradims shmoradims left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

str(groups) +
' cannot be found in the origin data, please specify '
'groups in .fit() function.')
elif isinstance(X, DataFrame):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

elif isinstance(X, DataFrame): [](start = 12, length = 30)

please also add a test that covers this new path.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Let me add that~

Copy link
Member

@ganik ganik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@ganik ganik merged commit c6704fd into microsoft:master Nov 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CV.fit() throws a KeyError exception for a ranking task (LightGBM)
3 participants