RPubs will retire in June 2027. Your existing documents will stay accessible through December 31, 2031
and Connect Cloud is the recommended home for new publishing. Read the blog post

Recently Published

HABERMAN SURVIVAL DATASET
The RMarkdown file is well-structured and includes comprehensive sections on loading the dataset, logistic regression, clustering, and neural networks. Here’s the summary : Library Installation and Loading: Installed and loaded essential R packages for image processing (imager, EBImage), data manipulation (dplyr, tidyverse), and modeling (caret, nnet). Dataset Preparation: Loaded images from a specified directory, resizing them for uniformity. Created a data frame containing the labels (derived from folder names) and the resized image data. Exploratory Data Analysis: Analyzed the dataset's structure, dimensions, and class distributions to understand the data better. Logistic Regression: Flattened the image data and performed normalization. Applied PCA for dimensionality reduction, retaining components that explain 95% of the variance. Split the dataset into training and testing sets, trained a multinomial logistic regression model, and evaluated its performance using accuracy and a confusion matrix. Clustering: Assessed the clusterability of the data with the Hopkins statistic. Conducted hierarchical clustering and visualized the results using a dendrogram. Implemented K-means clustering and visualized clusters based on the first two PCA components. Neural Networks: Defined a function to fit a neural network model and calculate accuracy. Evaluated models with varying hidden neuron sizes to determine the best configuration.
ch9_measurement
Logistic Regression,Neural Networks and Clustering
This project involves classifying 293 images (plants, animals, and fruits) using logistic regression, neural networks, and clustering in R. Images are preprocessed and reduced via PCA, with logistic regression achieving 44.19% accuracy. Neural networks improved with more hidden neurons, reaching 77.82% accuracy. Clustering (K-means and hierarchical) was explored, though the Hopkins statistic (0.34) suggested weak clustering tendencies. Key challenges included misclassifying plants and overall low model performance, indicating room for optimization. Libraries like imager, dplyr, and caret were used for processing, modeling, and evaluation, with a focus on improving feature selection and classification accuracy.
Neural nets
Plot
A gentle INLA tutorial
Quiz Regresion Lineal
Document
Document
Stat651_hw1
Document