neptune-r
R interface for Neptune, machine learning experiment tracking tool.
It lets you easily track:
- hyperparameters
- metrics
- performance charts and images
- model binaries
Everything is logged to Neptune and can be:
- organized
- visualized
- shared
- accessed
Keep the knowledge in one place, organized and ready to be shared with anyone.
Getting started
Register
Go to https://neptune.ai/ and sign up.
It is completely free for individuals and academic teams, and you can invite others to join your team!
Get your API token
In order to start working with Neptune you need to get the API token first.
To do that, click on the Get API Token
button on the top left.
Create your first project
Click on Projects
and the New project
. Choose a name for it and whether you want it public or private.
Invite others
Go to your project, click Settings
and send invites!
Start tracking your work
Neptune let's you track any information important to your experimentation process.
Install R package
Simply run:
install.packages('neptune')
and
install_neptune()
Set Neptune token
set_neptune_token(token = 'eyJhcGlfYWRkcmVzcyI6Imh0dHBzOi8vdWkubmVwdHVuZS5haSIsImFwaV9rZXkiOiJiNzA2YmM4Zi03NmY5LTRjMmUtOTM5ZC00YmEwMzZmOTMyZTQifQ==')
Initialize Neptune
Toward the top of your script insert the following snippet.
init_neptune(project_name = "common-r/quickstarts")
Create and stop the experiment
You can treat every piece of work that you want to record as an experiment. Just create an experiment:
create_experiment(name = 'my first experiment')
Do whatever you want and record it here! Stop the experiment.
stop_experiment()
Track hyperparameters
Making sure that all your hyperparameters are recorded is very important.
With Neptune, you can do that easily by passing params
dictionary when creating the experiment.
create_experiment(name = 'my-first-experiment',
params = list(metric='Accuracy', model='rf', 'cvFolds'=2),
)
Track metrics
It is super easy. Just log your metric to Neptune.
log_metric('accuracy', 0.92)
Track result diagnostics
You can even log images to Neptune. Just save to the
log_image(name = 'performance charts', filename = 'roc_auc.png')
log_image(name = 'performance charts', filename = 'confusion_matrix.png')
Track artifacts
You can save model weights and any other artifact that you created during your experiment.
log_artifact(filename = 'model.Rdata')
Check the example project here
Getting help
If you get stuck, don't worry we are here to help. The best order of communication is: