Julia Cookbook by Jalem Raj Rohit

Julia Cookbook by Jalem Raj Rohit

Author:Jalem Raj Rohit [Rohit, Jalem Raj]
Language: eng
Format: mobi, pdf
Tags: Julia
Publisher: Packt Publishing
Published: 2016-09-30T04:00:00+00:00


How to do it...

Firstly, let's download the famous iris dataset. This is a dataset that contains the details of iris flowers and the classes they belong to. This dataset can be used as a nice, simple start to classification problems. It can be downloaded from the following link: https://raw.githubusercontent.com/trthatcher/DiscriminantAnalysis.jl/master/example/iris.csv

Now, we would like to import the dataset using the readtable() function of the DataFrames library. This can be done in the REPL, as follows:

df = readtable("iris.csv")

Output Next, we pool the dataframe's Species column, which contains the names of the types of flower. Pooling a vector converts the string values into factors. This can be done using the pool!() function. The ! is used as the function changes the value of its arguments after execution. So, this can be done as follows: pool!(df, [:Species])



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.