Questions tagged [java]

Java (not to be confused with JavaScript) is a general-purpose object-oriented programming language designed to be used in conjunction with the Java Virtual Machine (JVM). "Java platform" is the name for a computing system that has installed tools for developing and running Java programs. Use this tag for questions referring to Java programming language or Java platform tools.

54 questions
12
votes
1 answer

Load keras model in Java

What are the requirements to load the trained model by Keras in Java? I checked that DeepLearning4J supports Keras models, network architecture and weights can be easily loaded. The only cons are probably that we need to use ND4J backend or it does…
wpazio
  • 293
  • 4
  • 8
10
votes
2 answers

How do i calculate prediction probability of a class in Java Weka Api?

I am developing a prediction model using Java Weka api. I can predict class for the new instance using the following code: double predictClass = classifer.classifyInstance(instance) However, I need class probability instead of class value. Thanks…
Howa Begum
  • 348
  • 1
  • 6
8
votes
1 answer

How to use SMOTE in Java Weka API?

I am trying to build classification model using Java Weka API. My training dataset have class imbalance problems. For this reason, I want to use SMOTE to reduce class imbalance problem. But, I do not know how to use it in Java Weka API.
Sagor Ali
  • 83
  • 3
8
votes
2 answers

How do I use a custom stopwords filter in the Java Weka API?

I am using the Java Weka API to build a classification model. I can use the builtin stopwords filter. However, I need to use a custom filter for my problem. I do not know how to use a custom stopwords filter in the Java Weka API.
Radia Karim
  • 158
  • 4
5
votes
1 answer

How to sort two dimensional array in Java?

I have a two dimensional double array. I need to sort my based column 1 in descending order. How can I sort my two dimensional array in descending order. Sample data and code are the following: package mypro.com; public class SortDoubleArrary { …
Tajrian Mollick
  • 53
  • 1
  • 1
  • 4
5
votes
1 answer

Using the Datumbox Machine Learning Framework for website classification - guidelines?

A short while ago, I came across this ML framework that has implemented several different algorithms ready for use. The site also provides a handy API that you can access with an API key. I have need of the framework to solve a website…
user991710
  • 71
  • 2
  • 7
5
votes
1 answer

Building a Tic Tac Toe game which learns by itself

Let's assume we have a huge database gathered which contains winning sequences, which each player played and won. (Both the players are programmed, to obtain random numbers and attempt playing the game). What would be the best way to use these…
Nichols
  • 51
  • 1
  • 2
5
votes
2 answers

Changing default values of ANNIE resources in GATE from Java code

In GATE, default values for ANNIE are set during initialization, but sometimes based on requirements they have to be changed. My Requirement : I want to extract English sentences without considering the "nextline character" but considering "full…
Rana
  • 161
  • 3
5
votes
4 answers

What algorithm is used to extract keywords from unstructured texts?

I'm using StanfordNLP (java pakage) for twitter sentiment analysis. I want to extract keywords from the tweets, classify the keywords as positive, negative, or neutral, and use those counts to classify the polarity of the tweet. How can this be…
Dilip Bobby
  • 389
  • 1
  • 3
  • 14
4
votes
0 answers

GATE with Python

I am working on named entity recognition project and find GATE very useful. But I couldn't find a Python connector for GATE yet. Is it possible or is there a way to integrate GATE work flows into Python ? Or how can I write JAPE rules for extracting…
Sreejithc321
  • 1,940
  • 3
  • 20
  • 34
4
votes
2 answers

Lightweight execution of Spark MLLib models

I have some training data which I am using to build a Spark MLLib model which is in a Hive database. I am using simple linear regression models and the PySpark API. I have a code set up to train this model every day to get the most up-to-date model.…
Tom
  • 141
  • 5
4
votes
1 answer

How can I create a custom tag in JPMML?

I'm trying to create a logistic regression model in jpmml, then write the PMML to a file. The problem I'm having, is that I can't find any way to create a custom tag, such as "shortForm" and "longForm" in the following example:
4
votes
3 answers

Scala vs Java if you're NOT going to use Spark?

I'm facing some indecision when choosing how to allocate my scarce learning time for the next few months between Scala and Java. I would like help objectively understanding the practical tradeoffs. The reason I am interested in Java is that I think…
Hack-R
  • 1,949
  • 1
  • 21
  • 34
3
votes
2 answers

How to rank documents using Bag of words approach

I want to cluster the documents I get for Google scholar search using the Bag of words model. I thought of using Java as the language. Assume for the keyword k, Google scholar gives me 50 results. If I have a predefined set of words w1, w2, w3...…
dave
  • 31
  • 2
3
votes
2 answers

How to calculate TPR and FPR for different threshold values for classification model?

I have built a classification model to predict binary class. I can calculate precision, recall, and F1-Score. Now, I want to generate ROC for better understanding the classification performance of my classification model. I do not know how to…
Bador Uddin
  • 41
  • 1
  • 1
  • 4
1
2 3 4