From: Jérôme Benoit Date: Fri, 9 Nov 2018 09:01:09 +0000 (+0100) Subject: Add example for exo1. X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=b3f0fc84fc7c860e9b9fab2afcf7578c95627443;p=TP_AA.git Add example for exo1. Signed-off-by: Jérôme Benoit --- diff --git a/TP1/exo1/iris2.py b/TP1/exo1/iris2.py new file mode 100755 index 0000000..dc46570 --- /dev/null +++ b/TP1/exo1/iris2.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python3 + +from sklearn.datasets import load_iris # les données iris sont chargées +irisData = load_iris() + +print(len(irisData.data)) +# help(len) +print(irisData.target_names[0]) +print(irisData.target_names[2]) +print(irisData.target_names[-1]) +print(irisData.target_names[len(irisData.target_names) - 1]) +print(irisData.data.shape) +print(irisData.data[0]) +print(irisData.data[0][1]) +print(irisData.data[:, 1])