[scikit-learn] Using KernelDensity for spatial clustering

2022-01-25 Thread Mahmood
works. For example, if I change the linespace boundries, the result changes. What does the linespace do exactly? [1] https://scikit-learn.org/stable/auto_examples/neighbors/plot_kde_1d.html Regards,Mahmood  ___ scikit-learn mailing list scikit-learn@python

[scikit-learn] Creating dataset

2020-11-08 Thread Mahmood Naderan
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

Re: [scikit-learn] Creating dataset

2020-11-08 Thread Mahmood Naderan
,"gray","lime"] df = DataFrame( data=np.c_[data_file["data"], data_file["target"]], columns=data_file["feature_names"] + ["target"]) But I get this error: Traceback (most recent call last): File "/home/mahmood/.local/lib/python3

Re: [scikit-learn] Creating dataset

2020-11-08 Thread Mahmood Naderan
>You need to understand what the different statements are doing; just >as you need to understand what processing you apply on your data >(whether it's preprocessing or learning) to properly use any machine >learning tool. I know, but the problem is that the csv file of the iris doesn't have such

[scikit-learn] Drawing contours in KMeans

2020-12-09 Thread Mahmood Naderan
r_centers_[:, 1], s=100, c='red') plt.show() I would like to know if it is possible to draw contours over the clusters. Is there any way for that? Please let me know if there is a function or option in KMeans. Regards, Mahmood ___ scikit-learn

Re: [scikit-learn] Drawing contours in KMeans

2020-12-09 Thread Mahmood Naderan
I mean a circle/contour to group the points in a cluster for better representation. For example, if there are 6 six clusters, it will be more meaningful to group large data points in a circle or contour. Regards, Mahmood On Wed, Dec 9, 2020 at 11:49 AM Andrew Howe wrote: > Conto

Re: [scikit-learn] Drawing contours in KMeans

2020-12-09 Thread Mahmood Naderan
>Mebbe principal components analysis would suggest an >ellipsoid containing "most" of the points in a "cloud". Sorry I didn't understand. Can you explain more? Regards, Mahmood On Wed, Dec 9, 2020 at 8:55 PM The Helmbolds via scikit-learn < scikit-learn@p

[scikit-learn] Using text labels in dendrogram

2020-12-14 Thread Mahmood Naderan
e, the x-axis labels are 2 1 3. I want to assign a text for each point. Then no matter where the point goes, I can see the text that I have assigned. For example, I want to see PDD, XDD, BDD. How can I create a list of text labels and bind that to

Re: [scikit-learn] Using text labels in dendrogram

2020-12-14 Thread Mahmood Naderan
OK. As I checked the documents, I have to fix the labelList line to the string that I want. Regards, Mahmood On Mon, Dec 14, 2020 at 5:31 PM Mahmood Naderan wrote: > Hi > I use the following code to create a dendrogram from a set of x-y points > > import matplotlib.pyplot as

[scikit-learn] Comparing Scikit and Xlstat for PCA analysis

2020-12-25 Thread Mahmood Naderan
ich I write is available at https://pastebin.com/ghJQ6L4C Any idea? Regards, Mahmood ___ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn

Re: [scikit-learn] Comparing Scikit and Xlstat for PCA analysis

2020-12-28 Thread Mahmood Naderan
Hi Guillaume, Thanks for the reply. May I know if I can choose different solvers in the scikit package or not. Regards, Mahmood On Mon, Dec 28, 2020 at 4:30 PM Guillaume Lemaître wrote: > n_components set to 'auto' is a strategy that will pick the number of > components. Th

[scikit-learn] Finding the PC that captures a specific variable

2021-01-22 Thread Mahmood Naderan
work with the PCs, therefore, I may miss the point that although a variable is weak in PC1-PC2 plot, it may be strong in PC4-PC5 plot. Any comment on that? Regards, Mahmood ___ scikit-learn mailing list scikit-learn@python.org https://mail.python.org

Re: [scikit-learn] Finding the PC that captures a specific variable

2021-01-22 Thread Mahmood Naderan
ariable is better shown on PC1-PC2 plane (0.49137412,0.46511098). However, loadings[1] which is the second variable is better shown on PC0-PC2 plane (-0.94878375,0.29718078). Is this understanding correct? I don't understand what explained_variance_ratio_ is trying to say here. Regards, Mahmood On Fri

Re: [scikit-learn] Finding the PC that captures a specific variable

2021-01-24 Thread Mahmood Naderan
Hi Olivier, Thanks for the suggestion. The package seems to be handy. I will try that. Regards, Mahmood On Sun, Jan 24, 2021 at 12:55 PM Oliver Tomic via scikit-learn wrote: > > Hi Mahmood, > > the information you need is given by the individual explained variance for >

[scikit-learn] Looking for sklearn.neighbors.kde

2022-01-24 Thread Mahmood Naderan
ors.kde' Any idea how to fix that? Regards, Mahmood ___ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn

Re: [scikit-learn] Looking for sklearn.neighbors.kde

2022-01-24 Thread Mahmood Naderan
Thanks for the quick answer. Regards, Mahmood On Mon, Jan 24, 2022 at 10:48 AM Guillaume Lemaître wrote: > Looking at the documentation: > https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.KernelDensity.html > > The public import is: `from sklearn.neig

[scikit-learn] Using KernelDensity for spatial clustering

2022-01-25 Thread Mahmood Naderan
the way it works. For example, if I change the linespace boundries, the result changes. What does the linespace do exactly? [1] https://scikit-learn.org/stable/auto_examples/neighbors/plot_kde_1d.html Regards, Mahmood ___ scikit-learn mailing list sc

[scikit-learn] Does KernelDensity works for a vector with two elements?

2022-03-01 Thread Mahmood Naderan
two numbers. Is there any restriction or note about using KernelDensity? Regards, Mahmood ___ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn

[scikit-learn] View full sized k_means.labels_

2022-05-13 Thread Mahmood Naderan
full length vector? Regards, Mahmood ___ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn