Steps to Install Weka on desktop running windows OS:

Standard

Weka is a popular free open source machine learning tool. In this post, I’ll note the steps that I took to install it on windows machine:

1. Search “Download Weka”. As of today, the URL is http://www.cs.waikato.ac.nz/ml/weka/downloading.html

2. Now, it’ll have options to download the Weka. Here, based on your

– Machine configuration (x86 vs x64)

– Java version and the corresponding Weka version

So let’s check that:

3. To check the Java version installed on your computer, open up command prompt and type Java -version

weka install machine learning windowsNote that I’ve java version 1.7

let’s see if it’s compatible w/ the weka version:

weka java version

As you can see, the version of weka that I’ll be installing requires Java 1.7 and I already have that – so for now my machine, I selected the option:

Click here to download a self-extracting executable without the Java VM

Also remember to check the operation system type (x86 vs x64) and download the corresponding version of weka.

4. After downloading, install it. I left all the options default.

5. After successful installation, I launched weka by going to:

start > all programs > weka 3.6.9 > weka 3.6.9

weka gui chooser machine learning

That’s about it for this post.

Advertisements

Getting started with creating Java app on Google App engine – Guest Post by Dhwaneet Bhatt

Standard

This is a Guest Post by Dhwaneet Bhatt. He’s one awesome programmer and technologist with an innate ability to master any technical topic very quickly. Here’s his twitter profile: https://twitter.com/#!/dhwaneetbhatt for you to able to connect with him.

If you searching for tutorial to get you started with python app on Google App engine. click here. And Here’s his post which would help you to get started with creating a java app on Google App engine:

1. We will be using Eclipse IDE to code a simple Java App for Google App Engine because it is very simple, the other option is building the application using Ant script, which involves a lot of code writing, and I prefer to keep things simple.

2. Download Eclipse from the following URL:

http://www.eclipse.org/downloads/

The App Engine has support for all the versions but we prefer to use the latest version, so download Eclipse Indigo (3.7.x). On the web page, download from the first link that reads “Eclipse IDE for Java EE Developers”. That will download Eclipse 3.7.x.

3. Extract eclipse and start, you will be prompted to create a workspace, create it anywhere you like and proceed.

image

4. Once in eclipse, we need to install the Google App Engine plugin. Go to Help->Install New Software, once there, enter the following URL in the “Work With” text box: http://dl.google.com/eclipse/plugin/3.7

Note: 3.7 in the URL corresponds to the Eclipse version, if you are using some other version, change the last number according to that. Or you can visit this link that gives all the URLs:

https://developers.google.com/eclipse/docs/download

Click on the “Add” button and this repository will be added to Eclipse. Next time you can directly use this repository name for downloading any Google related plugin. It will then download a list of plugins associated with this URL.

image

Select the options “Google Plugin for Eclipse 3.7” under Google Plugin for Eclipse and Google App Engine Java SDKunder SDKs. These are the basic tools required for deploying a simple app to App Engine.

Click Next (2 times), and Accept the Terms of Agreement (after reading of course) and then it will take a couple of minutes for the plugins to get installed. Go grab a cup of coffee.

5. After it is installed, Eclipse will prompt for restart. Restart the Eclipse.

6. Click on New -> Other… and from the list select “Web Application Project” under Google”, give a name for your project and a package structure, and untick Use Google Web Toolkit and click Finish.

image

7. Now comes the surprise, you don’t need to do anything now. Eclipse has already created all the files required for the Hello World App, but still, I will be taking them one by one so that you can understand the necessary steps for writing a custom app.

8. First comes the deployment descriptor (for people who are new to J2EE, I recommend reading about J2EE first), it is the file web.xml located in the location war/WEB-INF/web.xml.

<?xml version="1.0" encoding="utf-8"?>

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns="http://java.sun.com/xml/ns/javaee"

xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"

xsi:schemaLocation="http://java.sun.com/xml/ns/javaee

http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">

<servlet>

<servlet-name>Dhwaneetbhattjavaapp</servlet-name>

<servlet-class>com.dhwaneetbhatt.helloworldjavaapp.DhwaneetbhattjavaappServlet</servlet-class>

