Shimoku docs
Search…
⌃K

v.0.10

On 2022.08.17
To get the new version
🎁
​
🎁
​
🎁
​
pip install --upgrade shimoku-api-python
pip install --upgrade shimoku-components-catalog
This version brings Machine Learning features through our API by the first time!!

Fixes

  • For readability, renamed shimoku.file.* by shimoku.io.*:
Before: shimoku.file.get_dataframe(...)
Now: shimoku.io.get_dataframe(...)
  • Fixed IO for large dataframes now you can POST and GET dataframes of large sizes without size limit.
  • Fix path and subpaths. Now Apps with multiple words can be sorted too: s.plt.set_apps_orders() and s.plt.set_sub_path_orders()
  • Fixes in the default look&feel of different charts and with new features to see data, download image, zoom in and out and change chart type:
    • Heatmap shimoku.plt.heatmap()
  • Barchart shimoku.plt.bar() and Linechart shimoku.plt.line()

Improvements

  • Improvements in the Input Forms look&feel
  • Easier to initialize the Shimoku Client
import shimoku_api_python as shimoku
​
# Still allowed
s = shimoku.Client(
config={'access_token': api_key},
universe_id=universe_id,
environment=environment
)
​
# Easier
s = shimoku.Client(
access_token=api_key,
universe_id=universe_id,
environment=environment
)
  • Added IO methods for Machine Learning models:
from sklearn import svm
from sklearn import datasets
​
clf = svm.SVC()
X, y = datasets.load_iris(return_X_y=True)
clf.fit(X, y)
shimoku.io.post_ai_model(
business_id=business_id,
app_name='test',
model_name='model-object-test',
model=clf,
)
model = shimoku.io.get_ai_model(
business_id=business_id,
app_name='test',
model_name='model-object-test',
)

New

  • Added method to clear a whole business (tabula rasa) shimoku.plt.clear_business()
Before
shimoku.plt.clear_business()
  • Added method to retrieve input forms data
input_data: List[Dict] = s.plt.get_input_forms(menu_path='test/input-form')
​
​

Machine Learning!

  • AI for Machine Learning features. Now users can use Shimoku's Machine Learning from the SDK just passing a test dataframe and specifying the Model endpoint (ask to Shimoku about what endpoints are available). You can decide whether to add Explainability or not to the predictions
df_pred, df_error = s.ai.predict_categorical(
df_test=df_test_fail,
model_endpoint=model_endpoint,
explain=False,
)
Also predictive tables have been added that create a table with the prediction
target_column: str = 'NRO_POL'
column_to_predict: str = 'churn_probability'
menu_path: str = 'AI/Churn'
order: int = 0
​
shimoku.ai.predictive_table(
df_test=df_test,
model_endpoint=model_endpoint,
target_column=target_column,
column_to_predict=column_to_predict,
prediction_type='categorical',
explain=True,
menu_path=menu_path, order=order,
add_filter_by_column_to_predict=False,
add_search_by_target_column=True,
extra_filter_columns=None,
extra_search_columns=None
)