diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..94f4cbf --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,39 @@ +name: Deploy to Render + +on: + push: + branches: + - main # Adjust this branch as needed + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.11 # Replace with your Python version + + - name: Install dependencies + run: pip install -r requirements.txt # Replace with your requirements file + + - name: Build Docker image + run: | + docker build -t company_bankruptcy_predictor:latest . + docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} + docker tag company_bankruptcy_predictor:latest sayam2801/company_bankruptcy_predictor:latest + docker push sayam2801/company_bankruptcy_predictor:latest + + - name: Deploy to Render + run: | + curl -X POST -H "Authorization: Bearer ${{ secrets.RENDER_TOKEN }}" \ + -H "Content-Type: application/json" \ + --data '{ + "image": "company_bankruptcy_predictor:latest", + "serviceId": "srv-ckl722rj89us73coe160" # Replace with your Render service ID + }' \ + https://api.render.com/v1/deploys \ No newline at end of file diff --git a/Company Bankruptcy Prediction.ipynb b/Company Bankruptcy Prediction.ipynb index ebe8bf0..a6b8ff2 100644 --- a/Company Bankruptcy Prediction.ipynb +++ b/Company Bankruptcy Prediction.ipynb @@ -5276,7 +5276,7 @@ }, { "cell_type": "code", - "execution_count": 108, + "execution_count": 169, "id": "261d1595", "metadata": {}, "outputs": [ @@ -5321,6 +5321,15 @@ " \n", "
StackingClassifier(estimators=[('ET', ExtraTreesClassifier()),\n", + "StackingClassifier(estimators=[('ET', ExtraTreesClassifier()),\n", " ('XGB',\n", " XGBClassifier(base_score=None, booster=None,\n", " callbacks=None,\n", @@ -8385,7 +8594,7 @@ " predictor=None, random_state=None, ...)),\n", " ('CAT',\n", " <catboost.core.CatBoostClassifier object at 0x000002944CE3C9D0>)],\n", - " final_estimator=RandomForestClassifier(), verbose=2)In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.StackingClassifier(estimators=[('ET', ExtraTreesClassifier()),\n", + " final_estimator=RandomForestClassifier(), verbose=2)In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.StackingClassifier(estimators=[('ET', ExtraTreesClassifier()),\n", " ('XGB',\n", " XGBClassifier(base_score=None, booster=None,\n", " callbacks=None,\n", @@ -8411,7 +8620,7 @@ " predictor=None, random_state=None, ...)),\n", " ('CAT',\n", " <catboost.core.CatBoostClassifier object at 0x000002944CE3C9D0>)],\n", - " final_estimator=RandomForestClassifier(), verbose=2)ExtraTreesClassifier()" + " predictor=None, random_state=None, ...)XGBClassifier(base_score=None, booster=None, callbacks=None,\n", + " final_estimator=RandomForestClassifier(), verbose=2)ExtraTreesClassifier()XGBClassifier(base_score=None, booster=None, callbacks=None,\n", " colsample_bylevel=None, colsample_bynode=None,\n", " colsample_bytree=None, early_stopping_rounds=None,\n", " enable_categorical=False, eval_metric=None, feature_types=None,\n", @@ -8421,7 +8630,7 @@ " max_delta_step=None, max_depth=None, max_leaves=None,\n", " min_child_weight=None, missing=nan, monotone_constraints=None,\n", " n_estimators=100, n_jobs=None, num_parallel_tree=None,\n", - " predictor=None, random_state=None, ...)<catboost.core.CatBoostClassifier object at 0x000002944CE3C9D0>RandomForestClassifier()<catboost.core.CatBoostClassifier object at 0x000002944CE3C9D0>RandomForestClassifier()
Pipeline(steps=[('scaler', StandardScaler()),\n", - " ('model',\n", - " StackingClassifier(estimators=[('ET', ExtraTreesClassifier()),\n", - " ('XGB',\n", - " XGBClassifier(base_score=None,\n", - " booster=None,\n", - " callbacks=None,\n", - " colsample_bylevel=None,\n", - " colsample_bynode=None,\n", - " colsample_bytree=None,\n", - " early_stopping_rounds=None,\n", - " enable_categorical=False,\n", - " eval_metric=None,\n", - " feature_types=None,\n", - " gamma=None,\n", - " gpu_i...\n", - " max_cat_threshold=None,\n", - " max_cat_to_onehot=None,\n", - " max_delta_step=None,\n", - " max_depth=None,\n", - " max_leaves=None,\n", - " min_child_weight=None,\n", - " missing=nan,\n", - " monotone_constraints=None,\n", - " n_estimators=100,\n", - " n_jobs=None,\n", - " num_parallel_tree=None,\n", - " predictor=None,\n", - " random_state=None, ...)),\n", - " ('CAT',\n", - " <catboost.core.CatBoostClassifier object at 0x000002944CE3C9D0>)],\n", - " final_estimator=RandomForestClassifier(),\n", - " verbose=2))])In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
Pipeline(steps=[('scaler', StandardScaler()),\n", - " ('model',\n", - " StackingClassifier(estimators=[('ET', ExtraTreesClassifier()),\n", - " ('XGB',\n", - " XGBClassifier(base_score=None,\n", - " booster=None,\n", - " callbacks=None,\n", - " colsample_bylevel=None,\n", - " colsample_bynode=None,\n", - " colsample_bytree=None,\n", - " early_stopping_rounds=None,\n", - " enable_categorical=False,\n", - " eval_metric=None,\n", - " feature_types=None,\n", - " gamma=None,\n", - " gpu_i...\n", - " max_cat_threshold=None,\n", - " max_cat_to_onehot=None,\n", - " max_delta_step=None,\n", - " max_depth=None,\n", - " max_leaves=None,\n", - " min_child_weight=None,\n", - " missing=nan,\n", - " monotone_constraints=None,\n", - " n_estimators=100,\n", - " n_jobs=None,\n", - " num_parallel_tree=None,\n", - " predictor=None,\n", - " random_state=None, ...)),\n", - " ('CAT',\n", - " <catboost.core.CatBoostClassifier object at 0x000002944CE3C9D0>)],\n", - " final_estimator=RandomForestClassifier(),\n", - " verbose=2))])
StandardScaler()
StackingClassifier(estimators=[('ET', ExtraTreesClassifier()),\n", - " ('XGB',\n", - " XGBClassifier(base_score=None, booster=None,\n", - " callbacks=None,\n", - " colsample_bylevel=None,\n", - " colsample_bynode=None,\n", - " colsample_bytree=None,\n", - " early_stopping_rounds=None,\n", - " enable_categorical=False,\n", - " eval_metric=None,\n", - " feature_types=None, gamma=None,\n", - " gpu_id=None, grow_policy=None,\n", - " importance_type=None,\n", - " interact...\n", - " max_cat_threshold=None,\n", - " max_cat_to_onehot=None,\n", - " max_delta_step=None,\n", - " max_depth=None, max_leaves=None,\n", - " min_child_weight=None,\n", - " missing=nan,\n", - " monotone_constraints=None,\n", - " n_estimators=100, n_jobs=None,\n", - " num_parallel_tree=None,\n", - " predictor=None, random_state=None, ...)),\n", - " ('CAT',\n", - " <catboost.core.CatBoostClassifier object at 0x000002944CE3C9D0>)],\n", - " final_estimator=RandomForestClassifier(), verbose=2)
ExtraTreesClassifier()
XGBClassifier(base_score=None, booster=None, callbacks=None,\n", - " colsample_bylevel=None, colsample_bynode=None,\n", - " colsample_bytree=None, early_stopping_rounds=None,\n", - " enable_categorical=False, eval_metric=None, feature_types=None,\n", - " gamma=None, gpu_id=None, grow_policy=None, importance_type=None,\n", - " interaction_constraints=None, learning_rate=None, max_bin=None,\n", - " max_cat_threshold=None, max_cat_to_onehot=None,\n", - " max_delta_step=None, max_depth=None, max_leaves=None,\n", - " min_child_weight=None, missing=nan, monotone_constraints=None,\n", - " n_estimators=100, n_jobs=None, num_parallel_tree=None,\n", - " predictor=None, random_state=None, ...)
<catboost.core.CatBoostClassifier object at 0x000002944CE3C9D0>
RandomForestClassifier()
Pipeline(steps=[('scaler', StandardScaler()),\n", + " ('model', ExtraTreesClassifier())])In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
Pipeline(steps=[('scaler', StandardScaler()),\n", + " ('model', ExtraTreesClassifier())])
StandardScaler()
ExtraTreesClassifier()
Pipeline(steps=[('scaler', StandardScaler()),\n", - " ('model',\n", - " StackingClassifier(estimators=[('ET', ExtraTreesClassifier()),\n", - " ('XGB',\n", - " XGBClassifier(base_score=None,\n", - " booster=None,\n", - " callbacks=None,\n", - " colsample_bylevel=None,\n", - " colsample_bynode=None,\n", - " colsample_bytree=None,\n", - " early_stopping_rounds=None,\n", - " enable_categorical=False,\n", - " eval_metric=None,\n", - " feature_types=None,\n", - " gamma=None,\n", - " gpu_i...\n", - " max_cat_threshold=None,\n", - " max_cat_to_onehot=None,\n", - " max_delta_step=None,\n", - " max_depth=None,\n", - " max_leaves=None,\n", - " min_child_weight=None,\n", - " missing=nan,\n", - " monotone_constraints=None,\n", - " n_estimators=100,\n", - " n_jobs=None,\n", - " num_parallel_tree=None,\n", - " predictor=None,\n", - " random_state=None, ...)),\n", - " ('CAT',\n", - " <catboost.core.CatBoostClassifier object at 0x0000029454240970>)],\n", - " final_estimator=RandomForestClassifier(),\n", - " verbose=2))])In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
Pipeline(steps=[('scaler', StandardScaler()),\n", - " ('model',\n", - " StackingClassifier(estimators=[('ET', ExtraTreesClassifier()),\n", - " ('XGB',\n", - " XGBClassifier(base_score=None,\n", - " booster=None,\n", - " callbacks=None,\n", - " colsample_bylevel=None,\n", - " colsample_bynode=None,\n", - " colsample_bytree=None,\n", - " early_stopping_rounds=None,\n", - " enable_categorical=False,\n", - " eval_metric=None,\n", - " feature_types=None,\n", - " gamma=None,\n", - " gpu_i...\n", - " max_cat_threshold=None,\n", - " max_cat_to_onehot=None,\n", - " max_delta_step=None,\n", - " max_depth=None,\n", - " max_leaves=None,\n", - " min_child_weight=None,\n", - " missing=nan,\n", - " monotone_constraints=None,\n", - " n_estimators=100,\n", - " n_jobs=None,\n", - " num_parallel_tree=None,\n", - " predictor=None,\n", - " random_state=None, ...)),\n", - " ('CAT',\n", - " <catboost.core.CatBoostClassifier object at 0x0000029454240970>)],\n", - " final_estimator=RandomForestClassifier(),\n", - " verbose=2))])
StandardScaler()
StackingClassifier(estimators=[('ET', ExtraTreesClassifier()),\n", - " ('XGB',\n", - " XGBClassifier(base_score=None, booster=None,\n", - " callbacks=None,\n", - " colsample_bylevel=None,\n", - " colsample_bynode=None,\n", - " colsample_bytree=None,\n", - " early_stopping_rounds=None,\n", - " enable_categorical=False,\n", - " eval_metric=None,\n", - " feature_types=None, gamma=None,\n", - " gpu_id=None, grow_policy=None,\n", - " importance_type=None,\n", - " interact...\n", - " max_cat_threshold=None,\n", - " max_cat_to_onehot=None,\n", - " max_delta_step=None,\n", - " max_depth=None, max_leaves=None,\n", - " min_child_weight=None,\n", - " missing=nan,\n", - " monotone_constraints=None,\n", - " n_estimators=100, n_jobs=None,\n", - " num_parallel_tree=None,\n", - " predictor=None, random_state=None, ...)),\n", - " ('CAT',\n", - " <catboost.core.CatBoostClassifier object at 0x0000029454240970>)],\n", - " final_estimator=RandomForestClassifier(), verbose=2)
ExtraTreesClassifier()
XGBClassifier(base_score=None, booster=None, callbacks=None,\n", - " colsample_bylevel=None, colsample_bynode=None,\n", - " colsample_bytree=None, early_stopping_rounds=None,\n", - " enable_categorical=False, eval_metric=None, feature_types=None,\n", - " gamma=None, gpu_id=None, grow_policy=None, importance_type=None,\n", - " interaction_constraints=None, learning_rate=None, max_bin=None,\n", - " max_cat_threshold=None, max_cat_to_onehot=None,\n", - " max_delta_step=None, max_depth=None, max_leaves=None,\n", - " min_child_weight=None, missing=nan, monotone_constraints=None,\n", - " n_estimators=100, n_jobs=None, num_parallel_tree=None,\n", - " predictor=None, random_state=None, ...)
<catboost.core.CatBoostClassifier object at 0x0000029454240970>
RandomForestClassifier()
Pipeline(steps=[('scaler', StandardScaler()),\n", + " ('model', ExtraTreesClassifier())])In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
Pipeline(steps=[('scaler', StandardScaler()),\n", + " ('model', ExtraTreesClassifier())])
StandardScaler()
ExtraTreesClassifier()
Copyrights 2023 Sayam Kumar
+