This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # It is convention that X holds the Feature array and y holds the label array | |
| X = iris.data | |
| y = iris.target |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # The Dimensions are retured using the shape attribute | |
| print(iris.data.shape) | |
| print(iris.target.shape) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Every coloums is a feature | |
| # Every Row is an observation | |
| print(iris.feature_names) | |
| # Prints the Target Species | |
| print(iris.target) | |
| # PRitn the names of the species | |
| print(iris.target_names) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Import the Iris Dataset | |
| from sklearn.datasets import load_iris | |
| # Really load Iris | |
| iris = load_iris() |
NewerOlder