Question: In this project you should use C , you are expected to read data from the file, make some statistical calculations using the functions given

 In this project you should use C , you are expected

to read data from the file, make some statistical calculations using the

In this project you should use C , you are expected to read data from the file, make some statistical calculations using the functions given on the read data set, and write these calculations to the file.

The first row of the Iris.csv dataset contains the index information of the Iris flower data. In Line 2 of the file, the following features of the Iris flower are given:

Id: Line number of the data in the file (It will not be taken into account when reading!)

SepalLengthCm: The length of the sepal

SepalWidthCm: The width of the sepal

PetalLengthCm: The length of the petal

PetalWidthCm: The width of the petal

Species: 3 different types of iris flower. These species are: Iris-setosa, Iris versicolor, Iris-virginica

In the given Iris.csv file, each record is separated by a comma (,). separated. Commas will be ignored when reading data.

Each line will be properly read from the file, with a structure variable you named IrisDataType. All the data in the file (except the Id column) will be kept in a dynamic array of type IrisDataType. The last column where the iris flower types are given will be labeled as (Iris-setosa=1, Iris-versicolor=2, Iris-virginica=3) with the appropriate data structure you will create and the reading operation will be from this data structure type.

Statistical calculations will be made by using the functions given below by taking the 150x4 feature matrix from the dynamic array IrisDataType that you created in the main() function.

Mean and variance values of SepalLengthCm, SepalWidthCm, PetalLengthCm and PetalWidthCm features, correlation of 3 feature pairs with each other and covariance matrix of feature matrixwill be calculated.

The accounts you made will be written to the "IrisStatistic.txt" file you created.

Functions:

float *returnVector(int size);

float **returnMatrix(int row, int col);

void freeMatrix(float **mat, int row);

float mean(float *vec, int size);

float variance(float *vec1, float *vec2, int size);

float covariance(float *vec1, float *vec2, int size);

float **matrixMultiplication(float **mat1, float **mat2, int row1, int col1, int row2, int col2);

float **matrixTranspose(float **mat, int row, int col);

float *rowMeans(float **mat, int row, int col);

float *columnMeans(float **mat, int row, int col);

float **covarianceMatrix(float **mat, int row, int col);

float determinant(float **mat, int row);

void printVector(float *vec, int N);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!