Displaying 8 results from an estimated 8 matches similar to: "Principle Component Analysis"
2005 Dec 21
7
use of SET command in find_by_sql
Hi,
I''m trying to execute something like this method in a model:
def self.sql_for_rankings()
sql = "SET @counter:=0;"
sql << " SET @counter:=0;
SELECT *, @counter:=@counter+1 AS rank
FROM testscores. "
find_by_sql(sql)
end
Where the new rank column is a kind of autoincrementer inside of
2005 Dec 26
2
resorting a dataset
Quick question to see how I might re-sort an Activerecord data set. Let''s
say I have this table:
tablename: testscores
| id | student | score | avg_for_year
1, steve, 85, 82
2, tom, 84, 92,
3, jim, 92, 95
In my controller, I have something like:
t= Testscores.find(:all, :order => "score DESC", :limit => 2)
...where it would return the records for Jim and Steve....
My
2006 Apr 13
1
Subset rows over multiple columns
I have a data frame where I need to subset certain rows before I compute
the mean of another variable. However, the value that I need to subset
by is found in multiple columns. For example, in the data below the
value R0000160 is found in the first and second columns (itd_1 and
itd_45). These data are student responses to multiple choice test items
from a computer adaptive test. So, the variable
2007 Aug 20
1
rv package, rvnorm function
In an attempt to learn to use the rv package, I have been working
through the examples in Jouni Kerman and Andrew Gelman's "Using Random
Variables to Manipulate and Summarize Simulations in R" (July 4, 2007).
I am using a Dell Precision 380n computer running Gentoo Linux and R
2.2.1 (the latest available through Gentoo's portage/emerge system).
Everything worked well until I
2011 Mar 10
0
confidence intervals when using polr()
Hello, I am running a model with four categories and want predicted
probabilities in each category. Now for this example I wont give a
counterfactual just the training data is fine but is there anyway to get a
confidence interval around the predicted probabilities in each group? I have
tried but it gives me probabilities and I have used interval="confidence",
level=.095 and then interval
2008 Jun 17
3
rindex not working with objects from db model
I''m sorting a separate list that doesn''t contain a certain user''s
attribute, but trying to but that certain user''s attribute on the
separate percentile.
test_scores = Testscore.find(:all, :conditions=> {...})
my_testscore = current_user.test_score
my_ts = Testscore.new(:score => my_testscore)
test_scores.push(ts)
sorted_ts = test_scores.sort {|x,y|
2009 Dec 15
2
[PATCH 1/2] drm/nouveau: Kill global state in NvShadowBIOS
---
drivers/gpu/drm/nouveau/nouveau_bios.c | 47 ++++++++++++++-----------------
1 files changed, 21 insertions(+), 26 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c
index 5eec5ed..04ac564 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bios.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bios.c
@@ -181,43 +181,42 @@ struct methods {
const char
2013 Feb 19
2
Cramer von Mises test for a discrete distribution
Hi,
?
I'm trying to carry out Cramer von Mises tests between pairs of vectors belonging to a discrete distribution (concretely frequencies from 0 to 200). However, the program crashes in the attempt. The problem seems to be that these vectors only have positive integer numbers (+ zero). When I add a random very small positive decimal to the non-decimal part everything works fine (files prm1