({{, (RefLink[FeatureSpacePlot3D, paclet:ref/FeatureSpacePlot3D])[{(Subscript[example, 1]),(Subscript[example, 2]),…}] 
plots features extracted from the (Subscript[example, i]) as a scatter 3D plot.}})

OpenersNotesSection(Spacer1)Details and Options

(RefLink[FeatureSpacePlot3D, paclet:ref/FeatureSpacePlot3D]) can be used on many types of data, including numerical, textual, sounds and images, and combinations of these.

Each (Subscript[example, i]) can be a single data element, a list of data elements, an association of data elements or a (RefLink[Dataset, paclet:ref/Dataset]) object.

The following wrappers w can be used for the (Subscript[example, i]):

Wrappers w can be applied at multiple levels:

(RefLink[Callout, paclet:ref/Callout]), (RefLink[Labeled, paclet:ref/Labeled]) and (RefLink[Placed, paclet:ref/Placed]) can use the following positions pos:

(RefLink[FeatureSpacePlot3D, paclet:ref/FeatureSpacePlot3D]) has the same options as (RefLink[Graphics3D, paclet:ref/Graphics3D]), with the following additions and changes:

(RefLink[LabelingFunction, paclet:ref/LabelingFunction])->f specifies that each point should have a label given by f[value,index,lbls], where value is the value associated with the point, index is its position in the data and lbls is the list of relevant labels.

Possible settings for (RefLink[Method, paclet:ref/Method]) include:

OpenersPrimaryExamplesSection(Spacer1)Examples  (50)

OpenersExampleSection0(Spacer1)Basic Examples  (5)

Plot the features of the shapes of alphabets:

