Package: ml-stars
An Open Source Project from theData to AI Lab, at MITml-starsPrimitives for machine learning and time series.Github:https://github.com/sintel-dev/ml-starsLicense:MITDevelopment Status:Pre-AlphaOverviewThis repository contains primitive annotations to be used by the MLBlocks library, as well as
the necessary Python code to make some of them fully compatible with the MLBlocks API requirements.There is also a collection of custom primitives contributed directly to this library, which either
combine third party tools or implement new functionalities from scratch.InstallationRequirementsml-starshas been developed and tested onPython 3.8, 3.9, 3.10, and 3.11Also, although it is not strictly required, the usage of avirtualenvis highly recommended in order to avoid
interfering with other software installed in the system whereml-starsis run.Install with pipThe easiest and recommended way to installml-starsis usingpip:pipinstallml-starsThis will pull and install the latest stable release fromPyPi.If you want to install from source or contribute to the project please read theContributing Guide.QuickstartThis section is a short series of tutorials to help you getting started with ml-stars.We will be executing a single primitive for data transformation.1. Load a PrimitiveThe first step in order to run a primitive is to load it.This will be done using themlstars.load_primitivefunction, which will
load the indicated primitive as anMLBlock Object from MLBlocksIn this case, we will load thesklearn.preprocessing.MinMaxScalerprimitive.frommlstarsimportload_primitiveprimitive=load_primitive('sklearn.preprocessing.MinMaxScaler')2. Load some dataThe StandardScaler is a transformation primitive which scales your data into a given range.To use this primtives, we generate a synthetic data with some numeric values.importnumpyasnpdata=np.array([10,1,3,-1,5,6,0,4,13,4]).reshape(-1,1)Thedatais a list of integers where their original range is between [-1, 13].3. Fit the primitiveIn order to run our primitive, we first need to fit it.This is the process where it analyzes the data to detect what is the original range of the data.This is done by calling itsfitmethod and passing thedataasX.primitive.fit(X=data)4. Produce resultsOnce the pipeline is fit, we can process the data by calling theproducemethod of the
primitive instance and passing agin thedataasX.transformed=primitive.produce(X=data)transformedAfter this is done, we can see how the transformed data contains the transformed values:array([[0.78571429],
       [0.14285714],
       [0.28571429],
       [0.        ],
       [0.42857143],
       [0.5       ],
       [0.07142857],
       [0.35714286],
       [1.        ],
       [0.35714286]])The data is now in [0, 1] range.What's Next?DocumentationHistory0.2.0 – 2023-10-24Upgrade python tests & remove python 3.7Issue #11- by @sarahmishAdd deprecation warning for old ARIMA primitiveIssue #10- by @sarahmishRemove python 3.6Issue #9- by @sarahmishAdd support for python 3.10 & 3.11Issue #8- by @sarahmish0.1.3 – 2023-09-25UpdatekerasadapterIssue #7- by @sarahmish0.1.2 – 2023-08-04Add python 3.9Issue #6- by @sarahmish0.1.1 - 2023-05-17Fix ARIMA adapterIssue #5- by @sarahmishAdd DocumentationIssue #4- by @sarahmish0.1.0 - 2023-04-18First official ml-stars release to PyPI:https://pypi.org/project/ml-stars/