Giter Club home page Giter Club logo

Comments (4)

paulbkoch avatar paulbkoch commented on September 26, 2024

Hi @Vu1992 -- It should handle continuous output and category input. I don't see that error message in our repo or on the internet. Can you include a stack trace? Also, is the data public?

from interpret.

Vu1992 avatar Vu1992 commented on September 26, 2024

Hi @paulbkoch ,

Thank for your reply. Unfortunately that the data is private, but i can show you what i'm trying to do. I have a dataframe and do the following step with df is my data as a table.
A=df[['BRANCH']] ; B=df[['Gross_Incurred']]; names=['BRANCH']
So basically A and B have the value as in the image bellow
image
image
Then I use your code for Data explorer
marginal = Marginal(names).explain_data(A, B, name='Train Data'); show(marginal)
Then python comeback to me with Type Error: unsupported operand type(s) for -: 'str' and 'str

from interpret.

paulbkoch avatar paulbkoch commented on September 26, 2024

I tried to replicate this with the following code:

import numpy as np
import pandas as pd
from interpret.data import Marginal
from interpret import show
names=['BRANCH']
A = pd.DataFrame()
A["BRANCH"] = pd.Series(np.array(['VC', 'VC', 'MS', 'VH'], dtype=np.str_))
B = pd.DataFrame()
B["Gross_Incurred"] = pd.Series(np.array([18000000.0, 36200000000.0, 0.0, -50000000.0], dtype=float))
marginal = Marginal(names).explain_data(A, B, name='Train Data'); show(marginal)

My example works though. Any idea what could be different?

from interpret.

Vu1992 avatar Vu1992 commented on September 26, 2024

Thank for your help.
I don't know what have gone wrong last time but now i tried again it work but the graph do not change when i change to Type Categorical even in your replication.
when i add continuous variable, it show like this
image
but when i want to see the categorical variable, nothing change
image

from interpret.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.