0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

neural network consoleのデータを表示(jupyter)

0
Posted at
import os

import numpy as np
from pandas import Series,DataFrame
import pandas as pd

import matplotlib.pyplot as plt
%matplotlib inline

input_dir = 'XXX'
input_file = os.path.join(input_dir, "iris_flower_dataset_training_delo.csv")

data = pd.read_csv(input_file,delimiter=",")
data[:4]

x1 = data[data["y:label"] == 0]["x__3:Petal width"]
x2 = data[data["y:label"] == 2]["x__3:Petal width"]
plt.hist([x1, x2], stacked=False, label=["true", "false"])
    
plt.title("Petal width")
plt.ylabel("Petal width")
plt.legend(loc="upper right")
x1 = data[data["y:label"] == 0]["x__3:Petal width"]
y1 = data[data["y:label"] == 0]["x__0:Sepal length"]
x2 = data[data["y:label"] == 2]["x__3:Petal width"]
y2 = data[data["y:label"] == 2]["x__0:Sepal length"]

plt.title("Sepal length/Petal width")
plt.plot(x1, y1, "o", label="true")
plt.plot(x2, y2, "x", label="false")
plt.ylim([0, 10])
plt.xlabel("Petal width")
plt.ylabel("Sepal length")
plt.legend(loc="lower right")
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?