Normalization and Standardization
Feature scaling helps ensure that no feature dominates others during modeling. Normalization and Standardization are widely used feature scaling techniques. Normalization typically scales features in the range [0, 1] ensuring they have roughly the same scale. Standardization transforms the data to have zero mean and unit variance, maintaining more information about outliers and not bounding the range. matplotlib.pyplot has been imported as plt, MinMaxScaler and StandardScaler have been imported, and the split heart disease data features have been imported as X_train and X_test.
Diese Übung ist Teil des Kurses
End-to-End Machine Learning
Interaktive Übung
Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.
# Show the initial distribution of 'age'
age = ____
plt.figure(figsize=(10,5))
plt.hist(____, bins=30, alpha=0.5, label='Original')
plt.legend(prop={'size': 16})
plt.title('Histogram with Original Age');
plt.xlabel('Age'); plt.ylabel('Count');
plt.show()