[scikit-learn] Creating dataset

Nicolas Hug niourf at gmail.com
Sun Nov 8 06:34:29 EST 2020


Mahmood,

 From what I understand your dataset is stored in a csv file. I'd 
recommend just reading that csv file with e.g. pandas 
(https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_csv.html), 
and then just use the dataframe as input to scikit-learn utilities (you 
may need to separate the features X from the target y). Then, if you 
need, you can wrap all that into a "load_my_dataset()" function.

HTH,

Nicolas

On 11/8/20 11:21 AM, Mahmood Naderan wrote:
> Hi,
> I have created an input file similar to iris data set. That is 
> something like this:
>
> 0.1,0.2,0.3,0.4,M1
> ...
>
> I want to know how I can create my own dataset similar to the 
> following lines?
>
> from sklearn.datasets import load_iris
> iris = load_iris()
>
>
> Regards,
> Mahmood
>
>
>
> _______________________________________________
> scikit-learn mailing list
> scikit-learn at python.org
> https://mail.python.org/mailman/listinfo/scikit-learn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/scikit-learn/attachments/20201108/e81370db/attachment.html>


More information about the scikit-learn mailing list