Package unifeat.util
Class FileFunc
java.lang.Object
unifeat.util.FileFunc
This java class is used to implement various utility methods for manipulating
files and directories. The methods in this class is contained brief
description of the applications.
- Author:
- Sina Tabakhi
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
convertCSVtoARFF
(String nameCSV, String nameARFF, String pathProject, int sizeFeatureSubset, int numFeature, String[] nameFeatures, int numClass, String[] classLabel) This method converts CSV file to ARFF file for the Weka Softwarestatic void
convertCSVtoARFF
(String nameCSV, String nameARFF, String pathProject, int sizeFeatureSubset, DatasetInfo ob) This method converts CSV file to ARFF file for the Weka Softwarestatic void
createCSVFile
(double[][] oldData, int[] selectedFeature, String name, String[] featureNames, String[] classNames) This method creates a CSV (Comma delimited) file of the input datastatic void
createDirectory
(String pathname) This method creates a new directory denoted by pathnamestatic void
deleteDirectoryWithAllFiles
(String pathname) This method deletes the current directory with all files in the directory denoted by pathnamestatic void
deleteFilesInDirectory
(String pathname) This method deletes all files in the directory denoted by pathname
-
Constructor Details
-
FileFunc
public FileFunc()
-
-
Method Details
-
createDirectory
This method creates a new directory denoted by pathname- Parameters:
pathname
- path of the directory
-
deleteFilesInDirectory
This method deletes all files in the directory denoted by pathname- Parameters:
pathname
- path of the directory
-
deleteDirectoryWithAllFiles
This method deletes the current directory with all files in the directory denoted by pathname- Parameters:
pathname
- path of the directory
-
createCSVFile
public static void createCSVFile(double[][] oldData, int[] selectedFeature, String name, String[] featureNames, String[] classNames) This method creates a CSV (Comma delimited) file of the input data- Parameters:
oldData
- the input dataselectedFeature
- the list of selected Featurename
- name of the path for created CSV filefeatureNames
- a string array of features namesclassNames
- a string array of class labels names
-
convertCSVtoARFF
public static void convertCSVtoARFF(String nameCSV, String nameARFF, String pathProject, int sizeFeatureSubset, DatasetInfo ob) This method converts CSV file to ARFF file for the Weka Software- Parameters:
nameCSV
- the path of the CSV filenameARFF
- the path for the created ARFF filepathProject
- the path of the projectsizeFeatureSubset
- the number of selected featuresob
- the object of the DatasetInfo
-
convertCSVtoARFF
public static void convertCSVtoARFF(String nameCSV, String nameARFF, String pathProject, int sizeFeatureSubset, int numFeature, String[] nameFeatures, int numClass, String[] classLabel) This method converts CSV file to ARFF file for the Weka Software- Parameters:
nameCSV
- the path of the CSV filenameARFF
- the path for the created ARFF filepathProject
- the path of the projectsizeFeatureSubset
- the number of selected featuresnumFeature
- the number of original features with classnameFeatures
- the array of features' namesnumClass
- the number of classesclassLabel
- the array of class labels' names
-