O'Reilly logo

Java Deep Learning Projects by Md. Rezaul Karim

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Submission file generation

For this, I wrote a class called ResultFileGenerator.java. According to the Kaggle web page, we will have to write the result in the business_ids, labels format. Here, business_id is the ID for the corresponding business, and the label is the multi-label prediction. Let's see how easily we can do that.

First, we aggregate image predictions to business scores for each model. Then, we transform the preceding data structure into a list for each bizID containing a Tuple (bizid, List[Double]) where the Vector[Double] is the vector of probabilities:

public static List<Pair<String, List<Double>>> SubmitObj(FeatureAndDataAligner alignedData,                                               String modelPath,                                               String model0,                                               String model1,                                               String model2,                                               String model3,

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required