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

round results in aggregate table results (pyspark)

Hello how would I round this content of table outputted by this code. from pyspark.sql.functions import * exprs = {x: "sum" for x in data2.columns[:4]} data2.groupBy("Species").agg(exprs).show() I've tried…
abdoulsn
  • 842
  • 2
  • 16
  • 32
2
votes
1 answer

Why do I get a KeyError when attempting to draw a scatterplot?

I am trying to make a simple scatterplot and get a KeyError. I have tried to see if it is a matter of the feature "group" that contains the four classes, but it is not so I am not sure what is the issue here. from sklearn.datasets import…
D1W1TR15
  • 99
  • 2
  • 11
1
vote
1 answer

Understanding shape of example arguments to forward method in PyTorch

I am trying to compile my PyTorch model into mlir using torch-mlir. The compile method from torch-mlir requires three arguments: 1) model to convert 2) example arguments to use when inferring the shapes of the arguments to the forward method of the…
1
vote
1 answer

How to use subset() in a for loop in R

I need to select the levels of Species in the dataset Iris (available in R) with the function subset() and calculate the mean of the column Petal.Length from the same dataset, everything with a for loop. I know that I can do this calculations with…
1
vote
1 answer

Neural Network on the Iris dataset convergaes very quickly

I'm tasked with writing a ANN using only NumPy (no TensorFlow, PyTorch , etc.) on the iris dataset. I'm running 2000 epochs and it seems by the time of epoch 40 the accuracy of the network stays at 0.66. Also the parameters while debugging are…
Amit Toren
  • 351
  • 3
  • 13
1
vote
1 answer

Output of the neural network's parameters in the neuralnet package in R

I am new to R, and I am trying to execute some simple code, which uses the neuralnet package with the built-in dataset Iris. library(neuralnet) data(iris) #Add a "fake" class to allow for all factors levels(iris$Species) <-…
Danny
  • 369
  • 2
  • 3
  • 11
1
vote
2 answers

pheatmap: manually re-order leaves in dendogram

I have created a heatmap with a corresponding dendogram based on hierarchical clustering with {pheatmap}. I would like to change the order of the leaves in the dendogram, manually, based on what I see visually. First, can anyone confirm that this is…
B_slash_
  • 309
  • 2
  • 17
1
vote
1 answer

I use pytorch to train a model to classify iris, but my acc was about 0.4

I have tried many improvements like increasing epochs, using better loss functions and optimizers, deepening the network and shuffling the dataset, etc, but still to no avail. This problem has been bothering me for a long time, thanks for your help.…
hazy
  • 13
  • 4
1
vote
1 answer

How to modify all the columns of each data set of a nested data in one go?

I have this nested data I want to unnest it, but I have to standardize the classes of the columns before to unnest `library(tidyverse`) nested_data<-iris %>% nest(data = !Species) #I added to the third dataset an additionnal…
Seydou GORO
  • 1,147
  • 7
  • 13
1
vote
2 answers

Running analysis on for loop x times

I have the following code that selects 4 rows of iris 1000x, and takes the mean of each 4 row sample: library(dplyr) iris<- iris storage<- list() counter<- 0 for (i in 1:1000) { # sample 3 randomly selected transects 100 time tempsample<-…
hugh_man
  • 399
  • 1
  • 6
1
vote
1 answer

Getting pairwise effect sizes

I am trying to get pairwise comparisons of effect sizes. I can do this with coh_d, however, it gives me repeat comparisons. For example, in the following code, setosa vs. versicolor is the same as versicolor vs. setosa (apart from the flipped…
hugh_man
  • 399
  • 1
  • 6
1
vote
2 answers

Using pvalue from list of anova results as condition

I want run a series of kruskal.tests, followed by a dunn_test where the Kruskal was significant. Then print the results of the significant dunn_tests. library(rstatix) library(purrr) iris<- iris for(i in 1:4){ a<- colnames(iris) anova<-…
hugh_man
  • 399
  • 1
  • 6
1
vote
0 answers

Regular Validation Method Iris Data Set R

I am trying to perform a regular validation on the iris data set in R to discover MSE, Quadratic MSE, and Cubic MSE. # install.packages("class") # install.packages("boot") library("class") library ("boot") iris <- iris train = sample(150,…
Samh200
  • 13
  • 3
1
vote
0 answers

I am using simple Neural network to solve the IRIS dataset problem. The output from the NN is coming out to be multi-label multi-class & not unilabel

# Loading the dataset iris_df = pd.read_csv('/content/drive/MyDrive/A2. Online Courses/X_Projects/Iris Dataset/Iris data.csv') # Renaming the column headers iris_df.columns=['sepal length', 'sepal width', 'petal length', 'petal width', 'class'] #…
1
vote
1 answer

Purpose of s and cmap argument in scatter_matrix in python

Exploratory Data Analysis #create df from data in X_train #label columns using str in iris_dataset.feature_names iris_dataframe = pd.DataFrame(X_train, columns=iris_dataset.feature_names) #create scatter matrix from df, color by y_train …