Displaying 12 results from an estimated 12 matches for "setweight".
Did you mean:
set_weight
2009 Sep 29
3
How do I access class slots from C?
Hi
I'm trying to implement something similar to the following R snippet using
C. I seem to have hit the wall on accessing class slots using C.
library(fPortfolio)
lppData <- 100 * LPP2005.RET[, 1:6]
ewSpec <- portfolioSpec()
nAssets <- ncol(lppData)
setWeights(ewSpec) <- rep(1/nAssets, times = nAssets)
ewPortfolio <- feasiblePortfolio(
data = lppData,
spec = ewSpec,
constraints = "LongOnly")
ewSpec is an object of type Portfolio Spec which has the following slots:
model slot
type = "MV" a string...
2011 Aug 26
0
R.oo inheritance with pass by reference
...ctorS3("PerMore", function(age,wt) {
if (missing(age)) age <- NA;
if (missing(wt)) wt <- NA;
extend(Person(), "PerMore",
.age=age,
.wt=wt
)
})
setMethodS3("getWeight", "PerMore", function(this, ...) {
this$.wt;
})
setMethodS3("setWeight", "PerMore", function(this,w, ...) {
this$.wt = w;
})
pc = PerMore(67,150)
pc$getWeight() #
pc$getAge() # 67
#...........................................................
setConstructorS3("AgeMultiplier", function(m,perobj) {
if(missing(m))m=NA;
if(missing(perobj))pero...
2008 Feb 28
0
[PATCH] Remove duplicate setResume()
...om>
Best regards,
Kan
diff -r 2a8eaba24bf0 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py Tue Feb 26 15:11:51 2008 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py Thu Feb 28 18:27:49 2008 +0900
@@ -1406,9 +1406,6 @@ class XendDomainInfo:
def setWeight(self, cpu_weight):
self.info[''vcpus_params''][''weight''] = cpu_weight
- def setResume(self, state):
- self._resume = state
-
def getRestartCount(self):
return self._readVm(''xend/restart_count'')
_____________...
2011 Mar 30
0
RWeka - adding weights to a dataset
..., I'd like to have something like:
m <- LogitBoost(Species ~ ., data=iris, weights = myweights)
But that, as far as I understand, it is not implemented and I'd need to use a workaround.
I know that when programming Weka in Java it is possible to assign weights to instances using the setWeight, but I don't know exactly what would be the easiest way to do it. I was thinking about implementing a filter in Weka that does the job and then use FilteredClassifier, but maybe there is a way to do it in R.
Thanks
2011 Oct 27
0
R.oo package, inherit two classes
..................................
setConstructorS3("PerDog", function(age=NA,wt=NA,dog_age=NULL) {
extend(Person(age=age),Dog(dog_age=dog_age), "PerDog",
.wt=wt
)
})
setMethodS3("getWeight", "PerDog", function(this, ...) {
this$.wt;
})
setMethodS3("setWeight", "PerDog", function(this,w, ...) {
this$.wt = w;
})
> pd = PerDog(67,150,1)
Error in list(`PerDog(67, 150, 1)` = <environment>, `extend(Person(age =
age), Dog(dog_age = dog_age), "PerDog", .wt = wt)` = <environment>, :
[2011-10-27 09:34:06] Exception: M...
2010 Dec 08
0
[LLVMdev] Reviewer for our Path Profiling Implementation
...rge namespaces bodies. Same goes for
the rest of the files.
+++ lib/Analysis/PathNumbering.cpp
The constructor and accessors are trivial and can be defined inline.
+ void BallLarusDag::calculatePathNumbersFrom(BallLarusNode* node) {
...
+ BallLarusEdge* currEdge = *succ;
+ currEdge->setWeight(sumPaths);
+ succNode = currEdge->getTarget();
+ unsigned succPaths = succNode->getNumberPaths();
+ isReady = isReady && (succPaths != 0);
If a successor is not finished, can you early return here instead of
prematurely setting the edge weights? Better yet, keep a coun...
2010 Dec 08
1
[LLVMdev] Reviewer for our Path Profiling Implementation
...of the files.
>
> +++ lib/Analysis/PathNumbering.cpp
>
> The constructor and accessors are trivial and can be defined inline.
>
> + void BallLarusDag::calculatePathNumbersFrom(BallLarusNode* node) {
> ...
> + BallLarusEdge* currEdge = *succ;
> + currEdge->setWeight(sumPaths);
> + succNode = currEdge->getTarget();
> + unsigned succPaths = succNode->getNumberPaths();
> + isReady = isReady && (succPaths != 0);
>
> If a successor is not finished, can you early return here instead of
> prematurely setting the edge we...
2010 Dec 03
4
[LLVMdev] Reviewer for our Path Profiling Implementation
I am a student at the University of Alberta under the
supervision of José Nelson Amaral, and I have been working on
implementing path profiling into LLVM. I have completed my project
and would like to submit it.
We are looking for a reviewer for the path profiling implementation. We
have sent previous requests to the llvmdev list but have so far been
unsuccessful.
Please see the attached
2013 Oct 18
0
pamer.fnc y la nueva versión de R
......
.. ..$ y : num [1:20] 528 470 480 514 531 ...
.. ..$ REML : int 4
.. ..and 26 methods, of which 14 are possibly relevant:
.. .. allInfo, copy#envRefClass, initialize, initialize#lmResp,
initializePtr, initializePtr#lmResp, objective, ptr, ptr#lmResp,
.. .. setOffset, setResp, setWeights, updateMu, wrss
..@ Gp : int [1:2] 0 4
..@ call : language lmer(formula = RT ~ Condicion1 * Condicion2 +
(1 | Subject), data = dat)
..@ frame :'data.frame': 20 obs. of 4 variables:
.. ..$ RT : num [1:20] 528 470 480 514 531 ...
.. ..$ Condicion1: Factor w/ 2 levels...
2013 Oct 18
2
pamer.fnc y la nueva versión de R
Javier,
Creo que aquí aplica la ley de Linus que dice: "Dado un número
suficientemente elevado de ojos, todos los errores se convierten en
obvios". La persona que revisa y encuentra un error no necesariamente
tiene que ser la misma que la que lo escribe. Una motivación muy importante
al compartir un código es la de recibir los beneficios del control de
calidad por parte de tus pares.
2013 Dec 02
1
pamer.fnc y la nueva versión de R
...: num [1:20] 528 470 480 514 531 ...
> .. ..$ REML : int 4
> .. ..and 26 methods, of which 14 are possibly relevant:
> .. .. allInfo, copy#envRefClass, initialize, initialize#lmResp, initializePtr, initializePtr#lmResp, objective, ptr, ptr#lmResp,
> .. .. setOffset, setResp, setWeights, updateMu, wrss
> ..@ Gp : int [1:2] 0 4
> ..@ call : language lmer(formula = RT ~ Condicion1 * Condicion2 + (1 | Subject), data = dat)
> ..@ frame :'data.frame': 20 obs. of 4 variables:
> .. ..$ RT : num [1:20] 528 470 480 514 531 ...
> .. ..$ Condi...
2006 Nov 26
0
[758] trunk/wxruby2: i18n support: added Locale class, methods for get/set languages & encodings
...sp      * \brief Sets the font weight.
-         * \param int
-        */
-
</del><span class="cx"> void SetWeight(int weight ) ;
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwxruby2swigclassesincludewxLocaleh"></a>
<div class="modfile"><h4>Modified: tr...