The Aim of Scikit-Learn 1.0



Original Source Here

3. Release highlights

3.1. API Standardization

One important pattern in the library interface is that all the modules tend to be interchangeable. This means, for instance, if you are trying to build a supervised model, the functions and methods to fit, test, predict and measure the accuracy of this model, are independent of the flavor of the supervised model that you are building (linear regression, decision trees, k-means…).

Standard interface and signature between objects with the same functionality.

However, the signature of the module was the same, but the values that the expected were not, between different modules and releases (e.g. “X should be np.matrix or np.array?”, “loss=’ls’ or loss=’mse’?…”). Some highlights to solve this are:

  • Signature: Now they enforce to use of only keyword-only arguments.
  • Data types: new features are working with Pandas (for instance estimators store the feature_names of the pd.DataFrame when training). Meanwhile, the type np.matrix is deprecated.
  • Argument values: Some functions and modules have the same arguments (loss, scaler, criterion,…) but the values it expected were different and this has changed. Some encoders can now accept missing and unknown values.

AI/ML

Trending AI/ML Article Identified & Digested via Granola by Ramsey Elbasheer; a Machine-Driven RSS Bot

%d bloggers like this: