Questions tagged [iris-dataset]

Relates to the Iris flower dataset published by Ronald Fisher's 1936 paper "The use of multiple measurements in taxonomic problems".

Questions regarding the dataset and its application, for example in statistics and machine learning, are appropriate for this tag.

114 questions
1
vote
1 answer

Using the pipe function in R by assigning values, Is my approach correct?

This is my first time using the pipe function and my professor has not reviewed how to use it so I am a little lost, I have trouble with the last question since I keep getting error most likely since the last assignment contradicts my filter <=2,…
marlyn__
  • 39
  • 5
1
vote
1 answer

Boxplots with Seaborn for all variables in a dataset at once

I watched many videos, read the Seaborn documentation, checked many websites, but I still haven't found the answer to a question. This is from the Seaborn documentation: iris = sns.load_dataset("iris") ax = sns.boxplot(data=iris, orient="h",…
1
vote
3 answers

How to convert numerical 'species' into categories in Iris dataset

I am working with the Iris dataset from sklearn. Here's my code so far: iris = datasets.load_iris() data = pd.DataFrame(iris['data']) target = pd.DataFrame(iris['target']) frames = [data,target] iris = pd.concat(frames,axis=1) iris.columns =…
1
vote
0 answers

how to create a lambda layer for iris and its dependencies?

I want to process netCDF files inside an AWS lambda function and I need to use iris. My plan is to create a lambda layer that has iris and it's dependencies installed. I am able to create a layer but its always complaining for a missing package when…
Nisman
  • 1,271
  • 2
  • 26
  • 56
1
vote
2 answers

Color in biplot princomp and biplot

how is it possible to color the species of the iris dataset within the biplots with different colors using princomp and biplot. Bests data(iris) fit <- princomp(iris[,c(1:3)], cor=TRUE) biplot(fit)
Bettina
  • 27
  • 7
1
vote
0 answers

Visualization of iris data set and a model for Naive bayes

There are so many ways to visualize a data set. I want to have all those methods together here and I have chosen iris data set for that. In order to do so These are been written here. I would have use either pandas' visualization or…
Sadegh
  • 125
  • 11
1
vote
2 answers

How to plot decision boundaries of SVM with different kernels? (3 classes, 3 features)

I'm trying to plot decision boundaries of SVM with different kernels like rbf, poly, and linear. I am using iris data set available online which is in shape of 150 * 4, so I had dropped the 4th feature and now it's in shape of 150 * 3 . Notice that…
Sadegh
  • 125
  • 11
1
vote
2 answers

Normalize in R Programming Iris Dataset 'x' must be an array of at least two dimensions

I have the data iris and I want to make the data iris - mean of each column in data iris so i have code like this y=iris[,1:4] t=y-colMeans(y) t so the column show the matrix data iris - means of column. So I want to ask about how to create like…
stuckcom
  • 19
  • 5
1
vote
2 answers

How to fit a multivariate normal distribution in R?

I need to fit a multivaraite normal distribution to each specie in the Iris dataset in R. I saw the mvtnormpackage might be useful; however, i want to use the maximum likelihood estimation and not sure how to do so in R. Any ideas?
1
vote
2 answers

How to select certain rows of a data set in R to then use in a function?

I am trying to find the Mahalanobis Distance between the different species in the iris dataset in R. I was able to find the distance between setosa and versicolor by the following code: library(HDMD) #To get Mahalanobis distances between Setosa and…
daisybeats
  • 217
  • 1
  • 6
1
vote
1 answer

How to find p values for correlation matrix in R?

I have been able to generate the following correlation matrix using: attach(iris) library(corrplot) library(Hmisc) library(Formula) library(survival) #FOR SETOSA: m<-levels(Species) setosaCor=cor(iris[Species==m[1],1:4],method =…
daisybeats
  • 217
  • 1
  • 6
1
vote
2 answers

Generate additional random samples of data based upon my existing dataset

I am trying to generate a much larger sample of data from my existing sample data. For example iris is N = 150 and I want to rescale it to 4500 (1500 per species). An example is described in the post here https://seslezak.github.io/IrisData/. I…
Xion
  • 319
  • 2
  • 11
1
vote
0 answers

ValueError: Number of features of the model must match the input. Model n_features is 4 and input n_features is 2

I have problem with training my model when I use 4 features. I was able to implement training using 2 firts features. But have some troubles when I use 4 features. The suspect code is here: from sklearn.datasets import load_iris from sklearn.tree…
1
vote
2 answers

Knn prediction going 100% on y_test

I'm trying to implement K-nearest neighbors on Iris dataset but after doing the predictions, yhat goes 100% without errors, there must have something wrong and i have no idea what it is... I created a column named class_id, where i changed: setosa…
1
vote
2 answers

Splitting data set into training and test data, keeping the ratio

I have the Iris data set (Can be found here: https://www.kaggle.com/uciml/iris ), which I should split into a test and a training set. However, I need to split it so that the class distribution in the training and test set is the same as in the…
user10411263
  • 49
  • 3
  • 10