search for: totalhours

Displaying 2 results from an estimated 2 matches for "totalhours".

2009 Aug 04
3
Logistic Regression
Hi, Trying to setup a logistic regression model. (Something new to me. I usually use SVM.) The person explaining the concept explained to me that I can include a "group" variable so that the probabilities predicted by the model will be "per group" Does this make sense to anyone? If so, how would I implement this? Using the glm or lrm function? Thanks! -N
2006 Jan 12
0
Multi Row validation... or running queries within Validate function?
Is there anyway to perform a query from within a validate function? I need to verify that the sum of several rows does not exceed a certain value eg: class Entry < ActiveRecord::Base belongs_to :day belongs_to :project def validate totalhours = hours samedayentries = self.find_by_day_id(day_id) samedayentries.each do |i| totalhours += i[:hours] unless (id == i[:id]) end errors.add_to_base( "You cannot enter more than 24 hours in a day....