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
0
votes
1 answer

Automate for loop to increase samples selected

I am looking to run a loop that selects 2 rows from a data frame 1000 times > store that into an object > then run the same loop that selects 3 rows 1000 times > store to object > then 4, and so on. The end goal is to compare the means/variances of…
hugh_man
  • 399
  • 1
  • 6
0
votes
0 answers

IPython.display is not showing array in output cell in Jupyter notebook

I am doing a course at Udemy called "Introduction to Data Science using Python". There is a particular section where the instructor imports "iris data" in the jupyter notebook. When i am writing the exact same code, the iris data is getting…
STS_R
  • 1
  • 1
0
votes
0 answers

Code for automating ANOVA model summaries stopped working

I wrote some code to automate printing out a list of ANOVA models that all use the same independent variable. I created a vector of all the numeric variables in a data frame. Then I used a for loop to create the necessary ANOVA models, the name of…
jonp72
  • 1
0
votes
0 answers

Multiple regression with iris database

I am trying to build a linear regression model with interaction to predict Sepal.Length based on both Petal.Length and Species from iris. For some reason, the output of my model only shows two of the three…
8i7ty8
  • 1
0
votes
0 answers

"'tuple' object is not callable" when attempting to plot

Quite new to Python and I'm trying to plot the training set of the Iris Classification dataset, however when attempting to plot I get the error "TypeError: 'tuple' object is not callable". Here's the code: from sklearn import datasets iris =…
0
votes
1 answer

This dataset graph was working withe the line of best fit now it has broke

This code was functioning a has been reverted to the state were it was functioning but is now unfunctionial. Can someone help resolve the error import pandas as pd import seaborn as sns import numpy as np import matplotlib.pyplot as…
0
votes
1 answer

Problem with finding covariance matrix for Iris data in R

I keep getting NAs when trying to find the covariance matrix for the Iris data in R. library(ggplot2) library(dplyr) dim(iris) head(iris) numIris <- iris %>% select_if(is.numeric) plot(numIris[1:100,]) Xraw <-…
0
votes
1 answer

Count not conver string to float using iris dataset

So I am using iris dataset on my sample linear regression code. But when I tried to train/fit the model. I get an error ValueError: could not convert string to float: 'setosa' This bugs and I could not find the fix for this one. Below is the code…
0
votes
1 answer

Best fit to a histogramplot Iris

I want to plot the best fit line to every Iris class per feature histogram plot. I have tried the solutions from these examples: 1 and 2, but dont get the result i want. This is how the histogram looks like now, and how I want them to look, but with…
vegiv
  • 124
  • 1
  • 9
0
votes
2 answers

How to only plot data on the hour from a 6 hour dataset cube (iris)?

So far my code to plot a a graph is like so: iplt.plot(pressure_no1, color='black') plt.xlabel('Time / hour of day') plt.ylabel('Atmospheric pressure / kPa') iplt.show() it is a 6 hour cube (although is 2dimensional) data set, with 420 data points.…
0
votes
1 answer

How to display legends in scatter plot in order to differentiate between the classes

I am working on the iris data set from sklearn. As you may know the iris dataset has 3 classes ['setosa', 'versicolor', 'virginica']. I have made a scatter plot for this dataset. The details are as follows from sklearn.datasets import…
user15407748
0
votes
1 answer

scatter subplot for iris dataset

I'm new to data science. I wrote this script for plotting all different kinds of iris data set scatter plot. trying not to plot something with itself . how can I optimize my code ? '''python from sklearn.datasets import load_iris import numpy as…
shahab
  • 11
  • 3
0
votes
3 answers

Why do I get the error "object of type 'closure' is not subsettable" when assigning a data frame in R?

I am using the iris dataset included in R. First, I created new data using "virginica" and "not virginica" out of out the species column so that every species that wasn't virginica was renamed: data2 <- iris data2$Species <-…
Jay
  • 3
  • 2
0
votes
1 answer

How do I convert this scikit-learn section to pandas dataframe?

I am trying to convert this Python code section to pandas dataframe: iris = datasets.load_iris() x = iris.data y = iris.target I will like to import Iris data on my local machine instead of loading the data from Scikit library. Your kind…
Dean
  • 129
  • 2
  • 9
0
votes
1 answer

When using Linear Discriminant Analysis and k nearest neighbours in classification, which is better?

I am currently performing classification on the Iris dataset. I used both LDA and kNN methods to classify the data. I found both to be highly accurate and cannot decide which one is more appropriate to use? My first thought is kNN since LDA assumes…
daisybeats
  • 217
  • 1
  • 6