</servlet>

<servlet-mapping>

<servlet-name>Dhwaneetbhattjavaapp</servlet-name>

<url-pattern>/dhwaneetbhattjavaapp</url-pattern>

</servlet-mapping>

<welcome-file-list>

<welcome-file>index.html</welcome-file>

</welcome-file-list>

</web-app> 

The web.xml contains mapping for the default servlet created with the name DhwaneetbhattjavaappServlet, and its URL mapping. This is the URL which will allow the servlet to give a response. And index.html located under war/ is the first file to be loaded when the application is started.

9. The next file is a pretty simple HTML file that contains nothing but a simple link to call the servlet.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<meta http-equiv="content-type" content="text/html; charset=UTF-8">

<title>Hello App Engine</title>

</head>

<body>

<h3>Hello App Engine!</h3>

<a href="dhwaneetbhattjavaapp">Servlet</a>

</body>

</html> 

10. The next important file is the servlet itself – which responds to the request by the html file. The doGet method means that the request coming from the html file is a GET request. You can repond to a POST request by implementing the doPost method and changing the type of request coming from html form to POST.

package com.dhwaneetbhatt.helloworldjavaapp;

import java.io.IOException;
import javax.servlet.http.*;

@SuppressWarnings("serial")
public class DhwaneetbhattjavaappServlet extends HttpServlet {
	public void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws IOException {
		resp.setContentType("text/plain");
		resp.getWriter().println("Hello, world");
	}
}

11. The last file is the appengine-web.xml file which is located in the WEB-INF/ directory. App Engine needs one additional configuration file to figure out how to deploy and run the application. This file includes the registered ID of your application (Eclipse creates this with an empty ID for you to fill in later), the version number of your application, and lists of files that ought to be treated as static files (such as images and CSS) and resource files (such as JSPs and other application data). In the tag, enter the name of your App Id that you had chosen while registering for the app previously.

<?xml version="1.0" encoding="utf-8"?>

<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">

<application>dhwaneetbhattjavaapp</application>

<version>1</version>

<system-properties>

<property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>

</system-properties>

</appengine-web-app> 

12. That’s about all the files we’ve covered. There are a couple of other files – configuration files in META-INF, logging.properties file and a favicon file that are unimportant at the moment. As I said Keep it Simple.

13. Now we are ready for a test run. Right click on the project from the Project Explorer, Run As -> Web Application, it will start the server. The default port is 8888. Open any web browser, type http://localhost:8888, you web application will run.

image

image

14. Before you Deploy it to Google App Engine – you’ll need to create an application on Google App Engine and Get the App Id. Scroll to the bottom of the blog post for a step by step guide.

Now that we have tested the code on our machine, it is time to deploy it go Google App Engine. Right click on the project, Google -> Deploy to App Engine, login with your credentials and on the next screen that comes, click on Deploy.

image

15. Your app will be deployed on the App Engine. Open any browser and enter the URL: http://dhwaneetbhattjavaapp.appspot.com and you will have the “Hello, world” app ready for the world to access.

– Dhwaneet Bhatt

 

*Here’s a step by step Tutorial to create an application on Google App Engine and getting the app id: [from Source]

Now, let’s sign up for a Google App Engine Account with a Google account you may have. Part of the process includes verification via a code sent to your mobile device – so be ready to provide your mobile number. And every Google Account gets to deploy 10 applications with a Google App Engine admin account.

Now, To sign up for Google APP engine. Go to: https://appengine.google.com/ and if you have a Google Apps account go to: https://appengine.google.com/a/<DOMAIN.COM&gt;

Now, sign in with your Google account and you would be asked to verify your account:

image

FAQ for this process is here: http://code.google.com/appengine/kb/sms.html

Now, once you successfully verify your account, you would see something like:

image

And click on create application and fill in the following details. For now, fill in the App ID and the App Title. Leave other options as default for now. And yes, please check the availability of your app id and this will also be your URL. The URL will take the form.appspot.com

image

Scroll down and you will find a “create application”. please click on it. You will also see a message: “Application registered successfully”.