In this set of exercises, we will go through the basics of Regression Analysis Using [Tensorflow](https://www.tensorflow.org/). By the end of this post, you will be able to perform regression analysis with linearly separable data. It is recommended to check out the (tutorial)[Click here] before starting the exercises. We will use the ‘mtcars’ built-in data-set. Before […]

## Tensorflow – Linear Regression: Solutions

Below are the solutions to these exercises on “Data Transformation.” #################### # # # Exercise 1 # # # #################### X = tf$placeholder(tf$float32, name = “X”) Y = tf$placeholder(tf$float32, name = “Y”) #################### # # # Exercise 2 # # # #################### W = tf$Variable(0.0, name = “weights”) b = tf$Variable(0.0, name = “bias”) init_op […]

## Linear Regression in Tensorflow

Linear Regression Theory Overview In statistics, linear regression is a linear approach for modeling the relationship between a scalar dependent variable, “y”, and one or more explanatory (independent) variables. The case of one independent variable is called simple linear regression. For more than one independent variable, the process is called “multiple linear regression.” The compacted […]

## Tensorflow – Basics Part 2: Exercises (2/2)

Tensorflow is an open source, software library for numerical computation using data flow graphs. Nodes in the graph are called ops (short for operations), while the graph edges represent the R multi-dimensional data arrays (tensors) communicated between them. An op takes zero or more Tensors, performs some computation, and produces zero or more Tensors. In […]

## Tensorflow – Basics Part 2: Solutions (2/2)

Below are the solutions to these exercises on Tensorflow Basics. #################### # # # Exercise 1 # # # #################### input_1 <- tf$placeholder(tf$float32, name=’input_1′) input_2 <- tf$placeholder(tf$float32, name=’input_2′) #################### # # # Exercise 2 # # # #################### with(tf$Session() %as% sess, { print(sess$run(c(input_1, input_2), feed_dict=dict(input_1 = 7.0, input_2 = 2.0))) }) ## [[1]] ## [1] […]

## Tensorflow – Basics Part 2 : Exercises (1/2)

Tensorflow is an open source, software library for numerical computation using data flow graphs. Nodes in the graph are called ops (short for operations), while the graph edges represent the R multi-dimensional data arrays (tensors) communicated between them. An op takes zero or more Tensors, performs some computation, and produces zero or more Tensors. In […]

## Tensorflow – Basics Part 2 : Solutions (1/2)

Below are the solutions to these exercises on Data Transformation. ## Warning: package ‘tensorflow’ was built under R version 3.3.3 #################### # # # Exercise 1 # # # #################### W = tf$Variable(tf$ones(shape(10,10))) b = tf$Variable(tf$zeros(shape(10,1))) #################### # # # Exercise 2 # # # #################### init_op <- tf$global_variables_initializer() with(tf$Session() %as% sess, { sess$run(init_op) }) […]

## Tensorflow – Basics: Part 2

Overview In this tutorial, we will go through the basics of Tensorflow. By the end of this series, you will have the background in order to use Tensorflow for deep learning models. Tensorflow is an open source, software library for numerical computation using data flow graphs. Nodes in the graph are called ops (short for […]

## Tensorflow – Basics Part 1: Solutions

Below are the solutions to these exercises on data transformation. ## Warning: package ‘tensorflow’ was built under R version 3.3.3 #################### # # # Exercise 1 # # # #################### sess = tf$Session() print(sess$run(a)) ## [,1] [,2] ## [1,] 3 12 sess$close() #OR with(tf$Session() %as% sess, { print(sess$run(a)) }) ## [,1] [,2] ## [1,] 3 […]

## Tensorflow – Basics Part 1: Exercises

Tensorflow is an open source, software library for numerical computation using data flow graphs. Nodes in the graph are called ops (short for operations), while the graph edges represent the R multidimensional data arrays (tensors) communicated between them. An op takes zero or more Tensors, performs some computation, and produces zero or more Tensors. In […]