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
0 answers

R - Neural Networks - Iris Dataset

I tried to use nnet on the iris dataset but I am not sure how to resolve the errors show below. Any help appreciated. Thanks. library(nnet) attach(iris) library(caret) set.seed(3456) trainIndex <- createDataPartition(iris$Species, p = .8, …
user4745212
  • 51
  • 1
  • 3
  • 11
0
votes
0 answers

How to specify fill_value as np.nan or NaN in iris.load_cube

I am reading a netcdf file which constains the following header information. dimensions: time = UNLIMITED ; // (312 currently) lon = 401 ; lat = 241 ; variables: float time(time) ; time:standard_name = "time" ; …
Redshoe
  • 125
  • 5
0
votes
1 answer

Training Neural Network using GlobalBestPSO

import numpy as np import pyswarms as ps import tensorflow as tf from sklearn.datasets import load_iris from sklearn.model_selection import train_test_split from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense #…
0
votes
0 answers

Validating Bayesian logistic regression model with iris dataset

We have a bayesian logistic regression model in python using a pyro and sklearn environment. The model is trained and tested with a dataset that contains categorical and continuous variables. The code starts by preprocessing the dataset (using the…
jon0003
  • 1
  • 2
0
votes
2 answers

ValueError: Expected 2D array, got 1D array instead: x and y values are 2 data types

I am trying to train a very simple model using DecisionTreeClassifier(). iris.csv is my dataset. dtc1 = DecisionTreeClassifier() dtc1.fit(x1Train,y1Train) predicted1 = dtc1.predict(x1Test) predicted1 data shape The error I am getting…
0
votes
1 answer

Why cross_val_score using LeaveOneOut() leads to nan validationscore?

I was trying to fit different cross_val_score type(k-fold(),LeaveOneOut(),LeavepOut()) in iris dataset of sklearn.But LeaveOneOut() leads to nan score list.why is this happening?Can anyone explain?Let me attach my part of code…
0
votes
0 answers

Accuracy not improving with online ML model using river library in python

I want to build a ML model that continuously improves with each incoming input. For this I searched and found that river library of python is best used for online learning and it pays importance to each incoming example while training and learns…
0
votes
1 answer

Returning Sklearn iris-data with cross validation

I am slightly confused by what the following code returns for X and y: from sklearn import datasets X, y = datasets.load_iris(return_X_y=True) I am seeing that print(X) gives the iris -data of shape 150x4, which seems correct. However, I am trying…
polygonlink1
  • 129
  • 2
0
votes
1 answer

Using different scales for secondary axis for ggplot function in R

I am trying to create a biplot from iris data set using ggplot2 package. I have used below code to generate the biplot: library(ggplot2) library(devtools) # Load iris dataset data(iris) # Run PCA and extract scores and loadings iris_pca <-…
Farhan
  • 57
  • 5
0
votes
0 answers

Histogram different colours for clusters

So I am currently trying to learn matplotlib using the iris dataset and its going pretty well however when making a matrix of scatter plots with histograms going down the diagonal I am trying to get the histograms to also change colours depending on…
Josep
  • 1
  • 1
0
votes
1 answer

Facetted area plot of cumulative proportion with trend lines and Pearson's correlation coefficient?

I want to create a facetted area plot showing the cumulative proportion of each category, with a trend line and a Pearson's correlation coefficient. I've so far used this code (exemplified with the iris data set): # Create data set ==== ciformat…
Wandering_geek
  • 261
  • 1
  • 11
0
votes
1 answer

ValueError: shapes (120,6) and (7,) not aligned: 6 (dim 1) != 7 (dim 0)

I'm trying to implement multiclass classification with logistic regression on an Iris.csv dataset from Kaggle. This is my code. import numpy as np import pandas as pd from sklearn.model_selection import train_test_split def standardize(X_tr): #…
0
votes
0 answers

Neural Net (only numpy and pandas) for Iris dataset

I am trying to code a neural network from scratch i.e. using only numpy and pandas. I am trying to use it for the iris dataset. Here is my code: import pandas as pd import numpy as np from sklearn.preprocessing import LabelEncoder,…
0
votes
0 answers

Choosing activation functions for Iris classification dataset

I am trying to build a neural network from scratch, so this means I will only be using numpy and pandas for defining the my neural network class. I tried appropriating some code that chatgpt gave me but its so buggy that I have decided to start from…
0
votes
0 answers

How to compute linear regression using multivariate least squares method without using scikit-learn library?

My question is classification of the iris dataset using multi-variate linear regression without using the scikit-learn library. I have this formula that is needed to find the beta values for the dataset. enter image description…