Hopefully, I would like to change the python code below to 'R code'.
==============================================
import numpy as np
xd = np.float32(np.random.rand(2,100))
yd= np.dot([ 0.1, 0.2], xd) + 0.3
w = tf.Variable(tf.random_uniform([1,2],-1.0,1.0))
b = tf.Variable(2.5)
y = tf.matmul(w,xd) + b
loss = tf.reduce_mean(tf.square(y-yd))
train = tf.train.GradientDescentOptimizer(0.5).minimize(loss)
sess = tf.Session()
sess.run(tf.global_variables_initializer())
for k in range(0,201):
sess.run(train)
if k % 20 == 0 :
print (k, sess.run(w), sess.run(b))
==============================================
DNN for iris data
import seaborn as sns
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
iris = sns.load_dataset("iris")
iris.info()
SP = iris['species'].unique()
SP
iris.head()
sns.pairplot(iris, hue="species", palette="husl")
sns.set()
sns.palplot(sns.color_palette())
==============================================
plt.style.available
plt.style.use('ggplot')
sns.set(style="ticks", color_codes=True)
==============================================