TensorFlow Machine Learning Cookbook Chapter 2 Personally Clogged

Recipe 13 Classification algorithm 6.

xentropy = tf.nn.sigmoid_cross_entropy_with_logits(
    logits=my_output_expanded, labels=y_target_expanded)

What is logits # Reference 1: barber:

Screenshot from 2017-08-23 01-34-45.png

Convinced!

Recipe 14

rand_x = [x_vals[rand_index]]
rand_y = [y_vals[rand_index]]
sess.run(train_step, feed_dict={x_data: rand_x, y_target: rand_y})

Enclose it in [] to make it two-dimensional according to the placeholder. Is it okay to pass a list to x_data? I wondered if it didn't have to be a tensor type, but it was ok to pass it to the placeholder, whether it was an array or a scalar # Reference 2: crossed_flags:

Screenshot from 2017-08-23 01-48-16.png

Recipe 15 9.

plt.plot(setosa_x, setosa_y, 'rx', ms=10, mew=2, label='setosa')

ms, what is mew: performing_arts: ms == marker size mew == marker edge width

Recipe 16 Evaluation of regression model 1.

train_indices = np.random.choice(len(x_vals), round(len(x_vals)*0.8), replce=False)
train_indices = np.array(list(set(range(len(x_vals))) = set(train_indices)))

Long: moyai: np.random.choice (integer a, integer b) randomly extracts b pieces from the contents of the array generated by np.arange (a) # Reference 3 Round to an integer Doubly prohibited with replace = False By making it a set type with set (), you can calculate sums, differences, products, etc. as a set. It seems that the argument of np.array is list or tuple, so convert from set type to list with list () And can't you do [set (hogehoge)] instead of list (set (hogehoge))? I thought, but something was different (in the latter case, the entire set (hogehoge) becomes the 0th element of the list) You have to write it explicitly when converting

set.png

Evaluation of classification model 5.

bins = np.linspace(-5, 5, 50)
plt.hist(x_vals[0:50], bins, ...)
plt.hist(x_vals[50:100], bins[0:50], ...)

Why did you write the range for bins on the second line? I thought, did this specify that the range of x_vals changed but the range of bins did not change (not necessary): hotsprings:

Difficult English (Up Lord is weak English)

reduce_mean reduce: reduce temp_loss temp (== temporary): Temporary indices: plural of index bin: Intervals / classes that are relatively prime. category.

<!-Decompose (ex. Reduce a compound to its elements) #Reference 4->

reference

  1. Mathematics for Machine Learning
  2. About the meaning of [TensorFlow feed_dict = {x_data: x_val}] ](https://ja.stackoverflow.com/questions/37259/tensorflow%E3%81%AEfeed-dict-x-data-x-val%E3%81%AE%E6%84%8F%E5%91%B3%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6)
  3. Summary of array operation and random number generation method using NumPy random
  4. weblio

Recommended Posts

TensorFlow Machine Learning Cookbook Chapter 2 Personally Clogged
TensorFlow Machine Learning Cookbook Chapter 3 Personally Clogged
TensorFlow Machine Learning Cookbook Chapter 6 (or rather, tic-tac-toe)
Machine learning (TensorFlow) + Lotto 6
<Course> Machine Learning Chapter 6: Algorithm 2 (k-means)
[Language processing 100 knocks 2020] Chapter 6: Machine learning
<Course> Machine Learning Chapter 7: Support Vector Machine
100 Language Processing Knock 2020 Chapter 6: Machine Learning
Machine learning
[Reading Notes] Hands-on Machine Learning with Scikit-Learn, Keras, and TensorFlow Chapter 1
<Course> Machine Learning Chapter 3: Logistic Regression Model
<Course> Machine Learning Chapter 1: Linear Regression Model
<Course> Machine learning Chapter 4: Principal component analysis
<Course> Machine Learning Chapter 2: Nonlinear Regression Model
A story about simple machine learning using TensorFlow
[Memo] Machine learning
Machine learning classification
Install the machine learning library TensorFlow on fedora23
Machine Learning sample
Python learning memo for machine learning by Chainer from Chapter 2
Installation of TensorFlow, a machine learning library from Google
Machine learning tutorial summary
About machine learning overfitting
Machine learning ⑤ AdaBoost Summary
Machine Learning: Supervised --AdaBoost
Machine learning logistic regression
Machine learning support vector machine
Studying Machine Learning ~ matplotlib ~
Machine learning linear regression
Machine learning course memo
Machine learning library dlib
Somehow learn machine learning
Machine learning library Shogun
Machine learning rabbit challenge
Introduction to machine learning
Machine Learning: k-Nearest Neighbors
What is machine learning?
Python Machine Learning Programming Chapter 2 Classification Problems-Machine Learning Algorithm Training Summary
For those who want to start machine learning with TensorFlow2
Python learning memo for machine learning by Chainer Chapter 7 Regression analysis