Click4Ai

486.

Medium

### Feature Importance

Feature importance is a measure of the contribution of each feature in a dataset to the model's predictions. It's a crucial aspect of feature engineering in machine learning.

**Example:** Suppose we have a dataset of house prices with features like number of bedrooms, square footage, and location. We want to determine which feature has the most impact on the house price.

**Constraints:** Use a random forest regressor to calculate feature importance.

Test Cases

Test Case 1
Input: [[1, 2, 3], [4, 5, 6]]
Expected: [0.2, 0.3, 0.5]
Test Case 2
Input: [[7, 8, 9], [10, 11, 12]]
Expected: [0.1, 0.2, 0.7]
+ 3 hidden test cases