DataScience Judge


DS Judge environment

Supported languages

Language Version
Python 3 3.5.2
Python 2.7.6
R 4.0.3

Legend

Legend Explanation
NameError Name Error
KeyError Key Error
AttributeError Attribute Error
TLE Time Limit Error
ModuleNotFoundError Module Not Found Error
ImportError Import Error
FileNotFoundError File Not Found Error
ValueError Value Error
MLE Memory Limit Error

Which editor do I use to solve the problem?

Our platform provides the following editors, you can choose anyone of these as per your convenience:

  • Script
  • Jupyter notebook

What language does the Script editor support?

The Script editor supports the following languages:

  • Python 3.5.2
  • Python 2.7.6
  • RScript 3.4.0

Is there any restriction on the type of programming language that I can use in Jupyter notebook?

Yes, Jupyter notebook only supports Python 3.5.2.

Can I switch between editor and Jupyter Notebook?

No, you cannot switch between Script and Juypter notebook. Once you have selected, you cannot undo your selection.

How are data science problems evaluated?

Data Science problems are evaluated based on evaluation metrics that are defined in the problem statement.

How does an online judge determine whether the solution is correct?

Your code is automatically checked (without any human interference) using a checker file. Your submission file and the result file are imported in this checker file. Then, your predictions are evaluated (based on evaluation metric) against the correct predictions. Finally, a score is generated automatically.

What are train and test data?

In a dataset, a train data set is used to build a model whereas a test set is used to validate the created model. Data points in the training set are excluded from the test data set.

Which libraries and packages can I use for building my models?

HackerEarth’s Data Science platform supports the packages and versions that are listed here.

How should I access the test and train datasets?

To access files in Python 3, run the following command:

import pandas as pd
train = pd.read_csv('dataset/train.csv')
test = pd.read_csv('dataset/test.csv')

To access files in R, run the following command:

library(readr)
train <- read_csv("dataset/train.csv")
test <- read_csv("dataset/test.csv")

How should I make my submission?

It is mandatory to write your submission (data frame) in the submission.csv file. This submission data frame must contain the predictions that are specified in the question.

To submit your file in Python 3, run the following command:

submission.to_csv('submission.csv',index = False)

To submit your file in R, run the following command:

write.table(submission,file = "submission.csv",row.names = FALSE,sep=",")

Can I download the dataset?

Dataset can be downloaded by clicking Click here to download the data set.

What is the difference between COMPILE & TEST and SUBMIT?

COMPILE & TEST is used to evaluate your submission against the public test case whereas SUBMIT is used to evaluate your submission against the hidden test case.

What is the difference between public testcase and hidden testcase?

  • A hidden testcase is a dataset that is not accessible to the candidates and the model is tested based on the code that you have written in the editor.

  • A public testcase is a part of the hidden testcase which is accessible to the candidates and can be downloaded by clicking Click here to download the data set.

What should the format of my final submission file be?

You are required to submit your predictions in a ‘.csv’ file named ‘submission.csv’.

Where can I view my submissions?

You can view your submissions in the All Submissions section in the test interface.

Do I have Write permission to the current working directory?

No, you do not have Write permission to the current working directory. You have Read-only permission.

Can I view the solutions of other candidates?

No, you cannot view the solutions of other candidates. Similarly, other candidates cannot view your solution either.

What is the significance of the time limit?

The evaluation of your submission file during COMPILE & TEST and SUBMIT is limited to a specific amount of time. If your code exceeds the specified limit, then you will see the time limit exceeded (TLE) error on the screen. To fix this, you must optimize your code.

How does the time limit work?

Your code must read, process, and output the result within the specified time limit.

TLE means my code is correct but slow, right?

No, Time Limit Exceeded or TLE means that your solution exceeded the amount of time which was determined for the problem or for that particular test case. Your solution never finished running in time, it was stopped in between.

What is the significance of the memory limit?

The evaluation of your submission file during COMPILE & TEST and SUBMIT is limited to a specific amount of memory. If your code exceeds the specified limit, then you will see the memory limit exceeded (MLE) error on the screen. To fix this, you must optimize your code.

Dos and don’ts in the Comment section

While posting comments in the Comment section in the problem, you must keep the following things in mind:

  • Do not spam. For example, do not repeat the same comment 5 times. It does not guarantee that you will receive a response.
  • Do not post any source code as it will be unfair to other candidates.
  • Admins/moderators are allowed to delete comments.

If you have any queries that are not answered here or your answers are not getting evaluated, send us an email at support@hackerearth.com.

Notifications
View All Notifications

?