Also, I got an implementation concern as well, I have the following ajax calls taking place,
getting number of input features, getting the response variable getting the number of output classes using the response variable then executing the visualization script Should I use nested ajax calls? On Wed, Aug 19, 2015 at 11:32 PM, Thushan Ganegedara <[email protected]> wrote: > Oh, makes sense now. > > I need to know the number of output classes. I got it to work. > > Thanks > > On Wed, Aug 19, 2015 at 11:28 PM, Nirmal Fernando <[email protected]> wrote: > >> Thushan, >> >> What's the feature name? 'Class' was a sample. >> >> https://localhost:9443/api/datasets/1/stats?feature= >> <https://localhost:9443/api/datasets/1/stats?feature=Class> >> <YourFeatureName> >> >> On Wed, Aug 19, 2015 at 6:53 PM, Thushan Ganegedara <[email protected]> >> wrote: >> >>> Hi, >>> >>> I tried the api call, however, I got the following error >>> >>> Error occurred while retrieving summarized stats of feature [name] Class >>> for the dataset [id] 2 of tenant [id] -1234 and [user] admin . Cause: >>> org.wso2.carbon.ml.core.exceptions.MLDataProcessingException - An error >>> occurred while retrieving summary statistics for the dataset: 2: No data is >>> available [2000-140] >>> >>> >>> On Wed, Aug 19, 2015 at 10:43 PM, Thushan Ganegedara <[email protected]> >>> wrote: >>> >>>> Hi CD, >>>> >>>> Thanks a lot. >>>> >>>> On Wed, Aug 19, 2015 at 10:41 PM, CD Athuraliya <[email protected]> >>>> wrote: >>>> >>>>> Hi Thushan, >>>>> >>>>> You can retrieve the number of output classes (or class labels of >>>>> response variable) via this [1] API (e.g. >>>>> https://localhost:9443/api/datasets/1/stats?feature=Class). Number of >>>>> unique labels in that feature values are given in the JSON response like >>>>> below. >>>>> >>>>> [ >>>>> { >>>>> "missing": 0, >>>>> "median": "0", >>>>> "values": [ >>>>> [ >>>>> "0", >>>>> 500 >>>>> ], >>>>> [ >>>>> "1", >>>>> 268 >>>>> ] >>>>> ], >>>>> *"unique": 2,* >>>>> "std": "0.477", >>>>> "mean": "0.349", >>>>> "bar": true, >>>>> "key": "Frequency" >>>>> } >>>>> ] >>>>> >>>>> [1] >>>>> https://docs.wso2.com/display/ML100/Retrieve+summarized+statistics+of+a+feature+in+a+dataset+via+REST+API >>>>> >>>>> Regards, >>>>> CD >>>>> >>>>> On Wed, Aug 19, 2015 at 5:47 PM, Thushan Ganegedara <[email protected]> >>>>> wrote: >>>>> >>>>>> Hi all, >>>>>> >>>>>> The D3 visualization component is almost ready. I've to tweak few >>>>>> things. I'm attaching an images of what it looks like. Also there's a >>>>>> button for updating the visualization whenever the Layer Sizes input text >>>>>> is changed >>>>>> >>>>>> Could someone please tell me a way to obtain the number of classes >>>>>> with an ajax call maybe? I could obtain the input feature count but not >>>>>> the >>>>>> output class count. >>>>>> >>>>>> -- >>>>>> Regards, >>>>>> >>>>>> Thushan Ganegedara >>>>>> School of IT >>>>>> University of Sydney, Australia >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> *CD Athuraliya* >>>>> Software Engineer >>>>> WSO2, Inc. >>>>> lean . enterprise . middleware >>>>> Mobile: +94 716288847 <94716288847> >>>>> LinkedIn <http://lk.linkedin.com/in/cdathuraliya> | Twitter >>>>> <https://twitter.com/cdathuraliya> | Blog >>>>> <http://cdathuraliya.tumblr.com/> >>>>> >>>> >>>> >>>> >>>> -- >>>> Regards, >>>> >>>> Thushan Ganegedara >>>> School of IT >>>> University of Sydney, Australia >>>> >>> >>> >>> >>> -- >>> Regards, >>> >>> Thushan Ganegedara >>> School of IT >>> University of Sydney, Australia >>> >> >> >> >> -- >> >> Thanks & regards, >> Nirmal >> >> Team Lead - WSO2 Machine Learner >> Associate Technical Lead - Data Technologies Team, WSO2 Inc. >> Mobile: +94715779733 >> Blog: http://nirmalfdo.blogspot.com/ >> >> >> > > > -- > Regards, > > Thushan Ganegedara > School of IT > University of Sydney, Australia > -- Regards, Thushan Ganegedara School of IT University of Sydney, Australia
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
