Coder Social home page Coder Social logo

java_wrapper's Introduction

README: Breast Cancer Classifier

This is a CLI application to classify fine needle aspirates from breast tissue scored as explained in this document.

The process in which this classifier was build and the evaluation of this classifier can be found on this repository.

The classifier was trained using the Breast Cancer Wisconsin (Original) Data Set

How do I get set up?

  • Download this repository to your local computer.
  • Unpack the zip file that you downloaded to a place where you can find it.
  • Make sure you have a jvm (java 11) installed.
  • Open the folder where you extracted this project in a terminal.
  • This is where you run the application.

Running the application

  • Open the terminal as described in How do I get set up?

Get help

To get the help in the terminal simply type

java -jar java_wrapper_weka_classifier.jar --help

Or

java -jar java_wrapper_weka_classifier.jar -h

Classify a single instance

To classify a single instance run the following command:

java -jar java_wrapper_weka_classifier.jar -i 1,2,3,4,5,6,7,8,9

or

java -jar java_wrapper_weka_classifier.jar --instance 1,2,3,4,5,6,7,8,9

The result of the classification (either Benign or Malignant) will be printed in the terminal. It is important to give this exact format for your instance. The order of the attributes matters. The order in which the attributes are needed from left to right are:

  • Clump Thickness
  • Uniformity of Cell Size
  • Uniformity of Cell Shape
  • Marginal Adhesion
  • Single Epithelial Cell Size
  • Bare Nuclei
  • Bland Chromatin
  • Normal Nucleoli
  • Mitoses

The score for each attribute should be an integer value belonging to [1,10] interval (or be empty see below).

If you have a missing value for attributes simply skip the number and type the next comma. In the following example the first (Clump Thickness) and fourth (Marginal Adhesion) attribute are missing. If you do this it is important to surround the values with quotation marks.

java -jar java_wrapper_weka_classifier.jar --i ",2,3,,5,6,7,8,9"

Classification from file

For classifying instances in a file you can use flag -f or --file followed by the file with the instances that need classifying. This file has to be an ARFF file (read more about ARFF files here). Only ARFF file formatted exactly like the test.arff file in the test_data folder can be processed (except for the attribute values and amount of instances of course). To classify the test.arff file run the following command:

java -jar java_wrapper_weka_classifier.jar -f test_data/.arff

After running this command a new file will be saved in the output_data folder. The file will be like the ARFF input file, but with the class label added to each instance. The name of this file will be: output_<time_stamp>.arff. One output file is already present in this folder. This is the output file generated with the test.arff data found in the test_data folder.

Contact information

If you have questions or problems with the application feel free to send an e-mail to:

[email protected]

java_wrapper's People

Contributors

naomihindriks avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.