Skip to content
Snippets Groups Projects
Select Git revision
  • bcf9831d4a15badd9b0a8d002d535db9e88111db
  • main default protected
  • 3D_UNet
  • notebooksv1
  • scaleZYX_mean
  • notebooks
  • convert_tiff_folders
  • test
  • notebook_update
  • threshold-exploration
  • optimize_scaleZYXdask
  • layered_surface_segmentation
  • conv_zarr_tiff_folders
  • 3d_watershed
  • tr_val_te_splits
  • save_files_function
  • memmap_txrm
  • v0.4.1
  • v0.4.0
  • v0.3.9
  • v0.3.3
  • v0.3.2
  • v0.3.1
  • v0.3.0
  • v0.2.0
25 results

viz.md

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    ex4_2_1.R 739 B
    ####################
    # Exercise 4.2.1
    ####################
    rm(list = ls()) # Clear work space
    
    # Read data into R
    data <- read.csv("./Data/iris.csv")
    
    # Inspect the contents of the variable "data".
    names(data)
    head(data)
    
    # Extract the rows and columns corresponding to the data, i.e. the attribute values
    X <- data[, 1:4]
    
    # Extract attribute names from the first row
    attributeNames <- colnames(data)[1:(dim(data)[2] - 1)]
    
    # Extract unique class names from the last column
    classLabels <- data[, 5]
    classNames <- unique(classLabels)
    
    # Extract class labels that match the class names
    y <- match(classLabels, classNames) - 1
    
    # Get the number of data objects, attributes, and classes
    N <- dim(X)[1]
    M <- dim(X)[2]
    C <- length(classNames)