PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, September 6, 2022

[FIXED] How to handle NaN values in Activeloop Hub datasets?

 September 06, 2022     data-science, dataset, hub, machine-learning, python     No comments   

Issue

I am working on converting a dataset into Activeloop Hub format. The dataset I am working with has NaN values however I am not sure how to handle these values with the Hub dataset format.

The NaN values are appearing in the labels of the dataset.

I know that NaN value represents the absence of that value in the database. Also, from some reading, I know that sklearn implemented algorithms can’t perform on datasets that have such values. I was thinking of erasing the rows that have the NaN values however I don't want to lose any information in the dataset.

Is there a best practice way to input NaN values in Activeloop Hub format?

I am using Hub version 2.3.1.


Solution

It sounds like there are no labels for the samples. If so, then upload an empty sample for those labels. Please note that appending an empty sample is not the same as skipping a sample.

If the NaN values are representing images, videos, etc that do not have labels, they should be uploaded as empty samples like this: ds.labels.append(np.zeros((0,))).



Answered By - Kristina from Activeloop
Answer Checked By - Pedro (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing