DF2DB
- class geoanalytics.conversion.DF2DB.DF2DB(inputDF, DFtype='dense')[source]
Bases:
object- Description:
This class will create database for given DataFrame based on Threshold values and conditions are defined in the class. Converts Dataframe into sparse or dense dataframes.
- Attributes:
- param inputDF:
DataFrame : It is sparse or dense DataFrame
- param thresholdValue:
int or float : It is threshold value of all item
- param condition:
str : It is condition of all item
- param DFtype:
str : It is DataFrame type. It should be sparse or dense. Default DF is sparse.
- :param memoryUSSfloat
To store the total amount of USS memory consumed by the program
- :param memoryRSSfloat
To store the total amount of RSS memory consumed by the program
- :param startTimefloat
To record the start time of the mining process
- endTimefloat
To record the completion time of the mining process
Importing this algorithm into a python program
from PAMI.extras.DF2DB import DF2DB as db obj = db.DF2DB(idf, "sparse/dense") obj.convert2Transactional("outputFileName",condition,threshold) # To create transactional database obj.convert2Temporal("outputFileName",condition,threshold) # To create temporal database obj.convert2Utility("outputFileName",condition,threshold) # To create utility database
- convert2MultipleTimeSeries(oFile: str, condition: str, thresholdValue: int | float, interval: int) None[source]
- Description:
Create the multiple time series database.
- Parameters:
oFile (str) – Write multiple time series database into outputFile.
interval (int) – Breaks the given timeseries into intervals.
condition – It is condition to judge the value in dataframe
thresholdValue (int or float) – User defined value.
- convert2TemporalDatabase(oFile: str, condition: str, thresholdValue: int | float) None[source]
create temporal database and return oFile name
- Parameters:
oFile (str) – file name or path to store database
condition (str) – It is condition to judge the value
thresholdValue (int or float) – user defined threshold value
- convert2TransactionalDatabase(oFile: str, condition: str, thresholdValue: int | float) None[source]
create transactional database and return oFileName
- Parameters:
oFile (str) – file name or path to store database
condition (str) – It is condition to judge the value
thresholdValue (int or float) – user defined threshold value
- convert2UncertainTransactionalDatabase(oFile: str, condition: str, thresholdValue: int | float) None[source]
- convert2UtilityDatabase(oFile: str) None[source]
create utility database and return oFile name
- Parameters:
oFile (str) – file name or path to store database
- convert2geoReferencedTemporalDatabase(oFile: str, condition: str, thresholdValue: int | float) str[source]
create temporal database and return oFile name
- Parameters:
oFile (str) – file name or path to store database
condition (str) – It is condition to judge the value
thresholdValue (int or float) – user defined threshold value
- Return type:
str
- convert2geoReferencedTransactionalDatabase(oFile: str, condition: str, thresholdValue: int | float) str[source]
create transactional database and return oFileName
- Parameters:
oFile (str) – file name or path to store database
condition (str) – It is condition to judge the value
thresholdValue (int or float) – user defined threshold value
- Return type:
str
- getMemoryRSS() float[source]
Total amount of RSS memory consumed by the mining process will be retrieved from this function
- Returns:
returning RSS memory consumed by the mining process
- Return type:
float