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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
10 views

Deploy ML model on java web server or on python web application

Newbie here and I only have experience in training machine learning models on Jupyter notebook along with test/validate the model accuracy. I would like to move on and learn how I can deploy machine ...
user avatar
0 votes
0 answers
16 views

How to compute the median of a Date type of column in Spark (JAVA)

I have extracted a column from a dataset that contains Date type of values: ...
user avatar
  • 1
0 votes
0 answers
18 views

How Can I Implement MOEA/D Algorithm in Java From Pseudocode?

I want to implement MOEA/D algorithm for a spesific population but I could not figure out how to write the java code from the pseudocode. My population size is 50 and the chromosomes shape is like ...
user avatar
1 vote
0 answers
34 views

Help Creating a XOR Neural Network in Java?

I have been trying to create a neural network in Java, but it doesn't quite work as intended. I am using a XOR test before I move on to more advanced problems, and it doesn't seem to be learning much....
user avatar
  • 11
2 votes
1 answer
225 views

Needed: Java library to calculate text readability/complexity

In principle the same as this but for Java (and ideally for multiple languages) (e.g. flesch reading ease, smog index, flesch kincaid grade, coleman liau index, automated readability index, dale chall ...
user avatar
  • 234
1 vote
1 answer
52 views

When to use deep learning for java as opposed to python

I have been asked to explore options to build deep learning based applications using java, so i happend to browse a website called dl4j (https://deeplearning4j.org) which has got implemantations of ...
user avatar
1 vote
1 answer
161 views

Android: NLP library for date recognition in string

I am currently working on an android app which should make appointments automatically by reading the incoming messages from your mobile phone. I've managed to create a service which monitors the ...
user avatar
1 vote
1 answer
303 views

call Python script from JavaEE

i create model using sklearn library and i want to run this model in JavaEE application i have been trying Jython, but it's impossible to import some important library like pandas and numpy, so how I ...
user avatar
  • 49
2 votes
5 answers
98 views

30 Years Of Excel Test Data

I am a CS intern at an industrial company that has 30 years of excel files that need to be analyzed. Looking at the data, only a fraction of the files need to be looked at and used. After those files ...
user avatar
2 votes
1 answer
121 views

Does PMML support probability calibration?

As I need to port a decision tree model from Python to Java, I would like to know whether PMML (Predictive Model Markup Language) supports probability calibration.
user avatar
  • 177
1 vote
1 answer
132 views

SGD vs SGD in mini batches

So I recently finished a mini batches algorithm for a library in building in java(artificial neural network lib). I then followed to train my network for an XOR problem in mini batches size of 2 or 3, ...
user avatar
2 votes
0 answers
450 views

How to resample non-equidistant timeseries data in java?

I have a lot of movement data from a sensor of an android phone. The sensor-data is not equally spaced. The first column is the timestamp, the second to fourth are the values. I have many of these ...
user avatar
  • 21
2 votes
3 answers
107 views

Tell me some things a data scientist/statistician needs to do that can't be done in R/Stata/SAS/SPSS [closed]

Why do I need to learn to program in python or Java and learn data structures? I can't think of a single thing statisticians/data scientists need to do that isn't built in as a package in R/stata.
user avatar
3 votes
2 answers
204 views

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 ...
user avatar
  • 131
11 votes
1 answer
4k views

Load keras model in Java

What are the requirements to load the trained model by Keras in Java? I checked that DeepLearning4J supports ...
user avatar
  • 283
5 votes
1 answer
11k views

How to sort two dimensional array in Java? [closed]

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: <...
user avatar
3 votes
2 answers
8k views

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 ...
user avatar
8 votes
1 answer
624 views

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 ...
user avatar
8 votes
2 answers
485 views

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 ...
user avatar
10 votes
2 answers
1k views

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: ...
user avatar
1 vote
1 answer
33 views

AI that maximizes the storage of rectangular parallelepipeds in a bigger parallelepiped

As you can see in the title, I'm trying to program an AI in Java that would help someone optimize his storage. The user has to enter the size of his storage space (a box, a room, a warehouse etc...) ...
user avatar
  • 13
1 vote
1 answer
118 views

How to migrate R decision tree to Java

I have trained a conditional inference decision tree in R using library party with function ctree and saved the model in an <...
user avatar
  • 177
1 vote
0 answers
88 views

How does Stanford CRF encode NER string features?

Most features created by the NERFeatureFactory are strings e.g. from usePrev, useNext, ...
user avatar
1 vote
0 answers
35 views

modeling binary classification data

I am new to Machine learning. While reading SparkMLLib java code, I found Binary_classification dataset. But I am not able to understand how this data is modeled and if I want to model same type of ...
user avatar
  • 111
1 vote
0 answers
33 views

Processed data cannot build Naive Bayes Classifier model

Having preprocessed data using weka supervised cfssubseteval forward and backward selection, the decision tree model builds and makes prediction well, but naive Bayes do not recognize the same Arff ...
user avatar
3 votes
1 answer
1k views

Running Tensorflow MobileNet from Java

I am trying to run Tensorflow for image recognition (classification) in Java (JSE not Android). I am using the code from here, and here. It works for Inceptionv3 models, and for models retrained from ...
user avatar
  • 181
1 vote
0 answers
43 views

is it possible to write machine learning algorithm in octave or python for application created in android [closed]

We planned to create an Android app which predicts the present student in class through face detection by camera in the class, my job is to write algorithm for face detection and the problem is I can ...
user avatar
1 vote
0 answers
371 views

Custom Writable Serialization in Hadoop [closed]

I have some questions about Custom Writable objects in Hadoop. First of all, the private instance variables of the Writable object have to be Writable? How does Hadoop handle ...
user avatar
  • 111
2 votes
2 answers
4k views

Can I have a neural network output values >100?

All the samples and articles i have seen are all having outputs of 1 or less. Is there a hidden reason why no one is using NN to produce higher value integers?? My situation is that I want NN to ...
user avatar
3 votes
2 answers
3k views

Is Java or Python a better choice for an application involving data intensive algorithms employing natural language processing?

I am a professional java developer with 9 years of experience. Never worked with Python but, I do not have any restraints learning it. Still I need clarity on a couple of aspects. I hope if anyone ...
user avatar
  • 41
0 votes
1 answer
794 views

tensorflow saved model to java [closed]

Hello data scientists (I'm not), I adapted a multi-class-text-classification-cnn from https://github.com/jiegzhan/multi-class-text-classification-cnn (thanks Jie Zhang) It works ! 90% accuracy ! Now ...
user avatar
2 votes
1 answer
4k views

is there any way to plot ROC curves from weka

i am using some algorithms from weka . i was willing to plot some algorithms' roc curve for comparison . Is it possible and how ?
user avatar
2 votes
0 answers
73 views

Is there any way to generate ROC curves from KEEL?

i am using the KEEL gui for my experiments . I want to plot a ROC curve of the results produced by KEEL rather than a just a roc score value .
user avatar
-1 votes
1 answer
2k views

Simple Weka classification example in Java gives inconsistent answers

I have the following simple weka code to use a simple decision tree, train it, and then make predictions. ...
user avatar
  • 1,851
4 votes
1 answer
3k views

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 ...
user avatar
  • 41
5 votes
2 answers
344 views

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 ...
user avatar
  • 161
0 votes
1 answer
243 views

Creating a neural network for predicting next vote in a series of votes

We are working on a project for creating music based on crowd sourcing. People vote for every note until the vote is closed, and then move on to the next vote until the canvas for the music is filled. ...
user avatar
5 votes
4 answers
4k views

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 ...
user avatar
2 votes
1 answer
189 views

Finding a proper method for an online driving style classification using acceleration data

I am using a smartphone in my car to gather acceleration data (both longitudinal and lateral). Now, I want to classify my data in real-time based on the acceleration force applied through accelerating,...
user avatar
  • 251
4 votes
3 answers
4k views

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. ...
user avatar
  • 1,879
2 votes
1 answer
1k views

anomaly detection alert system

I need to design and implement my 3rd year project which is a real-time alert system for parents to keep their kids safe with their smartphones. My data is time-based and unsupervised, which means I ...
user avatar
0 votes
1 answer
144 views

Why in deep learning or another AI technique python is used rather than other languages? [closed]

I want to know, why python? Instead of C#, Java, C\C++ and so on?
user avatar
  • 13
2 votes
2 answers
1k views

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 ...
user avatar
  • 21
0 votes
1 answer
106 views

How to migrate application which has backend running using DLL methods and front end in JAVA to Apache spark? [closed]

I have one Java Client which Reads 4 to 5 GBs of data and uses DLL file in order to process it and give O/P back to the JAVA client. Can anyone tell me if this can be implemented using Apache Spark ...
user avatar
  • 131
4 votes
0 answers
1k views

GATE with Python [closed]

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 ...
user avatar
  • 1,860
2 votes
0 answers
166 views

Debugging Neural Network for (Natural Language) Tagging

I've been coding a Neural Network for recognizing and tagging parts of speech in English (written in Java). The code itself has no 'errors' or apparent flaws. Nevertheless, it is not learning -- the ...
user avatar
2 votes
2 answers
1k views

Do I need an Artificial Intelligence API?

I'm wondering if programmers tend to use AI APIs. And if so, what are they like? And where can I find a nice one for Java?
user avatar
-2 votes
1 answer
4k views

getting error:-Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/io/Writable [closed]

I am trying to connect to hive from java but getting error. I searched in google but not got any helpfull solution. I have added all jars also. The code is:- ...
user avatar
2 votes
0 answers
502 views

How do I best parse ECOG scores in cancer clinical trial results in java?

I was informed of 5 java NLP libraries. Apache cTAKES™ MetaMap LexEVS (http://lexsrv3.nlm.nih.gov/LexSysGroup/Projects/lvg/current/web/download.html) Apache OpenNLP I also plan to parallelize an NLP ...
user avatar
  • 121
1 vote
0 answers
31 views

large database operation. check for relatedness between entities

I have one small list of entities, such as: Russia Vladimir Moscow Then I have a massive database of JSON indices. For each entry there are multiple alpha-...
user avatar