Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Challenge: Manual Feature Centering | Foundations of Feature Scaling
Feature Scaling and Normalization Deep Dive

bookChallenge: Manual Feature Centering

Завдання

Swipe to start coding

You are given a small dataset X as a NumPy array of shape (n_samples, n_features). Your goal is to manually center each feature (column) by subtracting its mean, without using scikit-learn. Use vectorized NumPy operations.

  1. Compute the per-feature means as a 1D array feature_means of shape (n_features,).
  2. Create X_centered = X - feature_means using broadcasting.
  3. Compute column means of X_centered to verify they are approximately zero.
  4. Do not use loops and do not modify X in place.

Рішення

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 1. Розділ 4
single

single

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

Suggested prompts:

Can you explain this in simpler terms?

What are the main benefits or drawbacks?

Can you give me a real-world example?

close

Awesome!

Completion rate improved to 5.26

bookChallenge: Manual Feature Centering

Свайпніть щоб показати меню

Завдання

Swipe to start coding

You are given a small dataset X as a NumPy array of shape (n_samples, n_features). Your goal is to manually center each feature (column) by subtracting its mean, without using scikit-learn. Use vectorized NumPy operations.

  1. Compute the per-feature means as a 1D array feature_means of shape (n_features,).
  2. Create X_centered = X - feature_means using broadcasting.
  3. Compute column means of X_centered to verify they are approximately zero.
  4. Do not use loops and do not modify X in place.

Рішення

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 1. Розділ 4
single

single

some-alt