Maybe what you are looking for is dimensionality reduction, which will
give you a lower-dimensional view of the data.
That way you can get a 2d representation of your data which you can
plot. You can then color the samples according to the classes or
decision values.
You can start with PCA from the decomposition module or try things in
the manifold module.
Examples:
http://scikit-learn.org/stable/auto_examples/decomposition/plot_pca_iris.html#example-decomposition-plot-pca-iris-py
http://scikit-learn.org/dev/auto_examples/manifold/plot_lle_digits.html
You should take the results with a good grain of salt, though, as they
might not reflect what is really happening in 18 dimensions.
On 11/20/2014 10:33 AM, John Doe wrote:
Thanks for your response Andy.
Is there another application that might help me plot this information
on a graph? Really what I am looking for is perhaps to assign a
numerical representation for each sample based off of the 18
attributes and then plot that numerical representation on a graph to
see which samples are similar to other samples. My math is not strong
at all so I am not even sure if that is possible or not.
On Wed, Nov 19, 2014 at 12:20 PM, Andy <[email protected]
<mailto:[email protected]>> wrote:
Hi.
The example is meant to illustrate the prediction boundaries on a
2d example.
You can not plot the decision boundaries like that for higher
dimensions.
Just predicting should work fine, though.
Hth,
Andy
On 11/19/2014 11:56 AM, John Doe wrote:
I have just started using scikit and I have been following the
example code at
http://scikit-learn.org/stable/auto_examples/neighbors/plot_classification.html
I am having some trouble with my data, here is the code that I
have been using to import my data from csv files that I dump out
of a database.
query_csv_file = 'query_result.csv'
X = np.loadtxt(fname = query_csv_file, delimiter = ',', skiprows = 1)
id_csv_file = 'query_id.csv'
y = np.loadtxt(fname = id_csv_file, delimiter = ‘,', skiprows = 1)
query_result.csv looks like the following:
attr1,attr2,attr3,attr4,attr5,attr6,attr7,attr8,attr9,attr10,attr11,attr12,attr13,attr14,attr15,attr16,attr17,attr18
0,797.3700774,0,330.8733288
<tel:330.8733288>,155.4552568,0,6177.289831,0,355.3611942,82.92122107,0,49.93354722,1592.292597,435.3831843,721.4373622,73.07706747,194.5707382,0
query_id.csv looks like the following:
id
1
If I try to run the code in the example using this data I get the
following error:
ValueError: Incompatible dimension for X and Y matrices:
X.shape[1] == 2 while Y.shape[1] == 18
If I add the following line of code it works but then it is not
using all 18 attributes:
X = X[:, :2]
Any help or guidance would be appreciated! Thanks in advance!
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
[email protected]
<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and
Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration
& more
Get technology previously reserved for billion-dollar
corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
[email protected]
<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general