imgs=Rasterize[#,Background->None]&/@Alphabet[]

FeatureSpacePlot3D[imgs]

Plot the features extracted from images:

FeatureSpacePlot3D[{,,,,,}]

Change the size of images used as labels:

FeatureSpacePlot3D[{,, ,,,},LabelingSize->60]

Use callout to place labels:

FeatureSpacePlot3D[{,, ,,,},LabelingFunction->Callout]

Extract features from a simple dataset:

FeatureSpacePlot3D[{{1.4,"A"},{1.5,"A"},{2.3,"B"},{5.4,"B"}}]

OpenersExampleSection1(Spacer1)Scope  (20)

OpenersExampleSubsection0(Spacer1)Data  (4)

Simple examples such as images and text are shown directly in the plot:

FeatureSpacePlot3D[EntityValue[(EntityClass["Europe", EntityClass["Country","Europe"], "EntityClass[\"Country\", \"Europe\"]", "countries"]),"FlagImage"]]

Extract features on a mixed-type dataset:

FeatureSpacePlot3D[{{"the cat is grey",},{"my cat is fast",},{"this dog is scary",},{"the big dog",}},LabelingFunction->Tooltip]

Extract features from a dataset that contains missing values:

FeatureSpacePlot3D[{{1.4,Missing[],"A"},{1.5,50.2,"A"},{Missing[],42.3,"B"},{5.4,61.7,"B"}},LabelingFunction->(Placed[#,Center]&),PlotStyle->None]

Extract features from a dataset formatted as a list of associations:

FeatureSpacePlot3D[{<|"age"->32,"height"->160, "gender"-> "female"|>,
<|"height"->183,"age"->41,"gender"-> "female"|>,
<|"height"->123,"age"->30,"gender"-> "female"|>,
<|"height"->175,"age"->21,"gender"-> "male"|>,
<|"height"->150,"age"->11,"gender"-> "male"|>,
<|"age"->52,"height"->164,"gender"-> "female"|>},LabelingFunction->Tooltip]

OpenersExampleSubsection1(Spacer1)Wrappers  (9)

Use wrappers on individual examples:

FeatureSpacePlot3D[{{15,,"debit"},{68,,"paneling"},Style[{38,,"uremia"},Red],{98,,"broccoli"},{74,,"bonehead"}}]

Use wrappers on the entire collection of examples:

FeatureSpacePlot3D[Style[{{15,,"debit"},{68,,"paneling"},{38,,"uremia"},{98,,"broccoli"},{74,,"bonehead"}},Blue]]

Wrappers can be nested:

FeatureSpacePlot3D[Style[{{15,,"debit"},{68,,"paneling"},Style[{38,,"uremia"},Red],{98,,"broccoli"},{74,,"bonehead"}},Directive[Black,PointSize[0.05]]]]

Use the value of each point as a tooltip:

FeatureSpacePlot3D[Tooltip[{{15,,"debit"},{68,,"paneling"},Style[{38,,"uremia"},Red],{98,,"broccoli"},{74,,"bonehead"}}]]

Label points with automatically positioned text:

FeatureSpacePlot3D[Table[Labeled[{RandomInteger[100],RandomColor[],RandomWord[]},i],{i,15}]]

Use callouts to label points:

FeatureSpacePlot3D[Table[Callout[{RandomInteger[100],RandomColor[],RandomWord[]},i],{i,15}]]

Add tooltips to each point:

FeatureSpacePlot3D[Table[Tooltip[country[{"Population","Area","FlagImage"}],country],{country,EntityList[LinguisticAssistant]}]]

Use (RefLink[PopupWindow, paclet:ref/PopupWindow]) to provide additional drilldown information:

FeatureSpacePlot3D[Table[PopupWindow[country[{"Population","Area","FlagImage"}],country["FlagImage"]],{country,EntityList[(EntityClass["Europe", EntityClass["Country","Europe"], "EntityClass[\"Country\", \"Europe\"]", "countries"])]}]]

(RefLink[Button, paclet:ref/Button]) can be used to trigger any action:

data=EntityValue[(EntityClass["Europe", EntityClass["Country","Europe"], "EntityClass[\"Country\", \"Europe\"]", "countries"]),{"FlagImage","Name","Population","Area"},"PropertyAssociation"];

FeatureSpacePlot3D[Map[Tooltip[Button[{#Population,#Area},Speak[#Name]],#FlagImage]&,data]]

OpenersExampleSubsection2(Spacer1)Labeling  (4)

Simple examples such as images and text are shown directly in the plot:

FeatureSpacePlot3D[EntityValue[(EntityClass["Europe", EntityClass["Country","Europe"], "EntityClass[\"Country\", \"Europe\"]", "countries"]),"FlagImage"]]

Use (RefLink[Callout, paclet:ref/Callout]):

FeatureSpacePlot3D[EntityValue[(EntityClass["Europe", EntityClass["Country","Europe"], "EntityClass[\"Country\", \"Europe\"]", "countries"]),"FlagImage"],LabelingFunction->Callout,ImageSize->225]

Use the examples as tooltips:

FeatureSpacePlot3D[EntityValue[(EntityClass["Europe", EntityClass["Country","Europe"], "EntityClass[\"Country\", \"Europe\"]", "countries"]),"FlagImage"],LabelingFunction->Tooltip]

Use the keys in data as tooltips:

data=EntityValue[LinguisticAssistant,{"Name","Population","Area","FlagImage"},"Association"];

FeatureSpacePlot3D[data,LabelingFunction->Tooltip]

OpenersExampleSubsection3(Spacer1)Presentation  (3)

Use a gray background for the plot:

FeatureSpacePlot3D[EntityValue[(EntityClass["Europe", EntityClass["Country","Europe"], "EntityClass[\"Country\", \"Europe\"]", "countries"]),"FlagImage"],Background->Gray]

Use large purple points:

FeatureSpacePlot3D[EntityValue[(EntityClass["Europe", EntityClass["Country","Europe"], "EntityClass[\"Country\", \"Europe\"]", "countries"]),"FlagImage"],LabelingFunction->Tooltip,PlotStyle->Directive[PointSize[Large],Purple]]

Use a plot theme with a frame and grid lines:

FeatureSpacePlot3D[EntityValue[(EntityClass["Europe", EntityClass["Country","Europe"], "EntityClass[\"Country\", \"Europe\"]", "countries"]),"FlagImage"],LabelingFunction->Tooltip,PlotTheme->"Detailed"]

OpenersExampleSection2(Spacer1)Options  (25)

OpenersExampleSubsection4(Spacer1)Background  (2)

By default, plots do not have a background:

FeatureSpacePlot3D[EntityValue[(EntityClass["Europe", EntityClass["Country","Europe"], "EntityClass[\"Country\", \"Europe\"]", "countries"]),"FlagImage"]]

Use a light gray background:

FeatureSpacePlot3D[EntityValue[(EntityClass["Europe", EntityClass["Country","Europe"], "EntityClass[\"Country\", \"Europe\"]", "countries"]),"FlagImage"],Background->Gray]

OpenersExampleSubsection5(Spacer1)FeatureExtractor  (1)

By default, (RefLink[FeatureExtractor, paclet:ref/FeatureExtractor]) uses (RefLink[Identity, paclet:ref/Identity]):

FeatureSpacePlot3D[{,,,,,,},Method->"LatentSemanticAnalysis",LabelingFunction->Callout,FeatureExtractor->Identity,ImageSize->225]

Use a different setting:

FeatureSpacePlot3D[{,,,,,,},Method->"LatentSemanticAnalysis",LabelingFunction->Callout,FeatureExtractor->"ImageFeatures",ImageSize->225]

OpenersExampleSubsection6(Spacer1)FeatureTypes  (1)

Extract features from a simple dataset:

FeatureSpacePlot3D[{{1,"A"},{2,"A"},{2,"B"},{1,"B"}}]

Force the interpretation of the first feature as nominal:

FeatureSpacePlot3D[{{1,"A"},{2,"A"},{2,"B"},{1,"B"}},FeatureTypes-><|1->"Nominal"|>]

OpenersExampleSubsection7(Spacer1)LabelingFunction  (4)

Simple examples such as images and text are shown directly in the plot:

FeatureSpacePlot3D[EntityValue[(EntityClass["Europe", EntityClass["Country","Europe"], "EntityClass[\"Country\", \"Europe\"]", "countries"]),"FlagImage"]]

Show the examples as points:

FeatureSpacePlot3D[EntityValue[(EntityClass["Europe", EntityClass["Country","Europe"], "EntityClass[\"Country\", \"Europe\"]", "countries"]),"FlagImage"],LabelingFunction->None]

Show the examples as points with the original data in tooltips:

FeatureSpacePlot3D[EntityValue[(EntityClass["Europe", EntityClass["Country","Europe"], "EntityClass[\"Country\", \"Europe\"]", "countries"]),"FlagImage"],LabelingFunction->Tooltip]

Use callouts to label the points:

FeatureSpacePlot3D[EntityValue[(EntityClass["Europe", EntityClass["Country","Europe"], "EntityClass[\"Country\", \"Europe\"]", "countries"]),"FlagImage"],LabelingFunction->Callout,ImageSize->225]

OpenersExampleSubsection8(Spacer1)LabelingSize  (4)

Size of labels is determined automatically:

data=EntityValue[LinguisticAssistant,"FlagImage"];

Table[FeatureSpacePlot3D[Take[data,n],ImageSize->225],{n,{30,60,150,All}}]

Use (RefLink[LabelingSize, paclet:ref/LabelingSize]) to control the size of labels in the plot, while the tooltips have larger images:

Table[FeatureSpacePlot3D[{,, ,,,},LabelingSize->i,ImageSize->225],{i,{15,25,50}}]

Change the (RefLink[Callout, paclet:ref/Callout]) label size:

Table[FeatureSpacePlot3D[{,, ,,,},LabelingFunction->Callout,LabelingSize->i,ImageSize->225],{i,{15,25,50}}]

Non-image/graphics labels are displayed full by default:

SeedRandom[1];FeatureSpacePlot3D[RandomWord[10],LabelingFunction->Callout,ImageSize->225]

Change display size:

SeedRandom[1];FeatureSpacePlot3D[RandomWord[10],LabelingFunction->Callout,LabelingSize->40,ImageSize->225]

OpenersExampleSubsection9(Spacer1)Method  (2)

(RefLink[FeatureSpacePlot, paclet:ref/FeatureSpacePlot]) uses (RefLink[Method, paclet:ref/Method])->"TSNE" by default:

FeatureSpacePlot3D[{,,,,,,},Method->"TSNE"]

Use different methods:

Table[FeatureSpacePlot3D[{,,,,,,},Method->m,PlotLabel->m],{m,{"LatentSemanticAnalysis","LowRankMatrixFactorization"}}]

OpenersExampleSubsection10(Spacer1)PerformanceGoal  (1)

Generate a plot using flags for countries in Europe:

flags=EntityValue[(EntityClass["Europe", EntityClass["Country","Europe"], "EntityClass[\"Country\", \"Europe\"]", "countries"]),"FlagImage"];

AbsoluteTiming[FeatureSpacePlot3D[flags]]

Use a faster method to position the flags:

AbsoluteTiming[FeatureSpacePlot3D[flags,PerformanceGoal->"Speed"]]

OpenersExampleSubsection11(Spacer1)PlotLabel  (1)

Add an overall label to the plot:

FeatureSpacePlot3D[EntityValue[(EntityClass["Europe", EntityClass["Country","Europe"], "EntityClass[\"Country\", \"Europe\"]", "countries"]),"FlagImage"],PlotLabel->"Europe Flags",LabelingSize->20]

OpenersExampleSubsection12(Spacer1)PlotRangePadding  (2)

Increase the padding around the contents of the plot:

FeatureSpacePlot3D[EntityValue[(EntityClass["Europe", EntityClass["Country","Europe"], "EntityClass[\"Country\", \"Europe\"]", "countries"]),"FlagImage"],PlotRangePadding->Scaled[0.1],Background->Gray]

Do not add any padding to the plot:

FeatureSpacePlot3D[EntityValue[(EntityClass["Europe", EntityClass["Country","Europe"], "EntityClass[\"Country\", \"Europe\"]", "countries"]),"FlagImage"],PlotRangePadding->None,Background->Gray]

OpenersExampleSubsection13(Spacer1)PlotStyle  (2)

Use red points to represent the examples:

FeatureSpacePlot3D[EntityValue[(EntityClass["Europe", EntityClass["Country","Europe"], "EntityClass[\"Country\", \"Europe\"]", "countries"]),"FlagImage"],LabelingFunction->Tooltip,PlotStyle->Red]

Make the points large and red:

FeatureSpacePlot3D[EntityValue[(EntityClass["Europe", EntityClass["Country","Europe"], "EntityClass[\"Country\", \"Europe\"]", "countries"]),"FlagImage"],LabelingFunction->Tooltip,PlotStyle->Directive[PointSize[Large],Red]]

OpenersExampleSubsection14(Spacer1)PlotTheme  (2)

By default, plots are shown with minimal extra detail:

FeatureSpacePlot3D[EntityValue[(EntityClass["Europe", EntityClass["Country","Europe"], "EntityClass[\"Country\", \"Europe\"]", "countries"]),"FlagImage"],LabelingFunction->Tooltip]

Use a theme with a dark background and more styled points:

FeatureSpacePlot3D[EntityValue[(EntityClass["Europe", EntityClass["Country","Europe"], "EntityClass[\"Country\", \"Europe\"]", "countries"]),"FlagImage"],LabelingFunction->Tooltip,PlotTheme->"Marketing"]

OpenersExampleSubsection15(Spacer1)RandomSeeding  (3)

(RefLink[FeatureSpacePlot3D, paclet:ref/FeatureSpacePlot3D]) gives reproducible results:

Table[FeatureSpacePlot3D[EntityValue[(EntityClass["Europe", EntityClass["Country","Europe"], "EntityClass[\"Country\", \"Europe\"]", "countries"]),"FlagImage"]],3]

Use an automatic seed to get different results:

Table[FeatureSpacePlot3D[EntityValue[(EntityClass["Europe", EntityClass["Country","Europe"], "EntityClass[\"Country\", \"Europe\"]", "countries"]),"FlagImage"],RandomSeeding->Automatic],3]

Use specific seeds for reproducible but varying results:

Table[FeatureSpacePlot3D[EntityValue[(EntityClass["Europe", EntityClass["Country","Europe"], "EntityClass[\"Country\", \"Europe\"]", "countries"]),"FlagImage"],RandomSeeding->i],{i,3}]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[FeatureSpacePlot, paclet:ref/FeatureSpacePlot])  ▪  (RefLink[FeatureExtract, paclet:ref/FeatureExtract])  ▪  (RefLink[DimensionReduce, paclet:ref/DimensionReduce])  ▪  (RefLink[ListPointPlot3D, paclet:ref/ListPointPlot3D])  ▪  (RefLink[FeatureExtractor, paclet:ref/FeatureExtractor])  ▪  (RefLink[FeatureExtraction, paclet:ref/FeatureExtraction])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Machine Learning, paclet:guide/MachineLearning])}})}})