J48 decision tree - data-mining

I've been searching the web on how to generate J48 decision trees but so far after almost a couple days I haven't found any result about how to generate a J48 decision without Weka, I mean manually by hand. The reason why I wanna do this is because I need to evaluate my data in an assignment.
I would appreciate any information about the j48 algorithm.

The J48 classifier implements the C4.5 algorithm. You should be able to use either a description of that or, if you need to be exactly like what Weka does, you can step through the code itself.

you can use weka as well for developing a simple code, what you have to do, download the jar file of weka, and study the API of weka which is provided by weka as well. and develop your own program to use the algorithm and implement it on your data

Related

Is there a better way to deal with unbalanced data than the preprocessing filter SMOTE?

I am currently working with WEKA and I would appreciate yor advice regarding preprocessing filters when it comes to unbalanced attribute data. I was previously recommended to use the SMOTE filter in order to deal with the problem. I was wondering if anyone could propose any alternative solution. The classifier I am mainly using is MultilayerPerceptron and the SMOTE filter seems to be working decently, but I would like to know if there is another possible method.
Cost-sensitive classification is another approach. See FAQ I have unbalanced data now what on the Weka wiki.

How I can make a prediction in data mining?

I have an Excel file containing the following data.
I want to apply it on Weka by k-nearest neighbor classifier.
How I can make a prediction of the new instance?
How can I set the parameters of this instance to obtain prediction about it?
I don't think you have enough data to work with here. Your model will be wildly inaccurate. If you are starting with machine learning, I would recommend the Iris data set to start with. I started with machine learning here.
If you want to start with Weka, I would use a dataset from researchers, like the MNIST database of handwritten digits which can be found here, and a guide for it in python here. On the same site, there is a tutorial for the Weka gui, if you look hard enough.

Specific topics on Tensorflow for CNN

I have a mini project for my new course in Tensorflow for this semester with random topics. Since I have some background on Convolution Neuron Network, I intend to use it for my project. My computer can only run CPU version of TensorFlow.
However, as a new bee, I realize that there are a lot of topics such that MNIST, CIFAR-10, etc, thus I don't know which suitable topic I should pick out from them. I only have two weeks left. It would be great if the topic is not too complicated but too not easy for study because it matchs my intermediate level.
In your experience, could you give me some advice about the specific topic I should do for my project?
Moreover, it would be better if in this topic I can provide my own data to test my training, because my professor said that it is a plus point to get A grade in my project.
Thanks in advance,
I think that to answer this question you need to properly evaluate the marking criteria for your project. However, I can give you a brief overview of what you've just mentioned.
MNIST: MNIST is a Optical Character Recognition task for individual numbers 0-9 in images size 28px square. This is considered the "Hello World" of CNNs. It's pretty basic and might be too simplistic for your requirements. Hard to gauge without more information. Nonetheless, this will run pretty quickly with CPU Tensorflow and the online tutorial is pretty good.
CIFAR-10: CIFAR is a much bigger dataset of objects and vehicles. The image sizes are 32px square so individual image processing isn't too bad. But the dataset is very large and your CPU might struggle with it. It takes a long time to train. You could try training on a reduced dataset but I don't know how that would go. Again, depends on your course requirements.
Flowers-Poets: There is the Tensorflow for Poets re-training example which might not be suitable for your course, you could use the flowers dataset to build your own model.
Build-your-own-model: You could use tf.Layers to build your own network and experiment with it. tf.Layers is pretty easy to use. Alternatively you could look at the new Estimators API that will automate a lot of the training processes for you. There are a number of tutorials (of varying quality) on the Tensorflow website.
I hope that helps give you a run-down of what's out there. Other datasets to look at are PASCAL VOC and imageNet (however they are huge!). Models to look at experimenting with may include VGG-16 and AlexNet.

machine learning for any cancer diagnosis on image dataset with python

Blockquote
i am working on this project asssigned by university as final project. But the issue is i am not getting any help from the internet so i thought may be asking here can solve issue. i had read many articles but they had no code or guidance and i am confused what to do. Basically it is an image processing work with machine learning. Data set can be found easily but issue is python python learning algorithm and code
Blockquote
I presume if it's your final project you have to create the program yourself rather than ripping it straight from the internet. If you want a good starting point which you can customise Tensor Flow from Google is very good. You'll want to understand how it works (i.e. how machine learning works) but as a first step there's a good example of image processing on the website in the form of number recognition (which is also the "Hello World" of machine learning).
https://www.tensorflow.org/get_started/mnist/beginners
This also provides a good intro to machine learning with neural nets: https://www.youtube.com/watch?v=uXt8qF2Zzfo
One note on Tensor Flow, you'll probably have to use Python 3.5+ as in my experience it can be difficult getting it on 2.7.
First of all I need to know what type of data are you using because depending on your data, if it is a MRI or PET scan or CT, there could be different suggestion for using machine learning in python for detection.
However, I suppose your main dataset consist of MR images, I am attaching an article which I found it a great overview of different methods>
This project compares four different machine learning algorithms: Decision Tree, Majority, Nearest Neighbors, and Best Z-Score (an algorithm of my own design that is a slight variant of the Na¨ıve Bayes algorithm)
https://users.soe.ucsc.edu/~karplus/abe/Science_Fair_2012_report.pdf
Here, breast cancer and colorectal cancer have been considered and the algorithms that performed best (Best Z-Score and Nearest Neighbors) used all features in classifying a sample. Decision Tree used only 13 features for classifying a sample and gave mediocre results. Majority did not look at any features and did worst. All algorithms except Decision Tree were fast to train and test. Decision Tree was slow, because it had to look at each feature in turn, calculating the information gain of every possible choice of cutpoint.
My Solution:-
Lung Image Database Consortium provides open access dataset for Lung Cancer Images.
Download it then apply any machine learning algorithm to classify images having tumor cells or not.
I attached a link for reference paper. They applied neural network to classify the images.
For coding part, use python "OpenCV" for image pre-processing and segmentation.
When it comes for classification part, use any machine learning libraries (tensorflow, keras, torch, scikit-learn... much more) as you are compatible to work with and perform classification using any better outperforming algorithms as you wish.
That's it..
Link for Reference Journal

Can we used a classifier from rapid miner in weka?

i am working on text classification in weka. I want to use a classifier from rapidminer. I just saw the "weka.jar" in rapidminer lib directory which may mean that we can use some cross functionality.
Can we use a classifier or functionality from rapid miner whereas some other functionalities from weka ???
I'm afraid you can't!!
Weka is not covering that functionality.