Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What result i should return? [duplicate]

Tags:

People also ask

What helps to return results without duplicates?

Discussion: If you want the query to return only unique rows, use the keyword DISTINCT after SELECT . DISTINCT can be used to fetch unique rows from one or more columns.

Should we drop duplicates?

You should probably remove them. Duplicates are an extreme case of nonrandom sampling, and they bias your fitted model. Including them will essentially lead to the model overfitting this subset of points.

Why is it important to remove duplicate data?

Datasets that contain duplicates may contaminate the training data with the test data or vice versa. Entries with missing values will lead models to misunderstand features, and outliers will undermine the training process – leading your model to “learn” patterns that do not exist in reality.


I write simple library wich returns List of names.

But,what i should returns if i can not find anything?

return new List<String>();

or

return null;

example:

var resultColl=FindNames(...);

This code can be used from another components and i do not want to corrupted it. If i return null- i think it is right way to check it. But, may be i should return empty list?

Thank you.