Displaying 20 results from an estimated 100 matches similar to: "How to get the same result for GA optimization?"
2025 May 07
1
How to get the same result for GA optimization?
Dear Daniel
As far as I can see you have re-generated the data before calling ga()
so the data is not just a permutation of the first set.
Michael
On 07/05/2025 15:36, Daniel Lobo wrote:
> I am using *Genetic Algorithm* to maximize some function which use data.
>
> I use GA package in R for this (
> https://cran.r-project.org/web/packages/GA/index.html)
>
> Below is my code
2010 Mar 11
2
Comparing matrices
Hello all,
I have two matrices, pop and pop2, each the same number of rows and
columns that I want to compare for equality. I am concerned about
efficiency in this operation.
I've tried a few things without success so far. Doing something simple like:
if (pop==pop2) { cat('equal') } else { cat('NOT equal') }
results in the warning:
1: In if (pop == pop2) { :
the
2009 Apr 26
3
3 questions regarding matrix copy/shuffle/compares
Hello all,
I have the following function call to create a matrix of POP_SIZE rows
and fill it with bit strings of size LEN:
pop=create_pop_2(POP_SIZE, LEN)
I have 3 questions:
(1) If I did
keep_pop[1:POP_SIZE] == pop[1:POP_SIZE]
to keep a copy of the original data structure before manipulating
'pop' potentially, would this make a deep copy or just shallow? Ie
2007 Nov 15
3
Ancova doesn't return test statistics
Dear all,
I'm quite sure that this is a stupid question, but I'll ask anyway.
I want to perform an ANCOVA with two continuous factors and three
categorical factors.
Plant population growth rate (GR) = dependent variable
Seed reduction due to herbivory (SR) = continuous explanatory variable
Herbivore species (HS, 2 levels) = categorical explanatory variable
Population (Pop, 24 levels) =
2010 Jan 17
2
For loops in R
Hello.
I've just started using R and am trying to figure out if the two codes
snippets below have the same output
gBest<-floor(runif(popsize,min=1,max=top))
velocity[i,j]<<-.4* velocity[i,j] + 1 * runif(1) * (pbestsVar[i,j] -
popVar[i,j]) + 1 * runif(1) * (archiveVar[gBest,j] - popVar[i,j])
and
for (i in 1:popsize) {
for (j in 1:maxvar) {
gBest<-sample(top,size=1)
2011 Dec 02
1
Error in Genetic Matching
Dear R Users,
I am a novice learner of R software. I am working with Genetic Matching - GenMatch(), but I am getting an Error message as follows:
Error in GenMatch(Tr = Tr, X = X.binarynp, BalanceMatrix = BalanceMatrix.binarynp, :
GenMatch(): input includes NAs
Could you please suggest me correcting the above problem?
My GenMatch command is,
> gen1 <- GenMatch(Tr = Tr, X =
2007 Oct 01
1
saving and loading complex objects
Dear Sir:
When I try to save large and very complex recursive objects with some components containing models (such as the output from arima or lm ),
the resulting file sizes increase by 4 meg per save.
example directory:
amex 8 meg
argentina 12 meg
australia 16 meg
...
Moreover, I am unable to read these file objects back into R.
I note that readBin and writeBin
2015 Sep 09
0
sample.int() algorithms
I was experiencing a strange pattern of slowdowns when using
sample.int(), where sampling from a one population would sometimes
take 1000x longer than taking the same number of samples from a
slightly larger population. For my application, this resulted in a
runtime of several hours rather than a few seconds. Looking into it,
I saw that sample.int() is hardcoded to switch algorithms when the
2009 Sep 09
2
Matrix multiplication and random numbers
Dear All
I new to using R and am struggling with some matrix multiplication.
I have two matrices, one containing random numbers, these are multiplied
together to get another matrix which is different each time. When I put in
another for loop to repeat this process a multiple times the matrices are
all the same. I?m sure there is a way to keep the randomness of the
different matrices but I think
2008 Sep 12
2
Fw: Complex sampling survey _ Use of survey package
--------------------------------------------------
From: "Ahoussou Sylvie" <sylvie.ahoussou at antilles.inra.fr>
Sent: Friday, September 12, 2008 9:48 AM
To: "Thomas Lumley" <tlumley at u.washington.edu>
Subject: Re: [R] Complex sampling survey _ Use of survey package
> Thanks for your answer
>
> I think I made a mistake when I recopied the 5 first rows of
2011 Dec 02
0
Error message in Genetic Matching
Dear R Users,
I am a novice learner of R software. I am working with Genetic Matching - GenMatch(), but I am getting an Error message as follows:
Error in GenMatch(Tr = Tr, X = X.binarynp, BalanceMatrix = BalanceMatrix.binarynp, :
GenMatch(): input includes NAs
Could you please suggest me correcting the above problem?
My GenMatch command is,
> gen1 <- GenMatch(Tr = Tr, X =
2010 Mar 14
1
Segfault Problem c++ R interface (detailed)
Hello R Community,
I've been working on a project that uses pre-made C++ libraries (using STL)
in R and build a package. However, I've been getting an unusual segfault
that I'm unable to trace its origin. After many attempts of debugging using
gdb, commenting out parts (or all of my code) and valgrind, I'm unable to
make heads or tails about what I'm doing wrong. In fact, when
2008 Sep 09
1
survey package
Version 3.9 of the survey package is now on CRAN. Since the last
announcement (version 3.6-11, about a year ago) the main changes are
- Database-backed survey objects: the data can live in a SQLite (or other
DBI-compatible) database and be loaded as needed.
- Ordinal logistic regression
- Support for the 'mitools' package and multiply-imputed data
- Conditioning plots,
2008 Sep 09
1
survey package
Version 3.9 of the survey package is now on CRAN. Since the last
announcement (version 3.6-11, about a year ago) the main changes are
- Database-backed survey objects: the data can live in a SQLite (or other
DBI-compatible) database and be loaded as needed.
- Ordinal logistic regression
- Support for the 'mitools' package and multiply-imputed data
- Conditioning plots,
2004 Sep 04
1
Inconsistencies in subassignment (PR#7210)
I have made the 3-d case do the same as the vector case, which is what the
C code clearly intended (a goto label was in the wrong place).
This leaves the bigger question of the right thing to do. I note that data
frames give an error when any indices are NA.
-thomas
On Fri, 3 Sep 2004 ripley@stats.ox.ac.uk wrote:
> Apart from the inconsistencies, there are two clear bugs here:
>
> 1)
2005 Feb 21
2
Suggestion for noise reduction on Asterisk-U sers
> This wiki should cover most of the basic stuff that gets asked over
and
>over again just to help reduce the amount of repetition that most of you
>have probably noticed takes place here.
Problem is, Wikis in general suck and voip-info.org in particular is quite
useless except as a random clicky-clicky exercise. You ever use the search
on voip-info.org? It's almost like someone
2012 Aug 09
4
debug vs regular mode
Dear all,
I had a R segmentation fault, and then invoked debug mode and ran step
by step.
When I reached "terms(Y~X1*X2*...*X16)", I would then have
"segmentation" fault. However, if I just ran this under regular "R
interactive" mode, it would be fine though taking long time.
My questions are:
1. Is there a known limit of terms for a formula?
2. Why does the
2012 Aug 09
4
debug vs regular mode
Dear all,
I had a R segmentation fault, and then invoked debug mode and ran step
by step.
When I reached "terms(Y~X1*X2*...*X16)", I would then have
"segmentation" fault. However, if I just ran this under regular "R
interactive" mode, it would be fine though taking long time.
My questions are:
1. Is there a known limit of terms for a formula?
2. Why does the
2009 Sep 27
3
CRAN (and crantastic) updates this week
CRAN (and crantastic) updates this week
New packages
------------
* bdoc (1.0)
Michael Anderson
http://crantastic.org/packages/bdoc
This package contains a function that will classify DNA barcodes as
well as a few test and reference data sets.
* bdsmatrix (1.0)
Terry Therneau
http://crantastic.org/packages/bdsmatrix
This is a special case of sparse matrices, used by coxme and
2008 Jan 11
26
Mongrel doesn''t start under Rails 2.0.2/Win XP
All,
Mongrel 1.1.3
Rails 2.0.2
Ruby 1.8.6
Windows XP SP2
When I issue the command "ruby script/server" from any of my Rails
projects on v. 2.0.2, I get a Windows dialog with the error:
"The application has failed to start because MSVCR80.dll was not found.
Re-installing the application may fix this problem."
I''ve gone through the process of attempting to introduce