MLSquare¶
MLSquare is an open source developer-friendly Python library, designed to make use of Deep Learning for Machine Learning developers.
Note
mlsquare
python library is developed and maintained by MLSquare Foundation
In the first version we come up with Interoperable Machine Learning [IMLY]. IMLY is aimed to provide every Machine Learning Algorithm with an equivalent DNN Implementation.
Getting Started!¶
Setting up mlsquare
is simple and easy
- Create a Virtual Environment
virtualenv ~/.venv source ~/.venv/bin/activate
- Install
mlsquare
packagepip install mlsquare
- Import
dope()
function frommlsquare
and pass thesklearn
model object.>>> from mlsquare.imly import dope >>> from sklearn.linear_model import LinearRegression >>> from sklearn.preprocessing import StandardScaler >>> from sklearn.model_selection import train_test_split >>> import pandas as pd >>> model = LinearRegression() >>> data = pd.read_csv('./datasets/diabetes.csv', delimiter=",", header=None, index_col=False) >>> sc = StandardScaler() >>> data = sc.fit_transform(data) >>> data = pd.DataFrame(data) >>> X = data.iloc[:, :-1] >>> Y = data.iloc[:, -1] >>> x_train, x_test, y_train, y_test = train_test_split(X, Y, test_size=0.60, random_state=0) >>> m = dope(model) >>> # All sklearn operations can be performed on m, except that the underlying implementation uses DNN >>> m.fit(x_train, y_train) >>> m.score(x_test, y_test)
Note
For a comprehensive tutorial please do checkout this link
Contents¶
External links¶
- Online documentation (Read the Docs)
- Downloads (PyPI)
- Source code (Github)