Skip to content

Inconsistent code commenting styles #172

@TINGWEIJING

Description

@TINGWEIJING

Style Inconsistency

Just a suggestion for improvement in code commenting.

Evidence

  1. Inconsistent block comments

import java.util.List;
/***
* Dataset
* https://www.kaggle.com/zhangjuefei/birds-bones-and-living-habits
*
* @author BoonKhai Yeoh
*/

/**
* Author: Kian Yang, Lee
* Binary Classification Task with Heart Disease DataSet
*
******************************************************
*
* This is a binary classification task example of using feedforward neural network.
* The code for dataset loading and preparation was done for you.
* Also, the code to iterate through training epochs and evaluating the model were provided.
*
* Please complete this exercise by configuring a neural network that can perform a binary classification task.
* Take special note of the different input and output number that is required in order to run the dataset
* successfully.
*
* Remember to uncomment certain parts of code to run the entire script.
*
* *****************************************************
*/

/*
*
* TASKS:
* -----
* 1. Load data using getDataSet() method.
* 2. create a kFoldIterator object. (set k=5)
* 3. loop through the kFoldIterator and print out the observations for each training set and test set.
*
* */

  1. Inconsistent end-of-line comments

// #### Apply normalization here ####
//=====================================================================
// Step 2: Define Model
//=====================================================================

// 5. ======== build and initialise the model ========
MultiLayerNetwork model = build_model(weightsArray); // call the function to build the model
model.init();
// 6. ======== configure listener (UI & Training Loss Value) ========
StatsStorage statsStorage = new InMemoryStatsStorage();

//=========================================================================
// Step 1 : Build Schema to prepare the data
//=========================================================================
//Build Schema to prepare the data

  1. Inconsistent method documentation comment

/*
* =================================
* List of functions to be used
* =================================
*/
/*
************** 1. function to load data **************
*/
private static RecordReader load_data(String filepath) throws Exception{

/**
* Returns a network config that takes in a 10x10 random number and produces a 28x28 grayscale image.
* @return config
*/
private static MultiLayerConfiguration generator() {

Possible solution

Just follow one of the styles and make it all consistent.

Styling references:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions