Git Product home page Git Product logo

classifier-weka's Introduction

Classifier-Weka

Ref: The slides from Rolf Schwitter, Carla P. Gomes, Bing Liu, KAU, David Page, and Paul Kennedy

Training and testing - I

image

Exercise -I

  • Use "segment‐challenge.arff" as training set and "segment‐test.arff" as test set;
  • Choose KNN with default K value;
  • Output the accuracy;
  • Evaluate on the training set.

Training and testing - Continuing

image

Exercise -II

  • Load "segment‐challenge.arff";
  • 70% of "segment‐challenge.arff" is used as training set with the rest as test set;
  • Choose KNN with default K value;
  • Output the accuracy;
  • Evaluate on the training set.

Cross-Validation

  • Widely used approach for estimating test error.
  • Estimates can be used to select best model, and to give an idea of the test error of the final chosen model.
  • Idea is to randomly divide the data into 𝑘 equal-sized parts. We leave out one part, fit the model to the other 𝑘 − 1 parts (combined), and then obtain predictions for the left-out part.
  • This is done in turn for each part 1, 2, . . . 𝑘, and then the results are combined.

image

  • A schematic display of 5-fold CV. A set of n observations is randomly split into five non-overlapping groups. Each of these fifths acts as a validation set (shown in beige), and the remainder as a training set (shown in blue). The test error is estimated by averaging the five resulting estimates.

  • Cross-validation allows us to use (almost) all the training data to evaluate our model (most useful in low-data situations). 10-fold or 5-fold is most commonly used.

Exercise -III

Suppose we have 100 instances, and we want to estimate accuracy with cross validation. What is the final accuary? image

Exercise -IV

  • Load "segment‐challenge.arff";

  • Use 10-CV to evaluate the model (KNN with default K value).

  • Choose the best K value (1-10);

  • Load "diabetes.arff";

  • Use 10-CV to evaluate the model (KNN with default K value).

  • Choose the best K value (1-10);

Exercise -V

  • Which feature(s) has the highest impact on the "Friendly"?
  • Data source "Rabbit_Sydney_Data".
  • What else knowledge do you discover via Weka?

classifier-weka's People

Contributors

jiawu-repository avatar

Watchers

James Cloos 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.