TensorFlow™ is an open source software library for numerical computation using data flow graphs. Nodes in the graph represent mathematical operations, while the graph edges represent the multidimensional data arrays (tensors) communicated between them. The flexible architecture allows you to deploy computation to one or more CPUs or GPUs in a desktop, server, or mobile device with a single API. TensorFlow was originally developed by researchers and engineers working on the Google Brain Team within Google's Machine Intelligence research organization for the purposes of conducting machine learning and deep neural networks research, but the system is general enough to be applicable in a wide variety of other domains as well.
“How can we build computer systems that automatically improve with experience, and what are the fundamental laws that govern all learning processes?”
Machine learning studies computer algorithms for learning to do stuff. We might, for instance, be interested in learning to complete a task, or to make accurate predictions, or to behave intelligently. The learning that is being done is always based on some sort of observations or data, such as examples (the most common case in this course), direct experience, or instruction. So in general, machine learning is about learning to do better in the future based on what was experienced in the past. The emphasis of machine learning is on automatic methods. In other words, the goal is to devise learning algorithms that do the learning automatically without human intervention or assistance.
“A computer program is said to learn from experience E with respect to some task T and some performance measure P, if its performance on T, as measured by P, improves with experience E.” -- Tom Mitchell, Carnegie Mellon University
install.packages("caret")
install.packages("lattice")
install.packages("ggplot2")
#Download Library
library(caret)
library(lattice)
library(ggplot2)
#import Library
Data Set Information:
This is perhaps the best known database to be found in the pattern recognition literature. Fisher's paper is a classic in the field and is referenced frequently to this day. (See Duda & Hart, for example.) The data set contains 3 classes of 50 instances each, where each class refers to a type of iris plant. One class is linearly separable from the other 2; the latter are NOT linearly separable from each other.
Predicted attribute: class of iris plant.
This is an exceedingly simple domain.
This data differs from the data presented in Fishers article (identified by Steve Chadwick, spchadwick '@' espeedaz.net ). The 35th sample should be: 4.9,3.1,1.5,0.2,"Iris-setosa" where the error is in the fourth feature. The 38th sample: 4.9,3.6,1.4,0.1,"Iris-setosa" where the errors are in the second and third features.
Attribute Information:
1. sepal length in cm
2. sepal width in cm
3. petal length in cm
4. petal width in cm
5. class:
-- Iris Setosa
-- Iris Versicolour
-- Iris Virginica
Source:
Creator: R.A. Fisher
Donor: Michael Marshall (MARSHALL%PLU '@' io.arc.nasa.gov)
iris <- iris # you already find in your Rstudio (no joke :D)
validation_index <- createDataPartition(iris$Species, p=0.80, list=FALSE) #Partition
validation <- iris[-validation_index,] #Test
dataset <- iris[validation_index,] #Train Ciuf Ciuf
[I] dim(iris)
[O] ## [1] 150 5
sapply(iris,class)
## Sepal.Length Sepal.Width Petal.Length Petal.Width Species
## "numeric" "numeric" "numeric" "numeric" "factor"
head(iris)
## Sepal.Length Sepal.Width Petal.Length Petal.Width Species
## 1 5.1 3.5 1.4 0.2 setosa
## 2 4.9 3.0 1.4 0.2 setosa
## 3 4.7 3.2 1.3 0.2 setosa
## 4 4.6 3.1 1.5 0.2 setosa
## 5 5.0 3.6 1.4 0.2 setosa
## 6 5.4 3.9 1.7 0.4 setosa
tail(iris)
## Sepal.Length Sepal.Width Petal.Length Petal.Width Species
## 145 6.7 3.3 5.7 2.5 virginica
## 146 6.7 3.0 5.2 2.3 virginica
## 147 6.3 2.5 5.0 1.9 virginica
## 148 6.5 3.0 5.2 2.0 virginica
## 149 6.2 3.4 5.4 2.3 virginica
## 150 5.9 3.0 5.1 1.8 virginica
levels(iris$Species)
## [1] "setosa" "versicolor" "virginica"
percentage <- prop.table(table(iris$Species)) * 100
cbind(freq=table(iris$Species), percentage=percentage)
## freq percentage
## setosa 50 33.33333
## versicolor 50 33.33333
## virginica 50 33.33333
summary(iris)
X = INPUT
Y = OUTPUT
x <- iris[,1:4]
y <- iris[,5]
par(mfrow=c(1,4))
for(i in 1:4) {
boxplot(x[,i], main=names(iris)[i], col = c("Orange"))
}
plot(y, col = c("Orange","Red","Light green")) #Colorazione Goleador
Details
This function ``stacks'' data to get it into a form compatible with lattice and creates the plots
Value
An object of class ``trellis''. The `update' method can be used to update components of the object and the `print' method (usually called by default) will plot it on an appropriate plotting device.
featurePlot(x = iris[, 1:4], y = iris$Species, plot = "pairs", ## Add a key at the top auto.key = list(columns = 3))
featurePlot(x = iris[, 1:4], y = iris$Species, plot = "ellipse", ## Add a key at the top auto.key = list(columns = 3))
featurePlot(x=x, y=y, plot="box", col = c("Orange","Red","Light green"))
scales <- list(x=list(relation="free"), y=list(relation="free"))