Skip to content

Sourcery refactored master branch#1

Open
sourcery-ai[bot] wants to merge 1 commit intomasterfrom
sourcery/master
Open

Sourcery refactored master branch#1
sourcery-ai[bot] wants to merge 1 commit intomasterfrom
sourcery/master

Conversation

@sourcery-ai
Copy link

@sourcery-ai sourcery-ai bot commented Oct 15, 2022

Branch master refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Review changes via command line

To manually merge these changes, make sure you're on the master branch, then run:

git fetch origin sourcery/master
git merge --ff-only FETCH_HEAD
git reset HEAD^

Help us improve this pull request!

@sourcery-ai sourcery-ai bot requested a review from harendra263 October 15, 2022 05:31
Comment on lines -21 to +24
columns_to_keep = [5, 6] + list(range(11,26)) + list(range(32, 103)) + [145]
columns_to_keep = [5, 6] + list(range(11,26)) + list(range(32, 103)) + [145]
crime = crime.ix[:,columns_to_keep].dropna()

X_crime = crime.ix[:,range(0,88)]
X_crime = crime.ix[:, range(88)]
Copy link
Author

Choose a reason for hiding this comment

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

Function load_crime_dataset refactored with the following changes:

Comment on lines -70 to +74
h = []
for c in range(0, num_labels):
h.append(mpatches.Patch(color=color_array[c], label=class_labels[c]))
h = [
mpatches.Patch(color=color_array[c], label=class_labels[c])
for c in range(num_labels)
]

Copy link
Author

Choose a reason for hiding this comment

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

Function plot_labelled_scatter refactored with the following changes:

Comment on lines -83 to +86
cmap_light = ListedColormap(color_list_light[0:numClasses])
cmap_bold = ListedColormap(color_list_bold[0:numClasses])
cmap_light = ListedColormap(color_list_light[:numClasses])
cmap_bold = ListedColormap(color_list_bold[:numClasses])
Copy link
Author

Choose a reason for hiding this comment

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

Function plot_class_regions_for_classifier_subplot refactored with the following changes:

Comment on lines -129 to +132
cmap_light = ListedColormap(color_list_light[0:numClasses])
cmap_bold = ListedColormap(color_list_bold[0:numClasses])
cmap_light = ListedColormap(color_list_light[:numClasses])
cmap_bold = ListedColormap(color_list_bold[:numClasses])
Copy link
Author

Choose a reason for hiding this comment

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

Function plot_class_regions_for_classifier refactored with the following changes:

Comment on lines -184 to +189

mesh_step_size = .01 # step size in the mesh
plot_symbol_size = 50

Copy link
Author

Choose a reason for hiding this comment

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

Found the following improvement in Function plot_fruit_knn:

Comment on lines -229 to +234

mesh_step_size = .01 # step size in the mesh
plot_symbol_size = 50

Copy link
Author

Choose a reason for hiding this comment

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

Function plot_two_class_knn refactored with the following changes:

Comment on lines -24 to +27
dimensions = dimensions = ['Dimension {}'.format(i) for i in range(1,len(pca.components_)+1)]
dimensions = dimensions = [
f'Dimension {i}' for i in range(1, len(pca.components_) + 1)
]

Copy link
Author

Choose a reason for hiding this comment

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

Function pca_results refactored with the following changes:

Comment on lines -100 to +103

Copy link
Author

Choose a reason for hiding this comment

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

Found the following improvement in Function biplot:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants