Giter VIP home page Giter VIP logo

Comments (6)

irecsys avatar irecsys commented on August 11, 2024

I didn't get errors. Can you provide more details? which data were you
using? what's your setting

On Tuesday, June 7, 2016, basvank [email protected] wrote:

Hi,

I recently tried out the newly added DCW and DCR algorithms but I am
getting an error in the ContextSimilarity() function in DCW
https://github.com/irecsys/CARSKit/blob/master/src/carskit/alg/cars/transformation/hybridfiltering/DCW.java#L329
and ContextRelaxation() function in DCR
https://github.com/irecsys/CARSKit/blob/master/src/carskit/alg/cars/transformation/hybridfiltering/DCR.java#L343.
The error is java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 and
happens in conds1.get(i) in both function classes.

Can you check if you get the same error as well? Or, if not, let me know
what settings and data file you use so that I can check if it's a problem
on my side?

Thanks for the help!


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#6, or mute the thread
https://github.com/notifications/unsubscribe/AHDB5wkW1g6oKe1Ygoz_FaKSq0lTBwFIks5qJTJMgaJpZM4Ivs2t
.

Sent from Gmail Mobile

from carskit.

basvank avatar basvank commented on August 11, 2024

Hmm strange, I can indeed get it to work on the InCarMusic dataset. Unfortunately I am working on a dataset consisting of proprietary data so I cannot share that.

The only thing I can think of is the structure of the data set then.

Comparing this (for InCarData):

  • Statistics of U-I-C Matrix:
  • User amount: 42
  • Item amount: 139
  • Rate amount: 3938
  • Context dimensions: 8 (drivingstyle, landscape, mood, naturalphenomena, roadtype, sleepiness, trafficconditions, weather)
  • Context conditions: 35 (drivingstyle: 3, landscape: 5, mood: 6, naturalphenomena: 5, roadtype: 4, sleepiness: 3, trafficconditions: 4, weather: 5)
  • Context situations: 28
  • Data density: 0.0006%
  • Scale distribution: [0.0 x 122, 3.0 x 652, 2.0 x 705, 1.0 x 1452, 4.0 x 513, 5.0 x 494]
  • Average value of all ratings: 2.447647
  • Standard deviation of all ratings: 1.474440
  • Mode of all rating values: 1.000000
  • Median of all rating values: 2.000000

To this (my dataset):

  • Statistics of U-I-C Matrix:
  • User amount: 8385
  • Item amount: 51
  • Rate amount: 9456
  • Context dimensions: 2 (pr, context)
  • Context conditions: 13 (pr: 12, context: 1)
  • Context situations: 13
  • Data density: 0.1668%
  • Scale distribution: [1.0 x 9456]
  • Average value of all ratings: 1.000000
  • Standard deviation of all ratings: 0.000000
  • Mode of all rating values: 1.000000
  • Median of all rating values: 1.000000

Could it have something to do with the fact that it has only two context dimensions or because dimension context only has one condition? (this is due to the fact that this is context:na, I could try and make it pr:na and see if that works). Do you know if these algorithms work across context dimensions or only across context conditions?

from carskit.

basvank avatar basvank commented on August 11, 2024

I should note that I have used this dataset succesfully with several other algorithms (CAMF, CSLIM for example) so I don't think the error is due to an incorrect structure.

from carskit.

basvank avatar basvank commented on August 11, 2024

Ah, changing the context from context:na to pr:na seems to solve it. The statistics then become as follows:

  • Statistics of U-I-C Matrix:
  • User amount: 8385
  • Item amount: 51
  • Rate amount: 9456
  • Context dimensions: 1 (pr)
  • Context conditions: 13 (pr: 13)
  • Context situations: 13
  • Data density: 0.1540%
  • Scale distribution: [1.0 x 9456]
  • Average value of all ratings: 1.000000
  • Standard deviation of all ratings: 0.000000
  • Mode of all rating values: 1.000000
  • Median of all rating values: 1.000000

So it seems the algorithm can't handle a single context condition within a dimension.

I'm letting it run now to be sure it completes successfully.

from carskit.

basvank avatar basvank commented on August 11, 2024

Next error now, java.lang.IllegalArgumentException: fromIndex(0) > toIndex(-1) in predict() because I have num.neighbors=-1.

I have changed this line to k = (k > knn && knn > 0) ? knn : k; which solves this particular error and it's running again now...

from carskit.

basvank avatar basvank commented on August 11, 2024

All working just fine now!

from carskit.

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.