Skip to content

Add methods to draw a scatter plot matrix of a DataFrame#237

Closed
hernanmd wants to merge 1 commit intomasterfrom
scatterplot
Closed

Add methods to draw a scatter plot matrix of a DataFrame#237
hernanmd wants to merge 1 commit intomasterfrom
scatterplot

Conversation

@hernanmd
Copy link
Collaborator

Usage example using PCA:

	| d m pca m1 d1 irisDataFrame |
	
	irisDataFrame := AIDatasets loadIris.
	d := irisDataFrame columnsFrom: 1 to: 4.

	"Transform DF  as matrix"
	m := PMMatrix rows: d asArrayOfRows.

	"Data standardization (mean = 0 and variance = 1)"
	m := PMStandardizationScaler new fitAndTransform: m.

	"Compute PCA components"
	pca := PMPrincipalComponentAnalyserSVD new.
	pca componentsNumber: 2.
	pca fit: m.
	pca transformMatrix.

	m1 := pca transform: m.

	d1 := DataFrame withRows: m1 rows.
	d1
		addColumn: (irisDataFrame columnsFrom: 5 to: 5) asArrayOfColumns first
		named: 'type'.
		
	d1 	
		openScatterPlotWithTitle: 'PCA of Iris data set' 
		forColumn: 'type'.

@hernanmd hernanmd self-assigned this May 25, 2023
@hernanmd hernanmd requested a review from jecisc May 25, 2023 18:04
hernanmd pushed a commit to PolyMathOrg/PolyMath that referenced this pull request May 25, 2023
@jecisc
Copy link
Member

jecisc commented May 26, 2023

Hi hernan,

We do not want graphical interfaces in the project DataFrame directly because we do not want to depend on Roassal for a Collection.

The UI part should be in this project:

https://github.com/pharo-ai/data-inspector

Also, a few weeks ago I implemented a scatter matrix in this project. You can check the readme to see how to use it and check if this version is good enough or if you want to improve this implementation

@hernanmd
Copy link
Collaborator Author

Hi Cyril,

I checked data inspector, it implements scatter matrix, but I didn't find a single scatter plot.
So I will push there.

@hernanmd hernanmd closed this May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants