Skip to content

Placeholder_text correction and adding hints#63

Open
YaroslavMayorov wants to merge 2 commits intomasterfrom
aleksandra/placeholder-text-hints
Open

Placeholder_text correction and adding hints#63
YaroslavMayorov wants to merge 2 commits intomasterfrom
aleksandra/placeholder-text-hints

Conversation

@YaroslavMayorov
Copy link
Contributor

No description provided.

@YaroslavMayorov
Copy link
Contributor Author

@stephen-hero Please read the comments in Pima Indians Diabets and Linear Classifier/Read data/task.py.

Copy link
Contributor

@stephen-hero stephen-hero left a comment

Choose a reason for hiding this comment

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

language checked

# with a unit standard deviation. This means that the mean
# and standard deviation of the standard scores are 0 and 1, respectively.
# This procedure is recommended for data that follows a normal distribution.
# Normalize features: for each column subtract its mean
Copy link
Contributor

Choose a reason for hiding this comment

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

Standardize features: subtract the mean

# and standard deviation of the standard scores are 0 and 1, respectively.
# This procedure is recommended for data that follows a normal distribution.
# Normalize features: for each column subtract its mean
# and divide by its standard deviation.
Copy link
Contributor

Choose a reason for hiding this comment

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

and divide by the standard deviation for each column.

# and divide by its standard deviation.
X = (X - X.mean(axis=0)) / X.std(axis=0)
# A column of -1s is prepended to the left of the X array.
# Add a column of -1s to the left of X.
Copy link
Contributor

Choose a reason for hiding this comment

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

Prepend a column of -1s to X.

# calculations later on.
X = np.concatenate((-np.ones(len(X)).reshape(-1, 1), X), axis=1)
# y is standardized: centered around 0 with a standard deviation of 1.
# Convert labels from {0,1} to {1,-1}.
Copy link
Contributor

Choose a reason for hiding this comment

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

Map labels from {0,1} to {1,-1}.

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.

2 participants