Getting Started

Automate your Machine Learning workflow by using the Nylon library.

Introduction

Nylon offers an easy to-use Python library to help users build machine learning workflows using concise, JSON like syntax. It houses a built in grammar, in which you can access different ML operations through the english language.

You can make customizations to the workflow by using the grammar or by building your own custom modules. If customizations to a particular section aren't made, Nylon will use its backend AutoML to handle it for you.

How it Works

Start by initializing an object using the Polymer class. Every time, you begin working with a new dataset, a new object must be initialized.

a_processor = Polymer('housing.csv')

Now, a Nylon specifications file is required to process your csv file. For this, you'll build a JSON like file with the Nylon grammar.

The Nylon grammar currently has four sections: data, preprocessing, modeling and analysis.

You're able to customize the parts of the workflow that you'd like. Any section that you don't include in the workflow (other than data) will be performed automatically if not specified. Here's three examples depicting three different levels of involvement/configuration.

Fully Automated
Partially Customized
Fully Customized
Fully Automated

This represents the minimum level of configuration for Nylon. You're only providing it with the location of your dataset as well as the target column. Everything from preprocessing to analysis is handled by our backend.

{
"data": {
"target": "ocean_proximity"
}
}
Partially Customized

In this configuration, you're choosing to use a random forest model. All other steps are automated by Nylon include preprocessing, analysis, and tuning.

{
"data": {
"target": "ocean_proximity"
},
"modeling": {
"type": "rf"
},
}
Fully Customized

This represents a full configuration in Paraglide. The user is manually modifying each section of the Nylon specifications file. This user also chose to include a custom module for preprocessing from the file preprocessing.py.

Notice the modeling column. If you'd like to specify a parameter in any model you can pass it with its tag. Otherwise, we'll figure it out for you :).

{
"data": {
"target": "ocean_proximity"
},
"preprocessor": {
"custom" : {
"loc": "preprocessing",
"name": "my_preprocessor"
}
},
"modeling": {
"type": "rf",
"params": {
"n_estimators": 100
}
},
"analysis": {
"type": "cross-val"
}
}

As you can see, with Nylon you're free to pick and choose what you customize. To learn more about how to create this sort of specifications file with Nylon's grammar, check out: