From the course: Data Science for Java Developers

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Calculating datapoint probabilities

Calculating datapoint probabilities - Java Tutorial

From the course: Data Science for Java Developers

Calculating datapoint probabilities

- [Instructor] So we've got our column standard deviations now, that's pretty straightforward. The last method that we have to implement is our get labeled probability for point method. All right so let's put that here. We're going to say private double get labeled probability for point and this is going to have three arguments here. The first one is going to be a list of doubles which is going to be the column means for the group we're referring to here for the group that has this label. So we're going to say group column means. The second argument is going to be the standard deviations for that group. So list double group column standard deviations and the last argument is going to be the actual data item that we're testing here. So we're going to say data item item. Okay so the first thing we're going to do here is we're going to start off by saying double probability equals 1.0 and the reason we're doing…

Contents