Dear Manoj, Thanks for your answer but when i execute the code below i get this error : "*ValueError: could not convert string to float:*"
How can i solve this error. Regards. --------------------------------------------- from sklearn.cluster import Birch from io import StringIO import numpy as np X=np.loadtxt(open("C:\features.dat", "rb"), delimiter="\t") brc = Birch(branching_factor=50, n_clusters=None, threshold=0.5,compute_labels=True) brc.fit(X) Birch(branching_factor=50, compute_labels=True, copy=True, n_clusters=None,threshold=0.5) brc.predict(X) print(brc.predict(X)) On Thu, Apr 6, 2017 at 4:29 PM, Manoj Kumar <manojkumarsivaraj...@gmail.com> wrote: > Hi, See: https://docs.scipy.org/doc/numpy/reference/generated/ > numpy.loadtxt.html for one way. > > On Thu, Apr 6, 2017 at 8:27 AM, Sema Atasever <s.atase...@gmail.com> > wrote: > >> Dear scikit-learn members, >> >> I have a dat file where the columns represent the features and the rows >> represent the protein. (you can see the dat file in the attachment) >> >> >> i want to use *sklearn.cluster.Birch* with this text file values as X >> which is the >> >> Parameters: >> X : {array-like, sparse matrix} >> >> How can i transform this text file values into X : {array-like, sparse >> matrix}. >> >> I would appreciate if you could advise on some methods. >> Thanks. >> >> _______________________________________________ >> scikit-learn mailing list >> scikit-learn@python.org >> https://mail.python.org/mailman/listinfo/scikit-learn >> >> > > > -- > Manoj, > http://github.com/MechCoder > > _______________________________________________ > scikit-learn mailing list > scikit-learn@python.org > https://mail.python.org/mailman/listinfo/scikit-learn > >
_______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn