src.Projections.Python.Projector.PCA.PCAProjector module¶
-
class
src.Projections.Python.Projector.PCA.PCAProjector.
PCA_Projector
¶ Bases:
src.Projections.Python.Projector.Projector.Projector
PCA projector from sklearn
- Parameters
Projector (Projector) – General interface for projectors
-
clearVariables
()¶ Clear all variables
-
getModel
(request, context)¶ Return the model to gRPC message
- Parameters
request (gRPC) – standard gRPC (contains the messages)
context (gRPC) – standard gRPC
- Returns
Return the byte model
- Return type
-
getPrecision
()¶ Return the precision (Which sklearn PCA provides)
- Returns
[description]
- Return type
[type]
-
getProgress
(request, context)¶ Implementation for the getProgress gRPC requset
- Parameters
request (gRPC) – standard gRPC (contains the messages)
context (gRPC) – standard gRPC
- Returns
contains the integer of current progress
- Return type
grPC progressKNN
-
partialFit
(buff)¶ Partial fit the buffer
- Parameters
buff ([hdvector]]) – The list of the vectors
-
startProjectorService
(request, context)¶ Set up the service
- Parameters
request (gRPC) – standard gRPC (contains the messages)
context (gRPC) – standard gRPC
- Returns
gRPC void
-
stopProjectorService
(request, context)¶ Stop the current service
- Parameters
request (gRPC) – standard gRPC (contains the messages)
context (gRPC) – standard gRPC
- Returns
grPC void
-
trainPCA
()¶ Starts training the projector
-
updatePercentage
()¶ Recalculate the current percentage
-
src.Projections.Python.Projector.PCA.PCAProjector.
printMessage
(message)¶ Print the coloured message so that we can see in the output which microservice printed it
- Parameters
message (string) – The actual message
-
src.Projections.Python.Projector.PCA.PCAProjector.
serveServer
()¶ Setup the GRPC server