Skip to content

Fixes : #6551 #6956

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

Closed
wants to merge 2 commits into from
Closed

Fixes : #6551 #6956

wants to merge 2 commits into from

Conversation

Moddy2024
Copy link
Contributor

Describe your change:

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Documentation change?

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms have a URL in its comments that points to Wikipedia or other similar explanation.
  • If this pull request resolves one or more open issues then the commit message contains Fixes: #{$ISSUE_NO}.

@algorithms-keeper algorithms-keeper bot added the require descriptive names This PR needs descriptive function and/or variable names label Oct 10, 2022
Copy link

@algorithms-keeper algorithms-keeper bot left a comment

Choose a reason for hiding this comment

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

Click here to look at the relevant links ⬇️

🔗 Relevant Links

Repository:

Python:

Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.

algorithms-keeper commands and options

algorithms-keeper actions can be triggered by commenting on this PR:

  • @algorithms-keeper review to trigger the checks for only added pull request files
  • @algorithms-keeper review-all to trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will post all the messages in one comment.

NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.


all_data.describe()

all_data['cabin_mul']=all_data.Cabin.apply(lambda x: 0 if pd.isna(x) else len(x.split(' ')))

Choose a reason for hiding this comment

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

Please provide descriptive name for the parameter: x

all_data.describe()

all_data['cabin_mul']=all_data.Cabin.apply(lambda x: 0 if pd.isna(x) else len(x.split(' ')))
all_data['cabin_adv'] = all_data.Cabin.apply(lambda x: str(x)[0])

Choose a reason for hiding this comment

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

Please provide descriptive name for the parameter: x


all_data['cabin_mul']=all_data.Cabin.apply(lambda x: 0 if pd.isna(x) else len(x.split(' ')))
all_data['cabin_adv'] = all_data.Cabin.apply(lambda x: str(x)[0])
all_data['name_title']= all_data.Name.apply(lambda x: x.split(',')[1].split('.')[0].strip())

Choose a reason for hiding this comment

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

Please provide descriptive name for the parameter: x

all_dummies_scaled[['Age','SibSp','Parch','norm_fare']]= scale.fit_transform(all_dummies_scaled[['Age','SibSp','Parch','norm_fare']])
all_dummies_scaled.head()

X_train_scaled = all_dummies_scaled[all_dummies_scaled.train_test == 1].drop(['train_test'], axis =1)

Choose a reason for hiding this comment

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

Variable and function names should follow the snake_case naming convention. Please update the following name accordingly: X_train_scaled

all_dummies_scaled.head()

X_train_scaled = all_dummies_scaled[all_dummies_scaled.train_test == 1].drop(['train_test'], axis =1)
X_test_scaled = all_dummies_scaled[all_dummies_scaled.train_test == 0].drop(['train_test'], axis =1)

Choose a reason for hiding this comment

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

Variable and function names should follow the snake_case naming convention. Please update the following name accordingly: X_test_scaled

train=pd.read_csv('/kaggle/input/house-prices-advanced-regression-techniques/train.csv')

trainAmes.columns = trainAmes.columns.str.replace(' ', '')
trainAmes=trainAmes.rename(columns={"YearRemod/Add": "YearRemodAdd"})

Choose a reason for hiding this comment

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

Variable and function names should follow the snake_case naming convention. Please update the following name accordingly: trainAmes

len(duplicate)

duplicate=duplicate[0:390]
trainAmes = trainAmes.drop(duplicate, axis = 0)

Choose a reason for hiding this comment

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

Variable and function names should follow the snake_case naming convention. Please update the following name accordingly: trainAmes

train_test_dummy = pd.get_dummies(train_test)

numeric_features = train_test_dummy.dtypes[train_test_dummy.dtypes != object].index
skewed_features = train_test_dummy[numeric_features].apply(lambda x: skew(x)).sort_values(ascending=False)

Choose a reason for hiding this comment

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

Please provide descriptive name for the parameter: x


# Train-Test separation

X_train = train_test_dummy[0:4000]

Choose a reason for hiding this comment

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

Variable and function names should follow the snake_case naming convention. Please update the following name accordingly: X_train

# Train-Test separation

X_train = train_test_dummy[0:4000]
X_test = train_test_dummy[4000:]

Choose a reason for hiding this comment

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

Variable and function names should follow the snake_case naming convention. Please update the following name accordingly: X_test

@algorithms-keeper algorithms-keeper bot added the awaiting reviews This PR is ready to be reviewed label Oct 10, 2022
Copy link

@algorithms-keeper algorithms-keeper bot left a comment

Choose a reason for hiding this comment

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

Click here to look at the relevant links ⬇️

🔗 Relevant Links

Repository:

Python:

Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.

algorithms-keeper commands and options

algorithms-keeper actions can be triggered by commenting on this PR:

  • @algorithms-keeper review to trigger the checks for only added pull request files
  • @algorithms-keeper review-all to trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will post all the messages in one comment.

NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.

all_data.describe()

all_data["cabin_mul"] = all_data.Cabin.apply(
lambda x: 0 if pd.isna(x) else len(x.split(" "))

Choose a reason for hiding this comment

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

Please provide descriptive name for the parameter: x

all_data["cabin_mul"] = all_data.Cabin.apply(
lambda x: 0 if pd.isna(x) else len(x.split(" "))
)
all_data["cabin_adv"] = all_data.Cabin.apply(lambda x: str(x)[0])

Choose a reason for hiding this comment

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

Please provide descriptive name for the parameter: x

)
all_data["cabin_adv"] = all_data.Cabin.apply(lambda x: str(x)[0])
all_data["name_title"] = all_data.Name.apply(
lambda x: x.split(",")[1].split(".")[0].strip()

Choose a reason for hiding this comment

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

Please provide descriptive name for the parameter: x

)
all_dummies_scaled.head()

X_train_scaled = all_dummies_scaled[all_dummies_scaled.train_test == 1].drop(

Choose a reason for hiding this comment

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

Variable and function names should follow the snake_case naming convention. Please update the following name accordingly: X_train_scaled

X_train_scaled = all_dummies_scaled[all_dummies_scaled.train_test == 1].drop(
["train_test"], axis=1
)
X_test_scaled = all_dummies_scaled[all_dummies_scaled.train_test == 0].drop(

Choose a reason for hiding this comment

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

Variable and function names should follow the snake_case naming convention. Please update the following name accordingly: X_test_scaled

)

trainAmes.columns = trainAmes.columns.str.replace(" ", "")
trainAmes = trainAmes.rename(columns={"YearRemod/Add": "YearRemodAdd"})

Choose a reason for hiding this comment

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

Variable and function names should follow the snake_case naming convention. Please update the following name accordingly: trainAmes

len(duplicate)

duplicate = duplicate[0:390]
trainAmes = trainAmes.drop(duplicate, axis=0)

Choose a reason for hiding this comment

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

Variable and function names should follow the snake_case naming convention. Please update the following name accordingly: trainAmes

numeric_features = train_test_dummy.dtypes[train_test_dummy.dtypes != object].index
skewed_features = (
train_test_dummy[numeric_features]
.apply(lambda x: skew(x))

Choose a reason for hiding this comment

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

Please provide descriptive name for the parameter: x


# Train-Test separation

X_train = train_test_dummy[0:4000]

Choose a reason for hiding this comment

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

Variable and function names should follow the snake_case naming convention. Please update the following name accordingly: X_train

# Train-Test separation

X_train = train_test_dummy[0:4000]
X_test = train_test_dummy[4000:]

Choose a reason for hiding this comment

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

Variable and function names should follow the snake_case naming convention. Please update the following name accordingly: X_test

@Moddy2024 Moddy2024 mentioned this pull request Oct 10, 2022
1 task
@algorithms-keeper algorithms-keeper bot added the tests are failing Do not merge until tests pass label Oct 10, 2022
@Moddy2024
Copy link
Contributor Author

Please review my PR and add the hacktoberfest tag.

@cclauss
Copy link
Member

cclauss commented Oct 12, 2022

Please read our CONTRIBUTING.md document before submitting another pull request to this repo.

@cclauss cclauss closed this Oct 12, 2022
@Moddy2024 Moddy2024 deleted the XGBoost branch October 12, 2022 17:17
@Moddy2024
Copy link
Contributor Author

@cclauss I have made the changes as pointed out by the bot and made two different PR's for both the files #7072 and #7074. Please take a look at it.
Thank you

@cclauss
Copy link
Member

cclauss commented Oct 12, 2022

Please read the file CONTRIBUTING.md if the file has no functions (or classes with methods) then it will not be accepted. The same is true of doctests, type hints, well-named variables, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting reviews This PR is ready to be reviewed require descriptive names This PR needs descriptive function and/or variable names tests are failing Do not merge until tests pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants