Modela is a simple language designed to help data analysts and scientists to automate data preprocessing tasks.
To install the library to use, please run the following command:
pip install -r requirements.txt
To use Modela, run the main.py and input any next commands:
SET <variable> = <value>: Sets a variable to a value.LOAD DATA FROM FILE(source=<data path>, type=<data type>): Loads data from a file. The data type can be eithercsvorxlsx.PREPROCESSING(type=<preprocessing type>, method=<type algorithm>, cols=<name of cols aply preprossesing>): Applies a preprocessing method to the data. The preprocessing type can be eitherencodingorstandardization. The method can be eithermin-max,gaussianandone_hot. The cols can be a list of columns names or a single column name.MODEL(type=<Model type>,learner=<Method type>,formula=<Formula>): Applies a model to the data. The model type can be eitherregression. The method can be eitherlinear. The formula can be a text with name of cols.
This example shows how to load a CSV file, apply a min-max scaling to the age and salary columns and then apply a one-hot encoding to the gender column.
LOAD DATA FROM FILE(source='data.csv', type=csv)
PREPROCESSING(type=scaling, method=min-max, cols=[age,salary])
This example shows how to load an Excel file, apply a gaussian scaling to the age and salary columns and then apply a one-hot encoding to the gender column.
LOAD DATA FROM FILE(source='data.xlsx', type=xlsx)
PREPROCESSING(type=scaling, method=gaussian, cols=[age,salary])
PREPROCESSING(type=enconding, method=one_hot, cols=[gender])
This example shows how to load a CSV file, apply a min-max scaling to the age and salary columns and then apply a one-hot encoding to the gender columns and apply a linear regression model.
LOAD DATA FROM FILE(source='data.csv', type=csv)
PREPROCESSING(type=scaling, method=min_max, cols=[age,salary])
PREPROCESSING(type=encoding, method=one_hot, cols=[gender])
MODEL(type=regression, learner=lr, formula=gender~age+salary)
To contribute to Modela, please follow these steps:
- Fork this repository
- Create a new branch (
git checkout -b new-feature) - Make your changes and commit them (
git commit -am 'Added a new feature') - Push your changes to your fork (
git push origin new-feature) - Create a pull request
Modela is licensed under the MIT License. See LICENSE for more information.